CSIT-472: Update of DPDK to 16.11 in Nested VM
[csit.git] / resources / topology_schemas / topology.sch.yaml
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 # This file defines yaml schema for topolgy yaml.
15
16 schema;topology_metadata_map:
17   type: map
18   mapping:
19     version:
20       type: any
21     schema:
22       required: yes
23       type: seq
24       sequence:
25         - type: str
26           unique: True
27     tags:
28       include: list_tags
29     check_script:
30       type: str
31     start_script:
32       type: str
33
34
35 schema;list_tags:
36   type: seq
37   sequence:
38     - type: str
39       unique: True
40
41 schema;type_interfaces:
42   type: map
43   mapping: &type_interface_mapping
44     regex;(port\d+): &type_interface_mapping_port
45       type: map
46       mapping: &type_interface_mapping_port_mapping
47         name:
48           type: str
49         pci_address:
50           type: str
51           pattern: "[0-9a-f]{4}:[0-9a-f]{2}:[0-9a-f]{2}\\.\\d{1}"
52         mac_address:
53           type: str
54           pattern: "[0-9a-f]{2}(:[0-9a-f]{2}){5}"
55         link:
56           type: str
57           required: yes
58         driver: &type_interface_mapping_driver
59           type: str
60         model:
61           type: str
62           enum: [Cisco-VIC-1227, Cisco-VIC-1385, Intel-X520-DA2,
63                  Intel-X710, Intel-XL710]
64
65 schema;type_interface_tg: &type_interface_tg
66   type: map
67   mapping:
68     <<: *type_interface_mapping
69     regex;(port\d+):
70       <<: *type_interface_mapping_port
71       mapping:
72         <<: *type_interface_mapping_port_mapping
73         driver:
74           <<: *type_interface_mapping_driver
75           required: yes
76
77 schema;type_honeycomb: &type_honeycomb
78   type: map
79   mapping: &type_honeycomb_mapping
80     user:
81       type: str
82       required: yes
83     passwd:
84       type: str
85       required: yes
86     port:
87       type: int
88       required: yes
89     netconf_port:
90       type: int
91       required: yes
92
93 schema;type_node: &type_node
94   type: map
95   mapping: &type_node_mapping
96     type: &type_node_mapping_type
97       required: yes
98       type: str
99     host:
100       required: yes
101       type: str
102     port:
103       type: int
104     username:
105       type: str
106     password:
107       type: str
108     priv_key:
109       type: str
110     interfaces:
111       type: map
112       mapping:
113         <<: *type_interface_mapping
114
115 schema;type_tg:
116   type: map
117   mapping:
118     <<: *type_node_mapping
119     type:
120       <<: *type_node_mapping_type
121       enum: [TG]
122     subtype:
123       type: str
124     interfaces:
125       <<: *type_interface_tg
126
127 schema;type_dut:
128   type: map
129   mapping:
130     <<: *type_node_mapping
131     type:
132       <<: *type_node_mapping_type
133       enum: [DUT]
134     honeycomb:
135       type: map
136       mapping:
137         <<: *type_honeycomb_mapping
138
139 # vim: sw=2:sts=2