Add data mover related options in CLI

Add data mover related options in CLI

Fixes #6128

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
Wenkai Yin(尹文开)
2023-06-07 16:34:40 +08:00
parent ad8f69bcb1
commit 9f2f563568
5 changed files with 40 additions and 1 deletions
+7
View File
@@ -206,6 +206,13 @@ func DescribeBackupSpec(d *Describer, spec velerov1api.BackupSpec) {
d.Println()
d.Printf("Velero-Native Snapshot PVs:\t%s\n", BoolPointerString(spec.SnapshotVolumes, "false", "true", "auto"))
d.Printf("Snapshot Move Data:\t%s\n", BoolPointerString(spec.SnapshotMoveData, "false", "true", "auto"))
if len(spec.DataMover) == 0 {
s = emptyDisplay
} else {
s = spec.DataMover
}
d.Printf("Data Mover:\t%s\n", s)
d.Println()
d.Printf("TTL:\t%s\n", spec.TTL.Duration)
@@ -137,6 +137,15 @@ func DescribeBackupSpecInSF(d *StructuredDescriber, spec velerov1api.BackupSpec)
// describe snapshot volumes
backupSpecInfo["veleroNativeSnapshotPVs"] = BoolPointerString(spec.SnapshotVolumes, "false", "true", "auto")
// describe snapshot move data
backupSpecInfo["veleroSnapshotMoveData"] = BoolPointerString(spec.SnapshotMoveData, "false", "true", "auto")
// describe data mover
if len(spec.DataMover) == 0 {
s = emptyDisplay
} else {
s = spec.DataMover
}
backupSpecInfo["dataMover"] = s
// describe TTL
backupSpecInfo["TTL"] = spec.TTL.Duration.String()