Minor correction in new_vnfd_v3 function 49/5749/2 rift300
authorgcalvino <guillermo.calvinosanchez@altran.com>
Mon, 4 Dec 2017 15:47:40 +0000 (16:47 +0100)
committergcalvino <guillermo.calvinosanchez@altran.com>
Tue, 5 Dec 2017 11:25:12 +0000 (12:25 +0100)
Change-Id: I8c45d8c494dc05736c839a98018340cc51adfa94
Signed-off-by: gcalvino <guillermo.calvinosanchez@altran.com>
openmanod
osm_ro/nfvo.py

index ca870e9..51b67f3 100755 (executable)
--- 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
 
 
index ce96910..494a01d 100644 (file)
@@ -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