com.vmware.vim25.mo.samples.QueryMemoryOverhead.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/QueryMemoryOverhead java/lang/Object ()V Code
LineNumberTable LocalVariableTable this 1Lcom/vmware/vim25/mo/samples/QueryMemoryOverhead; 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 )
memorysize + cpucount - #com/vmware/vim25/mo/ServiceInstance / java/net/URL
. 1 2 (Ljava/lang/String;)V
, 4 5 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V 7 &com/vmware/vim25/mo/InventoryNavigator
, 9 : ;
getRootFolder ()Lcom/vmware/vim25/mo/Folder;
6 = > &(Lcom/vmware/vim25/mo/ManagedEntity;)V @
HostSystem
6 B C D searchManagedEntity I(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; F com/vmware/vim25/mo/HostSystem H )com/vmware/vim25/VirtualMachineConfigInfo
G K 1
G M N 2 setChangeVersion
, P Q R currentTime ()Ljava/util/Calendar;
G T U V setModified (Ljava/util/Calendar;)V X 1com/vmware/vim25/VirtualMachineDefaultPowerOpInfo
W
G [ \ ] setDefaultPowerOps 6(Lcom/vmware/vim25/VirtualMachineDefaultPowerOpInfo;)V _ 'com/vmware/vim25/VirtualMachineFileInfo
^
G b c d setFiles ,(Lcom/vmware/vim25/VirtualMachineFileInfo;)V f 'com/vmware/vim25/VirtualMachineFlagInfo
e
G i j k setFlags ,(Lcom/vmware/vim25/VirtualMachineFlagInfo;)V m Full Name
G o p 2 setGuestFullName r Id
G t u 2
setGuestId w com/vmware/vim25/VirtualHardware
v
z | { java/lang/Integer } ~ parseInt (Ljava/lang/String;)I
v ? ? ? setMemoryMB (I)V
v ? ? ? setNumCPU
G ? ? ? setHardware %(Lcom/vmware/vim25/VirtualHardware;)V ? OnlyFoeInfo
G ? ? 2 setName ? $12345678-abcd-1234-cdef-123456789abc
G ? ? 2 setUuid ? First
G ? ? 2
setVersion
G ? ? ? setTemplate (Z)V ? Alternate
G ? ? 2 setAlternateGuestName
E ? ? ? queryMemoryOverheadEx .(Lcom/vmware/vim25/VirtualMachineConfigInfo;)J
? ? ? java/lang/Long ? ? valueOf (J)Ljava/lang/Long; ? ? ? java/lang/System ? ? out Ljava/io/PrintStream; ? 4Using queryMemoryOverheadEx API using vmReconfigInfo
? ? ? java/io/PrintStream ? 2 println ? java/lang/StringBuilder ? DMemory overhead necessary to power on a virtual machine with memory
? 1
? ? ? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? MB and cpu count ? -:
? ? ? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? bytes
? ? ? ? toString ()Ljava/lang/String; 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; vmConfigInfo +Lcom/vmware/vim25/VirtualMachineConfigInfo; cal Ljava/util/Calendar; defaultInfo 3Lcom/vmware/vim25/VirtualMachineDefaultPowerOpInfo; fileInfo )Lcom/vmware/vim25/VirtualMachineFileInfo; flagInfo )Lcom/vmware/vim25/VirtualMachineFlagInfo; vhardware "Lcom/vmware/vim25/VirtualHardware; overhead Ljava/lang/Long; ? #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 ? Integer ? Size of the memory ? Number of the CPU count
SourceFile QueryMemoryOverhead.java ! / *? ?
5
? N? Y? *? L+? M+"? N+$? :+&? :+(? :+*? :? ,Y? .Y,? 0-? 3:? 6Y? 8? <?? A? E: ? GY? I:
J? L? O:
? S? WY? Y:
? Z? ^Y? `:
? a? eY? g:
? h
l? n
q? s? vY? x:? y? ? y? ?
? ?
?? ?
?? ?
?? ?
? ?
?? ?
? ?? ?:? ??? ?? ?? ?Y?? ?? ?¶ ?? ?Ķ ?? ?ɶ ?? ˶ ??
? $ 9 : ; <