mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-03 20:54:24 -07:00
cloud: ovirt: Add download image support to disks module (#22101)
This PR fixes: https://github.com/ansible/ansible/issues/22088
This commit is contained in:
parent
ef79932d16
commit
7d397e7d3e
2 changed files with 112 additions and 42 deletions
|
@ -135,7 +135,7 @@ def create_connection(auth):
|
|||
:return: Python SDK connection
|
||||
"""
|
||||
|
||||
connection = sdk.Connection(
|
||||
return sdk.Connection(
|
||||
url=auth.get('url'),
|
||||
username=auth.get('username'),
|
||||
password=auth.get('password'),
|
||||
|
@ -144,15 +144,6 @@ def create_connection(auth):
|
|||
token=auth.get('token', None),
|
||||
kerberos=auth.get('kerberos', None),
|
||||
)
|
||||
api_version = LooseVersion(engine_version(connection))
|
||||
python_sdk_version = LooseVersion(sdk_version.VERSION)
|
||||
if python_sdk_version < api_version:
|
||||
raise Exception(
|
||||
"Your SDK version is lower than engine version, please use same "
|
||||
"version of the SDK as engine, or unexpected errors may appear."
|
||||
)
|
||||
|
||||
return connection
|
||||
|
||||
|
||||
def convert_to_bytes(param):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue