Merge "Housekeeper: implement get_housekeeper_count method"

This commit is contained in:
Zuul 2018-06-06 00:41:55 +00:00 committed by Gerrit Code Review
commit 4b4fd78454
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -4788,5 +4788,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)