egoscale

package module
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 27 Imported by: 206

README


title: Egoscale description: the Go library for Exoscale

Build Status Maintainability Test Coverage GoDoc Go Report Card

A wrapper for the Exoscale public cloud API.

Known users

License

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

Documentation

Overview

Package egoscale is a mapping for the Exoscale API (https://community.exoscale.com/api/compute/).

Requests and Responses

To build a request, construct the adequate struct. This library expects a pointer for efficiency reasons only. The response is a struct corresponding to the data at stake. E.g. DeployVirtualMachine gives a VirtualMachine, as a pointer as well to avoid big copies.

Then everything within the struct is not a pointer. Find below some examples of how egoscale may be used. If anything feels odd or unclear, please let us know: https://github.com/exoscale/egoscale/issues

req := &egoscale.DeployVirtualMachine{
	Size:              10,
	ServiceOfferingID: egoscale.MustParseUUID("..."),
	TemplateID:        egoscale.MustParseUUID("..."),
	ZoneID:            egoscale.MastParseUUID("..."),
}

fmt.Println("Deployment started")
resp, err := cs.Request(req)
if err != nil {
	panic(err)
}

vm := resp.(*egoscale.VirtualMachine)
fmt.Printf("Virtual Machine ID: %s\n", vm.ID)

This example deploys a virtual machine while controlling the job status as it goes. It enables a finer control over errors, e.g. HTTP timeout, and eventually a way to kill it of (from the client side).

req := &egoscale.DeployVirtualMachine{
	Size:              10,
	ServiceOfferingID: egoscale.MustParseUUID("..."),
	TemplateID:        egoscale.MustParseUUID("..."),
	ZoneID:            egoscale.MustParseUUID("..."),
}
vm := &egoscale.VirtualMachine{}

fmt.Println("Deployment started")
cs.AsyncRequest(req, func(jobResult *egoscale.AsyncJobResult, err error) bool {
	if err != nil {
		// any kind of error
		panic(err)
	}

	// Keep waiting
	if jobResult.JobStatus == egoscale.Pending {
		fmt.Println("wait...")
		return true
	}

	// Unmarshal the response into the response struct
	if err := jobResult.Response(vm); err != nil {
		// JSON unmarshaling error
		panic(err)
	}

	// Stop waiting
	return false
})

fmt.Printf("Virtual Machine ID: %s\n", vm.ID)

Debugging and traces

As this library is mostly an HTTP client, you can reuse all the existing tools around it.

cs := egoscale.NewClient("https://api.exoscale.com/compute", "EXO...", "...")
// sets a logger on stderr
cs.Logger = log.New(os.Stderr, "prefix", log.LstdFlags)
// activates the HTTP traces
cs.TraceOn()

Nota bene: when running the tests or the egoscale library via another tool, e.g. the exo cli, the environment variable EXOSCALE_TRACE=prefix does the above configuration for you. As a developer using egoscale as a library, you'll find it more convenient to plug your favorite io.Writer as it's a Logger.

APIs

All the available APIs on the server and provided by the API Discovery plugin.

cs := egoscale.NewClient("https://api.exoscale.com/compute", "EXO...", "...")

resp, err := cs.Request(&egoscale.ListAPIs{})
if err != nil {
	panic(err)
}

for _, api := range resp.(*egoscale.ListAPIsResponse).API {
	fmt.Printf("%s %s\n", api.Name, api.Description)
}
// Output:
// listNetworks Lists all available networks
// ...

Security Groups

Security Groups provide a way to isolate traffic to VMs. Rules are added via the two Authorization commands.

resp, err := cs.Request(&egoscale.CreateSecurityGroup{
	Name: "Load balancer",
	Description: "Open HTTP/HTTPS ports from the outside world",
})
securityGroup := resp.(*egoscale.SecurityGroup)

resp, err = cs.Request(&egoscale.AuthorizeSecurityGroupIngress{
	Description:     "SSH traffic",
	SecurityGroupID: securityGroup.ID,
	CidrList:        []CIDR{
		*egoscale.MustParseCIDR("0.0.0.0/0"),
		*egoscale.MustParseCIDR("::/0"),
	},
	Protocol:        "tcp",
	StartPort:       22,
	EndPort:         22,
})
// The modified SecurityGroup is returned
securityGroup := resp.(*egoscale.SecurityGroup)

// ...
err = client.BooleanRequest(&egoscale.DeleteSecurityGroup{
	ID: securityGroup.ID,
})
// ...

Security Group also implement the generic List, Get and Delete interfaces (Listable and Deletable).

// List all Security Groups
sgs, _ := cs.List(&egoscale.SecurityGroup{})
for _, s := range sgs {
	sg := s.(egoscale.SecurityGroup)
	// ...
}

// Get a Security Group
sgQuery := &egoscale.SecurityGroup{Name: "Load balancer"}
resp, err := cs.Get(sgQuery); err != nil {
	...
}
sg := resp.(*egoscale.SecurityGroup)

if err := cs.Delete(sg); err != nil {
	...
}
// The SecurityGroup has been deleted

See: https://community.exoscale.com/documentation/compute/security-groups/

Zones

A Zone corresponds to a Data Center. You may list them. Zone implements the Listable interface, which let you perform a list in two different ways. The first exposes the underlying request while the second one hide them and you only manipulate the structs of your interest.

// Using ListZones request
req := &egoscale.ListZones{}
resp, err := client.Request(req)
if err != nil {
	panic(err)
}

for _, zone := range resp.(*egoscale.ListZonesResponse) {
	...
}

// Using client.List
zone := &egoscale.Zone{}
zones, err := client.List(zone)
if err != nil {
	panic(err)
}

for _, z := range zones {
	zone := z.(egoscale.Zone)
	...
}

Elastic IPs

An Elastic IP is a way to attach an IP address to many Virtual Machines. The API side of the story configures the external environment, like the routing. Some work is required within the machine to properly configure the interfaces.

See: https://community.exoscale.com/documentation/compute/eip/

Index

Constants

View Source
const Version = "0.19.0"

Version of the library

Variables

View Source
var UserAgent = fmt.Sprintf("egoscale/%s (%s; %s/%s)",
	Version,
	runtime.Version(),
	runtime.GOOS,
	runtime.GOARCH)

UserAgent is the "User-Agent" HTTP request header added to outgoing HTTP requests.

Functions

func ExtractJSONTag added in v0.10.0

func ExtractJSONTag(defaultName, jsonTag string) (string, bool)

ExtractJSONTag returns the variable name or defaultName as well as if the field is required (!omitempty)

func FibonacciRetryStrategy added in v0.9.11

func FibonacciRetryStrategy(iteration int64) time.Duration

FibonacciRetryStrategy waits for an increasing amount of time following the Fibonacci sequence

Types

type API added in v0.9.0

type API struct {
	Description string     `json:"description,omitempty" doc:"description of the api"`
	IsAsync     bool       `json:"isasync" doc:"true if api is asynchronous"`
	Name        string     `json:"name,omitempty" doc:"the name of the api command"`
	Related     string     `json:"related,omitempty" doc:"comma separated related apis"`
	Since       string     `json:"since,omitempty" doc:"version of CloudStack the api was introduced in"`
	Type        string     `json:"type,omitempty" doc:"response field type"`
	Params      []APIParam `json:"params,omitempty" doc:"the list params the api accepts"`
	Response    []APIField `json:"response,omitempty" doc:"api response fields"`
}

API represents an API service

type APIField added in v0.11.0

type APIField struct {
	Description string     `json:"description"`
	Name        string     `json:"name"`
	Response    []APIField `json:"response,omitempty"`
	Type        string     `json:"type"`
}

APIField represents an API response field

type APIParam added in v0.9.0

type APIParam struct {
	Description string `json:"description"`
	Length      int64  `json:"length"`
	Name        string `json:"name"`
	Required    bool   `json:"required"`
	Since       string `json:"since,omitempty"`
	Type        string `json:"type"`
}

APIParam represents an API parameter field

type Account added in v0.9.7

type Account struct {
	AccountDetails            map[string]string `json:"accountdetails,omitempty" doc:"details for the account"`
	CPUAvailable              string            `json:"cpuavailable,omitempty" doc:"the total number of cpu cores available to be created for this account"`
	CPULimit                  string            `json:"cpulimit,omitempty" doc:"the total number of cpu cores the account can own"`
	CPUTotal                  int64             `json:"cputotal,omitempty" doc:"the total number of cpu cores owned by account"`
	DefaultZoneID             *UUID             `json:"defaultzoneid,omitempty" doc:"the default zone of the account"`
	EipLimit                  string            `json:"eiplimit,omitempty" doc:"the total number of public elastic ip addresses this account can acquire"`
	Groups                    []string          `json:"groups,omitempty" doc:"the list of acl groups that account belongs to"`
	ID                        *UUID             `json:"id,omitempty" doc:"the id of the account"`
	IPAvailable               string            `json:"ipavailable,omitempty" doc:"the total number of public ip addresses available for this account to acquire"`
	IPLimit                   string            `json:"iplimit,omitempty" doc:"the total number of public ip addresses this account can acquire"`
	IPTotal                   int64             `json:"iptotal,omitempty" doc:"the total number of public ip addresses allocated for this account"`
	IsCleanupRequired         bool              `json:"iscleanuprequired,omitempty" doc:"true if the account requires cleanup"`
	IsDefault                 bool              `json:"isdefault,omitempty" doc:"true if account is default, false otherwise"`
	MemoryAvailable           string            `json:"memoryavailable,omitempty" doc:"the total memory (in MB) available to be created for this account"`
	MemoryLimit               string            `json:"memorylimit,omitempty" doc:"the total memory (in MB) the account can own"`
	MemoryTotal               int64             `json:"memorytotal,omitempty" doc:"the total memory (in MB) owned by account"`
	Name                      string            `json:"name,omitempty" doc:"the name of the account"`
	NetworkAvailable          string            `json:"networkavailable,omitempty" doc:"the total number of networks available to be created for this account"`
	NetworkDomain             string            `json:"networkdomain,omitempty" doc:"the network domain"`
	NetworkLimit              string            `json:"networklimit,omitempty" doc:"the total number of networks the account can own"`
	NetworkTotal              int64             `json:"networktotal,omitempty" doc:"the total number of networks owned by account"`
	PrimaryStorageAvailable   string            `json:"primarystorageavailable,omitempty" doc:"the total primary storage space (in GiB) available to be used for this account"`
	PrimaryStorageLimit       string            `json:"primarystoragelimit,omitempty" doc:"the total primary storage space (in GiB) the account can own"`
	PrimaryStorageTotal       int64             `json:"primarystoragetotal,omitempty" doc:"the total primary storage space (in GiB) owned by account"`
	ProjectAvailable          string            `json:"projectavailable,omitempty" doc:"the total number of projects available for administration by this account"`
	ProjectLimit              string            `json:"projectlimit,omitempty" doc:"the total number of projects the account can own"`
	ProjectTotal              int64             `json:"projecttotal,omitempty" doc:"the total number of projects being administrated by this account"`
	SecondaryStorageAvailable string            `` /* 129-byte string literal not displayed */
	SecondaryStorageLimit     string            `json:"secondarystoragelimit,omitempty" doc:"the total secondary storage space (in GiB) the account can own"`
	SecondaryStorageTotal     int64             `json:"secondarystoragetotal,omitempty" doc:"the total secondary storage space (in GiB) owned by account"`
	SMTP                      bool              `json:"smtp,omitempty" doc:"if SMTP outbound is allowed"`
	SnapshotAvailable         string            `json:"snapshotavailable,omitempty" doc:"the total number of snapshots available for this account"`
	SnapshotLimit             string            `json:"snapshotlimit,omitempty" doc:"the total number of snapshots which can be stored by this account"`
	SnapshotTotal             int64             `json:"snapshottotal,omitempty" doc:"the total number of snapshots stored by this account"`
	State                     string            `json:"state,omitempty" doc:"the state of the account"`
	TemplateAvailable         string            `json:"templateavailable,omitempty" doc:"the total number of templates available to be created by this account"`
	TemplateLimit             string            `json:"templatelimit,omitempty" doc:"the total number of templates which can be created by this account"`
	TemplateTotal             int64             `json:"templatetotal,omitempty" doc:"the total number of templates which have been created by this account"`
	User                      []User            `json:"user,omitempty" doc:"the list of users associated with account"`
	VMAvailable               string            `json:"vmavailable,omitempty" doc:"the total number of virtual machines available for this account to acquire"`
	VMLimit                   string            `json:"vmlimit,omitempty" doc:"the total number of virtual machines that can be deployed by this account"`
	VMRunning                 int               `json:"vmrunning,omitempty" doc:"the total number of virtual machines running for this account"`
	VMStopped                 int               `json:"vmstopped,omitempty" doc:"the total number of virtual machines stopped for this account"`
	VMTotal                   int64             `json:"vmtotal,omitempty" doc:"the total number of virtual machines deployed by this account"`
	VolumeAvailable           string            `json:"volumeavailable,omitempty" doc:"the total volume available for this account"`
	VolumeLimit               string            `json:"volumelimit,omitempty" doc:"the total volume which can be used by this account"`
	VolumeTotal               int64             `json:"volumetotal,omitempty" doc:"the total volume being used by this account"`
}

Account provides the detailed account information

func (Account) ListRequest added in v0.10.3

func (a Account) ListRequest() (ListCommand, error)

ListRequest builds the ListAccountsGroups request

type ActivateIP6 added in v0.9.13

type ActivateIP6 struct {
	NicID *UUID `json:"nicid" doc:"the ID of the nic to which you want to assign the IPv6"`
	// contains filtered or unexported fields
}

ActivateIP6 (Async) activates the IP6 on the given NIC

Exoscale specific API: https://community.exoscale.ch/api/compute/#activateip6_GET

func (ActivateIP6) AsyncResponse added in v0.13.0

func (ActivateIP6) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (ActivateIP6) Response added in v0.13.0

func (ActivateIP6) Response() interface{}

Response returns the struct to unmarshal

type AddIPToNic added in v0.9.0

type AddIPToNic struct {
	NicID     *UUID  `json:"nicid" doc:"the ID of the nic to which you want to assign private IP"`
	IPAddress net.IP `json:"ipaddress,omitempty" doc:"Secondary IP Address"`
	// contains filtered or unexported fields
}

AddIPToNic (Async) represents the assignation of a secondary IP

func (AddIPToNic) AsyncResponse added in v0.13.0

func (AddIPToNic) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (AddIPToNic) Response added in v0.13.0

func (AddIPToNic) Response() interface{}

Response returns the struct to unmarshal

type AddNicToVirtualMachine added in v0.9.0

type AddNicToVirtualMachine struct {
	NetworkID        *UUID  `json:"networkid" doc:"Network ID"`
	VirtualMachineID *UUID  `json:"virtualmachineid" doc:"Virtual Machine ID"`
	IPAddress        net.IP `` /* 146-byte string literal not displayed */
	// contains filtered or unexported fields
}

AddNicToVirtualMachine (Async) adds a NIC to a VM

func (AddNicToVirtualMachine) AsyncResponse added in v0.13.0

func (AddNicToVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (AddNicToVirtualMachine) Response added in v0.13.0

func (AddNicToVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type AffinityGroup

type AffinityGroup struct {
	Account           string `json:"account,omitempty" doc:"the account owning the affinity group"`
	Description       string `json:"description,omitempty" doc:"the description of the affinity group"`
	ID                *UUID  `json:"id,omitempty" doc:"the ID of the affinity group"`
	Name              string `json:"name,omitempty" doc:"the name of the affinity group"`
	Type              string `json:"type,omitempty" doc:"the type of the affinity group"`
	VirtualMachineIDs []UUID `json:"virtualmachineIds,omitempty" doc:"virtual machine Ids associated with this affinity group"`
}

AffinityGroup represents an (anti-)affinity group

Affinity and Anti-Affinity groups provide a way to influence where VMs should run. See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/stable/virtual_machines.html#affinity-groups

func (AffinityGroup) Delete added in v0.9.12

func (ag AffinityGroup) Delete(ctx context.Context, client *Client) error

Delete removes the given Affinity Group

func (AffinityGroup) ListRequest added in v0.10.0

func (ag AffinityGroup) ListRequest() (ListCommand, error)

ListRequest builds the ListAffinityGroups request

type AffinityGroupType added in v0.9.0

type AffinityGroupType struct {
	Type string `json:"type,omitempty" doc:"the type of the affinity group"`
}

AffinityGroupType represent an affinity group type

type AssociateIPAddress added in v0.9.0

type AssociateIPAddress struct {
	Description            string `json:"description,omitempty" doc:"The IP address description."`
	HealthcheckInterval    int64  `json:"interval,omitempty" doc:"healthcheck definition: time in seconds to wait for each check. Default: 10, minimum: 5"`
	HealthcheckMode        string `json:"mode,omitempty" doc:"healthcheck definition: healthcheck mode can be either 'tcp' or 'http'"`
	HealthcheckPath        string `` /* 163-byte string literal not displayed */
	HealthcheckPort        int64  `` /* 143-byte string literal not displayed */
	HealthcheckStrikesFail int64  `` /* 136-byte string literal not displayed */
	HealthcheckStrikesOk   int64  `` /* 135-byte string literal not displayed */
	HealthcheckTimeout     int64  `` /* 139-byte string literal not displayed */
	ZoneID                 *UUID  `json:"zoneid,omitempty" doc:"the ID of the availability zone you want to acquire a public IP address from"`
	// contains filtered or unexported fields
}

AssociateIPAddress (Async) represents the IP creation

func (AssociateIPAddress) AsyncResponse added in v0.13.0

func (AssociateIPAddress) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (AssociateIPAddress) Response added in v0.13.0

func (AssociateIPAddress) Response() interface{}

Response returns the struct to unmarshal

type AsyncCommand added in v0.9.0

type AsyncCommand interface {
	Command
	AsyncResponse() interface{}
}

AsyncCommand represents a async request

type AsyncJobResult added in v0.9.0

type AsyncJobResult struct {
	AccountID       *UUID            `json:"accountid,omitempty" doc:"the account that executed the async command"`
	Cmd             string           `json:"cmd,omitempty" doc:"the async command executed"`
	Created         string           `json:"created,omitempty" doc:"the created date of the job"`
	JobID           *UUID            `json:"jobid" doc:"extra field for the initial async call"`
	JobInstanceID   *UUID            `json:"jobinstanceid,omitempty" doc:"the unique ID of the instance/entity object related to the job"`
	JobInstanceType string           `json:"jobinstancetype,omitempty" doc:"the instance/entity object related to the job"`
	JobProcStatus   int              `json:"jobprocstatus,omitempty" doc:"the progress information of the PENDING job"`
	JobResult       *json.RawMessage `json:"jobresult,omitempty" doc:"the result reason"`
	JobResultCode   int              `json:"jobresultcode,omitempty" doc:"the result code for the job"`
	JobResultType   string           `json:"jobresulttype,omitempty" doc:"the result type"`
	JobStatus       JobStatusType    `json:"jobstatus,omitempty" doc:"the current job status-should be 0 for PENDING"`
	UserID          *UUID            `json:"userid,omitempty" doc:"the user that executed the async command"`
}

AsyncJobResult represents an asynchronous job result

func (*AsyncJobResult) DeepCopy added in v0.18.0

func (a *AsyncJobResult) DeepCopy() *AsyncJobResult

DeepCopy create a true copy of the receiver.

func (*AsyncJobResult) DeepCopyInto added in v0.18.0

func (a *AsyncJobResult) DeepCopyInto(out *AsyncJobResult)

DeepCopyInto copies the receiver into out.

In (a) must be non nil. out must be non nil

func (AsyncJobResult) Error added in v0.9.22

func (a AsyncJobResult) Error() error

Error builds an error message from the result

func (AsyncJobResult) ListRequest added in v0.13.0

func (a AsyncJobResult) ListRequest() (ListCommand, error)

ListRequest buils the (empty) ListAsyncJobs request

func (AsyncJobResult) Result added in v0.10.1

func (a AsyncJobResult) Result(i interface{}) error

Result unmarshals the result of an AsyncJobResult into the given interface

type AttachISO added in v0.13.1

type AttachISO struct {
	ID               *UUID `json:"id" doc:"the ID of the ISO file"`
	VirtualMachineID *UUID `json:"virtualmachineid" doc:"the ID of the virtual machine"`
	// contains filtered or unexported fields
}

AttachISO represents the request to attach an ISO to a virtual machine.

func (AttachISO) AsyncResponse added in v0.13.1

func (AttachISO) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (AttachISO) Response added in v0.13.1

func (AttachISO) Response() interface{}

Response returns the struct to unmarshal

type AuthorizeSecurityGroupEgress added in v0.9.0

type AuthorizeSecurityGroupEgress AuthorizeSecurityGroupIngress

AuthorizeSecurityGroupEgress (Async) represents the egress rule creation

func (AuthorizeSecurityGroupEgress) AsyncResponse added in v0.13.0

func (AuthorizeSecurityGroupEgress) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (AuthorizeSecurityGroupEgress) Response added in v0.13.0

func (AuthorizeSecurityGroupEgress) Response() interface{}

Response returns the struct to unmarshal

type AuthorizeSecurityGroupIngress added in v0.9.0

type AuthorizeSecurityGroupIngress struct {
	CIDRList              []CIDR              `json:"cidrlist,omitempty" doc:"the cidr list associated"`
	Description           string              `json:"description,omitempty" doc:"the description of the ingress/egress rule"`
	EndPort               uint16              `json:"endport,omitempty" doc:"end port for this ingress/egress rule"`
	IcmpCode              uint8               `json:"icmpcode,omitempty" doc:"error code for this icmp message"`
	IcmpType              uint8               `json:"icmptype,omitempty" doc:"type of the icmp message being sent"`
	Protocol              string              `json:"protocol,omitempty" doc:"TCP is default. UDP, ICMP, ICMPv6, AH, ESP, GRE, IPIP are the other supported protocols"`
	SecurityGroupID       *UUID               `json:"securitygroupid,omitempty" doc:"The ID of the security group. Mutually exclusive with securitygroupname parameter"`
	SecurityGroupName     string              `json:"securitygroupname,omitempty" doc:"The name of the security group. Mutually exclusive with securitygroupid parameter"`
	StartPort             uint16              `json:"startport,omitempty" doc:"start port for this ingress/egress rule"`
	UserSecurityGroupList []UserSecurityGroup `json:"usersecuritygrouplist,omitempty" doc:"user to security group mapping"`
	// contains filtered or unexported fields
}

AuthorizeSecurityGroupIngress (Async) represents the ingress rule creation

func (AuthorizeSecurityGroupIngress) AsyncResponse added in v0.13.0

func (AuthorizeSecurityGroupIngress) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (AuthorizeSecurityGroupIngress) Response added in v0.13.0

func (AuthorizeSecurityGroupIngress) Response() interface{}

Response returns the struct to unmarshal

type BooleanResponse added in v0.9.0

type BooleanResponse struct {
	DisplayText string `json:"displaytext,omitempty"`
	Success     bool   `json:"success"`
}

BooleanResponse represents a boolean response (usually after a deletion)

func (BooleanResponse) Error added in v0.9.0

func (e BooleanResponse) Error() error

Error formats a CloudStack job response into a standard error

type CIDR added in v0.10.4

type CIDR struct {
	net.IPNet
}

CIDR represents a nicely JSON serializable net.IPNet

func MustParseCIDR added in v0.11.0

func MustParseCIDR(s string) *CIDR

MustParseCIDR forces parseCIDR or panics

func ParseCIDR added in v0.10.4

func ParseCIDR(s string) (*CIDR, error)

ParseCIDR parses a CIDR from a string

func (CIDR) Equal added in v0.11.0

func (cidr CIDR) Equal(c CIDR) bool

Equal compare two CIDR

func (CIDR) MarshalJSON added in v0.10.4

func (cidr CIDR) MarshalJSON() ([]byte, error)

MarshalJSON converts the CIDR to a string representation

func (CIDR) String added in v0.11.0

func (cidr CIDR) String() string

String returns the string representation of a CIDR

func (*CIDR) UnmarshalJSON added in v0.10.4

func (cidr *CIDR) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the raw JSON into the MAC address

type CSErrorCode added in v0.9.24

type CSErrorCode int

CSErrorCode represents the CloudStack CSExceptionErrorCode enum

See: https://github.com/apache/cloudstack/blob/master/utils/src/main/java/com/cloud/utils/exception/CSExceptionErrorCode.java

const (
	// CloudRuntimeException ... (TODO)
	CloudRuntimeException CSErrorCode = 4250
	// ExecutionException ... (TODO)
	ExecutionException CSErrorCode = 4260
	// HypervisorVersionChangedException ... (TODO)
	HypervisorVersionChangedException CSErrorCode = 4265
	// CloudException ... (TODO)
	CloudException CSErrorCode = 4275
	// AccountLimitException ... (TODO)
	AccountLimitException CSErrorCode = 4280
	// AgentUnavailableException ... (TODO)
	AgentUnavailableException CSErrorCode = 4285
	// CloudAuthenticationException ... (TODO)
	CloudAuthenticationException CSErrorCode = 4290
	// ConcurrentOperationException ... (TODO)
	ConcurrentOperationException CSErrorCode = 4300
	// ConflictingNetworksException ... (TODO)
	ConflictingNetworkSettingsException CSErrorCode = 4305
	// DiscoveredWithErrorException ... (TODO)
	DiscoveredWithErrorException CSErrorCode = 4310
	// HAStateException ... (TODO)
	HAStateException CSErrorCode = 4315
	// InsufficientAddressCapacityException ... (TODO)
	InsufficientAddressCapacityException CSErrorCode = 4320
	// InsufficientCapacityException ... (TODO)
	InsufficientCapacityException CSErrorCode = 4325
	// InsufficientNetworkCapacityException ... (TODO)
	InsufficientNetworkCapacityException CSErrorCode = 4330
	// InsufficientServerCapaticyException ... (TODO)
	InsufficientServerCapacityException CSErrorCode = 4335
	// InsufficientStorageCapacityException ... (TODO)
	InsufficientStorageCapacityException CSErrorCode = 4340
	// InternalErrorException ... (TODO)
	InternalErrorException CSErrorCode = 4345
	// InvalidParameterValueException ... (TODO)
	InvalidParameterValueException CSErrorCode = 4350
	// ManagementServerException ... (TODO)
	ManagementServerException CSErrorCode = 4355
	// NetworkRuleConflictException  ... (TODO)
	NetworkRuleConflictException CSErrorCode = 4360
	// PermissionDeniedException ... (TODO)
	PermissionDeniedException CSErrorCode = 4365
	// ResourceAllocationException ... (TODO)
	ResourceAllocationException CSErrorCode = 4370
	// ResourceInUseException ... (TODO)
	ResourceInUseException CSErrorCode = 4375
	// ResourceUnavailableException ... (TODO)
	ResourceUnavailableException CSErrorCode = 4380
	// StorageUnavailableException ... (TODO)
	StorageUnavailableException CSErrorCode = 4385
	// UnsupportedServiceException ... (TODO)
	UnsupportedServiceException CSErrorCode = 4390
	// VirtualMachineMigrationException ... (TODO)
	VirtualMachineMigrationException CSErrorCode = 4395
	// AsyncCommandQueued ... (TODO)
	AsyncCommandQueued CSErrorCode = 4540
	// RequestLimitException ... (TODO)
	RequestLimitException CSErrorCode = 4545
	// ServerAPIException ... (TODO)
	ServerAPIException CSErrorCode = 9999
)

func (CSErrorCode) String added in v0.9.24

func (i CSErrorCode) String() string

type ChangeServiceForVirtualMachine added in v0.9.0

type ChangeServiceForVirtualMachine struct {
	ID                *UUID             `json:"id" doc:"The ID of the virtual machine"`
	ServiceOfferingID *UUID             `json:"serviceofferingid" doc:"the service offering ID to apply to the virtual machine"`
	Details           map[string]string `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

ChangeServiceForVirtualMachine changes the service offering for a virtual machine. The virtual machine must be in a "Stopped" state for this command to take effect.

func (ChangeServiceForVirtualMachine) Response added in v0.13.0

func (ChangeServiceForVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type Client

type Client struct {
	// HTTPClient holds the HTTP client
	HTTPClient *http.Client
	// Endpoint is the HTTP URL
	Endpoint string
	// APIKey is the API identifier
	APIKey string

	// PageSize represents the default size for a paginated result
	PageSize int
	// Timeout represents the default timeout for the async requests
	Timeout time.Duration
	// Expiration representation how long a signed payload may be used
	Expiration time.Duration
	// RetryStrategy represents the waiting strategy for polling the async requests
	RetryStrategy RetryStrategyFunc
	// Logger contains any log, plug your own
	Logger *log.Logger
	// contains filtered or unexported fields
}

Client represents the API client

func NewClient

func NewClient(endpoint, apiKey, apiSecret string) *Client

NewClient creates an API client with default timeout (60)

Timeout is set to both the HTTP client and the client itself.

func (*Client) APIDescription added in v0.10.0

func (client *Client) APIDescription(command Command) string

APIDescription returns the description of the given command

func (*Client) APIName added in v0.9.22

func (client *Client) APIName(command Command) string

APIName returns the name of the given command

func (*Client) AsyncListWithContext added in v0.9.16

func (client *Client) AsyncListWithContext(ctx context.Context, g Listable) (<-chan interface{}, <-chan error)

AsyncListWithContext lists the given resources (and paginate till the end)

// NB: goroutine may leak if not read until the end. Create a proper context!
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

outChan, errChan := client.AsyncListWithContext(ctx, new(egoscale.VirtualMachine))

for {
	select {
	case i, ok := <- outChan:
		if ok {
			vm := i.(egoscale.VirtualMachine)
			// ...
		} else {
			outChan = nil
		}
	case err, ok := <- errChan:
		if ok {
			// do something
		}
		// Once an error has been received, you can expect the channels to be closed.
		errChan = nil
	}
	if errChan == nil && outChan == nil {
		break
	}
}

func (*Client) AsyncRequest added in v0.9.0

func (client *Client) AsyncRequest(asyncCommand AsyncCommand, callback WaitAsyncJobResultFunc)

AsyncRequest performs the given command

func (*Client) AsyncRequestWithContext added in v0.9.22

func (client *Client) AsyncRequestWithContext(ctx context.Context, asyncCommand AsyncCommand, callback WaitAsyncJobResultFunc)

AsyncRequestWithContext preforms a request with a context

func (*Client) BooleanRequest added in v0.9.0

func (client *Client) BooleanRequest(command Command) error

BooleanRequest performs the given boolean command

func (*Client) BooleanRequestWithContext added in v0.9.12

func (client *Client) BooleanRequestWithContext(ctx context.Context, command Command) error

BooleanRequestWithContext performs the given boolean command

func (*Client) CreateDomain

func (client *Client) CreateDomain(ctx context.Context, name string) (*DNSDomain, error)

CreateDomain creates a DNS domain

func (*Client) CreateRecord

func (client *Client) CreateRecord(ctx context.Context, name string, rec DNSRecord) (*DNSRecord, error)

CreateRecord creates a DNS record

func (*Client) CreateRunstatusIncident added in v0.13.2

func (client *Client) CreateRunstatusIncident(ctx context.Context, incident RunstatusIncident) (*RunstatusIncident, error)

CreateRunstatusIncident create runstatus incident

func (*Client) CreateRunstatusMaintenance added in v0.13.2

func (client *Client) CreateRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) (*RunstatusMaintenance, error)

CreateRunstatusMaintenance create runstatus Maintenance

func (*Client) CreateRunstatusPage added in v0.13.2

func (client *Client) CreateRunstatusPage(ctx context.Context, page RunstatusPage) (*RunstatusPage, error)

CreateRunstatusPage create runstatus page

func (*Client) CreateRunstatusService added in v0.13.2

func (client *Client) CreateRunstatusService(ctx context.Context, service RunstatusService) (*RunstatusService, error)

CreateRunstatusService create runstatus service

func (*Client) Delete added in v0.9.12

func (client *Client) Delete(g Deletable) error

Delete removes the given resource of fails

func (*Client) DeleteDomain

func (client *Client) DeleteDomain(ctx context.Context, name string) error

DeleteDomain delets a DNS domain

func (*Client) DeleteRecord

func (client *Client) DeleteRecord(ctx context.Context, name string, recordID int64) error

DeleteRecord deletes a record

func (*Client) DeleteRunstatusIncident added in v0.13.2

func (client *Client) DeleteRunstatusIncident(ctx context.Context, incident RunstatusIncident) error

DeleteRunstatusIncident delete runstatus incident

func (*Client) DeleteRunstatusMaintenance added in v0.13.2

func (client *Client) DeleteRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) error

DeleteRunstatusMaintenance delete runstatus Maintenance

func (*Client) DeleteRunstatusPage added in v0.13.2

func (client *Client) DeleteRunstatusPage(ctx context.Context, page RunstatusPage) error

DeleteRunstatusPage delete runstatus page

func (*Client) DeleteRunstatusService added in v0.13.2

func (client *Client) DeleteRunstatusService(ctx context.Context, service RunstatusService) error

DeleteRunstatusService delete runstatus service

func (*Client) DeleteWithContext added in v0.9.12

func (client *Client) DeleteWithContext(ctx context.Context, g Deletable) error

DeleteWithContext removes the given resource of fails

func (*Client) Get added in v0.9.12

func (client *Client) Get(ls Listable) (interface{}, error)

Get populates the given resource or fails

func (*Client) GetDomain

func (client *Client) GetDomain(ctx context.Context, name string) (*DNSDomain, error)

GetDomain gets a DNS domain

func (*Client) GetDomains added in v0.9.28

func (client *Client) GetDomains(ctx context.Context) ([]DNSDomain, error)

GetDomains gets DNS domains

func (*Client) GetRecord added in v0.9.0

func (client *Client) GetRecord(ctx context.Context, domain string, recordID int64) (*DNSRecord, error)

GetRecord returns a DNS record

func (*Client) GetRecords

func (client *Client) GetRecords(ctx context.Context, domain string) ([]DNSRecord, error)

GetRecords returns the DNS records

func (*Client) GetRecordsWithFilters added in v0.11.0

func (client *Client) GetRecordsWithFilters(ctx context.Context, domain, name, recordType string) ([]DNSRecord, error)

GetRecordsWithFilters returns the DNS records (filters can be empty)

func (*Client) GetRunstatusIncident added in v0.13.2

func (client *Client) GetRunstatusIncident(ctx context.Context, incident RunstatusIncident) (*RunstatusIncident, error)

GetRunstatusIncident retrieves the details of a specific incident.

func (*Client) GetRunstatusMaintenance added in v0.13.2

func (client *Client) GetRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance) (*RunstatusMaintenance, error)

GetRunstatusMaintenance retrieves the details of a specific maintenance.

func (*Client) GetRunstatusPage added in v0.13.2

func (client *Client) GetRunstatusPage(ctx context.Context, page RunstatusPage) (*RunstatusPage, error)

GetRunstatusPage fetches the runstatus page

func (*Client) GetRunstatusService added in v0.13.2

func (client *Client) GetRunstatusService(ctx context.Context, service RunstatusService) (*RunstatusService, error)

GetRunstatusService displays service detail.

func (*Client) GetWithContext added in v0.9.12

func (client *Client) GetWithContext(ctx context.Context, ls Listable) (interface{}, error)

GetWithContext populates the given resource or fails

func (*Client) List added in v0.9.16

func (client *Client) List(g Listable) ([]interface{}, error)

List lists the given resource (and paginate till the end)

func (*Client) ListRunstatusIncidents added in v0.13.2

func (client *Client) ListRunstatusIncidents(ctx context.Context, page RunstatusPage) ([]RunstatusIncident, error)

ListRunstatusIncidents lists the incidents for a specific page.

func (*Client) ListRunstatusMaintenances added in v0.13.2

func (client *Client) ListRunstatusMaintenances(ctx context.Context, page RunstatusPage) ([]RunstatusMaintenance, error)

ListRunstatusMaintenances returns the list of maintenances for the page.

func (*Client) ListRunstatusPages added in v0.13.2

func (client *Client) ListRunstatusPages(ctx context.Context) ([]RunstatusPage, error)

ListRunstatusPages list all the runstatus pages

func (*Client) ListRunstatusServices added in v0.13.2

func (client *Client) ListRunstatusServices(ctx context.Context, page RunstatusPage) ([]RunstatusService, error)

ListRunstatusServices displays the list of services.

func (*Client) ListWithContext added in v0.9.16

func (client *Client) ListWithContext(ctx context.Context, g Listable) (s []interface{}, err error)

ListWithContext lists the given resources (and paginate till the end)

func (*Client) Paginate added in v0.9.18

func (client *Client) Paginate(g Listable, callback IterateItemFunc)

Paginate runs the ListCommand and paginates

func (*Client) PaginateRunstatusIncidents added in v0.14.1

func (client *Client) PaginateRunstatusIncidents(ctx context.Context, page RunstatusPage, callback func(*RunstatusIncident, error) bool)

PaginateRunstatusIncidents paginate Incidents

func (*Client) PaginateRunstatusMaintenances added in v0.14.1

func (client *Client) PaginateRunstatusMaintenances(ctx context.Context, page RunstatusPage, callback func(*RunstatusMaintenance, error) bool)

PaginateRunstatusMaintenances paginate Maintenances

func (*Client) PaginateRunstatusPages added in v0.14.1

func (client *Client) PaginateRunstatusPages(ctx context.Context, callback func(pages []RunstatusPage, e error) bool)

PaginateRunstatusPages paginate on runstatus pages

func (*Client) PaginateRunstatusServices added in v0.14.1

func (client *Client) PaginateRunstatusServices(ctx context.Context, page RunstatusPage, callback func(*RunstatusService, error) bool)

PaginateRunstatusServices paginates Services

func (*Client) PaginateWithContext added in v0.9.18

func (client *Client) PaginateWithContext(ctx context.Context, g Listable, callback IterateItemFunc)

PaginateWithContext runs the ListCommand as long as the ctx is valid

func (*Client) Payload added in v0.9.21

func (client *Client) Payload(command Command) (url.Values, error)

Payload builds the HTTP request params from the given command

func (*Client) Request

func (client *Client) Request(command Command) (interface{}, error)

Request performs the given command

func (*Client) RequestWithContext added in v0.9.11

func (client *Client) RequestWithContext(ctx context.Context, command Command) (interface{}, error)

RequestWithContext preforms a command with a context

func (*Client) Response added in v0.9.22

func (client *Client) Response(command Command) interface{}

Response returns the response structure of the given command

func (*Client) Sign added in v0.9.22

func (client *Client) Sign(params url.Values) (string, error)

Sign signs the HTTP request and returns the signature as as base64 encoding

func (*Client) SyncRequest added in v0.10.1

func (client *Client) SyncRequest(command Command) (interface{}, error)

SyncRequest performs the command as is

func (*Client) SyncRequestWithContext added in v0.10.1

func (client *Client) SyncRequestWithContext(ctx context.Context, command Command) (interface{}, error)

SyncRequestWithContext performs a sync request with a context

func (*Client) TraceOff added in v0.10.5

func (client *Client) TraceOff()

TraceOff deactivates the HTTP tracer

func (*Client) TraceOn added in v0.10.5

func (client *Client) TraceOn()

TraceOn activates the HTTP tracer

func (*Client) UpdateRecord

func (client *Client) UpdateRecord(ctx context.Context, name string, rec UpdateDNSRecord) (*DNSRecord, error)

UpdateRecord updates a DNS record

func (*Client) UpdateRunstatusIncident added in v0.13.2

func (client *Client) UpdateRunstatusIncident(ctx context.Context, incident RunstatusIncident, event RunstatusEvent) error

UpdateRunstatusIncident create runstatus incident event Events can be updates or final message with status completed.

func (*Client) UpdateRunstatusMaintenance added in v0.13.2

func (client *Client) UpdateRunstatusMaintenance(ctx context.Context, maintenance RunstatusMaintenance, event RunstatusEvent) error

UpdateRunstatusMaintenance adds a event to a maintenance. Events can be updates or final message with status completed.

type Command added in v0.9.0

type Command interface {
	Response() interface{}
}

Command represents a generic request

type CommandInfo added in v0.10.0

type CommandInfo struct {
	Name        string
	Description string
	RootOnly    bool
}

CommandInfo represents the meta data related to a Command

type CreateAffinityGroup added in v0.9.0

type CreateAffinityGroup struct {
	Description string `json:"description,omitempty" doc:"Optional description of the affinity group"`
	Name        string `json:"name,omitempty" doc:"Name of the affinity group"`
	Type        string `json:"type" doc:"Type of the affinity group from the available affinity/anti-affinity group types"`
	// contains filtered or unexported fields
}

CreateAffinityGroup (Async) represents a new (anti-)affinity group

func (CreateAffinityGroup) AsyncResponse added in v0.13.0

func (CreateAffinityGroup) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (CreateAffinityGroup) Response added in v0.13.0

func (CreateAffinityGroup) Response() interface{}

Response returns the struct to unmarshal

type CreateInstanceGroup added in v0.9.7

type CreateInstanceGroup struct {
	Name string `json:"name" doc:"the name of the instance group"`
	// contains filtered or unexported fields
}

CreateInstanceGroup creates a VM group

func (CreateInstanceGroup) Response added in v0.13.0

func (CreateInstanceGroup) Response() interface{}

Response returns the struct to unmarshal

type CreateNetwork added in v0.9.0

type CreateNetwork struct {
	DisplayText       string `json:"displaytext,omitempty" doc:"the display text of the network"` // This field is required but might be empty
	EndIP             net.IP `json:"endip,omitempty" doc:"the ending IP address in the network IP range. Required for managed networks."`
	EndIpv6           net.IP `json:"endipv6,omitempty" doc:"the ending IPv6 address in the IPv6 network range"`
	Gateway           net.IP `` /* 132-byte string literal not displayed */
	IP6CIDR           *CIDR  `json:"ip6cidr,omitempty" doc:"the CIDR of IPv6 network, must be at least /64"`
	IP6Gateway        net.IP `` /* 140-byte string literal not displayed */
	IsolatedPVlan     string `json:"isolatedpvlan,omitempty" doc:"the isolated private vlan for this network"`
	Name              string `json:"name,omitempty" doc:"the name of the network"` // This field is required but might be empty
	Netmask           net.IP `json:"netmask,omitempty" doc:"the netmask of the network. Required for managed networks."`
	NetworkDomain     string `json:"networkdomain,omitempty" doc:"network domain"`
	NetworkOfferingID *UUID  `json:"networkofferingid" doc:"the network offering id"`
	PhysicalNetworkID *UUID  `json:"physicalnetworkid,omitempty" doc:"the Physical Network ID the network belongs to"`
	StartIP           net.IP `json:"startip,omitempty" doc:"the beginning IP address in the network IP range. Required for managed networks."`
	StartIpv6         net.IP `json:"startipv6,omitempty" doc:"the beginning IPv6 address in the IPv6 network range"`
	Vlan              string `json:"vlan,omitempty" doc:"the ID or VID of the network"`
	ZoneID            *UUID  `json:"zoneid" doc:"the Zone ID for the network"`
	// contains filtered or unexported fields
}

CreateNetwork creates a network

func (CreateNetwork) Response added in v0.13.0

func (CreateNetwork) Response() interface{}

Response returns the struct to unmarshal

type CreateSSHKeyPair added in v0.9.0

type CreateSSHKeyPair struct {
	Name string `json:"name" doc:"Name of the keypair"`
	// contains filtered or unexported fields
}

CreateSSHKeyPair represents a new keypair to be created

func (CreateSSHKeyPair) Response added in v0.13.0

func (CreateSSHKeyPair) Response() interface{}

Response returns the struct to unmarshal

type CreateSecurityGroup added in v0.9.0

type CreateSecurityGroup struct {
	Name        string `json:"name" doc:"name of the security group"`
	Description string `json:"description,omitempty" doc:"the description of the security group"`
	// contains filtered or unexported fields
}

CreateSecurityGroup represents a security group creation

func (CreateSecurityGroup) Response added in v0.13.0

func (CreateSecurityGroup) Response() interface{}

Response returns the struct to unmarshal

type CreateSnapshot added in v0.9.0

type CreateSnapshot struct {
	VolumeID  *UUID `json:"volumeid" doc:"The ID of the disk volume"`
	QuiesceVM *bool `json:"quiescevm,omitempty" doc:"quiesce vm if true"`
	// contains filtered or unexported fields
}

CreateSnapshot (Async) creates an instant snapshot of a volume

func (CreateSnapshot) AsyncResponse added in v0.13.0

func (CreateSnapshot) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (CreateSnapshot) Response added in v0.13.0

func (CreateSnapshot) Response() interface{}

Response returns the struct to unmarshal

type CreateTags added in v0.9.0

type CreateTags struct {
	ResourceIDs  []UUID        `json:"resourceids" doc:"list of resources to create the tags for"`
	ResourceType string        `json:"resourcetype" doc:"type of the resource"`
	Tags         []ResourceTag `json:"tags" doc:"Map of tags (key/value pairs)"`
	Customer     string        `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

CreateTags (Async) creates resource tag(s)

func (CreateTags) AsyncResponse added in v0.13.0

func (CreateTags) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (CreateTags) Response added in v0.13.0

func (CreateTags) Response() interface{}

Response returns the struct to unmarshal

type DNSDomain

type DNSDomain struct {
	ID             int64  `json:"id"`
	Name           string `json:"name"`
	UnicodeName    string `json:"unicode_name"`
	Token          string `json:"token"`
	State          string `json:"state"`
	Language       string `json:"language,omitempty"`
	Lockable       bool   `json:"lockable"`
	AutoRenew      bool   `json:"auto_renew"`
	WhoisProtected bool   `json:"whois_protected"`
	RecordCount    int64  `json:"record_count"`
	ServiceCount   int64  `json:"service_count"`
	ExpiresOn      string `json:"expires_on,omitempty"`
	CreatedAt      string `json:"created_at"`
	UpdatedAt      string `json:"updated_at"`
}

DNSDomain represents a domain

type DNSDomainResponse added in v0.9.0

type DNSDomainResponse struct {
	Domain *DNSDomain `json:"domain"`
}

DNSDomainResponse represents a domain creation response

type DNSErrorResponse added in v0.9.0

type DNSErrorResponse struct {
	Message string              `json:"message,omitempty"`
	Errors  map[string][]string `json:"errors"`
}

DNSErrorResponse represents an error in the API

func (*DNSErrorResponse) Error added in v0.9.0

func (req *DNSErrorResponse) Error() string

Error formats the DNSerror into a string

type DNSRecord

type DNSRecord struct {
	ID         int64  `json:"id,omitempty"`
	DomainID   int64  `json:"domain_id,omitempty"`
	Name       string `json:"name"`
	TTL        int    `json:"ttl,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
	Content    string `json:"content"`
	RecordType string `json:"record_type"`
	Prio       int    `json:"prio,omitempty"`
}

DNSRecord represents a DNS record

type DNSRecordResponse

type DNSRecordResponse struct {
	Record DNSRecord `json:"record"`
}

DNSRecordResponse represents the creation of a DNS record

type Deletable added in v0.9.12

type Deletable interface {
	// Delete removes the given resource(s) or throws
	Delete(context context.Context, client *Client) error
}

Deletable represents an Interface that can be "Delete" by the client

type DeleteAffinityGroup added in v0.9.0

type DeleteAffinityGroup struct {
	ID   *UUID  `json:"id,omitempty" doc:"The ID of the affinity group. Mutually exclusive with name parameter"`
	Name string `json:"name,omitempty" doc:"The name of the affinity group. Mutually exclusive with ID parameter"`
	// contains filtered or unexported fields
}

DeleteAffinityGroup (Async) represents an (anti-)affinity group to be deleted

func (DeleteAffinityGroup) AsyncResponse added in v0.13.0

func (DeleteAffinityGroup) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DeleteAffinityGroup) Response added in v0.13.0

func (DeleteAffinityGroup) Response() interface{}

Response returns the struct to unmarshal

type DeleteInstanceGroup added in v0.9.7

type DeleteInstanceGroup struct {
	ID *UUID `json:"id" doc:"the ID of the instance group"`
	// contains filtered or unexported fields
}

DeleteInstanceGroup deletes a VM group

func (DeleteInstanceGroup) Response added in v0.13.0

func (DeleteInstanceGroup) Response() interface{}

Response returns the struct to unmarshal

type DeleteNetwork added in v0.9.0

type DeleteNetwork struct {
	ID     *UUID `json:"id" doc:"the ID of the network"`
	Forced *bool `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

DeleteNetwork deletes a network

func (DeleteNetwork) AsyncResponse added in v0.13.0

func (DeleteNetwork) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DeleteNetwork) Response added in v0.13.0

func (DeleteNetwork) Response() interface{}

Response returns the struct to unmarshal

type DeleteReverseDNSFromPublicIPAddress added in v0.10.1

type DeleteReverseDNSFromPublicIPAddress struct {
	ID *UUID `json:"id,omitempty" doc:"the ID of the public IP address"`
	// contains filtered or unexported fields
}

DeleteReverseDNSFromPublicIPAddress is a command to create/delete the PTR record of a public IP address

func (*DeleteReverseDNSFromPublicIPAddress) Response added in v0.13.0

func (*DeleteReverseDNSFromPublicIPAddress) Response() interface{}

Response returns the struct to unmarshal

type DeleteReverseDNSFromVirtualMachine added in v0.10.1

type DeleteReverseDNSFromVirtualMachine struct {
	ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"`
	// contains filtered or unexported fields
}

DeleteReverseDNSFromVirtualMachine is a command to create/delete the PTR record(s) of a virtual machine

func (*DeleteReverseDNSFromVirtualMachine) Response added in v0.13.0

func (*DeleteReverseDNSFromVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type DeleteSSHKeyPair added in v0.9.0

type DeleteSSHKeyPair struct {
	Name string `json:"name" doc:"Name of the keypair"`
	// contains filtered or unexported fields
}

DeleteSSHKeyPair represents a new keypair to be created

func (DeleteSSHKeyPair) Response added in v0.13.0

func (DeleteSSHKeyPair) Response() interface{}

Response returns the struct to unmarshal

type DeleteSecurityGroup added in v0.9.0

type DeleteSecurityGroup struct {
	ID   *UUID  `json:"id,omitempty" doc:"The ID of the security group. Mutually exclusive with name parameter"`
	Name string `json:"name,omitempty" doc:"The ID of the security group. Mutually exclusive with id parameter"`
	// contains filtered or unexported fields
}

DeleteSecurityGroup represents a security group deletion

func (DeleteSecurityGroup) Response added in v0.13.0

func (DeleteSecurityGroup) Response() interface{}

Response returns the struct to unmarshal

type DeleteSnapshot added in v0.9.0

type DeleteSnapshot struct {
	ID *UUID `json:"id" doc:"The ID of the snapshot"`
	// contains filtered or unexported fields
}

DeleteSnapshot (Async) deletes a snapshot of a disk volume

func (DeleteSnapshot) AsyncResponse added in v0.13.0

func (DeleteSnapshot) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DeleteSnapshot) Response added in v0.13.0

func (DeleteSnapshot) Response() interface{}

Response returns the struct to unmarshal

type DeleteTags added in v0.9.0

type DeleteTags struct {
	ResourceIDs  []UUID        `json:"resourceids" doc:"Delete tags for resource id(s)"`
	ResourceType string        `json:"resourcetype" doc:"Delete tag by resource type"`
	Tags         []ResourceTag `json:"tags,omitempty" doc:"Delete tags matching key/value pairs"`
	// contains filtered or unexported fields
}

DeleteTags (Async) deletes the resource tag(s)

func (DeleteTags) AsyncResponse added in v0.13.0

func (DeleteTags) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DeleteTags) Response added in v0.13.0

func (DeleteTags) Response() interface{}

Response returns the struct to unmarshal

type DeleteTemplate added in v0.9.24

type DeleteTemplate struct {
	ID *UUID `json:"id" doc:"the ID of the template"`
	// contains filtered or unexported fields
}

DeleteTemplate deletes a template by ID

func (DeleteTemplate) AsyncResponse added in v0.17.0

func (DeleteTemplate) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DeleteTemplate) Response added in v0.17.0

func (DeleteTemplate) Response() interface{}

Response returns the struct to unmarshal

type DeployVirtualMachine added in v0.9.0

type DeployVirtualMachine struct {
	AffinityGroupIDs   []UUID            `` /* 188-byte string literal not displayed */
	AffinityGroupNames []string          `` /* 190-byte string literal not displayed */
	Details            map[string]string `json:"details,omitempty" doc:"used to specify the custom parameters."`
	DiskOfferingID     *UUID             `` /* 490-byte string literal not displayed */
	DisplayName        string            `json:"displayname,omitempty" doc:"an optional user generated name for the virtual machine"`
	Group              string            `json:"group,omitempty" doc:"an optional group for the virtual machine"`
	IP4                *bool             `json:"ip4,omitempty" doc:"True to set an IPv4 to the default interface"`
	IP6                *bool             `json:"ip6,omitempty" doc:"True to set an IPv6 to the default interface"`
	IP6Address         net.IP            `json:"ip6address,omitempty" doc:"the ipv6 address for default vm's network"`
	IPAddress          net.IP            `json:"ipaddress,omitempty" doc:"the ip address for default vm's network"`
	Keyboard           string            `` /* 172-byte string literal not displayed */
	KeyPair            string            `json:"keypair,omitempty" doc:"name of the ssh key pair used to login to the virtual machine"`
	Name               string            `json:"name,omitempty" doc:"host name for the virtual machine"`
	NetworkIDs         []UUID            `` /* 128-byte string literal not displayed */
	RootDiskSize       int64             `` /* 243-byte string literal not displayed */
	SecurityGroupIDs   []UUID            `` /* 265-byte string literal not displayed */
	SecurityGroupNames []string          `` /* 268-byte string literal not displayed */
	ServiceOfferingID  *UUID             `json:"serviceofferingid" doc:"the ID of the service offering for the virtual machine"`
	Size               int64             `json:"size,omitempty" doc:"the arbitrary size for the DATADISK volume. Mutually exclusive with diskofferingid"`
	StartVM            *bool             `json:"startvm,omitempty" doc:"true if start vm after creating. Default value is true"`
	TemplateID         *UUID             `json:"templateid" doc:"the ID of the template for the virtual machine"`
	UserData           string            `` /* 372-byte string literal not displayed */
	ZoneID             *UUID             `json:"zoneid" doc:"availability zone for the virtual machine"`
	// contains filtered or unexported fields
}

DeployVirtualMachine (Async) represents the machine creation

Regarding the UserData field, the client is responsible to base64 (and probably gzip) it. Doing it within this library would make the integration with other tools, e.g. Terraform harder.

func (DeployVirtualMachine) AsyncResponse added in v0.13.0

func (DeployVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DeployVirtualMachine) Response added in v0.13.0

func (DeployVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type DestroyVirtualMachine added in v0.9.0

type DestroyVirtualMachine struct {
	ID *UUID `json:"id" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

DestroyVirtualMachine (Async) represents the destruction of the virtual machine

func (DestroyVirtualMachine) AsyncResponse added in v0.13.0

func (DestroyVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DestroyVirtualMachine) Response added in v0.13.0

func (DestroyVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type DetachISO added in v0.13.1

type DetachISO struct {
	VirtualMachineID *UUID `json:"virtualmachineid" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

DetachISO represents the request to detach an ISO to a virtual machine.

func (DetachISO) AsyncResponse added in v0.13.1

func (DetachISO) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DetachISO) Response added in v0.13.1

func (DetachISO) Response() interface{}

Response returns the struct to unmarshal

type DisassociateIPAddress added in v0.9.0

type DisassociateIPAddress struct {
	ID *UUID `json:"id" doc:"the id of the public ip address to disassociate"`
	// contains filtered or unexported fields
}

DisassociateIPAddress (Async) represents the IP deletion

func (DisassociateIPAddress) AsyncResponse added in v0.13.0

func (DisassociateIPAddress) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (DisassociateIPAddress) Response added in v0.13.0

func (DisassociateIPAddress) Response() interface{}

Response returns the struct to unmarshal

type EgressRule added in v0.9.0

type EgressRule IngressRule

EgressRule represents the ingress rule

type ErrorCode added in v0.9.2

type ErrorCode int

ErrorCode represents the CloudStack ApiErrorCode enum

See: https://github.com/apache/cloudstack/blob/master/api/src/main/java/org/apache/cloudstack/api/ApiErrorCode.java

const (
	// Unauthorized represents ... (TODO)
	Unauthorized ErrorCode = 401
	// MethodNotAllowed represents ... (TODO)
	MethodNotAllowed ErrorCode = 405
	// UnsupportedActionError represents ... (TODO)
	UnsupportedActionError ErrorCode = 422
	// APILimitExceeded represents ... (TODO)
	APILimitExceeded ErrorCode = 429
	// MalformedParameterError represents ... (TODO)
	MalformedParameterError ErrorCode = 430
	// ParamError represents ... (TODO)
	ParamError ErrorCode = 431

	// InternalError represents a server error
	InternalError ErrorCode = 530
	// AccountError represents ... (TODO)
	AccountError ErrorCode = 531
	// AccountResourceLimitError represents ... (TODO)
	AccountResourceLimitError ErrorCode = 532
	// InsufficientCapacityError represents ... (TODO)
	InsufficientCapacityError ErrorCode = 533
	// ResourceUnavailableError represents ... (TODO)
	ResourceUnavailableError ErrorCode = 534
	// ResourceAllocationError represents ... (TODO)
	ResourceAllocationError ErrorCode = 535
	// ResourceInUseError represents ... (TODO)
	ResourceInUseError ErrorCode = 536
	// NetworkRuleConflictError represents ... (TODO)
	NetworkRuleConflictError ErrorCode = 537
)

func (ErrorCode) String added in v0.9.22

func (i ErrorCode) String() string

type ErrorResponse added in v0.9.0

type ErrorResponse struct {
	CSErrorCode CSErrorCode `json:"cserrorcode"`
	ErrorCode   ErrorCode   `json:"errorcode"`
	ErrorText   string      `json:"errortext"`
	UUIDList    []UUIDItem  `json:"uuidList,omitempty"` // uuid*L*ist is not a typo
}

ErrorResponse represents the standard error response

func (ErrorResponse) Error added in v0.9.0

func (e ErrorResponse) Error() string

Error formats a CloudStack error into a standard error

type Event added in v0.9.0

type Event struct {
	Account     string `` /* 183-byte string literal not displayed */
	Created     string `json:"created,omitempty" doc:"the date the event was created"`
	Description string `json:"description,omitempty" doc:"a brief description of the event"`
	ID          *UUID  `json:"id" doc:"the ID of the event"`
	Level       string `json:"level,omitempty" doc:"the event level (INFO, WARN, ERROR)"`
	ParentID    *UUID  `json:"parentid,omitempty" doc:"whether the event is parented"`
	State       string `json:"state,omitempty" doc:"the state of the event"`
	Type        string `json:"type,omitempty" doc:"the type of the event (see event types)"`
	UserName    string `` /* 209-byte string literal not displayed */
}

Event represents an event in the system

func (Event) ListRequest added in v0.13.0

func (event Event) ListRequest() (ListCommand, error)

ListRequest builds the ListEvents request

type EventType added in v0.9.0

type EventType struct {
	Name string `json:"name,omitempty" doc:"Event Type"`
}

EventType represent a type of event

func (EventType) ListRequest added in v0.13.0

func (EventType) ListRequest() (ListCommand, error)

ListRequest builds the ListEventTypes request

type ExpungeVirtualMachine added in v0.9.0

type ExpungeVirtualMachine struct {
	ID *UUID `json:"id" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

ExpungeVirtualMachine represents the annihilation of a VM

func (ExpungeVirtualMachine) AsyncResponse added in v0.13.0

func (ExpungeVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (ExpungeVirtualMachine) Response added in v0.13.0

func (ExpungeVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type GetVMPassword added in v0.9.0

type GetVMPassword struct {
	ID *UUID `json:"id" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

GetVMPassword asks for an encrypted password

func (GetVMPassword) Response added in v0.13.0

func (GetVMPassword) Response() interface{}

Response returns the struct to unmarshal

type GetVirtualMachineUserData added in v0.9.22

type GetVirtualMachineUserData struct {
	VirtualMachineID *UUID `json:"virtualmachineid" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

GetVirtualMachineUserData returns the user-data of the given VM

func (GetVirtualMachineUserData) Response added in v0.13.0

func (GetVirtualMachineUserData) Response() interface{}

Response returns the struct to unmarshal

type Healthcheck added in v0.15.0

type Healthcheck struct {
	Interval    int64  `json:"interval,omitempty" doc:"healthcheck definition: time in seconds to wait for each check. Default: 10, minimum: 5"`
	Mode        string `json:"mode,omitempty" doc:"healthcheck definition: healthcheck mode can be either 'tcp' or 'http'"`
	Path        string `` /* 163-byte string literal not displayed */
	Port        int64  `` /* 143-byte string literal not displayed */
	StrikesFail int64  `` /* 136-byte string literal not displayed */
	StrikesOk   int64  `` /* 135-byte string literal not displayed */
	Timeout     int64  `` /* 139-byte string literal not displayed */
}

Healthcheck represents an Healthcheck attached to an IP

type IPAddress added in v0.9.0

type IPAddress struct {
	Allocated                 string        `json:"allocated,omitempty" doc:"date the public IP address was acquired"`
	Associated                string        `json:"associated,omitempty" doc:"date the public IP address was associated"`
	AssociatedNetworkID       *UUID         `json:"associatednetworkid,omitempty" doc:"the ID of the Network associated with the IP address"`
	AssociatedNetworkName     string        `json:"associatednetworkname,omitempty" doc:"the name of the Network associated with the IP address"`
	Description               string        `json:"description,omitempty" doc:"The IP address description."`
	ForVirtualNetwork         bool          `json:"forvirtualnetwork,omitempty" doc:"the virtual network for the IP address"`
	Healthcheck               *Healthcheck  `json:"healthcheck,omitempty" doc:"The IP healthcheck configuration"`
	ID                        *UUID         `json:"id,omitempty" doc:"public IP address id"`
	IPAddress                 net.IP        `json:"ipaddress,omitempty" doc:"public IP address"`
	IsElastic                 bool          `json:"iselastic,omitempty" doc:"is an elastic ip"`
	IsPortable                bool          `json:"isportable,omitempty" doc:"is public IP portable across the zones"`
	IsSourceNat               bool          `json:"issourcenat,omitempty" doc:"true if the IP address is a source nat address, false otherwise"`
	IsStaticNat               *bool         `json:"isstaticnat,omitempty" doc:"true if this ip is for static nat, false otherwise"`
	IsSystem                  bool          `json:"issystem,omitempty" doc:"true if this ip is system ip (was allocated as a part of deployVm or createLbRule)"`
	NetworkID                 *UUID         `json:"networkid,omitempty" doc:"the ID of the Network where ip belongs to"`
	PhysicalNetworkID         *UUID         `json:"physicalnetworkid,omitempty" doc:"the physical network this belongs to"`
	Purpose                   string        `` /* 159-byte string literal not displayed */
	ReverseDNS                []ReverseDNS  `json:"reversedns,omitempty" doc:"the list of PTR record(s) associated with the ip address"`
	State                     string        `json:"state,omitempty" doc:"State of the ip address. Can be: Allocatin, Allocated and Releasing"`
	Tags                      []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with ip address"`
	VirtualMachineDisplayName string        `` /* 141-byte string literal not displayed */
	VirtualMachineID          *UUID         `json:"virtualmachineid,omitempty" doc:"virtual machine id the ip address is assigned to (not null only for static nat Ip)"`
	VirtualMachineName        string        `` /* 126-byte string literal not displayed */
	VlanID                    *UUID         `` /* 126-byte string literal not displayed */
	VlanName                  string        `json:"vlanname,omitempty" doc:"the VLAN associated with the IP address"`
	VMIPAddress               net.IP        `json:"vmipaddress,omitempty" doc:"virtual machine (dnat) ip address (not null only for static nat Ip)"`
	ZoneID                    *UUID         `json:"zoneid,omitempty" doc:"the ID of the zone the public IP address belongs to"`
	ZoneName                  string        `json:"zonename,omitempty" doc:"the name of the zone the public IP address belongs to"`
}

IPAddress represents an IP Address

func (IPAddress) Delete added in v0.9.15

func (ipaddress IPAddress) Delete(ctx context.Context, client *Client) error

Delete removes the resource

func (IPAddress) ListRequest added in v0.9.20

func (ipaddress IPAddress) ListRequest() (ListCommand, error)

ListRequest builds the ListAdresses request

func (IPAddress) ResourceType added in v0.9.7

func (IPAddress) ResourceType() string

ResourceType returns the type of the resource

type IPToNetwork added in v0.9.0

type IPToNetwork struct {
	IP        net.IP `json:"ip,omitempty"`
	Ipv6      net.IP `json:"ipv6,omitempty"`
	NetworkID *UUID  `json:"networkid,omitempty"`
}

IPToNetwork represents a mapping between ip and networks

type ISO added in v0.13.1

type ISO Template

ISO represents an attachable ISO disc

func (ISO) ListRequest added in v0.13.1

func (iso ISO) ListRequest() (ListCommand, error)

ListRequest produces the ListIsos command.

func (ISO) ResourceType added in v0.13.1

func (ISO) ResourceType() string

ResourceType returns the type of the resource

type IngressRule added in v0.9.0

type IngressRule struct {
	CIDR              *CIDR  `json:"cidr,omitempty" doc:"the CIDR notation for the base IP address of the security group rule"`
	Description       string `json:"description,omitempty" doc:"description of the security group rule"`
	EndPort           uint16 `json:"endport,omitempty" doc:"the ending port of the security group rule "`
	IcmpCode          uint8  `json:"icmpcode,omitempty" doc:"the code for the ICMP message response"`
	IcmpType          uint8  `json:"icmptype,omitempty" doc:"the type of the ICMP message response"`
	Protocol          string `json:"protocol,omitempty" doc:"the protocol of the security group rule"`
	RuleID            *UUID  `json:"ruleid" doc:"the id of the security group rule"`
	SecurityGroupName string `json:"securitygroupname,omitempty" doc:"security group name"`
	StartPort         uint16 `json:"startport,omitempty" doc:"the starting port of the security group rule"`
}

IngressRule represents the ingress rule

type InstanceGroup added in v0.9.7

type InstanceGroup struct {
	Account string `json:"account,omitempty" doc:"the account owning the instance group"`
	Created string `json:"created,omitempty" doc:"time and date the instance group was created"`
	ID      *UUID  `json:"id,omitempty" doc:"the id of the instance group"`
	Name    string `json:"name,omitempty" doc:"the name of the instance group"`
}

InstanceGroup represents a group of VM

func (InstanceGroup) ListRequest added in v0.13.0

func (ig InstanceGroup) ListRequest() (ListCommand, error)

ListRequest builds the ListInstanceGroups request

type IterateItemFunc added in v0.9.18

type IterateItemFunc func(interface{}, error) bool

IterateItemFunc represents the callback to iterate a list of results, if false stops

type JobStatusType added in v0.9.0

type JobStatusType int

JobStatusType represents the status of a Job

const (
	// Pending represents a job in progress
	Pending JobStatusType = iota
	// Success represents a successfully completed job
	Success
	// Failure represents a job that has failed to complete
	Failure
)

func (JobStatusType) String added in v0.9.22

func (i JobStatusType) String() string

type ListAPIs added in v0.9.0

type ListAPIs struct {
	Name string `json:"name,omitempty" doc:"API name"`
	// contains filtered or unexported fields
}

ListAPIs represents a query to list the api

func (*ListAPIs) Response added in v0.13.0

func (*ListAPIs) Response() interface{}

Response returns the struct to unmarshal

type ListAPIsResponse added in v0.9.0

type ListAPIsResponse struct {
	Count int   `json:"count"`
	API   []API `json:"api"`
}

ListAPIsResponse represents a list of API

type ListAccounts added in v0.9.7

type ListAccounts struct {
	ID                *UUID  `json:"id,omitempty" doc:"List account by account ID"`
	IsCleanUpRequired *bool  `json:"iscleanuprequired,omitempty" doc:"list accounts by cleanuprequired attribute (values are true or false)"`
	Keyword           string `json:"keyword,omitempty" doc:"List by keyword"`
	Name              string `json:"name,omitempty" doc:"List account by account name"`
	Page              int    `json:"page,omitempty"`
	PageSize          int    `json:"pagesize,omitempty"`
	State             string `json:"state,omitempty" doc:"List accounts by state. Valid states are enabled, disabled, and locked."`
	// contains filtered or unexported fields
}

ListAccounts represents a query to display the accounts

func (ListAccounts) Each added in v0.13.0

func (ListAccounts) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListAccounts) ListRequest added in v0.13.0

func (ls *ListAccounts) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListAccounts) Response added in v0.13.0

func (ListAccounts) Response() interface{}

Response returns the struct to unmarshal

func (*ListAccounts) SetPage added in v0.10.3

func (ls *ListAccounts) SetPage(page int)

SetPage sets the current apge

func (*ListAccounts) SetPageSize added in v0.10.3

func (ls *ListAccounts) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListAccountsResponse added in v0.9.7

type ListAccountsResponse struct {
	Count   int       `json:"count"`
	Account []Account `json:"account"`
}

ListAccountsResponse represents a list of accounts

type ListAffinityGroupTypes added in v0.9.0

type ListAffinityGroupTypes struct {
	Keyword  string `json:"keyword,omitempty" doc:"List by keyword"`
	Page     int    `json:"page,omitempty"`
	PageSize int    `json:"pagesize,omitempty"`
	// contains filtered or unexported fields
}

ListAffinityGroupTypes represents an (anti-)affinity groups search

func (ListAffinityGroupTypes) Response added in v0.13.0

func (ListAffinityGroupTypes) Response() interface{}

Response returns the struct to unmarshal

type ListAffinityGroupTypesResponse added in v0.9.0

type ListAffinityGroupTypesResponse struct {
	Count             int                 `json:"count"`
	AffinityGroupType []AffinityGroupType `json:"affinitygrouptype"`
}

ListAffinityGroupTypesResponse represents a list of (anti-)affinity group types

type ListAffinityGroups added in v0.9.0

type ListAffinityGroups struct {
	ID               *UUID  `json:"id,omitempty" doc:"List the affinity group by the ID provided"`
	Keyword          string `json:"keyword,omitempty" doc:"List by keyword"`
	Name             string `json:"name,omitempty" doc:"Lists affinity groups by name"`
	Page             int    `json:"page,omitempty"`
	PageSize         int    `json:"pagesize,omitempty"`
	Type             string `json:"type,omitempty" doc:"Lists affinity groups by type"`
	VirtualMachineID *UUID  `json:"virtualmachineid,omitempty" doc:"Lists affinity groups by virtual machine ID"`
	// contains filtered or unexported fields
}

ListAffinityGroups represents an (anti-)affinity groups search

func (ListAffinityGroups) Each added in v0.13.0

func (ListAffinityGroups) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListAffinityGroups) ListRequest added in v0.13.0

func (ls *ListAffinityGroups) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListAffinityGroups) Response added in v0.13.0

func (ListAffinityGroups) Response() interface{}

Response returns the struct to unmarshal

func (*ListAffinityGroups) SetPage added in v0.10.0

func (ls *ListAffinityGroups) SetPage(page int)

SetPage sets the current apge

func (*ListAffinityGroups) SetPageSize added in v0.10.0

func (ls *ListAffinityGroups) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListAffinityGroupsResponse

type ListAffinityGroupsResponse struct {
	Count         int             `json:"count"`
	AffinityGroup []AffinityGroup `json:"affinitygroup"`
}

ListAffinityGroupsResponse represents a list of (anti-)affinity groups

type ListAsyncJobs added in v0.9.0

type ListAsyncJobs struct {
	Keyword   string `json:"keyword,omitempty" doc:"List by keyword"`
	Page      int    `json:"page,omitempty"`
	PageSize  int    `json:"pagesize,omitempty"`
	StartDate string `json:"startdate,omitempty" doc:"the start date of the async job"`
	// contains filtered or unexported fields
}

ListAsyncJobs list the asynchronous jobs

func (ListAsyncJobs) Each added in v0.13.0

func (ListAsyncJobs) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListAsyncJobs) ListRequest added in v0.13.0

func (ls *ListAsyncJobs) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListAsyncJobs) Response added in v0.13.0

func (ListAsyncJobs) Response() interface{}

Response returns the struct to unmarshal

func (*ListAsyncJobs) SetPage added in v0.13.0

func (ls *ListAsyncJobs) SetPage(page int)

SetPage sets the current apge

func (*ListAsyncJobs) SetPageSize added in v0.13.0

func (ls *ListAsyncJobs) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListAsyncJobsResponse added in v0.9.0

type ListAsyncJobsResponse struct {
	Count    int              `json:"count"`
	AsyncJob []AsyncJobResult `json:"asyncjobs"`
}

ListAsyncJobsResponse represents a list of job results

type ListCommand added in v0.9.18

type ListCommand interface {
	Listable
	Command
	// SetPage defines the current pages
	SetPage(int)
	// SetPageSize defines the size of the page
	SetPageSize(int)
	// Each reads the data from the response and feeds channels, and returns true if we are on the last page
	Each(interface{}, IterateItemFunc)
}

ListCommand represents a listing request

type ListEventTypes added in v0.9.0

type ListEventTypes struct {
	Page     int `json:"page,omitempty"`     // fake
	PageSize int `json:"pagesize,omitempty"` // fake
	// contains filtered or unexported fields
}

ListEventTypes list the event types

func (ListEventTypes) Each added in v0.13.0

func (ListEventTypes) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListEventTypes) ListRequest added in v0.13.0

func (ls *ListEventTypes) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListEventTypes) Response added in v0.13.0

func (ListEventTypes) Response() interface{}

Response returns the struct to unmarshal

func (*ListEventTypes) SetPage added in v0.13.0

func (ls *ListEventTypes) SetPage(page int)

SetPage sets the current apge

func (*ListEventTypes) SetPageSize added in v0.13.0

func (ls *ListEventTypes) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListEventTypesResponse added in v0.9.0

type ListEventTypesResponse struct {
	Count     int         `json:"count"`
	EventType []EventType `json:"eventtype"`
	// contains filtered or unexported fields
}

ListEventTypesResponse represents a response of a list query

type ListEvents added in v0.9.0

type ListEvents struct {
	Duration  int    `json:"duration,omitempty" doc:"the duration of the event"`
	EndDate   string `` /* 152-byte string literal not displayed */
	EntryTime int    `json:"entrytime,omitempty" doc:"the time the event was entered"`
	ID        *UUID  `json:"id,omitempty" doc:"the ID of the event"`
	Keyword   string `json:"keyword,omitempty" doc:"List by keyword"`
	Level     string `json:"level,omitempty" doc:"the event level (INFO, WARN, ERROR)"`
	Page      int    `json:"page,omitempty"`
	PageSize  int    `json:"pagesize,omitempty"`
	StartDate string `` /* 156-byte string literal not displayed */
	Type      string `json:"type,omitempty" doc:"the event type (see event types)"`
	// contains filtered or unexported fields
}

ListEvents list the events

func (ListEvents) Each added in v0.13.0

func (ListEvents) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListEvents) ListRequest added in v0.13.0

func (ls *ListEvents) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListEvents) Response added in v0.13.0

func (ListEvents) Response() interface{}

Response returns the struct to unmarshal

func (*ListEvents) SetPage added in v0.13.0

func (ls *ListEvents) SetPage(page int)

SetPage sets the current apge

func (*ListEvents) SetPageSize added in v0.13.0

func (ls *ListEvents) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListEventsResponse added in v0.9.0

type ListEventsResponse struct {
	Count int     `json:"count"`
	Event []Event `json:"event"`
}

ListEventsResponse represents a response of a list query

type ListISOs added in v0.13.1

type ListISOs struct {
	Bootable    *bool         `json:"bootable,omitempty" doc:"True if the ISO is bootable, false otherwise"`
	ID          *UUID         `json:"id,omitempty" doc:"List ISO by id"`
	IsoFilter   string        `` /* 742-byte string literal not displayed */
	IsPublic    *bool         `json:"ispublic,omitempty" doc:"True if the ISO is publicly available to all users, false otherwise."`
	IsReady     *bool         `json:"isready,omitempty" doc:"True if this ISO is ready to be deployed"`
	Keyword     string        `json:"keyword,omitempty" doc:"List by keyword"`
	Name        string        `json:"name,omitempty" doc:"List all isos by name"`
	Page        int           `json:"page,omitempty"`
	PageSize    int           `json:"pagesize,omitempty"`
	ShowRemoved *bool         `json:"showremoved,omitempty" doc:"Show removed ISOs as well"`
	Tags        []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"`
	ZoneID      *UUID         `json:"zoneid,omitempty" doc:"The ID of the zone"`
	// contains filtered or unexported fields
}

ListISOs represents the list all available ISO files request

func (ListISOs) Each added in v0.13.1

func (ListISOs) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListISOs) ListRequest added in v0.13.1

func (ls *ListISOs) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListISOs) Response added in v0.13.1

func (ListISOs) Response() interface{}

Response returns the struct to unmarshal

func (*ListISOs) SetPage added in v0.13.1

func (ls *ListISOs) SetPage(page int)

SetPage sets the current apge

func (*ListISOs) SetPageSize added in v0.13.1

func (ls *ListISOs) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListISOsResponse added in v0.13.1

type ListISOsResponse struct {
	Count int   `json:"count"`
	ISO   []ISO `json:"iso"`
}

ListISOsResponse represents a list of ISO files

type ListInstanceGroups added in v0.9.7

type ListInstanceGroups struct {
	ID       *UUID  `json:"id,omitempty" doc:"List instance groups by ID"`
	Keyword  string `json:"keyword,omitempty" doc:"List by keyword"`
	Name     string `json:"name,omitempty" doc:"List instance groups by name"`
	Page     int    `json:"page,omitempty"`
	PageSize int    `json:"pagesize,omitempty"`
	// contains filtered or unexported fields
}

ListInstanceGroups lists VM groups

func (ListInstanceGroups) Each added in v0.13.0

func (ListInstanceGroups) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListInstanceGroups) ListRequest added in v0.13.0

func (ls *ListInstanceGroups) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListInstanceGroups) Response added in v0.13.0

func (ListInstanceGroups) Response() interface{}

Response returns the struct to unmarshal

func (*ListInstanceGroups) SetPage added in v0.13.0

func (ls *ListInstanceGroups) SetPage(page int)

SetPage sets the current apge

func (*ListInstanceGroups) SetPageSize added in v0.13.0

func (ls *ListInstanceGroups) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListInstanceGroupsResponse added in v0.9.7

type ListInstanceGroupsResponse struct {
	Count         int             `json:"count"`
	InstanceGroup []InstanceGroup `json:"instancegroup"`
}

ListInstanceGroupsResponse represents a list of instance groups

type ListNetworkOfferings added in v0.9.0

type ListNetworkOfferings struct {
	Availability       string    `json:"availability,omitempty" doc:"the availability of network offering. Default value is Required"`
	DisplayText        string    `json:"displaytext,omitempty" doc:"list network offerings by display text"`
	GuestIPType        string    `json:"guestiptype,omitempty" doc:"list network offerings by guest type: Shared or Isolated"`
	ID                 *UUID     `json:"id,omitempty" doc:"list network offerings by id"`
	IsDefault          *bool     `json:"isdefault,omitempty" doc:"true if need to list only default network offerings. Default value is false"`
	IsTagged           *bool     `json:"istagged,omitempty" doc:"true if offering has tags specified"`
	Keyword            string    `json:"keyword,omitempty" doc:"List by keyword"`
	Name               string    `json:"name,omitempty" doc:"list network offerings by name"`
	NetworkID          *UUID     `` /* 152-byte string literal not displayed */
	Page               int       `json:"page,omitempty"`
	PageSize           int       `json:"pagesize,omitempty"`
	SourceNATSupported *bool     `` /* 131-byte string literal not displayed */
	SpecifyIPRanges    *bool     `json:"specifyipranges,omitempty" doc:"true if need to list only network offerings which support specifying ip ranges"`
	SpecifyVlan        *bool     `json:"specifyvlan,omitempty" doc:"the tags for the network offering."`
	State              string    `json:"state,omitempty" doc:"list network offerings by state"`
	SupportedServices  []Service `json:"supportedservices,omitempty" doc:"list network offerings supporting certain services"`
	Tags               string    `json:"tags,omitempty" doc:"list network offerings by tags"`
	TrafficType        string    `json:"traffictype,omitempty" doc:"list by traffic type"`
	ZoneID             *UUID     `json:"zoneid,omitempty" doc:"list network offerings available for network creation in specific zone"`
	// contains filtered or unexported fields
}

ListNetworkOfferings represents a query for network offerings

func (ListNetworkOfferings) Each added in v0.13.0

func (ListNetworkOfferings) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListNetworkOfferings) ListRequest added in v0.13.0

func (ls *ListNetworkOfferings) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListNetworkOfferings) Response added in v0.13.0

func (ListNetworkOfferings) Response() interface{}

Response returns the struct to unmarshal

func (*ListNetworkOfferings) SetPage added in v0.12.0

func (ls *ListNetworkOfferings) SetPage(page int)

SetPage sets the current apge

func (*ListNetworkOfferings) SetPageSize added in v0.12.0

func (ls *ListNetworkOfferings) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListNetworkOfferingsResponse added in v0.9.0

type ListNetworkOfferingsResponse struct {
	Count           int               `json:"count"`
	NetworkOffering []NetworkOffering `json:"networkoffering"`
}

ListNetworkOfferingsResponse represents a list of service offerings

type ListNetworks added in v0.9.0

type ListNetworks struct {
	CanUseForDeploy   *bool         `json:"canusefordeploy,omitempty" doc:"List networks available for vm deployment"`
	ID                *UUID         `json:"id,omitempty" doc:"List networks by id"`
	IsSystem          *bool         `json:"issystem,omitempty" doc:"true If network is system, false otherwise"`
	Keyword           string        `json:"keyword,omitempty" doc:"List by keyword"`
	Page              int           `json:"page,omitempty"`
	PageSize          int           `json:"pagesize,omitempty"`
	PhysicalNetworkID *UUID         `json:"physicalnetworkid,omitempty" doc:"List networks by physical network id"`
	RestartRequired   *bool         `json:"restartrequired,omitempty" doc:"List networks by restartRequired"`
	SpecifyIPRanges   *bool         `json:"specifyipranges,omitempty" doc:"True if need to list only networks which support specifying ip ranges"`
	SupportedServices []Service     `json:"supportedservices,omitempty" doc:"List networks supporting certain services"`
	Tags              []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"`
	TrafficType       string        `json:"traffictype,omitempty" doc:"Type of the traffic"`
	Type              string        `json:"type,omitempty" doc:"The type of the network. Supported values are: Isolated and Shared"`
	ZoneID            *UUID         `json:"zoneid,omitempty" doc:"The Zone ID of the network"`
	// contains filtered or unexported fields
}

ListNetworks represents a query to a network

func (ListNetworks) Each added in v0.13.0

func (ListNetworks) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListNetworks) ListRequest added in v0.13.0

func (ls *ListNetworks) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListNetworks) Response added in v0.13.0

func (ListNetworks) Response() interface{}

Response returns the struct to unmarshal

func (*ListNetworks) SetPage added in v0.9.21

func (ls *ListNetworks) SetPage(page int)

SetPage sets the current apge

func (*ListNetworks) SetPageSize added in v0.9.21

func (ls *ListNetworks) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListNetworksResponse added in v0.9.0

type ListNetworksResponse struct {
	Count   int       `json:"count"`
	Network []Network `json:"network"`
}

ListNetworksResponse represents the list of networks

type ListNics added in v0.9.0

type ListNics struct {
	Keyword          string `json:"keyword,omitempty" doc:"List by keyword"`
	NetworkID        *UUID  `json:"networkid,omitempty" doc:"list nic of the specific vm's network"`
	NicID            *UUID  `json:"nicid,omitempty" doc:"the ID of the nic to to list IPs"`
	Page             int    `json:"page,omitempty"`
	PageSize         int    `json:"pagesize,omitempty"`
	VirtualMachineID *UUID  `json:"virtualmachineid,omitempty" doc:"the ID of the vm"`
	// contains filtered or unexported fields
}

ListNics represents the NIC search

func (ListNics) Each added in v0.13.0

func (ListNics) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListNics) ListRequest added in v0.13.0

func (ls *ListNics) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListNics) Response added in v0.13.0

func (ListNics) Response() interface{}

Response returns the struct to unmarshal

func (*ListNics) SetPage added in v0.9.18

func (ls *ListNics) SetPage(page int)

SetPage sets the current apge

func (*ListNics) SetPageSize added in v0.9.18

func (ls *ListNics) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListNicsResponse added in v0.9.0

type ListNicsResponse struct {
	Count int   `json:"count"`
	Nic   []Nic `json:"nic"`
}

ListNicsResponse represents a list of templates

type ListOSCategories added in v0.11.0

type ListOSCategories struct {
	ID       *UUID  `json:"id,omitempty" doc:"list Os category by id"`
	Keyword  string `json:"keyword,omitempty" doc:"List by keyword"`
	Name     string `json:"name,omitempty" doc:"list os category by name"`
	Page     int    `json:"page,omitempty"`
	PageSize int    `json:"pagesize,omitempty"`
	// contains filtered or unexported fields
}

ListOSCategories lists the OS categories

func (ListOSCategories) Each added in v0.13.0

func (ListOSCategories) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListOSCategories) ListRequest added in v0.13.0

func (ls *ListOSCategories) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListOSCategories) Response added in v0.13.0

func (ListOSCategories) Response() interface{}

Response returns the struct to unmarshal

func (*ListOSCategories) SetPage added in v0.13.0

func (ls *ListOSCategories) SetPage(page int)

SetPage sets the current apge

func (*ListOSCategories) SetPageSize added in v0.13.0

func (ls *ListOSCategories) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListOSCategoriesResponse added in v0.11.0

type ListOSCategoriesResponse struct {
	Count      int          `json:"count"`
	OSCategory []OSCategory `json:"oscategory"`
}

ListOSCategoriesResponse represents a list of OS categories

type ListPublicIPAddresses added in v0.9.0

type ListPublicIPAddresses struct {
	AllocatedOnly       *bool         `json:"allocatedonly,omitempty" doc:"limits search results to allocated public IP addresses"`
	AssociatedNetworkID *UUID         `json:"associatednetworkid,omitempty" doc:"lists all public IP addresses associated to the network specified"`
	ForLoadBalancing    *bool         `json:"forloadbalancing,omitempty" doc:"list only ips used for load balancing"`
	ForVirtualNetwork   *bool         `json:"forvirtualnetwork,omitempty" doc:"the virtual network for the IP address"`
	ID                  *UUID         `json:"id,omitempty" doc:"lists ip address by id"`
	IPAddress           net.IP        `json:"ipaddress,omitempty" doc:"lists the specified IP address"`
	IsElastic           *bool         `json:"iselastic,omitempty" doc:"list only elastic ip addresses"`
	IsSourceNat         *bool         `json:"issourcenat,omitempty" doc:"list only source nat ip addresses"`
	IsStaticNat         *bool         `json:"isstaticnat,omitempty" doc:"list only static nat ip addresses"`
	Keyword             string        `json:"keyword,omitempty" doc:"List by keyword"`
	Page                int           `json:"page,omitempty"`
	PageSize            int           `json:"pagesize,omitempty"`
	PhysicalNetworkID   *UUID         `json:"physicalnetworkid,omitempty" doc:"lists all public IP addresses by physical network id"`
	Tags                []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"`
	VlanID              *UUID         `json:"vlanid,omitempty" doc:"lists all public IP addresses by VLAN ID"`
	ZoneID              *UUID         `json:"zoneid,omitempty" doc:"lists all public IP addresses by Zone ID"`
	// contains filtered or unexported fields
}

ListPublicIPAddresses represents a search for public IP addresses

func (ListPublicIPAddresses) Each added in v0.13.0

func (ListPublicIPAddresses) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListPublicIPAddresses) ListRequest added in v0.13.0

func (ls *ListPublicIPAddresses) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListPublicIPAddresses) Response added in v0.13.0

func (ListPublicIPAddresses) Response() interface{}

Response returns the struct to unmarshal

func (*ListPublicIPAddresses) SetPage added in v0.9.20

func (ls *ListPublicIPAddresses) SetPage(page int)

SetPage sets the current apge

func (*ListPublicIPAddresses) SetPageSize added in v0.9.20

func (ls *ListPublicIPAddresses) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListPublicIPAddressesResponse added in v0.9.0

type ListPublicIPAddressesResponse struct {
	Count           int         `json:"count"`
	PublicIPAddress []IPAddress `json:"publicipaddress"`
}

ListPublicIPAddressesResponse represents a list of public IP addresses

type ListResourceDetails added in v0.9.22

type ListResourceDetails struct {
	ResourceType string `json:"resourcetype" doc:"list by resource type"`
	ForDisplay   bool   `json:"fordisplay,omitempty" doc:"if set to true, only details marked with display=true, are returned. False by default"`
	Key          string `json:"key,omitempty" doc:"list by key"`
	Keyword      string `json:"keyword,omitempty" doc:"List by keyword"`
	Page         int    `json:"page,omitempty"`
	PageSize     int    `json:"pagesize,omitempty"`
	ResourceID   *UUID  `json:"resourceid,omitempty" doc:"list by resource id"`
	Value        string `json:"value,omitempty" doc:"list by key, value. Needs to be passed only along with key"`
	// contains filtered or unexported fields
}

ListResourceDetails lists the resource tag(s) (but different from listTags...)

func (ListResourceDetails) Each added in v0.13.0

func (ListResourceDetails) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListResourceDetails) ListRequest added in v0.13.0

func (ls *ListResourceDetails) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListResourceDetails) Response added in v0.13.0

func (ListResourceDetails) Response() interface{}

Response returns the struct to unmarshal

func (*ListResourceDetails) SetPage added in v0.13.0

func (ls *ListResourceDetails) SetPage(page int)

SetPage sets the current apge

func (*ListResourceDetails) SetPageSize added in v0.13.0

func (ls *ListResourceDetails) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListResourceDetailsResponse added in v0.9.22

type ListResourceDetailsResponse struct {
	Count          int           `json:"count"`
	ResourceDetail []ResourceTag `json:"resourcedetail"`
}

ListResourceDetailsResponse represents a list of resource details

type ListResourceLimits added in v0.9.7

type ListResourceLimits struct {
	ID               int64        `json:"id,omitempty" doc:"Lists resource limits by ID."`
	Keyword          string       `json:"keyword,omitempty" doc:"List by keyword"`
	Page             int          `json:"page,omitempty"`
	PageSize         int          `json:"pagesize,omitempty"`
	ResourceType     ResourceType `` /* 868-byte string literal not displayed */
	ResourceTypeName string       `` /* 956-byte string literal not displayed */
	// contains filtered or unexported fields
}

ListResourceLimits lists the resource limits

func (ListResourceLimits) Each added in v0.13.0

func (ListResourceLimits) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListResourceLimits) ListRequest added in v0.13.0

func (ls *ListResourceLimits) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListResourceLimits) Response added in v0.13.0

func (ListResourceLimits) Response() interface{}

Response returns the struct to unmarshal

func (*ListResourceLimits) SetPage added in v0.13.0

func (ls *ListResourceLimits) SetPage(page int)

SetPage sets the current apge

func (*ListResourceLimits) SetPageSize added in v0.13.0

func (ls *ListResourceLimits) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListResourceLimitsResponse added in v0.9.7

type ListResourceLimitsResponse struct {
	Count         int             `json:"count"`
	ResourceLimit []ResourceLimit `json:"resourcelimit"`
}

ListResourceLimitsResponse represents a list of resource limits

type ListSSHKeyPairs added in v0.9.0

type ListSSHKeyPairs struct {
	Fingerprint string `json:"fingerprint,omitempty" doc:"A public key fingerprint to look for"`
	Keyword     string `json:"keyword,omitempty" doc:"List by keyword"`
	Name        string `json:"name,omitempty" doc:"A key pair name to look for"`
	Page        int    `json:"page,omitempty"`
	PageSize    int    `json:"pagesize,omitempty"`
	// contains filtered or unexported fields
}

ListSSHKeyPairs represents a query for a list of SSH KeyPairs

func (ListSSHKeyPairs) Each added in v0.13.0

func (ListSSHKeyPairs) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListSSHKeyPairs) ListRequest added in v0.13.0

func (ls *ListSSHKeyPairs) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListSSHKeyPairs) Response added in v0.13.0

func (ListSSHKeyPairs) Response() interface{}

Response returns the struct to unmarshal

func (*ListSSHKeyPairs) SetPage added in v0.9.19

func (ls *ListSSHKeyPairs) SetPage(page int)

SetPage sets the current apge

func (*ListSSHKeyPairs) SetPageSize added in v0.9.19

func (ls *ListSSHKeyPairs) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListSSHKeyPairsResponse

type ListSSHKeyPairsResponse struct {
	Count      int          `json:"count"`
	SSHKeyPair []SSHKeyPair `json:"sshkeypair"`
}

ListSSHKeyPairsResponse represents a list of SSH key pairs

type ListSecurityGroups added in v0.9.0

type ListSecurityGroups struct {
	ID                *UUID  `json:"id,omitempty" doc:"list the security group by the id provided"`
	Keyword           string `json:"keyword,omitempty" doc:"List by keyword"`
	Page              int    `json:"page,omitempty"`
	PageSize          int    `json:"pagesize,omitempty"`
	SecurityGroupName string `json:"securitygroupname,omitempty" doc:"lists security groups by name"`
	VirtualMachineID  *UUID  `json:"virtualmachineid,omitempty" doc:"lists security groups by virtual machine id"`
	// contains filtered or unexported fields
}

ListSecurityGroups represents a search for security groups

func (ListSecurityGroups) Each added in v0.13.0

func (ListSecurityGroups) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListSecurityGroups) ListRequest added in v0.13.0

func (ls *ListSecurityGroups) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListSecurityGroups) Response added in v0.13.0

func (ListSecurityGroups) Response() interface{}

Response returns the struct to unmarshal

func (*ListSecurityGroups) SetPage added in v0.9.21

func (ls *ListSecurityGroups) SetPage(page int)

SetPage sets the current apge

func (*ListSecurityGroups) SetPageSize added in v0.9.21

func (ls *ListSecurityGroups) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListSecurityGroupsResponse

type ListSecurityGroupsResponse struct {
	Count         int             `json:"count"`
	SecurityGroup []SecurityGroup `json:"securitygroup"`
}

ListSecurityGroupsResponse represents a list of security groups

type ListServiceOfferings added in v0.9.0

type ListServiceOfferings struct {
	ID               *UUID  `json:"id,omitempty" doc:"ID of the service offering"`
	IsSystem         *bool  `json:"issystem,omitempty" doc:"is this a system vm offering"`
	Keyword          string `json:"keyword,omitempty" doc:"List by keyword"`
	Name             string `json:"name,omitempty" doc:"name of the service offering"`
	Page             int    `json:"page,omitempty"`
	PageSize         int    `json:"pagesize,omitempty"`
	Restricted       *bool  `` /* 185-byte string literal not displayed */
	SystemVMType     string `` /* 136-byte string literal not displayed */
	VirtualMachineID *UUID  `` /* 175-byte string literal not displayed */
	// contains filtered or unexported fields
}

ListServiceOfferings represents a query for service offerings

func (ListServiceOfferings) Each added in v0.13.0

func (ListServiceOfferings) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListServiceOfferings) ListRequest added in v0.13.0

func (ls *ListServiceOfferings) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListServiceOfferings) Response added in v0.13.0

func (ListServiceOfferings) Response() interface{}

Response returns the struct to unmarshal

func (*ListServiceOfferings) SetPage added in v0.9.24

func (ls *ListServiceOfferings) SetPage(page int)

SetPage sets the current apge

func (*ListServiceOfferings) SetPageSize added in v0.9.24

func (ls *ListServiceOfferings) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListServiceOfferingsResponse

type ListServiceOfferingsResponse struct {
	Count           int               `json:"count"`
	ServiceOffering []ServiceOffering `json:"serviceoffering"`
}

ListServiceOfferingsResponse represents a list of service offerings

type ListSnapshots added in v0.9.0

type ListSnapshots struct {
	ID           *UUID         `json:"id,omitempty" doc:"lists snapshot by snapshot ID"`
	IntervalType string        `json:"intervaltype,omitempty" doc:"valid values are HOURLY, DAILY, WEEKLY, and MONTHLY."`
	Keyword      string        `json:"keyword,omitempty" doc:"List by keyword"`
	Name         string        `json:"name,omitempty" doc:"lists snapshot by snapshot name"`
	Page         int           `json:"page,omitempty"`
	PageSize     int           `json:"pagesize,omitempty"`
	SnapshotType string        `json:"snapshottype,omitempty" doc:"valid values are MANUAL or RECURRING."`
	Tags         []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"`
	VolumeID     *UUID         `json:"volumeid,omitempty" doc:"the ID of the disk volume"`
	ZoneID       *UUID         `json:"zoneid,omitempty" doc:"list snapshots by zone id"`
	// contains filtered or unexported fields
}

ListSnapshots lists the volume snapshots

func (ListSnapshots) Each added in v0.13.0

func (ListSnapshots) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListSnapshots) ListRequest added in v0.13.0

func (ls *ListSnapshots) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListSnapshots) Response added in v0.13.0

func (ListSnapshots) Response() interface{}

Response returns the struct to unmarshal

func (*ListSnapshots) SetPage added in v0.12.3

func (ls *ListSnapshots) SetPage(page int)

SetPage sets the current apge

func (*ListSnapshots) SetPageSize added in v0.12.3

func (ls *ListSnapshots) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListSnapshotsResponse added in v0.9.0

type ListSnapshotsResponse struct {
	Count    int        `json:"count"`
	Snapshot []Snapshot `json:"snapshot"`
}

ListSnapshotsResponse represents a list of volume snapshots

type ListTags added in v0.9.0

type ListTags struct {
	Customer     string `json:"customer,omitempty" doc:"list by customer name"`
	Key          string `json:"key,omitempty" doc:"list by key"`
	Keyword      string `json:"keyword,omitempty" doc:"List by keyword"`
	Page         int    `json:"page,omitempty"`
	PageSize     int    `json:"pagesize,omitempty"`
	ResourceID   *UUID  `json:"resourceid,omitempty" doc:"list by resource id"`
	ResourceType string `json:"resourcetype,omitempty" doc:"list by resource type"`
	Value        string `json:"value,omitempty" doc:"list by value"`
	// contains filtered or unexported fields
}

ListTags list resource tag(s)

func (ListTags) Each added in v0.13.0

func (ListTags) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListTags) ListRequest added in v0.13.0

func (ls *ListTags) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListTags) Response added in v0.13.0

func (ListTags) Response() interface{}

Response returns the struct to unmarshal

func (*ListTags) SetPage added in v0.13.0

func (ls *ListTags) SetPage(page int)

SetPage sets the current apge

func (*ListTags) SetPageSize added in v0.13.0

func (ls *ListTags) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListTagsResponse added in v0.9.0

type ListTagsResponse struct {
	Count int           `json:"count"`
	Tag   []ResourceTag `json:"tag"`
}

ListTagsResponse represents a list of resource tags

type ListTemplates added in v0.9.0

type ListTemplates struct {
	TemplateFilter string        `` /* 700-byte string literal not displayed */
	ID             *UUID         `json:"id,omitempty" doc:"the template ID"`
	Keyword        string        `json:"keyword,omitempty" doc:"List by keyword"`
	Name           string        `json:"name,omitempty" doc:"the template name"`
	Page           int           `json:"page,omitempty"`
	PageSize       int           `json:"pagesize,omitempty"`
	ShowRemoved    *bool         `json:"showremoved,omitempty" doc:"Show removed templates as well"`
	Tags           []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"`
	ZoneID         *UUID         `json:"zoneid,omitempty" doc:"list templates by zoneid"`
	// contains filtered or unexported fields
}

ListTemplates represents a template query filter

func (ListTemplates) Each added in v0.13.0

func (ListTemplates) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListTemplates) ListRequest added in v0.13.0

func (ls *ListTemplates) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListTemplates) Response added in v0.13.0

func (ListTemplates) Response() interface{}

Response returns the struct to unmarshal

func (*ListTemplates) SetPage added in v0.9.20

func (ls *ListTemplates) SetPage(page int)

SetPage sets the current apge

func (*ListTemplates) SetPageSize added in v0.9.20

func (ls *ListTemplates) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListTemplatesResponse

type ListTemplatesResponse struct {
	Count    int        `json:"count"`
	Template []Template `json:"template"`
}

ListTemplatesResponse represents a list of templates

type ListUsers added in v0.9.22

type ListUsers struct {
	ID       *UUID  `json:"id,omitempty" doc:"List user by ID."`
	Keyword  string `json:"keyword,omitempty" doc:"List by keyword"`
	Page     int    `json:"page,omitempty"`
	PageSize int    `json:"pagesize,omitempty"`
	State    string `json:"state,omitempty" doc:"List users by state of the user account."`
	UserName string `json:"username,omitempty" doc:"List user by the username"`
	// contains filtered or unexported fields
}

ListUsers represents the search for Users

func (ListUsers) Each added in v0.13.0

func (ListUsers) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListUsers) ListRequest added in v0.13.0

func (ls *ListUsers) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListUsers) Response added in v0.13.0

func (ListUsers) Response() interface{}

Response returns the struct to unmarshal

func (*ListUsers) SetPage added in v0.13.0

func (ls *ListUsers) SetPage(page int)

SetPage sets the current apge

func (*ListUsers) SetPageSize added in v0.13.0

func (ls *ListUsers) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListUsersResponse added in v0.9.22

type ListUsersResponse struct {
	Count int    `json:"count"`
	User  []User `json:"user"`
}

ListUsersResponse represents a list of users

type ListVirtualMachines added in v0.9.0

type ListVirtualMachines struct {
	AffinityGroupID   *UUID         `json:"affinitygroupid,omitempty" doc:"list vms by affinity group"`
	Details           []string      `` /* 253-byte string literal not displayed */
	ForVirtualNetwork *bool         `` /* 126-byte string literal not displayed */
	GroupID           *UUID         `json:"groupid,omitempty" doc:"the group ID"`
	ID                *UUID         `json:"id,omitempty" doc:"the ID of the virtual machine"`
	IDs               []UUID        `json:"ids,omitempty" doc:"the IDs of the virtual machines, mutually exclusive with id"`
	IPAddress         net.IP        `json:"ipaddress,omitempty" doc:"an IP address to filter the result"`
	IsoID             *UUID         `json:"isoid,omitempty" doc:"list vms by iso"`
	Keyword           string        `json:"keyword,omitempty" doc:"List by keyword"`
	Name              string        `json:"name,omitempty" doc:"name of the virtual machine"`
	NetworkID         *UUID         `json:"networkid,omitempty" doc:"list by network id"`
	Page              int           `json:"page,omitempty"`
	PageSize          int           `json:"pagesize,omitempty"`
	ServiceOfferindID *UUID         `json:"serviceofferingid,omitempty" doc:"list by the service offering"`
	State             string        `json:"state,omitempty" doc:"state of the virtual machine"`
	Tags              []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"`
	TemplateID        *UUID         `json:"templateid,omitempty" doc:"list vms by template"`
	ZoneID            *UUID         `json:"zoneid,omitempty" doc:"the availability zone ID"`
	// contains filtered or unexported fields
}

ListVirtualMachines represents a search for a VM

func (ListVirtualMachines) Each added in v0.13.0

func (ListVirtualMachines) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListVirtualMachines) ListRequest added in v0.13.0

func (ls *ListVirtualMachines) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListVirtualMachines) Response added in v0.13.0

func (ListVirtualMachines) Response() interface{}

Response returns the struct to unmarshal

func (*ListVirtualMachines) SetPage added in v0.9.18

func (ls *ListVirtualMachines) SetPage(page int)

SetPage sets the current apge

func (*ListVirtualMachines) SetPageSize added in v0.9.18

func (ls *ListVirtualMachines) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListVirtualMachinesResponse

type ListVirtualMachinesResponse struct {
	Count          int              `json:"count"`
	VirtualMachine []VirtualMachine `json:"virtualmachine"`
}

ListVirtualMachinesResponse represents a list of virtual machines

type ListVolumes added in v0.9.0

type ListVolumes struct {
	DiskOfferingID   *UUID         `json:"diskofferingid,omitempty" doc:"List volumes by disk offering"`
	ID               *UUID         `json:"id,omitempty" doc:"The ID of the disk volume"`
	Keyword          string        `json:"keyword,omitempty" doc:"List by keyword"`
	Name             string        `json:"name,omitempty" doc:"The name of the disk volume"`
	Page             int           `json:"page,omitempty"`
	PageSize         int           `json:"pagesize,omitempty"`
	Tags             []ResourceTag `json:"tags,omitempty" doc:"List resources by tags (key/value pairs)"`
	Type             string        `json:"type,omitempty" doc:"The type of disk volume"`
	VirtualMachineID *UUID         `json:"virtualmachineid,omitempty" doc:"The ID of the virtual machine"`
	ZoneID           *UUID         `json:"zoneid,omitempty" doc:"The ID of the availability zone"`
	// contains filtered or unexported fields
}

ListVolumes represents a query listing volumes

func (ListVolumes) Each added in v0.13.0

func (ListVolumes) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListVolumes) ListRequest added in v0.13.0

func (ls *ListVolumes) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListVolumes) Response added in v0.13.0

func (ListVolumes) Response() interface{}

Response returns the struct to unmarshal

func (*ListVolumes) SetPage added in v0.9.18

func (ls *ListVolumes) SetPage(page int)

SetPage sets the current apge

func (*ListVolumes) SetPageSize added in v0.9.18

func (ls *ListVolumes) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListVolumesResponse added in v0.9.0

type ListVolumesResponse struct {
	Count  int      `json:"count"`
	Volume []Volume `json:"volume"`
}

ListVolumesResponse represents a list of volumes

type ListZones added in v0.9.0

type ListZones struct {
	Available      *bool         `` /* 180-byte string literal not displayed */
	ID             *UUID         `json:"id,omitempty" doc:"the ID of the zone"`
	Keyword        string        `json:"keyword,omitempty" doc:"List by keyword"`
	Name           string        `json:"name,omitempty" doc:"the name of the zone"`
	Page           int           `json:"page,omitempty"`
	PageSize       int           `json:"pagesize,omitempty"`
	ShowCapacities *bool         `json:"showcapacities,omitempty" doc:"flag to display the capacity of the zones"`
	Tags           []ResourceTag `json:"tags,omitempty" doc:"List zones by resource tags (key/value pairs)"`
	// contains filtered or unexported fields
}

ListZones represents a query for zones

func (ListZones) Each added in v0.13.0

func (ListZones) Each(resp interface{}, callback IterateItemFunc)

Each triggers the callback for each, valid answer or any non 404 issue

func (*ListZones) ListRequest added in v0.13.0

func (ls *ListZones) ListRequest() (ListCommand, error)

ListRequest returns itself

func (ListZones) Response added in v0.13.0

func (ListZones) Response() interface{}

Response returns the struct to unmarshal

func (*ListZones) SetPage added in v0.9.18

func (ls *ListZones) SetPage(page int)

SetPage sets the current apge

func (*ListZones) SetPageSize added in v0.9.18

func (ls *ListZones) SetPageSize(pageSize int)

SetPageSize sets the page size

type ListZonesResponse

type ListZonesResponse struct {
	Count int    `json:"count"`
	Zone  []Zone `json:"zone"`
}

ListZonesResponse represents a list of zones

type Listable added in v0.9.16

type Listable interface {
	// ListRequest builds the list command
	ListRequest() (ListCommand, error)
}

Listable represents an Interface that can be "List" by the client

type MACAddress added in v0.10.3

type MACAddress net.HardwareAddr

MACAddress is a nicely JSON serializable net.HardwareAddr

func MAC48 added in v0.10.3

func MAC48(a, b, c, d, e, f byte) MACAddress

MAC48 builds a MAC-48 MACAddress

func MustParseMAC added in v0.11.0

func MustParseMAC(s string) MACAddress

MustParseMAC acts like ParseMAC but panics if in case of an error

func ParseMAC added in v0.10.3

func ParseMAC(s string) (MACAddress, error)

ParseMAC converts a string into a MACAddress

func (MACAddress) MarshalJSON added in v0.10.3

func (mac MACAddress) MarshalJSON() ([]byte, error)

MarshalJSON converts the MAC Address to a string representation

func (MACAddress) String added in v0.10.3

func (mac MACAddress) String() string

String returns the MAC address in standard format

func (*MACAddress) UnmarshalJSON added in v0.10.3

func (mac *MACAddress) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the raw JSON into the MAC address

type Network added in v0.9.0

type Network struct {
	Account                     string        `json:"account,omitempty" doc:"the owner of the network"`
	AccountID                   *UUID         `json:"accountid,omitempty" doc:"the owner ID of the network"`
	BroadcastDomainType         string        `json:"broadcastdomaintype,omitempty" doc:"Broadcast domain type of the network"`
	BroadcastURI                string        `json:"broadcasturi,omitempty" doc:"broadcast uri of the network."`
	CanUseForDeploy             bool          `json:"canusefordeploy,omitempty" doc:"list networks available for vm deployment"`
	CIDR                        *CIDR         `json:"cidr,omitempty" doc:"Cloudstack managed address space, all CloudStack managed VMs get IP address from CIDR"`
	DisplayText                 string        `json:"displaytext,omitempty" doc:"the displaytext of the network"`
	DNS1                        net.IP        `json:"dns1,omitempty" doc:"the first DNS for the network"`
	DNS2                        net.IP        `json:"dns2,omitempty" doc:"the second DNS for the network"`
	EndIP                       net.IP        `json:"endip,omitempty" doc:"the ending IP address in the network IP range. Required for managed networks."`
	Gateway                     net.IP        `json:"gateway,omitempty" doc:"the network's gateway"`
	ID                          *UUID         `json:"id,omitempty" doc:"the id of the network"`
	IP6CIDR                     *CIDR         `json:"ip6cidr,omitempty" doc:"the cidr of IPv6 network"`
	IP6Gateway                  net.IP        `json:"ip6gateway,omitempty" doc:"the gateway of IPv6 network"`
	IsDefault                   bool          `json:"isdefault,omitempty" doc:"true if network is default, false otherwise"`
	IsPersistent                bool          `json:"ispersistent,omitempty" doc:"list networks that are persistent"`
	IsSystem                    bool          `json:"issystem,omitempty" doc:"true if network is system, false otherwise"`
	Name                        string        `json:"name,omitempty" doc:"the name of the network"`
	Netmask                     net.IP        `json:"netmask,omitempty" doc:"the network's netmask"`
	NetworkCIDR                 *CIDR         `` /* 154-byte string literal not displayed */
	NetworkDomain               string        `json:"networkdomain,omitempty" doc:"the network domain"`
	NetworkOfferingAvailability string        `json:"networkofferingavailability,omitempty" doc:"availability of the network offering the network is created from"`
	NetworkOfferingConserveMode bool          `json:"networkofferingconservemode,omitempty" doc:"true if network offering is ip conserve mode enabled"`
	NetworkOfferingDisplayText  string        `json:"networkofferingdisplaytext,omitempty" doc:"display text of the network offering the network is created from"`
	NetworkOfferingID           *UUID         `json:"networkofferingid,omitempty" doc:"network offering id the network is created from"`
	NetworkOfferingName         string        `json:"networkofferingname,omitempty" doc:"name of the network offering the network is created from"`
	PhysicalNetworkID           *UUID         `json:"physicalnetworkid,omitempty" doc:"the physical network id"`
	Related                     string        `json:"related,omitempty" doc:"related to what other network configuration"`
	ReservedIPRange             string        `` /* 144-byte string literal not displayed */
	RestartRequired             bool          `json:"restartrequired,omitempty" doc:"true network requires restart"`
	Service                     []Service     `json:"service,omitempty" doc:"the list of services"`
	SpecifyIPRanges             bool          `json:"specifyipranges,omitempty" doc:"true if network supports specifying ip ranges, false otherwise"`
	StartIP                     net.IP        `json:"startip,omitempty" doc:"the beginning IP address in the network IP range. Required for managed networks."`
	State                       string        `json:"state,omitempty" doc:"state of the network"`
	StrechedL2Subnet            bool          `json:"strechedl2subnet,omitempty" doc:"true if network can span multiple zones"`
	SubdomainAccess             bool          `json:"subdomainaccess,omitempty" doc:"true if users from subdomains can access the domain level network"`
	Tags                        []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with network"`
	TrafficType                 string        `json:"traffictype,omitempty" doc:"the traffic type of the network"`
	Type                        string        `json:"type,omitempty" doc:"the type of the network"`
	Vlan                        string        `json:"vlan,omitemtpy" doc:"The vlan of the network. This parameter is visible to ROOT admins only"`
	ZoneID                      *UUID         `json:"zoneid,omitempty" doc:"zone id of the network"`
	ZoneName                    string        `json:"zonename,omitempty" doc:"the name of the zone the network belongs to"`
	ZonesNetworkSpans           []Zone        `` /* 144-byte string literal not displayed */
}

Network represents a network

See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/networking_and_traffic.html

func (Network) ListRequest added in v0.9.21

func (network Network) ListRequest() (ListCommand, error)

ListRequest builds the ListNetworks request

func (Network) ResourceType added in v0.9.7

func (Network) ResourceType() string

ResourceType returns the type of the resource

type NetworkOffering added in v0.9.0

type NetworkOffering struct {
	Availability             string            `json:"availability,omitempty" doc:"availability of the network offering"`
	ConserveMode             bool              `json:"conservemode,omitempty" doc:"true if network offering is ip conserve mode enabled"`
	Created                  string            `json:"created,omitempty" doc:"the date this network offering was created"`
	Details                  map[string]string `json:"details,omitempty" doc:"additional key/value details tied with network offering"`
	DisplayText              string            `json:"displaytext,omitempty" doc:"an alternate display text of the network offering."`
	EgressDefaultPolicy      bool              `` /* 135-byte string literal not displayed */
	GuestIPType              string            `json:"guestiptype,omitempty" doc:"guest type of the network offering, can be Shared or Isolated"`
	ID                       *UUID             `json:"id,omitempty" doc:"the id of the network offering"`
	IsDefault                bool              `json:"isdefault,omitempty" doc:"true if network offering is default, false otherwise"`
	IsPersistent             bool              `json:"ispersistent,omitempty" doc:"true if network offering supports persistent networks, false otherwise"`
	MaxConnections           int               `json:"maxconnections,omitempty" doc:"maximum number of concurrents connections to be handled by lb"`
	Name                     string            `json:"name,omitempty" doc:"the name of the network offering"`
	NetworkRate              int               `json:"networkrate,omitempty" doc:"data transfer rate in megabits per second allowed."`
	Service                  []Service         `json:"service,omitempty" doc:"the list of supported services"`
	ServiceOfferingID        *UUID             `json:"serviceofferingid,omitempty" doc:"the ID of the service offering used by virtual router provider"`
	SpecifyIPRanges          bool              `json:"specifyipranges,omitempty" doc:"true if network offering supports specifying ip ranges, false otherwise"`
	SpecifyVlan              bool              `json:"specifyvlan,omitempty" doc:"true if network offering supports vlans, false otherwise"`
	State                    string            `json:"state,omitempty" doc:"state of the network offering. Can be Disabled/Enabled/Inactive"`
	SupportsStrechedL2Subnet bool              `json:"supportsstrechedl2subnet,omitempty" doc:"true if network offering supports network that span multiple zones"`
	Tags                     string            `json:"tags,omitempty" doc:"the tags for the network offering"`
	TrafficType              string            `` /* 150-byte string literal not displayed */
}

NetworkOffering corresponds to the Compute Offerings

func (NetworkOffering) ListRequest added in v0.12.0

func (no NetworkOffering) ListRequest() (ListCommand, error)

ListRequest builds the ListNetworkOfferings request

This doesn't take into account the IsDefault flag as the default value is true.

type Nic added in v0.9.0

type Nic struct {
	BroadcastURI     string           `json:"broadcasturi,omitempty" doc:"the broadcast uri of the nic"`
	DeviceID         *UUID            `json:"deviceid,omitempty" doc:"device id for the network when plugged into the virtual machine"`
	Gateway          net.IP           `json:"gateway,omitempty" doc:"the gateway of the nic"`
	ID               *UUID            `json:"id,omitempty" doc:"the ID of the nic"`
	IP6Address       net.IP           `json:"ip6address,omitempty" doc:"the IPv6 address of network"`
	IP6CIDR          *CIDR            `json:"ip6cidr,omitempty" doc:"the cidr of IPv6 network"`
	IP6Gateway       net.IP           `json:"ip6gateway,omitempty" doc:"the gateway of IPv6 network"`
	IPAddress        net.IP           `json:"ipaddress,omitempty" doc:"the ip address of the nic"`
	IsDefault        bool             `json:"isdefault,omitempty" doc:"true if nic is default, false otherwise"`
	IsolationURI     string           `json:"isolationuri,omitempty" doc:"the isolation uri of the nic"`
	MACAddress       MACAddress       `json:"macaddress,omitempty" doc:"true if nic is default, false otherwise"`
	Netmask          net.IP           `json:"netmask,omitempty" doc:"the netmask of the nic"`
	NetworkID        *UUID            `json:"networkid,omitempty" doc:"the ID of the corresponding network"`
	NetworkName      string           `json:"networkname,omitempty" doc:"the name of the corresponding network"`
	ReverseDNS       []ReverseDNS     `json:"reversedns,omitempty" doc:"the list of PTR record(s) associated with the virtual machine"`
	SecondaryIP      []NicSecondaryIP `json:"secondaryip,omitempty" doc:"the Secondary ipv4 addr of nic"`
	TrafficType      string           `json:"traffictype,omitempty" doc:"the traffic type of the nic"`
	Type             string           `json:"type,omitempty" doc:"the type of the nic"`
	VirtualMachineID *UUID            `json:"virtualmachineid,omitempty" doc:"Id of the vm to which the nic belongs"`
}

Nic represents a Network Interface Controller (NIC)

See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/networking_and_traffic.html#configuring-multiple-ip-addresses-on-a-single-nic

func (Nic) ListRequest added in v0.9.18

func (nic Nic) ListRequest() (ListCommand, error)

ListRequest build a ListNics request from the given Nic

type NicSecondaryIP added in v0.9.0

type NicSecondaryIP struct {
	ID               *UUID  `json:"id,omitempty" doc:"the ID of the secondary private IP addr"`
	IPAddress        net.IP `json:"ipaddress,omitempty" doc:"Secondary IP address"`
	NetworkID        *UUID  `json:"networkid,omitempty" doc:"the ID of the network"`
	NicID            *UUID  `json:"nicid,omitempty" doc:"the ID of the nic"`
	VirtualMachineID *UUID  `json:"virtualmachineid,omitempty" doc:"the ID of the vm"`
}

NicSecondaryIP represents a link between NicID and IPAddress

type OSCategory added in v0.11.0

type OSCategory struct {
	ID   *UUID  `json:"id,omitempty" doc:"the ID of the OS category"`
	Name string `json:"name,omitempty" doc:"the name of the OS category"`
}

OSCategory represents an OS category

func (OSCategory) ListRequest added in v0.13.0

func (osCat OSCategory) ListRequest() (ListCommand, error)

ListRequest builds the ListOSCategories request

type PCIDevice added in v0.9.30

type PCIDevice struct {
	PCIVendorName     string `json:"pcivendorname,omitempty" doc:"Device vendor name of pci card"`
	DeviceID          string `json:"deviceid,omitempty" doc:"Device model ID of pci card"`
	RemainingCapacity int    `` /* 129-byte string literal not displayed */
	MaxCapacity       int    `json:"maxcapacity,omitempty" doc:"Maximum vgpu can be created with this vgpu type on the given pci group"`
	PCIVendorID       string `json:"pcivendorid,omitempty" doc:"Device vendor ID of pci card"`
	PCIDeviceName     string `json:"pcidevicename,omitempty" doc:"Device model name of pci card"`
}

PCIDevice represents a PCI card present in the host

type Password added in v0.9.14

type Password struct {
	EncryptedPassword string `json:"encryptedpassword"`
}

Password represents an encrypted password

TODO: method to decrypt it, https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34014652

type QueryAsyncJobResult added in v0.9.0

type QueryAsyncJobResult struct {
	JobID *UUID `json:"jobid" doc:"the ID of the asynchronous job"`
	// contains filtered or unexported fields
}

QueryAsyncJobResult represents a query to fetch the status of async job

func (QueryAsyncJobResult) Response added in v0.13.0

func (QueryAsyncJobResult) Response() interface{}

Response returns the struct to unmarshal

type QueryReverseDNSForPublicIPAddress added in v0.10.1

type QueryReverseDNSForPublicIPAddress struct {
	ID *UUID `json:"id,omitempty" doc:"the ID of the public IP address"`
	// contains filtered or unexported fields
}

QueryReverseDNSForPublicIPAddress is a command to create/query the PTR record of a public IP address

func (*QueryReverseDNSForPublicIPAddress) Response added in v0.13.0

func (*QueryReverseDNSForPublicIPAddress) Response() interface{}

Response returns the struct to unmarshal

type QueryReverseDNSForVirtualMachine added in v0.10.1

type QueryReverseDNSForVirtualMachine struct {
	ID *UUID `json:"id,omitempty" doc:"the ID of the virtual machine"`
	// contains filtered or unexported fields
}

QueryReverseDNSForVirtualMachine is a command to create/query the PTR record(s) of a virtual machine

func (*QueryReverseDNSForVirtualMachine) Response added in v0.13.0

func (*QueryReverseDNSForVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type RebootVirtualMachine added in v0.9.0

type RebootVirtualMachine struct {
	ID *UUID `json:"id" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

RebootVirtualMachine (Async) represents the rebooting of the virtual machine

func (RebootVirtualMachine) AsyncResponse added in v0.13.0

func (RebootVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RebootVirtualMachine) Response added in v0.13.0

func (RebootVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type Record added in v0.9.28

type Record int

Record represent record type

const (
	// A record type
	A Record = iota
	// AAAA record type
	AAAA
	// ALIAS record type
	ALIAS
	// CNAME record type
	CNAME
	// HINFO record type
	HINFO
	// MX record type
	MX
	// NAPTR record type
	NAPTR
	// NS record type
	NS
	// POOL record type
	POOL
	// SPF record type
	SPF
	// SRV record type
	SRV
	// SSHFP record type
	SSHFP
	// TXT record type
	TXT
	// URL record type
	URL
)

func (Record) String added in v0.9.28

func (i Record) String() string

type RecoverVirtualMachine added in v0.9.0

type RecoverVirtualMachine struct {
	ID *UUID `json:"id" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

RecoverVirtualMachine represents the restoration of the virtual machine

func (RecoverVirtualMachine) Response added in v0.13.0

func (RecoverVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type RegisterCustomTemplate added in v0.17.0

type RegisterCustomTemplate struct {
	Checksum        string            `json:"checksum" doc:"the MD5 checksum value of this template"`
	Details         map[string]string `json:"details,omitempty" doc:"Template details in key/value pairs"`
	Displaytext     string            `json:"displaytext" doc:"the display text of the template"`
	Name            string            `json:"name" doc:"the name of the template"`
	PasswordEnabled *bool             `json:"passwordenabled,omitempty" doc:"true if the template supports the password reset feature; default is false"`
	SSHKeyEnabled   *bool             `json:"sshkeyenabled,omitempty" doc:"true if the template supports the sshkey upload feature; default is false"`
	TemplateTag     string            `json:"templatetag,omitempty" doc:"the tag for this template"`
	URL             string            `json:"url" doc:"the URL of where the template is hosted"`
	ZoneID          *UUID             `json:"zoneid" doc:"the ID of the zone the template is to be hosted on"`
	// contains filtered or unexported fields
}

RegisterCustomTemplate registers a new template

func (RegisterCustomTemplate) AsyncResponse added in v0.17.0

func (RegisterCustomTemplate) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RegisterCustomTemplate) Response added in v0.17.0

func (RegisterCustomTemplate) Response() interface{}

Response returns the struct to unmarshal

type RegisterSSHKeyPair added in v0.9.0

type RegisterSSHKeyPair struct {
	Name      string `json:"name" doc:"Name of the keypair"`
	PublicKey string `json:"publickey" doc:"Public key material of the keypair"`
	// contains filtered or unexported fields
}

RegisterSSHKeyPair represents a new registration of a public key in a keypair

func (RegisterSSHKeyPair) Response added in v0.13.0

func (RegisterSSHKeyPair) Response() interface{}

Response returns the struct to unmarshal

type RegisterUserKeys added in v0.9.7

type RegisterUserKeys struct {
	ID *UUID `json:"id" doc:"User id"`
	// contains filtered or unexported fields
}

RegisterUserKeys registers a new set of key of the given user

NB: only the APIKey and SecretKey will be filled

func (RegisterUserKeys) Response added in v0.13.0

func (RegisterUserKeys) Response() interface{}

Response returns the struct to unmarshal

type RemoveIPFromNic added in v0.9.0

type RemoveIPFromNic struct {
	ID *UUID `json:"id" doc:"the ID of the secondary ip address to nic"`
	// contains filtered or unexported fields
}

RemoveIPFromNic (Async) represents a deletion request

func (RemoveIPFromNic) AsyncResponse added in v0.13.0

func (RemoveIPFromNic) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RemoveIPFromNic) Response added in v0.13.0

func (RemoveIPFromNic) Response() interface{}

Response returns the struct to unmarshal

type RemoveNicFromVirtualMachine added in v0.9.0

type RemoveNicFromVirtualMachine struct {
	NicID            *UUID `json:"nicid" doc:"NIC ID"`
	VirtualMachineID *UUID `json:"virtualmachineid" doc:"Virtual Machine ID"`
	// contains filtered or unexported fields
}

RemoveNicFromVirtualMachine (Async) removes a NIC from a VM

func (RemoveNicFromVirtualMachine) AsyncResponse added in v0.13.0

func (RemoveNicFromVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RemoveNicFromVirtualMachine) Response added in v0.13.0

func (RemoveNicFromVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type ResetPasswordForVirtualMachine added in v0.9.0

type ResetPasswordForVirtualMachine struct {
	ID *UUID `json:"id" doc:"The ID of the virtual machine"`
	// contains filtered or unexported fields
}

ResetPasswordForVirtualMachine resets the password for virtual machine. The virtual machine must be in a "Stopped" state...

func (ResetPasswordForVirtualMachine) AsyncResponse added in v0.13.0

func (ResetPasswordForVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (ResetPasswordForVirtualMachine) Response added in v0.13.0

func (ResetPasswordForVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type ResetSSHKeyForVirtualMachine added in v0.9.0

type ResetSSHKeyForVirtualMachine struct {
	ID      *UUID  `json:"id" doc:"The ID of the virtual machine"`
	KeyPair string `json:"keypair" doc:"Name of the ssh key pair used to login to the virtual machine"`
	// contains filtered or unexported fields
}

ResetSSHKeyForVirtualMachine (Async) represents a change for the key pairs

func (ResetSSHKeyForVirtualMachine) AsyncResponse added in v0.13.0

func (ResetSSHKeyForVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (ResetSSHKeyForVirtualMachine) Response added in v0.13.0

func (ResetSSHKeyForVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type ResizeVolume added in v0.9.0

type ResizeVolume struct {
	ID             *UUID `json:"id" doc:"the ID of the disk volume"`
	DiskOfferingID *UUID `json:"diskofferingid,omitempty" doc:"new disk offering id"`
	Size           int64 `json:"size,omitempty" doc:"New volume size in G (must be larger than current size since shrinking the disk is not supported)"`
	// contains filtered or unexported fields
}

ResizeVolume (Async) resizes a volume

func (ResizeVolume) AsyncResponse added in v0.13.0

func (ResizeVolume) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (ResizeVolume) Response added in v0.13.0

func (ResizeVolume) Response() interface{}

Response returns the struct to unmarshal

type ResourceDetail added in v0.13.0

type ResourceDetail ResourceTag

ResourceDetail represents extra details

func (ResourceDetail) ListRequest added in v0.13.0

func (detail ResourceDetail) ListRequest() (ListCommand, error)

ListRequest builds the ListResourceDetails request

type ResourceLimit added in v0.9.7

type ResourceLimit struct {
	Max              int64        `json:"max,omitempty" doc:"the maximum number of the resource. A -1 means the resource currently has no limit."`
	ResourceType     ResourceType `` /* 169-byte string literal not displayed */
	ResourceTypeName string       `` /* 180-byte string literal not displayed */
}

ResourceLimit represents the limit on a particular resource

func (ResourceLimit) ListRequest added in v0.13.0

func (limit ResourceLimit) ListRequest() (ListCommand, error)

ListRequest builds the ListResourceLimits request

type ResourceTag added in v0.9.0

type ResourceTag struct {
	Account      string `json:"account,omitempty" doc:"the account associated with the tag"`
	Customer     string `json:"customer,omitempty" doc:"customer associated with the tag"`
	Key          string `json:"key,omitempty" doc:"tag key name"`
	ResourceID   *UUID  `json:"resourceid,omitempty" doc:"id of the resource"`
	ResourceType string `json:"resourcetype,omitempty" doc:"resource type"`
	Value        string `json:"value,omitempty" doc:"tag value"`
}

ResourceTag is a tag associated with a resource

https://community.exoscale.com/documentation/compute/instance-tags/

func (ResourceTag) ListRequest added in v0.13.0

func (tag ResourceTag) ListRequest() (ListCommand, error)

ListRequest builds the ListZones request

type ResourceType added in v0.9.7

type ResourceType string

ResourceType represents the ID of a resource type (for limits)

const (
	// VirtualMachineType is the resource type ID of a VM
	VirtualMachineType ResourceType = "0"
	// IPAddressType is the resource type ID of an IP address
	IPAddressType ResourceType = "1"
	// VolumeType is the resource type ID of a volume
	VolumeType ResourceType = "2"
	// SnapshotType is the resource type ID of a snapshot
	SnapshotType ResourceType = "3"
	// TemplateType is the resource type ID of a template
	TemplateType ResourceType = "4"
	// ProjectType is the resource type ID of a project
	ProjectType ResourceType = "5"
	// NetworkType is the resource type ID of a network
	NetworkType ResourceType = "6"
	// VPCType is the resource type ID of a VPC
	VPCType ResourceType = "7"
	// CPUType is the resource type ID of a CPU
	CPUType ResourceType = "8"
	// MemoryType is the resource type ID of Memory
	MemoryType ResourceType = "9"
	// PrimaryStorageType is the resource type ID of primary storage
	PrimaryStorageType ResourceType = "10"
	// SecondaryStorageType is the resource type ID of secondary storage
	SecondaryStorageType ResourceType = "11"
)

type ResourceTypeName added in v0.9.7

type ResourceTypeName string

ResourceTypeName represents the name of a resource type (for limits)

const (
	// VirtualMachineTypeName is the resource type name of a VM
	VirtualMachineTypeName ResourceTypeName = "user_vm"
	// IPAddressTypeName is the resource type name of an IP address
	IPAddressTypeName ResourceTypeName = "public_ip"
	// VolumeTypeName is the resource type name of a volume
	VolumeTypeName ResourceTypeName = "volume"
	// SnapshotTypeName is the resource type name of a snapshot
	SnapshotTypeName ResourceTypeName = "snapshot"
	// TemplateTypeName is the resource type name of a template
	TemplateTypeName ResourceTypeName = "template"
	// ProjectTypeName is the resource type name of a project
	ProjectTypeName ResourceTypeName = "project"
	// NetworkTypeName is the resource type name of a network
	NetworkTypeName ResourceTypeName = "network"
	// VPCTypeName is the resource type name of a VPC
	VPCTypeName ResourceTypeName = "vpc"
	// CPUTypeName is the resource type name of a CPU
	CPUTypeName ResourceTypeName = "cpu"
	// MemoryTypeName is the resource type name of Memory
	MemoryTypeName ResourceTypeName = "memory"
	// PrimaryStorageTypeName is the resource type name of primary storage
	PrimaryStorageTypeName ResourceTypeName = "primary_storage"
	// SecondaryStorageTypeName is the resource type name of secondary storage
	SecondaryStorageTypeName ResourceTypeName = "secondary_storage"
)

type RestartNetwork added in v0.9.0

type RestartNetwork struct {
	ID      *UUID `json:"id" doc:"The id of the network to restart."`
	Cleanup *bool `json:"cleanup,omitempty" doc:"If cleanup old network elements"`
	// contains filtered or unexported fields
}

RestartNetwork (Async) updates a network

func (RestartNetwork) AsyncResponse added in v0.13.0

func (RestartNetwork) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RestartNetwork) Response added in v0.13.0

func (RestartNetwork) Response() interface{}

Response returns the struct to unmarshal

type RestoreVirtualMachine added in v0.9.0

type RestoreVirtualMachine struct {
	VirtualMachineID *UUID `json:"virtualmachineid" doc:"Virtual Machine ID"`
	TemplateID       *UUID `` /* 157-byte string literal not displayed */
	RootDiskSize     int64 `` /* 142-byte string literal not displayed */
	// contains filtered or unexported fields
}

RestoreVirtualMachine (Async) represents the restoration of the virtual machine

func (RestoreVirtualMachine) AsyncResponse added in v0.13.0

func (RestoreVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RestoreVirtualMachine) Response added in v0.13.0

func (RestoreVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type RetryStrategyFunc added in v0.9.11

type RetryStrategyFunc func(int64) time.Duration

RetryStrategyFunc represents a how much time to wait between two calls to the API

func MonotonicRetryStrategyFunc added in v0.9.26

func MonotonicRetryStrategyFunc(seconds int) RetryStrategyFunc

MonotonicRetryStrategyFunc returns a function that waits for n seconds for each iteration

type ReverseDNS added in v0.10.1

type ReverseDNS struct {
	DomainName       string `json:"domainname,omitempty" doc:"the domain name of the PTR record"`
	IP6Address       net.IP `json:"ip6address,omitempty" doc:"the IPv6 address linked with the PTR record (mutually exclusive with ipaddress)"`
	IPAddress        net.IP `json:"ipaddress,omitempty" doc:"the IPv4 address linked with the PTR record (mutually exclusive with ip6address)"`
	NicID            *UUID  `json:"nicid,omitempty" doc:"the virtual machine default NIC ID"`
	PublicIPID       *UUID  `json:"publicipid,omitempty" doc:"the public IP address ID"`
	VirtualMachineID *UUID  `json:"virtualmachineid,omitempty" doc:"the virtual machine ID"`
}

ReverseDNS represents the PTR record linked with an IPAddress or IP6Address belonging to a Virtual Machine or a Public IP Address (Elastic IP) instance

type RevertSnapshot added in v0.9.0

type RevertSnapshot struct {
	ID *UUID `json:"id" doc:"The ID of the snapshot"`
	// contains filtered or unexported fields
}

RevertSnapshot (Async) reverts a volume snapshot

func (RevertSnapshot) AsyncResponse added in v0.13.0

func (RevertSnapshot) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RevertSnapshot) Response added in v0.13.0

func (RevertSnapshot) Response() interface{}

Response returns the struct to unmarshal

type RevokeSecurityGroupEgress added in v0.9.0

type RevokeSecurityGroupEgress struct {
	ID *UUID `json:"id" doc:"The ID of the egress rule"`
	// contains filtered or unexported fields
}

RevokeSecurityGroupEgress (Async) represents the ingress/egress rule deletion

func (RevokeSecurityGroupEgress) AsyncResponse added in v0.13.0

func (RevokeSecurityGroupEgress) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RevokeSecurityGroupEgress) Response added in v0.13.0

func (RevokeSecurityGroupEgress) Response() interface{}

Response returns the struct to unmarshal

type RevokeSecurityGroupIngress added in v0.9.0

type RevokeSecurityGroupIngress struct {
	ID *UUID `json:"id" doc:"The ID of the ingress rule"`
	// contains filtered or unexported fields
}

RevokeSecurityGroupIngress (Async) represents the ingress/egress rule deletion

func (RevokeSecurityGroupIngress) AsyncResponse added in v0.13.0

func (RevokeSecurityGroupIngress) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (RevokeSecurityGroupIngress) Response added in v0.13.0

func (RevokeSecurityGroupIngress) Response() interface{}

Response returns the struct to unmarshal

type RunstatusErrorResponse added in v0.13.2

type RunstatusErrorResponse struct {
	Detail string `json:"detail"`
}

RunstatusErrorResponse represents the default errors

func (RunstatusErrorResponse) Error added in v0.13.2

func (req RunstatusErrorResponse) Error() string

Error formats the DNSerror into a string

type RunstatusEvent added in v0.13.2

type RunstatusEvent struct {
	Created *time.Time `json:"created,omitempty"`
	State   string     `json:"state,omitempty"`
	Status  string     `json:"status"`
	Text    string     `json:"text"`
}

RunstatusEvent is a runstatus event

type RunstatusIncident added in v0.13.2

type RunstatusIncident struct {
	EndDate    *time.Time       `json:"end_date,omitempty"`
	Events     []RunstatusEvent `json:"events,omitempty"`
	EventsURL  string           `json:"events_url,omitempty"`
	ID         int              `json:"id,omitempty"`
	PageURL    string           `json:"page_url,omitempty"` // fake field
	PostMortem string           `json:"post_mortem,omitempty"`
	RealTime   bool             `json:"real_time,omitempty"`
	Services   []string         `json:"services"`
	StartDate  *time.Time       `json:"start_date,omitempty"`
	State      string           `json:"state"`
	Status     string           `json:"status"`
	StatusText string           `json:"status_text"`
	Title      string           `json:"title"`
	URL        string           `json:"url,omitempty"`
}

RunstatusIncident is a runstatus incident

func (RunstatusIncident) Match added in v0.13.2

func (incident RunstatusIncident) Match(other RunstatusIncident) bool

Match returns true if the other incident has got similarities with itself

type RunstatusIncidentList added in v0.13.2

type RunstatusIncidentList struct {
	Next      string              `json:"next"`
	Previous  string              `json:"previous"`
	Incidents []RunstatusIncident `json:"results"`
}

RunstatusIncidentList is a list of incident

type RunstatusMaintenance added in v0.13.2

type RunstatusMaintenance struct {
	Created     *time.Time       `json:"created,omitempty"`
	Description string           `json:"description,omitempty"`
	EndDate     *time.Time       `json:"end_date"`
	Events      []RunstatusEvent `json:"events,omitempty"`
	EventsURL   string           `json:"events_url,omitempty"`
	ID          int              `json:"id,omitempty"`       // missing field
	PageURL     string           `json:"page_url,omitempty"` // fake field
	RealTime    bool             `json:"real_time,omitempty"`
	Services    []string         `json:"services"`
	StartDate   *time.Time       `json:"start_date"`
	Status      string           `json:"status"`
	Title       string           `json:"title"`
	URL         string           `json:"url,omitempty"`
}

RunstatusMaintenance is a runstatus maintenance

func (*RunstatusMaintenance) FakeID added in v0.13.2

func (maintenance *RunstatusMaintenance) FakeID() error

FakeID fills up the ID field as it's currently missing

func (RunstatusMaintenance) Match added in v0.13.2

func (maintenance RunstatusMaintenance) Match(other RunstatusMaintenance) bool

Match returns true if the other maintenance has got similarities with itself

type RunstatusMaintenanceList added in v0.13.2

type RunstatusMaintenanceList struct {
	Next         string                 `json:"next"`
	Previous     string                 `json:"previous"`
	Maintenances []RunstatusMaintenance `json:"results"`
}

RunstatusMaintenanceList is a list of incident

type RunstatusPage added in v0.13.2

type RunstatusPage struct {
	Created          *time.Time             `json:"created,omitempty"`
	DarkTheme        bool                   `json:"dark_theme,omitempty"`
	Domain           string                 `json:"domain,omitempty"`
	GradientEnd      string                 `json:"gradient_end,omitempty"`
	GradientStart    string                 `json:"gradient_start,omitempty"`
	HeaderBackground string                 `json:"header_background,omitempty"`
	ID               int                    `json:"id,omitempty"`
	Incidents        []RunstatusIncident    `json:"incidents,omitempty"`
	IncidentsURL     string                 `json:"incidents_url,omitempty"`
	Maintenances     []RunstatusMaintenance `json:"maintenances,omitempty"`
	MaintenancesURL  string                 `json:"maintenances_url,omitempty"`
	Name             string                 `json:"name"` //fake field (used to post a new runstatus page)
	OkText           string                 `json:"ok_text,omitempty"`
	Plan             string                 `json:"plan,omitempty"`
	PublicURL        string                 `json:"public_url,omitempty"`
	Services         []RunstatusService     `json:"services,omitempty"`
	ServicesURL      string                 `json:"services_url,omitempty"`
	State            string                 `json:"state,omitempty"`
	Subdomain        string                 `json:"subdomain"`
	SupportEmail     string                 `json:"support_email,omitempty"`
	TimeZone         string                 `json:"time_zone,omitempty"`
	Title            string                 `json:"title,omitempty"`
	TitleColor       string                 `json:"title_color,omitempty"`
	TwitterUsername  string                 `json:"twitter_username,omitempty"`
	URL              string                 `json:"url,omitempty"`
}

RunstatusPage runstatus page

func (RunstatusPage) Match added in v0.13.2

func (page RunstatusPage) Match(other RunstatusPage) bool

Match returns true if the other page has got similarities with itself

type RunstatusPageList added in v0.13.2

type RunstatusPageList struct {
	Next     string          `json:"next"`
	Previous string          `json:"previous"`
	Pages    []RunstatusPage `json:"results"`
}

RunstatusPageList runstatus page list

type RunstatusService added in v0.13.2

type RunstatusService struct {
	ID      int    `json:"id"` // missing field
	Name    string `json:"name"`
	PageURL string `json:"page_url,omitempty"` // fake field
	State   string `json:"state,omitempty"`
	URL     string `json:"url,omitempty"`
}

RunstatusService is a runstatus service

func (*RunstatusService) FakeID added in v0.13.2

func (service *RunstatusService) FakeID() error

FakeID fills up the ID field as it's currently missing

func (RunstatusService) Match added in v0.13.2

func (service RunstatusService) Match(other RunstatusService) bool

Match returns true if the other service has got similarities with itself

type RunstatusServiceList added in v0.13.2

type RunstatusServiceList struct {
	Next     string             `json:"next"`
	Previous string             `json:"previous"`
	Services []RunstatusService `json:"results"`
}

RunstatusServiceList service list

type RunstatusValidationErrorResponse added in v0.13.3

type RunstatusValidationErrorResponse map[string][]string

RunstatusValidationErrorResponse represents an error in the API

func (RunstatusValidationErrorResponse) Error added in v0.13.3

Error formats the DNSerror into a string

type SSHKeyPair

type SSHKeyPair struct {
	Fingerprint string `json:"fingerprint,omitempty" doc:"Fingerprint of the public key"`
	Name        string `json:"name,omitempty" doc:"Name of the keypair"`
	PrivateKey  string `json:"privatekey,omitempty" doc:"Private key"`
}

SSHKeyPair represents an SSH key pair

See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/stable/virtual_machines.html#creating-the-ssh-keypair

func (SSHKeyPair) Delete added in v0.9.12

func (ssh SSHKeyPair) Delete(ctx context.Context, client *Client) error

Delete removes the given SSH key, by Name

func (SSHKeyPair) ListRequest added in v0.9.19

func (ssh SSHKeyPair) ListRequest() (ListCommand, error)

ListRequest builds the ListSSHKeyPairs request

type ScaleVirtualMachine added in v0.9.0

type ScaleVirtualMachine struct {
	ID                *UUID             `json:"id" doc:"The ID of the virtual machine"`
	ServiceOfferingID *UUID             `json:"serviceofferingid" doc:"the ID of the service offering for the virtual machine"`
	Details           map[string]string `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

ScaleVirtualMachine (Async) scales the virtual machine to a new service offering.

ChangeServiceForVirtualMachine does the same thing but returns the new Virtual Machine which is more consistent with the rest of the API.

func (ScaleVirtualMachine) AsyncResponse added in v0.13.0

func (ScaleVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (ScaleVirtualMachine) Response added in v0.13.0

func (ScaleVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type SecurityGroup

type SecurityGroup struct {
	Account     string        `json:"account,omitempty" doc:"the account owning the security group"`
	Description string        `json:"description,omitempty" doc:"the description of the security group"`
	EgressRule  []EgressRule  `json:"egressrule,omitempty" doc:"the list of egress rules associated with the security group"`
	ID          *UUID         `json:"id" doc:"the ID of the security group"`
	IngressRule []IngressRule `json:"ingressrule,omitempty" doc:"the list of ingress rules associated with the security group"`
	Name        string        `json:"name,omitempty" doc:"the name of the security group"`
}

SecurityGroup represent a firewalling set of rules

func (SecurityGroup) Delete added in v0.9.12

func (sg SecurityGroup) Delete(ctx context.Context, client *Client) error

Delete deletes the given Security Group

func (SecurityGroup) ListRequest added in v0.9.21

func (sg SecurityGroup) ListRequest() (ListCommand, error)

ListRequest builds the ListSecurityGroups request

func (SecurityGroup) RuleByID added in v0.9.22

func (sg SecurityGroup) RuleByID(ruleID UUID) (*IngressRule, *EgressRule)

RuleByID returns IngressRule or EgressRule by a rule ID

func (SecurityGroup) UserSecurityGroup added in v0.10.1

func (sg SecurityGroup) UserSecurityGroup() UserSecurityGroup

UserSecurityGroup converts a SecurityGroup to a UserSecurityGroup

type Service added in v0.9.0

type Service struct {
	Capability []ServiceCapability `json:"capability,omitempty"`
	Name       string              `json:"name"`
	Provider   []ServiceProvider   `json:"provider,omitempty"`
}

Service is a feature of a network

type ServiceCapability added in v0.9.0

type ServiceCapability struct {
	CanChooseServiceCapability bool   `json:"canchooseservicecapability"`
	Name                       string `json:"name"`
	Value                      string `json:"value"`
}

ServiceCapability represents optional capability of a service

type ServiceOffering

type ServiceOffering struct {
	Authorized                bool              `json:"authorized,omitempty" doc:"is the account/domain authorized to use this service offering"`
	CPUNumber                 int               `json:"cpunumber,omitempty" doc:"the number of CPU"`
	CPUSpeed                  int               `json:"cpuspeed,omitempty" doc:"the clock rate CPU speed in Mhz"`
	Created                   string            `json:"created,omitempty" doc:"the date this service offering was created"`
	DefaultUse                bool              `json:"defaultuse,omitempty" doc:"is this a  default system vm offering"`
	DeploymentPlanner         string            `json:"deploymentplanner,omitempty" doc:"deployment strategy used to deploy VM."`
	DiskBytesReadRate         int64             `json:"diskBytesReadRate,omitempty" doc:"bytes read rate of the service offering"`
	DiskBytesWriteRate        int64             `json:"diskBytesWriteRate,omitempty" doc:"bytes write rate of the service offering"`
	DiskIopsReadRate          int64             `json:"diskIopsReadRate,omitempty" doc:"io requests read rate of the service offering"`
	DiskIopsWriteRate         int64             `json:"diskIopsWriteRate,omitempty" doc:"io requests write rate of the service offering"`
	Displaytext               string            `json:"displaytext,omitempty" doc:"an alternate display text of the service offering."`
	HostTags                  string            `json:"hosttags,omitempty" doc:"the host tag for the service offering"`
	HypervisorSnapshotReserve int               `` /* 149-byte string literal not displayed */
	ID                        *UUID             `json:"id" doc:"the id of the service offering"`
	IsCustomized              bool              `json:"iscustomized,omitempty" doc:"is true if the offering is customized"`
	IsCustomizedIops          bool              `json:"iscustomizediops,omitempty" doc:"true if disk offering uses custom iops, false otherwise"`
	IsSystem                  bool              `json:"issystem,omitempty" doc:"is this a system vm offering"`
	IsVolatile                bool              `` /* 158-byte string literal not displayed */
	LimitCPUUse               bool              `json:"limitcpuuse,omitempty" doc:"restrict the CPU usage to committed service offering"`
	MaxIops                   int64             `json:"maxiops,omitempty" doc:"the max iops of the disk offering"`
	Memory                    int               `json:"memory,omitempty" doc:"the memory in MB"`
	MinIops                   int64             `json:"miniops,omitempty" doc:"the min iops of the disk offering"`
	Name                      string            `json:"name,omitempty" doc:"the name of the service offering"`
	NetworkRate               int               `json:"networkrate,omitempty" doc:"data transfer rate in megabits per second allowed."`
	OfferHA                   bool              `json:"offerha,omitempty" doc:"the ha support in the service offering"`
	Restricted                bool              `json:"restricted,omitempty" doc:"is this offering restricted"`
	ServiceOfferingDetails    map[string]string `json:"serviceofferingdetails,omitempty" doc:"additional key/value details tied with this service offering"`
	StorageType               string            `json:"storagetype,omitempty" doc:"the storage type for this service offering"`
	SystemVMType              string            `json:"systemvmtype,omitempty" doc:"is this a the systemvm type for system vm offering"`
	Tags                      string            `json:"tags,omitempty" doc:"the tags for the service offering"`
}

ServiceOffering corresponds to the Compute Offerings

A service offering correspond to some hardware features (CPU, RAM).

See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/service_offerings.html

func (ServiceOffering) ListRequest added in v0.9.24

func (so ServiceOffering) ListRequest() (ListCommand, error)

ListRequest builds the ListSecurityGroups request

type ServiceProvider added in v0.9.0

type ServiceProvider struct {
	CanEnableIndividualService   bool     `json:"canenableindividualservice"`
	DestinationPhysicalNetworkID *UUID    `json:"destinationphysicalnetworkid"`
	ID                           *UUID    `json:"id"`
	Name                         string   `json:"name"`
	PhysicalNetworkID            *UUID    `json:"physicalnetworkid"`
	ServiceList                  []string `json:"servicelist,omitempty"`
}

ServiceProvider represents the provider of the service

type Snapshot added in v0.9.0

type Snapshot struct {
	Account      string        `json:"account,omitempty" doc:"the account associated with the snapshot"`
	AccountID    *UUID         `json:"accountid,omitempty" doc:"the account ID associated with the snapshot"`
	Created      string        `json:"created,omitempty" doc:"the date the snapshot was created"`
	ID           *UUID         `json:"id,omitempty" doc:"ID of the snapshot"`
	IntervalType string        `json:"intervaltype,omitempty" doc:"valid types are hourly, daily, weekly, monthy, template, and none."`
	Name         string        `json:"name,omitempty" doc:"name of the snapshot"`
	PhysicalSize int64         `json:"physicalsize,omitempty" doc:"physical size of the snapshot on image store"`
	Revertable   *bool         `json:"revertable,omitempty" doc:"indicates whether the underlying storage supports reverting the volume to this snapshot"`
	Size         int64         `json:"size,omitempty" doc:"the size of original volume"`
	SnapshotType string        `json:"snapshottype,omitempty" doc:"the type of the snapshot"`
	State        string        `` /* 237-byte string literal not displayed */
	Tags         []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with snapshot"`
	VolumeID     *UUID         `json:"volumeid,omitempty" doc:"ID of the disk volume"`
	VolumeName   string        `json:"volumename,omitempty" doc:"name of the disk volume"`
	VolumeType   string        `json:"volumetype,omitempty" doc:"type of the disk volume"`
	ZoneID       *UUID         `json:"zoneid,omitempty" doc:"id of the availability zone"`
}

Snapshot represents a volume snapshot

func (Snapshot) ListRequest added in v0.12.3

func (ss Snapshot) ListRequest() (ListCommand, error)

ListRequest builds the ListSnapshot request

func (Snapshot) ResourceType added in v0.9.7

func (Snapshot) ResourceType() string

ResourceType returns the type of the resource

type SnapshotState added in v0.9.24

type SnapshotState string

SnapshotState represents the Snapshot.State enum

See: https://github.com/apache/cloudstack/blob/master/api/src/main/java/com/cloud/storage/Snapshot.java

const (
	// Allocated ... (TODO)
	Allocated SnapshotState = "Allocated"
	// Creating ... (TODO)
	Creating SnapshotState = "Creating"
	// CreatedOnPrimary ... (TODO)
	CreatedOnPrimary SnapshotState = "CreatedOnPrimary"
	// BackingUp ... (TODO)
	BackingUp SnapshotState = "BackingUp"
	// BackedUp ... (TODO)
	BackedUp SnapshotState = "BackedUp"
	// Copying ... (TODO)
	Copying SnapshotState = "Copying"
	// Destroying ... (TODO)
	Destroying SnapshotState = "Destroying"
	// Destroyed ... (TODO)
	Destroyed SnapshotState = "Destroyed"
	// Error is a state where the user can't see the snapshot while the snapshot may still exist on the storage
	Error SnapshotState = "Error"
)

type StartVirtualMachine added in v0.9.0

type StartVirtualMachine struct {
	ID            *UUID  `json:"id" doc:"The ID of the virtual machine"`
	RescueProfile string `json:"rescueprofile,omitempty" doc:"An optional rescue profile to use when booting"`
	// contains filtered or unexported fields
}

StartVirtualMachine (Async) represents the creation of the virtual machine

func (StartVirtualMachine) AsyncResponse added in v0.13.0

func (StartVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (StartVirtualMachine) Response added in v0.13.0

func (StartVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type StopVirtualMachine added in v0.9.0

type StopVirtualMachine struct {
	ID     *UUID `json:"id" doc:"The ID of the virtual machine"`
	Forced *bool `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

StopVirtualMachine (Async) represents the stopping of the virtual machine

func (StopVirtualMachine) AsyncResponse added in v0.13.0

func (StopVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (StopVirtualMachine) Response added in v0.13.0

func (StopVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type Taggable added in v0.9.7

type Taggable interface {
	// ResourceType is the name of the Taggable type
	ResourceType() string
}

Taggable represents a resource to which tags can be attached

This is a helper to fill the resourcetype of a CreateTags call

type Template

type Template struct {
	Account               string            `json:"account,omitempty" doc:"the account name to which the template belongs"`
	AccountID             *UUID             `json:"accountid,omitempty" doc:"the account id to which the template belongs"`
	Bootable              bool              `json:"bootable,omitempty" doc:"true if the ISO is bootable, false otherwise"`
	Checksum              string            `json:"checksum,omitempty" doc:"checksum of the template"`
	Created               string            `json:"created,omitempty" doc:"the date this template was created"`
	CrossZones            bool              `json:"crossZones,omitempty" doc:"true if the template is managed across all Zones, false otherwise"`
	Details               map[string]string `json:"details,omitempty" doc:"additional key/value details tied with template"`
	DisplayText           string            `json:"displaytext,omitempty" doc:"the template display text"`
	Format                string            `json:"format,omitempty" doc:"the format of the template."`
	HostID                *UUID             `json:"hostid,omitempty" doc:"the ID of the secondary storage host for the template"`
	HostName              string            `json:"hostname,omitempty" doc:"the name of the secondary storage host for the template"`
	Hypervisor            string            `json:"hypervisor,omitempty" doc:"the target hypervisor for the template"`
	ID                    *UUID             `json:"id,omitempty" doc:"the template ID"`
	IsDynamicallyScalable bool              `` /* 138-byte string literal not displayed */
	IsExtractable         bool              `json:"isextractable,omitempty" doc:"true if the template is extractable, false otherwise"`
	IsFeatured            bool              `json:"isfeatured,omitempty" doc:"true if this template is a featured template, false otherwise"`
	IsPublic              bool              `json:"ispublic,omitempty" doc:"true if this template is a public template, false otherwise"`
	IsReady               bool              `json:"isready,omitempty" doc:"true if the template is ready to be deployed from, false otherwise."`
	Name                  string            `json:"name,omitempty" doc:"the template name"`
	OsCategoryID          *UUID             `json:"oscategoryid,omitempty" doc:"the ID of the OS category for this template"`
	OsCategoryName        string            `json:"oscategoryname,omitempty" doc:"the name of the OS category for this template"`
	OsTypeID              *UUID             `json:"ostypeid,omitempty" doc:"the ID of the OS type for this template"`
	OsTypeName            string            `json:"ostypename,omitempty" doc:"the name of the OS type for this template"`
	PasswordEnabled       bool              `json:"passwordenabled,omitempty" doc:"true if the reset password feature is enabled, false otherwise"`
	Removed               string            `json:"removed,omitempty" doc:"the date this template was removed"`
	Size                  int64             `json:"size,omitempty" doc:"the size of the template"`
	SourceTemplateID      *UUID             `json:"sourcetemplateid,omitempty" doc:"the template ID of the parent template if present"`
	SSHKeyEnabled         bool              `json:"sshkeyenabled,omitempty" doc:"true if template is sshkey enabled, false otherwise"`
	Status                string            `json:"status,omitempty" doc:"the status of the template"`
	Tags                  []ResourceTag     `json:"tags,omitempty" doc:"the list of resource tags associated with tempate"`
	TemplateDirectory     string            `json:"templatedirectory,omitempty" doc:"Template directory"`
	TemplateTag           string            `json:"templatetag,omitempty" doc:"the tag of this template"`
	TemplateType          string            `json:"templatetype,omitempty" doc:"the type of the template"`
	URL                   string            `json:"url,omitempty" doc:"Original URL of the template where it was downloaded"`
	ZoneID                *UUID             `json:"zoneid,omitempty" doc:"the ID of the zone for this template"`
	ZoneName              string            `json:"zonename,omitempty" doc:"the name of the zone for this template"`
}

Template represents a machine to be deployed.

func (Template) ListRequest added in v0.9.20

func (template Template) ListRequest() (ListCommand, error)

ListRequest builds the ListTemplates request

func (Template) ResourceType added in v0.9.7

func (Template) ResourceType() string

ResourceType returns the type of the resource

type UUID added in v0.11.0

type UUID struct {
	uuid.UUID
}

UUID holds a UUID v4

func MustParseUUID added in v0.11.0

func MustParseUUID(s string) *UUID

MustParseUUID acts like ParseUUID but panic in case of a failure.

func ParseUUID added in v0.11.0

func ParseUUID(s string) (*UUID, error)

ParseUUID parses a string into a UUID.

func (*UUID) DeepCopy added in v0.13.3

func (u *UUID) DeepCopy() *UUID

DeepCopy create a true copy of the receiver.

func (*UUID) DeepCopyInto added in v0.13.3

func (u *UUID) DeepCopyInto(out *UUID)

DeepCopyInto copies the receiver into out.

In must be non nil.

func (UUID) Equal added in v0.11.0

func (u UUID) Equal(other UUID) bool

Equal returns true if itself is equal to other.

func (UUID) MarshalJSON added in v0.11.0

func (u UUID) MarshalJSON() ([]byte, error)

MarshalJSON converts the UUID to a string representation.

func (*UUID) UnmarshalJSON added in v0.11.0

func (u *UUID) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the raw JSON into the UUID.

type UUIDItem added in v0.9.9

type UUIDItem struct {
	Description      string `json:"description,omitempty"`
	SerialVersionUID int64  `json:"serialVersionUID,omitempty"`
	UUID             string `json:"uuid"`
}

UUIDItem represents an item of the UUIDList part of an ErrorResponse

type UpdateDNSRecord added in v0.9.28

type UpdateDNSRecord struct {
	ID         int64  `json:"id,omitempty"`
	DomainID   int64  `json:"domain_id,omitempty"`
	Name       string `json:"name,omitempty"`
	TTL        int    `json:"ttl,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
	Content    string `json:"content,omitempty"`
	RecordType string `json:"record_type,omitempty"`
	Prio       int    `json:"prio,omitempty"`
}

UpdateDNSRecord represents a DNS record

type UpdateDNSRecordResponse added in v0.9.28

type UpdateDNSRecordResponse struct {
	Record UpdateDNSRecord `json:"record"`
}

UpdateDNSRecordResponse represents the creation of a DNS record

type UpdateDefaultNicForVirtualMachine added in v0.9.0

type UpdateDefaultNicForVirtualMachine struct {
	NicID            *UUID `json:"nicid" doc:"NIC ID"`
	VirtualMachineID *UUID `json:"virtualmachineid" doc:"Virtual Machine ID"`
	// contains filtered or unexported fields
}

UpdateDefaultNicForVirtualMachine (Async) adds a NIC to a VM

func (UpdateDefaultNicForVirtualMachine) AsyncResponse added in v0.13.0

func (UpdateDefaultNicForVirtualMachine) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (UpdateDefaultNicForVirtualMachine) Response added in v0.13.0

func (UpdateDefaultNicForVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type UpdateIPAddress added in v0.9.0

type UpdateIPAddress struct {
	Description            string `json:"description,omitempty" doc:"The IP address description."`
	HealthcheckInterval    int64  `json:"interval,omitempty" doc:"healthcheck definition: time in seconds to wait for each check. Default: 10, minimum: 5"`
	HealthcheckMode        string `json:"mode,omitempty" doc:"healthcheck definition: healthcheck mode can be either 'tcp' or 'http'"`
	HealthcheckPath        string `` /* 163-byte string literal not displayed */
	HealthcheckPort        int64  `` /* 143-byte string literal not displayed */
	HealthcheckStrikesFail int64  `` /* 136-byte string literal not displayed */
	HealthcheckStrikesOk   int64  `` /* 135-byte string literal not displayed */
	HealthcheckTimeout     int64  `` /* 139-byte string literal not displayed */
	ID                     *UUID  `json:"id" doc:"the id of the public IP address to update"`
	// contains filtered or unexported fields
}

UpdateIPAddress (Async) represents the IP modification

func (UpdateIPAddress) AsyncResponse added in v0.13.0

func (UpdateIPAddress) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (UpdateIPAddress) Response added in v0.13.0

func (UpdateIPAddress) Response() interface{}

Response returns the struct to unmarshal

type UpdateInstanceGroup added in v0.9.7

type UpdateInstanceGroup struct {
	ID   *UUID  `json:"id" doc:"Instance group ID"`
	Name string `json:"name,omitempty" doc:"new instance group name"`
	// contains filtered or unexported fields
}

UpdateInstanceGroup updates a VM group

func (UpdateInstanceGroup) Response added in v0.13.0

func (UpdateInstanceGroup) Response() interface{}

Response returns the struct to unmarshal

type UpdateNetwork added in v0.9.0

type UpdateNetwork struct {
	ChangeCIDR        *bool  `json:"changecidr,omitempty" doc:"Force update even if cidr type is different"`
	DisplayText       string `json:"displaytext,omitempty" doc:"the new display text for the network"`
	EndIP             net.IP `json:"endip,omitempty" doc:"the ending IP address in the network IP range. Required for managed networks."`
	GuestVMCIDR       *CIDR  `json:"guestvmcidr,omitempty" doc:"CIDR for Guest VMs,Cloudstack allocates IPs to Guest VMs only from this CIDR"`
	ID                *UUID  `json:"id" doc:"the ID of the network"`
	Name              string `json:"name,omitempty" doc:"the new name for the network"`
	Netmask           net.IP `json:"netmask,omitempty" doc:"the netmask of the network. Required for managed networks."`
	NetworkDomain     string `json:"networkdomain,omitempty" doc:"network domain"`
	NetworkOfferingID *UUID  `json:"networkofferingid,omitempty" doc:"network offering ID"`
	StartIP           net.IP `json:"startip,omitempty" doc:"the beginning IP address in the network IP range. Required for managed networks."`
	// contains filtered or unexported fields
}

UpdateNetwork (Async) updates a network

func (UpdateNetwork) AsyncResponse added in v0.13.0

func (UpdateNetwork) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (UpdateNetwork) Response added in v0.13.0

func (UpdateNetwork) Response() interface{}

Response returns the struct to unmarshal

type UpdateNetworkOffering added in v0.9.22

type UpdateNetworkOffering struct {
	Availability     string `` /* 178-byte string literal not displayed */
	DisplayText      string `json:"displaytext,omitempty" doc:"the display text of the network offering"`
	ID               *UUID  `json:"id,omitempty" doc:"the id of the network offering"`
	KeepAliveEnabled *bool  `` /* 227-byte string literal not displayed */
	MaxConnections   int    `json:"maxconnections,omitempty" doc:"maximum number of concurrent connections supported by the network offering"`
	Name             string `json:"name,omitempty" doc:"the name of the network offering"`
	SortKey          int    `json:"sortkey,omitempty" doc:"sort key of the network offering, integer"`
	State            string `json:"state,omitempty" doc:"update state for the network offering"`
	// contains filtered or unexported fields
}

UpdateNetworkOffering represents a modification of a network offering

func (UpdateNetworkOffering) Response added in v0.13.0

func (UpdateNetworkOffering) Response() interface{}

Response returns the struct to unmarshal

type UpdateReverseDNSForPublicIPAddress added in v0.10.1

type UpdateReverseDNSForPublicIPAddress struct {
	DomainName string `json:"domainname,omitempty" doc:"the domain name for the PTR record. It must have a valid TLD"`
	ID         *UUID  `json:"id,omitempty" doc:"the ID of the public IP address"`
	// contains filtered or unexported fields
}

UpdateReverseDNSForPublicIPAddress is a command to create/update the PTR record of a public IP address

func (*UpdateReverseDNSForPublicIPAddress) Response added in v0.13.0

func (*UpdateReverseDNSForPublicIPAddress) Response() interface{}

Response returns the struct to unmarshal

type UpdateReverseDNSForVirtualMachine added in v0.10.1

type UpdateReverseDNSForVirtualMachine struct {
	DomainName string `json:"domainname,omitempty" doc:"the domain name for the PTR record(s). It must have a valid TLD"`
	ID         *UUID  `json:"id,omitempty" doc:"the ID of the virtual machine"`
	// contains filtered or unexported fields
}

UpdateReverseDNSForVirtualMachine is a command to create/update the PTR record(s) of a virtual machine

func (*UpdateReverseDNSForVirtualMachine) Response added in v0.13.0

func (*UpdateReverseDNSForVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type UpdateVMAffinityGroup added in v0.9.0

type UpdateVMAffinityGroup struct {
	ID                 *UUID    `json:"id" doc:"The ID of the virtual machine"`
	AffinityGroupIDs   []UUID   `` /* 269-byte string literal not displayed */
	AffinityGroupNames []string `` /* 272-byte string literal not displayed */
	// contains filtered or unexported fields
}

UpdateVMAffinityGroup (Async) represents a modification of a (anti-)affinity group

func (UpdateVMAffinityGroup) AsyncResponse added in v0.13.0

func (UpdateVMAffinityGroup) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (UpdateVMAffinityGroup) Response added in v0.13.0

func (UpdateVMAffinityGroup) Response() interface{}

Response returns the struct to unmarshal

type UpdateVMNicIP added in v0.11.5

type UpdateVMNicIP struct {
	IPAddress net.IP `` /* 210-byte string literal not displayed */
	NicID     *UUID  `json:"nicid" doc:"the ID of the nic."`
	// contains filtered or unexported fields
}

UpdateVMNicIP updates the default IP address of a VM Nic

func (UpdateVMNicIP) AsyncResponse added in v0.13.0

func (UpdateVMNicIP) AsyncResponse() interface{}

AsyncResponse returns the struct to unmarshal the async job

func (UpdateVMNicIP) Response added in v0.13.0

func (UpdateVMNicIP) Response() interface{}

Response returns the struct to unmarshal

type UpdateVirtualMachine added in v0.9.0

type UpdateVirtualMachine struct {
	ID               *UUID             `json:"id" doc:"The ID of the virtual machine"`
	Details          map[string]string `json:"details,omitempty" doc:"Details in key/value pairs."`
	DisplayName      string            `json:"displayname,omitempty" doc:"user generated name"`
	Group            string            `json:"group,omitempty" doc:"group of the virtual machine"`
	Name             string            `json:"name,omitempty" doc:"new host name of the vm. The VM has to be stopped/started for this update to take affect"`
	SecurityGroupIDs []UUID            `json:"securitygroupids,omitempty" doc:"list of security group ids to be applied on the virtual machine."`
	UserData         string            `` /* 372-byte string literal not displayed */
	// contains filtered or unexported fields
}

UpdateVirtualMachine represents the update of the virtual machine

func (UpdateVirtualMachine) Response added in v0.13.0

func (UpdateVirtualMachine) Response() interface{}

Response returns the struct to unmarshal

type User added in v0.9.7

type User struct {
	APIKey    string `json:"apikey,omitempty" doc:"the api key of the user"`
	Account   string `json:"account,omitempty" doc:"the account name of the user"`
	AccountID *UUID  `json:"accountid,omitempty" doc:"the account ID of the user"`
	Created   string `json:"created,omitempty" doc:"the date and time the user account was created"`
	Email     string `json:"email,omitempty" doc:"the user email address"`
	FirstName string `json:"firstname,omitempty" doc:"the user firstname"`
	ID        *UUID  `json:"id,omitempty" doc:"the user ID"`
	IsDefault bool   `json:"isdefault,omitempty" doc:"true if user is default, false otherwise"`
	LastName  string `json:"lastname,omitempty" doc:"the user lastname"`
	RoleID    *UUID  `json:"roleid,omitempty" doc:"the ID of the role"`
	RoleName  string `json:"rolename,omitempty" doc:"the name of the role"`
	RoleType  string `json:"roletype,omitempty" doc:"the type of the role"`
	SecretKey string `json:"secretkey,omitempty" doc:"the secret key of the user"`
	State     string `json:"state,omitempty" doc:"the user state"`
	Timezone  string `json:"timezone,omitempty" doc:"the timezone user was created in"`
	UserName  string `json:"username,omitempty" doc:"the user name"`
}

User represents a User

func (User) ListRequest added in v0.13.0

func (user User) ListRequest() (ListCommand, error)

ListRequest builds the ListUsers request

type UserSecurityGroup

type UserSecurityGroup struct {
	Group string `json:"group,omitempty"`
}

UserSecurityGroup represents the traffic of another security group

func (UserSecurityGroup) String added in v0.10.4

func (usg UserSecurityGroup) String() string

String gives the UserSecurityGroup name

type VirtualMachine

type VirtualMachine struct {
	Account             string            `json:"account,omitempty" doc:"the account associated with the virtual machine"`
	AccountID           *UUID             `json:"accountid,omitempty" doc:"the account ID associated with the virtual machine"`
	AffinityGroup       []AffinityGroup   `json:"affinitygroup,omitempty" doc:"list of affinity groups associated with the virtual machine"`
	ClusterID           *UUID             `json:"clusterid,omitempty" doc:"the ID of the vm's cluster"`
	ClusterName         string            `json:"clustername,omitempty" doc:"the name of the vm's cluster"`
	CPUNumber           int               `json:"cpunumber,omitempty" doc:"the number of cpu this virtual machine is running with"`
	CPUSpeed            int               `json:"cpuspeed,omitempty" doc:"the speed of each cpu"`
	CPUUsed             string            `json:"cpuused,omitempty" doc:"the amount of the vm's CPU currently used"`
	Created             string            `json:"created,omitempty" doc:"the date when this virtual machine was created"`
	Details             map[string]string `json:"details,omitempty" doc:"Vm details in key/value pairs."`
	DiskIoRead          int64             `json:"diskioread,omitempty" doc:"the read (io) of disk on the vm"`
	DiskIoWrite         int64             `json:"diskiowrite,omitempty" doc:"the write (io) of disk on the vm"`
	DiskKbsRead         int64             `json:"diskkbsread,omitempty" doc:"the read (bytes) of disk on the vm"`
	DiskKbsWrite        int64             `json:"diskkbswrite,omitempty" doc:"the write (bytes) of disk on the vm"`
	DiskOfferingID      *UUID             `json:"diskofferingid,omitempty" doc:"the ID of the disk offering of the virtual machine"`
	DiskOfferingName    string            `json:"diskofferingname,omitempty" doc:"the name of the disk offering of the virtual machine"`
	DisplayName         string            `json:"displayname,omitempty" doc:"user generated name. The name of the virtual machine is returned if no displayname exists."`
	ForVirtualNetwork   bool              `json:"forvirtualnetwork,omitempty" doc:"the virtual network for the service offering"`
	Group               string            `json:"group,omitempty" doc:"the group name of the virtual machine"`
	GroupID             *UUID             `json:"groupid,omitempty" doc:"the group ID of the virtual machine"`
	HAEnable            bool              `json:"haenable,omitempty" doc:"true if high-availability is enabled, false otherwise"`
	HostName            string            `json:"hostname,omitempty" doc:"the name of the host for the virtual machine"`
	ID                  *UUID             `json:"id,omitempty" doc:"the ID of the virtual machine"`
	InstanceName        string            `json:"instancename,omitempty" doc:"instance name of the user vm; this parameter is returned to the ROOT admin only"`
	IsoDisplayText      string            `json:"isodisplaytext,omitempty" doc:"an alternate display text of the ISO attached to the virtual machine"`
	IsoID               *UUID             `json:"isoid,omitempty" doc:"the ID of the ISO attached to the virtual machine"`
	IsoName             string            `json:"isoname,omitempty" doc:"the name of the ISO attached to the virtual machine"`
	KeyPair             string            `json:"keypair,omitempty" doc:"ssh key-pair"`
	Memory              int               `json:"memory,omitempty" doc:"the memory allocated for the virtual machine"`
	Name                string            `json:"name,omitempty" doc:"the name of the virtual machine"`
	NetworkKbsRead      int64             `json:"networkkbsread,omitempty" doc:"the incoming network traffic on the vm"`
	NetworkKbsWrite     int64             `json:"networkkbswrite,omitempty" doc:"the outgoing network traffic on the host"`
	Nic                 []Nic             `json:"nic,omitempty" doc:"the list of nics associated with vm"`
	OSCategoryID        *UUID             `json:"oscategoryid,omitempty" doc:"Os category ID of the virtual machine"`
	OSCategoryName      string            `json:"oscategoryname,omitempty" doc:"Os category name of the virtual machine"`
	OSTypeID            *UUID             `json:"ostypeid,omitempty" doc:"OS type id of the vm"`
	Password            string            `json:"password,omitempty" doc:"the password (if exists) of the virtual machine"`
	PasswordEnabled     bool              `json:"passwordenabled,omitempty" doc:"true if the password rest feature is enabled, false otherwise"`
	PCIDevices          []PCIDevice       `json:"pcidevices,omitempty" doc:"list of PCI devices"`
	PodID               *UUID             `json:"podid,omitempty" doc:"the ID of the vm's pod"`
	PodName             string            `json:"podname,omitempty" doc:"the name of the vm's pod"`
	PublicIP            string            `json:"publicip,omitempty" doc:"public IP address id associated with vm via Static nat rule"`
	PublicIPID          *UUID             `json:"publicipid,omitempty" doc:"public IP address id associated with vm via Static nat rule"`
	RootDeviceID        int64             `json:"rootdeviceid,omitempty" doc:"device ID of the root volume"`
	RootDeviceType      string            `json:"rootdevicetype,omitempty" doc:"device type of the root volume"`
	SecurityGroup       []SecurityGroup   `json:"securitygroup,omitempty" doc:"list of security groups associated with the virtual machine"`
	ServiceOfferingID   *UUID             `json:"serviceofferingid,omitempty" doc:"the ID of the service offering of the virtual machine"`
	ServiceOfferingName string            `json:"serviceofferingname,omitempty" doc:"the name of the service offering of the virtual machine"`
	ServiceState        string            `json:"servicestate,omitempty" doc:"State of the Service from LB rule"`
	State               string            `json:"state,omitempty" doc:"the state of the virtual machine"`
	Tags                []ResourceTag     `json:"tags,omitempty" doc:"the list of resource tags associated with vm"`
	TemplateDisplayText string            `json:"templatedisplaytext,omitempty" doc:"an alternate display text of the template for the virtual machine"`
	TemplateID          *UUID             `` /* 151-byte string literal not displayed */
	TemplateName        string            `json:"templatename,omitempty" doc:"the name of the template for the virtual machine"`
	ZoneID              *UUID             `json:"zoneid,omitempty" doc:"the ID of the availablility zone for the virtual machine"`
	ZoneName            string            `json:"zonename,omitempty" doc:"the name of the availability zone for the virtual machine"`
}

VirtualMachine represents a virtual machine

See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/stable/virtual_machines.html

func (VirtualMachine) DefaultNic added in v0.9.10

func (vm VirtualMachine) DefaultNic() *Nic

DefaultNic returns the default nic

func (VirtualMachine) Delete added in v0.9.12

func (vm VirtualMachine) Delete(ctx context.Context, client *Client) error

Delete destroys the VM

func (VirtualMachine) IP added in v0.9.18

func (vm VirtualMachine) IP() *net.IP

IP returns the default nic IP address

func (VirtualMachine) ListRequest added in v0.9.18

func (vm VirtualMachine) ListRequest() (ListCommand, error)

ListRequest builds the ListVirtualMachines request

func (VirtualMachine) NicByID added in v0.9.2

func (vm VirtualMachine) NicByID(nicID UUID) *Nic

NicByID returns the corresponding interface base on its ID

func (VirtualMachine) NicByNetworkID added in v0.9.2

func (vm VirtualMachine) NicByNetworkID(networkID UUID) *Nic

NicByNetworkID returns the corresponding interface based on the given NetworkID

A VM cannot be connected twice to a same network.

func (VirtualMachine) NicsByType added in v0.9.2

func (vm VirtualMachine) NicsByType(nicType string) []Nic

NicsByType returns the corresponding interfaces base on the given type

func (VirtualMachine) ResourceType added in v0.9.7

func (VirtualMachine) ResourceType() string

ResourceType returns the type of the resource

type VirtualMachineState added in v0.11.0

type VirtualMachineState string

VirtualMachineState holds the state of the instance

https://github.com/apache/cloudstack/blob/master/api/src/main/java/com/cloud/vm/VirtualMachine.java

const (
	// VirtualMachineStarting VM is being started. At this state, you should find host id filled which means it's being started on that host
	VirtualMachineStarting VirtualMachineState = "Starting"
	// VirtualMachineRunning VM is running. host id has the host that it is running on
	VirtualMachineRunning VirtualMachineState = "Running"
	// VirtualMachineStopping VM is being stopped. host id has the host that it is being stopped on
	VirtualMachineStopping VirtualMachineState = "Stopping"
	// VirtualMachineStopped VM is stopped. host id should be null
	VirtualMachineStopped VirtualMachineState = "Stopped"
	// VirtualMachineDestroyed VM is marked for destroy
	VirtualMachineDestroyed VirtualMachineState = "Destroyed"
	// VirtualMachineExpunging "VM is being expunged
	VirtualMachineExpunging VirtualMachineState = "Expunging"
	// VirtualMachineMigrating VM is being live migrated. host id holds destination host, last host id holds source host
	VirtualMachineMigrating VirtualMachineState = "Migrating"
	// VirtualMachineMoving VM is being migrated offline (volume is being moved).
	VirtualMachineMoving VirtualMachineState = "Moving"
	// VirtualMachineError VM is in error
	VirtualMachineError VirtualMachineState = "Error"
	// VirtualMachineUnknown VM state is unknown
	VirtualMachineUnknown VirtualMachineState = "Unknown"
	// VirtualMachineShutdowned VM is shutdowned from inside
	VirtualMachineShutdowned VirtualMachineState = "Shutdowned"
)

type VirtualMachineUserData added in v0.9.25

type VirtualMachineUserData struct {
	UserData         string `json:"userdata" doc:"Base 64 encoded VM user data"`
	VirtualMachineID *UUID  `json:"virtualmachineid" doc:"the ID of the virtual machine"`
}

VirtualMachineUserData represents the base64 encoded user-data

func (VirtualMachineUserData) Decode added in v0.9.25

func (userdata VirtualMachineUserData) Decode() (string, error)

Decode decodes as a readable string the content of the user-data (base64 · gzip)

type Volume added in v0.9.0

type Volume struct {
	Account                    string        `json:"account,omitempty" doc:"the account associated with the disk volume"`
	Attached                   string        `json:"attached,omitempty" doc:"the date the volume was attached to a VM instance"`
	ChainInfo                  string        `json:"chaininfo,omitempty" doc:"the chain info of the volume"`
	ClusterID                  *UUID         `json:"clusterid,omitempty" doc:"ID of the cluster"`
	ClusterName                string        `json:"clustername,omitempty" doc:"name of the cluster"`
	Created                    string        `json:"created,omitempty" doc:"the date the disk volume was created"`
	Destroyed                  bool          `json:"destroyed,omitempty" doc:"the boolean state of whether the volume is destroyed or not"`
	DeviceID                   int64         `` /* 143-byte string literal not displayed */
	DiskBytesReadRate          int64         `json:"diskBytesReadRate,omitempty" doc:"bytes read rate of the disk volume"`
	DiskBytesWriteRate         int64         `json:"diskBytesWriteRate,omitempty" doc:"bytes write rate of the disk volume"`
	DiskIopsReadRate           int64         `json:"diskIopsReadRate,omitempty" doc:"io requests read rate of the disk volume"`
	DiskIopsWriteRate          int64         `json:"diskIopsWriteRate,omitempty" doc:"io requests write rate of the disk volume"`
	DiskOfferingDisplayText    string        `json:"diskofferingdisplaytext,omitempty" doc:"the display text of the disk offering"`
	DiskOfferingID             *UUID         `json:"diskofferingid,omitempty" doc:"ID of the disk offering"`
	DiskOfferingName           string        `json:"diskofferingname,omitempty" doc:"name of the disk offering"`
	DisplayVolume              bool          `json:"displayvolume,omitempty" doc:"an optional field whether to the display the volume to the end user or not."`
	Hypervisor                 string        `json:"hypervisor,omitempty" doc:"Hypervisor the volume belongs to"`
	ID                         *UUID         `json:"id,omitempty" doc:"ID of the disk volume"`
	IsExtractable              *bool         `json:"isextractable,omitempty" doc:"true if the volume is extractable, false otherwise"`
	IsoDisplayText             string        `json:"isodisplaytext,omitempty" doc:"an alternate display text of the ISO attached to the virtual machine"`
	IsoID                      *UUID         `json:"isoid,omitempty" doc:"the ID of the ISO attached to the virtual machine"`
	IsoName                    string        `json:"isoname,omitempty" doc:"the name of the ISO attached to the virtual machine"`
	MaxIops                    int64         `json:"maxiops,omitempty" doc:"max iops of the disk volume"`
	MinIops                    int64         `json:"miniops,omitempty" doc:"min iops of the disk volume"`
	Name                       string        `json:"name,omitempty" doc:"name of the disk volume"`
	Path                       string        `json:"path,omitempty" doc:"the path of the volume"`
	PodID                      *UUID         `json:"podid,omitempty" doc:"ID of the pod"`
	PodName                    string        `json:"podname,omitempty" doc:"name of the pod"`
	QuiesceVM                  bool          `json:"quiescevm,omitempty" doc:"need quiesce vm or not when taking snapshot"`
	ServiceOfferingDisplayText string        `json:"serviceofferingdisplaytext,omitempty" doc:"the display text of the service offering for root disk"`
	ServiceOfferingID          *UUID         `json:"serviceofferingid,omitempty" doc:"ID of the service offering for root disk"`
	ServiceOfferingName        string        `json:"serviceofferingname,omitempty" doc:"name of the service offering for root disk"`
	Size                       uint64        `json:"size,omitempty" doc:"size of the disk volume"`
	SnapshotID                 *UUID         `json:"snapshotid,omitempty" doc:"ID of the snapshot from which this volume was created"`
	State                      string        `json:"state,omitempty" doc:"the state of the disk volume"`
	Status                     string        `json:"status,omitempty" doc:"the status of the volume"`
	Storage                    string        `json:"storage,omitempty" doc:"name of the primary storage hosting the disk volume"`
	StorageID                  *UUID         `json:"storageid,omitempty" doc:"id of the primary storage hosting the disk volume; returned to admin user only"`
	StorageType                string        `json:"storagetype,omitempty" doc:"shared or local storage"`
	Tags                       []ResourceTag `json:"tags,omitempty" doc:"the list of resource tags associated with volume"`
	TemplateDisplayText        string        `json:"templatedisplaytext,omitempty" doc:"an alternate display text of the template for the virtual machine"`
	TemplateID                 *UUID         `` // no *UUID because of the -1 thingy...
	/* 151-byte string literal not displayed */
	TemplateName     string `json:"templatename,omitempty" doc:"the name of the template for the virtual machine"`
	Type             string `json:"type,omitempty" doc:"type of the disk volume (ROOT or DATADISK)"`
	VirtualMachineID *UUID  `json:"virtualmachineid,omitempty" doc:"id of the virtual machine"`
	VMDisplayName    string `json:"vmdisplayname,omitempty" doc:"display name of the virtual machine"`
	VMName           string `json:"vmname,omitempty" doc:"name of the virtual machine"`
	VMState          string `json:"vmstate,omitempty" doc:"state of the virtual machine"`
	ZoneID           *UUID  `json:"zoneid,omitempty" doc:"ID of the availability zone"`
	ZoneName         string `json:"zonename,omitempty" doc:"name of the availability zone"`
}

Volume represents a volume linked to a VM

func (Volume) ListRequest added in v0.9.18

func (vol Volume) ListRequest() (ListCommand, error)

ListRequest builds the ListVolumes request

func (Volume) ResourceType added in v0.9.7

func (Volume) ResourceType() string

ResourceType returns the type of the resource

type WaitAsyncJobResultFunc added in v0.9.22

type WaitAsyncJobResultFunc func(*AsyncJobResult, error) bool

WaitAsyncJobResultFunc represents the callback to wait a results of an async request, if false stops

type Zone

type Zone struct {
	AllocationState       string            `json:"allocationstate,omitempty" doc:"the allocation state of the cluster"`
	Description           string            `json:"description,omitempty" doc:"Zone description"`
	DhcpProvider          string            `json:"dhcpprovider,omitempty" doc:"the dhcp Provider for the Zone"`
	DisplayText           string            `json:"displaytext,omitempty" doc:"the display text of the zone"`
	DNS1                  net.IP            `json:"dns1,omitempty" doc:"the first DNS for the Zone"`
	DNS2                  net.IP            `json:"dns2,omitempty" doc:"the second DNS for the Zone"`
	GuestCIDRAddress      *CIDR             `json:"guestcidraddress,omitempty" doc:"the guest CIDR address for the Zone"`
	ID                    *UUID             `json:"id,omitempty" doc:"Zone id"`
	InternalDNS1          net.IP            `json:"internaldns1,omitempty" doc:"the first internal DNS for the Zone"`
	InternalDNS2          net.IP            `json:"internaldns2,omitempty" doc:"the second internal DNS for the Zone"`
	IP6DNS1               net.IP            `json:"ip6dns1,omitempty" doc:"the first IPv6 DNS for the Zone"`
	IP6DNS2               net.IP            `json:"ip6dns2,omitempty" doc:"the second IPv6 DNS for the Zone"`
	LocalStorageEnabled   *bool             `json:"localstorageenabled,omitempty" doc:"true if local storage offering enabled, false otherwise"`
	Name                  string            `json:"name,omitempty" doc:"Zone name"`
	NetworkType           string            `json:"networktype,omitempty" doc:"the network type of the zone; can be Basic or Advanced"`
	ResourceDetails       map[string]string `json:"resourcedetails,omitempty" doc:"Meta data associated with the zone (key/value pairs)"`
	SecurityGroupsEnabled *bool             `json:"securitygroupsenabled,omitempty" doc:"true if security groups support is enabled, false otherwise"`
	Tags                  []ResourceTag     `json:"tags,omitempty" doc:"the list of resource tags associated with zone."`
	Vlan                  string            `json:"vlan,omitempty" doc:"the vlan range of the zone"`
	ZoneToken             string            `json:"zonetoken,omitempty" doc:"Zone Token"`
}

Zone represents a data center

TODO: represent correctly the capacity field.

func (Zone) ListRequest added in v0.9.18

func (zone Zone) ListRequest() (ListCommand, error)

ListRequest builds the ListZones request

Directories

Path Synopsis
Package admin contains the privileged API calls.
Package admin contains the privileged API calls.

Jump to

Keyboard shortcuts

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