X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fnfvo.py;h=049cb50c8ddbb7b5f2eb4546852a5c12ddbe63d2;hb=137b0d9e53007e4c6903493036c113d124b12b21;hp=f3fb7b752aeb10ee84272c37333567b16126989d;hpb=d8b6bb97e6509fe1354ab64ac10ff2f2afa9995e;p=osm%2FRO.git 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}]':"