From 3a60cde14e1f90c96ad7a125522fa1fbb69de818 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Thu, 26 Apr 2018 12:43:19 +0200 Subject: [PATCH] ovirt: FCP storage domains don't have to have target (#38882) --- lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py index ac5bf08d1a..54be960b95 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py @@ -356,6 +356,9 @@ class StorageDomainModule(BaseModule): return [(lun_id, storage.get('target')) for lun_id in lun_ids] elif storage.get('target_lun_map'): return [(target_map.get('lun_id'), target_map.get('target')) for target_map in storage.get('target_lun_map')] + else: + lun_ids = storage.get('lun_id') if isinstance(storage.get('lun_id'), list) else [(storage.get('lun_id'))] + return [(lun_id, None) for lun_id in lun_ids] def build_entity(self): storage_type = self._get_storage_type()