com.vmware.vim25.mo.samples.vm.GetUpdates.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/GetUpdates java/lang/Object ()V Code
LineNumberTable LocalVariableTable this +Lcom/vmware/vim25/mo/samples/vm/GetUpdates; 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 ' vmname ) #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 4 5
getRootFolder ()Lcom/vmware/vim25/mo/Folder; 7 &com/vmware/vim25/mo/InventoryNavigator
6 9 : &(Lcom/vmware/vim25/mo/ManagedEntity;)V < VirtualMachine
6 > ? @ searchManagedEntity I(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; B "com/vmware/vim25/mo/VirtualMachine D F E java/lang/System G H out Ljava/io/PrintStream; J java/lang/StringBuilder L Virtual Machine
I -
I O P Q append -(Ljava/lang/String;)Ljava/lang/StringBuilder; S
Not Found
I U V W toString ()Ljava/lang/String;
Y [ Z java/io/PrintStream \ . println ^ [Ljava/lang/String; ` java/lang/String b name d runtime
f h g .com/vmware/vim25/mo/util/PropertyCollectorUtil i j buildPropertySpecArray 6([[Ljava/lang/String;)[Lcom/vmware/vim25/PropertySpec;
l m n createObjectSpecs C(Lcom/vmware/vim25/mo/ManagedObject;)[Lcom/vmware/vim25/ObjectSpec; p #com/vmware/vim25/PropertyFilterSpec
o
o s t u
setPropSet #([Lcom/vmware/vim25/PropertySpec;)V
o w x y setObjectSet !([Lcom/vmware/vim25/ObjectSpec;)V
( { | } getPropertyCollector )()Lcom/vmware/vim25/mo/PropertyCollector;
? ? %com/vmware/vim25/mo/PropertyCollector ? ? createFilter L(Lcom/vmware/vim25/PropertyFilterSpec;Z)Lcom/vmware/vim25/mo/PropertyFilter; ? java/io/BufferedReader ? java/io/InputStreamReader D ? ? ? in Ljava/io/InputStream;
? ? ? (Ljava/io/InputStream;)V
? ? ? (Ljava/io/Reader;)V ?
? ? ? checkForUpdates 0(Ljava/lang/String;)Lcom/vmware/vim25/UpdateSet;
? ? ? com/vmware/vim25/UpdateSet ? ? getFilterSet *()[Lcom/vmware/vim25/PropertyFilterUpdate;
? ? ? handleUpdate (Lcom/vmware/vim25/UpdateSet;)V
? ? ? W
getVersion ? version is: ? No update is present! ? #
Press to check for updates ? (Enter 'exit' to exit the program
? ? ? W readLine
_ ? ? W trim ? exit
_ ? ? ? equalsIgnoreCase (Ljava/lang/String;)Z
? ? ? "com/vmware/vim25/mo/PropertyFilter ? destroyPropertyFilter
( ? ? ? getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
? ? ? $com/vmware/vim25/mo/ServerConnection ? logout args clp ,Lcom/vmware/vim25/mo/util/CommandLineParser; urlStr Ljava/lang/String; si %Lcom/vmware/vim25/mo/ServiceInstance;
rootFolder Lcom/vmware/vim25/mo/Folder; vm $Lcom/vmware/vim25/mo/VirtualMachine; typeInfo [[Ljava/lang/String; pSpecs [Lcom/vmware/vim25/PropertySpec; oSpecs [Lcom/vmware/vim25/ObjectSpec; pSpec %Lcom/vmware/vim25/PropertyFilterSpec; pc 'Lcom/vmware/vim25/mo/PropertyCollector; pf $Lcom/vmware/vim25/mo/PropertyFilter; console Ljava/io/BufferedReader; version update Lcom/vmware/vim25/UpdateSet;
StackMapTable ? com/vmware/vim25/mo/Folder ? ? ? ? com/vmware/vim25/ObjectSpec
?
? ? ? !com/vmware/vim25/mo/ManagedObject ? ? getMOR +()Lcom/vmware/vim25/ManagedObjectReference;
? ? ? ? setObj ,(Lcom/vmware/vim25/ManagedObjectReference;)V ? ? ? java/lang/Boolean ? ? FALSE Ljava/lang/Boolean;
? ? ? ? setSkip (Ljava/lang/Boolean;)V mo #Lcom/vmware/vim25/mo/ManagedObject; java/util/ArrayList
%com/vmware/vim25/PropertyFilterUpdate
getObjectSet "()[Lcom/vmware/vim25/ObjectUpdate;
com/vmware/vim25/ObjectUpdate ? getObj
'com/vmware/vim25/ManagedObjectReference W getType
_ equals (Ljava/lang/Object;)Z
add
HostSystem
! size ()I# Virtual Machine updates:
%&' iterator ()Ljava/util/Iterator;)+* java/util/Iterator,- next ()Ljava/lang/Object;
/01 handleObjectUpdate "(Lcom/vmware/vim25/ObjectUpdate;)V)345 hasNext ()Z7
Host updates: vmUpdates Ljava/util/ArrayList; hostUpdates pfus ([Lcom/vmware/vim25/PropertyFilterUpdate; i I ous [Lcom/vmware/vim25/ObjectUpdate; j vmi Ljava/util/Iterator;<@
GHI getChangeSet $()[Lcom/vmware/vim25/PropertyChange;
I
LMN getKind %()Lcom/vmware/vim25/ObjectUpdateKind;
IP PQ -(Ljava/lang/Object;)Ljava/lang/StringBuilder;S Data:
UVW
handleChanges %([Lcom/vmware/vim25/PropertyChange;)V oUpdate Lcom/vmware/vim25/ObjectUpdate; "[Lcom/vmware/vim25/PropertyChange;
\^] com/vmware/vim25/PropertyChange_ W getName
\ab- getVal
\def getOp %()Lcom/vmware/vim25/PropertyChangeOp; hji !com/vmware/vim25/PropertyChangeOpkl remove #Lcom/vmware/vim25/PropertyChangeOp;n Property Name: p summary.quickStatsr )com/vmware/vim25/VirtualMachineQuickStats
qtuv getOverallCpuUsage ()Ljava/lang/Integer;x unavailable
z U{ java/lang/Integer
q}~v getHostMemoryUsage? Guest Status:
q??? getGuestHeartbeatStatus (()Lcom/vmware/vim25/ManagedEntityStatus;
? U? $com/vmware/vim25/ManagedEntityStatus? CPU Load %: ? Memory Load %: ? *com/vmware/vim25/HostListSummaryQuickStats
?t
???v getOverallMemoryUsage? *com/vmware/vim25/VirtualMachineRuntimeInfo? Power State:
????
getPowerState -()Lcom/vmware/vim25/VirtualMachinePowerState;
? U? )com/vmware/vim25/VirtualMachinePowerState? Connection State:
???? getConnectionState 2()Lcom/vmware/vim25/VirtualMachineConnectionState;
? U? .com/vmware/vim25/VirtualMachineConnectionState
???? getBootTime ()Ljava/util/Calendar;? Boot Time:
??? java/util/Calendar?? getTime ()Ljava/util/Date;
???? getMemoryOverhead ()Ljava/lang/Long;? Memory Overhead: ? com/vmware/vim25/HostRuntimeInfo
???? .()Lcom/vmware/vim25/HostSystemConnectionState;
? U? *com/vmware/vim25/HostSystemConnectionState
???
U? Property Name: ? value removed. changes value Ljava/lang/Object; op vmqs +Lcom/vmware/vim25/VirtualMachineQuickStats; cpu memory hsqs ,Lcom/vmware/vim25/HostListSummaryQuickStats; vmri ,Lcom/vmware/vim25/VirtualMachineRuntimeInfo; bTime Ljava/util/Calendar; mOverhead Ljava/lang/Long; hri "Lcom/vmware/vim25/HostRuntimeInfo;Z? java/lang/Long? #com/vmware/vim25/mo/util/OptionSpec? String? Name of the virtual machine
?? ? L(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
SourceFile GetUpdates.java ! / *? ?
K
X? Y? *? L+? M+"? N+$? :+&? :? (Y? *Y,? ,-? /:? 2:? 6Y? 8;? =? A:? ? C? IYK? M? NR? N? T? X?? ]Y? _Y;SYaSYcSS: ? e:
? k:? oY? q:
? r? v? z:
? ~:? ?Y? ?Y? ?? ?? ?:?:
? ?:? 1? ?? )? ?? ?:? C? IY?? M? N? T? X? ? C?? X? C?? X? C?? X? ?? ??? ????? ?? ?? ±
? ! P Q R S " T * V ? W F X [ Z ` \ | ] } d ? f ? g ? h ? i ? j ? l ? m ? o ? p ? s ? t ? v w x" |* 2 ?: ?J ?O ?W ? ? X ? ^ L ? ? E ? ? > # ? "6 % ? *. ' ? ? ? ? F ? ? [ ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? v ? ? ? r ? ? ? [ ? ? ? e ? } ] _ _ _ _ ( ? A ? h ] _ _ _ _ ( ? A ? ? ? o ? ? _ ? ; ? m n d $? ?Y? ?Y? ?SL+2*? ? ?+2? ?? ?+?
? ? ? " ? $ ? ? ? ? ? Y?L?Y?M*? ?N6? ^-2?:6? D2??;?? +2?W? !2????
,2?W??????-????+?? ,? C"? X+?$:? ?( ??.?2 ???,?? ,? C6? X,?$:? ?( ??.?2 ???
^ ? ? ? ? ? $ ? * ? = ? J ? ^ ? h ? s ? } ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \ ? ? ? ?89 ?:9 ?;<