From a71283e0bbe26c8c6a99c3a81eb7e5e9fa38fb2a Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Mon, 12 Nov 2018 12:06:48 +0800 Subject: Fix SR-IOV format Fix SR-IOV registration Change-Id: I33bd39160804d893d4703a16655e814ce1bdb89f Issue-ID: MULTICLOUD-400 Signed-off-by: Ethan Lynn --- vio/vio/pub/utils/restcall.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vio/vio/pub/utils/restcall.py b/vio/vio/pub/utils/restcall.py index a3b9a06..12986be 100644 --- a/vio/vio/pub/utils/restcall.py +++ b/vio/vio/pub/utils/restcall.py @@ -826,9 +826,10 @@ class AAIClient(object): sriov_capability = {} feature_uuid = uuid.uuid4() - if extra_specs.get('sriov_nic'): - value1 = extra_specs['sriov_nic'].split(':') - value2 = value1[0].split('-') + if extra_specs.get('aggregate_instance_extra_specs:sriov_nic'): + value1 = extra_specs[ + 'aggregate_instance_extra_specs:sriov_nic'].split(':') + value2 = value1[0].split('-', 5) sriov_capability['hpa-capability-id'] = str(feature_uuid) sriov_capability['hpa-feature'] = 'sriovNICNetwork' -- cgit 1.2.3-korg