From: tierno Date: Tue, 30 May 2017 15:12:00 +0000 (+0200) Subject: (bug 283) fixed error at vnf creation on missing vpci for dataplane interfaces X-Git-Tag: v2.0.2~28 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c3b6d3775a351b9663ebb9bd94a5694d99d647da;p=osm%2FRO.git (bug 283) fixed error at vnf creation on missing vpci for dataplane interfaces Change-Id: I45541219873336dd7a8f8ec155ad0772404ad51a Signed-off-by: tierno --- 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")