Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2211)

Issue 23380045: Migrate ssh-based CLI commands to API

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by axw
Modified:
10 years, 5 months ago
Reviewers:
mp+194438, wallyworld
Visibility:
Public.

Description

Migrate ssh-based CLI commands to API Two new client API methods are introduced: - ServiceCharmRelations - PublicAddress ServiceCharmRelations returns the names of all charm relations for the given service. This method is used to validate hook names for debug-hooks. PublicAddress takes a string, which must be either a machine ID or unit ID. The call will return the machine or unit's public address, or an error if the entity does not have one. The ssh-based commands (ssh, scp, debug-log and debug-hooks) now use these methods instead of going directly to state. The one major change is that, previously, they used the instance.Instance.WaitDNSName method to get a host address. We now use PublicAddress, which is populated by the machine-agent's address updater. Note that debug-log does not use any new log-specific API; that is a much larger task, and out of scope here. https://code.launchpad.net/~axwalk/juju-core/lp1246983-cli-api-ssh/+merge/194438 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 8

Patch Set 2 : Migrate ssh-based CLI commands to API #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -89 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/debughooks.go View 1 4 chunks +21 lines, -23 lines 0 comments Download
M cmd/juju/debughooks_test.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/scp.go View 2 chunks +2 lines, -3 lines 0 comments Download
M cmd/juju/scp_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/ssh.go View 1 4 chunks +46 lines, -56 lines 0 comments Download
M cmd/juju/ssh_test.go View 1 2 chunks +60 lines, -4 lines 0 comments Download
M state/api/client.go View 1 2 chunks +17 lines, -0 lines 0 comments Download
M state/api/params/params.go View 1 chunk +20 lines, -0 lines 0 comments Download
M state/apiserver/client/client.go View 3 chunks +48 lines, -0 lines 0 comments Download
M state/apiserver/client/client_test.go View 1 2 chunks +73 lines, -0 lines 0 comments Download

Messages

Total messages: 4
axw
Please take a look.
10 years, 5 months ago (2013-11-08 03:03:06 UTC) #1
wallyworld
LGTM with the test issues fixed. I'd also like to see a test whereby the ...
10 years, 5 months ago (2013-11-08 03:32:09 UTC) #2
axw
Please take a look. https://codereview.appspot.com/23380045/diff/1/cmd/juju/debughooks.go File cmd/juju/debughooks.go (right): https://codereview.appspot.com/23380045/diff/1/cmd/juju/debughooks.go#newcode61 cmd/juju/debughooks.go:61: results, err := c.apiClient.ServiceCharmRelations(service) On ...
10 years, 5 months ago (2013-11-08 04:53:09 UTC) #3
wallyworld
10 years, 5 months ago (2013-11-08 05:01:04 UTC) #4
Great thanks :-)
Still LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b