mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42: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
@@ -167,7 +167,7 @@ options:
|
||||
- Availability zone in which to create the server.
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "shade"
|
||||
- "openstacksdk"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -717,7 +717,7 @@ def main():
|
||||
"if state == 'present'"
|
||||
)
|
||||
|
||||
shade, cloud = openstack_cloud_from_module(module)
|
||||
sdk, cloud = openstack_cloud_from_module(module)
|
||||
try:
|
||||
if state == 'present':
|
||||
_get_server_state(module, cloud)
|
||||
@@ -725,7 +725,7 @@ def main():
|
||||
elif state == 'absent':
|
||||
_get_server_state(module, cloud)
|
||||
_delete_server(module, cloud)
|
||||
except shade.OpenStackCloudException as e:
|
||||
except sdk.exceptions.OpenStackCloudException as e:
|
||||
module.fail_json(msg=str(e), extra_data=e.extra_data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user