Skip to content

Commit 207a7a0

Browse files
authored
feat(instance): adapt pnic creation to ipam workflow (#3853)
1 parent d9d884d commit 207a7a0

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

cmd/scw/testdata/test-all-usage-instance-private-nic-create-usage.golden

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ USAGE:
66
scw instance private-nic create [arg=value ...]
77

88
ARGS:
9-
server-id UUID of the Instance the private NIC will be attached to
10-
private-network-id UUID of the private network where the private NIC will be attached
11-
[tags.{index}] Private NIC tags
12-
[ip-ids.{index}] Ip_ids defined from IPAM
13-
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
9+
server-id UUID of the Instance the private NIC will be attached to
10+
private-network-id UUID of the private network where the private NIC will be attached
11+
[tags.{index}] Private NIC tags
12+
[ipam-ip-ids.{index}] UUID of IPAM ips, to be attached to the instance in the requested private network
13+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
14+
15+
DEPRECATED ARGS:
16+
[ip-ids.{index}] Ip_ids defined from IPAM
1417

1518
FLAGS:
1619
-h, --help help for create

docs/commands/instance.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,8 @@ scw instance private-nic create [arg=value ...]
948948
| server-id | Required | UUID of the Instance the private NIC will be attached to |
949949
| private-network-id | Required | UUID of the private network where the private NIC will be attached |
950950
| tags.{index} | | Private NIC tags |
951-
| ip-ids.{index} | | Ip_ids defined from IPAM |
951+
| ~~ip-ids.{index}~~ | Deprecated | Ip_ids defined from IPAM |
952+
| ipam-ip-ids.{index} | | UUID of IPAM ips, to be attached to the instance in the requested private network |
952953
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `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 |
953954

954955

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.27.0.20240530170946-3116abbd12da
28+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240603133732-526ae94f1caa
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.27.0.20240530170946-3116abbd12da h1:F7BB0E1KCyW1APsPEi7ilJCgERxkMDkCdEPMwPW7Yzk=
457-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240530170946-3116abbd12da/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
456+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240603133732-526ae94f1caa h1:i+rtstvLVsx9zBDmVir/PssINIURdrXaCRpBW5+ctCs=
457+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240603133732-526ae94f1caa/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/instance/v1/instance_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3717,6 +3717,13 @@ func instancePrivateNicCreate() *core.Command {
37173717
Name: "ip-ids.{index}",
37183718
Short: `Ip_ids defined from IPAM`,
37193719
Required: false,
3720+
Deprecated: true,
3721+
Positional: false,
3722+
},
3723+
{
3724+
Name: "ipam-ip-ids.{index}",
3725+
Short: `UUID of IPAM ips, to be attached to the instance in the requested private network`,
3726+
Required: false,
37203727
Deprecated: false,
37213728
Positional: false,
37223729
},

0 commit comments

Comments
 (0)