Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/inspect/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Examples:
if _, ok := conf.AuthInfos[authName]; !ok {
return errors.New("credentials missing! Please run 'tcli login' to authenticate")
}
c.SetToken(conf.AuthInfos[authName].Token)
c.SetInsecure(insecureSkipVerify)
c.(*client.RestClient).SetToken(conf.AuthInfos[authName].Token)
c.(*client.RestClient).SetInsecure(insecureSkipVerify)

// Check if there is a namespace set in the context that we can use so that we don't have to specify the --namespace flag
if _, ok := conf.Contexts[contextName]; ok && len(tanzuNamespace) == 0 {
Expand Down
12 changes: 6 additions & 6 deletions cmd/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Examples:
if _, ok := conf.AuthInfos[authName]; !ok {
return errors.New("credentials missing! Please run 'tcli login' to authenticate")
}
c.SetToken(conf.AuthInfos[authName].Token)
c.SetInsecure(insecureSkipVerify)
c.(*client.RestClient).SetToken(conf.AuthInfos[authName].Token)
c.(*client.RestClient).SetInsecure(insecureSkipVerify)

// Check if there is a namespace set in the context that we can use so that we don't have to specify the --namespace flag
if _, ok := conf.Contexts[contextName]; ok && len(tanzuNamespace) == 0 {
Expand Down Expand Up @@ -127,7 +127,7 @@ Examples:
return c
}

func listClusters(ctx context.Context, c *client.RestClient, ns string) error {
func listClusters(ctx context.Context, c client.Client, ns string) error {
objs, err := c.Clusters(ctx, ns)
if err != nil {
return err
Expand All @@ -140,7 +140,7 @@ func listClusters(ctx context.Context, c *client.RestClient, ns string) error {
return nil
}

func listReleases(ctx context.Context, c *client.RestClient) error {
func listReleases(ctx context.Context, c client.Client) error {
objs, err := c.ReleasesTable(ctx)
if err != nil {
return err
Expand All @@ -153,7 +153,7 @@ func listReleases(ctx context.Context, c *client.RestClient) error {
return nil
}

func listNamespaces(ctx context.Context, c *client.RestClient, username, password string) error {
func listNamespaces(ctx context.Context, c client.Client, username, password string) error {
err := c.Login(ctx, username, password)
if err != nil {
return err
Expand All @@ -168,7 +168,7 @@ func listNamespaces(ctx context.Context, c *client.RestClient, username, passwor
return nil
}

func listAddons(ctx context.Context, c *client.RestClient) error {
func listAddons(ctx context.Context, c client.Client) error {
objs, err := c.AddonsTable(ctx)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cmd/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Examples:
if err != nil {
return err
}
c.SetInsecure(insecureSkipVerify)
c.(*client.RestClient).SetInsecure(insecureSkipVerify)
err = c.Login(ctx, tanzuUsername, tanzuPassword)
if err != nil {
return err
Expand All @@ -108,7 +108,7 @@ Examples:

authName := fmt.Sprintf("wcp:%s:%s", u.Host, tanzuUsername)
auth := api.NewAuthInfo()
auth.Token = c.Token
auth.Token = c.(*client.RestClient).Token

context := api.NewContext()
context.Cluster = u.Host
Expand Down
Loading