Merge lp://staging/~julian-edwards/gwacl/affinity-group into lp://staging/gwacl
Proposed by
Julian Edwards
Status: | Merged |
---|---|
Approved by: | Julian Edwards |
Approved revision: | 180 |
Merged at revision: | 171 |
Proposed branch: | lp://staging/~julian-edwards/gwacl/affinity-group |
Merge into: | lp://staging/gwacl |
Diff against target: |
301 lines (+240/-0) 5 files modified
example/management/run.go (+16/-0) management_base.go (+56/-0) management_base_test.go (+59/-0) xmlobjects.go (+48/-0) xmlobjects_test.go (+61/-0) |
To merge this branch: | bzr merge lp://staging/~julian-edwards/gwacl/affinity-group |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Review via email: mp+173855@code.staging.launchpad.net |
Commit message
Add CreateAffinityG
Description of the change
It turns out that this is needed by vnets, so add all the bumf for AffinityGroup creation, update and deletion.
To post a comment you must log in.
Looks good!
[0]
59 + var err error
60 + url := "affinitygroups/" + request.Name
and
78 + var err error
79 + url := "affinitygroups/" + request.Name
You need to use checkPathCompon ents() to make sure request.Name can be safely used in the url.
[1]
279 +}
280 func (suite *xmlSuite) TestDeployment(c *C) {
Missing an empty line here I think… did you run 'make format'?
[2]
You might want to do this in another branch or in here since it's really tiny but anyway, I'm mentioning it here so that we don't forget: NewCreateHosted ServiceWithLoca tion() needs to be updated to take an affinity group name (AffinityGroup is already a field in the CreateHostedService struct). Then we need to update the call to NewCreateHosted ServiceWithLoca tion() in example/ management/ run.go to take the name of the newly created affinity group. In this branch as it is now, you're creating the affinity group in example/ management/ run.go but the created hosted service is not linked to it.
[3]
36 +type CreateAffinityG roupRequest struct { Group
37 + CreateAffinityGroup *CreateAffinity
38 +}
Not sure if it's really useful but I guess it's more coherent with the other calls to have this intermediate CreateAffinityG roupRequest structure…?
[4]
9 + affinityGroupName := gwacl.MakeRando mHostname( "affinitygroup" )
Why did you use MakeRandomHostn ame() here? AFAIK this is not a hostname is it? Hum, looking at names.go we might want to expose makeRandomIdent ifier() and use that directly.
[5]
165 +//
166 +type CreateAffinityGroup struct {
Maybe include the link to the API documentation in the "docstring"…? Here and in a couple of other places.