ovirt_host: add iscsi portal (#66750)

* ovirt_host: add iscsi portal

* correct version_added to 2.10
This commit is contained in:
Martin Nečas 2020-01-25 14:18:34 +01:00 committed by ansibot
parent f1ec48429a
commit d7a1917c17
2 changed files with 51 additions and 8 deletions

View file

@ -126,7 +126,27 @@ options:
used to discover targets" used to discover targets"
- "If C(state) is I(iscsilogin) it means that the iscsi attribute is being - "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" 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: check_upgrade:
description: description:
- "If I(true) and C(state) is I(upgraded) run check for upgrade - "If I(true) and C(state) is I(upgraded) run check for upgrade
@ -581,6 +601,7 @@ def main():
username=iscsi_param.get('username'), username=iscsi_param.get('username'),
password=iscsi_param.get('password'), password=iscsi_param.get('password'),
address=iscsi_param.get('address'), address=iscsi_param.get('address'),
portal=iscsi_param.get('portal'),
), ),
) )
ret = { ret = {
@ -599,6 +620,7 @@ def main():
password=iscsi_param.get('password'), password=iscsi_param.get('password'),
address=iscsi_param.get('address'), address=iscsi_param.get('address'),
target=iscsi_param.get('target'), target=iscsi_param.get('target'),
portal=iscsi_param.get('portal'),
), ),
) )
elif state == 'started': elif state == 'started':

View file

@ -26,16 +26,36 @@ options:
iscsi: iscsi:
description: description:
- "Dictionary with values for iSCSI storage type:" - "Dictionary with values for iSCSI storage type:"
- "C(address) - Address of the iSCSI storage server." suboptions:
- "C(target) - The target IQN for the storage device." address:
- "C(username) - A CHAP user name for logging into a target." description:
- "C(password) - A CHAP password for logging into a target." - "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: fcp:
description: description:
- "Dictionary with values for fibre channel storage type:" - "Dictionary with values for fibre channel storage type:"
- "C(address) - Address of the fibre channel storage server." suboptions:
- "C(port) - Port of the fibre channel storage server." address:
- "C(lun_id) - LUN id." 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 extends_documentation_fragment: ovirt_info
''' '''
@ -86,6 +106,7 @@ def _login(host_service, iscsi):
password=iscsi.get('password'), password=iscsi.get('password'),
address=iscsi.get('address'), address=iscsi.get('address'),
target=iscsi.get('target'), target=iscsi.get('target'),
portal=iscsi.get('portal')
), ),
) )