예제 #1
0
 def set_fault(self, data):
     self._check_required_attributes(data)
     self._validate_attributes(data)
     buff = self._alarm_to_str(data)
     uuid = fm_core.set(buff)
     if uuid is None:
         raise APIException("Failed to execute set_fault.")
     return uuid
예제 #2
0
 def set_fault(self, data):
     self._check_required_attributes(data)
     self._validate_attributes(data)
     buff = self._alarm_to_str(data)
     try:
         return fm_core.set(buff)
     except (RuntimeError, SystemError, TypeError):
         return None