v1.12.9
This commit is contained in:
@@ -127,6 +127,9 @@ type QOS struct {
|
||||
|
||||
// Main information about attached network
|
||||
type RecordNetAttach struct {
|
||||
// Bus number
|
||||
BusNumber uint64 `json:"bus_number"`
|
||||
|
||||
// Connection ID
|
||||
ConnID uint64 `json:"connId"`
|
||||
|
||||
@@ -139,6 +142,9 @@ type RecordNetAttach struct {
|
||||
// Enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// Enable security groups
|
||||
EnableSecGroups bool `json:"enable_secgroups"`
|
||||
|
||||
// FLIPGroup ID
|
||||
FLIPGroupID uint64 `json:"flipgroupId"`
|
||||
|
||||
@@ -148,12 +154,18 @@ type RecordNetAttach struct {
|
||||
// IP address
|
||||
IPAddress string `json:"ipAddress"`
|
||||
|
||||
// Libvirt Settings
|
||||
LibvirtSettings LibvirtSettings `json:"libvirtSettings"`
|
||||
|
||||
// Listen SSH
|
||||
ListenSSH bool `json:"listenSsh"`
|
||||
|
||||
// MAC
|
||||
MAC string `json:"mac"`
|
||||
|
||||
// Maximum transmission unit
|
||||
MTU uint64 `json:"mtu"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
@@ -166,9 +178,18 @@ type RecordNetAttach struct {
|
||||
// Network type
|
||||
NetType string `json:"netType"`
|
||||
|
||||
// Node id
|
||||
NodeID int `json:"nodeId"`
|
||||
|
||||
// PCI slot
|
||||
PCISlot int64 `json:"pciSlot"`
|
||||
|
||||
// SDN interface ID
|
||||
SDNInterfaceID string `json:"sdn_interface_id"`
|
||||
|
||||
// List of security groups
|
||||
SecurityGroups []uint64 `json:"security_groups"`
|
||||
|
||||
// QOS
|
||||
QOS QOS `json:"qos"`
|
||||
|
||||
@@ -178,6 +199,9 @@ type RecordNetAttach struct {
|
||||
// Type
|
||||
Type string `json:"type"`
|
||||
|
||||
// List of trunk tags
|
||||
TrunkTags []uint64 `json:"trunk_tags"`
|
||||
|
||||
// List VNF IDs
|
||||
VNFs []uint64 `json:"vnfs"`
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ type RecordImage struct {
|
||||
// Tech status
|
||||
TechStatus string `json:"techStatus"`
|
||||
|
||||
// Need to clean before destroy
|
||||
ToClean bool `json:"to_clean"`
|
||||
|
||||
// Type
|
||||
Type string `json:"type"`
|
||||
|
||||
@@ -245,6 +248,9 @@ type ItemImage struct {
|
||||
// Tech status
|
||||
TechStatus string `json:"techStatus"`
|
||||
|
||||
// Need to clean before destroy
|
||||
ToClean bool `json:"to_clean"`
|
||||
|
||||
// Type
|
||||
Type string `json:"type"`
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ type Interface struct {
|
||||
// - TRUNK
|
||||
NetType string `url:"netType" json:"netType" validate:"required,kvmx86NetType"`
|
||||
|
||||
// Network ID for connect to,
|
||||
// for EXTNET - external network ID,
|
||||
// for VINS - VINS ID,
|
||||
// Network ID for connect
|
||||
NetID uint64 `url:"netId" json:"netId" validate:"required"`
|
||||
|
||||
// IP address to assign to this VM when connecting to the specified network
|
||||
|
||||
@@ -8,6 +8,47 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
type InterfaceMassCreate struct {
|
||||
// Network type
|
||||
// Should be one of:
|
||||
// - VINS
|
||||
// - EXTNET
|
||||
// - TRUNK
|
||||
NetType string `url:"netType" json:"netType" validate:"required,massCreateNetType"`
|
||||
|
||||
// Network ID for connect
|
||||
NetID uint64 `url:"netId" json:"netId" validate:"required"`
|
||||
|
||||
// IP address to assign to this VM when connecting to the specified network
|
||||
// Required: false
|
||||
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
|
||||
|
||||
// Maximum transmission unit, must be 1-9216
|
||||
// Used only to DPDK net type
|
||||
// Required: false
|
||||
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`
|
||||
|
||||
// MAC address to assign to this VM when connecting to the specified network
|
||||
// Required: false
|
||||
MAC string `url:"mac,omitempty" json:"mac,omitempty" validate:"omitempty"`
|
||||
|
||||
// SDN interface id
|
||||
// Required: false
|
||||
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty"`
|
||||
|
||||
// List of security group IDs to assign to this interface
|
||||
// Required: false
|
||||
SecGroups []uint64 `url:"security_groups,omitempty" json:"security_groups,omitempty"`
|
||||
|
||||
// Flag indicating whether security groups are enabled for this interface
|
||||
// Required: false
|
||||
EnableSecGroups bool `url:"enable_secgroups,omitempty" json:"enable_secgroups,omitempty"`
|
||||
|
||||
// Flag indicating whether this interface is enabled (only for VINS, EXTNET, DPDK, SDN, TRUNK)
|
||||
// Required: false
|
||||
Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
// MassCreateRequest struct to mass create KVM x86
|
||||
type MassCreateRequest struct {
|
||||
// ID of the resource group, which will own this VM
|
||||
@@ -66,7 +107,7 @@ type MassCreateRequest struct {
|
||||
// If not specified, compute will be created with default interface from RG.
|
||||
// To create compute without interfaces, pass initialized empty slice .
|
||||
// Required: false
|
||||
Interfaces []Interface `url:"-" json:"interfaces,omitempty" validate:"omitempty,dive"`
|
||||
Interfaces []InterfaceMassCreate `url:"-" json:"interfaces,omitempty" validate:"omitempty,dive"`
|
||||
|
||||
// Input data for cloud-init facility
|
||||
// Required: false
|
||||
|
||||
Reference in New Issue
Block a user