v1.2.0
This commit is contained in:
@@ -11,38 +11,38 @@ import (
|
||||
type CreateRequest struct {
|
||||
// ID of the resource group, which will own this VM
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Name of this VM.
|
||||
// Must be unique among all VMs (including those in DELETED state) in target resource group
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// Number CPUs to allocate to this VM
|
||||
// Required: true
|
||||
CPU uint64 `url:"cpu"`
|
||||
CPU uint64 `url:"cpu" json:"cpu"`
|
||||
|
||||
// Volume of RAM in MB to allocate to this VM
|
||||
// Required: true
|
||||
RAM uint64 `url:"ram"`
|
||||
RAM uint64 `url:"ram" json:"ram"`
|
||||
|
||||
// ID of the OS image to base this VM on;
|
||||
// Could be boot disk image or CD-ROM image
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// Size of the boot disk in GB
|
||||
// Required: false
|
||||
BootDisk uint64 `url:"bootDisk,omitempty"`
|
||||
BootDisk uint64 `url:"bootDisk,omitempty" json:"bootDisk,omitempty"`
|
||||
|
||||
// ID of SEP to create boot disk on.
|
||||
// Uses images SEP ID if not set
|
||||
// Required: false
|
||||
SEPID uint64 `url:"sepId,omitempty"`
|
||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||
|
||||
// Pool to use if sepId is set, can be also empty if needed to be chosen by system
|
||||
// Required: false
|
||||
Pool string `url:"pool,omitempty"`
|
||||
Pool string `url:"pool,omitempty" json:"pool,omitempty"`
|
||||
|
||||
// Network type
|
||||
// Should be one of:
|
||||
@@ -50,38 +50,38 @@ type CreateRequest struct {
|
||||
// - EXTNET
|
||||
// - NONE
|
||||
// Required: false
|
||||
NetType string `url:"netType,omitempty"`
|
||||
NetType string `url:"netType,omitempty" json:"netType,omitempty"`
|
||||
|
||||
// Network ID for connect to,
|
||||
// for EXTNET - external network ID,
|
||||
// for ViNS - ViNS ID,
|
||||
// when netType is not "NONE"
|
||||
// Required: false
|
||||
NetID uint64 `url:"netId,omitempty"`
|
||||
NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"`
|
||||
|
||||
// IP address to assign to this VM when connecting to the specified network
|
||||
// Required: false
|
||||
IPAddr string `url:"ipAddr,omitempty"`
|
||||
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
|
||||
|
||||
// Input data for cloud-init facility
|
||||
// Required: false
|
||||
Userdata string `url:"userdata,omitempty"`
|
||||
Userdata string `url:"userdata,omitempty" json:"userdata,omitempty"`
|
||||
|
||||
// Text description of this VM
|
||||
// Required: false
|
||||
Description string `url:"desc,omitempty"`
|
||||
Description string `url:"desc,omitempty" json:"desc,omitempty"`
|
||||
|
||||
// Start VM upon success
|
||||
// Required: false
|
||||
Start bool `url:"start,omitempty"`
|
||||
Start bool `url:"start,omitempty" json:"start,omitempty"`
|
||||
|
||||
// System name
|
||||
// Required: false
|
||||
IS string `url:"IS,omitempty"`
|
||||
IS string `url:"IS,omitempty" json:"IS,omitempty"`
|
||||
|
||||
// Compute purpose
|
||||
// Required: false
|
||||
IPAType string `url:"ipaType,omitempty"`
|
||||
IPAType string `url:"ipaType,omitempty" json:"ipaType,omitempty"`
|
||||
}
|
||||
|
||||
func (krq CreateRequest) validate() error {
|
||||
|
||||
@@ -11,33 +11,33 @@ import (
|
||||
type CreateBlankRequest struct {
|
||||
// ID of the resource group, which will own this VM
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Name of this VM.
|
||||
// Must be unique among all VMs (including those in DELETED state) in target resource group
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// Number CPUs to allocate to this VM
|
||||
// Required: true
|
||||
CPU uint64 `url:"cpu"`
|
||||
CPU uint64 `url:"cpu" json:"cpu"`
|
||||
|
||||
// Volume of RAM in MB to allocate to this VM
|
||||
// Required: true
|
||||
RAM uint64 `url:"ram"`
|
||||
RAM uint64 `url:"ram" json:"ram"`
|
||||
|
||||
// Size of the boot disk in GB
|
||||
// Required: true
|
||||
BootDisk uint64 `url:"bootDisk"`
|
||||
BootDisk uint64 `url:"bootDisk" json:"bootDisk"`
|
||||
|
||||
// ID of SEP to create boot disk on.
|
||||
// Uses images SEP ID if not set
|
||||
// Required: true
|
||||
SEPID uint64 `url:"sepId"`
|
||||
SEPID uint64 `url:"sepId" json:"sepId"`
|
||||
|
||||
// Pool to use if SEP ID is set, can be also empty if needed to be chosen by system
|
||||
// Required: true
|
||||
Pool string `url:"pool"`
|
||||
Pool string `url:"pool" json:"pool"`
|
||||
|
||||
// Network type
|
||||
// Should be one of:
|
||||
@@ -45,22 +45,22 @@ type CreateBlankRequest struct {
|
||||
// - EXTNET
|
||||
// - NONE
|
||||
// Required: false
|
||||
NetType string `url:"netType,omitempty"`
|
||||
NetType string `url:"netType,omitempty" json:"netType,omitempty"`
|
||||
|
||||
// Network ID for connect to,
|
||||
// for EXTNET - external network ID,
|
||||
// for VINS - VINS ID,
|
||||
// when network type is not "NONE"
|
||||
// Required: false
|
||||
NetID uint64 `url:"netId,omitempty"`
|
||||
NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"`
|
||||
|
||||
// IP address to assign to this VM when connecting to the specified network
|
||||
// Required: false
|
||||
IPAddr string `url:"ipAddr,omitempty"`
|
||||
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
|
||||
|
||||
// Text description of this VM
|
||||
// Required: false
|
||||
Description string `url:"desc,omitempty"`
|
||||
Description string `url:"desc,omitempty" json:"desc,omitempty"`
|
||||
}
|
||||
|
||||
func (krq CreateBlankRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user