Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Link and Unlink Subnet to an interface #33
Conversation
howbazaar
added some commits
Apr 11, 2016
mjs
reviewed
Apr 13, 2016
| + | ||
| + response, err := readInterface(i.controller.apiVersion, source) | ||
| + if err != nil { | ||
| + return errors.Trace(err) |
howbazaar
Apr 13, 2016
Owner
No, because the errors returned out of readInterface are already one of the local types.
mjs
reviewed
Apr 13, 2016
| + | ||
| + response, err := readInterface(i.controller.apiVersion, source) | ||
| + if err != nil { | ||
| + return errors.Trace(err) |
mjs
reviewed
Apr 13, 2016
| + } | ||
| + } | ||
| + if link == nil { | ||
| + return errors.NotValidf("unlinked Subnet") |
mjs
Apr 13, 2016
is this the right error text? An error here means that the subnet is linked to this interface but the error message implies the subnet isn't linked at all.
howbazaar
Apr 13, 2016
Owner
If we couldn't find a link with the specified subnet, then the error text is "unlinked Subnet not valid".
It isn't valid to unlink a subnet that isn't linked. Alternatively, we could just succeed ?
mjs
reviewed
Apr 13, 2016
| + if subnet == nil { | ||
| + return errors.NotValidf("missing Subnet") | ||
| + } | ||
| + var link Link |
mjs
commented
Apr 13, 2016
|
LGTM - just little things |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-gomaasapi |
jujubot
merged commit 31141c5
into
juju:master
Apr 13, 2016
howbazaar
deleted the
howbazaar:link-subnet
branch
Apr 13, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
howbazaar commentedApr 12, 2016
No description provided.