mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
ovirt_storage_connections: fix RETURN, fixes build (#25517)
* ovirt_storage_connections: fix RETURN, fixes build, pep8
This commit is contained in:
parent
f762c61816
commit
64a9794997
1 changed files with 18 additions and 17 deletions
|
@ -114,12 +114,13 @@ RETURN = '''
|
||||||
id:
|
id:
|
||||||
description: ID of the storage connection which is managed
|
description: ID of the storage connection which is managed
|
||||||
returned: On success if storage connection is found.
|
returned: On success if storage connection is found.
|
||||||
type: str
|
type: string
|
||||||
sample: 7de90f31-222c-436c-a1ca-7e655bd5b60c
|
sample: 7de90f31-222c-436c-a1ca-7e655bd5b60c
|
||||||
storage_connection:
|
storage_connection:
|
||||||
description: "Dictionary of all the storage connection attributes. Storage connection attributes can be found on your oVirt instance
|
description: "Dictionary of all the storage connection attributes. Storage connection attributes can be found on your oVirt instance
|
||||||
at following url: https://ovirt.example.com/ovirt-engine/api/model#types/storage_connection."
|
at following url: https://ovirt.example.com/ovirt-engine/api/model#types/storage_connection."
|
||||||
returned: On success if storage connection is found.
|
returned: On success if storage connection is found.
|
||||||
|
type: dict
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -183,18 +184,18 @@ class StorageConnectionModule(BaseModule):
|
||||||
|
|
||||||
def update_check(self, entity):
|
def update_check(self, entity):
|
||||||
return (
|
return (
|
||||||
equal(self.param('address'), entity.address)
|
equal(self.param('address'), entity.address) and
|
||||||
and equal(self.param('path'), entity.path)
|
equal(self.param('path'), entity.path) and
|
||||||
and equal(self.param('nfs_version'), entity.nfs_version)
|
equal(self.param('nfs_version'), entity.nfs_version) and
|
||||||
and equal(self.param('nfs_timeout'), entity.nfs_timeo)
|
equal(self.param('nfs_timeout'), entity.nfs_timeo) and
|
||||||
and equal(self.param('nfs_retrans'), entity.nfs_retrans)
|
equal(self.param('nfs_retrans'), entity.nfs_retrans) and
|
||||||
and equal(self.param('mount_options'), entity.mount_options)
|
equal(self.param('mount_options'), entity.mount_options) and
|
||||||
and equal(self.param('password'), entity.password)
|
equal(self.param('password'), entity.password) and
|
||||||
and equal(self.param('username'), entity.username)
|
equal(self.param('username'), entity.username) and
|
||||||
and equal(self.param('port'), entity.port)
|
equal(self.param('port'), entity.port) and
|
||||||
and equal(self.param('target'), entity.target)
|
equal(self.param('target'), entity.target) and
|
||||||
and equal(self.param('type'), str(entity.type))
|
equal(self.param('type'), str(entity.type)) and
|
||||||
and equal(self.param('vfs_type'), entity.vfs_type)
|
equal(self.param('vfs_type'), entity.vfs_type)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,14 +207,14 @@ def find_sc_by_attributes(module, storage_connections_service):
|
||||||
sd_conn_type = str(sd_conn.type)
|
sd_conn_type = str(sd_conn.type)
|
||||||
if sd_conn_type in ['nfs', 'posixfs', 'glusterfs', 'localfs']:
|
if sd_conn_type in ['nfs', 'posixfs', 'glusterfs', 'localfs']:
|
||||||
if (
|
if (
|
||||||
module.params['address'] == sd_conn.address
|
module.params['address'] == sd_conn.address and
|
||||||
and module.params['path'] == sd_conn.path
|
module.params['path'] == sd_conn.path
|
||||||
):
|
):
|
||||||
return sd_conn
|
return sd_conn
|
||||||
elif sd_conn_type in ['iscsi', 'fcp']:
|
elif sd_conn_type in ['iscsi', 'fcp']:
|
||||||
if (
|
if (
|
||||||
module.params['address'] == sd_conn.address
|
module.params['address'] == sd_conn.address and
|
||||||
and module.params['target'] == sd_conn.target
|
module.params['target'] == sd_conn.target
|
||||||
):
|
):
|
||||||
return sd_conn
|
return sd_conn
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue