Documentation
¶
Overview ¶
Package profitbricks is a client library for interacting with Profitbricks RESTful APIs.
Index ¶
- Constants
- Variables
- func MkJson(i interface{}) string
- func SetAuth(u, p string)
- func SetDepth(newdepth string) string
- func SetEndpoint(newendpoint string) string
- func SetPretty(pretty bool) bool
- func SetUserAgent(userAgent string)
- type BalancedNics
- type Cdroms
- type ContractResources
- type ContractResourcesProperties
- type CreateServerRequest
- type CreateVolumeRequest
- type Datacenter
- type DatacenterEntities
- type DatacenterProperties
- type Datacenters
- type Entity
- type FirewallRule
- type FirewallRules
- type FirewallruleProperties
- type Group
- type GroupEntities
- type GroupProperties
- type Groups
- type Image
- type ImageProperties
- type Images
- type IpBlock
- type IpBlockProperties
- type IpBlocks
- type IpFailover
- type Lan
- type LanEntities
- type LanNics
- type LanProperties
- type Lans
- type LoablanacerCreateRequest
- type Loadbalancer
- type LoadbalancerEntities
- type LoadbalancerProperties
- type Loadbalancers
- type Location
- type LocationProperties
- type Locations
- type Metadata
- type Nic
- type NicCreateRequest
- type NicEntities
- type NicProperties
- type Nics
- type Owns
- type Request
- type RequestStatus
- type RequestStatusMetadata
- type RequestTarget
- type Requests
- type Resource
- type ResourceEntities
- type ResourceReference
- type Resources
- type ResourcesLimits
- type Resp
- func DeleteBalancedNic(dcid, lbalid, balnicid string) Resp
- func DeleteDatacenter(dcid string) Resp
- func DeleteFirewallRule(dcid string, srvid string, nicId string, fwId string) Resp
- func DeleteGroup(groupid string) Resp
- func DeleteLan(dcid, lanid string) Resp
- func DeleteLoadbalancer(dcid, lbalid string) Resp
- func DeleteNic(dcid, srvid, nicid string) Resp
- func DeleteServer(dcid, srvid string) Resp
- func DeleteShare(groupid string, resourceid string) Resp
- func DeleteSnapshot(snapshotId string) Resp
- func DeleteUser(groupid string) Resp
- func DeleteUserFromGroup(groupid string, userid string) Resp
- func DeleteVolume(dcid, volid string) Resp
- func DetachCdrom(dcid, srvid, cdid string) Resp
- func DetachVolume(dcid, srvid, volid string) Resp
- func RebootServer(dcid, srvid string) Resp
- func ReleaseIpBlock(ipblockid string) Resp
- func RestoreSnapshot(dcid string, volid string, snapshotId string) Resp
- func StartServer(dcid, srvid string) Resp
- func StopServer(dcid, srvid string) Resp
- type Server
- type ServerEntities
- type ServerProperties
- type Servers
- type Share
- type ShareProperties
- type Shares
- type Snapshot
- type SnapshotProperties
- type Snapshots
- type User
- type UserEntities
- type UserProperties
- type Users
- type Volume
- func AttachVolume(dcid string, srvid string, volid string) Volume
- func CreateVolume(dcid string, request Volume) Volume
- func GetAttachedCdrom(dcid, srvid, cdid string) Volume
- func GetAttachedVolume(dcid, srvid, volid string) Volume
- func GetVolume(dcid string, volumeId string) Volume
- func PatchVolume(dcid string, volid string, request VolumeProperties) Volume
- type VolumeProperties
- type Volumes
Constants ¶
const CommandHeader = "application/x-www-form-urlencoded"
CommandHeader is used with is_command
const FullHeader = "application/json"
FullHeader is the standard header to include with all http requests except is_patch and is_command
const PatchHeader = "application/json"
PatchHeader is used with is_patch .
Variables ¶
var AgentHeader = "profitbricks-sdk-go/3.0.1"
var Depth = "5"
var Endpoint = "https://api.profitbricks.com/cloudapi/v4"
Endpoint is the base url for REST requests.
var Passwd string
Password for authentication .
var Pretty = true
var Username string
Username for authentication .
Functions ¶
func SetEndpoint ¶
SetEndpoint is used to set the REST Endpoint. Endpoint is declared in config.go
func SetUserAgent ¶
func SetUserAgent(userAgent string)
Types ¶
type BalancedNics ¶
type Cdroms ¶
type Cdroms struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Image `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
type ContractResources ¶
type ContractResources struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Properties ContractResourcesProperties `json:"properties,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func GetContractResources ¶
func GetContractResources() ContractResources
type ContractResourcesProperties ¶
type ContractResourcesProperties struct {
PBContractNumber string `json:"PB-Contract-Number,omitempty"`
Owner string `json:"owner,omitempty"`
Status string `json:"status,omitempty"`
ResourceLimits *ResourcesLimits `json:"resourceLimits,omitempty"`
}
type CreateServerRequest ¶
type CreateServerRequest struct {
ServerProperties `json:"properties"`
}
type CreateVolumeRequest ¶
type CreateVolumeRequest struct {
VolumeProperties `json:"properties"`
}
type Datacenter ¶
type Datacenter struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties DatacenterProperties `json:"properties,omitempty"`
Entities DatacenterEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CompositeCreateDatacenter ¶
func CompositeCreateDatacenter(datacenter Datacenter) Datacenter
func CreateDatacenter ¶
func CreateDatacenter(dc Datacenter) Datacenter
func GetDatacenter ¶
func GetDatacenter(dcid string) Datacenter
func PatchDatacenter ¶
func PatchDatacenter(dcid string, obj DatacenterProperties) Datacenter
type DatacenterEntities ¶
type DatacenterEntities struct {
Servers *Servers `json:"servers,omitempty"`
Volumes *Volumes `json:"volumes,omitempty"`
Loadbalancers *Loadbalancers `json:"loadbalancers,omitempty"`
Lans *Lans `json:"lans,omitempty"`
}
type DatacenterProperties ¶
type Datacenters ¶
type Datacenters struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Datacenter `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListDatacenters ¶
func ListDatacenters() Datacenters
type Entity ¶
type Entity struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
type FirewallRule ¶
type FirewallRule struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties FirewallruleProperties `json:"properties,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateFirewallRule ¶
func CreateFirewallRule(dcid string, srvid string, nicId string, fw FirewallRule) FirewallRule
func GetFirewallRule ¶
func GetFirewallRule(dcid string, srvid string, nicId string, fwId string) FirewallRule
func PatchFirewallRule ¶
func PatchFirewallRule(dcid string, srvid string, nicId string, fwId string, obj FirewallruleProperties) FirewallRule
type FirewallRules ¶
type FirewallRules struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []FirewallRule `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListFirewallRules ¶
func ListFirewallRules(dcId string, serverid string, nicId string) FirewallRules
type FirewallruleProperties ¶
type FirewallruleProperties struct {
Name string `json:"name,omitempty"`
Protocol string `json:"protocol,omitempty"`
SourceMac *string `json:"sourceMac,omitempty"`
SourceIp *string `json:"sourceIp,omitempty"`
TargetIp *string `json:"targetIp,omitempty"`
IcmpCode *int `json:"icmpCode,omitempty"`
IcmpType *int `json:"icmpType,omitempty"`
PortRangeStart *int `json:"portRangeStart,omitempty"`
PortRangeEnd *int `json:"portRangeEnd,omitempty"`
}
type Group ¶
type Group struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Properties GroupProperties `json:"properties,omitempty"`
Entities *GroupEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateGroup ¶
func UpdateGroup ¶
type GroupEntities ¶
type GroupProperties ¶
type Groups ¶
type Groups struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Group `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
type Image ¶
type Image struct {
Id string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties ImageProperties `json:"properties,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
type ImageProperties ¶
type ImageProperties struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Location string `json:"location,omitempty"`
Size int `json:"size,omitempty"`
CpuHotPlug bool `json:"cpuHotPlug,omitempty"`
CpuHotUnplug bool `json:"cpuHotUnplug,omitempty"`
RamHotPlug bool `json:"ramHotPlug,omitempty"`
RamHotUnplug bool `json:"ramHotUnplug,omitempty"`
NicHotPlug bool `json:"nicHotPlug,omitempty"`
NicHotUnplug bool `json:"nicHotUnplug,omitempty"`
DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"`
DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"`
DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"`
DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"`
LicenceType string `json:"licenceType,omitempty"`
ImageType string `json:"imageType,omitempty"`
Public bool `json:"public,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
type Images ¶
type Images struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Image `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListAttachedCdroms ¶
type IpBlock ¶
type IpBlock struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties IpBlockProperties `json:"properties,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func GetIpBlock ¶
func ReserveIpBlock ¶
type IpBlockProperties ¶
type IpBlocks ¶
type IpBlocks struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []IpBlock `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
type IpFailover ¶
type Lan ¶
type Lan struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties LanProperties `json:"properties,omitempty"`
Entities *LanEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateLan ¶
CreateLan creates a lan in the datacenter from a jason []byte and returns a Instance struct
type LanEntities ¶
type LanEntities struct {
Nics *LanNics `json:"nics,omitempty"`
}
type LanProperties ¶
type LanProperties struct {
Name string `json:"name,omitempty"`
Public bool `json:"public,omitempty"`
IpFailover []IpFailover `json:"ipFailover,omitempty"`
}
type Lans ¶
type LoablanacerCreateRequest ¶
type LoablanacerCreateRequest struct {
LoadbalancerProperties `json:"properties"`
}
type Loadbalancer ¶
type Loadbalancer struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties LoadbalancerProperties `json:"properties,omitempty"`
Entities LoadbalancerEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateLoadbalancer ¶
func CreateLoadbalancer(dcid string, request Loadbalancer) Loadbalancer
Createloadbalancer creates a loadbalancer in the datacenter from a jason []byte and returns a Instance struct
func GetLoadbalancer ¶
func GetLoadbalancer(dcid, lbalid string) Loadbalancer
GetLoadbalancer pulls data for the Loadbalancer where id = lbalid returns a Instance struct
func PatchLoadbalancer ¶
func PatchLoadbalancer(dcid string, lbalid string, obj LoadbalancerProperties) Loadbalancer
type LoadbalancerEntities ¶
type LoadbalancerEntities struct {
Balancednics *BalancedNics `json:"balancednics,omitempty"`
}
type LoadbalancerProperties ¶
type Loadbalancers ¶
type Loadbalancers struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Loadbalancer `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListLoadbalancers ¶
func ListLoadbalancers(dcid string) Loadbalancers
Listloadbalancers returns a Collection struct for loadbalancers in the Datacenter
type Location ¶
type Location struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata Metadata `json:"metadata,omitempty"`
Properties LocationProperties `json:"properties,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
type LocationProperties ¶
type Locations ¶
type Locations struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Location `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func GetRegionalLocations ¶
GetRegionalLocations returns a list of available locations in a specific region
type Metadata ¶
type Metadata struct {
CreatedDate time.Time `json:"createdDate,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
Etag string `json:"etag,omitempty"`
LastModifiedDate time.Time `json:"lastModifiedDate,omitempty"`
LastModifiedBy string `json:"lastModifiedBy,omitempty"`
State string `json:"state,omitempty"`
}
type Nic ¶
type Nic struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties *NicProperties `json:"properties,omitempty"`
Entities *NicEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateNic ¶
CreateNic creates a nic on a server from a jason []byte and returns a Instance struct
func GetBalancedNic ¶
type NicCreateRequest ¶
type NicCreateRequest struct {
NicProperties `json:"properties"`
}
type NicEntities ¶
type NicEntities struct {
Firewallrules *FirewallRules `json:"firewallrules,omitempty"`
}
type NicProperties ¶
type Nics ¶
type Nics struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Nic `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListBalancedNics ¶
type Request ¶
type Request struct {
ID string `json:"id"`
Type string `json:"type"`
Href string `json:"href"`
Metadata struct {
CreatedDate time.Time `json:"createdDate"`
CreatedBy string `json:"createdBy"`
Etag string `json:"etag"`
RequestStatus struct {
ID string `json:"id"`
Type string `json:"type"`
Href string `json:"href"`
} `json:"requestStatus"`
} `json:"metadata"`
Properties struct {
Method string `json:"method"`
Headers interface{} `json:"headers"`
Body interface{} `json:"body"`
URL string `json:"url"`
} `json:"properties"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func GetRequest ¶
type RequestStatus ¶
type RequestStatus struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata RequestStatusMetadata `json:"metadata,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func GetRequestStatus ¶
func GetRequestStatus(path string) RequestStatus
type RequestStatusMetadata ¶
type RequestStatusMetadata struct {
Status string `json:"status,omitempty"`
Message string `json:"message,omitempty"`
Etag string `json:"etag,omitempty"`
Targets []RequestTarget `json:"targets,omitempty"`
}
type RequestTarget ¶
type RequestTarget struct {
Target ResourceReference `json:"target,omitempty"`
Status string `json:"status,omitempty"`
}
type Requests ¶
type Requests struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Request `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListRequests ¶
func ListRequests() Requests
type Resource ¶
type Resource struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Entities *ResourceEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func GetResourceByType ¶
type ResourceEntities ¶
type ResourceEntities struct {
Groups Groups `json:"groups,omitempty"`
}
type ResourceReference ¶
type Resources ¶
type Resources struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Resource `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListResourcesByType ¶
type ResourcesLimits ¶
type ResourcesLimits struct {
CoresPerServer int32 `json:"coresPerServer,omitempty"`
CoresPerContract int32 `json:"coresPerContract,omitempty"`
CoresProvisioned int32 `json:"coresProvisioned,omitempty"`
RamPerServer int32 `json:"ramPerServer,omitempty"`
RamPerContract int32 `json:"ramPerContract,omitempty"`
RamProvisioned int32 `json:"ramProvisioned,omitempty"`
HddLimitPerVolume int64 `json:"hddLimitPerVolume,omitempty"`
HddLimitPerContract int64 `json:"hddLimitPerContract,omitempty"`
HddVolumeProvisioned int64 `json:"hddVolumeProvisioned,omitempty"`
SsdLimitPerVolume int64 `json:"ssdLimitPerVolume,omitempty"`
SsdLimitPerContract int64 `json:"ssdLimitPerContract,omitempty"`
SsdVolumeProvisioned int64 `json:"ssdVolumeProvisioned,omitempty"`
ReservableIps int32 `json:"reservableIps,omitempty"`
ReservedIpsOnContract int32 `json:"reservedIpsOnContract,omitempty"`
ReservedIpsInUse int32 `json:"reservedIpsInUse,omitempty"`
}
type Resp ¶
Resp is the struct returned by all Rest request functions
func DeleteBalancedNic ¶
func DeleteDatacenter ¶
func DeleteFirewallRule ¶
func DeleteGroup ¶
func DeleteLoadbalancer ¶
func DeleteServer ¶
DeleteServer deletes the server where id=srvid and returns Resp struct
func DeleteShare ¶
func DeleteSnapshot ¶
func DeleteUser ¶
func DeleteUserFromGroup ¶
func DeleteVolume ¶
func DetachCdrom ¶
func DetachVolume ¶
func ReleaseIpBlock ¶
func (*Resp) PrintHeaders ¶
func (r *Resp) PrintHeaders()
PrintHeaders prints the http headers as k,v pairs
type Server ¶
type Server struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties ServerProperties `json:"properties,omitempty"`
Entities *ServerEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateServer ¶
CreateServer creates a server from a jason []byte and returns a Instance struct
func PatchServer ¶
func PatchServer(dcid string, srvid string, props ServerProperties) Server
PatchServer partial update of server properties passed in as jason []byte Returns Instance struct
type ServerEntities ¶
type ServerProperties ¶
type ServerProperties struct {
Name string `json:"name,omitempty"`
Cores int `json:"cores,omitempty"`
Ram int `json:"ram,omitempty"`
AvailabilityZone string `json:"availabilityZone,omitempty"`
VmState string `json:"vmState,omitempty"`
BootCdrom *ResourceReference `json:"bootCdrom,omitempty"`
BootVolume *ResourceReference `json:"bootVolume,omitempty"`
CpuFamily string `json:"cpuFamily,omitempty"`
}
type Servers ¶
type Servers struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Server `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListServers ¶
ListServers returns a server struct collection
type ShareProperties ¶
type ShareProperties struct {
}
type Snapshot ¶
type Snapshot struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata Metadata `json:"metadata,omitempty"`
Properties SnapshotProperties `json:"properties,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateSnapshot ¶
func GetSnapshot ¶
func UpdateSnapshot ¶
func UpdateSnapshot(snapshotId string, request SnapshotProperties) Snapshot
type SnapshotProperties ¶
type SnapshotProperties struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Location string `json:"location,omitempty"`
Size int `json:"size,omitempty"`
CpuHotPlug bool `json:"cpuHotPlug,omitempty"`
CpuHotUnplug bool `json:"cpuHotUnplug,omitempty"`
RamHotPlug bool `json:"ramHotPlug,omitempty"`
RamHotUnplug bool `json:"ramHotUnplug,omitempty"`
NicHotPlug bool `json:"nicHotPlug,omitempty"`
NicHotUnplug bool `json:"nicHotUnplug,omitempty"`
DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"`
DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"`
DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"`
DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"`
LicenceType string `json:"licenceType,omitempty"`
}
type Snapshots ¶
type Snapshots struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Snapshot `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListSnapshots ¶
func ListSnapshots() Snapshots
type User ¶
type User struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties *UserProperties `json:"properties,omitempty"`
Entities *UserEntities `json:"entities,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func AddUserToGroup ¶
func CreateUser ¶
func UpdateUser ¶
type UserEntities ¶
type UserProperties ¶
type UserProperties struct {
Firstname string `json:"firstname,omitempty"`
Lastname string `json:"lastname,omitempty"`
Email string `json:"email,omitempty"`
Password string `json:"password,omitempty"`
Administrator bool `json:"administrator,omitempty"`
ForceSecAuth bool `json:"forceSecAuth,omitempty"`
SecAuthActive bool `json:"secAuthActive,omitempty"`
}
type Users ¶
type Volume ¶
type Volume struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Properties VolumeProperties `json:"properties,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func CreateVolume ¶
func GetAttachedCdrom ¶
func GetAttachedVolume ¶
func PatchVolume ¶
func PatchVolume(dcid string, volid string, request VolumeProperties) Volume
type VolumeProperties ¶
type VolumeProperties struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Size int `json:"size,omitempty"`
AvailabilityZone string `json:"availabilityZone,omitempty"`
Image string `json:"image,omitempty"`
ImageAlias string `json:"imageAlias,omitempty"`
ImagePassword string `json:"imagePassword,omitempty"`
SshKeys []string `json:"sshKeys,omitempty"`
Bus string `json:"bus,omitempty"`
LicenceType string `json:"licenceType,omitempty"`
CpuHotPlug bool `json:"cpuHotPlug,omitempty"`
CpuHotUnplug bool `json:"cpuHotUnplug,omitempty"`
RamHotPlug bool `json:"ramHotPlug,omitempty"`
RamHotUnplug bool `json:"ramHotUnplug,omitempty"`
NicHotPlug bool `json:"nicHotPlug,omitempty"`
NicHotUnplug bool `json:"nicHotUnplug,omitempty"`
DiscVirtioHotPlug bool `json:"discVirtioHotPlug,omitempty"`
DiscVirtioHotUnplug bool `json:"discVirtioHotUnplug,omitempty"`
DiscScsiHotPlug bool `json:"discScsiHotPlug,omitempty"`
DiscScsiHotUnplug bool `json:"discScsiHotUnplug,omitempty"`
DeviceNumber int64 `json:"deviceNumber,omitempty"`
}
type Volumes ¶
type Volumes struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Items []Volume `json:"items,omitempty"`
Response string `json:"Response,omitempty"`
Headers *http.Header `json:"headers,omitempty"`
StatusCode int `json:"headers,omitempty"`
}
func ListAttachedVolumes ¶
func ListVolumes ¶
ListVolumes returns a Collection struct for volumes in the Datacenter