From: gcalvino Date: Mon, 4 Dec 2017 15:47:40 +0000 (+0100) Subject: Minor correction in new_vnfd_v3 function X-Git-Tag: v3.0.3~18 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=d9f2b88a86bb04c44f40008c719f6ff6cd7aea2f;p=osm%2FRO.git Minor correction in new_vnfd_v3 function Change-Id: I8c45d8c494dc05736c839a98018340cc51adfa94 Signed-off-by: gcalvino --- diff --git a/openmanod b/openmanod index ca870e90..51b67f3d 100755 --- a/openmanod +++ b/openmanod @@ -48,8 +48,8 @@ import osm_ro __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes" __date__ = "$26-aug-2014 11:09:29$" -__version__ = "0.5.45-r555" -version_date = "Nov 2017" +__version__ = "0.5.46-r556" +version_date = "Dec 2017" database_version = 27 # expected database schema version diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index ce969107..494a01d6 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -1048,7 +1048,7 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): if cp.get("id-ref") == iface.get("internal-connection-point-ref"): db_interface["net_id"] = net_id2uuid[vld.get("id")] for cp_descriptor in vnfd_descriptor["connection-point"]: - if cp_descriptor["name"] == db_interface["external_name"]: + if cp_descriptor["name"] == db_interface["internal_name"]: break if str(cp_descriptor.get("port-security-enabled")).lower() == "false": db_interface["port_security"] = 0 @@ -1057,10 +1057,10 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): break except KeyError: raise NfvoException("Error. Invalid VNF descriptor at 'vnfd[{vnf}]':'vdu[{vdu}]':" - "'interface[{iface}]':'vdu-internal-connection-point-ref':'{cp}' is not" + "'interface[{iface}]':'internal-connection-point-ref':'{cp}' is not" " referenced by any internal-vld".format( vnf=vnfd_id, vdu=vdu_id, iface=iface["name"], - cp=iface.get("vdu-internal-connection-point-ref")), + cp=iface.get("internal-connection-point-ref")), HTTP_Bad_Request) if iface.get("position") is not None: db_interface["created_at"] = int(iface.get("position")) - 1000