Skip to content

Commit 8cbf6bf

Browse files
authored
feat(lb): publish flexible ip tags feature (#3800)
1 parent 99fc4ba commit 8cbf6bf

File tree

7 files changed

+30
-3
lines changed

7 files changed

+30
-3
lines changed

cmd/scw/testdata/test-all-usage-lbip-create-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARGS:
99
[project-id] Project ID to use. If none is passed the default project ID will be used
1010
[reverse] Reverse DNS (domain name) for the IP address
1111
[is-ipv6] If true, creates a Flexible IP with an ipv6 address
12+
[tags.{index}] List of tags for the IP
1213
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
1314
[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)
1415

cmd/scw/testdata/test-all-usage-lbip-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARGS:
99
[ip-address] IP address to filter for
1010
[project-id] Project ID to filter for, only Load Balancer IP addresses from this Project will be returned
1111
[ip-type] IP type to filter for (all | ipv4 | ipv6)
12+
[tags.{index}] Tag to filter for, only IPs with one or more matching tags will be returned
1213
[organization-id] Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned
1314
[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)
1415

cmd/scw/testdata/test-all-usage-lbip-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARGS:
99
ip-id IP address ID
1010
[reverse] Reverse DNS (domain name) for the IP address
1111
[lb-id] ID of the server on which to attach the flexible IP
12+
[tags.{index}] List of tags for the IP
1213
[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)
1314

1415
FLAGS:

docs/commands/lb.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ scw lb ip create [arg=value ...]
792792
| project-id | | Project ID to use. If none is passed the default project ID will be used |
793793
| reverse | | Reverse DNS (domain name) for the IP address |
794794
| is-ipv6 | | If true, creates a Flexible IP with an ipv6 address |
795+
| tags.{index} | | List of tags for the IP |
795796
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
796797
| 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 |
797798

@@ -855,6 +856,7 @@ scw lb ip list [arg=value ...]
855856
| ip-address | | IP address to filter for |
856857
| project-id | | Project ID to filter for, only Load Balancer IP addresses from this Project will be returned |
857858
| ip-type | One of: `all`, `ipv4`, `ipv6` | IP type to filter for |
859+
| tags.{index} | | Tag to filter for, only IPs with one or more matching tags will be returned |
858860
| organization-id | | Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned |
859861
| 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 |
860862

@@ -878,6 +880,7 @@ scw lb ip update <ip-id ...> [arg=value ...]
878880
| ip-id | Required | IP address ID |
879881
| reverse | | Reverse DNS (domain name) for the IP address |
880882
| lb-id | | ID of the server on which to attach the flexible IP |
883+
| tags.{index} | | List of tags for the IP |
881884
| 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 |
882885

883886

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/mattn/go-isatty v0.0.20
2626
github.com/moby/buildkit v0.13.2
2727
github.com/opencontainers/go-digest v1.0.0
28-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240425150324-84e93b73daba
28+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240429124613-30a12e8a3fb1
2929
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3030
github.com/spf13/cobra v1.8.0
3131
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
453453
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
454454
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
455455
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
456-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240425150324-84e93b73daba h1:LD4AyBgbVcm0mqMdQ6xXBrPEwzUYJhkO4+PjHT+pZRM=
457-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240425150324-84e93b73daba/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
456+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240429124613-30a12e8a3fb1 h1:c4nXEzSj5M7wHGnlvwYZ0dgoMLUv212Vt7rNerfdhAk=
457+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26.0.20240429124613-30a12e8a3fb1/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
458458
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
459459
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
460460
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/lb/v1/lb_cli.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,13 @@ func lbIPList() *core.Command {
543543
Positional: false,
544544
EnumValues: []string{"all", "ipv4", "ipv6"},
545545
},
546+
{
547+
Name: "tags.{index}",
548+
Short: `Tag to filter for, only IPs with one or more matching tags will be returned`,
549+
Required: false,
550+
Deprecated: false,
551+
Positional: false,
552+
},
546553
{
547554
Name: "organization-id",
548555
Short: `Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned`,
@@ -597,6 +604,13 @@ func lbIPCreate() *core.Command {
597604
Deprecated: false,
598605
Positional: false,
599606
},
607+
{
608+
Name: "tags.{index}",
609+
Short: `List of tags for the IP`,
610+
Required: false,
611+
Deprecated: false,
612+
Positional: false,
613+
},
600614
core.OrganizationIDArgSpec(),
601615
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
602616
},
@@ -708,6 +722,13 @@ func lbIPUpdate() *core.Command {
708722
Deprecated: false,
709723
Positional: false,
710724
},
725+
{
726+
Name: "tags.{index}",
727+
Short: `List of tags for the IP`,
728+
Required: false,
729+
Deprecated: false,
730+
Positional: false,
731+
},
711732
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
712733
},
713734
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)