Skip to content

Commit

Permalink
util: change member cap of CSIDriver struct
Browse files Browse the repository at this point in the history
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
  • Loading branch information
humblec authored and mergify[bot] committed Oct 21, 2020
1 parent 2561792 commit 5ac3f1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/csi-common/controllerserver-default.go
Expand Up @@ -62,7 +62,7 @@ func (cs *DefaultControllerServer) ControllerGetCapabilities(ctx context.Context
util.TraceLog(ctx, "Using default ControllerGetCapabilities")

return &csi.ControllerGetCapabilitiesResponse{
Capabilities: cs.Driver.cap,
Capabilities: cs.Driver.capabilities,
}, nil
}

Expand Down
10 changes: 5 additions & 5 deletions internal/csi-common/driver.go
Expand Up @@ -33,9 +33,9 @@ type CSIDriver struct {
nodeID string
version string
// topology constraints that this nodeserver will advertise
topology map[string]string
cap []*csi.ControllerServiceCapability
vc []*csi.VolumeCapability_AccessMode
topology map[string]string
capabilities []*csi.ControllerServiceCapability
vc []*csi.VolumeCapability_AccessMode
}

// NewCSIDriver Creates a NewCSIDriver object. Assumes vendor
Expand Down Expand Up @@ -73,7 +73,7 @@ func (d *CSIDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapa
return nil
}

for _, capability := range d.cap {
for _, capability := range d.capabilities {
if c == capability.GetRpc().GetType() {
return nil
}
Expand All @@ -91,7 +91,7 @@ func (d *CSIDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceC
csc = append(csc, NewControllerServiceCapability(c))
}

d.cap = csc
d.capabilities = csc
}

// AddVolumeCapabilityAccessModes stores volume access modes.
Expand Down

0 comments on commit 5ac3f1e

Please sign in to comment.