client

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	VirtualNetworkStateNew   = "NEW"
	VirtualNetworkStateReady = "READY"
)
View Source
const (
	VmActionPowerOn  = "POWERON"
	VmActionPowerOff = "POWEROFF"
	VmActionShutdown = "SHUTDOWN"
	VmActionReboot   = "REBOOT"
	VmActionSuspend  = "SUSPEND"
	VmActionReset    = "RESET"

	VmStateNew        = "NEW"
	VmStateDeploying  = "DEPLOYING"
	VmStatePoweredOff = "POWEREDOFF"
	VmStatePoweredOn  = "POWEREDON"
)

noinspection GoUnusedConst

View Source
const (
	DefaultTimeout = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

func (*ApiError) Error

func (e *ApiError) Error() string

type ApiErrorResponseBody

type ApiErrorResponseBody struct {
	Message string `json:"message,omitempty"`
	Status  int    `json:"status,omitempty"`
	Error   string `json:"error,omitempty"`
	Path    string `json:"path,omitempty"`
}

type ApiInfo

type ApiInfo struct {
	Version string `json:"version,omitempty"`
	Name    string `json:"name,omitempty"`
}

type Audit added in v1.3.0

type Audit struct {
	CreatedBy      AuditUserRef `json:"createdBy"`
	CreatedAt      int          `json:"createdAt"`
	LastModifiedBy AuditUserRef `json:"lastModifiedBy"`
	LastModifiedAt int          `json:"lastModifiedAt"`
}

type AuditUserRef added in v1.3.0

type AuditUserRef struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type ClientOptions

type ClientOptions struct {
	Token      string
	BaseUrl    string
	CustomerId string
}

type ComputeCluster

type ComputeCluster struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Disk

type Disk struct {
	Id    string `json:"id,omitempty"`
	Size  uint64 `json:"size"`
	Uuid  string `json:"uuid,omitempty"`
	Label string `json:"label,omitempty"`
}

type DiskUpdate added in v1.1.3

type DiskUpdate struct {
	Id     string `json:"id,omitempty"`
	Size   uint64 `json:"size"`
	Uuid   string `json:"uuid,omitempty"`
	Label  string `json:"label,omitempty"`
	Delete bool   `json:"delete,omitempty"`
}

type KubernetesCluster added in v1.1.3

type KubernetesCluster struct {
	Id      string `json:"id,omitempty"`
	Name    string `json:"name"`
	State   string `json:"state"`
	Version string `json:"version"`
}

type KubernetesClusterCreate added in v1.1.3

type KubernetesClusterCreate struct {
	KubernetesClusterUpdate
	Vips      []string `json:"vips"`
	Endpoints []string `json:"endpoints,omitempty"`
	CNI       string   `json:"cni"`
	Network   string   `json:"network"`
}

type KubernetesClusterExt added in v1.1.3

type KubernetesClusterExt struct {
	KubernetesCluster
	Vips                      []string `json:"vips"`
	Endpoints                 []string `json:"endpoints"`
	MinimalNodes              int      `json:"minimalNodes"`
	MaximalNodes              int      `json:"maximalNodes"`
	AutoUpdate                bool     `json:"autoUpdate"`
	AutoScaleEnabled          bool     `json:"autoScaleEnabled"`
	ControlPlaneCpuCores      int      `json:"controlPlaneCpuCores"`
	ControlPlaneMemoryGb      int      `json:"controlPlaneMemoryGb"`
	ControlPlaneStorageGb     int      `json:"controlPlaneStorageGb"`
	NodeCpuCores              int      `json:"nodeCpuCores"`
	NodeMemoryGb              int      `json:"nodeMemoryGb"`
	NodeStorageGb             int      `json:"nodeStorageGb"`
	ComputeCluster            string   `json:"computeCluster"`
	CNI                       string   `json:"cni"`
	HighAvailableControlPlane bool     `json:"highAvailableControlPlane"`
	Network                   string   `json:"network"`
	Reference                 string   `json:"reference"`
}

type KubernetesClusterKubeConfigRequest added in v1.1.3

type KubernetesClusterKubeConfigRequest struct {
	Endpoint string `json:"endpoint"`
}

type KubernetesClusterKubeConfigResponse added in v1.1.3

type KubernetesClusterKubeConfigResponse struct {
	Config string `json:"config"`
}

type KubernetesClusterService added in v1.1.3

type KubernetesClusterService interface {
	Page(request PageRequest) (*Page, *[]KubernetesCluster, error)
	Get(id string) (*KubernetesClusterExt, error)
	Create(create KubernetesClusterCreate) (*Reference, error)
	Delete(id string) error
	Update(id string, update KubernetesClusterUpdate) error
	GetKubeConfig(id string, endpoint string) (KubernetesClusterKubeConfigResponse, error)
}

type KubernetesClusterServiceImpl added in v1.3.0

type KubernetesClusterServiceImpl struct {
	// contains filtered or unexported fields
}

func (*KubernetesClusterServiceImpl) Create added in v1.3.0

func (*KubernetesClusterServiceImpl) Delete added in v1.3.0

func (*KubernetesClusterServiceImpl) Get added in v1.3.0

func (*KubernetesClusterServiceImpl) GetKubeConfig added in v1.3.0

func (*KubernetesClusterServiceImpl) Page added in v1.3.0

func (*KubernetesClusterServiceImpl) Update added in v1.3.0

type KubernetesClusterUpdate added in v1.1.3

type KubernetesClusterUpdate struct {
	Name                      string `json:"name"`
	Version                   string `json:"version,omitempty"`
	MinimalNodes              int    `json:"minimalNodes"`
	MaximalNodes              int    `json:"maximalNodes,omitempty"`
	AutoUpdate                bool   `json:"autoUpdate"`
	AutoScaleEnabled          bool   `json:"autoScaleEnabled"`
	ControlPlaneCpuCores      int    `json:"controlPlaneCpuCores"`
	ControlPlaneMemoryGb      int    `json:"controlPlaneMemoryGb"`
	ControlPlaneStorageGb     int    `json:"controlPlaneStorageGb"`
	NodeCpuCores              int    `json:"nodeCpuCores"`
	NodeMemoryGb              int    `json:"nodeMemoryGb"`
	NodeStorageGb             int    `json:"nodeStorageGb"`
	ComputeCluster            string `json:"computeCluster"`
	HighAvailableControlPlane bool   `json:"highAvailableControlPlane"`
}

type NetworkInterface

type NetworkInterface struct {
	Id                  string   `json:"id,omitempty"`
	Network             string   `json:"network"`
	Connected           bool     `json:"connected"`
	MacAddress          string   `json:"macAddress,omitempty"`
	DiscoveredAddresses []string `json:"discoveredAddresses,omitempty"`
	AssignedAddresses   []string `json:"assignedAddresses,omitempty"`
	Primary             bool     `json:"primary,omitempty"`
	Label               string   `json:"label,omitempty"`
	Type                string   `json:"type,omitempty"`
}

type NetworkInterfaceUpdate added in v1.1.3

type NetworkInterfaceUpdate struct {
	Id        string `json:"id,omitempty"`
	Network   string `json:"network"`
	Connected bool   `json:"connected"`
	Label     string `json:"label,omitempty"`
	Deleted   bool   `json:"deleted,omitempty"`
}

type OpenConsoleResult

type OpenConsoleResult struct {
	ConsoleUrl string `json:"consoleUrl,omitempty"`
}

type OwnerReference added in v1.2.0

type OwnerReference struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type Page

type Page struct {
	TotalPages       int
	TotalElements    int
	NumberOfElements int
	Size             int
	Number           int
	Content          json.RawMessage
}

type PageRequest added in v1.1.3

type PageRequest struct {
	Page  int
	Size  int
	Sort  string
	Query string
}

type PreviderClient added in v1.3.0

type PreviderClient struct {
	Task              TaskService
	VirtualServer     VirtualServerService
	VirtualNetwork    VirtualNetworkService
	VirtualFirewall   VirtualFirewallService
	KubernetesCluster KubernetesClusterService
	STaaSEnvironment  STaaSEnvironmentService
	// contains filtered or unexported fields
}

func New

func New(options *ClientOptions) (*PreviderClient, error)

noinspection GoUnusedExportedFunction

func (*PreviderClient) ApiInfo added in v1.3.0

func (c *PreviderClient) ApiInfo() (*ApiInfo, error)

func (*PreviderClient) Delete added in v1.3.0

func (c *PreviderClient) Delete(url string, responseBody interface{}) error

func (*PreviderClient) Get added in v1.3.0

func (c *PreviderClient) Get(url string, responseBody interface{}, requestParams *PageRequest) error

func (*PreviderClient) Post added in v1.3.0

func (c *PreviderClient) Post(url string, requestBody, responseBody interface{}) error

func (*PreviderClient) Put added in v1.3.0

func (c *PreviderClient) Put(url string, requestBody, responseBody interface{}) error

type Reference added in v1.3.0

type Reference struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type STaaSCredential added in v1.2.0

type STaaSCredential struct {
	Id                 string `json:"id,omitempty"`
	AuthenticationType string `json:"authenticationType"`
	State              string `json:"state"`
	Initiator          string `json:"initiator"`
}

type STaaSEnvironment added in v1.2.0

type STaaSEnvironment struct {
	Id             string         `json:"id,omitempty"`
	Name           string         `json:"name"`
	State          string         `json:"state"`
	Cluster        string         `json:"cluster"`
	ClusterId      string         `json:"clusterId"`
	Type           string         `json:"type"`
	OwnerReference OwnerReference `json:"ownerReference,omitempty"`
}

type STaaSEnvironmentCreate added in v1.2.0

type STaaSEnvironmentCreate struct {
	STaaSEnvironment
	Windows bool   `json:"windows,omitempty"`
	Type    string `json:"type"`
	Cluster string `json:"cluster"`
}

type STaaSEnvironmentDelete added in v1.2.0

type STaaSEnvironmentDelete struct {
	Force bool `json:"force"`
}

type STaaSEnvironmentExt added in v1.2.0

type STaaSEnvironmentExt struct {
	STaaSEnvironment
	Volumes              []STaaSVolume     `json:"volumes,omitempty"`
	Networks             []STaaSNetwork    `json:"networks,omitempty"`
	Credentials          []STaaSCredential `json:"credentials,omitempty"`
	Routes               []STaaSRoute      `json:"routes,omitempty"`
	Windows              bool              `json:"windows,omitempty"`
	SynchronousClusterId string            `json:"synchronousClusterId,omitempty"`
}

type STaaSEnvironmentService added in v1.2.0

type STaaSEnvironmentService interface {
	Page(request PageRequest) (*Page, *[]STaaSEnvironment, error)
	Get(id string) (*STaaSEnvironmentExt, error)
	Create(create STaaSEnvironmentCreate) (*Reference, error)
	Delete(id string, delete STaaSEnvironmentDelete) error
	Update(id string, update STaaSEnvironmentUpdate) error
	CreateVolume(id string, create STaaSVolumeCreate) error
	UpdateVolume(id string, volumeId string, update STaaSVolumeUpdate) error
	DeleteVolume(id string, volumeId string, delete STaaSVolumeDelete) error
	CreateNetwork(id string, create STaaSNetworkCreate) error
	DeleteNetwork(id string, networkId string) error
}

type STaaSEnvironmentServiceImpl added in v1.3.0

type STaaSEnvironmentServiceImpl struct {
	// contains filtered or unexported fields
}

func (*STaaSEnvironmentServiceImpl) Create added in v1.3.0

func (*STaaSEnvironmentServiceImpl) CreateNetwork added in v1.3.0

func (c *STaaSEnvironmentServiceImpl) CreateNetwork(id string, create STaaSNetworkCreate) error

func (*STaaSEnvironmentServiceImpl) CreateVolume added in v1.3.0

func (c *STaaSEnvironmentServiceImpl) CreateVolume(id string, create STaaSVolumeCreate) error

func (*STaaSEnvironmentServiceImpl) Delete added in v1.3.0

func (*STaaSEnvironmentServiceImpl) DeleteNetwork added in v1.3.0

func (c *STaaSEnvironmentServiceImpl) DeleteNetwork(id string, networkId string) error

func (*STaaSEnvironmentServiceImpl) DeleteVolume added in v1.3.0

func (c *STaaSEnvironmentServiceImpl) DeleteVolume(id string, volumeId string, delete STaaSVolumeDelete) error

func (*STaaSEnvironmentServiceImpl) Get added in v1.3.0

func (*STaaSEnvironmentServiceImpl) Page added in v1.3.0

func (*STaaSEnvironmentServiceImpl) Update added in v1.3.0

func (*STaaSEnvironmentServiceImpl) UpdateVolume added in v1.3.0

func (c *STaaSEnvironmentServiceImpl) UpdateVolume(id string, volumeId string, create STaaSVolumeUpdate) error

type STaaSEnvironmentUpdate added in v1.2.0

type STaaSEnvironmentUpdate struct {
	STaaSEnvironment
	Windows bool `json:"windows,omitempty"`
}

type STaaSNetwork added in v1.2.0

type STaaSNetwork struct {
	Id          string   `json:"id,omitempty"`
	State       string   `json:"state"`
	NetworkName string   `json:"networkName"`
	NetworkId   string   `json:"networkId"`
	IpAddresses []string `json:"ipAddresses,omitempty"`
	Cidr        string   `json:"cidr,omitempty"`
}

type STaaSNetworkCreate added in v1.2.0

type STaaSNetworkCreate struct {
	Network string `json:"network"`
	Cidr    string `json:"cidr"`
}

type STaaSRoute added in v1.2.0

type STaaSRoute struct {
	Id          string `json:"id,omitempty"`
	Destination string `json:"destination"`
	State       string `json:"state"`
	Gateway     string `json:"gateway"`
}

type STaaSVolume added in v1.2.0

type STaaSVolume struct {
	Id                         string   `json:"id,omitempty"`
	Name                       string   `json:"name"`
	State                      string   `json:"state"`
	Type                       string   `json:"type"`
	SynchronousEnvironmentId   string   `json:"synchronousEnvironmentId,omitempty"`
	SynchronousEnvironmentName string   `json:"synchronousEnvironmentName,omitempty"`
	AllowedIpsRo               []string `json:"allowedIpsRo,omitempty"`
	AllowedIpsRw               []string `json:"allowedIpsRw,omitempty"`
	SizeMb                     int      `json:"sizeMb"`
}

type STaaSVolumeCreate added in v1.2.0

type STaaSVolumeCreate struct {
	Name                       string   `json:"name"`
	Type                       string   `json:"type"`
	SynchronousEnvironmentId   string   `json:"synchronousEnvironmentId,omitempty"`
	SynchronousEnvironmentName string   `json:"synchronousEnvironmentName,omitempty"`
	AllowedIpsRo               []string `json:"allowedIpsRo,omitempty"`
	AllowedIpsRw               []string `json:"allowedIpsRw,omitempty"`
	SizeMb                     int      `json:"sizeMb"`
}

type STaaSVolumeDelete added in v1.2.0

type STaaSVolumeDelete struct {
	Force bool `json:"force"`
}

type STaaSVolumeUpdate added in v1.2.0

type STaaSVolumeUpdate struct {
	STaaSVolumeCreate
}

type Task

type Task struct {
	Id            string
	Completed     bool
	CompletedDate *int
	StartedDate   *int
	User          string
	Success       bool
	Error         bool
	ErrorMessage  string
	Progress      int
	TaskDate      *int
	TaskType      string
}

type TaskService

type TaskService interface {
	List() (*[]Task, error)
	Get(id string) (*Task, error)
	WaitFor(id string, timeoutDuration time.Duration) (*Task, error)
	WaitForTask(task *Task, timeoutDuration time.Duration) (*Task, error)
}

type TaskServiceOp

type TaskServiceOp struct {
	// contains filtered or unexported fields
}

func (*TaskServiceOp) Get

func (c *TaskServiceOp) Get(id string) (*Task, error)

func (*TaskServiceOp) List

func (c *TaskServiceOp) List() (*[]Task, error)

func (*TaskServiceOp) WaitFor

func (c *TaskServiceOp) WaitFor(id string, timeoutDuration time.Duration) (*Task, error)

func (*TaskServiceOp) WaitForTask

func (c *TaskServiceOp) WaitForTask(task *Task, timeoutDuration time.Duration) (*Task, error)

type VirtualFirewall added in v1.3.0

type VirtualFirewall struct {
	Id          string   `json:"id,omitempty"`
	Name        string   `json:"name"`
	Group       string   `json:"group,omitempty"`
	GroupName   string   `json:"groupName,omitempty"`
	TypeLabel   string   `json:"typeLabel"`
	TypeName    string   `json:"typeName"`
	Network     string   `json:"network"`
	NetworkName string   `json:"networkName"`
	WanAddress  []string `json:"wanAddress,omitempty"`
	LanAddress  string   `json:"lanAddress"`
	State       string   `json:"state"`
}

type VirtualFirewallCreate added in v1.3.0

type VirtualFirewallCreate struct {
	VirtualFirewallUpdate
	Type string `json:"type"`
}

type VirtualFirewallExt added in v1.3.0

type VirtualFirewallExt struct {
	VirtualFirewall
	TerminationProtected bool     `json:"terminationProtected"`
	Audit                Audit    `json:"audit"`
	DhcpEnabled          bool     `json:"dhcpEnabled"`
	DhcpRangeStart       string   `json:"dhcpRangeStart"`
	DhcpRangeEnd         string   `json:"dhcpRangeEnd"`
	LocalDomainName      string   `json:"localDomainName"`
	DnsEnabled           bool     `json:"dnsEnabled"`
	Nameservers          []string `json:"nameservers"`
	IcmpWanEnabled       bool     `json:"icmpWanEnabled"`
	IcmpLanEnabled       bool     `json:"icmpLanEnabled"`
}

type VirtualFirewallNatRule added in v1.3.0

type VirtualFirewallNatRule struct {
	Id             string `json:"id"`
	Description    string `json:"description"`
	Active         bool   `json:"active"`
	Port           int    `json:"port"`
	Protocol       string `json:"protocol"`
	Source         string `json:"source"`
	Destination    string `json:"destination"`
	NatDestination string `json:"natDestination"`
	NatPort        int    `json:"natPort"`
	WanInterface   string `json:"wanInterface"`
}

type VirtualFirewallNatRuleCreate added in v1.3.0

type VirtualFirewallNatRuleCreate struct {
	Description    string `json:"description"`
	Active         bool   `json:"active"`
	Port           int    `json:"port"`
	Protocol       string `json:"protocol"`
	Source         string `json:"source"`
	NatDestination string `json:"natDestination"`
	NatPort        int    `json:"natPort"`
}

type VirtualFirewallService added in v1.3.0

type VirtualFirewallService interface {
	Page(request PageRequest) (*Page, *[]VirtualFirewall, error)
	Get(id string) (*VirtualFirewallExt, error)
	Create(create VirtualFirewallCreate) (*Reference, error)
	Delete(id string) error
	Update(id string, update VirtualFirewallUpdate) error
	PageNatRules(firewallId string, request PageRequest) (*Page, *[]VirtualFirewallNatRule, error)
	CreateNatRule(firewallId string, create VirtualFirewallNatRuleCreate) (*Reference, error)
	UpdateNatRule(firewallId string, id string, create VirtualFirewallNatRuleCreate) error
	DeleteNatRule(firewallId string, id string) error
}

type VirtualFirewallServiceImpl added in v1.3.0

type VirtualFirewallServiceImpl struct {
	// contains filtered or unexported fields
}

func (*VirtualFirewallServiceImpl) Create added in v1.3.0

func (*VirtualFirewallServiceImpl) CreateNatRule added in v1.3.0

func (c *VirtualFirewallServiceImpl) CreateNatRule(firewallId string, create VirtualFirewallNatRuleCreate) (*Reference, error)

func (*VirtualFirewallServiceImpl) Delete added in v1.3.0

func (c *VirtualFirewallServiceImpl) Delete(id string) error

func (*VirtualFirewallServiceImpl) DeleteNatRule added in v1.3.0

func (c *VirtualFirewallServiceImpl) DeleteNatRule(firewallId string, id string) error

func (*VirtualFirewallServiceImpl) Get added in v1.3.0

func (*VirtualFirewallServiceImpl) Page added in v1.3.0

func (*VirtualFirewallServiceImpl) PageNatRules added in v1.3.0

func (c *VirtualFirewallServiceImpl) PageNatRules(firewallId string, request PageRequest) (*Page, *[]VirtualFirewallNatRule, error)

NAT Rules

func (*VirtualFirewallServiceImpl) Update added in v1.3.0

func (*VirtualFirewallServiceImpl) UpdateNatRule added in v1.3.0

func (c *VirtualFirewallServiceImpl) UpdateNatRule(firewallId string, id string, create VirtualFirewallNatRuleCreate) error

type VirtualFirewallUpdate added in v1.3.0

type VirtualFirewallUpdate struct {
	Name                 string   `json:"name"`
	Group                string   `json:"group,omitempty"`
	Network              string   `json:"network"`
	LanAddress           string   `json:"lanAddress"`
	DhcpEnabled          bool     `json:"dhcpEnabled"`
	DhcpRangeStart       net.IP   `json:"dhcpRangeStart"`
	DhcpRangeEnd         net.IP   `json:"dhcpRangeEnd"`
	LocalDomainName      string   `json:"localDomainName"`
	DnsEnabled           bool     `json:"dnsEnabled"`
	Nameservers          []net.IP `json:"nameservers"`
	TerminationProtected bool     `json:"terminationProtected"`
	IcmpWanEnabled       bool     `json:"icmpWanEnabled"`
	IcmpLanEnabled       bool     `json:"icmpLanEnabled"`
}

type VirtualMachine

type VirtualMachine struct {
	Id               string `json:"id,omitempty"`
	Name             string `json:"name"`
	Group            string `json:"group,omitempty"`
	GroupName        string `json:"groupName,omitempty"`
	ComputeCluster   string `json:"computeCluster"`
	CpuCores         int    `json:"cpuCores"`
	Memory           uint64 `json:"memory"`
	Template         string `json:"template"`
	GuestId          string `json:"guestId"`
	State            string `json:"state"`
	TotalDiskSize    int    `json:"totalDiskSize"`
	HasSnapshots     bool   `json:"hasSnapshots"`
	MarkedAsTemplate bool   `json:"markedAsTemplate"`
	Managed          bool   `json:"managed"`
}

type VirtualMachineCreate

type VirtualMachineCreate struct {
	VirtualMachineExt
	Template             string `json:"template,omitempty"`
	SourceVirtualMachine string `json:"sourceVirtualMachine,omitempty"`
	UserData             string `json:"userData,omitempty"`
	GuestId              string `json:"guestId,omitempty"`
	ProvisioningType     string `json:"provisioningType,omitempty"`
	PowerOnAfterClone    bool   `json:"powerOnAfterClone,omitempty"`
}

type VirtualMachineExt

type VirtualMachineExt struct {
	VirtualMachine
	Hostname                     string             `json:"hostname"`
	Tags                         []string           `json:"tags"`
	Disks                        []Disk             `json:"disks"`
	NetworkInterfaces            []NetworkInterface `json:"networkInterfaces"`
	TerminationProtectionEnabled bool               `json:"terminationProtectionEnabled"`
	Flavor                       string             `json:"flavor,omitempty"`
	GuestToolsStatus             string             `json:"guestToolsStatus"`
	InitialUsername              string             `json:"initialUsername"`
	InitialPassword              string             `json:"initialPassword"`
	CreatedAt                    int                `json:"createdAt"`
	CreatedBy                    string             `json:"createdBy"`
	LastModifiedAt               int                `json:"lastModifiedAt"`
	LastModifiedBy               string             `json:"lastModifiedBy"`
}

type VirtualMachineTask

type VirtualMachineTask struct {
	Task
	VirtualMachine     string
	VirtualMachineName string
}

type VirtualMachineTemplate

type VirtualMachineTemplate struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Version     int    `json:"version"`
	Category    string `json:"category,omitempty"`
	Icon        string `json:"icon,omitempty"`
}

type VirtualMachineUpdate added in v1.1.3

type VirtualMachineUpdate struct {
	VirtualMachine
	Tags                         []string                 `json:"tags"`
	Disks                        []DiskUpdate             `json:"disks"`
	NetworkInterfaces            []NetworkInterfaceUpdate `json:"networkInterfaces,"`
	TerminationProtectionEnabled bool                     `json:"terminationProtectionEnabled"`
	Flavor                       string                   `json:"flavor,omitempty"`
}

type VirtualNetwork

type VirtualNetwork struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	Group     string `json:"group,omitempty"`
	GroupName string `json:"groupName,omitempty"`
	Type      string `json:"type"`
	Managed   bool   `json:"managed"`
	State     string `json:"state"`
}

type VirtualNetworkService

type VirtualNetworkService interface {
	Page(request PageRequest) (*Page, *[]VirtualNetwork, error)
	Get(id string) (*VirtualNetwork, error)
	Create(vn *VirtualNetworkUpdate) (*VirtualNetworkTask, error)
	Delete(id string) (*VirtualNetworkTask, error)
	Update(id string, vn *VirtualNetworkUpdate) (*VirtualNetworkTask, error)
}

type VirtualNetworkServiceImpl added in v1.3.0

type VirtualNetworkServiceImpl struct {
	// contains filtered or unexported fields
}

func (*VirtualNetworkServiceImpl) Create added in v1.3.0

func (*VirtualNetworkServiceImpl) Delete added in v1.3.0

func (*VirtualNetworkServiceImpl) Get added in v1.3.0

func (*VirtualNetworkServiceImpl) Page added in v1.3.0

func (*VirtualNetworkServiceImpl) Update added in v1.3.0

type VirtualNetworkTask

type VirtualNetworkTask struct {
	Task
	VirtualNetwork     string
	VirtualNetworkName string
}

type VirtualNetworkUpdate

type VirtualNetworkUpdate struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Group string `json:"group,omitempty"`
}

type VirtualServerService added in v1.3.0

type VirtualServerService interface {
	ComputeClusterList() (*[]ComputeCluster, error)
	VirtualMachineTemplateList() (*[]VirtualMachineTemplate, error)
	Page(request PageRequest) (*Page, *[]VirtualMachine, error)
	Get(id string) (*VirtualMachineExt, error)
	Create(vm *VirtualMachineCreate) (*VirtualMachineTask, error)
	Delete(id string) (*VirtualMachineTask, error)
	Update(id string, vm *VirtualMachineUpdate) (*VirtualMachineTask, error)
	Control(id string, action string) (*VirtualMachineTask, error)
	OpenConsole(id string) (*OpenConsoleResult, error)
}

type VirtualServerServiceImpl added in v1.3.0

type VirtualServerServiceImpl struct {
	// contains filtered or unexported fields
}

func (*VirtualServerServiceImpl) ComputeClusterList added in v1.3.0

func (c *VirtualServerServiceImpl) ComputeClusterList() (*[]ComputeCluster, error)

func (*VirtualServerServiceImpl) Control added in v1.3.0

func (c *VirtualServerServiceImpl) Control(id string, action string) (*VirtualMachineTask, error)

func (*VirtualServerServiceImpl) Create added in v1.3.0

func (*VirtualServerServiceImpl) Delete added in v1.3.0

func (*VirtualServerServiceImpl) Get added in v1.3.0

func (*VirtualServerServiceImpl) OpenConsole added in v1.3.0

func (c *VirtualServerServiceImpl) OpenConsole(id string) (*OpenConsoleResult, error)

func (*VirtualServerServiceImpl) Page added in v1.3.0

func (*VirtualServerServiceImpl) Update added in v1.3.0

func (*VirtualServerServiceImpl) VirtualMachineTemplateList added in v1.3.0

func (c *VirtualServerServiceImpl) VirtualMachineTemplateList() (*[]VirtualMachineTemplate, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL