From: tierno Date: Fri, 6 Oct 2017 12:03:05 +0000 (+0200) Subject: fix port security false at new IM X-Git-Tag: v3.0.0rc14~10 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F5540%2F1;p=osm%2FRO.git fix port security false at new IM Change-Id: I53808a401016c5b823b1db8a30c8fa805b224ce4 Signed-off-by: tierno --- diff --git a/openmanod b/openmanod index 8a06a582..6d0b32e9 100755 --- a/openmanod +++ b/openmanod @@ -48,7 +48,7 @@ import osm_ro __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes" __date__ = "$26-aug-2014 11:09:29$" -__version__ = "0.5.29-r539" +__version__ = "0.5.30-r540" version_date = "Oct 2017" database_version = 27 # expected database schema version diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index f3fb7b75..049cb50c 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -1021,9 +1021,10 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): db_interface["external_name"] = get_str(cp, "name", 255) cp_name2iface_uuid[db_interface["external_name"]] = iface_uuid cp_name2vm_uuid[db_interface["external_name"]] = vm_uuid - # TODO add port-security-enable - # if cp.get("port-security-enabled") == False: - # elif cp.get("port-security-enabled") == True: + if cp.get("port-security-enabled") == False: + db_interface["port_security"] = 0 + elif cp.get("port-security-enabled") == True: + db_interface["port_security"] = 1 except KeyError: raise NfvoException("Error. Invalid VNF descriptor at 'vnfd[{vnf}]':'vdu[{vdu}]':" "'interface[{iface}]':'vnfd-connection-point-ref':'{cp}' is not present" @@ -1037,6 +1038,10 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): for cp in vld.get("internal-connection-point").itervalues(): if cp.get("id-ref") == iface.get("internal-connection-point-ref"): db_interface["net_id"] = net_id2uuid[vld.get("id")] + if cp.get("port-security-enabled") == False: + db_interface["port_security"] = 0 + elif cp.get("port-security-enabled") == True: + db_interface["port_security"] = 1 break except KeyError: raise NfvoException("Error. Invalid VNF descriptor at 'vnfd[{vnf}]':'vdu[{vdu}]':"