Migrate re-issuance of ROAs and Child Certificates as part of pre 0.9.0 Publish Commands. (#501)

This commit is contained in:
Tim Bruijnzeels
2021-05-12 11:26:23 +02:00
parent 9e62ca6861
commit d9c170e51d
3 changed files with 7 additions and 9 deletions
+5 -7
View File
@@ -460,8 +460,7 @@ pub enum StorableCaCommand {
RoaDefinitionUpdates {
updates: RoaDefinitionUpdates,
},
AutomaticRoaRenewal,
Republish,
ReissueBeforeExpiring,
RepoUpdate {
service_uri: ServiceUri,
},
@@ -550,12 +549,12 @@ impl WithStorableDetails for StorableCaCommand {
StorableCaCommand::RoaDefinitionUpdates { updates } => CommandSummary::new("cmd-ca-roas-updated", &self)
.with_added(updates.added().len())
.with_removed(updates.removed().len()),
StorableCaCommand::AutomaticRoaRenewal => CommandSummary::new("cmd-ca-roas-renewed", &self),
StorableCaCommand::Republish => CommandSummary::new("cmd-ca-publish", &self),
StorableCaCommand::RepoUpdate { service_uri } => {
CommandSummary::new("cmd-ca-repo-update", &self).with_service_uri(service_uri)
}
StorableCaCommand::ReissueBeforeExpiring => CommandSummary::new("cmd-ca-reissue-before-expiring", &self),
// RTA
StorableCaCommand::RtaPrepare { name } => {
CommandSummary::new("cmd-ca-rta-prepare", &self).with_rta_name(name)
@@ -683,14 +682,13 @@ impl fmt::Display for StorableCaCommand {
}
Ok(())
}
StorableCaCommand::AutomaticRoaRenewal => {
write!(f, "Automatically re-issue ROAs before they would expire")
StorableCaCommand::ReissueBeforeExpiring => {
write!(f, "Automatically re-issue objects before they would expire")
}
// ------------------------------------------------------------
// Publishing
// ------------------------------------------------------------
StorableCaCommand::Republish => write!(f, "Republish"),
StorableCaCommand::RepoUpdate { service_uri } => write!(f, "Update repo to server at: {}", service_uri),
// ------------------------------------------------------------
+1 -1
View File
@@ -244,7 +244,7 @@ impl From<CmdDet> for StorableCaCommand {
CmdDet::RouteAuthorizationsUpdate(updates, _, _) => StorableCaCommand::RoaDefinitionUpdates {
updates: updates.into(),
},
CmdDet::RouteAuthorizationsRenew(_, _) => StorableCaCommand::AutomaticRoaRenewal,
CmdDet::RouteAuthorizationsRenew(_, _) => StorableCaCommand::ReissueBeforeExpiring,
// ------------------------------------------------------------
// Publishing
+1 -1
View File
@@ -245,7 +245,7 @@ impl From<OldStorableCaCommand> for StorableCaCommand {
StorableCaCommand::KeyRollFinish { resource_class_name }
}
OldStorableCaCommand::RoaDefinitionUpdates(updates) => StorableCaCommand::RoaDefinitionUpdates { updates },
OldStorableCaCommand::Republish => StorableCaCommand::Republish,
OldStorableCaCommand::Republish => StorableCaCommand::ReissueBeforeExpiring,
OldStorableCaCommand::RepoUpdate(_service_uri) => {
unreachable!("migrated differently getting the service uri for embedded repo")
}