v1.2.0
This commit is contained in:
@@ -11,11 +11,11 @@ import (
|
||||
type ComputeCISetRequest struct {
|
||||
// ID of the image
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// ID of the compute CI
|
||||
// Required: true
|
||||
ComputeCIID uint64 `url:"computeciId"`
|
||||
ComputeCIID uint64 `url:"computeciId" json:"computeciId"`
|
||||
}
|
||||
|
||||
func (irq ComputeCISetRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ComputeCIUnsetRequest struct {
|
||||
// ID of the image
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
}
|
||||
|
||||
func (irq ComputeCIUnsetRequest) validate() error {
|
||||
|
||||
@@ -13,47 +13,47 @@ import (
|
||||
type CreateCDROMImageRequest struct {
|
||||
// Name of the rescue disk
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// URL where to download ISO from
|
||||
// Required: true
|
||||
URL string `url:"url"`
|
||||
URL string `url:"url" json:"url"`
|
||||
|
||||
// Grid (platform) ID where this CD-ROM image should be create in
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// Account ID to make the image exclusive
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty"`
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||
|
||||
// Storage endpoint provider ID for place rescue CD
|
||||
// Required: false
|
||||
SEPID uint64 `url:"sep_id,omitempty"`
|
||||
SEPID uint64 `url:"sep_id,omitempty" json:"sep_id,omitempty"`
|
||||
|
||||
// Pool for place rescue CD
|
||||
// Required: false
|
||||
PoolName string `url:"pool_name,omitempty"`
|
||||
PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"`
|
||||
|
||||
// Username for remote media download
|
||||
// Required: false
|
||||
UsernameDL string `url:"usernameDL,omitempty"`
|
||||
UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"`
|
||||
|
||||
// Password for remote media download
|
||||
// Required: false
|
||||
PasswordDl string `url:"passwordDL,omitempty"`
|
||||
PasswordDl string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"`
|
||||
|
||||
// Binary architecture of this image
|
||||
// Should be one of:
|
||||
// - X86_64
|
||||
// - PPC64_LE
|
||||
// Required: false
|
||||
Architecture string `url:"architecture,omitempty"`
|
||||
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`
|
||||
|
||||
// List of types of compute suitable for image.
|
||||
// Example: [ "KVM_X86" ]
|
||||
// Required: true
|
||||
Drivers []string `url:"drivers"`
|
||||
Drivers []string `url:"drivers" json:"drivers"`
|
||||
}
|
||||
|
||||
func (irq CreateCDROMImageRequest) validate() error {
|
||||
|
||||
@@ -13,22 +13,22 @@ import (
|
||||
type CreateRequest struct {
|
||||
// Name of the rescue disk
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// URL where to download media from
|
||||
// Required: true
|
||||
URL string `url:"url"`
|
||||
URL string `url:"url" json:"url"`
|
||||
|
||||
// Grid (platform) ID where this template should be create in
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// Boot type of image
|
||||
// Should be one of:
|
||||
// - bios
|
||||
// - UEFI
|
||||
// Required: true
|
||||
BootType string `url:"boottype"`
|
||||
BootType string `url:"boottype" json:"boottype"`
|
||||
|
||||
// Image type
|
||||
// Should be one of:
|
||||
@@ -36,55 +36,55 @@ type CreateRequest struct {
|
||||
// - windows
|
||||
// - or other
|
||||
// Required: true
|
||||
ImageType string `url:"imagetype"`
|
||||
ImageType string `url:"imagetype" json:"imagetype"`
|
||||
|
||||
// Does this machine supports hot resize
|
||||
// Required: false
|
||||
HotResize bool `url:"hotresize,omitempty"`
|
||||
HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"`
|
||||
|
||||
// Optional username for the image
|
||||
// Required: false
|
||||
Username string `url:"username,omitempty"`
|
||||
Username string `url:"username,omitempty" json:"username,omitempty"`
|
||||
|
||||
// Optional password for the image
|
||||
// Required: false
|
||||
Password string `url:"password,omitempty"`
|
||||
Password string `url:"password,omitempty" json:"password,omitempty"`
|
||||
|
||||
// Account ID to make the image exclusive
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty"`
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||
|
||||
// Username for upload binary media
|
||||
// Required: false
|
||||
UsernameDL string `url:"usernameDL,omitempty"`
|
||||
UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"`
|
||||
|
||||
// Password for upload binary media
|
||||
// Required: false
|
||||
PasswordDL string `url:"passwordDL,omitempty"`
|
||||
PasswordDL string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"`
|
||||
|
||||
// Storage endpoint provider ID
|
||||
// Required: false
|
||||
SEPID uint64 `url:"sepId,omitempty"`
|
||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||
|
||||
// Pool for image create
|
||||
// Required: false
|
||||
PoolName string `url:"poolName,omitempty"`
|
||||
PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"`
|
||||
|
||||
// Binary architecture of this image
|
||||
// Should be one of:
|
||||
// - X86_64
|
||||
// - PPC64_LE
|
||||
// Required: false
|
||||
Architecture string `url:"architecture,omitempty"`
|
||||
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`
|
||||
|
||||
// List of types of compute suitable for image
|
||||
// Example: [ "KVM_X86" ]
|
||||
// Required: true
|
||||
Drivers []string `url:"drivers"`
|
||||
Drivers []string `url:"drivers" json:"drivers"`
|
||||
|
||||
// Bootable image or not
|
||||
// Required: false
|
||||
Bootable bool `url:"bootable,omitempty"`
|
||||
Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"`
|
||||
}
|
||||
|
||||
func (irq CreateRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type CreateVirtualRequest struct {
|
||||
// Name of the virtual image to create
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// ID of real image to link this virtual image to upon creation
|
||||
// Required: true
|
||||
TargetID uint64 `url:"targetId"`
|
||||
TargetID uint64 `url:"targetId" json:"targetId"`
|
||||
}
|
||||
|
||||
func (irq CreateVirtualRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type DeleteRequest struct {
|
||||
// ID of the image to delete
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: true
|
||||
Reason string `url:"reason"`
|
||||
Reason string `url:"reason" json:"reason"`
|
||||
|
||||
// Whether to completely delete the image
|
||||
// Required: false
|
||||
Permanently bool `url:"permanently,omitempty"`
|
||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
||||
}
|
||||
|
||||
func (irq DeleteRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type DeleteCDROMImageRequest struct {
|
||||
// ID of the CD-ROM image to delete
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// Whether to completely delete the CD-ROM image, needs to be unused
|
||||
// Required: true
|
||||
Permanently bool `url:"permanently"`
|
||||
Permanently bool `url:"permanently" json:"permanently"`
|
||||
}
|
||||
|
||||
func (irq DeleteCDROMImageRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type DeleteImagesRequest struct {
|
||||
// List of images to be deleted
|
||||
// Required: true
|
||||
ImageIDs []uint64 `url:"imageIds"`
|
||||
ImageIDs []uint64 `url:"imageIds" json:"imageIds"`
|
||||
|
||||
// Reason for action
|
||||
// Required: true
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
|
||||
// Whether to completely delete the images
|
||||
// Required: true
|
||||
Permanently bool `url:"permanently,omitempty"`
|
||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
||||
}
|
||||
|
||||
func (irq DeleteImagesRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DisableRequest struct {
|
||||
// ID of image to be disabled
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
}
|
||||
|
||||
func (irq DisableRequest) validate() error {
|
||||
|
||||
@@ -11,31 +11,31 @@ import (
|
||||
type EditRequest struct {
|
||||
// ID of the image to edit
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// Name for the image
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty"`
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// Username for the image
|
||||
// Required: false
|
||||
Username string `url:"username,omitempty"`
|
||||
Username string `url:"username,omitempty" json:"username,omitempty"`
|
||||
|
||||
// Password for the image
|
||||
// Required: false
|
||||
Password string `url:"password,omitempty"`
|
||||
Password string `url:"password,omitempty" json:"password,omitempty"`
|
||||
|
||||
// Account ID to make the image exclusive
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty"`
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||
|
||||
// Does this machine supports hot resize
|
||||
// Required: false
|
||||
HotResize bool `url:"hotresize,omitempty"`
|
||||
HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"`
|
||||
|
||||
// Does this image boot OS
|
||||
// Required: false
|
||||
Bootable bool `url:"bootable,omitempty"`
|
||||
Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"`
|
||||
}
|
||||
|
||||
func (irq EditRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type EnableRequest struct {
|
||||
// ID of image to be enabled
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
}
|
||||
|
||||
func (irq EnableRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetRequest struct {
|
||||
// ID of image
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
}
|
||||
|
||||
func (irq GetRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type LinkRequest struct {
|
||||
// ID of the virtual image
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// ID of real image to link this virtual image to
|
||||
// Required: true
|
||||
TargetID uint64 `url:"targetId"`
|
||||
TargetID uint64 `url:"targetId" json:"targetId"`
|
||||
}
|
||||
|
||||
func (irq LinkRequest) validate() error {
|
||||
|
||||
@@ -10,19 +10,19 @@ import (
|
||||
type ListRequest struct {
|
||||
// Filter images by storage endpoint provider ID
|
||||
// Required: false
|
||||
SepID uint64 `url:"sepId,omitempty"`
|
||||
SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||
|
||||
// Filter images by account ID availability
|
||||
// Required: false
|
||||
SharedWith uint64 `url:"sharedWith,omitempty"`
|
||||
SharedWith uint64 `url:"sharedWith,omitempty" json:"sharedWith,omitempty"`
|
||||
|
||||
// Page number
|
||||
// Required: false
|
||||
Page uint64 `url:"page,omitempty"`
|
||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
// Page size
|
||||
// Required: false
|
||||
Size uint64 `url:"size,omitempty"`
|
||||
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
|
||||
}
|
||||
|
||||
// List gets list of information about images
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type ListStacksRequest struct {
|
||||
// Image ID
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// Page number
|
||||
// Required: false
|
||||
Page uint64 `url:"page,omitempty"`
|
||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
// Page size
|
||||
// Required: false
|
||||
Size uint64 `url:"size,omitempty"`
|
||||
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
|
||||
}
|
||||
|
||||
func (irq ListStacksRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type RenameRequest struct {
|
||||
// ID of the virtual image to rename
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// New name
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
}
|
||||
|
||||
func (irq RenameRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type ShareRequest struct {
|
||||
// ID of the image to share
|
||||
// Required: true
|
||||
ImageId uint64 `url:"imageId"`
|
||||
ImageId uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// List of account IDs
|
||||
// Required: true
|
||||
AccountIDs []uint64 `url:"accounts"`
|
||||
AccountIDs []uint64 `url:"accounts" json:"accounts"`
|
||||
}
|
||||
|
||||
func (irq ShareRequest) validate() error {
|
||||
|
||||
@@ -13,22 +13,22 @@ import (
|
||||
type SyncCreateRequest struct {
|
||||
// Name of the rescue disk
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// URL where to download media from
|
||||
// Required: true
|
||||
URL string `url:"url"`
|
||||
URL string `url:"url" json:"url"`
|
||||
|
||||
// Grid (platform) ID where this template should be create in
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// Boot type of image
|
||||
// Should be one of:
|
||||
// - bios
|
||||
// - UEFI
|
||||
// Required: true
|
||||
BootType string `url:"boottype"`
|
||||
BootType string `url:"boottype" json:"boottype"`
|
||||
|
||||
// Image type
|
||||
// Should be one of:
|
||||
@@ -36,55 +36,55 @@ type SyncCreateRequest struct {
|
||||
// - windows
|
||||
// - or other
|
||||
// Required: true
|
||||
ImageType string `url:"imagetype"`
|
||||
ImageType string `url:"imagetype" json:"imagetype"`
|
||||
|
||||
// Does this machine supports hot resize
|
||||
// Required: false
|
||||
HotResize bool `url:"hotresize,omitempty"`
|
||||
HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"`
|
||||
|
||||
// Optional username for the image
|
||||
// Required: false
|
||||
Username string `url:"username,omitempty"`
|
||||
Username string `url:"username,omitempty" json:"username,omitempty"`
|
||||
|
||||
// Optional password for the image
|
||||
// Required: false
|
||||
Password string `url:"password,omitempty"`
|
||||
Password string `url:"password,omitempty" json:"password,omitempty"`
|
||||
|
||||
// Account ID to make the image exclusive
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty"`
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||
|
||||
// Username for upload binary media
|
||||
// Required: false
|
||||
UsernameDL string `url:"usernameDL,omitempty"`
|
||||
UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"`
|
||||
|
||||
// Password for upload binary media
|
||||
// Required: false
|
||||
PasswordDL string `url:"passwordDL,omitempty"`
|
||||
PasswordDL string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"`
|
||||
|
||||
// Storage endpoint provider ID
|
||||
// Required: false
|
||||
SEPID uint64 `url:"sepId,omitempty"`
|
||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||
|
||||
// Pool for image create
|
||||
// Required: false
|
||||
PoolName string `url:"poolName,omitempty"`
|
||||
PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"`
|
||||
|
||||
// Binary architecture of this image
|
||||
// Should be one of:
|
||||
// - X86_64
|
||||
// - PPC64_LE
|
||||
// Required: false
|
||||
Architecture string `url:"architecture,omitempty"`
|
||||
Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"`
|
||||
|
||||
// List of types of compute suitable for image
|
||||
// Example: [ "KVM_X86" ]
|
||||
// Required: true
|
||||
Drivers []string `url:"drivers"`
|
||||
Drivers []string `url:"drivers" json:"drivers"`
|
||||
|
||||
// Bootable image or not
|
||||
// Required: false
|
||||
Bootable bool `url:"bootable,omitempty"`
|
||||
Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"`
|
||||
}
|
||||
|
||||
func (irq SyncCreateRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type UpdateNodesRequest struct {
|
||||
// Image ID
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// List of stacks
|
||||
// Required: false
|
||||
EnabledStacks []uint64 `url:"enabledStacks,omitempty"`
|
||||
EnabledStacks []uint64 `url:"enabledStacks,omitempty" json:"enabledStacks,omitempty"`
|
||||
}
|
||||
|
||||
func (irq UpdateNodesRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user