Tweak VolumeSnapshotContent describe output (#2534)

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
Nolan Brubaker
2020-05-12 16:58:47 -04:00
committed by GitHub
parent 2a144ec3b3
commit c1494d6804

View File

@@ -87,14 +87,16 @@ func DescribeBackup(
DescribeDeleteBackupRequests(d, deleteRequests)
}
if features.IsEnabled(velerov1api.CSIFeatureFlag) {
d.Println()
DescribeCSIVolumeSnapshots(d, details, volumeSnapshotContents)
}
if len(podVolumeBackups) > 0 {
d.Println()
DescribePodVolumeBackups(d, podVolumeBackups, details)
}
if features.IsEnabled(velerov1api.CSIFeatureFlag) {
DescribeCSIVolumeSnapshots(d, details, volumeSnapshotContents)
}
})
}
@@ -493,10 +495,16 @@ func DescribeCSIVolumeSnapshots(d *Describer, details bool, volumeSnapshotConten
return
}
if len(volumeSnapshotContents) == 0 {
d.Printf("CSI Volume Snapshots: <none included>\n")
return
}
if !details {
d.Printf("CSI Volume Snapshots:\t%d included (specify --details for more information)\n", len(volumeSnapshotContents))
return
}
d.Printf("CSI Volume Snapshots:\n")
for _, vsc := range volumeSnapshotContents {