diff options
Diffstat (limited to 'pike')
-rw-r--r-- | pike/pike/resource/tests/tests_infra_workload.py | 10 | ||||
-rw-r--r-- | pike/pike/resource/views/infra_workload.py | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/pike/pike/resource/tests/tests_infra_workload.py b/pike/pike/resource/tests/tests_infra_workload.py index 48c29d15..e473c84f 100644 --- a/pike/pike/resource/tests/tests_infra_workload.py +++ b/pike/pike/resource/tests/tests_infra_workload.py @@ -51,6 +51,16 @@ MOCK_HEAT_CREATE_BODY1 = { "attribute_value":"m1.hpa.medium" } ] + }, + { + "type":"sriovNetNetwork_directives", + "attributes":[ + { + "attribute_name":"physnetwork_label", + "attribute_value":"physnet1" + } + ] + } ] } diff --git a/pike/pike/resource/views/infra_workload.py b/pike/pike/resource/views/infra_workload.py index 3e144e7f..4d0b6716 100644 --- a/pike/pike/resource/views/infra_workload.py +++ b/pike/pike/resource/views/infra_workload.py @@ -55,8 +55,7 @@ class InfraWorkload(APIView): for directive in oof_directive.get("directives", []): if directive["type"] == "vnfc": for directive2 in directive.get("directives", []): - #if directive2["type"] in ["flavor_directives", "sriovNICNetwork_directives"]: - if directive2["type"] == "flavor_directives": + if directive2["type"] in ["flavor_directives", "sriovNICNetwork_directives"]: for attr in directive2.get("attributes", []): label_name = attr["attribute_name"] label_value = attr["attribute_value"] |