forked from openconfig/ondatra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestbed.proto
145 lines (132 loc) · 4.24 KB
/
testbed.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package ondatra;
option go_package = "github.com/openconfig/ondatra/proto";
// A testbed.
message Testbed {
repeated Device duts = 1;
repeated Device ates = 2;
repeated Link links = 3;
}
// A device.
message Device {
string id = 1;
enum Vendor {
VENDOR_UNSPECIFIED = 0;
ARISTA = 1;
CISCO = 2;
IXIA = 3;
JUNIPER = 4;
CIENA = 5;
PALOALTO = 6;
NOKIA = 7;
ZPE = 8;
DELL = 9;
OPENCONFIG = 10;
}
Vendor vendor = 2;
// Hardware model of the device. Optional.
//
// If the value starts with "regex:" then the suffix is interpreted as a RE2
// regular expression. The model will be restricted to models matching the
// regular expression.
string hardware_model = 4;
// Software version of the device. Optional.
//
// If the value starts with "regex:" then the suffix is interpreted as a RE2
// regular expression. The version will be restricted to versions matching the
// regular expression.
string software_version = 5;
repeated Port ports = 3;
// A key-value map of additional device dimensions. Optional.
//
// In addition to the above fields, the extra dimensions field can be used to
// further restrict matching devices. The set of dimension keys that are
// supported is specific to the binding implementation. For example, if the
// binding supports filtering devices by a dimension named "label," the
// testbed could specify an extra dimensions map of
// extra_dimensions {
// key: "label",
// value: "foo",
// }
map<string, string> extra_dimensions = 6;
}
// A port.
message Port {
string id = 1;
// Speed enum values are the port speed in Gbps.
enum Speed {
SPEED_UNSPECIFIED = 0;
S_1GB = 1;
S_5GB = 5;
S_10GB = 10;
S_100GB = 100;
S_400GB = 400;
}
Speed speed = 2;
// The model of the card which contains the physical port.
string card_model = 3;
// Pmd enum values are PMD of the port.
// This should be kept in sync with the values specified in OpenConfig:
// https://github.com/openconfig/public/blob/master/release/models/optical-transport/openconfig-transport-types.yang
enum Pmd {
PMD_UNSPECIFIED = 0;
PMD_10GBASE_LRM = 1;
PMD_10GBASE_LR = 2;
PMD_10GBASE_ZR = 3;
PMD_10GBASE_ER = 4;
PMD_10GBASE_SR = 5;
PMD_40GBASE_CR4 = 6;
PMD_40GBASE_SR4 = 7;
PMD_40GBASE_LR4 = 8;
PMD_40GBASE_ER4 = 9;
PMD_40GBASE_PSM4 = 10;
PMD_4X10GBASE_LR = 11;
PMD_4X10GBASE_SR = 12;
PMD_100G_AOC = 13;
PMD_100G_ACC = 14;
PMD_100GBASE_SR10 = 15;
PMD_100GBASE_SR4 = 16;
PMD_100GBASE_LR4 = 17;
PMD_100GBASE_ER4 = 18;
PMD_100GBASE_CWDM4 = 19;
PMD_100GBASE_CLR4 = 20;
PMD_100GBASE_PSM4 = 21;
PMD_100GBASE_CR4 = 22;
PMD_100GBASE_FR = 23;
PMD_400GBASE_ZR = 24;
PMD_400GBASE_LR4 = 25;
PMD_400GBASE_FR4 = 26;
PMD_400GBASE_LR8 = 27;
PMD_400GBASE_DR4 = 28;
}
oneof pmd_value {
Pmd pmd = 4;
string pmd_regex = 5;
}
// A hint that the test intends to create a LAG from this port and other ports
// in the same group. For some kinds of devices, including OTG on KNE, a group
// hint is necessary to create a LAG, because a LAG requires additional
// topological constraints that can't otherwise be expressed in the testbed.
string group = 6;
}
// A physical link between ports on DUTs or ATEs.
// The order does not matter: links are symmetrical.
// A given port may be specified in at most one link (typically in exactly one
// link, because un-connected ports are not very interesting for testing).
message Link {
string a = 1; // First port in the format "<device-id>:<port-id>".
string b = 2; // Second port in the format "<device-id>:<port-id>".
}