From c9a3801a2502151fd098333864710dc95e64412c Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Tue, 22 Sep 2015 14:36:43 +0200 Subject: [PATCH] cloudstack: common argument_spec and requried_together to utils --- lib/ansible/module_utils/cloudstack.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/ansible/module_utils/cloudstack.py b/lib/ansible/module_utils/cloudstack.py index b4d7cd4db13..e3d2614fe69 100644 --- a/lib/ansible/module_utils/cloudstack.py +++ b/lib/ansible/module_utils/cloudstack.py @@ -34,6 +34,18 @@ try: except ImportError: has_lib_cs = False +def cs_argument_spec(): + return dict( + api_key = dict(default=None), + api_secret = dict(default=None, no_log=True), + 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'), + ) + +def cs_required_together(): + return [['api_key', 'api_secret', 'api_url']] class AnsibleCloudStack(object):