From: tierno Date: Tue, 9 Apr 2019 14:19:40 +0000 (+0000) Subject: skip unknown parameters at VNFD,NSD pyangbind validation X-Git-Tag: v6.0.0~27 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f6bbe22d9906cde52f86658daa9ee444f2ec3a6e;p=osm%2FRO.git skip unknown parameters at VNFD,NSD pyangbind validation Change-Id: Ib5c9536354aed78aea6cded7def9479287006cbe Signed-off-by: tierno --- diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index f65f08f9..ff47fecf 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -888,7 +888,8 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): try: myvnfd = vnfd_catalog.vnfd() try: - pybindJSONDecoder.load_ietf_json(vnf_descriptor, None, None, obj=myvnfd, path_helper=True) + pybindJSONDecoder.load_ietf_json(vnf_descriptor, None, None, obj=myvnfd, path_helper=True, + skip_unknown=True) except Exception as e: raise NfvoException("Error. Invalid VNF descriptor format " + str(e), httperrors.Bad_Request) db_vnfs = [] @@ -2264,7 +2265,7 @@ def new_nsd_v3(mydb, tenant_id, nsd_descriptor): try: mynsd = nsd_catalog.nsd() try: - pybindJSONDecoder.load_ietf_json(nsd_descriptor, None, None, obj=mynsd) + pybindJSONDecoder.load_ietf_json(nsd_descriptor, None, None, obj=mynsd, skip_unknown=True) except Exception as e: raise NfvoException("Error. Invalid NS descriptor format: " + str(e), httperrors.Bad_Request) db_scenarios = []