From: Lokur, Manish Date: Tue, 2 Jul 2019 23:13:53 +0000 (+0000) Subject: [VVP] Modifies uses_sr_iov function in structures.py to return sr_iov true when vnic_... X-Git-Tag: 5.0.0~16 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=commitdiff_plain;h=00e83976dee5a13819b10a721f0a6de29ec1ab1b [VVP] Modifies uses_sr_iov function in structures.py to return sr_iov true when vnic_type=direct Issue-ID: VVP-231 Signed-off-by: Lokur, Manish Change-Id: I9b42d682f9cca0b8ae68746c5472cf7903933558 --- diff --git a/ice_validator/tests/structures.py b/ice_validator/tests/structures.py index 8abe87b..5e81587 100644 --- a/ice_validator/tests/structures.py +++ b/ice_validator/tests/structures.py @@ -494,11 +494,11 @@ class NeutronPortProcessor(HeatProcessor): """Returns True/False as `resource` is/not An OS::Nova:Port with the property binding:vnic_type """ - return nested_dict.get( - resource, "type" - ) == cls.resource_type and "binding:vnic_type" in nested_dict.get( - resource, "properties", default={} - ) + resource_properties = nested_dict.get(resource, "properties", default={}) + if nested_dict.get(resource, "type") == cls.resource_type and resource_properties.get("binding:vnic_type", "") == "direct": + return True + + return False class NovaServerProcessor(HeatProcessor):