mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
util: add GroupControllerGetCapabilities RPC
added GroupControllerGetCapabilities RPC to the default controller server which returns the group capabilities which are already set. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
aa39b3dc1f
commit
12bd269d5b
@ -47,3 +47,19 @@ func (cs *DefaultControllerServer) ControllerGetCapabilities(
|
||||
Capabilities: cs.Driver.capabilities,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// GroupControllerGetCapabilities implements the default
|
||||
// GroupControllerGetCapabilities GRPC callout.
|
||||
func (cs *DefaultControllerServer) GroupControllerGetCapabilities(
|
||||
ctx context.Context,
|
||||
req *csi.GroupControllerGetCapabilitiesRequest,
|
||||
) (*csi.GroupControllerGetCapabilitiesResponse, error) {
|
||||
log.TraceLog(ctx, "Using default GroupControllerGetCapabilities")
|
||||
if cs.Driver == nil {
|
||||
return nil, status.Error(codes.Unimplemented, "Group controller server is not enabled")
|
||||
}
|
||||
|
||||
return &csi.GroupControllerGetCapabilitiesResponse{
|
||||
Capabilities: cs.Driver.groupCapabilities,
|
||||
}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user