mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
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:
committed by
Monty Taylor
parent
e16490c9c0
commit
89ce826a9f
@@ -35,7 +35,6 @@ options:
|
||||
domain_id:
|
||||
description:
|
||||
- Domain id to create the project in if the cloud supports domains.
|
||||
The domain_id parameter requires shade >= 1.8.0
|
||||
aliases: ['domain']
|
||||
enabled:
|
||||
description:
|
||||
@@ -52,7 +51,7 @@ options:
|
||||
- Ignored. Present for backwards compatibility
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "shade"
|
||||
- "openstacksdk"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -152,13 +151,7 @@ def main():
|
||||
enabled = module.params['enabled']
|
||||
state = module.params['state']
|
||||
|
||||
if domain:
|
||||
min_version = '1.8.0'
|
||||
else:
|
||||
min_version = None
|
||||
|
||||
shade, cloud = openstack_cloud_from_module(
|
||||
module, min_version=min_version)
|
||||
sdk, cloud = openstack_cloud_from_module(module)
|
||||
try:
|
||||
if domain:
|
||||
try:
|
||||
@@ -208,7 +201,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=e.message, extra_data=e.extra_data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user