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(lb): publish flexible ip tags feature #3800

Merged
merged 1 commit into from
May 3, 2024
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
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-lbip-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[reverse] Reverse DNS (domain name) for the IP address
[is-ipv6] If true, creates a Flexible IP with an ipv6 address
[tags.{index}] List of tags for the IP
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

Expand Down
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-lbip-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARGS:
[ip-address] IP address to filter for
[project-id] Project ID to filter for, only Load Balancer IP addresses from this Project will be returned
[ip-type] IP type to filter for (all | ipv4 | ipv6)
[tags.{index}] Tag to filter for, only IPs with one or more matching tags will be returned
[organization-id] Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)

Expand Down
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-lbip-update-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARGS:
ip-id IP address ID
[reverse] Reverse DNS (domain name) for the IP address
[lb-id] ID of the server on which to attach the flexible IP
[tags.{index}] List of tags for the IP
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)

FLAGS:
Expand Down
3 changes: 3 additions & 0 deletions docs/commands/lb.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ scw lb ip create [arg=value ...]
| project-id | | Project ID to use. If none is passed the default project ID will be used |
| reverse | | Reverse DNS (domain name) for the IP address |
| is-ipv6 | | If true, creates a Flexible IP with an ipv6 address |
| tags.{index} | | List of tags for the IP |
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |

Expand Down Expand Up @@ -855,6 +856,7 @@ scw lb ip list [arg=value ...]
| ip-address | | IP address to filter for |
| project-id | | Project ID to filter for, only Load Balancer IP addresses from this Project will be returned |
| ip-type | One of: `all`, `ipv4`, `ipv6` | IP type to filter for |
| tags.{index} | | Tag to filter for, only IPs with one or more matching tags will be returned |
| organization-id | | Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3`, `all` | Zone to target. If none is passed will use default zone from the config |

Expand All @@ -878,6 +880,7 @@ scw lb ip update <ip-id ...> [arg=value ...]
| ip-id | Required | IP address ID |
| reverse | | Reverse DNS (domain name) for the IP address |
| lb-id | | ID of the server on which to attach the flexible IP |
| tags.{index} | | List of tags for the IP |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240425150324-84e93b73daba
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240429124613-30a12e8a3fb1
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240425150324-84e93b73daba h1:LD4AyBgbVcm0mqMdQ6xXBrPEwzUYJhkO4+PjHT+pZRM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240425150324-84e93b73daba/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240429124613-30a12e8a3fb1 h1:c4nXEzSj5M7wHGnlvwYZ0dgoMLUv212Vt7rNerfdhAk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240429124613-30a12e8a3fb1/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
21 changes: 21 additions & 0 deletions internal/namespaces/lb/v1/lb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,13 @@ func lbIPList() *core.Command {
Positional: false,
EnumValues: []string{"all", "ipv4", "ipv6"},
},
{
Name: "tags.{index}",
Short: `Tag to filter for, only IPs with one or more matching tags will be returned`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned`,
Expand Down Expand Up @@ -597,6 +604,13 @@ func lbIPCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "tags.{index}",
Short: `List of tags for the IP`,
Required: false,
Deprecated: false,
Positional: false,
},
core.OrganizationIDArgSpec(),
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
},
Expand Down Expand Up @@ -708,6 +722,13 @@ func lbIPUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "tags.{index}",
Short: `List of tags for the IP`,
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down
Loading