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

chore(baremetal): remove exclude on partitioning schema type #4154

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,36 @@ EXAMPLES:
scw baremetal server create

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
name=<generated> Name of the server (≠hostname)
[description] Description associated with the server, max 255 characters
[type] Server commercial type
[tags.{index}] Tags to associate to the server
[install.os-id] ID of the OS to installation on the server
[install.hostname] Hostname of the server
[install.ssh-key-ids.{index}] SSH key IDs authorized on the server
[install.user] User for the installation
[install.password] Password for the installation
[install.service-user] Regular user that runs the service to be installed on the server
[install.service-password] Password used for the service to install
[option-ids.{index}] IDs of options to enable on server
[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 | pl-waw-2 | pl-waw-3)
[project-id] Project ID to use. If none is passed the default project ID will be used
name=<generated> Name of the server (≠hostname)
[description] Description associated with the server, max 255 characters
[type] Server commercial type
[tags.{index}] Tags to associate to the server
[install.os-id] ID of the OS to installation on the server
[install.hostname] Hostname of the server
[install.ssh-key-ids.{index}] SSH key IDs authorized on the server
[install.user] User for the installation
[install.password] Password for the installation
[install.service-user] Regular user that runs the service to be installed on the server
[install.service-password] Password used for the service to install
[install.partitioning-schema.disks.{index}.device]
[install.partitioning-schema.disks.{index}.partitions.{index}.label] (unknown_partition_label | uefi | legacy | root | boot | swap | data | home | raid | zfs)
[install.partitioning-schema.disks.{index}.partitions.{index}.number]
[install.partitioning-schema.disks.{index}.partitions.{index}.size]
[install.partitioning-schema.raids.{index}.name]
[install.partitioning-schema.raids.{index}.level] (unknown_raid_level | raid_level_0 | raid_level_1 | raid_level_5 | raid_level_6 | raid_level_10)
[install.partitioning-schema.raids.{index}.devices.{index}]
[install.partitioning-schema.filesystems.{index}.device]
[install.partitioning-schema.filesystems.{index}.format] (unknown_format | fat32 | ext4 | swap | zfs | xfs)
[install.partitioning-schema.filesystems.{index}.mountpoint]
[install.partitioning-schema.zfs.pools.{index}.name]
[install.partitioning-schema.zfs.pools.{index}.type] (unknown_type | no_raid | mirror | raidz1 | raidz2)
[install.partitioning-schema.zfs.pools.{index}.devices.{index}]
[install.partitioning-schema.zfs.pools.{index}.options.{index}]
[install.partitioning-schema.zfs.pools.{index}.filesystem-options.{index}]
[option-ids.{index}] IDs of options to enable on server
[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 | pl-waw-2 | pl-waw-3)

FLAGS:
-h, --help help for create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,28 @@ ARGS:
os-id ID of the OS to installation on the server
hostname Hostname of the server
ssh (one of):
[all-ssh-keys] Add all SSH keys on your baremetal instance (cannot be used with ssh-key-ids)
ssh-key-ids.{index} SSH key IDs authorized on the server (cannot be used with all-ssh-keys)
[user] User used for the installation
[password] Password used for the installation
[service-user] User used for the service to install
[service-password] Password used for the service to install
[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-ssh-keys] Add all SSH keys on your baremetal instance (cannot be used with ssh-key-ids)
ssh-key-ids.{index} SSH key IDs authorized on the server (cannot be used with all-ssh-keys)
[user] User used for the installation
[password] Password used for the installation
[service-user] User used for the service to install
[service-password] Password used for the service to install
[partitioning-schema.disks.{index}.device]
[partitioning-schema.disks.{index}.partitions.{index}.label] (unknown_partition_label | uefi | legacy | root | boot | swap | data | home | raid | zfs)
[partitioning-schema.disks.{index}.partitions.{index}.number]
[partitioning-schema.disks.{index}.partitions.{index}.size]
[partitioning-schema.raids.{index}.name]
[partitioning-schema.raids.{index}.level] (unknown_raid_level | raid_level_0 | raid_level_1 | raid_level_5 | raid_level_6 | raid_level_10)
[partitioning-schema.raids.{index}.devices.{index}]
[partitioning-schema.filesystems.{index}.device]
[partitioning-schema.filesystems.{index}.format] (unknown_format | fat32 | ext4 | swap | zfs | xfs)
[partitioning-schema.filesystems.{index}.mountpoint]
[partitioning-schema.zfs.pools.{index}.name]
[partitioning-schema.zfs.pools.{index}.type] (unknown_type | no_raid | mirror | raidz1 | raidz2)
[partitioning-schema.zfs.pools.{index}.devices.{index}]
[partitioning-schema.zfs.pools.{index}.options.{index}]
[partitioning-schema.zfs.pools.{index}.filesystem-options.{index}]
[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 install
Expand Down
30 changes: 30 additions & 0 deletions docs/commands/baremetal.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,21 @@ scw baremetal server create [arg=value ...]
| install.password | | Password for the installation |
| install.service-user | | Regular user that runs the service to be installed on the server |
| install.service-password | | Password used for the service to install |
| install.partitioning-schema.disks.{index}.device | | |
| install.partitioning-schema.disks.{index}.partitions.{index}.label | One of: `unknown_partition_label`, `uefi`, `legacy`, `root`, `boot`, `swap`, `data`, `home`, `raid`, `zfs` | |
| install.partitioning-schema.disks.{index}.partitions.{index}.number | | |
| install.partitioning-schema.disks.{index}.partitions.{index}.size | | |
| install.partitioning-schema.raids.{index}.name | | |
| install.partitioning-schema.raids.{index}.level | One of: `unknown_raid_level`, `raid_level_0`, `raid_level_1`, `raid_level_5`, `raid_level_6`, `raid_level_10` | |
| install.partitioning-schema.raids.{index}.devices.{index} | | |
| install.partitioning-schema.filesystems.{index}.device | | |
| install.partitioning-schema.filesystems.{index}.format | One of: `unknown_format`, `fat32`, `ext4`, `swap`, `zfs`, `xfs` | |
| install.partitioning-schema.filesystems.{index}.mountpoint | | |
| install.partitioning-schema.zfs.pools.{index}.name | | |
| install.partitioning-schema.zfs.pools.{index}.type | One of: `unknown_type`, `no_raid`, `mirror`, `raidz1`, `raidz2` | |
| install.partitioning-schema.zfs.pools.{index}.devices.{index} | | |
| install.partitioning-schema.zfs.pools.{index}.options.{index} | | |
| install.partitioning-schema.zfs.pools.{index}.filesystem-options.{index} | | |
| option-ids.{index} | | IDs of options to enable on server |
| 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`, `pl-waw-2`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |
Expand Down Expand Up @@ -665,6 +680,21 @@ scw baremetal server install <server-id ...> [arg=value ...]
| password | | Password used for the installation |
| service-user | | User used for the service to install |
| service-password | | Password used for the service to install |
| partitioning-schema.disks.{index}.device | | |
| partitioning-schema.disks.{index}.partitions.{index}.label | One of: `unknown_partition_label`, `uefi`, `legacy`, `root`, `boot`, `swap`, `data`, `home`, `raid`, `zfs` | |
| partitioning-schema.disks.{index}.partitions.{index}.number | | |
| partitioning-schema.disks.{index}.partitions.{index}.size | | |
| partitioning-schema.raids.{index}.name | | |
| partitioning-schema.raids.{index}.level | One of: `unknown_raid_level`, `raid_level_0`, `raid_level_1`, `raid_level_5`, `raid_level_6`, `raid_level_10` | |
| partitioning-schema.raids.{index}.devices.{index} | | |
| partitioning-schema.filesystems.{index}.device | | |
| partitioning-schema.filesystems.{index}.format | One of: `unknown_format`, `fat32`, `ext4`, `swap`, `zfs`, `xfs` | |
| partitioning-schema.filesystems.{index}.mountpoint | | |
| partitioning-schema.zfs.pools.{index}.name | | |
| partitioning-schema.zfs.pools.{index}.type | One of: `unknown_type`, `no_raid`, `mirror`, `raidz1`, `raidz2` | |
| partitioning-schema.zfs.pools.{index}.devices.{index} | | |
| partitioning-schema.zfs.pools.{index}.options.{index} | | |
| partitioning-schema.zfs.pools.{index}.filesystem-options.{index} | | |
| 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 |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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.30.0.20241001085744-c3abf300c911
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241002063243-2958268b47e4
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.1
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 @@ -465,8 +465,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.30.0.20241001085744-c3abf300c911 h1:IwmIIQaLdCx38LeWFIJqNqF8qHTCEdSecY5k5D5LI0k=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241001085744-c3abf300c911/go.mod h1:o/2twhmcz4HlhtuuubCuwQ/fe+zyzoJR85+02gy04yY=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241002063243-2958268b47e4 h1:PkUW135HALZETPJIWGNTIr2mVvBhQODsGqaEwNAEosc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241002063243-2958268b47e4/go.mod h1:o/2twhmcz4HlhtuuubCuwQ/fe+zyzoJR85+02gy04yY=
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
188 changes: 188 additions & 0 deletions internal/namespaces/baremetal/v1/baremetal_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,100 @@ func baremetalServerCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.disks.{index}.device",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.disks.{index}.partitions.{index}.label",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_partition_label", "uefi", "legacy", "root", "boot", "swap", "data", "home", "raid", "zfs"},
},
{
Name: "install.partitioning-schema.disks.{index}.partitions.{index}.number",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.disks.{index}.partitions.{index}.size",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.raids.{index}.name",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.raids.{index}.level",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_raid_level", "raid_level_0", "raid_level_1", "raid_level_5", "raid_level_6", "raid_level_10"},
},
{
Name: "install.partitioning-schema.raids.{index}.devices.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.filesystems.{index}.device",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.filesystems.{index}.format",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_format", "fat32", "ext4", "swap", "zfs", "xfs"},
},
{
Name: "install.partitioning-schema.filesystems.{index}.mountpoint",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.zfs.pools.{index}.name",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.zfs.pools.{index}.type",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_type", "no_raid", "mirror", "raidz1", "raidz2"},
},
{
Name: "install.partitioning-schema.zfs.pools.{index}.devices.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.zfs.pools.{index}.options.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "install.partitioning-schema.zfs.pools.{index}.filesystem-options.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "option-ids.{index}",
Short: `IDs of options to enable on server`,
Expand Down Expand Up @@ -507,6 +601,100 @@ func baremetalServerInstall() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.disks.{index}.device",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.disks.{index}.partitions.{index}.label",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_partition_label", "uefi", "legacy", "root", "boot", "swap", "data", "home", "raid", "zfs"},
},
{
Name: "partitioning-schema.disks.{index}.partitions.{index}.number",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.disks.{index}.partitions.{index}.size",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.raids.{index}.name",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.raids.{index}.level",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_raid_level", "raid_level_0", "raid_level_1", "raid_level_5", "raid_level_6", "raid_level_10"},
},
{
Name: "partitioning-schema.raids.{index}.devices.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.filesystems.{index}.device",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.filesystems.{index}.format",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_format", "fat32", "ext4", "swap", "zfs", "xfs"},
},
{
Name: "partitioning-schema.filesystems.{index}.mountpoint",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.zfs.pools.{index}.name",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.zfs.pools.{index}.type",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_type", "no_raid", "mirror", "raidz1", "raidz2"},
},
{
Name: "partitioning-schema.zfs.pools.{index}.devices.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.zfs.pools.{index}.options.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "partitioning-schema.zfs.pools.{index}.filesystem-options.{index}",
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZonePlWaw2, scw.ZonePlWaw3),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down
Loading