Documentation ¶
Index ¶
- type CreateVolumeParameters
- type CreateVolumeTypeParameters
- type Service
- func (blockStorageService Service) CreateVolume(parameters CreateVolumeParameters) (Volume, error)
- func (blockStorageService Service) CreateVolumeType(parameters CreateVolumeTypeParameters) (VolumeType, error)
- func (blockStorageService Service) DeleteVolume(id string) (err error)
- func (blockStorageService Service) DeleteVolumeType(id string) (err error)
- func (blockStorageService Service) Volume(id string) (Volume, error)
- func (blockStorageService Service) VolumeType(id string) (VolumeType, error)
- func (blockStorageService Service) VolumeTypes() ([]VolumeType, error)
- func (blockStorageService Service) Volumes() ([]Volume, error)
- type Volume
- type VolumeAttachment
- type VolumeType
- type VolumeTypeExtraSpecs
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 ¶
DeleteVolume will delete the volume by id.
func (Service) DeleteVolumeType ¶
DeleteVolumeType will delete the volume type 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.
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