Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Add commands for workspace providers#238

Merged
f0ssel merged 1 commit intomasterfromcli-wp
Feb 5, 2021
Merged

Add commands for workspace providers#238

f0ssel merged 1 commit intomasterfromcli-wp
Feb 5, 2021

Conversation

f0ssel
Copy link
Contributor

@f0sself0ssel commentedFeb 5, 2021
edited
Loading

This adds create, list, and delete functionality of workspace providers to coder-cli. The functionality is bare bones in this iteration and will be augmented with more documentation, especially around the provider creation flow, in a future pr.

➜  coder git:(cli-wp) ✗ go run main.go providers create test-2ID                                   Name      Status    EnvproxyToken                        601dc1e2-be83c6116b11dc4507db5f21    test-2              601dc1e2-be4362804a91d8cb4450ec21  ➜  coder git:(cli-wp) ✗ go run main.go providers ls           Name      Status     Cluster Address                                     Namespace    Storage Class    Cluster Domain Suffix    Access URL                Devurl Host    SSH Enabled    Namespace Allowlist    local     ready      https://kubernetes.default.svc.cluster.local:443    f0ssel                        .svc.cluster.local       http://104.154.100.117                   true           []                     test-1    pending                                                                                                                                                        false          []                     ➜  coder-cli git:(cli-wp) ✗ go run cmd/coder/main.go providers rm test-1 test-2error: failed to remove workspace provider "test-2"  | cause: no workspace provider found by name "test-2"success: removed workspace provider with name "test-1"fatal: 1 failure emittedexit status 1

Status field is empty on the create command until I push my changes in m to add that to the create response.

These commands are hidden for now.

@f0sself0sselforce-pushed thecli-wp branch 3 times, most recently from50a42dc to562619bCompareFebruary 5, 2021 23:18
@f0sself0ssel requested a review fromcmoogFebruary 5, 2021 23:21
}

// DeleteWorkspaceProviderByName deletes a workspace provider entity from the Coder control plane.
func (c *Client) DeleteWorkspaceProviderByName(ctx context.Context, name string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

so forcoder-sdk we should only be using the unique identifiers for our base methods like this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

something like this belongs incoderutil in my view.

return xerrors.Errorf("listing workspace providers: %w", err)
}

egroup := clog.LoggedErrGroup()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

❤️

@f0sself0ssel merged commitb039b93 intomasterFeb 5, 2021
@f0sself0ssel deleted the cli-wp branchFebruary 5, 2021 23:43
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@cmoogcmoogcmoog approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@f0ssel@cmoog

[8]ページ先頭

©2009-2025 Movatter.jp