#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MigrationStage {
Prepare,
StopSourceContainers,
ImportImages,
ImportVolumes,
RecreateNetworks,
RecreateContainers,
Cleanup,
Complete,
}
impl MigrationStage {
#[must_use]
pub const fn as_str(self) -> &'static str {
match self {
Self::Prepare => "prepare",
Self::StopSourceContainers => "stop-source-containers",
Self::ImportImages => "import-images",
Self::ImportVolumes => "import-volumes",
Self::RecreateNetworks => "recreate-networks",
Self::RecreateContainers => "recreate-containers",
Self::Cleanup => "cleanup",
Self::Complete => "complete",
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MigrationProgress {
pub stage: MigrationStage,
pub detail: String,
pub resource_type: Option<String>,
pub resource_name: Option<String>,
pub current: Option<u32>,
pub total: Option<u32>,
}