Don't call sdk.connect() again

openstack_cloud_from_module() returns a connection object.

Change-Id: Icda289b76b8b57857e6ace521c7984b70ba04392
changes/52/717952/1
Rabi Mishra 3 years ago
parent 3ed3739f04
commit 0007e05c78
  1. 3
      tripleo_ansible/ansible_plugins/modules/baremetal_register_or_update_nodes.py
  2. 3
      tripleo_ansible/ansible_plugins/modules/os_tripleo_baremetal_configure.py

@ -105,8 +105,7 @@ def run_module():
**openstack_module_kwargs()
)
sdk, _ = openstack_cloud_from_module(module)
conn = sdk.connect()
_, conn = openstack_cloud_from_module(module)
session = conn.session
# if the user is working with this module in only check mode we do not

@ -124,8 +124,7 @@ def main():
**openstack_module_kwargs()
)
sdk, _ = openstack_cloud_from_module(module)
conn = sdk.connect()
_, conn = openstack_cloud_from_module(module)
tripleo = TripleOCommon(session=conn.session)
if hasattr(tripleo, module.params["action"]):

Loading…
Cancel
Save