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

@@ -22,7 +22,7 @@ description:
- Retrieve facts about one or more subnets from OpenStack.
requirements:
- "python >= 2.6"
- "shade"
- "openstacksdk"
options:
subnet:
description:
@@ -142,14 +142,14 @@ def main():
)
module = AnsibleModule(argument_spec)
shade, cloud = openstack_cloud_from_module(module)
sdk, cloud = openstack_cloud_from_module(module)
try:
subnets = cloud.search_subnets(module.params['name'],
module.params['filters'])
module.exit_json(changed=False, ansible_facts=dict(
openstack_subnets=subnets))
except shade.OpenStackCloudException as e:
except sdk.exceptions.OpenStackCloudException as e:
module.fail_json(msg=str(e))