Examples of HostFirewallSystem


Examples of com.vmware.vim25.mo.HostFirewallSystem

      System.out.println("Cannot find the host:" + hostname);
      si.getServerConnection().logout();
      return;
    }
   
    HostFirewallSystem hss = host.getHostFirewallSystem();
   
    HostFirewallInfo hsi = hss.getFirewallInfo();
   
    System.out.println("Default Firewall Policy:");
    HostFirewallDefaultPolicy defPolicy = hsi.getDefaultPolicy();
    System.out.println("IncomingBlocked:"
        + defPolicy.getIncomingBlocked());
    System.out.println("OutgoingBlocked:"
        + defPolicy.getOutgoingBlocked());
   
    HostFirewallRuleset[] rs = hsi.getRuleset();
    for(int i=0; rs!=null && i<rs.length; i++)
    {
      printRuleSet(rs[i]);
      if(!rs[i].isEnabled())
      {
        hss.enableRuleset(rs[i].getKey());
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.