1 # -*- coding: utf-8 -*-
3 # Copyright 2018 University of Bristol - High Performance Networks Research
7 # Contributors: Anderson Bravalheri, Dimitrios Gkounis, Abubakar Siddique
8 # Muqaddas, Navdeep Uniyal, Reza Nejabati and Dimitra Simeonidou
10 # Licensed under the Apache License, Version 2.0 (the "License"); you may
11 # not use this file except in compliance with the License. You may obtain
12 # a copy of the License at
14 # http://www.apache.org/licenses/LICENSE-2.0
16 # Unless required by applicable law or agreed to in writing, software
17 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
19 # License for the specific language governing permissions and limitations
22 # For those usages not covered by the Apache License, Version 2.0 please
23 # contact with: <highperformance-networks@bristol.ac.uk>
25 # Neither the name of the University of Bristol nor the names of its
26 # contributors may be used to endorse or promote products derived from
27 # this software without specific prior written permission.
29 # This work has been performed in the context of DCMS UK 5G Testbeds
30 # & Trials Programme and in the framework of the Metro-Haul project -
31 # funded by the European Commission under Grant number 761727 through the
32 # Horizon 2020 and 5G-PPP programmes.
35 from ..openmano_schemas
import (
41 # WIM -------------------------------------------------------------------------
42 wim_types
= ["tapi", "onos", "odl"]
44 wim_schema_properties
= {
46 "description": description_schema
,
49 "enum": ["tapi", "onos", "odl"]
51 "wim_url": description_schema
,
52 "config": {"type": "object"}
56 "title": "wim information schema",
57 "$schema": "http://json-schema.org/draft-04/schema#",
62 "properties": wim_schema_properties
,
63 "required": ["name", "type", "wim_url"],
64 "additionalProperties": True
68 "additionalProperties": False
72 "title": "wim edit information schema",
73 "$schema": "http://json-schema.org/draft-04/schema#",
78 "properties": wim_schema_properties
,
79 "additionalProperties": False
83 "additionalProperties": False
86 wim_account_schema
= {
87 "title": "wim account information schema",
88 "$schema": "http://json-schema.org/draft-04/schema#",
95 "user": nameshort_schema
,
96 "password": nameshort_schema
,
97 "config": {"type": "object"}
99 "additionalProperties": True
102 "required": ["wim_account"],
103 "additionalProperties": False
109 "^[0-9a-zA-Z]+(:[0-9a-zA-Z]+)*$"
123 wim_port_mapping_schema
= {
124 "$schema": "http://json-schema.org/draft-04/schema#",
125 "title": "wim mapping information schema",
128 "wim_port_mapping": {
133 "datacenter_name": nameshort_schema
,
134 "pop_wan_mappings": {
139 "pop_switch_dpid": dpid_type
,
140 "pop_switch_port": port_type
,
141 "wan_service_endpoint_id": name_schema
,
142 "wan_service_mapping_info": {
145 "mapping_type": name_schema
,
146 "wan_switch_dpid": dpid_type
,
147 "wan_switch_port": port_type
149 "additionalProperties": True,
150 "required": ["mapping_type"]
158 "wan_service_endpoint_id"
165 "wan_service_mapping_info"
172 "required": ["datacenter_name", "pop_wan_mappings"]
176 "required": ["wim_port_mapping"]