summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchashtag <12386331+chashtag@users.noreply.github.com>2019-05-16 19:52:45 +0200
committeransibot <ansibot@users.noreply.github.com>2019-05-16 19:52:45 +0200
commit7e997fdca2d099d117e160c6b764b3e39c738c38 (patch)
tree04493d2a5f0f273c170f9f24e0bf9b8fc710cb1d
parentAdd seed parameter to random_mac filter (#51841) (diff)
downloadansible-7e997fdca2d099d117e160c6b764b3e39c738c38.tar.xz
ansible-7e997fdca2d099d117e160c6b764b3e39c738c38.zip
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
-rw-r--r--lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py b/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py
index 14f1d42834..1ea66d22c9 100644
--- a/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py
+++ b/lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py
@@ -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))
)