Ejemplo n.º 1
0
 def get_fault(self, alarm_id, entity_instance_id):
     sep = constants.FM_CLIENT_STR_SEP
     buff = (sep + self._check_val(alarm_id) + sep +
             self._check_val(entity_instance_id) + sep)
     resp = fm_core.get(buff)
     if resp is False:
         raise APIException("Failed to execute get_fault.")
     else:
         return self._str_to_alarm(resp) if resp else None
Ejemplo n.º 2
0
 def get_fault(self, alarm_id, entity_instance_id):
     sep = constants.FM_CLIENT_STR_SEP
     buff = (sep + self._check_val(alarm_id) + sep +
             self._check_val(entity_instance_id) + sep)
     try:
         resp = fm_core.get(buff)
         if resp:
             return self._str_to_alarm(resp)
     except (RuntimeError, SystemError, TypeError):
         pass
     return None