cinder

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 25 Imported by: 3

Documentation

Index

Constants

View Source
const FakeMaxVolume int64 = 256

Variables

View Source
var FakeAttachment = volumes.Attachment{
	ServerID: FakeNodeID,
}
View Source
var FakeAvailability = "nova"
View Source
var FakeBlockDeviceStats = &mount.DeviceStats{
	Block: true,

	TotalBytes: 536870912,
}
View Source
var FakeCapacityGiB = 1
View Source
var FakeCluster = "cluster"
View Source
var FakeConfig = "/etc/cloud.conf"
View Source
var FakeCtx = context.Background()
View Source
var FakeDevicePath = "/dev/xxx"
View Source
var FakeEndpoint = "tcp://127.0.0.1:10000"
View Source
var FakeFsStats = &mount.DeviceStats{
	Block: false,

	AvailableBytes:  2100,
	TotalBytes:      2121,
	UsedBytes:       21,
	AvailableInodes: 150,
	TotalInodes:     200,
	UsedInodes:      50,
}
View Source
var FakeInstanceID = "321a8b81-3660-43e5-bab8-6470b65ee4e8"
View Source
var FakeNodeID = "CSINodeID"
View Source
var FakeSnapshotID = "261a8b81-3660-43e5-bab8-6470b65ee4e8"
View Source
var FakeSnapshotListEmpty = []snapshots.Snapshot{}
View Source
var FakeSnapshotName = "CSISnapshotName"
View Source
var FakeSnapshotRes = snapshots.Snapshot{
	ID:       FakeSnapshotID,
	Name:     "fake-snapshot",
	VolumeID: FakeVolID,
	Size:     1,
}
View Source
var FakeSnapshotsRes = []snapshots.Snapshot{FakeSnapshotRes}
View Source
var FakeStagingTargetPath = "/mnt/globalmount"
View Source
var FakeTargetPath = "/mnt/cinder"
View Source
var FakeVol = volumes.Volume{
	ID:               FakeVolID,
	Name:             FakeVolName,
	Size:             FakeCapacityGiB,
	AvailabilityZone: FakeAvailability,
}
View Source
var FakeVol1 = volumes.Volume{
	ID:               FakeVolID,
	Name:             "fake-duplicate",
	Status:           "available",
	AvailabilityZone: FakeAvailability,
	Size:             FakeCapacityGiB,
	Attachments:      []volumes.Attachment{FakeAttachment},
}
View Source
var FakeVol2 = volumes.Volume{
	ID:               "261a8b81-3660-43e5-bab8-6470b65ee4e9",
	Name:             "fake-duplicate",
	Status:           "available",
	AvailabilityZone: "",
}
View Source
var FakeVol3 = volumes.Volume{
	ID:               "261a8b81-3660-43e5-bab8-6470b65ee4e9",
	Name:             "fake-3",
	Status:           "available",
	Size:             2,
	AvailabilityZone: "",
}
View Source
var FakeVolFromSnapshot = volumes.Volume{
	ID:               FakeVolID,
	Name:             FakeVolName,
	Size:             FakeCapacityGiB,
	AvailabilityZone: FakeAvailability,
	SnapshotID:       FakeSnapshotID,
}
View Source
var FakeVolFromSourceVolume = volumes.Volume{
	ID:               "test-clone-id",
	Name:             FakeVolName,
	Size:             FakeCapacityGiB,
	AvailabilityZone: FakeAvailability,
	SourceVolID:      FakeVolID,
}
View Source
var FakeVolID = "CSIVolumeID"
View Source
var FakeVolList = []volumes.Volume{FakeVol1}
View Source
var FakeVolListEmpty = []volumes.Volume{}
View Source
var FakeVolListMultiple = []volumes.Volume{FakeVol1, FakeVol3}
View Source
var FakeVolName = "CSIVolumeName"
View Source
var FakeVolType = ""
View Source
var (

	// we used to use spec version as driver version, now separate them
	Version = "1.2.2"
)

Functions

func NewControllerServer

func NewControllerServer(d *CinderDriver, cloud openstack.IOpenStack) *controllerServer

func NewControllerServiceCapability added in v1.14.0

func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability

func NewIdentityServer added in v1.14.0

func NewIdentityServer(d *CinderDriver) *identityServer

func NewNodeServer

func NewNodeServer(d *CinderDriver, mount mount.IMount, metadata metadata.IMetadata, cloud openstack.IOpenStack) *nodeServer

func NewNodeServiceCapability added in v1.14.0

func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability

func NewVolumeCapabilityAccessMode added in v1.14.0

func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode

func ParseEndpoint added in v1.14.0

func ParseEndpoint(ep string) (string, string, error)

func RunControllerandNodePublishServer added in v1.14.0

func RunControllerandNodePublishServer(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)

Types

type CinderDriver added in v1.14.0

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

func NewDriver

func NewDriver(nodeID, endpoint, cluster string) *CinderDriver

func (*CinderDriver) AddControllerServiceCapabilities added in v1.14.0

func (d *CinderDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)

func (*CinderDriver) AddNodeServiceCapabilities added in v1.14.0

func (d *CinderDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error

func (*CinderDriver) AddVolumeCapabilityAccessModes added in v1.14.0

func (d *CinderDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability_AccessMode

func (*CinderDriver) GetVolumeCapabilityAccessModes added in v1.14.0

func (d *CinderDriver) GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode

func (*CinderDriver) Run added in v1.14.0

func (d *CinderDriver) Run()

func (*CinderDriver) SetupDriver added in v1.15.0

func (d *CinderDriver) SetupDriver(cloud openstack.IOpenStack, mount mount.IMount, metadata metadata.IMetadata)

func (*CinderDriver) ValidateControllerServiceRequest added in v1.14.0

func (d *CinderDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error

type NonBlockingGRPCServer added in v1.14.0

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)
	// Waits for the service to stop
	Wait()
	// Stops the service gracefully
	Stop()
	// Stops the service forcefully
	ForceStop()
}

NonBlockingGRPCServer defines Non blocking GRPC server interfaces

func NewNonBlockingGRPCServer added in v1.14.0

func NewNonBlockingGRPCServer() NonBlockingGRPCServer

Directories

Path Synopsis
Package openstack snapshots provides an implementation of Cinder Snapshot features cinder functions using Gophercloud.
Package openstack snapshots provides an implementation of Cinder Snapshot features cinder functions using Gophercloud.

Jump to

Keyboard shortcuts

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