Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
api;apiserver: AllAddresses() added to SSHClient facade (v2) #6468
Conversation
frobware
reviewed
Oct 18, 2016
Somebody else should take a look through this as well. It was awkward to separate out code that I had already reviewed - let's keep the PR's distinct. Less is more.
| -func (facade *Facade) getAddresses(args params.Entities, getter func(SSHMachine) (network.Address, error)) ( | ||
| - params.SSHAddressResults, error, | ||
| +// AllAddresses reports all addresses known to Juju for each given entity in | ||
| +// args. Machines and units are suppored as entity types. Since the returned |
| - params.SSHAddressResults, error, | ||
| +// AllAddresses reports all addresses known to Juju for each given entity in | ||
| +// args. Machines and units are suppored as entity types. Since the returned | ||
| +// addresses are gathered from multiple sources, results can include duplicates. |
| + Results: make([]params.SSHAddressResult, len(args.Entities)), | ||
| + } | ||
| + | ||
| + getterWrapper := func(m SSHMachine) ([]network.Address, error) { |
frobware
Oct 18, 2016
Contributor
In one of the previous functions this was called "getter", make them the same for consistency?
added some commits
Oct 18, 2016
|
!!build!! |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit ab705af
into
juju:develop
Oct 19, 2016
1 check passed
github-check-merge-juju
Built PR, ran unit tests, and tested LXD deploy.
Details
dimitern
deleted the
dimitern:api-sshclient-alladdresses
branch
Oct 19, 2016
dimitern
referenced this pull request
Oct 20, 2016
Merged
lp:1616098: ssh,scp,dh pick reachable address among all #6481
added a commit
that referenced
this pull request
Oct 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dimitern commentedOct 18, 2016
•
Edited 1 time
-
dimitern
Oct 18, 2016
The SSHClient API facade only has methods getting the preferred
public or private addresses of a machine/unit entity. This PR
adds a new AllAddresses() method to the facade, and bumps the
version to 2.
QA Steps (only unit tests):
in the apiserver/ package directories.
and after this PR.
Requires (and includes!) PR #6467 - please review the state/ changes there.
Prerequisite (3/3) to fix bug http://pad.lv/1616098.