X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO%2Fosm_ro%2Fnfvo.py;h=74cfbf0dd29f3f160edfbf18226c1c5c0f0b5c97;hb=70eeb18e4fcbb8bc3c81c88f270b59966ae4d463;hp=a7b15a29ca409b6430ea08a9c3eedbb61fbc9856;hpb=b9ffecd8dcdd6a311673a0e38f9b051230a88b8a;p=osm%2FRO.git diff --git a/RO/osm_ro/nfvo.py b/RO/osm_ro/nfvo.py index a7b15a29..74cfbf0d 100644 --- a/RO/osm_ro/nfvo.py +++ b/RO/osm_ro/nfvo.py @@ -1198,8 +1198,9 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): vdu_id2cp_name[vdu_id] = db_interface["external_name"] # port security - if str(cp_descriptor.get("port-security-enabled")).lower() == "false": + if "port-security-disable-strategy" in cp_descriptor or str(cp_descriptor.get("port-security-enabled")).lower() == "false": db_interface["port_security"] = 0 + db_interface["port_security_disable_strategy"] = cp_descriptor.get("port-security-disable-strategy", "full") elif str(cp_descriptor.get("port-security-enabled")).lower() == "true": db_interface["port_security"] = 1 except KeyError: @@ -1233,8 +1234,9 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): ("SR-IOV", "PCI-PASSTHROUGH"): db_nets[net_id2index[icp_vld.get("id")]]["type"] = "data" db_interface["net_id"] = net_id2uuid[icp_vld.get("id")] - if str(icp_descriptor.get("port-security-enabled")).lower() == "false": + if "port-security-disable-strategy" in icp_descriptor or str(icp_descriptor.get("port-security-enabled")).lower() == "false": db_interface["port_security"] = 0 + db_interface["port_security_disable_strategy"] = icp_descriptor.get("port-security-disable-strategy", "full") elif str(icp_descriptor.get("port-security-enabled")).lower() == "true": db_interface["port_security"] = 1 if icp.get("ip-address"): @@ -4115,6 +4117,8 @@ def instantiate_vnf(mydb, sce_vnf, params, params_out, rollbackList): netDict['ip_address'] = iface['ip_address'] if iface.get("port-security") is not None: netDict['port_security'] = iface['port-security'] + if iface.get("port_security_disable_strategy") is not None: + netDict['port_security_disable_strategy'] = iface['port_security_disable_strategy'] if iface.get("floating-ip") is not None: netDict['floating_ip'] = iface['floating-ip'] netDict['name'] = iface['internal_name']