mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-07-25 01:04:28 +00:00
Merge "Fix regression in quota module"
This commit is contained in:
@@ -37,8 +37,7 @@
|
|||||||
- { role: object_container, tags: object_container }
|
- { role: object_container, tags: object_container }
|
||||||
- { role: port, tags: port }
|
- { role: port, tags: port }
|
||||||
- { role: project, tags: project }
|
- { role: project, tags: project }
|
||||||
# TODO(sshnaidm): Uncomment when the issue with the this test is fixed
|
- { role: quota, tags: quota }
|
||||||
# - { role: quota, tags: quota }
|
|
||||||
- { role: recordset, tags: recordset }
|
- { role: recordset, tags: recordset }
|
||||||
- { role: resource, tags: resource }
|
- { role: resource, tags: resource }
|
||||||
- { role: resources, tags: resources }
|
- { role: resources, tags: resources }
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ class QuotaModule(OpenStackModule):
|
|||||||
def _get_quotas(self, project):
|
def _get_quotas(self, project):
|
||||||
quota = {}
|
quota = {}
|
||||||
if self.conn.has_service('block-storage'):
|
if self.conn.has_service('block-storage'):
|
||||||
quota['volume'] = self.conn.block_storage.get_quota_set(project)
|
quota['volume'] = self.conn.block_storage.get_quota_set(project.id)
|
||||||
else:
|
else:
|
||||||
self.warn('Block storage service aka volume service is not'
|
self.warn('Block storage service aka volume service is not'
|
||||||
' supported by your cloud. Ignoring volume quotas.')
|
' supported by your cloud. Ignoring volume quotas.')
|
||||||
@@ -477,11 +477,11 @@ class QuotaModule(OpenStackModule):
|
|||||||
|
|
||||||
if changes:
|
if changes:
|
||||||
if 'volume' in changes:
|
if 'volume' in changes:
|
||||||
self.conn.block_storage.update_quota_set(
|
quotas['volume'] = self.conn.block_storage.update_quota_set(
|
||||||
quotas['volume'], **changes['volume'])
|
project.id, **changes['volume'])
|
||||||
if 'compute' in changes:
|
if 'compute' in changes:
|
||||||
self.conn.compute.update_quota_set(
|
quotas['compute'] = self.conn.compute.update_quota_set(
|
||||||
quotas['compute'], **changes['compute'])
|
project.id, **changes['compute'])
|
||||||
if 'network' in changes:
|
if 'network' in changes:
|
||||||
quotas['network'] = self.conn.network.update_quota(
|
quotas['network'] = self.conn.network.update_quota(
|
||||||
project.id, **changes['network'])
|
project.id, **changes['network'])
|
||||||
|
|||||||
Reference in New Issue
Block a user