Skip to content

Commit

Permalink
client: Fix function naming
Browse files Browse the repository at this point in the history
Signed-off-by: Shuo Wu <shuo.wu@suse.com>
  • Loading branch information
shuo-wu authored and David Ko committed Jun 20, 2023
1 parent 415b2a1 commit f3edb26
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/client/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (c *DiskServiceClient) Close() error {
return c.cc.Close()
}

func (c *DiskServiceClient) getControllerServiceClient() rpc.DiskServiceClient {
func (c *DiskServiceClient) getDiskServiceClient() rpc.DiskServiceClient {
return c.service
}

Expand Down Expand Up @@ -86,7 +86,7 @@ func (c *DiskServiceClient) DiskCreate(diskType, diskName, diskUUID, diskPath st
return nil, fmt.Errorf("failed to get disk info: invalid disk type %v", diskType)
}

client := c.getControllerServiceClient()
client := c.getDiskServiceClient()
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
defer cancel()

Expand Down Expand Up @@ -126,7 +126,7 @@ func (c *DiskServiceClient) DiskGet(diskType, diskName, diskPath string) (*api.D
return nil, fmt.Errorf("failed to get disk info: invalid disk type %v", diskType)
}

client := c.getControllerServiceClient()
client := c.getDiskServiceClient()
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
defer cancel()

Expand Down Expand Up @@ -159,7 +159,7 @@ func (c *DiskServiceClient) DiskDelete(diskType, diskName, diskUUID string) erro
return fmt.Errorf("failed to delete disk: missing required parameters")
}

client := c.getControllerServiceClient()
client := c.getDiskServiceClient()
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
defer cancel()

Expand All @@ -176,7 +176,7 @@ func (c *DiskServiceClient) DiskReplicaInstanceList(diskType, diskName string) (
return nil, fmt.Errorf("failed to list replica instances on disk: missing required parameter")
}

client := c.getControllerServiceClient()
client := c.getDiskServiceClient()
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
defer cancel()

Expand Down Expand Up @@ -209,7 +209,7 @@ func (c *DiskServiceClient) DiskReplicaInstanceDelete(diskType, diskName, diskUU
return fmt.Errorf("failed to delete replica instance on disk: missing required parameters")
}

client := c.getControllerServiceClient()
client := c.getDiskServiceClient()
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
defer cancel()

Expand All @@ -225,7 +225,7 @@ func (c *DiskServiceClient) DiskReplicaInstanceDelete(diskType, diskName, diskUU

// VersionGet returns the disk service version.
func (c *DiskServiceClient) VersionGet() (*meta.DiskServiceVersionOutput, error) {
client := c.getControllerServiceClient()
client := c.getDiskServiceClient()
ctx, cancel := context.WithTimeout(context.Background(), types.GRPCServiceTimeout)
defer cancel()

Expand Down

0 comments on commit f3edb26

Please sign in to comment.