Documentation
¶
Index ¶
- type AuthOptions
- type Client
- func (client *Client) Build(params map[string]interface{}) (api.ClientAPI, error)
- func (client *Client) CreateGateway(req model.GatewayRequest) (*model.Host, error)
- func (client *Client) CreateHost(request model.HostRequest) (*model.Host, error)
- func (client *Client) CreateKeyPair(name string) (*model.KeyPair, error)
- func (client *Client) CreateNetwork(req model.NetworkRequest) (*model.Network, error)
- func (client *Client) CreateVolume(request model.VolumeRequest) (*model.Volume, error)
- func (client *Client) CreateVolumeAttachment(request model.VolumeAttachmentRequest) (string, error)
- func (client *Client) DeleteGateway(networkID string) error
- func (client *Client) DeleteHost(id string) error
- func (client *Client) DeleteKeyPair(id string) error
- func (client *Client) DeleteNetwork(networkRef string) error
- func (client *Client) DeleteVolume(id string) error
- func (client *Client) DeleteVolumeAttachment(serverID, vaID string) error
- func (client *Client) GetAuthOpts() (model.Config, error)
- func (client *Client) GetCfgOpts() (model.Config, error)
- func (client *Client) GetHost(hostParam interface{}) (*model.Host, error)
- func (client *Client) GetHostByName(name string) (*model.Host, error)
- func (client *Client) GetHostState(hostParam interface{}) (HostState.Enum, error)
- func (client *Client) GetImage(id string) (*model.Image, error)
- func (client *Client) GetKeyPair(id string) (*model.KeyPair, error)
- func (client *Client) GetNetwork(ref string) (*model.Network, error)
- func (client *Client) GetNetworkByName(name string) (*model.Network, error)
- func (client *Client) GetTemplate(id string) (*model.HostTemplate, error)
- func (client *Client) GetVolume(id string) (*model.Volume, error)
- func (client *Client) GetVolumeAttachment(serverID, id string) (*model.VolumeAttachment, error)
- func (client *Client) ListAvailabilityZones(all bool) (map[string]bool, error)
- func (client *Client) ListHosts() ([]*model.Host, error)
- func (client *Client) ListImages(all bool) ([]model.Image, error)
- func (client *Client) ListKeyPairs() ([]model.KeyPair, error)
- func (client *Client) ListNetworks() ([]*model.Network, error)
- func (client *Client) ListTemplates(all bool) ([]model.HostTemplate, error)
- func (client *Client) ListVolumeAttachments(serverID string) ([]model.VolumeAttachment, error)
- func (client *Client) ListVolumes() ([]model.Volume, error)
- func (client *Client) RebootHost(id string) error
- func (client *Client) StartHost(id string) error
- func (client *Client) StopHost(id string) error
- func (client *Client) WaitHostReady(hostID string, timeout time.Duration) (*model.Host, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthOptions ¶
type AuthOptions struct {
// // Endpoint ovh end point (ovh-eu, ovh-ca ...)
// Endpoint string
// //Application or Project Name
// ApplicationName string
// Application Key or project ID
ApplicationKey string
// //Consumer key
// ConsumerKey string
// Openstack identifier
OpenstackID string
// OpenStack password
OpenstackPassword string
// Name of the data center (GRA3, BHS3 ...)
Region string
// Project Name
ProjectName string
}
AuthOptions fields are the union of those recognized by each identity implementation and provider.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the implementation of the ovh driver regarding to the api.ClientAPI This client used ovh api and opensatck ovh api to maximize code reuse
func AuthenticatedClient ¶
func AuthenticatedClient(opts AuthOptions, cfg openstack.CfgOptions) (*Client, error)
AuthenticatedClient returns an authenticated client
func (*Client) CreateGateway ¶
CreateGateway creates a public Gateway for a private network
func (*Client) CreateHost ¶
CreateHost creates an host satisfying request
func (*Client) CreateKeyPair ¶
CreateKeyPair creates and import a key pair
func (*Client) CreateNetwork ¶
CreateNetwork creates a network named name
func (*Client) 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 (*Client) CreateVolumeAttachment ¶
func (client *Client) CreateVolumeAttachment(request model.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 (*Client) DeleteGateway ¶
DeleteGateway delete the public gateway of a private network
func (*Client) DeleteHost ¶
DeleteHost deletes the host identified by id
func (*Client) DeleteKeyPair ¶
DeleteKeyPair deletes the key pair identified by id
func (*Client) DeleteNetwork ¶
DeleteNetwork deletes the network identified by id
func (*Client) DeleteVolume ¶
DeleteVolume deletes the volume identified by id
func (*Client) DeleteVolumeAttachment ¶
DeleteVolumeAttachment ...
func (*Client) GetAuthOpts ¶
GetAuthOpts returns the auth options
func (*Client) GetCfgOpts ¶
GetCfgOpts return configuration parameters
func (*Client) GetHostByName ¶
GetHostByName ...
func (*Client) GetHostState ¶
GetHostState returns the host identified by id
func (*Client) GetKeyPair ¶
GetKeyPair returns the key pair identified by id
func (*Client) GetNetwork ¶
GetNetwork returns the network identified by ref (id or name)
func (*Client) GetNetworkByName ¶
GetNetworkByName returns the network identified name
func (*Client) GetTemplate ¶
func (client *Client) GetTemplate(id string) (*model.HostTemplate, error)
GetTemplate overload OpenStack GetTemplate method to add GPU configuration
func (*Client) GetVolumeAttachment ¶
func (client *Client) GetVolumeAttachment(serverID, id string) (*model.VolumeAttachment, error)
GetVolumeAttachment returns the volume attachment identified by id
func (*Client) ListAvailabilityZones ¶
ListAvailabilityZones ...
func (*Client) ListImages ¶
ListImages lists available OS images
func (*Client) ListKeyPairs ¶
ListKeyPairs lists available key pairs
func (*Client) ListNetworks ¶
ListNetworks lists networks
func (*Client) ListTemplates ¶
func (client *Client) ListTemplates(all bool) ([]model.HostTemplate, error)
ListTemplates overload OpenStack ListTemplate method to filter wind and flex instance and add GPU configuration
func (*Client) ListVolumeAttachments ¶
func (client *Client) ListVolumeAttachments(serverID string) ([]model.VolumeAttachment, error)
ListVolumeAttachments lists available volume attachment
func (*Client) ListVolumes ¶
ListVolumes lists volume IDs