com.vmware.vim25.mo.samples.vm.VmStartupOption.class Maven / Gradle / Ivy
The newest version!
???? 1 ? .com/vmware/vim25/mo/samples/vm/VmStartupOption java/lang/Object ()V Code
LineNumberTable LocalVariableTable this 0Lcom/vmware/vim25/mo/samples/vm/VmStartupOption; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception *com/vmware/vim25/mo/util/CommandLineParser
constructOptions (()[Lcom/vmware/vim25/mo/util/OptionSpec;
<([Lcom/vmware/vim25/mo/util/OptionSpec;[Ljava/lang/String;)V url
!
get_option &(Ljava/lang/String;)Ljava/lang/String; # username % password ' hostname ) #com/vmware/vim25/mo/ServiceInstance + java/net/URL
* - . (Ljava/lang/String;)V
( 0 1 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V 3 &com/vmware/vim25/mo/InventoryNavigator
( 5 6 7
getRootFolder ()Lcom/vmware/vim25/mo/Folder;
2 9 : &(Lcom/vmware/vim25/mo/ManagedEntity;)V <
HostSystem
2 > ? @ searchManagedEntity I(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; B com/vmware/vim25/mo/HostSystem D F E java/lang/System G H out Ljava/io/PrintStream; J Host cannot be found
L N M java/io/PrintStream O . println
A Q R S getHostAutoStartManager ,()Lcom/vmware/vim25/mo/HostAutoStartManager; U &HostAutoStartManager is not available. W "com/vmware/vim25/AutoStartDefaults
V Z java/lang/Integer
Y \ ] (I)V
V _ ` a
setStartDelay (Ljava/lang/Integer;)V c e d java/lang/Boolean f g TRUE Ljava/lang/Boolean;
V i j k
setEnabled (Ljava/lang/Boolean;)V
V m n a setStopDelay p +com/vmware/vim25/HostAutoStartManagerConfig
o
o s t u setDefaults '(Lcom/vmware/vim25/AutoStartDefaults;)V
w y x (com/vmware/vim25/mo/HostAutoStartManager z { reconfigureAutostart 0(Lcom/vmware/vim25/HostAutoStartManagerConfig;)V } .Done with reconfiguring the autostart options. args [Ljava/lang/String; clp ,Lcom/vmware/vim25/mo/util/CommandLineParser; urlStr Ljava/lang/String; si %Lcom/vmware/vim25/mo/ServiceInstance; host Lcom/vmware/vim25/mo/HostSystem; hasm *Lcom/vmware/vim25/mo/HostAutoStartManager; asd $Lcom/vmware/vim25/AutoStartDefaults; spec -Lcom/vmware/vim25/HostAutoStartManagerConfig; ? #com/vmware/vim25/mo/util/OptionSpec ? String ? Name of the host
? ? ? L(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
SourceFile VmStartupOption.java ! / *? ?
0
? ǻ Y? *? L+? M+"? N+$? :+&? :? (Y? *Y,? ,-? /:? 2Y? 4? 8;? =? A:? ? CI? K?? P:? ? CT? K?? VY? X: ? YYd? [? ^ ? b? h ? YY