Documentation
¶
Index ¶
- Constants
- Variables
- type API
- func (a *API) CreateServerPro(name, admin_password string, os_template_id int, sshKey string, ipID int, ...) (server *models.Server, err error)
- func (a *API) CreateServerSmart(name, admin_password string, package_id, os_template_id int, sshKey string, ...) (server *models.Server, err error)
- func (a *API) DeleteServer(server_id int) (err error)
- func (a *API) GetPreconfiguredPackage(packagename string) (cloudpackage *models.CloudPackage, err error)
- func (a *API) GetPreconfiguredPackages() (packagesTypes []*models.CloudPackage, err error)
- func (a *API) GetPurchasedIpAddress(ip string) (IpAddress *models.IPAddress, err error)
- func (a *API) GetPurchasedIpAddresses() (packagesTypes []*models.IPAddress, err error)
- func (a *API) GetServer(serverId int) (server *models.Server, err error)
- func (a *API) GetServers() (servers []*models.Server, err error)
- func (a *API) GetTemplate(templatename string, hypervisorType int) (template *models.Template, err error)
- func (a *API) GetTemplates() (hypervisorTypes []*models.GetHypvervisorTypeResponse, err error)
- func (a *API) KillServer(server_id int) (err error)
- func (a *API) PurchaseIpAddress() (ip *models.IPAddress, err error)
- func (a *API) StartServer(server_id int) (err error)
- func (a *API) StopServer(server_id int) (err error)
- type APIError
- type APIResponse
- type Client
- type GetPreconfiguredPackagesRequest
- type GetPurchasedIpAddresses
- type GetServerDetailsRequest
- type GetServersRequest
- type GetTemplatesRequest
- type NetworkAdapterConfiguration
- type PublicIpAddressDetails
- type Response
- type ResponseBody
- type SetEnqueueServerCreation
- type SetEnqueueServerDeletion
- type SetEnqueueServerKill
- type SetEnqueueServerStart
- type SetEnqueueServerStop
- type SetPurchaseIpAddress
- type VirtualDiskDetails
Constants ¶
View Source
const DefaultTimeout = 180
DefaultTimeout api requests after 180s
Variables ¶
View Source
var Endpoints = map[string]string{
"dc1": dc1,
"dc2": dc2,
"dc3": dc3,
"dc4": dc4,
"dc5": dc5,
"dc6": dc6,
"dc7": dc7,
"dc8": dc8,
}
View Source
var (
ErrNoEnpoint = errors.New("arubacloud: no endpoint provided")
)
Custom errors
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CreateServerPro ¶
func (*API) CreateServerSmart ¶
func (*API) DeleteServer ¶
func (*API) GetPreconfiguredPackage ¶
func (a *API) GetPreconfiguredPackage(packagename string) (cloudpackage *models.CloudPackage, err error)
func (*API) GetPreconfiguredPackages ¶
func (a *API) GetPreconfiguredPackages() (packagesTypes []*models.CloudPackage, err error)
func (*API) GetPurchasedIpAddress ¶
func (*API) GetPurchasedIpAddresses ¶
func (*API) GetTemplate ¶
func (*API) GetTemplates ¶
func (a *API) GetTemplates() (hypervisorTypes []*models.GetHypvervisorTypeResponse, err error)
func (*API) KillServer ¶
func (*API) StartServer ¶
func (*API) StopServer ¶
type APIResponse ¶
type Client ¶
type Client struct {
EndPoint string
Username string
Password string
Timeout time.Duration
Client *http.Client
}
func NewDefaultClient ¶
NewDefaultClient returns an ArubaCloud API Client from external configuration
func NewEndpointClient ¶
NewEndpointClient returns an ArubaCloud API Client from external configuration, for a specific endpoint
type GetPurchasedIpAddresses ¶
type GetServerDetailsRequest ¶
type GetServersRequest ¶
type GetTemplatesRequest ¶
type NetworkAdapterConfiguration ¶
type NetworkAdapterConfiguration struct {
PublicIpAddresses []PublicIpAddressDetails
NetworkAdapterType int `json:"NetworkAdapterType"`
}
type PublicIpAddressDetails ¶
type ResponseBody ¶
type SetEnqueueServerCreation ¶
type SetEnqueueServerCreation struct {
Username string `json:"Username"`
Password string `json:"Password"`
Server struct {
AdministratorPassword string `json:"AdministratorPassword"`
Name string `json:"Name"`
SmartVMWarePackageID int `json:"SmartVMWarePackageID,omitempty"`
Note string `json:"Note"`
OSTemplateId int `json:"OSTemplateId"`
SshKey string `json:"SshKey"`
SshPasswordAuthAllowed bool `json:"SshPasswordAuthAllowed,omitempty"`
CPUQuantity int `json:"CPUQuantity"`
RAMQuantity int `json:"RAMQuantity"`
NetworkAdaptersConfiguration []NetworkAdapterConfiguration
VirtualDisks []VirtualDiskDetails
ConfigureIPv6 bool `json:"ConfigureIPv6"`
}
}
type SetEnqueueServerKill ¶
type SetEnqueueServerStart ¶
type SetEnqueueServerStop ¶
type SetPurchaseIpAddress ¶
type VirtualDiskDetails ¶
Click to show internal directories.
Click to hide internal directories.