cloudferro

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthOptions

type AuthOptions struct {
	Username    string
	Password    string
	TenantName  string
	Region      string
	DomainName  string
	ProjectName string
	ProjectID   string
}

AuthOptions fields are the union of those recognized by each identity implementation and provider.

type Client

type Client struct {
	*openstack.Client
	// 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) Build

func (c *Client) Build(params map[string]interface{}) (api.ClientAPI, error)

Build build a new Client from configuration parameter

func (*Client) CreateVolume

func (client *Client) CreateVolume(request model.VolumeRequest) (*model.Volume, error)

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) DeleteVolume

func (client *Client) DeleteVolume(id string) error

DeleteVolume deletes the volume identified by id

func (*Client) DeleteVolumeAttachment

func (client *Client) DeleteVolumeAttachment(serverID, vaID string) error

DeleteVolumeAttachment deletes the volume attachment identifed by id

func (*Client) GetVolume

func (client *Client) GetVolume(id string) (*model.Volume, error)

GetVolume returns the volume identified by id

func (*Client) GetVolumeAttachment

func (client *Client) GetVolumeAttachment(serverID, id string) (*model.VolumeAttachment, error)

GetVolumeAttachment returns the volume attachment identified by id

func (*Client) ListVolumeAttachments

func (client *Client) ListVolumeAttachments(serverID string) ([]model.VolumeAttachment, error)

ListVolumeAttachments lists available volume attachment

func (*Client) ListVolumes

func (client *Client) ListVolumes() ([]model.Volume, error)

ListVolumes returns the list of all volumes known on the current tenant

Jump to

Keyboard shortcuts

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