From d7a1917c17b584993887536e0c467d60681308e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ne=C4=8Das?= Date: Sat, 25 Jan 2020 14:18:34 +0100 Subject: [PATCH] ovirt_host: add iscsi portal (#66750) * ovirt_host: add iscsi portal * correct version_added to 2.10 --- lib/ansible/modules/cloud/ovirt/ovirt_host.py | 24 ++++++++++++- .../cloud/ovirt/ovirt_host_storage_info.py | 35 +++++++++++++++---- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host.py b/lib/ansible/modules/cloud/ovirt/ovirt_host.py index e6186f3367d..c5e26625f3e 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host.py @@ -126,7 +126,27 @@ options: used to discover targets" - "If C(state) is I(iscsilogin) it means that the iscsi attribute is being used to login to the specified targets passed as part of the iscsi attribute" - version_added: "2.4" + suboptions: + username: + description: + - "A CHAP user name for logging into a target." + password: + description: + - "A CHAP password for logging into a target." + address: + description: + - "Address of the iSCSI storage server." + target: + description: + - "The target IQN for the storage device." + port: + description: + - "The port being used to connect with iscsi." + portal: + description: + - "The portal being used to connect with iscsi." + version_added: 2.10 + version_added: 2.4 check_upgrade: description: - "If I(true) and C(state) is I(upgraded) run check for upgrade @@ -581,6 +601,7 @@ def main(): username=iscsi_param.get('username'), password=iscsi_param.get('password'), address=iscsi_param.get('address'), + portal=iscsi_param.get('portal'), ), ) ret = { @@ -599,6 +620,7 @@ def main(): password=iscsi_param.get('password'), address=iscsi_param.get('address'), target=iscsi_param.get('target'), + portal=iscsi_param.get('portal'), ), ) elif state == 'started': diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py b/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py index 30310b7109b..7eecafb4b13 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host_storage_info.py @@ -26,16 +26,36 @@ options: iscsi: description: - "Dictionary with values for iSCSI storage type:" - - "C(address) - Address of the iSCSI storage server." - - "C(target) - The target IQN for the storage device." - - "C(username) - A CHAP user name for logging into a target." - - "C(password) - A CHAP password for logging into a target." + suboptions: + address: + description: + - "Address of the iSCSI storage server." + target: + description: + - "The target IQN for the storage device." + username: + description: + - "A CHAP user name for logging into a target." + password: + description: + - "A CHAP password for logging into a target." + portal: + description: + - "The portal being used to connect with iscsi." + version_added: 2.10 fcp: description: - "Dictionary with values for fibre channel storage type:" - - "C(address) - Address of the fibre channel storage server." - - "C(port) - Port of the fibre channel storage server." - - "C(lun_id) - LUN id." + suboptions: + address: + description: + - "Address of the fibre channel storage server." + port: + description: + - "Port of the fibre channel storage server." + lun_id: + description: + - "LUN id." extends_documentation_fragment: ovirt_info ''' @@ -86,6 +106,7 @@ def _login(host_service, iscsi): password=iscsi.get('password'), address=iscsi.get('address'), target=iscsi.get('target'), + portal=iscsi.get('portal') ), )