com.vmware.vim25.mo.samples.vm.VMSnapshot.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 ? )com/vmware/vim25/mo/samples/vm/VMSnapshot java/lang/Object ()V Code
LineNumberTable LocalVariableTable this +Lcom/vmware/vim25/mo/samples/vm/VMSnapshot; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception java/lang/System out Ljava/io/PrintStream; @Usage: java VMSnapshot
java/io/PrintStream println (Ljava/lang/String;)V " ,op - list, create, remove, removeall, revert
$ % & exit (I)V ( test * !A description for sample snapshot , #com/vmware/vim25/mo/ServiceInstance . java/net/URL
- 0
+ 2 3 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V
+ 5 6 7
getRootFolder ()Lcom/vmware/vim25/mo/Folder; 9 &com/vmware/vim25/mo/InventoryNavigator
8 ; < &(Lcom/vmware/vim25/mo/ManagedEntity;)V > VirtualMachine
8 @ A B searchManagedEntity I(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; D "com/vmware/vim25/mo/VirtualMachine F java/lang/StringBuilder H No VM
E 0
E K L M append -(Ljava/lang/String;)Ljava/lang/StringBuilder; O found
E Q R S toString ()Ljava/lang/String;
+ U V W getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
Y [ Z $com/vmware/vim25/mo/ServerConnection \ logout ^ create
` b a java/lang/String c d equalsIgnoreCase (Ljava/lang/String;)Z
C f g h createSnapshot_Task B(Ljava/lang/String;Ljava/lang/String;ZZ)Lcom/vmware/vim25/mo/Task;
j l k com/vmware/vim25/mo/Task m S waitForMe o success q Snapshot was created. s list
u v w
listSnapshots '(Lcom/vmware/vim25/mo/VirtualMachine;)V y revert
{ | } getSnapshotInTree d(Lcom/vmware/vim25/mo/VirtualMachine;Ljava/lang/String;)Lcom/vmware/vim25/mo/VirtualMachineSnapshot;
? ? *com/vmware/vim25/mo/VirtualMachineSnapshot ? ? revertToSnapshot_Task <(Lcom/vmware/vim25/mo/HostSystem;)Lcom/vmware/vim25/mo/Task; ? Reverted to snapshot: ? removeall
C ? ? ? removeAllSnapshots_Task ()Lcom/vmware/vim25/mo/Task; ? Removed all snapshots ? remove
? ? ? removeSnapshot_Task (Z)Lcom/vmware/vim25/mo/Task; ? Removed snapshot: ? Invalid operation args [Ljava/lang/String; vmname Ljava/lang/String; op snapshotname desc removechild Z si %Lcom/vmware/vim25/mo/ServiceInstance;
rootFolder Lcom/vmware/vim25/mo/Folder; vm $Lcom/vmware/vim25/mo/VirtualMachine; task Lcom/vmware/vim25/mo/Task; vmsnap ,Lcom/vmware/vim25/mo/VirtualMachineSnapshot;
StackMapTable ? ? com/vmware/vim25/mo/Folder
C ? ? ? getSnapshot /()Lcom/vmware/vim25/VirtualMachineSnapshotInfo;
? ? ? +com/vmware/vim25/VirtualMachineSnapshotInfo ? ? getRootSnapshotList 0()[Lcom/vmware/vim25/VirtualMachineSnapshotTree;
? ? ? findSnapshotInTree k([Lcom/vmware/vim25/VirtualMachineSnapshotTree;Ljava/lang/String;)Lcom/vmware/vim25/ManagedObjectReference;
C U
? ? R(Lcom/vmware/vim25/mo/ServerConnection;Lcom/vmware/vim25/ManagedObjectReference;)V snapName snapTree .[Lcom/vmware/vim25/VirtualMachineSnapshotTree; mor )Lcom/vmware/vim25/ManagedObjectReference; ?
? ? ? +com/vmware/vim25/VirtualMachineSnapshotTree ? S getName
` ? ? ? equals (Ljava/lang/Object;)Z
? ? ? ? +()Lcom/vmware/vim25/ManagedObjectReference;
? ? ? ? getChildSnapshotList i I node -Lcom/vmware/vim25/VirtualMachineSnapshotTree; childTree
? ? ? printSnapshots 1([Lcom/vmware/vim25/VirtualMachineSnapshotTree;)V snapInfo -Lcom/vmware/vim25/VirtualMachineSnapshotInfo; ? Snapshot Name :
SourceFile VMSnapshot.java ! / *? ?
1
X *?? ? ? ? !? ? #*2L*2M'N):6? +Y? -Y*2? /*2*2? 1:? 4:? 8Y? :=+? ?? C:? '? ? EYG? I+? JN? J? P? ? T? X?],? _? $-? e: ? in? в p? ? ?r,? _? ? t? ?,x? _? ;-? z: ? ? ? ~:
? in? ?? ? EY?? I-? J? P? ? s,?? _? ? ?: ? in? Y? ?? ? N,?? _? <-? z: ? 8 ? ?:
? in? %? ? EY?? I-? J? P? ? ? ?? ?? T? X?
? 6 5 7 9 ; > ? " A % B ) C , E 0 F A E F H M I Q J S I V J \ I a L f N ? O ? P ? S ? U ? V ? U ? W ? Y ? \ ? ^ ? ` ? c ? b ? d ? f ? g ? i ? j i n p q s+ v4 y7 x<