This commit is contained in:
Martin Nečas 2019-08-07 10:41:33 +02:00 committed by ansibot
parent 45d0e5994a
commit 279617a94e

View file

@ -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