From 59cc4ead3d3dd971c7f1711c2f05d1495240a988 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 25 Jun 2015 14:28:28 -0400 Subject: [PATCH] Backport openstack module_utils from devel There were no modules in 1.9 that used these functions, and there are people who would like to use devel modules with 1.9 ansible. --- lib/ansible/module_utils/openstack.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/ansible/module_utils/openstack.py b/lib/ansible/module_utils/openstack.py index 49c576831da..40694491443 100644 --- a/lib/ansible/module_utils/openstack.py +++ b/lib/ansible/module_utils/openstack.py @@ -73,16 +73,19 @@ def openstack_find_nova_addresses(addresses, ext_tag, key_name=None): def openstack_full_argument_spec(**kwargs): spec = dict( cloud=dict(default=None), - auth_plugin=dict(default=None), + auth_type=dict(default=None), auth=dict(default=None), - auth_token=dict(default=None), region_name=dict(default=None), availability_zone=dict(default=None), - state=dict(default='present', choices=['absent', 'present']), + verify=dict(default=True, aliases=['validate_certs']), + cacert=dict(default=None), + cert=dict(default=None), + key=dict(default=None), wait=dict(default=True, type='bool'), timeout=dict(default=180, type='int'), + api_timeout=dict(default=None, type='int'), endpoint_type=dict( - default='publicURL', choices=['publicURL', 'internalURL'] + default='public', choices=['public', 'internal', 'admin'] ) ) spec.update(kwargs) @@ -90,12 +93,7 @@ def openstack_full_argument_spec(**kwargs): def openstack_module_kwargs(**kwargs): - ret = dict( - mutually_exclusive=[ - ['auth', 'auth_token'], - ['auth_plugin', 'auth_token'], - ], - ) + ret = {} for key in ('mutually_exclusive', 'required_together', 'required_one_of'): if key in kwargs: if key in ret: