All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vmware.vim25.mo.samples.alarm.CreateVmAlarm.class Maven / Gradle / Ivy

The newest version!
????2/com/vmware/vim25/mo/samples/alarm/CreateVmAlarmjava/lang/Object()VCode
	LineNumberTableLocalVariableTablethis1Lcom/vmware/vim25/mo/samples/alarm/CreateVmAlarm;main([Ljava/lang/String;)V
Exceptionsjava/lang/Exception	java/lang/SystemoutLjava/io/PrintStream;>Usage: java CreateVmAlarm    
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+&com/vmware/vim25/mo/InventoryNavigator
!-./
getRootFolder()Lcom/vmware/vim25/mo/Folder;
*12&(Lcom/vmware/vim25/mo/ManagedEntity;)V4VirtualMachine
*678searchManagedEntityI(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity;:"com/vmware/vim25/mo/VirtualMachine<java/lang/StringBuilder>Cannot find the VM 
;&
;ABCappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;E
Existing...
;GHItoString()Ljava/lang/String;
!KLMgetServerConnection(()Lcom/vmware/vim25/mo/ServerConnection;
OQP$com/vmware/vim25/mo/ServerConnectionRlogout
!TUVgetAlarmManager$()Lcom/vmware/vim25/mo/AlarmManager;Xcom/vmware/vim25/AlarmSpec
W	
[\]createStateAlarmExpression)()Lcom/vmware/vim25/StateAlarmExpression;
_`acreateEmailAction$()Lcom/vmware/vim25/SendEmailAction;
cdecreateAlarmTriggerActionC(Lcom/vmware/vim25/Action;)Lcom/vmware/vim25/AlarmTriggeringAction;
ghicreatePowerOnAction!()Lcom/vmware/vim25/MethodAction;k!com/vmware/vim25/GroupAlarmAction
j	ncom/vmware/vim25/AlarmAction
jpqr	setAction"([Lcom/vmware/vim25/AlarmAction;)V
Wtqu!(Lcom/vmware/vim25/AlarmAction;)V
Wwxy
setExpression%(Lcom/vmware/vim25/AlarmExpression;)V{VmPowerStateAlarm
W}~ setName?@Monitor VM state and send email and power it on if VM powers off
W?? setDescription
W???
setEnabled(Z)V?com/vmware/vim25/AlarmSetting
?	
????setReportingFrequency(I)V
????setToleranceRange
W???
setSetting"(Lcom/vmware/vim25/AlarmSetting;)V
??? com/vmware/vim25/mo/AlarmManager??createAlarm\(Lcom/vmware/vim25/mo/ManagedEntity;Lcom/vmware/vim25/AlarmSpec;)Lcom/vmware/vim25/mo/Alarm;args[Ljava/lang/String;si%Lcom/vmware/vim25/mo/ServiceInstance;vmnameLjava/lang/String;inv(Lcom/vmware/vim25/mo/InventoryNavigator;vm$Lcom/vmware/vim25/mo/VirtualMachine;alarmMgr"Lcom/vmware/vim25/mo/AlarmManager;specLcom/vmware/vim25/AlarmSpec;
expression'Lcom/vmware/vim25/StateAlarmExpression;emailActionLcom/vmware/vim25/AlarmAction;methodActiongaa#Lcom/vmware/vim25/GroupAlarmAction;asLcom/vmware/vim25/AlarmSetting;
StackMapTable??java/lang/String?%com/vmware/vim25/StateAlarmExpression
?	
??? setType?runtime.powerState
??? setStatePath	???#com/vmware/vim25/StateAlarmOperator??isEqual%Lcom/vmware/vim25/StateAlarmOperator;
????setOperator((Lcom/vmware/vim25/StateAlarmOperator;)V?
poweredOff
??? setRed?com/vmware/vim25/MethodAction
?	?PowerOnVM_Task
?}?%com/vmware/vim25/MethodActionArgument
?	
????setValue(Ljava/lang/Object;)V
????setArgument+([Lcom/vmware/vim25/MethodActionArgument;)VactionLcom/vmware/vim25/MethodAction;argument'Lcom/vmware/vim25/MethodActionArgument;? com/vmware/vim25/SendEmailAction
?	?[email protected]
??? 	setToList?[email protected]
??? 	setCcList?$Alarm - {alarmName} on {targetName}

??? 
setSubject??Description:{eventDescription}
TriggeringSummary:{triggeringSummary}
newStatus:{newStatus}
oldStatus:{oldStatus}
target:{target}
??? setBody"Lcom/vmware/vim25/SendEmailAction;?&com/vmware/vim25/AlarmTriggeringAction
?	
??
setYellow2red
?q(Lcom/vmware/vim25/Action;)VLcom/vmware/vim25/Action;alarmAction(Lcom/vmware/vim25/AlarmTriggeringAction;
SourceFileCreateVmAlarm.java!/*??
7
	S?*??????!Y?#Y*2?%*2*2?'L*2M?*Y+?,?0N-3,?5?9:?&??;Y=??,?@D?@?F?+?J?N?+?S:?WY?Y:?Z:?^?b:?f?b:	?jY?l:

?mYSY	S?o
?s?vz?|??????Y??:????????W+?J?N?
?);=?BC$B(E,F0G4F8H9I<HDJILYMaLdNkOlRrT{W~V?Y?X?[?Z?\?^?_?`?a?b?d?f?g?h?j?l?n?oz???(???,???8???D???r???{????|???t???l??	?c??
?%????\?!?*9\]e#??Y??K*3??*???*?¶?*̶?*?
tsuvwx!y??hiq)??Y??K*Զֻ?Y??L+??*??Y+S??*?
~???'?!????`a`"??Y??K*??*??*??*???*?
????? ???deX??Y?L+?+*?+?
???
???	





© 2015 - 2024 Weber Informatics LLC | Privacy Policy