# limitations under the License.
import abc
-from typing import List, Set
+from typing import List, Set, Tuple
from o2ims.domain import subscription_obj as subobj
self.seen.add(subscription)
return subscription
- def list(self) -> List[subobj.Subscription]:
- return self._list()
+ def list(self, **kwargs) -> List[subobj.Subscription]:
+ return self._list(*[], **kwargs)[1]
+
+ def list_with_count(self, *args, **kwargs) -> \
+ Tuple[int, List[subobj.Subscription]]:
+ return self._list(*args, **kwargs)
def update(self, subscription: subobj.Subscription):
self._update(subscription)
def _update(self, subscription: subobj.Subscription):
raise NotImplementedError
+ @abc.abstractmethod
+ def _list(self, **kwargs) -> Tuple[int, List[subobj.Subscription]]:
+ raise NotImplementedError
+
@abc.abstractmethod
def _delete(self, subscription_id):
raise NotImplementedError