mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
util: change member cap
of CSIDriver struct
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
25617929f0
commit
5ac3f1e29e
@ -62,7 +62,7 @@ func (cs *DefaultControllerServer) ControllerGetCapabilities(ctx context.Context
|
|||||||
util.TraceLog(ctx, "Using default ControllerGetCapabilities")
|
util.TraceLog(ctx, "Using default ControllerGetCapabilities")
|
||||||
|
|
||||||
return &csi.ControllerGetCapabilitiesResponse{
|
return &csi.ControllerGetCapabilitiesResponse{
|
||||||
Capabilities: cs.Driver.cap,
|
Capabilities: cs.Driver.capabilities,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@ type CSIDriver struct {
|
|||||||
nodeID string
|
nodeID string
|
||||||
version string
|
version string
|
||||||
// topology constraints that this nodeserver will advertise
|
// topology constraints that this nodeserver will advertise
|
||||||
topology map[string]string
|
topology map[string]string
|
||||||
cap []*csi.ControllerServiceCapability
|
capabilities []*csi.ControllerServiceCapability
|
||||||
vc []*csi.VolumeCapability_AccessMode
|
vc []*csi.VolumeCapability_AccessMode
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCSIDriver Creates a NewCSIDriver object. Assumes vendor
|
// NewCSIDriver Creates a NewCSIDriver object. Assumes vendor
|
||||||
@ -73,7 +73,7 @@ func (d *CSIDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapa
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, capability := range d.cap {
|
for _, capability := range d.capabilities {
|
||||||
if c == capability.GetRpc().GetType() {
|
if c == capability.GetRpc().GetType() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ func (d *CSIDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceC
|
|||||||
csc = append(csc, NewControllerServiceCapability(c))
|
csc = append(csc, NewControllerServiceCapability(c))
|
||||||
}
|
}
|
||||||
|
|
||||||
d.cap = csc
|
d.capabilities = csc
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddVolumeCapabilityAccessModes stores volume access modes.
|
// AddVolumeCapabilityAccessModes stores volume access modes.
|
||||||
|
Loading…
Reference in New Issue
Block a user