remove filter flags and options for session recordings
This commit is contained in:
1 parent
d1a5f3a2ff
commit
2359d5b7a5
6 files changed
+21
-20
No files matched your search
@@ -91,7 +91,7 @@ var flagsMap = map[string][]string{
|
||||
|
||||
"read": {"id"},
|
||||
|
||||
"list": {"scope-id", "filter", "recursive"},
|
||||
"list": {"scope-id", "recursive"},
|
||||
}
|
||||
|
||||
func (c *Command) Flags() *base.FlagSets {
|
||||
@@ -174,10 +174,6 @@ func (c *Command) Run(args []string) int {
|
||||
opts = append(opts, sessionrecordings.WithRecursive(true))
|
||||
}
|
||||
|
||||
if c.FlagFilter != "" {
|
||||
opts = append(opts, sessionrecordings.WithFilter(c.FlagFilter))
|
||||
}
|
||||
|
||||
var version uint32
|
||||
|
||||
if ok := extraFlagsHandlingFunc(c, f, &opts); !ok {
|
||||
|
||||
@@ -86,6 +86,8 @@ type cmdInfo struct {
|
||||
// SkipClientCallActions allows skipping creation of an actual client
|
||||
// call for an action in favor of custom logic in extra actions
|
||||
SkipClientCallActions []string
|
||||
|
||||
SkipFiltering bool
|
||||
}
|
||||
|
||||
var inputStructs = map[string][]*cmdInfo{
|
||||
@@ -575,6 +577,7 @@ var inputStructs = map[string][]*cmdInfo{
|
||||
HasExtraCommandVars: true,
|
||||
HasExtraHelpFunc: true,
|
||||
HasId: true,
|
||||
SkipFiltering: true,
|
||||
},
|
||||
},
|
||||
"storagebuckets": {
|
||||
|
||||
@@ -195,7 +195,7 @@ var flags{{ camelCase .SubActionPrefix }}Map = map[string][]string{
|
||||
"delete": {"id"},
|
||||
{{ end }}
|
||||
{{ if eq $action "list" }}
|
||||
"list": { "{{ kebabCase $input.Container }}-id", "filter" {{ if (eq $input.Container "Scope") }}, "recursive"{{ end }} },
|
||||
"list": { "{{ kebabCase $input.Container }}-id"{{ if not $input.SkipFiltering }}, "filter" {{ end }} {{ if (eq $input.Container "Scope") }}, "recursive"{{ end }} },
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -382,9 +382,11 @@ func (c *{{ camelCase .SubActionPrefix }}Command) Run(args []string) int {
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ if not .SkipFiltering }}
|
||||
if c.FlagFilter != "" {
|
||||
opts = append(opts, {{ .Pkg }}.WithFilter(c.FlagFilter))
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ if .HasScopeName }}
|
||||
switch c.FlagScopeName {
|
||||
|
||||
Reference in new issue
Block a user