csp

package
v4.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// CspClientTimeout : Timeout for a connection to the CSP
	CspClientTimeout = time.Duration(300) * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerStorageProvider

type ContainerStorageProvider struct {
	Credentials *storageprovider.Credentials

	Client    *connectivity.Client
	AuthToken string
}

ContainerStorageProvider is an implementor of the StorageProvider interface

func NewContainerStorageProvider

func NewContainerStorageProvider(credentials *storageprovider.Credentials) (*ContainerStorageProvider, error)

NewContainerStorageProvider is an opportunity to configure the CSP client

func (*ContainerStorageProvider) CloneVolume

func (provider *ContainerStorageProvider) CloneVolume(name, description, sourceID, snapshotID string, size int64, opts map[string]interface{}) (*model.Volume, error)

CloneVolume clones a volume on the CSP nolint : gocyclo

func (*ContainerStorageProvider) CreateSnapshot

func (provider *ContainerStorageProvider) CreateSnapshot(name, description, sourceVolumeID string, opts map[string]interface{}) (*model.Snapshot, error)

CreateSnapshot will create a new snapshot of the given name of the source volume ID

func (*ContainerStorageProvider) CreateSnapshotGroup

func (provider *ContainerStorageProvider) CreateSnapshotGroup(name, sourceVolumeGroupID string, opts map[string]interface{}) (*model.SnapshotGroup, error)

CreateSnapshotGroup creates a snapshot group on the CSP

func (*ContainerStorageProvider) CreateVolume

func (provider *ContainerStorageProvider) CreateVolume(name, description string, size int64, opts map[string]interface{}) (*model.Volume, error)

CreateVolume creates a volume on the CSP

func (*ContainerStorageProvider) CreateVolumeGroup

func (provider *ContainerStorageProvider) CreateVolumeGroup(name, description string, opts map[string]interface{}) (*model.VolumeGroup, error)

CreateVolumeGroup creates a volume group on the CSP

func (*ContainerStorageProvider) DeleteSnapshot

func (provider *ContainerStorageProvider) DeleteSnapshot(id string) error

DeleteSnapshot will remove a snapshot from the CSP nolint: dupl

func (*ContainerStorageProvider) DeleteSnapshotGroup

func (provider *ContainerStorageProvider) DeleteSnapshotGroup(id string) error

DeleteSnapshotGroup deletes a snapshot group on the CSP

func (*ContainerStorageProvider) DeleteVolume

func (provider *ContainerStorageProvider) DeleteVolume(id string, force bool) error

DeleteVolume will remove a volume from the CSP nolint: dupl

func (*ContainerStorageProvider) DeleteVolumeGroup

func (provider *ContainerStorageProvider) DeleteVolumeGroup(id string) error

DeleteVolumeGroup deletes a volume group on the CSP

func (*ContainerStorageProvider) EditVolume

func (provider *ContainerStorageProvider) EditVolume(id string, opts map[string]interface{}) (*model.Volume, error)

EditVolume edits a volume on the CSP

func (*ContainerStorageProvider) ExpandVolume

func (provider *ContainerStorageProvider) ExpandVolume(id string, requestBytes int64) (*model.Volume, error)

ExpandVolume will expand the volume to reqeusted size

func (*ContainerStorageProvider) GetNodeContext

func (provider *ContainerStorageProvider) GetNodeContext(nodeUUID string) (*model.Node, error)

GetNodeContext is used to get host information from the CSP

func (*ContainerStorageProvider) GetSnapshot

func (provider *ContainerStorageProvider) GetSnapshot(id string) (*model.Snapshot, error)

GetSnapshot will return information about the given snapshot

func (*ContainerStorageProvider) GetSnapshotByName

func (provider *ContainerStorageProvider) GetSnapshotByName(name string, volumeID string) (*model.Snapshot, error)

GetSnapshotByName will return information about the given snapshot

func (*ContainerStorageProvider) GetSnapshots

func (provider *ContainerStorageProvider) GetSnapshots(volumeID string) ([]*model.Snapshot, error)

GetSnapshots returns all of the snapshots for the given source volume from the CSP

func (*ContainerStorageProvider) GetVolume

func (provider *ContainerStorageProvider) GetVolume(id string) (*model.Volume, error)

GetVolume will return information about the given volume

func (*ContainerStorageProvider) GetVolumeByName

func (provider *ContainerStorageProvider) GetVolumeByName(name string) (*model.Volume, error)

GetVolumeByName will return information about the given volume

func (*ContainerStorageProvider) GetVolumes

func (provider *ContainerStorageProvider) GetVolumes() ([]*model.Volume, error)

GetVolumes returns all of the volumes from the CSP

func (*ContainerStorageProvider) PublishVolume

func (provider *ContainerStorageProvider) PublishVolume(id, hostUUID, accessProtocol string) (*model.PublishInfo, error)

PublishVolume will make a volume visible (add an ACL) to the given host

func (*ContainerStorageProvider) SetNodeContext

func (provider *ContainerStorageProvider) SetNodeContext(node *model.Node) error

SetNodeContext is used to provide host information to the CSP

func (*ContainerStorageProvider) UnpublishVolume

func (provider *ContainerStorageProvider) UnpublishVolume(id, hostUUID string) error

UnpublishVolume will make a volume invisible (remove an ACL) from the given host

type ErrorObject

type ErrorObject struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

ErrorObject is an `Error` implementation as well as an implementation of the JSON API error object.

type ErrorsPayload

type ErrorsPayload struct {
	Errors []*ErrorObject `json:"errors"`
}

ErrorsPayload is a serializer struct for representing a valid JSON API errors payload.

Jump to

Keyboard shortcuts

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