mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
cloudstack: added fetch_list=True where appropriate (#40233)
This commit is contained in:
parent
44eaa2c007
commit
912e07a036
17 changed files with 50 additions and 29 deletions
|
@ -245,11 +245,12 @@ class AnsibleCloudStackVolume(AnsibleCloudStack):
|
|||
'zoneid': self.get_zone(key='id'),
|
||||
'displayvolume': self.module.params.get('display_volume'),
|
||||
'type': 'DATADISK',
|
||||
'fetch_list': True,
|
||||
}
|
||||
volumes = self.query_api('listVolumes', **args)
|
||||
if volumes:
|
||||
volume_name = self.module.params.get('name')
|
||||
for v in volumes['volume']:
|
||||
for v in volumes:
|
||||
if volume_name.lower() == v['name'].lower():
|
||||
self.volume = v
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue