lp:~wallyworld/goose/service-double-improvements
- Get this branch:
- bzr branch lp:~wallyworld/goose/service-double-improvements
Branch merges
- The Go Language Gophers: Pending requested
-
Diff: 2264 lines (+761/-637)26 files modifiedclient/local_test.go (+15/-22)
identity/legacy_test.go (+3/-3)
identity/userpass_test.go (+5/-5)
nova/local_test.go (+12/-32)
swift/local_test.go (+12/-28)
testservices/cmd/main.go (+4/-3)
testservices/identityservice/identityservice.go (+11/-5)
testservices/identityservice/legacy.go (+17/-9)
testservices/identityservice/legacy_test.go (+3/-2)
testservices/identityservice/service_test.go (+3/-3)
testservices/identityservice/userpass.go (+18/-17)
testservices/identityservice/userpass_test.go (+17/-22)
testservices/identityservice/users.go (+63/-0)
testservices/identityservice/util.go (+4/-2)
testservices/novaservice/service.go (+46/-24)
testservices/novaservice/service_http.go (+16/-9)
testservices/novaservice/service_http_test.go (+343/-334)
testservices/novaservice/service_test.go (+16/-17)
testservices/openstack/openstack.go (+38/-0)
testservices/service.go (+21/-0)
testservices/swiftservice/service.go (+46/-8)
testservices/swiftservice/service_http.go (+13/-7)
testservices/swiftservice/service_http_test.go (+14/-9)
testservices/swiftservice/service_test.go (+8/-7)
testservices/swiftservice/swiftservice.go (+0/-40)
tools/secgroup-delete-all/main_test.go (+13/-29)
Branch information
Recent revisions
- 48. By Ian Booth
-
Use nova service doubles in nova tests
This branch plugs the nova service doubles into the nova live tests and makes everything work.
So now, in the nova package, "go test -gocheck.v" runs the tests against the doubles, and
"go test -gocheck.v -live" uses an Openstack instance.Also, the rate limit retry test is now only run locally against the service doubles, where a special
request is used to trigger a rate limit service response. This replaces the previous test which
hammered a real Openstack instance to try and induce a rate limit response.A few things needed to be done, and as a result of implementation changes to the service doubles,
changes were also needed for the service double unit tests.Viewing highlights:
1. Default security group
A real Openstack instance always has a default security group. The nova double and associated unit tests were modified
accordingly.2. Out of the box flavours
The real Openstack instance used for testing has flavours defined out of the box. The live tests assume this behaviour
so the test double needed to be modifed to match.3. Response changes
Some changes were required to certain response data eg creating a security group rule
4. ** This issue will need a follow up change **
The security group rule response contains a SecurityGroupRef struct:
type SecurityGroupRule struct {
FromPort *int `json:"from_port"` // Can be nil
IPProtocol *string `json:"ip_protocol" ` // Can be nil
ToPort *int `json:"to_port"` // Can be nil
ParentGroupId int `json:"parent_ group_id" `
IPRange map[string]string `json:"ip_range"` // Can be empty
Id int
Group SecurityGroupRef
}The was defined as a pointer ie Group *SecurityGroupRef.
However, nova double tests which do a DeepEquals to compare security group rules
fail because the pointer deferencing isn't done. So to make stuff work, I've
used a struct value instead and use the zeroSecurityGroupRef pattern as used
on the ec2 side. This isn't desirable and should be looked at. But if we are
prepared to go with it for now, it can be fixed in a followup branch. BTW, nothing
uses this attribute value so the change should not break juju core.R=dimitern, jameinel
CC=
https://codereview. appspot. com/7098074 - 47. By Martin Packman
-
Introduce container ACLs
The purpose of this branch is to support Swift container ACLs, allowing a
public container to be set up to store the juju tools. Containers which are
public do not require authorisation tokens, and the setup workflow for
accessing the container is different.For a private container, the OpenStack client authenticates in order to not
only get the authorisation token, but also the URLs used to access the
various service end points (incl swift).For public containers, we just want to be able to nominate the swift URL
directly.So the OpenStack client implementation has been split into authenticating
and nonauthenticating variants. Authenticating clients are initialised with
user credentials as before. Unauthenticating clients are given a base URL.
The swift client doesn't care whether it is initialised with a public or
authenticating connection to OpenStack; it works the same either way, but
operations which are forbidden by the ACL will return a 401. - 46. By Dimiter Naydenov
-
nova double: list server filters and run server.
Implemented filters by status and name (others not implemented, but
probably also not needed), as well as creating a server (RunServer).Added a few needed things: serverByName and generateUUID + tests.
With this, the nova double will be up-to-date with the nova client
and functional.R=fwereade, rog
CC=
https://codereview. appspot. com/7073060 - 45. By Dimiter Naydenov
-
Improved documentation and comments.
I took an old branch of mine with some more comments merged them into the current state of trunk.
Old branch is at:
https://code.launchpad .net/~dimitern/ goose/client- refactoring/ +merge/ 134873
(but I'll remove it, once this lands).R=jameinel
CC=
https://codereview. appspot. com/6968051 - 44. By John A Meinel
-
goose: make nova compatible with novaservice
Expose SetupHTTP, since that seems to be how the service is meant to be used.
Change the error classes to not use global state, but instead grab the values
from the new '*Nova' attribute. The static errors won't have one, but that
didn't break any tests. Either the testing is incomplete, or the point where
we rewrap any errors into an actual error is handling it correctly.
Change lbox.check so that we know 'go build ./...' is happy, so we will
be less likely to run into this in the future.
Note that none of the 'local_tests' actually used the nova double, so
having it 'working' is a bit of a misnomer. It just builds, it wasn't
being used anyway.R=wallyworld
CC=
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:~gophers/goose/trunk