@@ -44,15 +44,15 @@ use nexus_db_schema::schema::{
4444} ;
4545use nexus_sled_agent_shared:: inventory:: BootImageHeader ;
4646use nexus_sled_agent_shared:: inventory:: BootPartitionDetails ;
47- use nexus_sled_agent_shared:: inventory:: ClearMupdateOverrideBootSuccessInventory ;
48- use nexus_sled_agent_shared:: inventory:: ClearMupdateOverrideInventory ;
4947use nexus_sled_agent_shared:: inventory:: ConfigReconcilerInventoryStatus ;
5048use nexus_sled_agent_shared:: inventory:: HostPhase2DesiredContents ;
5149use nexus_sled_agent_shared:: inventory:: HostPhase2DesiredSlots ;
5250use nexus_sled_agent_shared:: inventory:: MupdateOverrideBootInventory ;
5351use nexus_sled_agent_shared:: inventory:: MupdateOverrideInventory ;
5452use nexus_sled_agent_shared:: inventory:: MupdateOverrideNonBootInventory ;
5553use nexus_sled_agent_shared:: inventory:: OrphanedDataset ;
54+ use nexus_sled_agent_shared:: inventory:: RemoveMupdateOverrideBootSuccessInventory ;
55+ use nexus_sled_agent_shared:: inventory:: RemoveMupdateOverrideInventory ;
5656use nexus_sled_agent_shared:: inventory:: ZoneArtifactInventory ;
5757use nexus_sled_agent_shared:: inventory:: ZoneImageResolverInventory ;
5858use nexus_sled_agent_shared:: inventory:: ZoneManifestBootInventory ;
@@ -1003,7 +1003,7 @@ pub struct InvSledConfigReconciler {
10031003 pub boot_partition_a_error : Option < String > ,
10041004 pub boot_partition_b_error : Option < String > ,
10051005 #[ diesel( embed) ]
1006- pub clear_mupdate_override : InvClearMupdateOverride ,
1006+ pub remove_mupdate_override : InvRemoveMupdateOverride ,
10071007}
10081008
10091009impl InvSledConfigReconciler {
@@ -1014,7 +1014,7 @@ impl InvSledConfigReconciler {
10141014 boot_disk : Result < M2Slot , String > ,
10151015 boot_partition_a_error : Option < String > ,
10161016 boot_partition_b_error : Option < String > ,
1017- clear_mupdate_override : InvClearMupdateOverride ,
1017+ remove_mupdate_override : InvRemoveMupdateOverride ,
10181018 ) -> Self {
10191019 // TODO-cleanup We should use `HwM2Slot` instead of integers for this
10201020 // column: https://github.com/oxidecomputer/omicron/issues/8642
@@ -1032,7 +1032,7 @@ impl InvSledConfigReconciler {
10321032 boot_disk_error,
10331033 boot_partition_a_error,
10341034 boot_partition_b_error,
1035- clear_mupdate_override ,
1035+ remove_mupdate_override ,
10361036 }
10371037 }
10381038
@@ -1072,48 +1072,50 @@ impl InvSledConfigReconciler {
10721072 }
10731073}
10741074
1075- // See [`nexus_sled_agent_shared::inventory::DbClearMupdateOverrideBootSuccess `].
1075+ // See [`nexus_sled_agent_shared::inventory::DbRemoveMupdateOverrideBootSuccess `].
10761076impl_enum_type ! (
1077- ClearMupdateOverrideBootSuccessEnum :
1077+ RemoveMupdateOverrideBootSuccessEnum :
10781078
10791079 #[ derive( Copy , Clone , Debug , AsExpression , FromSqlRow , PartialEq ) ]
1080- pub enum DbClearMupdateOverrideBootSuccess ;
1080+ pub enum DbRemoveMupdateOverrideBootSuccess ;
10811081
10821082 // Enum values
10831083 Cleared => b"cleared"
10841084 NoOverride => b"no-override"
10851085) ;
10861086
1087- impl From < ClearMupdateOverrideBootSuccessInventory >
1088- for DbClearMupdateOverrideBootSuccess
1087+ impl From < RemoveMupdateOverrideBootSuccessInventory >
1088+ for DbRemoveMupdateOverrideBootSuccess
10891089{
1090- fn from ( value : ClearMupdateOverrideBootSuccessInventory ) -> Self {
1090+ fn from ( value : RemoveMupdateOverrideBootSuccessInventory ) -> Self {
10911091 match value {
1092- ClearMupdateOverrideBootSuccessInventory :: Cleared => Self :: Cleared ,
1093- ClearMupdateOverrideBootSuccessInventory :: NoOverride => {
1092+ RemoveMupdateOverrideBootSuccessInventory :: Removed => Self :: Cleared ,
1093+ RemoveMupdateOverrideBootSuccessInventory :: NoOverride => {
10941094 Self :: NoOverride
10951095 }
10961096 }
10971097 }
10981098}
10991099
1100- impl From < DbClearMupdateOverrideBootSuccess >
1101- for ClearMupdateOverrideBootSuccessInventory
1100+ impl From < DbRemoveMupdateOverrideBootSuccess >
1101+ for RemoveMupdateOverrideBootSuccessInventory
11021102{
1103- fn from ( value : DbClearMupdateOverrideBootSuccess ) -> Self {
1103+ fn from ( value : DbRemoveMupdateOverrideBootSuccess ) -> Self {
11041104 match value {
1105- DbClearMupdateOverrideBootSuccess :: Cleared => Self :: Cleared ,
1106- DbClearMupdateOverrideBootSuccess :: NoOverride => Self :: NoOverride ,
1105+ DbRemoveMupdateOverrideBootSuccess :: Cleared => Self :: Removed ,
1106+ DbRemoveMupdateOverrideBootSuccess :: NoOverride => Self :: NoOverride ,
11071107 }
11081108 }
11091109}
11101110
1111- /// See [`nexus_sled_agent_shared::inventory::ClearMupdateOverrideInventory `].
1111+ /// See [`nexus_sled_agent_shared::inventory::RemoveMupdateOverrideInventory `].
11121112#[ derive( Queryable , Clone , Debug , Selectable , Insertable ) ]
11131113#[ diesel( table_name = inv_sled_config_reconciler) ]
1114- pub struct InvClearMupdateOverride {
1114+ pub struct InvRemoveMupdateOverride {
1115+ // NOTE: the column names start with "clear_" for legacy reasons. Prefer
1116+ // "remove" in the future.
11151117 #[ diesel( column_name = clear_mupdate_override_boot_success) ]
1116- pub boot_success : Option < DbClearMupdateOverrideBootSuccess > ,
1118+ pub boot_success : Option < DbRemoveMupdateOverrideBootSuccess > ,
11171119
11181120 #[ diesel( column_name = clear_mupdate_override_boot_error) ]
11191121 pub boot_error : Option < String > ,
@@ -1122,38 +1124,38 @@ pub struct InvClearMupdateOverride {
11221124 pub non_boot_message : Option < String > ,
11231125}
11241126
1125- impl InvClearMupdateOverride {
1127+ impl InvRemoveMupdateOverride {
11261128 pub fn new (
1127- clear_mupdate_override : Option < & ClearMupdateOverrideInventory > ,
1129+ remove_mupdate_override : Option < & RemoveMupdateOverrideInventory > ,
11281130 ) -> Self {
1129- let boot_success = clear_mupdate_override . and_then ( |inv| {
1131+ let boot_success = remove_mupdate_override . and_then ( |inv| {
11301132 inv. boot_disk_result . as_ref ( ) . ok ( ) . map ( |v| v. clone ( ) . into ( ) )
11311133 } ) ;
1132- let boot_error = clear_mupdate_override
1134+ let boot_error = remove_mupdate_override
11331135 . and_then ( |inv| inv. boot_disk_result . as_ref ( ) . err ( ) . cloned ( ) ) ;
11341136 let non_boot_message =
1135- clear_mupdate_override . map ( |inv| inv. non_boot_message . clone ( ) ) ;
1137+ remove_mupdate_override . map ( |inv| inv. non_boot_message . clone ( ) ) ;
11361138
11371139 Self { boot_success, boot_error, non_boot_message }
11381140 }
11391141
11401142 pub fn into_inventory (
11411143 self ,
1142- ) -> anyhow:: Result < Option < ClearMupdateOverrideInventory > > {
1144+ ) -> anyhow:: Result < Option < RemoveMupdateOverrideInventory > > {
11431145 match self {
11441146 Self {
11451147 boot_success : Some ( success) ,
11461148 boot_error : None ,
11471149 non_boot_message : Some ( non_boot_message) ,
1148- } => Ok ( Some ( ClearMupdateOverrideInventory {
1150+ } => Ok ( Some ( RemoveMupdateOverrideInventory {
11491151 boot_disk_result : Ok ( success. into ( ) ) ,
11501152 non_boot_message,
11511153 } ) ) ,
11521154 Self {
11531155 boot_success : None ,
11541156 boot_error : Some ( boot_error) ,
11551157 non_boot_message : Some ( non_boot_message) ,
1156- } => Ok ( Some ( ClearMupdateOverrideInventory {
1158+ } => Ok ( Some ( RemoveMupdateOverrideInventory {
11571159 boot_disk_result : Err ( boot_error) ,
11581160 non_boot_message,
11591161 } ) ) ,
0 commit comments