From 2a929042e82cf1e010da9d8ff516f96159a57efd Mon Sep 17 00:00:00 2001 From: tierno Date: Tue, 10 Mar 2020 16:34:25 +0000 Subject: [PATCH] allow external port for SDN net Change-Id: I4f827d185678be1529a8774d08ce668b12f653c5 Signed-off-by: tierno --- osm_nbi/validation.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index 3615943..d40814e 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -145,7 +145,7 @@ ip_profile_dhcp_schema = { } ip_profile_schema = { - "title": "ip profile validation schame", + "title": "ip profile validation schema", "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { @@ -158,7 +158,7 @@ ip_profile_schema = { } ip_profile_update_schema = { - "title": "ip profile validation schame", + "title": "ip profile validation schema", "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { @@ -173,14 +173,28 @@ ip_profile_update_schema = { } provider_network_schema = { - "title": "provider network validation schame", + "title": "provider network validation schema", "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "physical-network": name_schema, "segmentation-id": name_schema, + "sdn-ports": { # external ports to append to the SDN-assist network + "type": "array", + "items": { + "type": "object", + "properties": { + "switch_id": shortname_schema, + "switch_port": shortname_schema, + "mac_address": mac_schema, + "vlan": vlan_schema, + }, + "additionalProperties": True + } + }, + "network-type": shortname_schema, }, - "additionalProperties": False + "additionalProperties": True } ns_instantiate_internal_vld = { -- 2.25.1