mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-13 03:44:02 -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
|
@ -72,7 +72,7 @@ options:
|
|||
availability_zone:
|
||||
description:
|
||||
- Ignored. Present for backwards compatibility
|
||||
requirements: ["shade"]
|
||||
requirements: ["openstacksdk"]
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
@ -383,11 +383,6 @@ def main():
|
|||
supports_check_mode=True,
|
||||
**module_kwargs)
|
||||
|
||||
if module.params['project']:
|
||||
min_version = '1.10.0'
|
||||
else:
|
||||
min_version = None
|
||||
|
||||
state = module.params['state']
|
||||
name = module.params['name']
|
||||
network = module.params['network']
|
||||
|
@ -396,7 +391,7 @@ def main():
|
|||
if module.params['external_fixed_ips'] and not network:
|
||||
module.fail_json(msg='network is required when supplying external_fixed_ips')
|
||||
|
||||
shade, cloud = openstack_cloud_from_module(module, min_version=min_version)
|
||||
sdk, cloud = openstack_cloud_from_module(module)
|
||||
try:
|
||||
if project is not None:
|
||||
proj = cloud.get_project(project)
|
||||
|
@ -482,7 +477,7 @@ def main():
|
|||
cloud.delete_router(router_id)
|
||||
module.exit_json(changed=True)
|
||||
|
||||
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