Report: Add vsap
[csit.git] / resources / topology_schemas / topology.sch.yaml
1 # Copyright (c) 2021 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, Intel-XXV710]
64         vlan:
65           type: int
66           required: no
67
68 schema;type_interface_tg: &type_interface_tg
69   type: map
70   mapping:
71     <<: *type_interface_mapping
72     regex;(port\d+):
73       <<: *type_interface_mapping_port
74       mapping:
75         <<: *type_interface_mapping_port_mapping
76         driver:
77           <<: *type_interface_mapping_driver
78           required: yes
79
80 schema;type_honeycomb: &type_honeycomb
81   type: map
82   mapping: &type_honeycomb_mapping
83     user:
84       type: str
85       required: yes
86     passwd:
87       type: str
88       required: yes
89     port:
90       type: int
91       required: yes
92     netconf_port:
93       type: int
94       required: yes
95
96 schema;type_node: &type_node
97   type: map
98   mapping: &type_node_mapping
99     type: &type_node_mapping_type
100       required: yes
101       type: str
102     host:
103       required: yes
104       type: str
105     arch:
106       required: yes
107       type: str
108     port:
109       type: int
110     username:
111       type: str
112     password:
113       type: str
114     priv_key:
115       type: str
116     interfaces:
117       type: map
118       mapping:
119         <<: *type_interface_mapping
120
121 schema;type_tg:
122   type: map
123   mapping:
124     <<: *type_node_mapping
125     type:
126       <<: *type_node_mapping_type
127       enum: [TG]
128     subtype:
129       type: str
130     interfaces:
131       <<: *type_interface_tg
132
133 schema;type_dut:
134   type: map
135   mapping:
136     <<: *type_node_mapping
137     type:
138       <<: *type_node_mapping_type
139       enum: [DUT]
140     honeycomb:
141       type: map
142       mapping:
143         <<: *type_honeycomb_mapping
144
145 # vim: sw=2:sts=2