From 6f426b9d06861e1b528ff040650d4f56868c77e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Wed, 8 Mar 2017 18:52:29 +0100 Subject: [PATCH] cloudstack: cs_vpc: fix vpc in projects not found (#22416) --- lib/ansible/modules/cloud/cloudstack/cs_vpc.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/cloudstack/cs_vpc.py b/lib/ansible/modules/cloud/cloudstack/cs_vpc.py index 2038ce34c8d..a396e3a1f48 100644 --- a/lib/ansible/modules/cloud/cloudstack/cs_vpc.py +++ b/lib/ansible/modules/cloud/cloudstack/cs_vpc.py @@ -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']: