raise EngineException("ERROR: Unsupported descriptor format. Please, use an ETSI SOL006 descriptor.",
http_code=HTTPStatus.UNPROCESSABLE_ENTITY)
try:
+ nsd_vnf_profiles = data.get('df', [{}])[0].get('vnf-profile', [])
mynsd = etsi_nfv_nsd.etsi_nfv_nsd()
pybindJSONDecoder.load_ietf_json({'nsd': {'nsd': [data]}}, None, None, obj=mynsd,
path_helper=True, skip_unknown=force)
out = pybindJSON.dumps(mynsd, mode="ietf")
desc_out = self._remove_envelop(yaml.safe_load(out))
desc_out = self._remove_yang_prefixes_from_descriptor(desc_out)
+ if nsd_vnf_profiles:
+ desc_out['df'][0]['vnf-profile'] = nsd_vnf_profiles
return desc_out
except Exception as e:
raise EngineException("Error in pyangbind validation: {}".format(str(e)),