From 5175681e0c84f439799fdebca2dfc2479e8b9ed7 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 4 Dec 2024 14:38:16 +0000 Subject: [PATCH] cinder-csi-plugin: Trivial variable rename To clarify their meaning. Signed-off-by: Stephen Finucane --- pkg/csi/cinder/controllerserver.go | 6 +++--- pkg/csi/cinder/driver.go | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pkg/csi/cinder/controllerserver.go b/pkg/csi/cinder/controllerserver.go index 43b2ba1941..43f54305ec 100644 --- a/pkg/csi/cinder/controllerserver.go +++ b/pkg/csi/cinder/controllerserver.go @@ -121,7 +121,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol } // Volume Create - properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster} + properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.clusterID} //Tag volume with metadata if present: https://github.com/kubernetes-csi/external-provisioner/pull/399 for _, mKey := range sharedcsi.RecognizedCSIProvisionerParams { if v, ok := req.Parameters[mKey]; ok { @@ -764,7 +764,7 @@ func (cs *controllerServer) createSnapshot(cloud openstack.IOpenStack, name stri } // Add cluster ID to the snapshot metadata - properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster} + properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.clusterID} // see https://github.com/kubernetes-csi/external-snapshotter/pull/375/ // Also, we don't want to tag every param but we still want to send the @@ -790,7 +790,7 @@ func (cs *controllerServer) createSnapshot(cloud openstack.IOpenStack, name stri func (cs *controllerServer) createBackup(cloud openstack.IOpenStack, name string, volumeID string, snap *snapshots.Snapshot, parameters map[string]string) (*backups.Backup, error) { // Add cluster ID to the snapshot metadata - properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster} + properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.clusterID} // see https://github.com/kubernetes-csi/external-snapshotter/pull/375/ // Also, we don't want to tag every param but we still want to send the diff --git a/pkg/csi/cinder/driver.go b/pkg/csi/cinder/driver.go index bd5180a03e..85ceea0a1f 100644 --- a/pkg/csi/cinder/driver.go +++ b/pkg/csi/cinder/driver.go @@ -66,16 +66,17 @@ type Driver struct { name string fqVersion string //Fully qualified version in format {Version}@{CPO version} endpoint string - cluster string + clusterID string - ids *identityServer - cs *controllerServer - ns *nodeServer - pvcLister v1.PersistentVolumeClaimLister + ids *identityServer + cs *controllerServer + ns *nodeServer vcap []*csi.VolumeCapability_AccessMode cscap []*csi.ControllerServiceCapability nscap []*csi.NodeServiceCapability + + pvcLister v1.PersistentVolumeClaimLister } type DriverOpts struct { @@ -89,7 +90,7 @@ func NewDriver(o *DriverOpts) *Driver { name: driverName, fqVersion: fmt.Sprintf("%s@%s", Version, version.Version), endpoint: o.Endpoint, - cluster: o.ClusterID, + clusterID: o.ClusterID, pvcLister: o.PVCLister, }