forked from openconfig/ondatra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testbed.proto
113 lines (100 loc) · 3.08 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
// 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;
}
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.
enum Pmd {
PMD_UNSPECIFIED = 0;
PMD_100G_FR = 1;
PMD_100G_LR4 = 2;
PMD_400G_FR4 = 3;
}
oneof pmd_value {
Pmd pmd = 4;
string pmd_regex = 5;
}
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>".
}