Revision 6c997921 snf-astakos-app/astakos/im/endpoints/qh.py
b/snf-astakos-app/astakos/im/endpoints/qh.py | ||
---|---|---|
89 | 89 |
c = get_client() |
90 | 90 |
if not c: |
91 | 91 |
return |
92 |
result = c.create_entity(context={}, clientkey=clientkey, create_entity=payload) |
|
92 |
result = c.create_entity( |
|
93 |
context={}, clientkey=clientkey, create_entity=payload) |
|
93 | 94 |
logger.info('create_entity: %s rejected: %s' % (payload, result)) |
94 | 95 |
return result |
95 | 96 |
|
... | ... | |
127 | 128 |
payload = [] |
128 | 129 |
append = payload.append |
129 | 130 |
for u in users: |
130 |
for resource, uplimit in u.quota.iteritems():
|
|
131 |
for resource, capacity in u.quota.iteritems():
|
|
131 | 132 |
append( SetQuotaPayload( |
132 | 133 |
holder=u.uuid, |
133 | 134 |
resource=resource, |
134 | 135 |
key=ENTITY_KEY, |
135 | 136 |
quantity=0, |
136 |
capacity=uplimit if uplimit != inf else None,
|
|
137 |
capacity=capacity if capacity != inf else None,
|
|
137 | 138 |
import_limit=QH_PRACTICALLY_INFINITE, |
138 | 139 |
export_limit=QH_PRACTICALLY_INFINITE, |
139 | 140 |
flags=0)) |
Also available in: Unified diff