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
@@ -45,7 +45,7 @@ options:
|
||||
- Ignored. Present for backwards compatibility
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "shade"
|
||||
- "openstacksdk"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
@@ -96,7 +96,7 @@ def main():
|
||||
wait = module.params['wait']
|
||||
timeout = module.params['timeout']
|
||||
|
||||
shade, cloud = openstack_cloud_from_module(module)
|
||||
sdk, cloud = openstack_cloud_from_module(module)
|
||||
try:
|
||||
server = cloud.get_server(module.params['server'])
|
||||
volume = cloud.get_volume(module.params['volume'])
|
||||
@@ -135,7 +135,7 @@ def main():
|
||||
result='Detached volume from server'
|
||||
)
|
||||
|
||||
except (shade.OpenStackCloudException, shade.OpenStackCloudTimeout) as e:
|
||||
except (sdk.exceptions.OpenStackCloudException, sdk.exceptions.OpenStackCloudTimeout) as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user