1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

cloudstack: cs_vpc: fix vpc in projects not found (#22416)

This commit is contained in:
René Moser 2017-03-08 18:52:29 +01:00 committed by GitHub
parent 8102e66425
commit 6f426b9d06

View file

@ -207,7 +207,12 @@ tags:
'''
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.cloudstack import *
from ansible.module_utils.cloudstack import (
AnsibleCloudStack,
CloudStackException,
cs_argument_spec,
cs_required_together,
)
class AnsibleCloudStackVpc(AnsibleCloudStack):
@ -251,7 +256,7 @@ class AnsibleCloudStackVpc(AnsibleCloudStack):
'projectid': self.get_project(key='id'),
'zoneid': self.get_zone(key='id'),
}
vpcs = self.cs.listVPCs()
vpcs = self.cs.listVPCs(**args)
if vpcs:
vpc_name = self.module.params.get('name')
for v in vpcs['vpc']: