Java 类com.vmware.vim25.AlarmDescription 实例源码

项目:vijava    文件:PrintAlarmManager.java   
public static void main(String[] args) throws Exception
{
  if(args.length != 3)
  {
    System.out.println("Usage: java PrintAlarmManager " 
      + "<url> <username> <password>");
    return;
  }

  ServiceInstance si = new ServiceInstance(
    new URL(args[0]), args[1], args[2], true);

  AlarmManager alarmMgr = si.getAlarmManager();

  System.out.println("Alarm expressions:");
  AlarmExpression[] defaultExps = alarmMgr.getDefaultExpression();
  printAlarmExpressions(defaultExps);

  System.out.println("\n\nAlarm descriptions:");
  AlarmDescription ad = alarmMgr.getDescription();
  printAlarmDescription(ad);

  si.getServerConnection().logout();
}
项目:vijava    文件:PrintAlarmManager.java   
static void printAlarmDescription(AlarmDescription ad)
{
  System.out.println("Entity statuses:");
  printElementDescriptions(ad.getEntityStatus());

  System.out.println("\nHostSystem connection states:");
  printElementDescriptions(ad.getHostSystemConnectionState());

  System.out.println("\nMetric operators:");
  printElementDescriptions(ad.getMetricOperator());

  System.out.println("\nState operators:");
  printElementDescriptions(ad.getStateOperator());

  System.out.println("\nVirtual machine power states:");
  printElementDescriptions(ad.getVirtualMachinePowerState());

  System.out.println("\nAction class descriptions:");
  printTypeDescriptions(ad.getAction());

  System.out.println("\nDescriptions of expressioin type " +
        "for triggers:");
  printTypeDescriptions(ad.getExpr());
}
项目:jcloud-vsphere    文件:AlarmManagerApi.java   
AlarmDescription getDescription();