blockstorage

package
v0.0.0-...-d1703da Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2015 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateVolumeParameters

type CreateVolumeParameters struct {
	DisplayName string            `json:"display_name"`
	Az          string            `json:"availability_zone,omitempty"`
	Desciption  string            `json:"display_description"`
	VolumeType  string            `json:"volume_type"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Size        int               `json:"size"`
	ImageRef    string            `json:"imageRef,omitempty"` //this is not documented but it works
}

CreateVolumeParameters are the properties for creating a new volume

type CreateVolumeTypeParameters

type CreateVolumeTypeParameters struct {
	Name       string                `json:"name"`
	ExtraSpecs *VolumeTypeExtraSpecs `json:"extra_specs,omitempty"` // optional property so allowing this to be nil so as not to be in the payload.
}

CreateVolumeTypeParameters are the properties for creating a new volume

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a client service that can make requests against a OpenStack compute v2 service.

func NewService

func NewService(authenticator common.Authenticator) Service

NewService creates a new compute service client.

func (Service) CreateVolume

func (blockStorageService Service) CreateVolume(parameters CreateVolumeParameters) (Volume, error)

CreateVolume will send a POST request to create a new volume with the specified parameters.

func (Service) CreateVolumeType

func (blockStorageService Service) CreateVolumeType(parameters CreateVolumeTypeParameters) (VolumeType, error)

CreateVolumeType will send a POST request to create a new volumetype with the specified parameters.

func (Service) DeleteVolume

func (blockStorageService Service) DeleteVolume(id string) (err error)

DeleteVolume will delete the volume by id.

func (Service) DeleteVolumeType

func (blockStorageService Service) DeleteVolumeType(id string) (err error)

DeleteVolumeType will delete the volume type by id.

func (Service) Volume

func (blockStorageService Service) Volume(id string) (Volume, error)

Volume will issue a GET request to retrieve the volume by id.

func (Service) VolumeType

func (blockStorageService Service) VolumeType(id string) (VolumeType, error)

VolumeType will issue a GET request to retrieve the volumetype by id.

func (Service) VolumeTypes

func (blockStorageService Service) VolumeTypes() ([]VolumeType, error)

VolumeTypes will issue a GET request to retrieve the volume types.

func (Service) Volumes

func (blockStorageService Service) Volumes() ([]Volume, error)

Volumes will issue a GET request to retrieve the volumes.

type Volume

type Volume struct {
	Status      string               `json:"status"`
	DisplayName string               `json:"display_name"`
	Attachments []VolumeAttachment   `json:"attachments"`
	Az          string               `json:"availability_zone"`
	Bootable    bool                 `json:"bootable,string"`
	Encrypted   bool                 `json:"encrypted,omitempty"` // property not seen in public Helion
	CreatedAt   misc.RFC8601DateTime `json:"created_at"`
	Desciption  string               `json:"display_description"`
	VolumeType  string               `json:"volume_type"`
	SnapshotID  string               `json:"snapshot_id"`
	SourceVolID string               `json:"source_volid"`
	Metadata    map[string]string    `json:"metadata,omitempty"`
	ID          string               `json:"id"`
	Size        int                  `json:"size"`
	ImageRef    string               `json:"imageRef,omitempty"`
}

Volume has properties for a volume in block storage in openstack.

type VolumeAttachment

type VolumeAttachment struct {
	AttachmentID string `json:"id"`
	Device       string `json:"device"`
	ServerID     string `json:"server_id"`
	VolumeID     string `json:"volume_id"`
}

VolumeAttachment describes what the volume is attached to

type VolumeType

type VolumeType struct {
	ID         string               `json:"id"`
	Name       string               `json:"name"`
	ExtraSpecs VolumeTypeExtraSpecs `json:"extra_specs"`
}

VolumeType has properties for a volume type in block storage in openstack.

type VolumeTypeExtraSpecs

type VolumeTypeExtraSpecs struct {
	Capabilities string `json:"capabilities,omitempty"`
}

VolumeTypeExtraSpecs has properties for a volumetype that has extra specs like gpu

Jump to

Keyboard shortcuts

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