Update ovirt_vnic_profile.py (#56518)

##### SUMMARY
qos is not defined when port_mirroring is enabled, a NoneType is returned for entity.qos in this case
getattr is safer to use than using a direct call to entity.qos.name


##### ISSUE TYPE
- Bugfix Pull Request

+label: docsite_pr
pull/56540/head
chashtag 5 years ago committed by ansibot
parent 730456b402
commit 7e997fdca2

@ -217,7 +217,7 @@ class EntityVnicPorfileModule(BaseModule):
equal(self.param('pass_through'), entity.pass_through.mode.name) and
equal(self.param('description'), entity.description) and
equal(self.param('network_filter'), getattr(entity.network_filter, 'name', None)) and
equal(self.param('qos'), entity.qos.name) and
equal(self.param('qos'), getattr(entity.qos, 'name', None)) and
equal(self.param('port_mirroring'), getattr(entity, 'port_mirroring', None))
)

Loading…
Cancel
Save