-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controller.AllocateMachine #15
Conversation
@@ -36,7 +37,7 @@ func (*bootResourceSuite) TestReadBootResources(c *gc.C) { | |||
|
|||
func (*bootResourceSuite) TestLowVersion(c *gc.C) { | |||
_, err := readBootResources(version.MustParse("1.9.0"), parseJSON(c, bootResourcesResponse)) | |||
c.Assert(err.Error(), gc.Equals, `no boot resource read func for version 1.9.0`) | |||
c.Assert(err, jc.Satisfies, IsUnsupportedVersionError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't care about the error text here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping it as the error text is good to be human readable and understandable.
Lots of great stuff. LGTM. |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-gomaasapi |
Filter machines Based on unlanded PR #15
Add ReleaseMachines method to the Controller. Based on unlanded PR #15
This branch adds the first of the POST methods, AllocateMachine. This meant there was a bit of churn around the testing http server to handle posts as well as gets, and to read the post form.
I also added a bunch of error types. I'd like all errors returned out of the new interfaces to be one of those errors. I have started by updating the machine and boot-resources parsing methods, but the others can be done as I touch the files again.
Added a helper method to get the ServerError, as it was being used in a bunch of tests.
Updated client_test.go to import gocheck with the "gc" name.
The post API call has been tested interactively with my test maas program. Yay dry run.
Go vet was complaining about Id saying it should be ID, and Cpu to be CPU, so I've updated those.
Also added a helper type to add url values only if they were non-zero.