Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(baremetal): allow OS filtering by offer-id #824

Merged
merged 2 commits into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ USAGE:
scw baremetal os list [arg=value ...]

ARGS:
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)
[offer-id] Filter OS by offer ID
[zone] Zone to target. If none is passed will use default zone from the config (fr-par-2)

FLAGS:
-h, --help help for list
Expand Down
6 changes: 6 additions & 0 deletions internal/namespaces/baremetal/v1alpha1/baremetal_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,12 @@ func baremetalOsList() *core.Command {
Verb: "list",
ArgsType: reflect.TypeOf(baremetal.ListOsRequest{}),
ArgSpecs: core.ArgSpecs{
{
Name: "offer-id",
Short: `Filter OS by offer ID`,
Required: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar2),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down