diff options
Diffstat (limited to 'weed/shell/command_volume_list.go')
| -rw-r--r-- | weed/shell/command_volume_list.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/weed/shell/command_volume_list.go b/weed/shell/command_volume_list.go index 971e18f10..5be5be569 100644 --- a/weed/shell/command_volume_list.go +++ b/weed/shell/command_volume_list.go @@ -22,16 +22,19 @@ func (c *commandVolumeList) Help() string { return "# list all volumes" } -func (c *commandVolumeList) Do(args []string, commandEnv *commandEnv, writer io.Writer) error { - - resp, err := commandEnv.masterClient.VolumeList(context.Background()) +func (c *commandVolumeList) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) { + var resp *master_pb.VolumeListResponse + ctx := context.Background() + err = commandEnv.masterClient.WithClient(ctx, func(client master_pb.SeaweedClient) error { + resp, err = client.VolumeList(ctx, &master_pb.VolumeListRequest{}) + return err + }) if err != nil { return err } writeTopologyInfo(writer, resp.TopologyInfo) - return nil } |
