mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 06:54:32 +00:00
backup describer: show snapshot summary by default, details optionally
Signed-off-by: Steve Kriss <steve@heptio.com>
This commit is contained in:
@@ -33,8 +33,8 @@ import (
|
||||
|
||||
func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
|
||||
var (
|
||||
listOptions metav1.ListOptions
|
||||
volumeDetails bool
|
||||
listOptions metav1.ListOptions
|
||||
details bool
|
||||
)
|
||||
|
||||
c := &cobra.Command{
|
||||
@@ -71,7 +71,7 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
|
||||
fmt.Fprintf(os.Stderr, "error getting PodVolumeBackups for backup %s: %v\n", backup.Name, err)
|
||||
}
|
||||
|
||||
s := output.DescribeBackup(&backup, deleteRequestList.Items, podVolumeBackupList.Items, volumeDetails)
|
||||
s := output.DescribeBackup(&backup, deleteRequestList.Items, podVolumeBackupList.Items, details, arkClient)
|
||||
if first {
|
||||
first = false
|
||||
fmt.Print(s)
|
||||
@@ -84,7 +84,7 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
|
||||
}
|
||||
|
||||
c.Flags().StringVarP(&listOptions.LabelSelector, "selector", "l", listOptions.LabelSelector, "only show items matching this label selector")
|
||||
c.Flags().BoolVar(&volumeDetails, "volume-details", volumeDetails, "display details of restic volume backups")
|
||||
c.Flags().BoolVar(&details, "details", details, "display additional detail in the command output")
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ import (
|
||||
|
||||
func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
|
||||
var (
|
||||
listOptions metav1.ListOptions
|
||||
volumeDetails bool
|
||||
listOptions metav1.ListOptions
|
||||
details bool
|
||||
)
|
||||
|
||||
c := &cobra.Command{
|
||||
@@ -64,7 +64,7 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
|
||||
fmt.Fprintf(os.Stderr, "error getting PodVolumeRestores for restore %s: %v\n", restore.Name, err)
|
||||
}
|
||||
|
||||
s := output.DescribeRestore(&restore, podvolumeRestoreList.Items, volumeDetails, arkClient)
|
||||
s := output.DescribeRestore(&restore, podvolumeRestoreList.Items, details, arkClient)
|
||||
if first {
|
||||
first = false
|
||||
fmt.Print(s)
|
||||
@@ -77,7 +77,7 @@ func NewDescribeCommand(f client.Factory, use string) *cobra.Command {
|
||||
}
|
||||
|
||||
c.Flags().StringVarP(&listOptions.LabelSelector, "selector", "l", listOptions.LabelSelector, "only show items matching this label selector")
|
||||
c.Flags().BoolVar(&volumeDetails, "volume-details", volumeDetails, "display details of restic volume restores")
|
||||
c.Flags().BoolVar(&details, "details", details, "display additional detail in the command output")
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user