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

@@ -67,7 +67,7 @@ options:
- Ignored. Present for backwards compatibility
requirements:
- "python >= 2.6"
- "shade"
- "openstacksdk"
'''
EXAMPLES = '''
@@ -199,10 +199,7 @@ def main():
update_password = module.params['update_password']
description = module.params['description']
if description and StrictVersion(shade.__version__) < StrictVersion('1.13.0'):
module.fail_json(msg="To utilize description, the installed version of the shade library MUST be >=1.13.0")
shade, cloud = openstack_cloud_from_module(module)
sdk, cloud = openstack_cloud_from_module(module)
try:
user = cloud.get_user(name)
@@ -278,7 +275,7 @@ def main():
changed = True
module.exit_json(changed=changed)
except shade.OpenStackCloudException as e:
except sdk.exceptions.OpenStackCloudException as e:
module.fail_json(msg=str(e), extra_data=e.extra_data)