Skip to content

Commit e450887

Browse files
committed
cinder-csi-plugin: Trivial variable rename
To clarify their meaning. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent 2b20adb commit e450887

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

pkg/csi/cinder/controllerserver.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
121121
}
122122

123123
// Volume Create
124-
properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster}
124+
properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.clusterID}
125125
//Tag volume with metadata if present: https://github.com/kubernetes-csi/external-provisioner/pull/399
126126
for _, mKey := range sharedcsi.RecognizedCSIProvisionerParams {
127127
if v, ok := req.Parameters[mKey]; ok {
@@ -764,7 +764,7 @@ func (cs *controllerServer) createSnapshot(cloud openstack.IOpenStack, name stri
764764
}
765765

766766
// Add cluster ID to the snapshot metadata
767-
properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster}
767+
properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.clusterID}
768768

769769
// see https://github.com/kubernetes-csi/external-snapshotter/pull/375/
770770
// 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
790790

791791
func (cs *controllerServer) createBackup(cloud openstack.IOpenStack, name string, volumeID string, snap *snapshots.Snapshot, parameters map[string]string) (*backups.Backup, error) {
792792
// Add cluster ID to the snapshot metadata
793-
properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster}
793+
properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.clusterID}
794794

795795
// see https://github.com/kubernetes-csi/external-snapshotter/pull/375/
796796
// Also, we don't want to tag every param but we still want to send the

pkg/csi/cinder/driver.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,17 @@ type Driver struct {
6666
name string
6767
fqVersion string //Fully qualified version in format {Version}@{CPO version}
6868
endpoint string
69-
cluster string
69+
clusterID string
7070

71-
ids *identityServer
72-
cs *controllerServer
73-
ns *nodeServer
74-
pvcLister v1.PersistentVolumeClaimLister
71+
ids *identityServer
72+
cs *controllerServer
73+
ns *nodeServer
7574

7675
vcap []*csi.VolumeCapability_AccessMode
7776
cscap []*csi.ControllerServiceCapability
7877
nscap []*csi.NodeServiceCapability
78+
79+
pvcLister v1.PersistentVolumeClaimLister
7980
}
8081

8182
type DriverOpts struct {
@@ -89,7 +90,7 @@ func NewDriver(o *DriverOpts) *Driver {
8990
name: driverName,
9091
fqVersion: fmt.Sprintf("%s@%s", Version, version.Version),
9192
endpoint: o.Endpoint,
92-
cluster: o.ClusterID,
93+
clusterID: o.ClusterID,
9394
pvcLister: o.PVCLister,
9495
}
9596

0 commit comments

Comments
 (0)