cloudstack: cs_network: cleanup dublicate VPC code (#3393)
Code has been moved to module utils, also see fe05c5e35a
This commit is contained in:
parent
e93bdb80d3
commit
e1c0d2dd09
1 changed files with 0 additions and 19 deletions
|
@ -345,25 +345,6 @@ class AnsibleCloudStackNetwork(AnsibleCloudStack):
|
||||||
self.network = None
|
self.network = None
|
||||||
|
|
||||||
|
|
||||||
def get_vpc(self, key=None):
|
|
||||||
vpc = self.module.params.get('vpc')
|
|
||||||
if not vpc:
|
|
||||||
return None
|
|
||||||
|
|
||||||
args = {}
|
|
||||||
args['account'] = self.get_account(key='name')
|
|
||||||
args['domainid'] = self.get_domain(key='id')
|
|
||||||
args['projectid'] = self.get_project(key='id')
|
|
||||||
args['zoneid'] = self.get_zone(key='id')
|
|
||||||
|
|
||||||
vpcs = self.cs.listVPCs(**args)
|
|
||||||
if vpcs:
|
|
||||||
for v in vpcs['vpc']:
|
|
||||||
if vpc in [ v['name'], v['displaytext'], v['id'] ]:
|
|
||||||
return self._get_by_key(key, v)
|
|
||||||
self.module.fail_json(msg="VPC '%s' not found" % vpc)
|
|
||||||
|
|
||||||
|
|
||||||
def get_network_offering(self, key=None):
|
def get_network_offering(self, key=None):
|
||||||
network_offering = self.module.params.get('network_offering')
|
network_offering = self.module.params.get('network_offering')
|
||||||
if not network_offering:
|
if not network_offering:
|
||||||
|
|
Loading…
Reference in a new issue