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