Documentation ¶
Index ¶
- Constants
- Variables
- func NewControllerServer(d *CinderDriver, cloud openstack.IOpenStack) *controllerServer
- func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability
- func NewIdentityServer(d *CinderDriver) *identityServer
- func NewNodeServer(d *CinderDriver, mount mount.IMount, metadata metadata.IMetadata, ...) *nodeServer
- func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability
- func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode
- func ParseEndpoint(ep string) (string, string, error)
- func RunControllerandNodePublishServer(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ...)
- type CinderDriver
- func (d *CinderDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)
- func (d *CinderDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error
- func (d *CinderDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability_AccessMode
- func (d *CinderDriver) GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
- func (d *CinderDriver) Run()
- func (d *CinderDriver) SetupDriver(cloud openstack.IOpenStack, mount mount.IMount, metadata metadata.IMetadata)
- func (d *CinderDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error
- type NonBlockingGRPCServer
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 FakePVCName = "fakepvc-1"
View Source
var FakePVCNamespace = "fakepvc-ns"
View Source
var FakePVName = "fakepv-1"
View Source
var FakeSnapshotContentName = "fake-content"
View Source
var FakeSnapshotID = "261a8b81-3660-43e5-bab8-6470b65ee4e8"
View Source
var FakeSnapshotListEmpty = []snapshots.Snapshot{}
View Source
var FakeSnapshotName = "CSISnapshotName"
View Source
var FakeSnapshotNamespace = "fakesnapshot-ns"
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 ( // Driver version // Version history: // * 1.3.0: Up to version 1.3.0 driver version was the same as CSI spec version // * 1.3.1: Bump for 1.21 release // * 1.3.2: Allow --cloud-config to be given multiple times // * 1.3.3: Bump for 1.22 release // * 2.0.0: Bump for 1.23 release Version = "2.0.0" )
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 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(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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.