Skip to content

feat(flexibleip): reorder columns and make fip_id positional in update and delete #1996

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

Merged
merged 2 commits into from
Oct 22, 2021
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 @@ -3,7 +3,7 @@
Delete a Flexible IP.

USAGE:
scw fip ip delete [arg=value ...]
scw fip ip delete <fip-id ...> [arg=value ...]

ARGS:
fip-id ID of the Flexible IP to delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Update a Flexible IP.

USAGE:
scw fip ip update [arg=value ...]
scw fip ip update <fip-id ...> [arg=value ...]

ARGS:
fip-id ID of the Flexible IP to update
Expand Down
39 changes: 37 additions & 2 deletions internal/namespaces/flexibleip/v1alpha1/flexibleip_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,41 @@ func fipIPList() *core.Command {
return resp.FlexibleIPs, nil

},
View: &core.View{Fields: []*core.ViewField{
{
FieldName: "ID",
},
{
FieldName: "IPAddress",
},
{
FieldName: "Status",
},
{
FieldName: "Reverse",
},
{
FieldName: "ServerID",
},
{
FieldName: "Description",
},
{
FieldName: "Tags",
},
{
FieldName: "ProjectID",
},
{
FieldName: "OrganizationID",
},
{
FieldName: "UpdatedAt",
},
{
FieldName: "CreatedAt",
},
}},
}
}

Expand All @@ -230,7 +265,7 @@ func fipIPUpdate() *core.Command {
Short: `ID of the Flexible IP to update`,
Required: true,
Deprecated: false,
Positional: false,
Positional: true,
},
{
Name: "description",
Expand Down Expand Up @@ -281,7 +316,7 @@ func fipIPDelete() *core.Command {
Short: `ID of the Flexible IP to delete`,
Required: true,
Deprecated: false,
Positional: false,
Positional: true,
},
core.ZoneArgSpec(scw.ZoneFrPar2),
},
Expand Down