@metal-stack/api 0.0.40-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/js/Makefile +16 -0
  4. package/js/buf/validate/validate_pb.d.ts +4597 -0
  5. package/js/buf/validate/validate_pb.js +351 -0
  6. package/js/buf/validate/validate_pb.ts +4938 -0
  7. package/js/metalstack/admin/v2/filesystem_pb.d.ts +207 -0
  8. package/js/metalstack/admin/v2/filesystem_pb.js +48 -0
  9. package/js/metalstack/admin/v2/filesystem_pb.ts +248 -0
  10. package/js/metalstack/admin/v2/image_pb.d.ts +242 -0
  11. package/js/metalstack/admin/v2/image_pb.js +59 -0
  12. package/js/metalstack/admin/v2/image_pb.ts +288 -0
  13. package/js/metalstack/admin/v2/ip_pb.d.ts +60 -0
  14. package/js/metalstack/admin/v2/ip_pb.js +26 -0
  15. package/js/metalstack/admin/v2/ip_pb.ts +78 -0
  16. package/js/metalstack/admin/v2/machine_pb.d.ts +113 -0
  17. package/js/metalstack/admin/v2/machine_pb.js +38 -0
  18. package/js/metalstack/admin/v2/machine_pb.ts +140 -0
  19. package/js/metalstack/admin/v2/network_pb.d.ts +407 -0
  20. package/js/metalstack/admin/v2/network_pb.js +68 -0
  21. package/js/metalstack/admin/v2/network_pb.ts +478 -0
  22. package/js/metalstack/admin/v2/partition_pb.d.ts +341 -0
  23. package/js/metalstack/admin/v2/partition_pb.js +58 -0
  24. package/js/metalstack/admin/v2/partition_pb.ts +402 -0
  25. package/js/metalstack/admin/v2/project_pb.d.ts +67 -0
  26. package/js/metalstack/admin/v2/project_pb.js +27 -0
  27. package/js/metalstack/admin/v2/project_pb.ts +87 -0
  28. package/js/metalstack/admin/v2/size_pb.d.ts +183 -0
  29. package/js/metalstack/admin/v2/size_pb.js +48 -0
  30. package/js/metalstack/admin/v2/size_pb.ts +220 -0
  31. package/js/metalstack/admin/v2/switch_pb.d.ts +377 -0
  32. package/js/metalstack/admin/v2/switch_pb.js +79 -0
  33. package/js/metalstack/admin/v2/switch_pb.ts +435 -0
  34. package/js/metalstack/admin/v2/tenant_pb.d.ts +149 -0
  35. package/js/metalstack/admin/v2/tenant_pb.js +38 -0
  36. package/js/metalstack/admin/v2/tenant_pb.ts +182 -0
  37. package/js/metalstack/admin/v2/token_pb.d.ts +164 -0
  38. package/js/metalstack/admin/v2/token_pb.js +47 -0
  39. package/js/metalstack/admin/v2/token_pb.ts +199 -0
  40. package/js/metalstack/admin/v2/vpn_pb.ts +184 -0
  41. package/js/metalstack/api/v2/common_pb.d.ts +407 -0
  42. package/js/metalstack/api/v2/common_pb.js +311 -0
  43. package/js/metalstack/api/v2/common_pb.ts +488 -0
  44. package/js/metalstack/api/v2/filesystem_pb.d.ts +704 -0
  45. package/js/metalstack/api/v2/filesystem_pb.js +259 -0
  46. package/js/metalstack/api/v2/filesystem_pb.ts +819 -0
  47. package/js/metalstack/api/v2/health_pb.d.ts +220 -0
  48. package/js/metalstack/api/v2/health_pb.js +130 -0
  49. package/js/metalstack/api/v2/health_pb.ts +264 -0
  50. package/js/metalstack/api/v2/image_pb.d.ts +368 -0
  51. package/js/metalstack/api/v2/image_pb.js +129 -0
  52. package/js/metalstack/api/v2/image_pb.ts +436 -0
  53. package/js/metalstack/api/v2/ip_pb.d.ts +555 -0
  54. package/js/metalstack/api/v2/ip_pb.js +137 -0
  55. package/js/metalstack/api/v2/ip_pb.ts +650 -0
  56. package/js/metalstack/api/v2/machine_pb.d.ts +1831 -0
  57. package/js/metalstack/api/v2/machine_pb.js +459 -0
  58. package/js/metalstack/api/v2/machine_pb.ts +2155 -0
  59. package/js/metalstack/api/v2/method_pb.d.ts +122 -0
  60. package/js/metalstack/api/v2/method_pb.js +38 -0
  61. package/js/metalstack/api/v2/method_pb.ts +149 -0
  62. package/js/metalstack/api/v2/network_pb.d.ts +820 -0
  63. package/js/metalstack/api/v2/network_pb.js +244 -0
  64. package/js/metalstack/api/v2/network_pb.ts +954 -0
  65. package/js/metalstack/api/v2/partition_pb.d.ts +251 -0
  66. package/js/metalstack/api/v2/partition_pb.js +62 -0
  67. package/js/metalstack/api/v2/partition_pb.ts +300 -0
  68. package/js/metalstack/api/v2/predefined_rules_pb.d.ts +54 -0
  69. package/js/metalstack/api/v2/predefined_rules_pb.js +57 -0
  70. package/js/metalstack/api/v2/predefined_rules_pb.ts +79 -0
  71. package/js/metalstack/api/v2/project_pb.d.ts +862 -0
  72. package/js/metalstack/api/v2/project_pb.js +163 -0
  73. package/js/metalstack/api/v2/project_pb.ts +1001 -0
  74. package/js/metalstack/api/v2/size_pb.d.ts +261 -0
  75. package/js/metalstack/api/v2/size_pb.js +94 -0
  76. package/js/metalstack/api/v2/size_pb.ts +312 -0
  77. package/js/metalstack/api/v2/switch_pb.d.ts +508 -0
  78. package/js/metalstack/api/v2/switch_pb.js +207 -0
  79. package/js/metalstack/api/v2/switch_pb.ts +653 -0
  80. package/js/metalstack/api/v2/tenant_pb.d.ts +864 -0
  81. package/js/metalstack/api/v2/tenant_pb.js +163 -0
  82. package/js/metalstack/api/v2/tenant_pb.ts +1004 -0
  83. package/js/metalstack/api/v2/token_pb.d.ts +540 -0
  84. package/js/metalstack/api/v2/token_pb.js +118 -0
  85. package/js/metalstack/api/v2/token_pb.ts +621 -0
  86. package/js/metalstack/api/v2/user_pb.d.ts +108 -0
  87. package/js/metalstack/api/v2/user_pb.js +34 -0
  88. package/js/metalstack/api/v2/user_pb.ts +139 -0
  89. package/js/metalstack/api/v2/version_pb.d.ts +88 -0
  90. package/js/metalstack/api/v2/version_pb.js +30 -0
  91. package/js/metalstack/api/v2/version_pb.ts +112 -0
  92. package/js/metalstack/api/v2/vpn_pb.ts +72 -0
  93. package/js/metalstack/infra/v2/bmc_pb.d.ts +45 -0
  94. package/js/metalstack/infra/v2/bmc_pb.js +25 -0
  95. package/js/metalstack/infra/v2/bmc_pb.ts +104 -0
  96. package/js/metalstack/infra/v2/event_pb.d.ts +181 -0
  97. package/js/metalstack/infra/v2/event_pb.js +116 -0
  98. package/js/metalstack/infra/v2/event_pb.ts +218 -0
  99. package/js/metalstack/infra/v2/switch_pb.d.ts +223 -0
  100. package/js/metalstack/infra/v2/switch_pb.js +54 -0
  101. package/js/metalstack/infra/v2/switch_pb.ts +228 -0
  102. package/js/tsconfig.json +70 -0
  103. package/package.json +21 -0
@@ -0,0 +1,653 @@
1
+ // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
2
+ // @generated from file metalstack/api/v2/switch.proto (package metalstack.api.v2, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
8
+ import type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
9
+ import { file_google_protobuf_duration, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
10
+ import type { Meta } from "./common_pb";
11
+ import { file_metalstack_api_v2_common } from "./common_pb";
12
+ import { file_metalstack_api_v2_predefined_rules } from "./predefined_rules_pb";
13
+ import type { Message } from "@bufbuild/protobuf";
14
+
15
+ /**
16
+ * Describes the file metalstack/api/v2/switch.proto.
17
+ */
18
+ export const file_metalstack_api_v2_switch: GenFile = /*@__PURE__*/
19
+ fileDesc("Ch5tZXRhbHN0YWNrL2FwaS92Mi9zd2l0Y2gucHJvdG8SEW1ldGFsc3RhY2suYXBpLnYyIpkFCgZTd2l0Y2gSGQoCaWQYASABKAlCDbpICnIIwLOusQIBaAESJQoEbWV0YRgCIAEoCzIXLm1ldGFsc3RhY2suYXBpLnYyLk1ldGESIAoLZGVzY3JpcHRpb24YAyABKAlCC7pICHIGyLOusQIBEh4KBHJhY2sYBCABKAlCC7pICHIGwLOusQIBSACIAQESHgoJcGFydGl0aW9uGAUgASgJQgu6SAhyBtCzrrECARJECgxyZXB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Q0VfTU9ERV9SRVBMQUNFEAEaC4KyGQdyZXBsYWNlEjQKH1NXSVRDSF9SRVBMQUNFX01PREVfT1BFUkFUSU9OQUwQAhoPgrIZC29wZXJhdGlvbmFsKoQBCg5Td2l0Y2hPU1ZlbmRvchIgChxTV0lUQ0hfT1NfVkVORE9SX1VOU1BFQ0lGSUVEEAASKQoYU1dJVENIX09TX1ZFTkRPUl9DVU1VTFVTEAEaC4KyGQdDdW11bHVzEiUKFlNXSVRDSF9PU19WRU5ET1JfU09OSUMQAhoJgrIZBVNPTmlDKq0BChBTd2l0Y2hQb3J0U3RhdHVzEiIKHlNXSVRDSF9QT1JUX1NUQVRVU19VTlNQRUNJRklFRBAAEiEKFVNXSVRDSF9QT1JUX1NUQVRVU19VUBABGgaCshkCdXASJQoXU1dJVENIX1BPUlRfU1RBVFVTX0RPV04QAhoIgrIZBGRvd24SKwoaU1dJVENIX1BPUlRfU1RBVFVTX1VOS05PV04QAxoLgrIZB3Vua25vd25CwQEKFWNvbS5tZXRhbHN0YWNrLmFwaS52MkILU3dpdGNoUHJvdG9QAVo1Z2l0aHViLmNvbS9tZXRhbC1zdGFjay9hcGkvZ28vbWV0YWxzdGFjay9hcGkvdjI7YXBpdjKiAgNNQViqAhFNZXRhbHN0YWNrLkFwaS5WMsoCEU1ldGFsc3RhY2tcQXBpXFYy4gIdTWV0YWxzdGFja1xBcGlcVjJcR1BCTWV0YWRhdGHqAhNNZXRhbHN0YWNrOjpBcGk6OlYyYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_duration, file_google_protobuf_timestamp, file_metalstack_api_v2_common, file_metalstack_api_v2_predefined_rules]);
20
+
21
+ /**
22
+ * Switch represents a network switch.
23
+ *
24
+ * @generated from message metalstack.api.v2.Switch
25
+ */
26
+ export type Switch = Message<"metalstack.api.v2.Switch"> & {
27
+ /**
28
+ * Id of the switch.
29
+ *
30
+ * @generated from field: string id = 1;
31
+ */
32
+ id: string;
33
+
34
+ /**
35
+ * Meta for this switch.
36
+ *
37
+ * @generated from field: metalstack.api.v2.Meta meta = 2;
38
+ */
39
+ meta?: Meta;
40
+
41
+ /**
42
+ * Description of the switch.
43
+ *
44
+ * @generated from field: string description = 3;
45
+ */
46
+ description: string;
47
+
48
+ /**
49
+ * Rack ID if the switch resides in a rack.
50
+ *
51
+ * @generated from field: optional string rack = 4;
52
+ */
53
+ rack?: string;
54
+
55
+ /**
56
+ * Partition the switch belongs to.
57
+ *
58
+ * @generated from field: string partition = 5;
59
+ */
60
+ partition: string;
61
+
62
+ /**
63
+ * ReplaceMode is used to mark a switch ready for replacement.
64
+ *
65
+ * @generated from field: metalstack.api.v2.SwitchReplaceMode replace_mode = 6;
66
+ */
67
+ replaceMode: SwitchReplaceMode;
68
+
69
+ /**
70
+ * ManagementIp is the switch's IP for management access.
71
+ *
72
+ * @generated from field: string management_ip = 7;
73
+ */
74
+ managementIp: string;
75
+
76
+ /**
77
+ * ManagementUser is the user name to use for management access.
78
+ *
79
+ * @generated from field: optional string management_user = 8;
80
+ */
81
+ managementUser?: string;
82
+
83
+ /**
84
+ * ConsoleCommand is the command for accessing the switch's console.
85
+ *
86
+ * @generated from field: optional string console_command = 9;
87
+ */
88
+ consoleCommand?: string;
89
+
90
+ /**
91
+ * Nics are the front panel ports of the switch.
92
+ *
93
+ * @generated from field: repeated metalstack.api.v2.SwitchNic nics = 10;
94
+ */
95
+ nics: SwitchNic[];
96
+
97
+ /**
98
+ * SwitchOs is the OS running on the switch.
99
+ *
100
+ * @generated from field: metalstack.api.v2.SwitchOS os = 11;
101
+ */
102
+ os?: SwitchOS;
103
+
104
+ /**
105
+ * MachineConnections map machines to the nics they are connected to.
106
+ *
107
+ * @generated from field: repeated metalstack.api.v2.MachineConnection machine_connections = 12;
108
+ */
109
+ machineConnections: MachineConnection[];
110
+
111
+ /**
112
+ * LastSync contains information about the last heartbeat of the switch.
113
+ *
114
+ * @generated from field: metalstack.api.v2.SwitchSync last_sync = 13;
115
+ */
116
+ lastSync?: SwitchSync;
117
+
118
+ /**
119
+ * LastSyncError contains information about the last unsuccessful heartbeat of the switch.
120
+ *
121
+ * @generated from field: metalstack.api.v2.SwitchSync last_sync_error = 14;
122
+ */
123
+ lastSyncError?: SwitchSync;
124
+ };
125
+
126
+ /**
127
+ * Describes the message metalstack.api.v2.Switch.
128
+ * Use `create(SwitchSchema)` to create a new message.
129
+ */
130
+ export const SwitchSchema: GenMessage<Switch> = /*@__PURE__*/
131
+ messageDesc(file_metalstack_api_v2_switch, 0);
132
+
133
+ /**
134
+ * SwitchOS holds information about the NOS and versions running on the switch.
135
+ *
136
+ * @generated from message metalstack.api.v2.SwitchOS
137
+ */
138
+ export type SwitchOS = Message<"metalstack.api.v2.SwitchOS"> & {
139
+ /**
140
+ * Vendor identifies what NOS distribution is running on the switch, e.g. SONiC.
141
+ *
142
+ * @generated from field: metalstack.api.v2.SwitchOSVendor vendor = 1;
143
+ */
144
+ vendor: SwitchOSVendor;
145
+
146
+ /**
147
+ * Version specifies what NOS version is currently installed on the switch.
148
+ *
149
+ * @generated from field: string version = 2;
150
+ */
151
+ version: string;
152
+
153
+ /**
154
+ * MetalCoreVersion is the currently running version of the metal-core.
155
+ *
156
+ * @generated from field: string metal_core_version = 3;
157
+ */
158
+ metalCoreVersion: string;
159
+ };
160
+
161
+ /**
162
+ * Describes the message metalstack.api.v2.SwitchOS.
163
+ * Use `create(SwitchOSSchema)` to create a new message.
164
+ */
165
+ export const SwitchOSSchema: GenMessage<SwitchOS> = /*@__PURE__*/
166
+ messageDesc(file_metalstack_api_v2_switch, 1);
167
+
168
+ /**
169
+ * SwitchNic represents a front panel port and its configuration.
170
+ *
171
+ * @generated from message metalstack.api.v2.SwitchNic
172
+ */
173
+ export type SwitchNic = Message<"metalstack.api.v2.SwitchNic"> & {
174
+ /**
175
+ * Name of the switch port
176
+ *
177
+ * @generated from field: string name = 1;
178
+ */
179
+ name: string;
180
+
181
+ /**
182
+ * Identifier of the port
183
+ *
184
+ * @generated from field: string identifier = 2;
185
+ */
186
+ identifier: string;
187
+
188
+ /**
189
+ * MAC address of the port
190
+ *
191
+ * @generated from field: string mac = 3;
192
+ */
193
+ mac: string;
194
+
195
+ /**
196
+ * VRF name if the port is bound in one
197
+ *
198
+ * @generated from field: optional string vrf = 4;
199
+ */
200
+ vrf?: string;
201
+
202
+ /**
203
+ * NicState describes the current state of the switch port.
204
+ *
205
+ * @generated from field: optional metalstack.api.v2.NicState state = 5;
206
+ */
207
+ state?: NicState;
208
+
209
+ /**
210
+ * BGPFilter optionally configured on a port.
211
+ *
212
+ * @generated from field: optional metalstack.api.v2.BGPFilter bgp_filter = 6;
213
+ */
214
+ bgpFilter?: BGPFilter;
215
+
216
+ /**
217
+ * BGPPortState represents the current BGP status of the port.
218
+ *
219
+ * @generated from field: optional metalstack.api.v2.SwitchBGPPortState bgp_port_state = 7;
220
+ */
221
+ bgpPortState?: SwitchBGPPortState;
222
+ };
223
+
224
+ /**
225
+ * Describes the message metalstack.api.v2.SwitchNic.
226
+ * Use `create(SwitchNicSchema)` to create a new message.
227
+ */
228
+ export const SwitchNicSchema: GenMessage<SwitchNic> = /*@__PURE__*/
229
+ messageDesc(file_metalstack_api_v2_switch, 2);
230
+
231
+ /**
232
+ * BGPFilter can be used to restrict BGP based on CIDRs and VNIs.
233
+ *
234
+ * @generated from message metalstack.api.v2.BGPFilter
235
+ */
236
+ export type BGPFilter = Message<"metalstack.api.v2.BGPFilter"> & {
237
+ /**
238
+ * CIDRs for which to allow BGP
239
+ *
240
+ * @generated from field: repeated string cidrs = 1;
241
+ */
242
+ cidrs: string[];
243
+
244
+ /**
245
+ * VNIs for which to allow BGP
246
+ *
247
+ * @generated from field: repeated string vnis = 2;
248
+ */
249
+ vnis: string[];
250
+ };
251
+
252
+ /**
253
+ * Describes the message metalstack.api.v2.BGPFilter.
254
+ * Use `create(BGPFilterSchema)` to create a new message.
255
+ */
256
+ export const BGPFilterSchema: GenMessage<BGPFilter> = /*@__PURE__*/
257
+ messageDesc(file_metalstack_api_v2_switch, 3);
258
+
259
+ /**
260
+ * SwitchBGPPortState holds information about the BGP state of a port.
261
+ *
262
+ * @generated from message metalstack.api.v2.SwitchBGPPortState
263
+ */
264
+ export type SwitchBGPPortState = Message<"metalstack.api.v2.SwitchBGPPortState"> & {
265
+ /**
266
+ * Neighbor of this port.
267
+ *
268
+ * @generated from field: string neighbor = 1;
269
+ */
270
+ neighbor: string;
271
+
272
+ /**
273
+ * PeerGroup of this port.
274
+ *
275
+ * @generated from field: string peer_group = 2;
276
+ */
277
+ peerGroup: string;
278
+
279
+ /**
280
+ * VrfName of the VRF this port is bound to.
281
+ *
282
+ * @generated from field: string vrf_name = 3;
283
+ */
284
+ vrfName: string;
285
+
286
+ /**
287
+ * BgpState of the connection on this port.
288
+ *
289
+ * @generated from field: metalstack.api.v2.BGPState bgp_state = 4;
290
+ */
291
+ bgpState: BGPState;
292
+
293
+ /**
294
+ * BgpTimerUpEstablished reports when this port's BGP connection was established.
295
+ *
296
+ * @generated from field: google.protobuf.Timestamp bgp_timer_up_established = 5;
297
+ */
298
+ bgpTimerUpEstablished?: Timestamp;
299
+
300
+ /**
301
+ * SentPrefixCounter counts the prefixes sent by the switch on this port.
302
+ *
303
+ * @generated from field: uint64 sent_prefix_counter = 6;
304
+ */
305
+ sentPrefixCounter: bigint;
306
+
307
+ /**
308
+ * AcceptedPrefixCounter counts the prefixes received on this port.
309
+ *
310
+ * @generated from field: uint64 accepted_prefix_counter = 7;
311
+ */
312
+ acceptedPrefixCounter: bigint;
313
+ };
314
+
315
+ /**
316
+ * Describes the message metalstack.api.v2.SwitchBGPPortState.
317
+ * Use `create(SwitchBGPPortStateSchema)` to create a new message.
318
+ */
319
+ export const SwitchBGPPortStateSchema: GenMessage<SwitchBGPPortState> = /*@__PURE__*/
320
+ messageDesc(file_metalstack_api_v2_switch, 4);
321
+
322
+ /**
323
+ * NicState represents the current state of a switch port.
324
+ *
325
+ * @generated from message metalstack.api.v2.NicState
326
+ */
327
+ export type NicState = Message<"metalstack.api.v2.NicState"> & {
328
+ /**
329
+ * Desired is the desired port state.
330
+ *
331
+ * @generated from field: optional metalstack.api.v2.SwitchPortStatus desired = 1;
332
+ */
333
+ desired?: SwitchPortStatus;
334
+
335
+ /**
336
+ * Actual is the actual port state.
337
+ *
338
+ * @generated from field: metalstack.api.v2.SwitchPortStatus actual = 2;
339
+ */
340
+ actual: SwitchPortStatus;
341
+ };
342
+
343
+ /**
344
+ * Describes the message metalstack.api.v2.NicState.
345
+ * Use `create(NicStateSchema)` to create a new message.
346
+ */
347
+ export const NicStateSchema: GenMessage<NicState> = /*@__PURE__*/
348
+ messageDesc(file_metalstack_api_v2_switch, 5);
349
+
350
+ /**
351
+ * MachineConnection associates a machine with the corresponding switch nic.
352
+ *
353
+ * @generated from message metalstack.api.v2.MachineConnection
354
+ */
355
+ export type MachineConnection = Message<"metalstack.api.v2.MachineConnection"> & {
356
+ /**
357
+ * MachineId of the machine connected to the nic.
358
+ *
359
+ * @generated from field: string machine_id = 1;
360
+ */
361
+ machineId: string;
362
+
363
+ /**
364
+ * Nic the machine is connected to.
365
+ *
366
+ * @generated from field: metalstack.api.v2.SwitchNic nic = 2;
367
+ */
368
+ nic?: SwitchNic;
369
+ };
370
+
371
+ /**
372
+ * Describes the message metalstack.api.v2.MachineConnection.
373
+ * Use `create(MachineConnectionSchema)` to create a new message.
374
+ */
375
+ export const MachineConnectionSchema: GenMessage<MachineConnection> = /*@__PURE__*/
376
+ messageDesc(file_metalstack_api_v2_switch, 6);
377
+
378
+ /**
379
+ * SwitchQuery can be used to query a switch or a list of switches.
380
+ *
381
+ * @generated from message metalstack.api.v2.SwitchQuery
382
+ */
383
+ export type SwitchQuery = Message<"metalstack.api.v2.SwitchQuery"> & {
384
+ /**
385
+ * Id of the switch to list.
386
+ *
387
+ * @generated from field: optional string id = 1;
388
+ */
389
+ id?: string;
390
+
391
+ /**
392
+ * Partition of the switches to list.
393
+ *
394
+ * @generated from field: optional string partition = 2;
395
+ */
396
+ partition?: string;
397
+
398
+ /**
399
+ * Rack of the switches to list.
400
+ *
401
+ * @generated from field: optional string rack = 3;
402
+ */
403
+ rack?: string;
404
+
405
+ /**
406
+ * Switch OS specific queries.
407
+ *
408
+ * @generated from field: optional metalstack.api.v2.SwitchOSQuery os = 4;
409
+ */
410
+ os?: SwitchOSQuery;
411
+ };
412
+
413
+ /**
414
+ * Describes the message metalstack.api.v2.SwitchQuery.
415
+ * Use `create(SwitchQuerySchema)` to create a new message.
416
+ */
417
+ export const SwitchQuerySchema: GenMessage<SwitchQuery> = /*@__PURE__*/
418
+ messageDesc(file_metalstack_api_v2_switch, 7);
419
+
420
+ /**
421
+ * SwitchOSQuery holds OS specific query parameters.
422
+ *
423
+ * @generated from message metalstack.api.v2.SwitchOSQuery
424
+ */
425
+ export type SwitchOSQuery = Message<"metalstack.api.v2.SwitchOSQuery"> & {
426
+ /**
427
+ * OsVendor of the switch OS by which to filter the switches.
428
+ *
429
+ * @generated from field: optional metalstack.api.v2.SwitchOSVendor vendor = 1;
430
+ */
431
+ vendor?: SwitchOSVendor;
432
+
433
+ /**
434
+ * OsVersion of the OS by which to filter the switches.
435
+ *
436
+ * @generated from field: optional string version = 2;
437
+ */
438
+ version?: string;
439
+ };
440
+
441
+ /**
442
+ * Describes the message metalstack.api.v2.SwitchOSQuery.
443
+ * Use `create(SwitchOSQuerySchema)` to create a new message.
444
+ */
445
+ export const SwitchOSQuerySchema: GenMessage<SwitchOSQuery> = /*@__PURE__*/
446
+ messageDesc(file_metalstack_api_v2_switch, 8);
447
+
448
+ /**
449
+ * SwitchSync summarizes information about a switch sync.
450
+ *
451
+ * @generated from message metalstack.api.v2.SwitchSync
452
+ */
453
+ export type SwitchSync = Message<"metalstack.api.v2.SwitchSync"> & {
454
+ /**
455
+ * Time of the sync.
456
+ *
457
+ * @generated from field: google.protobuf.Timestamp time = 1;
458
+ */
459
+ time?: Timestamp;
460
+
461
+ /**
462
+ * Duration of the sync.
463
+ *
464
+ * @generated from field: google.protobuf.Duration duration = 2;
465
+ */
466
+ duration?: Duration;
467
+
468
+ /**
469
+ * Error if any occurred.
470
+ *
471
+ * @generated from field: optional string error = 3;
472
+ */
473
+ error?: string;
474
+ };
475
+
476
+ /**
477
+ * Describes the message metalstack.api.v2.SwitchSync.
478
+ * Use `create(SwitchSyncSchema)` to create a new message.
479
+ */
480
+ export const SwitchSyncSchema: GenMessage<SwitchSync> = /*@__PURE__*/
481
+ messageDesc(file_metalstack_api_v2_switch, 9);
482
+
483
+ /**
484
+ * BGPState represents the state of a BGP session.
485
+ *
486
+ * @generated from enum metalstack.api.v2.BGPState
487
+ */
488
+ export enum BGPState {
489
+ /**
490
+ * BGP_STATE_UNSPECIFIED is not specified.
491
+ *
492
+ * @generated from enum value: BGP_STATE_UNSPECIFIED = 0;
493
+ */
494
+ BGP_STATE_UNSPECIFIED = 0,
495
+
496
+ /**
497
+ * BGP_STATE_IDLE is the Idle state of a BGP session.
498
+ *
499
+ * @generated from enum value: BGP_STATE_IDLE = 1;
500
+ */
501
+ BGP_STATE_IDLE = 1,
502
+
503
+ /**
504
+ * BGP_STATE_CONNECT is the Connect state of a BGP session.
505
+ *
506
+ * @generated from enum value: BGP_STATE_CONNECT = 2;
507
+ */
508
+ BGP_STATE_CONNECT = 2,
509
+
510
+ /**
511
+ * BGP_STATE_ACTIVE is the Active state of a BGP session.
512
+ *
513
+ * @generated from enum value: BGP_STATE_ACTIVE = 3;
514
+ */
515
+ BGP_STATE_ACTIVE = 3,
516
+
517
+ /**
518
+ * BGP_STATE_OPEN_SENT is the OpenSent state of a BGP session.
519
+ *
520
+ * @generated from enum value: BGP_STATE_OPEN_SENT = 4;
521
+ */
522
+ BGP_STATE_OPEN_SENT = 4,
523
+
524
+ /**
525
+ * BGP_STATE_OPEN_CONFIRM is the OpenConfirm state of a BGP session.
526
+ *
527
+ * @generated from enum value: BGP_STATE_OPEN_CONFIRM = 5;
528
+ */
529
+ BGP_STATE_OPEN_CONFIRM = 5,
530
+
531
+ /**
532
+ * BGP_STATE_ESTABLISHED is the Established state of a BGP session.
533
+ *
534
+ * @generated from enum value: BGP_STATE_ESTABLISHED = 6;
535
+ */
536
+ BGP_STATE_ESTABLISHED = 6,
537
+ }
538
+
539
+ /**
540
+ * Describes the enum metalstack.api.v2.BGPState.
541
+ */
542
+ export const BGPStateSchema: GenEnum<BGPState> = /*@__PURE__*/
543
+ enumDesc(file_metalstack_api_v2_switch, 0);
544
+
545
+ /**
546
+ * SwitchReplaceMode is used to mark a switch ready for replacement.
547
+ *
548
+ * @generated from enum metalstack.api.v2.SwitchReplaceMode
549
+ */
550
+ export enum SwitchReplaceMode {
551
+ /**
552
+ * SWITCH_REPLACE_MODE_UNSPECIFIED is not specified.
553
+ *
554
+ * @generated from enum value: SWITCH_REPLACE_MODE_UNSPECIFIED = 0;
555
+ */
556
+ UNSPECIFIED = 0,
557
+
558
+ /**
559
+ * SWITCH_REPLACE_MODE_REPLACE means this switch is waiting to be replaced.
560
+ *
561
+ * @generated from enum value: SWITCH_REPLACE_MODE_REPLACE = 1;
562
+ */
563
+ REPLACE = 1,
564
+
565
+ /**
566
+ * SWITCH_REPLACE_MODE_OPERATIONAL means this switch is operational and cannot be replaced.
567
+ *
568
+ * @generated from enum value: SWITCH_REPLACE_MODE_OPERATIONAL = 2;
569
+ */
570
+ OPERATIONAL = 2,
571
+ }
572
+
573
+ /**
574
+ * Describes the enum metalstack.api.v2.SwitchReplaceMode.
575
+ */
576
+ export const SwitchReplaceModeSchema: GenEnum<SwitchReplaceMode> = /*@__PURE__*/
577
+ enumDesc(file_metalstack_api_v2_switch, 1);
578
+
579
+ /**
580
+ * SwitchOSVendor represents a NOS distribution.
581
+ *
582
+ * @generated from enum metalstack.api.v2.SwitchOSVendor
583
+ */
584
+ export enum SwitchOSVendor {
585
+ /**
586
+ * SWITCH_OS_VENDOR_UNSPECIFIED is not specified.
587
+ *
588
+ * @generated from enum value: SWITCH_OS_VENDOR_UNSPECIFIED = 0;
589
+ */
590
+ SWITCH_OS_VENDOR_UNSPECIFIED = 0,
591
+
592
+ /**
593
+ * SWITCH_OS_VENDOR_CUMULUS means this switch is running on Cumulus Linux.
594
+ *
595
+ * @generated from enum value: SWITCH_OS_VENDOR_CUMULUS = 1;
596
+ */
597
+ SWITCH_OS_VENDOR_CUMULUS = 1,
598
+
599
+ /**
600
+ * SWITCH_OS_VENDOR_SONIC means this switch is running on SONiC NOS.
601
+ *
602
+ * @generated from enum value: SWITCH_OS_VENDOR_SONIC = 2;
603
+ */
604
+ SWITCH_OS_VENDOR_SONIC = 2,
605
+ }
606
+
607
+ /**
608
+ * Describes the enum metalstack.api.v2.SwitchOSVendor.
609
+ */
610
+ export const SwitchOSVendorSchema: GenEnum<SwitchOSVendor> = /*@__PURE__*/
611
+ enumDesc(file_metalstack_api_v2_switch, 2);
612
+
613
+ /**
614
+ * SwitchPortStatus specifies the state of a switch port.
615
+ *
616
+ * @generated from enum metalstack.api.v2.SwitchPortStatus
617
+ */
618
+ export enum SwitchPortStatus {
619
+ /**
620
+ * SWITCH_PORT_STATUS_UNSPECIFIED is not specified.
621
+ *
622
+ * @generated from enum value: SWITCH_PORT_STATUS_UNSPECIFIED = 0;
623
+ */
624
+ UNSPECIFIED = 0,
625
+
626
+ /**
627
+ * SWITCH_PORT_STATUS_UP means this port is up.
628
+ *
629
+ * @generated from enum value: SWITCH_PORT_STATUS_UP = 1;
630
+ */
631
+ UP = 1,
632
+
633
+ /**
634
+ * SWITCH_PORT_STATUS_DOWN means this port is down.
635
+ *
636
+ * @generated from enum value: SWITCH_PORT_STATUS_DOWN = 2;
637
+ */
638
+ DOWN = 2,
639
+
640
+ /**
641
+ * SWITCH_PORT_STATUS_UNKNOWN means the status of this port is unknown.
642
+ *
643
+ * @generated from enum value: SWITCH_PORT_STATUS_UNKNOWN = 3;
644
+ */
645
+ UNKNOWN = 3,
646
+ }
647
+
648
+ /**
649
+ * Describes the enum metalstack.api.v2.SwitchPortStatus.
650
+ */
651
+ export const SwitchPortStatusSchema: GenEnum<SwitchPortStatus> = /*@__PURE__*/
652
+ enumDesc(file_metalstack_api_v2_switch, 3);
653
+