cloud: ovirt: Add support to specify multiple LUNs (#22866)

pull/19283/merge
Ondra Machacek 7 years ago committed by René Moser
parent dde3dac9f8
commit f762c61816

@ -82,7 +82,7 @@ options:
- "C(address) - Address of the iSCSI storage server."
- "C(port) - Port of the iSCSI storage server."
- "C(target) - The target IQN for the storage device."
- "C(lun_id) - LUN id."
- "C(lun_id) - LUN id(s)."
- "C(username) - A CHAP user name for logging into a target."
- "C(password) - A CHAP password for logging into a target."
- "C(override_luns) - If I(True) ISCSI storage domain luns will be overriden before adding."
@ -147,7 +147,9 @@ EXAMPLES = '''
data_center: mydatacenter
iscsi:
target: iqn.2016-08-09.domain-01:nickname
lun_id: 1IET_000d0002
lun_id:
- 1IET_000d0001
- 1IET_000d0002
address: 10.34.63.204
# Add data glusterfs storage domain
@ -264,13 +266,17 @@ class StorageDomainModule(BaseModule):
type=otypes.StorageType(storage_type),
logical_units=[
otypes.LogicalUnit(
id=storage.get('lun_id'),
id=lun_id,
address=storage.get('address'),
port=storage.get('port', 3260),
target=storage.get('target'),
username=storage.get('username'),
password=storage.get('password'),
),
) for lun_id in (
storage.get('lun_id')
if isinstance(storage.get('lun_id'), list)
else [storage.get('lun_id')]
)
] if storage_type in ['iscsi', 'fcp'] else None,
override_luns=storage.get('override_luns'),
mount_options=storage.get('mount_options'),

Loading…
Cancel
Save