Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0f6ebef
fix(inference): attach private network (#4524)
Laure-di Feb 19, 2025
a1e7c98
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
5bcf78c
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
48b8aef
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
a38cf8b
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
94df45b
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
143b55e
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
63665d3
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
5529711
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
b77e950
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
02f8b8a
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
f053f23
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
d28fcc3
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
8dd0973
feat(audit_trail): add account user and organization resources (#4717)
scaleway-bot May 15, 2025
7883aac
chore: bump sdk (#4751)
scaleway-bot May 22, 2025
d575d31
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
6068048
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
321f7f5
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
6e66283
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
37ff72d
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
734f233
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
ca7d58b
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
62ee325
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
28cdec8
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
fcae18f
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
aade108
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
e0dea59
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
9c37cf0
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
2566bd5
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
d9d112b
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
103a350
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
a605321
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
803d8ab
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
6e72d7f
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
6813ed4
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
9ed63ce
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
116281f
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
c26ea85
chore(deps): bump golang.org/x/text from 0.22.0 to 0.23.0 (#4567)
dependabot[bot] Mar 6, 2025
f599d1b
feat(secret_manager): display restore methods (#4597)
scaleway-bot Mar 19, 2025
ab9e2ae
fix(baremetal): activate PN v3
Laure-di May 27, 2025
bc404fe
golangci linter
Laure-di May 27, 2025
995dde0
update documentation
Laure-di May 27, 2025
9e2b283
update golden allUsage
Laure-di May 27, 2025
e000132
update goldens
Laure-di May 27, 2025
7639cbb
MergeAll cmds in baremetal
Laure-di May 27, 2025
5472462
remove unnecessary commands
Laure-di May 27, 2025
7754d39
golangci linter
Laure-di May 27, 2025
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
@@ -1,14 +1,15 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Add a server to a Private Network.
Add an Elastic Metal server to a Private Network.

USAGE:
scw baremetal private-network add [arg=value ...]

ARGS:
server-id The ID of the server
private-network-id The ID of the Private Network
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)
server-id UUID of the server
private-network-id UUID of the Private Network
[ipam-ip-ids.{index}] IPAM IDs of an IPs to attach to the server
[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 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for add
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ USAGE:
scw baremetal private-network delete [arg=value ...]

ARGS:
server-id The ID of the server
private-network-id The ID of the Private Network
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)
server-id UUID of the server
private-network-id UUID of the 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 | nl-ams-1 | nl-ams-2 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for delete
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List the Private Networks of a server.
List the Private Networks of an Elastic Metal server.

USAGE:
scw baremetal private-network list [arg=value ...]

ARGS:
[order-by] The sort order for the returned Private Networks (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
[server-id] Filter Private Networks by server ID
[private-network-id] Filter Private Networks by Private Network ID
[project-id] Filter Private Networks by Project ID
[organization-id] Filter Private Networks by Organization ID
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2 | all)
[order-by] Sort order for the returned Private Networks (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
[server-id] Filter Private Networks by server UUID
[private-network-id] Filter Private Networks by Private Network UUID
[project-id] Filter Private Networks by project UUID
[ipam-ip-ids.{index}] Filter Private Networks by IPAM IP UUIDs
[organization-id] Filter Private Networks by organization UUID
[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 | pl-waw-2 | pl-waw-3 | all)

FLAGS:
-h, --help help for list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Set multiple Private Networks on a server.
Configure multiple Private Networks on an Elastic Metal server.

USAGE:
scw baremetal private-network set [arg=value ...]

ARGS:
server-id The ID of the server
private-network-ids.{index} The IDs of the Private Networks
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-2)
server-id UUID of the server
per-private-network-ipam-ip-ids.{key} Object where the keys are the UUIDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Elastic Metal server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network's CIDR block will automatically be used for attachment.
[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 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for set
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
A Private Network allows you to interconnect your resources
(servers, instances, ...) in an isolated and private
network. The network reachability is limited to the
resources that are on the same Private Network . A VLAN
in an isolated and private
network. Network reachability is limited to the
resources that are on the same Private Network. A VLAN
interface is available on the server and can be freely
managed (adding IP addresses, shutdown interface...).
managed (adding IP addresses, shutdown interface etc.).

Note that a resource can be a part of multiple Private Networks.

Expand Down
27 changes: 27 additions & 0 deletions cmd/scw/testdata/test-all-usage-baremetal-usage#01.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Elastic Metal API.

USAGE:
scw baremetal <command>

AVAILABLE COMMANDS:
bmc Baseboard Management Controller (BMC) management commands
offer Server offer management commands
options Server options management commands
os Operating System (OS) management commands
partitioning-schemas Partitioning-schemas management commands
private-network Private network management command
server Server management commands
settings Settings management commands

FLAGS:
-h, --help help for baremetal

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw baremetal [command] --help" for more information about a command.
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-baremetal-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AVAILABLE COMMANDS:
options Server options management commands
os Operating System (OS) management commands
partitioning-schemas Partitioning-schemas management commands
private-network Private network management command
server Server management commands
settings Settings management commands

Expand Down
108 changes: 107 additions & 1 deletion docs/commands/baremetal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
# Documentation for `scw baremetal`
Elastic Metal API.
Elastic Metal - Private Networks API.

- [Baseboard Management Controller (BMC) management commands](#baseboard-management-controller-(bmc)-management-commands)
- [Get BMC access](#get-bmc-access)
Expand All @@ -18,6 +18,11 @@ Elastic Metal API.
- [Get OS with an ID](#get-os-with-an-id)
- [List available OSes](#list-available-oses)
- [Partitioning-schemas management commands](#partitioning-schemas-management-commands)
- [Private network management command](#private-network-management-command)
- [Add a server to a Private Network](#add-a-server-to-a-private-network)
- [Delete a Private Network](#delete-a-private-network)
- [List the Private Networks of a server](#list-the-private-networks-of-a-server)
- [Set multiple Private Networks on a server](#set-multiple-private-networks-on-a-server)
- [Server management commands](#server-management-commands)
- [Attach a new flexible IP to a server](#attach-a-new-flexible-ip-to-a-server)
- [Create an Elastic Metal server](#create-an-elastic-metal-server)
Expand Down Expand Up @@ -386,6 +391,107 @@ scw baremetal partitioning-schemas



## Private network management command

A Private Network allows you to interconnect your resources
in an isolated and private
network. Network reachability is limited to the
resources that are on the same Private Network. A VLAN
interface is available on the server and can be freely
managed (adding IP addresses, shutdown interface etc.).

Note that a resource can be a part of multiple Private Networks.


### Add a server to a Private Network

Add an Elastic Metal server to a Private Network.

**Usage:**

```
scw baremetal private-network add [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| server-id | Required | UUID of the server |
| private-network-id | Required | UUID of the Private Network |
| ipam-ip-ids.{index} | | IPAM IDs of an IPs to attach to the server |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |



### Delete a Private Network

Delete a Private Network.

**Usage:**

```
scw baremetal private-network delete [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| server-id | Required | UUID of the server |
| private-network-id | Required | UUID of the Private Network |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |



### List the Private Networks of a server

List the Private Networks of an Elastic Metal server.

**Usage:**

```
scw baremetal private-network list [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| order-by | One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc` | Sort order for the returned Private Networks |
| server-id | | Filter Private Networks by server UUID |
| private-network-id | | Filter Private Networks by Private Network UUID |
| project-id | | Filter Private Networks by project UUID |
| ipam-ip-ids.{index} | | Filter Private Networks by IPAM IP UUIDs |
| organization-id | | Filter Private Networks by organization UUID |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-2`, `pl-waw-3`, `all` | Zone to target. If none is passed will use default zone from the config |



### Set multiple Private Networks on a server

Configure multiple Private Networks on an Elastic Metal server.

**Usage:**

```
scw baremetal private-network set [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| server-id | Required | UUID of the server |
| per-private-network-ipam-ip-ids.{key} | Required | Object where the keys are the UUIDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Elastic Metal server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network's CIDR block will automatically be used for attachment. |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |



## Server management commands

A server is a denomination of a type of instances provided by Scaleway.
Expand Down
3 changes: 3 additions & 0 deletions internal/namespaces/baremetal/v1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package baremetal
import (
"github.com/scaleway/scaleway-cli/v2/core"
"github.com/scaleway/scaleway-cli/v2/core/human"
baremetalV3 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v3"
baremetal "github.com/scaleway/scaleway-sdk-go/api/baremetal/v1"
)

Expand Down Expand Up @@ -38,5 +39,7 @@ func GetCommands() *core.Commands {
cmds.MustFind("baremetal", "server", "stop").Override(serverStopBuilder)
cmds.MustFind("baremetal", "server", "reboot").Override(serverRebootBuilder)

cmds.MergeAll(baremetalV3.GetCommands())

return cmds
}
9 changes: 9 additions & 0 deletions internal/namespaces/baremetal/v3/custom.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package baremetal

import "github.com/scaleway/scaleway-cli/v2/core"

func GetCommands() *core.Commands {
cmds := GetGeneratedCommands()

return cmds
}
Loading