Adds suspend and resume all cmd
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@ var suspendAlertCmd = &cobra.Command{
|
||||
RunE: suspendCommand{
|
||||
apiType: alertType,
|
||||
object: &alertAdapter{¬ificationv1.Alert{}},
|
||||
list: &alertListAdapter{¬ificationv1.AlertList{}},
|
||||
}.run,
|
||||
}
|
||||
|
||||
@@ -45,3 +46,7 @@ func (obj alertAdapter) isSuspended() bool {
|
||||
func (obj alertAdapter) setSuspended() {
|
||||
obj.Alert.Spec.Suspend = true
|
||||
}
|
||||
|
||||
func (a alertListAdapter) item(i int) suspendable {
|
||||
return &alertAdapter{&a.AlertList.Items[i]}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user