abiquo_api

package module
v0.0.0-...-d41ba5a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 17 Imported by: 2

README

Abiquo API Go client

This is a basic client for the Abiquo API implemented in Go.

You can include this library to your project to interact with an instance of the Abiquo API.

For further reference check the GoDoc

Pull requests welcome!

License and Authors

Copyright:: 2014, Abiquo

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbiquoClient

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

func GetClient

func GetClient(apiurl string, user string, pass string, insecure bool) *AbiquoClient

func GetOAuthClient

func GetOAuthClient(apiurl string, api_key string, api_secret string, token string, token_secret string, insecure bool) *AbiquoClient

func (*AbiquoClient) GetConfigProperties

func (c *AbiquoClient) GetConfigProperties() ([]ConfigProperty, error)

func (*AbiquoClient) GetConfigProperty

func (c *AbiquoClient) GetConfigProperty(name string) (ConfigProperty, error)

func (*AbiquoClient) GetEvents

func (c *AbiquoClient) GetEvents(params map[string]string) ([]Event, error)

func (*AbiquoClient) GetVDCs

func (c *AbiquoClient) GetVDCs() ([]VDC, error)

func (*AbiquoClient) GetVMByUrl

func (c *AbiquoClient) GetVMByUrl(vm_url string) (VirtualMachine, error)

func (*AbiquoClient) Login

func (c *AbiquoClient) Login() (User, error)

type AbstractCollection

type AbstractCollection struct {
	Links     []Link
	TotalSize int
}

Generic Collection

func (*AbstractCollection) GetNext

func (c *AbstractCollection) GetNext() Link

func (*AbstractCollection) HasNext

func (c *AbstractCollection) HasNext() bool

type AcceptedRequest

type AcceptedRequest struct {
	DTO
	Message string `json:"message,omitempty"`
}

type ConfigProperty

type ConfigProperty struct {
	DTO
	ID          int    `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Value       string `json:"value,omitempty"`
	Description string `json:"description,omitempty"`
}

type ConfigPropertyCollection

type ConfigPropertyCollection struct {
	AbstractCollection
	Collection []ConfigProperty
}

type DTO

type DTO struct {
	Links []Link `json:"links,omitempty"`
}

Generic DTO

func (d *DTO) FollowLink(rel string, c *AbiquoClient) (*resty.Response, error)

func (*DTO) FollowLinkWithParams

func (d *DTO) FollowLinkWithParams(rel string, extraParams string, c *AbiquoClient) (*resty.Response, error)
func (d *DTO) GetLink(rel string) (Link, error)

func (*DTO) Refresh

func (d *DTO) Refresh(c *AbiquoClient) (*resty.Response, error)

type DatastoreTier

type DatastoreTier struct {
	DTO
	ID                      int    `json:"id,omitempty"`
	Name                    string `json:"name,omitempty"`
	Description             string `json:"description,omitempty"`
	Enabled                 bool   `json:"enabled,omitempty"`
	DefaultAllowed          bool   `json:"defaultAllowed,omitempty"`
	StorageAllocationPolicy string `json:"storageAllocationPolicy,omitempty"`
}

type DatastoreTierCollection

type DatastoreTierCollection struct {
	AbstractCollection
	Collection []DatastoreTier
}

type Device

type Device struct {
	DTO
	Endpoint   string `json:"endpoint,omitempty"`
	Name       string `json:"name,omitempty"`
	VdcDefault bool   `json:"vdcDefault,omitempty"`
}

func (*Device) CreateFirewall

func (d *Device) CreateFirewall(v VDC, name string, description string, c *AbiquoClient) (Firewall, error)

func (*Device) GetFirewalls

func (d *Device) GetFirewalls(c *AbiquoClient) ([]Firewall, error)

func (*Device) SupportsFirewall

func (d *Device) SupportsFirewall(c *AbiquoClient) (bool, error)

type DeviceCollection

type DeviceCollection struct {
	AbstractCollection
	Collection []Device
}

type DeviceInterface

type DeviceInterface struct {
	DeviceInterface string `json:"deviceInterface,omitempty"`
	RealName        string `json:"realName,omitempty"`
	Constraints     struct {
	} `json:"constraints,omitempty"`
	Operations struct {
		Vpc struct {
		} `json:"vpc,omitempty"`
	} `json:"operations,omitempty"`
}

type DeviceType

type DeviceType struct {
	DTO
	Name             string            `json:"name,omitempty"`
	DeviceInterfaces []DeviceInterface `json:"deviceinterfaces,omitempty"`
}

type DeviceTypeCollection

type DeviceTypeCollection struct {
	AbstractCollection
	Collection []DeviceType
}

type Disk

type Disk struct {
	DTO
	DiskController     string `json:"diskController,omitempty"`
	DiskControllerType string `json:"diskControllerType,omitempty"`
	Bus                int    `json:"bus,omitempty"`
	Unit               int    `json:"unit,omitempty"`
	Id                 int    `json:"id,omitempty"`
	Label              string `json:"label,omitempty"`
	Sequence           int    `json:"sequence,omitempty"`
	SizeInMb           int    `json:"sizeInMb,omitempty"`
	Uuid               string `json:"uuid,omitempty"`
	Allocation         string `json:"allocation,omitempty"`
	Path               string `json:"path,omitempty"`
	DiskFormatType     string `json:"diskFormatType,omitempty"`
	DiskFileSize       int    `json:"diskFileSize,omitempty"`
	HdRequired         int    `json:"hdRequired,omitempty"`
	State              string `json:"state,omitempty"`
	CreationDate       string `json:"creationDate,omitempty"`
	Bootable           bool   `json:"bootable,omitempty"`
}

func (*Disk) Update

func (d *Disk) Update(c *AbiquoClient) error

type DiskCollection

type DiskCollection struct {
	AbstractCollection
	Collection []Disk
}

type DiskDef

type DiskDef struct {
	DTO
	Bootable                  bool   `json:"bootable,omitempty"`
	Sequence                  int    `json:"sequence,omitempty"`
	RequiredHDInMB            int    `json:"requiredHDInMB,omitempty"`
	DiskFileFormat            string `json:"diskFileFormat,omitempty"`
	VirtualMachineTemplateUrl string `json:"virtualMachineTemplateUrl,omitempty"`
	DiskUrl                   string `json:"diskUrl,omitempty"`
	CurrentPath               string `json:"currentPath,omitempty"`
}

type Enterprise

type Enterprise struct {
	DTO
	Name                             string `json:"name,omitempty"`
	IsReservationRestricted          bool   `json:"isReservationRestricted,omitempty"`
	Workflow                         bool   `json:"workflow,omitempty"`
	TwoFactorAuthenticationMandatory bool   `json:"twoFactorAuthenticationMandatory,omitempty"`
	DiskSoftLimitInMb                int    `json:"diskSoftLimitInMb,omitempty"`
	DiskHardLimitInMb                int    `json:"diskHardLimitInMb,omitempty"`
	StorageSoftInMb                  int    `json:"storageSoftInMb,omitempty"`
	StorageHardInMb                  int    `json:"storageHardInMb,omitempty"`
	VlansSoft                        int    `json:"vlansSoft,omitempty"`
	VlansHard                        int    `json:"vlansHard,omitempty"`
	PublicIpsSoft                    int    `json:"publicIpsSoft,omitempty"`
	PublicIpsHard                    int    `json:"publicIpsHard,omitempty"`
	RepositorySoftInMb               int    `json:"repositorySoftInMb,omitempty"`
	RepositoryHardInMb               int    `json:"repositoryHardInMb,omitempty"`
	RAMSoft                          int    `json:"ramSoft,omitempty"`
	RAMHard                          int    `json:"ramHard,omitempty"`
	CPUSoft                          int    `json:"cpuSoft,omitempty"`
	CPUHard                          int    `json:"cpuHard,omitempty"`
}

func (*Enterprise) GetRepos

func (e *Enterprise) GetRepos(c *AbiquoClient) ([]Repo, error)

type EnterpriseCollection

type EnterpriseCollection struct {
	AbstractCollection
	Collection []Enterprise
}

type Error

type Error struct {
	DTO
	Code    string `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type ErrorCollection

type ErrorCollection struct {
	AbstractCollection
	Collection []Error
}

type Event

type Event struct {
	DTO
	ID                  int    `json:"id"`
	ActionPerformed     string `json:"actionPerformed"`
	Component           string `json:"component"`
	Datacenter          string `json:"datacenter"`
	Enterprise          string `json:"enterprise"`
	IDDatacenter        int    `json:"idDatacenter"`
	IDEnterprise        int    `json:"idEnterprise"`
	IDNetwork           int    `json:"idNetwork"`
	IDPhysicalMachine   int    `json:"idPhysicalMachine"`
	IDRack              int    `json:"idRack"`
	IDStoragePool       string `json:"idStoragePool"`
	IDStorageSystem     int    `json:"idStorageSystem"`
	IDSubnet            int    `json:"idSubnet"`
	IDUser              int    `json:"idUser"`
	IDVirtualApp        int    `json:"idVirtualApp"`
	IDVirtualDatacenter int    `json:"idVirtualDatacenter"`
	IDVirtualMachine    int    `json:"idVirtualMachine"`
	IDVolume            string `json:"idVolume"`
	Network             string `json:"network"`
	PerformedBy         string `json:"performedBy"`
	PhysicalMachine     string `json:"physicalMachine"`
	Rack                string `json:"rack"`
	Severity            string `json:"severity"`
	Stacktrace          string `json:"stacktrace"`
	StoragePool         string `json:"storagePool"`
	StorageSystem       string `json:"storageSystem"`
	Subnet              string `json:"subnet"`
	Timestamp           string `json:"timestamp"`
	User                string `json:"user"`
	VirtualApp          string `json:"virtualApp"`
	VirtualDatacenter   string `json:"virtualDatacenter"`
	VirtualMachine      string `json:"virtualMachine"`
	Volume              string `json:"volume"`
}

type EventCollection

type EventCollection struct {
	AbstractCollection
	Collection []Event
}

type Firewall

type Firewall struct {
	DTO
	Name        string `json:"name,omitempty"`
	ProviderID  string `json:"providerId,omitempty"`
	Description string `json:"description,omitempty"`
}

func (*Firewall) GetRules

func (f *Firewall) GetRules(c *AbiquoClient) ([]FirewallRule, error)

func (*Firewall) SetRules

func (f *Firewall) SetRules(rules []FirewallRule, c *AbiquoClient) error

type FirewallCollection

type FirewallCollection struct {
	AbstractCollection
	Collection []Firewall
}

type FirewallRule

type FirewallRule struct {
	DTO
	Protocol string   `json:"protocol,omitempty"`
	FromPort int      `json:"fromPort"`
	ToPort   int      `json:"toPort"`
	Targets  []string `json:"targets,omitempty"`
	Sources  []string `json:"sources,omitempty"`
}

type FirewallRuleCollection

type FirewallRuleCollection struct {
	AbstractCollection
	Collection []FirewallRule `json:"collection,omitempty"`
}

type HWprofile

type HWprofile struct {
	DTO
	Name   string `json:"name,omitempty"`
	Cpu    int    `json:"cpu,omitempty"`
	Ram    int    `json:"ramInMb,omitempty"`
	Active bool   `json:"active,omitempty"`
}

type HWprofileCollection

type HWprofileCollection struct {
	AbstractCollection
	Collection []HWprofile
}

type HypervisorType

type HypervisorType struct {
	DTO
	Name                string                       `json:"name,omitempty"`
	RealName            string                       `json:"realName,omitempty"`
	Constraints         map[string]string            `json:"constraints,omitempty"`
	Operations          map[string]map[string]string `json:"operations,omitempty"`
	Baseformat          string                       `json:"baseformat,omitempty"`
	Compatibleformats   []string                     `json:"compatibleformats,omitempty"`
	Diskcontrollertypes []string                     `json:"diskcontrollertypes,omitempty"`
	Guestsetups         []interface{}                `json:"guestsetups,omitempty"`
	Diskallocationtypes []interface{}                `json:"diskallocationtypes,omitempty"`
}

type HypervisorTypeCollection

type HypervisorTypeCollection struct {
	AbstractCollection
	Collection []HypervisorType
}

type Ip

type Ip struct {
	DTO
	IP          string `json:"ip,omitempty"`
	Mac         string `json:"mac,omitempty"`
	Name        string `json:"name,omitempty"`
	NetworkName string `json:"networkName,omitempty"`
	Ipv6        bool   `json:"ipv6,omitempty"`
	Available   bool   `json:"available,omitempty"`
}

func (*Ip) PurchasePublicIp

func (i *Ip) PurchasePublicIp(c *AbiquoClient) (Ip, error)

type IpCollection

type IpCollection struct {
	AbstractCollection
	Collection []Ip
}

type Limit

type Limit struct {
	DTO
	EnabledHardwareProfiles bool `json:"enabledHardwareProfiles,omitempty"`
	DiskSoftLimitInMb       int  `json:"diskSoftLimitInMb,omitempty"`
	DiskHardLimitInMb       int  `json:"diskHardLimitInMb,omitempty"`
	StorageSoftInMb         int  `json:"storageSoftInMb,omitempty"`
	StorageHardInMb         int  `json:"storageHardInMb,omitempty"`
	VlansSoft               int  `json:"vlansSoft,omitempty"`
	VlansHard               int  `json:"vlansHard,omitempty"`
	PublicIpsSoft           int  `json:"publicIpsSoft,omitempty"`
	PublicIpsHard           int  `json:"publicIpsHard,omitempty"`
	RepositorySoftInMb      int  `json:"repositorySoftInMb,omitempty"`
	RepositoryHardInMb      int  `json:"repositoryHardInMb,omitempty"`
	RAMSoft                 int  `json:"ramSoft,omitempty"`
	RAMHard                 int  `json:"ramHard,omitempty"`
	CPUSoft                 int  `json:"cpuSoft,omitempty"`
	CPUHard                 int  `json:"cpuHard,omitempty"`
}

func (*Limit) GetHardwareProfiles

func (l *Limit) GetHardwareProfiles(c *AbiquoClient) ([]HWprofile, error)

type LimitCollection

type LimitCollection struct {
	AbstractCollection
	Collection []Limit
}
type Link struct {
	Type  string `json:"type,omitempty"`
	Href  string `json:"href,omitempty"`
	Title string `json:"title,omitempty"`
	Rel   string `json:"rel,omitempty"`

	// Oh my...
	DiskController     string `json:"diskController,omitempty"`
	DiskControllerType string `json:"diskControllerType,omitempty"`
	DiskLabel          string `json:"diskLabel,omitempty"`
	Length             string `json:"length,omitempty"`
}

func (*Link) Get

func (l *Link) Get(c *AbiquoClient) (*resty.Response, error)

type Location

type Location struct {
	DTO
	Name     string `json:"name,omitempty"`
	Location string `json:"location,omitempty"`
}

type LocationCollection

type LocationCollection struct {
	AbstractCollection
	Collection []Location
}

type Repo

type Repo struct {
	DTO
	Name               string
	RepositoryLocation string
}

func (*Repo) GetTemplates

func (r *Repo) GetTemplates(c *AbiquoClient) ([]VirtualMachineTemplate, error)

type RepoCollection

type RepoCollection struct {
	AbstractCollection
	Collection []Repo
}

type Task

type Task struct {
	DTO
	JobsExtended struct {
		DTO
		Collection []struct {
			Links         []interface{} `json:"links,omitempty"`
			ID            string        `json:"id,omitempty"`
			ParentTaskID  string        `json:"parentTaskId,omitempty"`
			Type          string        `json:"type,omitempty"`
			Description   string        `json:"description,omitempty"`
			State         string        `json:"state,omitempty"`
			RollbackState string        `json:"rollbackState,omitempty"`
			Timestamp     int           `json:"timestamp,omitempty"`
		} `json:"collection,omitempty"`
	} `json:"jobsExtended,omitempty"`
	TaskID    string `json:"taskId,omitempty"`
	UserID    string `json:"userId,omitempty"`
	Type      string `json:"type,omitempty"`
	OwnerID   string `json:"ownerId,omitempty"`
	State     string `json:"state,omitempty"`
	Timestamp int    `json:"timestamp,omitempty"`
}

type TemplateCollection

type TemplateCollection struct {
	AbstractCollection
	Collection []VirtualMachineTemplate
}

type User

type User struct {
	DTO
	Nick         string `json:"nick,omitempty"`
	Name         string `json:"name,omitempty"`
	Surname      string `json:"surname,omitempty"`
	Description  string `json:"description,omitempty"`
	Email        string `json:"email,omitempty"`
	Locale       string `json:"locale,omitempty"`
	AuthType     string `json:"authType,omitempty"`
	Active       bool   `json:"active,omitempty"`
	PublicSSHKey string `json:"publicSshKey,omitempty"`
	FirstLogin   bool   `json:"firstLogin,omitempty"`
	Locked       bool   `json:"locked,omitempty"`
}

func (*User) GetEnterprise

func (u *User) GetEnterprise(c *AbiquoClient) (Enterprise, error)

type UserCollection

type UserCollection struct {
	AbstractCollection
	Collectio []User
}

type VDC

type VDC struct {
	DTO
	HypervisorType    string `json:"hypervisorType,omitempty"`
	Name              string `json:"name,omitempty"`
	SyncState         string `json:"syncState,omitempty"`
	DiskSoftLimitInMb int    `json:"diskSoftLimitInMb,omitempty"`
	DiskHardLimitInMb int    `json:"diskHardLimitInMb,omitempty"`
	StorageSoftInMb   int    `json:"storageSoftInMb,omitempty"`
	StorageHardInMb   int    `json:"storageHardInMb,omitempty"`
	VlansSoft         int    `json:"vlansSoft,omitempty"`
	VlansHard         int    `json:"vlansHard,omitempty"`
	PublicIpsSoft     int    `json:"publicIpsSoft,omitempty"`
	PublicIpsHard     int    `json:"publicIpsHard,omitempty"`
	RAMSoft           int    `json:"ramSoft,omitempty"`
	RAMHard           int    `json:"ramHard,omitempty"`
	CPUSoft           int    `json:"cpuSoft,omitempty"`
	CPUHard           int    `json:"cpuHard,omitempty"`
}

func (*VDC) AllocateFloatingIp

func (v *VDC) AllocateFloatingIp(c *AbiquoClient) (Ip, error)

func (*VDC) AllocatePublicIp

func (v *VDC) AllocatePublicIp(c *AbiquoClient, netName string) (Ip, error)

func (*VDC) CreateDisk

func (v *VDC) CreateDisk(d *Disk, c *AbiquoClient) error

func (*VDC) CreateVapp

func (v *VDC) CreateVapp(vapp_name string, c *AbiquoClient) (VirtualApp, error)

func (*VDC) GetDatastoreTiers

func (v *VDC) GetDatastoreTiers(c *AbiquoClient) ([]DatastoreTier, error)

func (*VDC) GetDevice

func (v *VDC) GetDevice(c *AbiquoClient) (Device, error)

func (*VDC) GetExternalNetworks

func (v *VDC) GetExternalNetworks(c *AbiquoClient) ([]Vlan, error)

func (*VDC) GetHardwareProfiles

func (v *VDC) GetHardwareProfiles(c *AbiquoClient) ([]HWprofile, error)

func (*VDC) GetIpsPurchased

func (v *VDC) GetIpsPurchased(c *AbiquoClient, onlyAvailable bool) ([]Ip, error)

func (*VDC) GetIpsToPurchase

func (v *VDC) GetIpsToPurchase(c *AbiquoClient) ([]Ip, error)

func (*VDC) GetNetworks

func (v *VDC) GetNetworks(c *AbiquoClient) ([]Vlan, error)

func (*VDC) GetPrivateNetworks

func (v *VDC) GetPrivateNetworks(c *AbiquoClient) ([]Vlan, error)

func (*VDC) GetPublicNetworks

func (v *VDC) GetPublicNetworks(c *AbiquoClient) ([]Vlan, error)

func (*VDC) GetTemplate

func (v *VDC) GetTemplate(template_name string, c *AbiquoClient) (VirtualMachineTemplate, error)

func (*VDC) GetTemplates

func (v *VDC) GetTemplates(c *AbiquoClient) ([]VirtualMachineTemplate, error)

func (*VDC) GetVirtualApps

func (v *VDC) GetVirtualApps(c *AbiquoClient) ([]VirtualApp, error)

func (*VDC) IsPCR

func (v *VDC) IsPCR() bool

type VMTDef

type VMTDef struct {
	Name               string `json:"name,omitempty"`
	Description        string `json:"description,omitempty"`
	CategoryName       string `json:"categoryName,omitempty"`
	DiskFileFormat     string `json:"diskFileFormat,omitempty"`
	RequiredCpu        string `json:"requiredCpu,omitempty"`
	RequiredHDInMB     string `json:"requiredHDInMB,omitempty"`
	RequiredRamInMB    string `json:"requiredRamInMB,omitempty"`
	LoginUser          string `json:"loginUser,omitempty"`
	LoginPassword      string `json:"loginPassword,omitempty"`
	OsType             string `json:"osType,omitempty"`
	OsVersion          string `json:"osVersion,omitempty"`
	EthernetDriverType string `json:"ethernetDriverType,omitempty"`
}

func (*VMTDef) Upload

func (def *VMTDef) Upload(c *AbiquoClient, repo Repo, file string) (VirtualMachineTemplate, error)

type VdcCollection

type VdcCollection struct {
	AbstractCollection
	Collection []VDC
}

type VirtualApp

type VirtualApp struct {
	DTO
	Error             int    `json:"error,omitempty"`
	HighDisponibility int    `json:"highDisponibility,omitempty"`
	Name              string `json:"name,omitempty"`
	PublicApp         int    `json:"publicApp,omitempty"`
	State             string `json:"state,omitempty"`
}

func (*VirtualApp) CreateVM

func (*VirtualApp) Delete

func (v *VirtualApp) Delete(c *AbiquoClient) error

func (*VirtualApp) GetVMs

func (v *VirtualApp) GetVMs(c *AbiquoClient) ([]VirtualMachine, error)

type VirtualAppCollection

type VirtualAppCollection struct {
	AbstractCollection
	Collection []VirtualApp
}

type VirtualMachine

type VirtualMachine struct {
	DTO
	UUID              string                 `json:"uuid,omitempty"`
	Name              string                 `json:"name,omitempty"`
	Label             string                 `json:"label,omitempty"`
	Description       string                 `json:"description,omitempty"`
	CPU               int                    `json:"cpu,omitempty"`
	RAM               int                    `json:"ram,omitempty"`
	VdrpEnabled       bool                   `json:"vdrpEnabled,omitempty"`
	VdrpPort          int                    `json:"vdrpPort,omitempty"`
	IDState           int                    `json:"idState,omitempty"`
	State             string                 `json:"state,omitempty"`
	IDType            int                    `json:"idType,omitempty"`
	Type              string                 `json:"type,omitempty"`
	HighDisponibility int                    `json:"highDisponibility,omitempty"`
	Password          string                 `json:"password,omitempty"`
	Metadata          map[string]interface{} `json:"metadata,omitempty"`
	Monitored         bool                   `json:"monitored,omitempty"`
	Protected         bool                   `json:"protected,omitempty"`
	Variables         map[string]string      `json:"variables,omitempty"`
	CreationTimestamp int64                  `json:"creationTimestamp,omitempty"`
	Backuppolicies    []interface{}          `json:"backuppolicies,omitempty"`
	LastSynchronize   int64                  `json:"lastSynchronize,omitempty"`
	IconUrl           string                 `json:"iconUrl,omitempty"`
}

func (*VirtualMachine) Delete

func (v *VirtualMachine) Delete(c *AbiquoClient) error

func (*VirtualMachine) Deploy

func (v *VirtualMachine) Deploy(c *AbiquoClient) error

func (*VirtualMachine) GetDisks

func (v *VirtualMachine) GetDisks(c *AbiquoClient) ([]Disk, error)

func (*VirtualMachine) GetIP

func (v *VirtualMachine) GetIP() string

func (*VirtualMachine) GetMetadata

func (v *VirtualMachine) GetMetadata(c *AbiquoClient) (map[string]interface{}, error)

func (*VirtualMachine) GetVapp

func (v *VirtualMachine) GetVapp(c *AbiquoClient) (VirtualApp, error)

func (*VirtualMachine) PowerOff

func (v *VirtualMachine) PowerOff(c *AbiquoClient) error

func (*VirtualMachine) PowerOn

func (v *VirtualMachine) PowerOn(c *AbiquoClient) error

func (*VirtualMachine) Reset

func (v *VirtualMachine) Reset(c *AbiquoClient) error

func (*VirtualMachine) SetMetadata

func (v *VirtualMachine) SetMetadata(mdata string, c *AbiquoClient) error

func (*VirtualMachine) Update

func (v *VirtualMachine) Update(c *AbiquoClient) error

type VirtualMachineCollection

type VirtualMachineCollection struct {
	AbstractCollection
	Collection []VirtualMachine
}

type VirtualMachineTemplate

type VirtualMachineTemplate struct {
	DTO
	Name                             string `json:"name,omitempty"`
	ChefEnabled                      bool   `json:"chefEnabled,omitempty"`
	CpuRequired                      int    `json:"cpuRequired,omitempty"`
	CreationDate                     string `json:"creationDate,omitempty"`
	CreationUser                     string `json:"creationUser,omitempty"`
	Description                      string `json:"description,omitempty"`
	EthernetDriverType               string `json:"ethernetDriverType,omitempty"`
	IconUrl                          string `json:"iconUrl,omitempty"`
	Id                               int    `json:"id,omitempty"`
	LoginPassword                    string `json:"loginPassword,omitempty"`
	LoginUser                        string `json:"loginUser,omitempty"`
	OsType                           string `json:"osType,omitempty"`
	OsVersion                        string `json:"osVersion,omitempty"`
	RamRequired                      int    `json:"ramRequired,omitempty"`
	State                            string `json:"state,omitempty"`
	EnableCpuHotAdd                  bool   `json:"enableCpuHotAdd,omitempty"`
	EnableRamHotAdd                  bool   `json:"enableRamHotAdd,omitempty"`
	EnableDisksHotReconfigure        bool   `json:"enableDisksHotReconfigure,omitempty"`
	EnableNicsHotReconfigure         bool   `json:"enableNicsHotReconfigure,omitempty"`
	EnableRemoteAccessHotReconfigure bool   `json:"enableRemoteAccessHotReconfigure,omitempty"`
	CpuMin                           int    `json:"cpuMin,omitempty"`
	CpuMax                           int    `json:"cpuMax,omitempty"`
	RamMin                           int    `json:"ramMin,omitempty"`
	RamMax                           int    `json:"ramMax,omitempty"`
	GuestSetup                       string `json:"guestSetup,omitempty"`
	EnableOnlyHPRecommended          bool   `json:"enableOnlyHPRecommended,omitempty"`
	GenerateGuestInitialPassword     bool   `json:"generateGuestInitialPassword,omitempty"`
}

func (*VirtualMachineTemplate) GetDisks

func (t *VirtualMachineTemplate) GetDisks(c *AbiquoClient) ([]Disk, error)

func (*VirtualMachineTemplate) ReplacePrimaryDisk

func (t *VirtualMachineTemplate) ReplacePrimaryDisk(c *AbiquoClient, diskdef DiskDef, file string) (VirtualMachineTemplate, error)

func (*VirtualMachineTemplate) Update

type Vlan

type Vlan struct {
	DTO
	Name                string `json:"name,omitempty"`
	Address             string `json:"address,omitempty"`
	Mask                int    `json:"mask,omitempty"`
	Gateway             string `json:"gateway,omitempty"`
	PrimaryDNS          string `json:"primaryDNS,omitempty"`
	SecondaryDNS        string `json:"secondaryDNS,omitempty"`
	SufixDNS            string `json:"sufixDNS,omitempty"`
	DefaultNetwork      bool   `json:"defaultNetwork,omitempty"`
	Tag                 int    `json:"tag,omitempty"`
	Type                string `json:"type,omitempty"`
	Ipv6                bool   `json:"ipv6,omitempty"`
	Strict              bool   `json:"strict,omitempty"`
	ProviderID          string `json:"providerId,omitempty"`
	Restricted          bool   `json:"restricted,omitempty"`
	InternetGatewayRole bool   `json:"internetGatewayRole,omitempty"`
	IPRanges            []struct {
		FirstIP string `json:"firstIp,omitempty"`
		LastIP  string `json:"lastIp,omitempty"`
	} `json:"ipRanges,omitempty"`
}

func (*Vlan) GetFreeIp

func (v *Vlan) GetFreeIp(c *AbiquoClient) (Ip, error)

type VlanCollection

type VlanCollection struct {
	AbstractCollection
	Collection []Vlan
}

Jump to

Keyboard shortcuts

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