Revision 478f763e
b/snf-pithos-backend/pithos/backends/modular.py | ||
---|---|---|
232 | 232 |
external_quota=None): |
233 | 233 |
"""Return a dictionary with the account metadata for the domain.""" |
234 | 234 |
|
235 |
external_quota = external_quota or {} |
|
236 | 235 |
logger.debug( |
237 | 236 |
"get_account_meta: %s %s %s %s", user, account, domain, until) |
238 | 237 |
path, node = self._lookup_account(account, user == account) |
... | ... | |
265 | 264 |
meta.update({'until_timestamp': tstamp}) |
266 | 265 |
meta.update({'name': account, 'count': count, 'bytes': bytes}) |
267 | 266 |
if self.using_external_quotaholder: |
267 |
external_quota = external_quota or {} |
|
268 | 268 |
meta['bytes'] = external_quota.get('currValue', 0) |
269 | 269 |
meta.update({'modified': modified}) |
270 | 270 |
return meta |
... | ... | |
322 | 322 |
path, node = self._lookup_account(account, True) |
323 | 323 |
policy = self._get_policy(node) |
324 | 324 |
if self.using_external_quotaholder: |
325 |
external_quota = external_quota or {} |
|
325 | 326 |
policy['quota'] = external_quota.get('maxValue', 0) |
326 | 327 |
return policy |
327 | 328 |
|
Also available in: Unified diff