Merge lp:~axwalk/juju-core/lp1246983-cli-api-ssh into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Andrew Wilkins |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2040 |
Proposed branch: | lp:~axwalk/juju-core/lp1246983-cli-api-ssh |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
615 lines (+289/-89) 10 files modified
cmd/juju/debughooks.go (+21/-23) cmd/juju/debughooks_test.go (+2/-2) cmd/juju/scp.go (+2/-3) cmd/juju/scp_test.go (+1/-1) cmd/juju/ssh.go (+46/-56) cmd/juju/ssh_test.go (+60/-4) state/api/client.go (+17/-0) state/api/params/params.go (+20/-0) state/apiserver/client/client.go (+48/-0) state/apiserver/client/client_test.go (+72/-0) |
To merge this branch: | bzr merge lp:~axwalk/juju-core/lp1246983-cli-api-ssh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+194438@code.launchpad.net |
Commit message
Migrate ssh-based CLI commands to API
Two new client API methods are introduced:
- ServiceCharmRel
- PublicAddress
ServiceCharmRel
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.
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.
Description of the change
Migrate ssh-based CLI commands to API
Two new client API methods are introduced:
- ServiceCharmRel
- PublicAddress
ServiceCharmRel
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.
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.
Reviewers: mp+194438_ code.launchpad. net,
Message:
Please take a look.
Description:
Migrate ssh-based CLI commands to API
Two new client API methods are introduced: ations
- ServiceCharmRel
- PublicAddress
ServiceCharmRel ations 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 Instance. WaitDNSName method to get
and debug-hooks) now use these methods instead
of going directly to state. The one major
change is that, previously, they used the
instance.
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)
Please review this at https:/ /codereview. appspot. com/23380045/
Affected files (+205, -83 lines): debughooks. go debughooks_ test.go ssh_test. go params/ params. go /client/ client. go /client/ client_ test.go
A [revision details]
M cmd/juju/
M cmd/juju/
M cmd/juju/scp.go
M cmd/juju/ssh.go
M cmd/juju/
M state/api/client.go
M state/api/
M state/apiserver
M state/apiserver