From c8e88187439f75089d3d10dc3bb381ee51562130 Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Tue, 3 Aug 2021 17:16:40 +0800 Subject: [PATCH] fix: add purge split log commands for cloudevent and cloudlog --- cmd/climc/shell/events/splitable.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/climc/shell/events/splitable.go b/cmd/climc/shell/events/splitable.go index e76e26ab6a..1ecee85190 100644 --- a/cmd/climc/shell/events/splitable.go +++ b/cmd/climc/shell/events/splitable.go @@ -24,7 +24,7 @@ import ( func init() { type EventSplitableOptions struct { - Service string `help:"service" choices:"compute|identity|image" default:"compute"` + Service string `help:"service" choices:"compute|identity|image|log|cloudevent" default:"compute"` } R(&EventSplitableOptions{}, "logs-splitable", "Show splitable info of event table", func(s *mcclient.ClientSession, args *EventSplitableOptions) error { var results jsonutils.JSONObject @@ -34,6 +34,10 @@ func init() { results, err = modules.IdentityLogs.Get(s, "splitable", nil) case "image": results, err = modules.ImageLogs.Get(s, "splitable", nil) + case "log": + results, err = modules.Actions.Get(s, "splitable", nil) + case "cloudevent": + results, err = modules.Cloudevents.Get(s, "splitable", nil) default: results, err = modules.Logs.Get(s, "splitable", nil) } @@ -58,6 +62,10 @@ func init() { results, err = modules.IdentityLogs.PerformClassAction(s, "purge-splitable", nil) case "image": results, err = modules.ImageLogs.PerformClassAction(s, "purge-splitable", nil) + case "log": + results, err = modules.Actions.PerformClassAction(s, "purge-splitable", nil) + case "cloudevent": + results, err = modules.Cloudevents.PerformClassAction(s, "purge-splitable", nil) default: results, err = modules.Logs.PerformClassAction(s, "purge-splitable", nil) }