Пример #1
0
 def clear_all(self, entity_instance_id):
     with fm_api_lock:
         resp = fm_core.clear_all(entity_instance_id)
         if resp is False:
             # There is operation failure
             raise APIException("Failed to execute clear_all.")
         elif resp is None:
             # alarm is not found
             return False
         else:
             return True
Пример #2
0
 def clear_all(self, entity_instance_id):
     with fm_api_lock:
         try:
             resp = fm_core.clear_all(entity_instance_id)
             # resp may be True/False/None after FaultAPIsV2
             #  implementation.
             # To keep FaultAPIs the same as before,
             #  return False for None case.
             if resp is True:
                 return True
             else:
                 return False
         except (RuntimeError, SystemError, TypeError):
             return False
Пример #3
0
 def clear_all(self, entity_instance_id):
     resp = fm_core.clear_all(entity_instance_id)
     if resp is False:
         raise APIException("Failed to execute clear_all.")
Пример #4
0
 def clear_all(self, entity_instance_id):
     try:
         return fm_core.clear_all(entity_instance_id)
     except (RuntimeError, SystemError, TypeError):
         return False