From 297312546dfde5b1856f1a4bea4b4d1259f44b51 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Mon, 31 Aug 2015 08:59:39 +0200 Subject: [PATCH] cloudstack: add api_region arg * docs in module_docs_fragments/cloudstack.py * implemented in module_utils/cloudstack.py -> https://github.com/ansible/ansible/pull/12083 --- lib/ansible/modules/extras/cloud/cloudstack/cs_account.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_domain.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_network.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_project.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py | 1 + .../modules/extras/cloud/cloudstack/cs_securitygroup_rule.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_template.py | 1 + lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py | 1 + 17 files changed, 17 insertions(+) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py index 1ce6fdde88f..052354c581e 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_account.py @@ -366,6 +366,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py index 4ef530bd13e..df685d8a987 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_affinitygroup.py @@ -214,6 +214,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_domain.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_domain.py index 27410040aec..94299d5d6a3 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_domain.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_domain.py @@ -251,6 +251,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py index 379f20c589f..fa27f64ca0f 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_firewall.py @@ -412,6 +412,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_one_of = ( ['ip_address', 'network'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py index 8cececcfb74..3a0d6eebb64 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py @@ -825,6 +825,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), mutually_exclusive = ( ['template', 'iso'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py index 537d9d90b28..f3ac8e4caa8 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_instancegroup.py @@ -182,6 +182,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py index 0ac57d097de..7843dc0db0d 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py @@ -239,6 +239,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py index 37f110cbe68..4ce1804c762 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_iso.py @@ -316,6 +316,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_network.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_network.py index cab24bdfefe..1cb97bf86ea 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_network.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_network.py @@ -552,6 +552,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py index 034290b044d..ed590a5d876 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_portforward.py @@ -390,6 +390,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_project.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_project.py index 6a48956bb1c..a7468e63118 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_project.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_project.py @@ -272,6 +272,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py index d30aea55167..9dd6a7615de 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup.py @@ -161,6 +161,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py index fba41620500..a1d6005118e 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_securitygroup_rule.py @@ -389,6 +389,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['icmp_type', 'icmp_code'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py index ebd906f7d5c..a6576404c3c 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_sshkeypair.py @@ -218,6 +218,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py index 4b73d86e32b..c42b743d51c 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py @@ -275,6 +275,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['api_key', 'api_secret', 'api_url'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_template.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_template.py index c6c482f9c0f..ed5472c2c3e 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_template.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_template.py @@ -565,6 +565,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), mutually_exclusive = ( ['url', 'vm'], diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py index a8f2fbaa916..dbbbe4f96ff 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_vmsnapshot.py @@ -273,6 +273,7 @@ def main(): api_url = dict(default=None), api_http_method = dict(choices=['get', 'post'], default='get'), api_timeout = dict(type='int', default=10), + api_region = dict(default='cloudstack'), ), required_together = ( ['icmp_type', 'icmp_code'],