diff --git a/vmware_nsx/extensions/housekeeper.py b/vmware_nsx/extensions/housekeeper.py index abf622b3cd..8916444960 100644 --- a/vmware_nsx/extensions/housekeeper.py +++ b/vmware_nsx/extensions/housekeeper.py @@ -104,3 +104,7 @@ class HousekeeperPluginBase(object): sorts=None, limit=None, marker=None, page_reverse=False): pass + + @abc.abstractmethod + def get_housekeeper_count(self, context, filters=None): + pass diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index 3cccb56ba5..2826615782 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -4786,5 +4786,8 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, self.housekeeper.run(context, name) return self.housekeeper.get(name) + def get_housekeeper_count(self, context, filters=None): + return len(self.housekeeper.list()) + def _get_appservice_id(self, name): return self.nsx_v.vcns.get_application_id(name)