DescriptionMigrate 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 #
MessagesTotal messages: 4
|