Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,12 @@ pub enum AffinityGroupMember {
///
/// Instances can belong to up to 16 affinity groups.
// See: INSTANCE_MAX_AFFINITY_GROUPS
Instance { id: InstanceUuid, name: Name, run_state: InstanceState },
Instance {
#[schemars(with = "Uuid")]
id: InstanceUuid,
name: Name,
run_state: InstanceState,
},
}

impl SimpleIdentityOrName for AffinityGroupMember {
Expand Down Expand Up @@ -1332,7 +1337,12 @@ pub enum AntiAffinityGroupMember {
///
/// Instances can belong to up to 16 anti-affinity groups.
// See: INSTANCE_MAX_ANTI_AFFINITY_GROUPS
Instance { id: InstanceUuid, name: Name, run_state: InstanceState },
Instance {
#[schemars(with = "Uuid")]
id: InstanceUuid,
name: Name,
run_state: InstanceState,
},
}

impl SimpleIdentityOrName for AntiAffinityGroupMember {
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/omdb/src/bin/omdb/nexus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4072,7 +4072,7 @@ async fn cmd_nexus_support_bundles_list(
user_comment: String,
}
let rows = support_bundles.into_iter().map(|sb| SupportBundleInfo {
id: *sb.id,
id: sb.id,
time_created: sb.time_created,
reason_for_creation: sb.reason_for_creation,
reason_for_failure: sb
Expand Down
1 change: 1 addition & 0 deletions nexus/types/src/external_api/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ pub enum SupportBundleState {

#[derive(Debug, Clone, JsonSchema, Serialize, Deserialize)]
pub struct SupportBundleInfo {
#[schemars(with = "Uuid")]
pub id: SupportBundleUuid,
pub time_created: DateTime<Utc>,
pub reason_for_creation: String,
Expand Down
2 changes: 2 additions & 0 deletions nexus/types/src/external_api/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,12 +1308,14 @@ pub struct AlertDelivery {
pub id: Uuid,

/// The UUID of the alert receiver that this event was delivered to.
#[schemars(with = "Uuid")]
pub receiver_id: AlertReceiverUuid,

/// The event class.
pub alert_class: String,

/// The UUID of the event.
#[schemars(with = "Uuid")]
pub alert_id: AlertUuid,

/// The state of this delivery.
Expand Down
7 changes: 2 additions & 5 deletions openapi/nexus-internal.json
Original file line number Diff line number Diff line change
Expand Up @@ -8573,7 +8573,8 @@
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/TypedUuidForSupportBundleKind"
"type": "string",
"format": "uuid"
},
"reason_for_creation": {
"type": "string"
Expand Down Expand Up @@ -8843,10 +8844,6 @@
"type": "string",
"format": "uuid"
},
"TypedUuidForSupportBundleKind": {
"type": "string",
"format": "uuid"
},
"TypedUuidForUpstairsRepairKind": {
"type": "string",
"format": "uuid"
Expand Down
39 changes: 10 additions & 29 deletions openapi/nexus.json
Original file line number Diff line number Diff line change
Expand Up @@ -13826,7 +13826,8 @@
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/TypedUuidForInstanceKind"
"type": "string",
"format": "uuid"
},
"name": {
"$ref": "#/components/schemas/Name"
Expand Down Expand Up @@ -13993,11 +13994,8 @@
},
"alert_id": {
"description": "The UUID of the event.",
"allOf": [
{
"$ref": "#/components/schemas/TypedUuidForAlertKind"
}
]
"type": "string",
"format": "uuid"
},
"attempts": {
"description": "Individual attempts to deliver this webhook event, and their outcomes.",
Expand All @@ -14014,11 +14012,8 @@
},
"receiver_id": {
"description": "The UUID of the alert receiver that this event was delivered to.",
"allOf": [
{
"$ref": "#/components/schemas/TypedUuidForAlertReceiverKind"
}
]
"type": "string",
"format": "uuid"
},
"state": {
"description": "The state of this delivery.",
Expand Down Expand Up @@ -14514,7 +14509,8 @@
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/TypedUuidForInstanceKind"
"type": "string",
"format": "uuid"
},
"name": {
"$ref": "#/components/schemas/Name"
Expand Down Expand Up @@ -24585,7 +24581,8 @@
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/TypedUuidForSupportBundleKind"
"type": "string",
"format": "uuid"
},
"reason_for_creation": {
"type": "string"
Expand Down Expand Up @@ -25995,22 +25992,6 @@
}
}
},
"TypedUuidForAlertKind": {
"type": "string",
"format": "uuid"
},
"TypedUuidForAlertReceiverKind": {
"type": "string",
"format": "uuid"
},
"TypedUuidForInstanceKind": {
"type": "string",
"format": "uuid"
},
"TypedUuidForSupportBundleKind": {
"type": "string",
"format": "uuid"
},
"UninitializedSled": {
"description": "A sled that has not been added to an initialized rack yet",
"type": "object",
Expand Down
Loading