From 039005bfaa08ef2a506c96fb8c690bb22ba51285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Fri, 27 May 2016 20:56:00 +0200 Subject: [PATCH] cloudstack: cs_firewall: get_network moved to utils, cleanup (#2293) --- cloud/cloudstack/cs_firewall.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/cloud/cloudstack/cs_firewall.py b/cloud/cloudstack/cs_firewall.py index b2e5a68a7a0..958c13d4aba 100644 --- a/cloud/cloudstack/cs_firewall.py +++ b/cloud/cloudstack/cs_firewall.py @@ -310,32 +310,6 @@ class AnsibleCloudStackFirewall(AnsibleCloudStack): return cidr == rule['cidrlist'] - def get_network(self, key=None): - if self.network: - return self._get_by_key(key, self.network) - - network = self.module.params.get('network') - if not network: - return None - - args = {} - args['account'] = self.get_account('name') - args['domainid'] = self.get_domain('id') - args['projectid'] = self.get_project('id') - args['zoneid'] = self.get_zone('id') - - networks = self.cs.listNetworks(**args) - if not networks: - self.module.fail_json(msg="No networks available") - - for n in networks['network']: - if network in [ n['displaytext'], n['name'], n['id'] ]: - self.network = n - return self._get_by_key(key, n) - break - self.module.fail_json(msg="Network '%s' not found" % network) - - def create_firewall_rule(self): firewall_rule = self.get_firewall_rule() if not firewall_rule: