util: change member cap of CSIDriver struct

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2020-10-21 13:02:19 +05:30 committed by mergify[bot]
parent 25617929f0
commit 5ac3f1e29e
2 changed files with 6 additions and 6 deletions

View File

@ -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
}

View File

@ -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
@ -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
}
@ -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.