Skip to content

Commit 1880229

Browse files
committed
Update wicketd-client
1 parent 10b4482 commit 1880229

File tree

2 files changed

+171
-1
lines changed

2 files changed

+171
-1
lines changed

openapi/wicketd.json

Lines changed: 167 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,34 @@
185185
}
186186
]
187187
},
188+
"ImageVersion": {
189+
"type": "object",
190+
"properties": {
191+
"epoch": {
192+
"type": "integer",
193+
"format": "uint32",
194+
"minimum": 0
195+
},
196+
"version": {
197+
"type": "integer",
198+
"format": "uint32",
199+
"minimum": 0
200+
}
201+
},
202+
"required": [
203+
"epoch",
204+
"version"
205+
]
206+
},
207+
"PowerState": {
208+
"description": "See RFD 81.\n\nThis enum only lists power states the SP is able to control; higher power states are controlled by ignition.",
209+
"type": "string",
210+
"enum": [
211+
"A0",
212+
"A1",
213+
"A2"
214+
]
215+
},
188216
"RackV1Inventory": {
189217
"description": "The current state of the v1 Rack as known to wicketd",
190218
"type": "object",
@@ -200,6 +228,109 @@
200228
"sps"
201229
]
202230
},
231+
"RotImageDetails": {
232+
"type": "object",
233+
"properties": {
234+
"digest": {
235+
"type": "string"
236+
},
237+
"version": {
238+
"$ref": "#/components/schemas/ImageVersion"
239+
}
240+
},
241+
"required": [
242+
"digest",
243+
"version"
244+
]
245+
},
246+
"RotSlot": {
247+
"oneOf": [
248+
{
249+
"type": "object",
250+
"properties": {
251+
"slot": {
252+
"type": "string",
253+
"enum": [
254+
"a"
255+
]
256+
}
257+
},
258+
"required": [
259+
"slot"
260+
]
261+
},
262+
{
263+
"type": "object",
264+
"properties": {
265+
"slot": {
266+
"type": "string",
267+
"enum": [
268+
"b"
269+
]
270+
}
271+
},
272+
"required": [
273+
"slot"
274+
]
275+
}
276+
]
277+
},
278+
"RotState": {
279+
"oneOf": [
280+
{
281+
"type": "object",
282+
"properties": {
283+
"active": {
284+
"$ref": "#/components/schemas/RotSlot"
285+
},
286+
"slot_a": {
287+
"nullable": true,
288+
"allOf": [
289+
{
290+
"$ref": "#/components/schemas/RotImageDetails"
291+
}
292+
]
293+
},
294+
"slot_b": {
295+
"nullable": true,
296+
"allOf": [
297+
{
298+
"$ref": "#/components/schemas/RotImageDetails"
299+
}
300+
]
301+
},
302+
"state": {
303+
"type": "string",
304+
"enum": [
305+
"enabled"
306+
]
307+
}
308+
},
309+
"required": [
310+
"active",
311+
"state"
312+
]
313+
},
314+
{
315+
"type": "object",
316+
"properties": {
317+
"message": {
318+
"type": "string"
319+
},
320+
"state": {
321+
"type": "string",
322+
"enum": [
323+
"communication_failed"
324+
]
325+
}
326+
},
327+
"required": [
328+
"message",
329+
"state"
330+
]
331+
}
332+
]
333+
},
203334
"SpComponentInfo": {
204335
"description": "Overview of a single SP component.",
205336
"type": "object",
@@ -490,6 +621,31 @@
490621
{
491622
"type": "object",
492623
"properties": {
624+
"base_mac_address": {
625+
"type": "array",
626+
"items": {
627+
"type": "integer",
628+
"format": "uint8",
629+
"minimum": 0
630+
}
631+
},
632+
"hubris_archive_id": {
633+
"type": "string"
634+
},
635+
"model": {
636+
"type": "string"
637+
},
638+
"power_state": {
639+
"$ref": "#/components/schemas/PowerState"
640+
},
641+
"revision": {
642+
"type": "integer",
643+
"format": "uint32",
644+
"minimum": 0
645+
},
646+
"rot": {
647+
"$ref": "#/components/schemas/RotState"
648+
},
493649
"serial_number": {
494650
"type": "string"
495651
},
@@ -498,11 +654,21 @@
498654
"enum": [
499655
"enabled"
500656
]
657+
},
658+
"version": {
659+
"$ref": "#/components/schemas/ImageVersion"
501660
}
502661
},
503662
"required": [
663+
"base_mac_address",
664+
"hubris_archive_id",
665+
"model",
666+
"power_state",
667+
"revision",
668+
"rot",
504669
"serial_number",
505-
"state"
670+
"state",
671+
"version"
506672
]
507673
},
508674
{

wicketd-client/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ progenitor::generate_api!(
3131
SpIgnitionSystemType= { derives = [ PartialEq, Eq, PartialOrd, Ord] },
3232
SpInventory = { derives = [ PartialEq, Eq, PartialOrd, Ord] },
3333
RackV1Inventory = { derives = [ PartialEq, Eq, PartialOrd, Ord] },
34+
RotState = { derives = [ PartialEq, Eq, PartialOrd, Ord] },
35+
RotImageDetails = { derives = [ PartialEq, Eq, PartialOrd, Ord] },
36+
RotSlot = { derives = [ PartialEq, Eq, PartialOrd, Ord] },
37+
ImageVersion = { derives = [ PartialEq, Eq, PartialOrd, Ord] },
3438
}
3539
);
3640

0 commit comments

Comments
 (0)