Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address'

### master (unreleased)

* Fix `ScalewayBootscript` structure
* `scw _userdata` fix bug when we have multiple '=' in the value ([#320](https://github.com/scaleway/scaleway-cli/issues/320))
* GetBootscriptID doesn't try to resolve when we pass an UUID
* Add location fields for VPS
Expand Down
61 changes: 11 additions & 50 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,67 +301,28 @@ type ScalewaySnapshots struct {
Snapshots []ScalewaySnapshot `json:"snapshots,omitempty"`
}

// ScalewayBootCmdArgs represents the boot arguments of a bootscript
type ScalewayBootCmdArgs struct {
// Identifier is the unique identifier of boot args
Identifier string `json:"id,omitempty"`

// Value is the content of the cmd args
Value string `json:"value,omitempty"`
}

// ScalewayInitrd represents the initrd used by a bootscript
type ScalewayInitrd struct {
// Identifier is the unique identifier of the initrd
Identifier string `json:"id,omitempty"`

// Path is the path to the initrd used
Path string `json:"path,omitempty"`

// Title is the title of the initrd used
Title string `json:"title,omitempty"`
}

// ScalewayKernel represents a kernel used on servers
type ScalewayKernel struct {
// Identifier is the unique identifier of the kernel
Identifier string `json:"id,omitempty"`

// DTB is the kernel DTB used by this kernel
DTB string `json:"dtb"`

// Path is the path to the kernel image
Path string `json:"path,omitempty"`

// Title is the title of the kernel
Title string `json:"title,omitempty"`
}

// ScalewayBootscript represents a Scaleway Bootscript
type ScalewayBootscript struct {
Bootcmdargs string `json:"bootcmdargs,omitempty"`
Default bool `json:"default,omitempty"`
Dtb string `json:"dtb,omitempty"`
Initrd string `json:"initrd,omitempty"`
Kernel string `json:"kernel,omitempty"`

// Arch is the architecture target of the bootscript
Arch string `json:"architecture,omitempty"`

// Organization is the owner of the bootscript
Organization string `json:"organization,omitempty"`

// Identifier is a unique identifier for the bootscript
Identifier string `json:"id,omitempty"`

// Name is a user-defined name for the bootscript
Title string `json:"title,omitempty"`

// BootCmdArgs represents the arguments used to boot
BootCmdArgs ScalewayBootCmdArgs `json:"bootcmdargs,omitempty"`

// Initrd is the initrd used by this bootscript
Initrd ScalewayInitrd `json:"initrd,omitempty"`

// Kernel is the kernel associated to this server
Kernel ScalewayKernel `json:"kernel,omitempty"`
// Organization is the owner of the bootscript
Organization string `json:"organization,omitempty"`

// Public is true for public bootscripts and false for user bootscripts
Public bool `json:"public,omitempty"`

// Name is a user-defined name for the bootscript
Title string `json:"title,omitempty"`
}

// ScalewayOneBootscript represents the response of a GET /bootscripts/UUID API call
Expand Down