mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-22 16:20:22 -07: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:
parent
e16490c9c0
commit
89ce826a9f
51 changed files with 266 additions and 321 deletions
|
@ -46,7 +46,7 @@ options:
|
|||
description:
|
||||
- Ignored. Present for backwards compatibility
|
||||
|
||||
requirements: ["shade"]
|
||||
requirements: ["openstacksdk"]
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
@ -114,10 +114,8 @@ def main():
|
|||
endpoint=module.params['ironic_url']
|
||||
)
|
||||
|
||||
shade, cloud = openstack_cloud_from_module(
|
||||
module, min_version='1.0.0')
|
||||
sdk, cloud = openstack_cloud_from_module(module)
|
||||
try:
|
||||
|
||||
if module.params['name'] or module.params['uuid']:
|
||||
server = cloud.get_machine(_choose_id_value(module))
|
||||
elif module.params['mac']:
|
||||
|
@ -138,7 +136,7 @@ def main():
|
|||
else:
|
||||
module.fail_json(msg="node not found.")
|
||||
|
||||
except shade.OpenStackCloudException as e:
|
||||
except sdk.exceptions.OpenStackCloudException as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue