From c3b6d3775a351b9663ebb9bd94a5694d99d647da Mon Sep 17 00:00:00 2001 From: tierno Date: Tue, 30 May 2017 17:12:00 +0200 Subject: [PATCH] (bug 283) fixed error at vnf creation on missing vpci for dataplane interfaces Change-Id: I45541219873336dd7a8f8ec155ad0772404ad51a Signed-off-by: tierno --- osm_ro/nfvo_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osm_ro/nfvo_db.py b/osm_ro/nfvo_db.py index ea6d3397..ac392c6d 100644 --- a/osm_ro/nfvo_db.py +++ b/osm_ro/nfvo_db.py @@ -107,7 +107,7 @@ class nfvo_db(db_base.db_base): created_time += 0.00001 db_base._convert_bandwidth(dataiface, logger=self.logger) dataifacesDict[vm['name']][dataiface['name']] = {} - dataifacesDict[vm['name']][dataiface['name']]['vpci'] = dataiface['vpci'] + dataifacesDict[vm['name']][dataiface['name']]['vpci'] = dataiface.get('vpci') dataifacesDict[vm['name']][dataiface['name']]['bw'] = dataiface['bandwidth'] dataifacesDict[vm['name']][dataiface['name']]['model'] = "PF" if dataiface[ 'dedicated'] == "yes" else ( @@ -258,7 +258,7 @@ class nfvo_db(db_base.db_base): created_time += 0.00001 db_base._convert_bandwidth(dataiface, logger=self.logger) ifaceDict = {} - ifaceDict['vpci'] = dataiface['vpci'] + ifaceDict['vpci'] = dataiface.get('vpci') ifaceDict['bw'] = dataiface['bandwidth'] ifaceDict['model'] = "PF" if dataiface['dedicated'] == "yes" else \ ("VF" if dataiface['dedicated'] == "no" else "VFnotShared") -- 2.25.1