@@ -113,16 +113,17 @@ func printNonAdminBSLTable(nabslList *nacv1alpha1.NonAdminBackupStorageLocationL
113113 }
114114
115115 // Print header
116- fmt .Printf ("%-30s %-15s %-15s %-20s %-10s\n " , "NAME" , "REQUEST PHASE" , "PROVIDER" , "BUCKET/PREFIX" , "AGE" )
116+ fmt .Printf ("%-30s %-15s %-15s %-15s %- 20s %-10s\n " , "NAME" , "REQUEST PHASE" , "VELERO PHASE" , "PROVIDER" , "BUCKET/PREFIX" , "AGE" )
117117
118118 // Print each BSL
119119 for _ , nabsl := range nabslList .Items {
120120 status := getBSLStatus (& nabsl )
121+ veleroPhase := getBSLVeleroPhase (& nabsl )
121122 provider := getProvider (& nabsl )
122123 bucketPrefix := getBucketPrefix (& nabsl )
123124 age := formatAge (nabsl .CreationTimestamp .Time )
124125
125- fmt .Printf ("%-30s %-15s %-15s %-20s %-10s\n " , nabsl .Name , status , provider , bucketPrefix , age )
126+ fmt .Printf ("%-30s %-15s %-15s %-15s %- 20s %-10s\n " , nabsl .Name , status , veleroPhase , provider , bucketPrefix , age )
126127 }
127128
128129 return nil
@@ -135,6 +136,15 @@ func getBSLStatus(nabsl *nacv1alpha1.NonAdminBackupStorageLocation) string {
135136 return "Unknown"
136137}
137138
139+ func getBSLVeleroPhase (nabsl * nacv1alpha1.NonAdminBackupStorageLocation ) string {
140+ if nabsl .Status .VeleroBackupStorageLocation != nil && nabsl .Status .VeleroBackupStorageLocation .Status != nil {
141+ if nabsl .Status .VeleroBackupStorageLocation .Status .Phase != "" {
142+ return string (nabsl .Status .VeleroBackupStorageLocation .Status .Phase )
143+ }
144+ }
145+ return "N/A"
146+ }
147+
138148func getProvider (nabsl * nacv1alpha1.NonAdminBackupStorageLocation ) string {
139149 if nabsl .Spec .BackupStorageLocationSpec != nil && nabsl .Spec .BackupStorageLocationSpec .Provider != "" {
140150 return nabsl .Spec .BackupStorageLocationSpec .Provider
0 commit comments