Skip to content

Commit

Permalink
feat(instance): adapt pnic creation to ipam workflow (#3853)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Jun 5, 2024
1 parent d9d884d commit 207a7a0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ USAGE:
scw instance private-nic create [arg=value ...]

ARGS:
server-id UUID of the Instance the private NIC will be attached to
private-network-id UUID of the private network where the private NIC will be attached
[tags.{index}] Private NIC tags
[ip-ids.{index}] Ip_ids defined from IPAM
[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)
server-id UUID of the Instance the private NIC will be attached to
private-network-id UUID of the private network where the private NIC will be attached
[tags.{index}] Private NIC tags
[ipam-ip-ids.{index}] UUID of IPAM ips, to be attached to the instance in the requested private network
[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)

DEPRECATED ARGS:
[ip-ids.{index}] Ip_ids defined from IPAM

FLAGS:
-h, --help help for create
Expand Down
3 changes: 2 additions & 1 deletion docs/commands/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,8 @@ scw instance private-nic create [arg=value ...]
| server-id | Required | UUID of the Instance the private NIC will be attached to |
| private-network-id | Required | UUID of the private network where the private NIC will be attached |
| tags.{index} | | Private NIC tags |
| ip-ids.{index} | | Ip_ids defined from IPAM |
| ~~ip-ids.{index}~~ | Deprecated | Ip_ids defined from IPAM |
| ipam-ip-ids.{index} | | UUID of IPAM ips, to be attached to the instance in the requested private network |
| 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 |


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.27.0.20240530170946-3116abbd12da
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240603133732-526ae94f1caa
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.27.0.20240530170946-3116abbd12da h1:F7BB0E1KCyW1APsPEi7ilJCgERxkMDkCdEPMwPW7Yzk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240530170946-3116abbd12da/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240603133732-526ae94f1caa h1:i+rtstvLVsx9zBDmVir/PssINIURdrXaCRpBW5+ctCs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27.0.20240603133732-526ae94f1caa/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
7 changes: 7 additions & 0 deletions internal/namespaces/instance/v1/instance_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -3717,6 +3717,13 @@ func instancePrivateNicCreate() *core.Command {
Name: "ip-ids.{index}",
Short: `Ip_ids defined from IPAM`,
Required: false,
Deprecated: true,
Positional: false,
},
{
Name: "ipam-ip-ids.{index}",
Short: `UUID of IPAM ips, to be attached to the instance in the requested private network`,
Required: false,
Deprecated: false,
Positional: false,
},
Expand Down

0 comments on commit 207a7a0

Please sign in to comment.