From 279617a94ebf2fbca2c548d1f2fa776b7b261d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ne=C4=8Das?= Date: Wed, 7 Aug 2019 10:41:33 +0200 Subject: [PATCH] add docs (#60192) --- lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py b/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py index f2f37a73978..e36b9e3fbba 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py @@ -67,6 +67,7 @@ options: description: - "Enables passthrough to an SR-IOV-enabled host NIC." - "When enabled C(qos) and C(network_filter) are automatically set to None and C(port_mirroring) to False." + - "When enabled and C(migratable) not specified then C(migratable) is enabled." - "Port mirroring, QoS and network filters are not supported on passthrough profiles." choices: ['disabled', 'enabled'] migratable: @@ -242,6 +243,8 @@ class EntityVnicPorfileModule(BaseModule): pass_through = getattr(entity.pass_through.mode, 'name', None) return ( check_custom_properties() and + # The reason why we can't use equal method, is we get None from _get_network_filter_id or _get_qos_id method, when passing empty string. + # And when first param of equal method is None it retruns true. self._get_network_filter_id() == getattr(entity.network_filter, 'id', None) and self._get_qos_id() == getattr(entity.qos, 'id', None) and equal(self.param('migratable'), getattr(entity, 'migratable', None)) and