From: garciadeblas Date: Wed, 22 Feb 2023 15:52:24 +0000 (+0100) Subject: Use ip_profile_schema in validation.py X-Git-Tag: release-v14.0-start~18 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=120105b5746ab35c004e523aaada39dc8d517888;p=osm%2FNBI.git Use ip_profile_schema in validation.py Change-Id: If5742f94acba919d5400fabc4c601e45b05c1bdb Signed-off-by: garciadeblas --- diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index 58ecaf7..33ede77 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -194,19 +194,6 @@ ip_profile_dhcp_schema = { } ip_profile_schema = { - "title": "ip profile validation schema", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "ip-version": {"enum": ["ipv4", "ipv6"]}, - "subnet-address": ip_prefix_schema, - "gateway-address": ip_schema, - "dns-server": ip_profile_dns_schema, - "dhcp-params": ip_profile_dhcp_schema, - }, -} - -ip_profile_update_schema = { "title": "ip profile validation schema", "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", @@ -253,7 +240,7 @@ ns_instantiate_internal_vld = { "name": name_schema, "vim-network-name": name_schema, "vim-network-id": name_schema, - "ip-profile": ip_profile_update_schema, + "ip-profile": ip_profile_schema, "provider-network": provider_network_schema, "internal-connection-point": { "type": "array", @@ -394,7 +381,7 @@ ns_instantiate = { "vim-network-id": {"oneOf": [string_schema, object_schema]}, "ns-net": object_schema, "wimAccountId": {"oneOf": [id_schema, bool_schema, null_schema]}, - "ip-profile": object_schema, + "ip-profile": ip_profile_schema, "provider-network": provider_network_schema, "vnfd-connection-point-ref": { "type": "array",