Documentation ¶
Index ¶
- type IPInSubnet
- type OpContext
- type Result
- type SelfLink
- type Stack
- func (s *Stack) AddPublicIPToVIP(vip *resources.VIP) error
- func (s *Stack) BindHostToVIP(vip *resources.VIP, host *resources.Host) error
- func (s *Stack) CreateGateway(req resources.GatewayRequest) (*resources.Host, *userdata.Content, error)
- func (s *Stack) CreateHost(request resources.HostRequest) (host *resources.Host, userData *userdata.Content, err error)
- func (s *Stack) CreateKeyPair(name string) (*resources.KeyPair, error)
- func (s *Stack) CreateNetwork(req resources.NetworkRequest) (*resources.Network, error)
- func (s *Stack) CreateVIP(networkID string, description string) (*resources.VIP, error)
- func (s *Stack) CreateVolume(request resources.VolumeRequest) (*resources.Volume, error)
- func (s *Stack) CreateVolumeAttachment(request resources.VolumeAttachmentRequest) (string, error)
- func (s *Stack) DeleteGateway(ref string) error
- func (s *Stack) DeleteHost(id string) (err error)
- func (s *Stack) DeleteKeyPair(id string) error
- func (s *Stack) DeleteNetwork(ref string) (err error)
- func (s *Stack) DeleteVIP(vip *resources.VIP) error
- func (s *Stack) DeleteVolume(ref string) error
- func (s *Stack) DeleteVolumeAttachment(serverID, id string) error
- func (s *Stack) GetAuthenticationOptions() stacks.AuthenticationOptions
- func (s *Stack) GetConfigurationOptions() stacks.ConfigurationOptions
- func (s *Stack) GetHostByName(name string) (*resources.Host, error)
- func (s *Stack) GetHostState(hostParam interface{}) (HostState.Enum, error)
- func (s *Stack) GetImage(id string) (*resources.Image, error)
- func (s *Stack) GetKeyPair(id string) (*resources.KeyPair, error)
- func (s *Stack) GetNetwork(ref string) (*resources.Network, error)
- func (s *Stack) GetNetworkByName(ref string) (*resources.Network, error)
- func (s *Stack) GetTemplate(id string) (*resources.HostTemplate, error)
- func (s *Stack) GetVolume(ref string) (*resources.Volume, error)
- func (s *Stack) GetVolumeAttachment(serverID, id string) (*resources.VolumeAttachment, error)
- func (s *Stack) InspectHost(hostParam interface{}) (host *resources.Host, err error)
- func (s *Stack) ListAvailabilityZones() (map[string]bool, error)
- func (s *Stack) ListHosts() ([]*resources.Host, error)
- func (s *Stack) ListImages() (images []resources.Image, err error)
- func (s *Stack) ListKeyPairs() ([]resources.KeyPair, error)
- func (s *Stack) ListNetworks() ([]*resources.Network, error)
- func (s *Stack) ListRegions() ([]string, error)
- func (s *Stack) ListTemplates(all bool) (templates []resources.HostTemplate, err error)
- func (s *Stack) ListVolumeAttachments(serverID string) ([]resources.VolumeAttachment, error)
- func (s *Stack) ListVolumes() ([]resources.Volume, error)
- func (s *Stack) RebootHost(id string) error
- func (s *Stack) ResizeHost(id string, request resources.SizingRequirements) (*resources.Host, error)
- func (s *Stack) StartHost(id string) error
- func (s *Stack) StopHost(id string) error
- func (s *Stack) UnbindHostFromVIP(vip *resources.VIP, host *resources.Host) error
- func (s *Stack) WaitHostReady(hostParam interface{}, timeout time.Duration) (res *resources.Host, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPInSubnet ¶
IPInSubnet ...
type OpContext ¶
type OpContext struct { Operation *compute.Operation ProjectID string Service *compute.Service DesiredState string }
OpContext ...
type Stack ¶
type Stack struct { Config *stacks.ConfigurationOptions AuthOptions *stacks.AuthenticationOptions GcpConfig *stacks.GCPConfiguration ComputeService *compute.Service }
Stack ...
func New ¶
func New(auth stacks.AuthenticationOptions, localCfg stacks.GCPConfiguration, cfg stacks.ConfigurationOptions) (*Stack, error)
New Create and initialize a ClientAPI
func (*Stack) AddPublicIPToVIP ¶
AddPublicIPToVIP adds a public IP to VIP
func (*Stack) BindHostToVIP ¶
BindHostToVIP makes the host passed as parameter an allowed "target" of the VIP
func (*Stack) CreateGateway ¶
func (s *Stack) CreateGateway(req resources.GatewayRequest) (*resources.Host, *userdata.Content, error)
CreateGateway creates a public Gateway for a private network
func (*Stack) CreateHost ¶
func (s *Stack) CreateHost(request resources.HostRequest) (host *resources.Host, userData *userdata.Content, err error)
CreateHost creates an host satisfying request
func (*Stack) CreateKeyPair ¶
CreateKeyPair creates and import a key pair
func (*Stack) CreateNetwork ¶
CreateNetwork creates a network named name
func (*Stack) CreateVolume ¶
CreateVolume creates a block volume - name is the name of the volume - size is the size of the volume in GB - volumeType is the type of volume to create, if volumeType is empty the driver use a default type
func (*Stack) CreateVolumeAttachment ¶
func (s *Stack) CreateVolumeAttachment(request resources.VolumeAttachmentRequest) (string, error)
CreateVolumeAttachment attaches a volume to an host - 'name' of the volume attachment - 'volume' to attach - 'host' on which the volume is attached
func (*Stack) DeleteGateway ¶
DeleteGateway delete the public gateway referenced by ref (id or name)
func (*Stack) DeleteHost ¶
DeleteHost deletes the host identified by id
func (*Stack) DeleteKeyPair ¶
DeleteKeyPair deletes the key pair identified by id
func (*Stack) DeleteNetwork ¶
DeleteNetwork deletes the network identified by id
func (*Stack) DeleteVolume ¶
DeleteVolume deletes the volume identified by id
func (*Stack) DeleteVolumeAttachment ¶
DeleteVolumeAttachment ...
func (*Stack) GetAuthenticationOptions ¶
func (s *Stack) GetAuthenticationOptions() stacks.AuthenticationOptions
GetAuthenticationOptions ...
func (*Stack) GetConfigurationOptions ¶
func (s *Stack) GetConfigurationOptions() stacks.ConfigurationOptions
GetConfigurationOptions ...
func (*Stack) GetHostByName ¶
GetHostByName returns the host identified by ref (name or id)
func (*Stack) GetHostState ¶
GetHostState returns the host identified by id
func (*Stack) GetKeyPair ¶
GetKeyPair returns the key pair identified by id
func (*Stack) GetNetwork ¶
GetNetwork returns the network identified by ref (id or name)
func (*Stack) GetNetworkByName ¶
GetNetworkByName returns the network identified by ref (id or name)
func (*Stack) GetTemplate ¶
func (s *Stack) GetTemplate(id string) (*resources.HostTemplate, error)
GetTemplate overload OpenStackGcp GetTemplate method to add GPU configuration
func (*Stack) GetVolumeAttachment ¶
func (s *Stack) GetVolumeAttachment(serverID, id string) (*resources.VolumeAttachment, error)
GetVolumeAttachment returns the volume attachment identified by id
func (*Stack) InspectHost ¶
InspectHost returns the host identified by ref (name or id) or by a *resources.Host containing an id
func (*Stack) ListAvailabilityZones ¶
ListAvailabilityZones lists the usable AvailabilityZones
func (*Stack) ListImages ¶
ListImages lists available OS images
func (*Stack) ListKeyPairs ¶
ListKeyPairs lists available key pairs
func (*Stack) ListNetworks ¶
ListNetworks lists available networks
func (*Stack) ListTemplates ¶
func (s *Stack) ListTemplates(all bool) (templates []resources.HostTemplate, err error)
ListTemplates overload OpenStackGcp ListTemplate method to filter wind and flex instance and add GPU configuration
func (*Stack) ListVolumeAttachments ¶
func (s *Stack) ListVolumeAttachments(serverID string) ([]resources.VolumeAttachment, error)
ListVolumeAttachments lists available volume attachment
func (*Stack) ListVolumes ¶
ListVolumes return the list of all volume known on the current tenant
func (*Stack) RebootHost ¶
RebootHost reboot the host identified by id
func (*Stack) ResizeHost ¶
func (s *Stack) ResizeHost(id string, request resources.SizingRequirements) (*resources.Host, error)
ResizeHost change the template used by an host
func (*Stack) UnbindHostFromVIP ¶
UnbindHostFromVIP removes the bind between the VIP and a host
func (*Stack) WaitHostReady ¶
func (s *Stack) WaitHostReady(hostParam interface{}, timeout time.Duration) (res *resources.Host, err error)
WaitHostReady waits an host achieve ready state hostParam can be an ID of host, or an instance of *resources.Host; any other type will return an utils.ErrInvalidParameter.