Package com.vmware.vim.binding.impl.vim.alarm

Examples of com.vmware.vim.binding.impl.vim.alarm.EventAlarmExpressionImpl


      // Create the alarm for VHM
      String SERENGETI_UUID = rootFolder.getName(); /* should be the name of the folder clusters get deployed into */

      String ALARM_CLEARED_MSG = "all health issues previously reported by Big Data Extensions are in remission";
      EventAlarmExpression raiseExpression = new EventAlarmExpressionImpl();
      raiseExpression.setEventType(new TypeNameImpl("vim.event.EventEx"));
      raiseExpression.setEventTypeId("com.vmware.vhadoop.vhm.vc.events.warning");
      raiseExpression.setStatus(ManagedEntity.Status.yellow);
      raiseExpression.setObjectType(new TypeNameImpl("vim.VirtualMachine"));

      EventAlarmExpression clearExpression = new EventAlarmExpressionImpl();
      clearExpression.setEventType(new TypeNameImpl("vim.event.EventEx"));
      clearExpression.setEventTypeId("com.vmware.vhadoop.vhm.vc.events.info");
      clearExpression.setComparisons(new EventAlarmExpressionImpl.ComparisonImpl[] {
            new EventAlarmExpressionImpl.ComparisonImpl("message", "endsWith", ALARM_CLEARED_MSG)
            });
      clearExpression.setStatus(ManagedEntity.Status.green);
      clearExpression.setObjectType(new TypeNameImpl("vim.VirtualMachine"));

      OrAlarmExpression or = new OrAlarmExpressionImpl();
      or.setExpression(new AlarmExpression[] {raiseExpression, clearExpression});

      AlarmTriggeringAction alarmAction = new AlarmTriggeringActionImpl();
View Full Code Here

TOP

Related Classes of com.vmware.vim.binding.impl.vim.alarm.EventAlarmExpressionImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.