com.vmware.vim25.mo.samples.network.TurnOnFirewallPolicy.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vijava Show documentation
Show all versions of vijava Show documentation
Java API for accessing VMWare web services API
The newest version!
???? 2 ? 8com/vmware/vim25/mo/samples/network/TurnOnFirewallPolicy java/lang/Object ()V Code
LineNumberTable LocalVariableTable this :Lcom/vmware/vim25/mo/samples/network/TurnOnFirewallPolicy; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception java/lang/System out Ljava/io/PrintStream; GUsage: java TurnOnFirewallPolicy
java/io/PrintStream println (Ljava/lang/String;)V " #com/vmware/vim25/mo/ServiceInstance $ java/net/URL
# &
! ( ) 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V
! + , -
getRootFolder ()Lcom/vmware/vim25/mo/Folder; / &com/vmware/vim25/mo/InventoryNavigator
. 1 2 &(Lcom/vmware/vim25/mo/ManagedEntity;)V 4
HostSystem
. 6 7 8 searchManagedEntity I(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; : com/vmware/vim25/mo/HostSystem < java/lang/StringBuilder > Cannot find the host:
; &
; A B C append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
; E F G toString ()Ljava/lang/String;
! I J K getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
M O N $com/vmware/vim25/mo/ServerConnection P logout
9 R S T getHostFirewallSystem *()Lcom/vmware/vim25/mo/HostFirewallSystem;
V X W &com/vmware/vim25/mo/HostFirewallSystem Y Z getFirewallInfo %()Lcom/vmware/vim25/HostFirewallInfo; \ Default Firewall Policy:
^ ` _ !com/vmware/vim25/HostFirewallInfo a b getDefaultPolicy .()Lcom/vmware/vim25/HostFirewallDefaultPolicy; d IncomingBlocked:
f h g *com/vmware/vim25/HostFirewallDefaultPolicy i j getIncomingBlocked ()Ljava/lang/Boolean;
; l B m -(Ljava/lang/Object;)Ljava/lang/StringBuilder; o OutgoingBlocked:
f q r j getOutgoingBlocked
^ t u v
getRuleset )()[Lcom/vmware/vim25/HostFirewallRuleset;
x y z printRuleSet )(Lcom/vmware/vim25/HostFirewallRuleset;)V
| ~ } $com/vmware/vim25/HostFirewallRuleset ? isEnabled ()Z
| ? ? G getKey
V ? ?
enableRuleset args [Ljava/lang/String; si %Lcom/vmware/vim25/mo/ServiceInstance; hostname Ljava/lang/String;
rootFolder Lcom/vmware/vim25/mo/Folder; host Lcom/vmware/vim25/mo/HostSystem; hss (Lcom/vmware/vim25/mo/HostFirewallSystem; hsi #Lcom/vmware/vim25/HostFirewallInfo; defPolicy ,Lcom/vmware/vim25/HostFirewallDefaultPolicy; rs '[Lcom/vmware/vim25/HostFirewallRuleset; i I
StackMapTable ? ? java/lang/String ? com/vmware/vim25/mo/Folder ? ?
Key: ? Label:
| ? ? G getLabel ? Required:
| ? ? ?
isRequired
; ? B ? (Z)Ljava/lang/StringBuilder; ? Service:
| ? ? G
getService ? Rules:
? ? print
| ? ? ? getRule &()[Lcom/vmware/vim25/HostFirewallRule; ? Protocol:
? ? ? !com/vmware/vim25/HostFirewallRule ? G getProtocol ? Port:
? ? ? ? getPort ()I
; ? B ? (I)Ljava/lang/StringBuilder; ?
Direction:
? ? ? ? getDirection .()Lcom/vmware/vim25/HostFirewallRuleDirection; ? EndPort:
? ? ? ?
getEndPort ()Ljava/lang/Integer; ? Enabled: rule &Lcom/vmware/vim25/HostFirewallRuleset; rules $[Lcom/vmware/vim25/HostFirewallRule; j ?
SourceFile TurnOnFirewallPolicy.java ! / *? ?
1
L
?*?? ? ? ?? !Y? #Y*2? %*2*2? 'L*2M+? *N:? .Y-? 03,? 5? 9:? !? ? ;Y=? ?,? @? D? +? H? L?? Q:? U:? [? ? ]:? ? ;Yc? ?? e? k? D? ? ? ;Yn? ?? p? k? D? ? s:6 ? & 2? w 2? {? 2? ?? ?? ? ???ӱ
? # 5 7 9 <