Skip to content

Commit

Permalink
cinder-csi-plugin: Trivial variable rename
Browse files Browse the repository at this point in the history
To clarify their meaning.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
  • Loading branch information
stephenfin committed Dec 4, 2024
1 parent 2b20adb commit e450887
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pkg/csi/cinder/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 7 additions & 6 deletions pkg/csi/cinder/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
}

Expand Down

0 comments on commit e450887

Please sign in to comment.