Add total() to both secrets and orders.
This commit is contained in:
@@ -26,3 +26,13 @@ class BaseEntityManager(object):
|
||||
for k in dictionary.keys():
|
||||
if dictionary[k] is None:
|
||||
dictionary.pop(k)
|
||||
|
||||
def total(self):
|
||||
"""
|
||||
Returns the toatl number of entities stored in Barbican.
|
||||
"""
|
||||
href = '{0}/{1}'.format(self.api.base_url, self.entity)
|
||||
params ={'limit': 0, 'offset': 0}
|
||||
resp = self.api.get(href, params)
|
||||
|
||||
return resp['total']
|
||||
|
||||
Reference in New Issue
Block a user