retire shade in favor of openstacksdk for openstack modules (#40532)

* Establish connection through openstacksdk
* Switch from shade to openstacksdk
* fix typo in link to openstacksdk
* remove nova_client usage
* further remove of min_version from openstack modules
This commit is contained in:
Artem Goncharov 2018-05-26 03:40:39 +02:00 committed by Monty Taylor
parent e16490c9c0
commit 89ce826a9f
51 changed files with 266 additions and 321 deletions

View file

@ -229,11 +229,6 @@ def main():
module_kwargs = openstack_module_kwargs()
module = AnsibleModule(argument_spec, **module_kwargs)
if module.params['wait']:
min_version = '1.4.0'
else:
min_version = None
if (module.params['auth_type'] in [None, 'None'] and
module.params['ironic_url'] is None):
module.fail_json(msg="Authentication appears disabled, Please "
@ -250,8 +245,7 @@ def main():
if not node_id:
module.fail_json(msg="A uuid or name value must be defined "
"to use this module.")
shade, cloud = openstack_cloud_from_module(
module, min_version=min_version)
sdk, cloud = openstack_cloud_from_module(module)
try:
node = cloud.get_machine(node_id)
@ -344,7 +338,7 @@ def main():
module.fail_json(msg="State must be present, absent, "
"maintenance, off")
except shade.OpenStackCloudException as e:
except sdk.exceptions.OpenStackCloudException as e:
module.fail_json(msg=str(e))