Fix INF-381 another issue cause this case still failed
[pti/o2.git] / o2ims / domain / alarm_repo.py
index d712f1c..ca6929e 100644 (file)
@@ -31,12 +31,12 @@ class AlarmEventRecordRepository(abc.ABC):
             self.seen.add(alarm_event_record)
         return alarm_event_record
 
-    def list(self, **kwargs) -> List[obj.AlarmEventRecord]:
-        return self._list(**kwargs)[1]
+    def list(self, *args) -> List[obj.AlarmEventRecord]:
+        return self._list(*args)[1]
 
-    def list_with_count(self, **kwargs) -> \
+    def list_with_count(self, *args, **kwargs) -> \
             Tuple[int, List[obj.AlarmEventRecord]]:
-        return self._list(**kwargs)
+        return self._list(*args, **kwargs)
 
     def update(self, alarm_event_record: obj.AlarmEventRecord):
         self._update(alarm_event_record)
@@ -96,6 +96,10 @@ class AlarmDefinitionRepository(abc.ABC):
     def _get(self, definition_id) -> obj.AlarmDefinition:
         raise NotImplementedError
 
+    @abc.abstractmethod
+    def _list(self, **kwargs) -> List[obj.AlarmDefinition]:
+        raise NotImplementedError
+
     @abc.abstractmethod
     def _update(self, definition: obj.AlarmDefinition):
         raise NotImplementedError
@@ -137,7 +141,7 @@ class AlarmDictionaryRepository(abc.ABC):
         raise NotImplementedError
 
     @abc.abstractmethod
-    def _update(self, dictionary: obj.AlarmDictionary):
+    def _list(self, **kwargs) -> List[obj.AlarmDictionary]:
         raise NotImplementedError
 
     @abc.abstractmethod
@@ -159,12 +163,12 @@ class AlarmSubscriptionRepository(abc.ABC):
             self.seen.add(subscription)
         return subscription
 
-    def list(self, **kwargs) -> List[obj.AlarmSubscription]:
-        return self._list(**kwargs)[1]
+    def list(self, *args) -> List[obj.AlarmSubscription]:
+        return self._list(*args)[1]
 
-    def list_with_count(self, **kwargs) -> \
+    def list_with_count(self, *args, **kwargs) -> \
             Tuple[int, List[obj.AlarmSubscription]]:
-        return self._list(**kwargs)
+        return self._list(*args, **kwargs)
 
     def update(self, subscription: obj.AlarmSubscription):
         self._update(subscription)
@@ -224,6 +228,10 @@ class AlarmProbableCauseRepository(abc.ABC):
     def _get(self, probable_cause_id) -> obj.ProbableCause:
         raise NotImplementedError
 
+    @abc.abstractmethod
+    def _list(self, **kwargs) -> List[obj.ProbableCause]:
+        raise NotImplementedError
+
     @abc.abstractmethod
     def _update(self, probable_cause: obj.ProbableCause):
         raise NotImplementedError