[openstack|compute] Update Quota Mocks based on Folsom Stable
Basis: https://github.com/openstack/nova/blob/stable/folsom/nova/quota.py#L34 Signed-off-by: Nelvin Driz <firstname.lastname@example.org>
…ixes OpenStack: security group test fixes.
Update the OpenStack security group test to support the correct format for create_security_group responses. This patch removes the extra  wrapping the response and makes it so the real tests run once again. Also updates the existing Mock for create_security_response so it handles it properly as well.
OpenStack: updates to quota tests.
Updates to the OpenStack quota tests to support the latest changes in Folsom/Grizzly. With these changes I am able to run the *real* tests again with the latest upstream OpenStack builds. This change has no functional effect on Fog users for previous releases of OpenStack (Folsom, etc,) but should allow us to support the latest upstream codebase and run Fog *real* tests again.
OpenStack: Remove volumes from limits tests.
Creating user via `Aws.iam.users` ignores `:path`
OpenStack Grizzly no longer supports volumes. This removes the volume settings from the OpenStack limits tests and Mock . This change has will has no effect on users of previous of Fog for previous releases (Folsom, etc) but should allow us to easily support the latest upstream codebase and run Fog *real* tests.
OpenStack floating_ip (aka address) test fixes
[Brightbox] Refresh tokens
This guards the newer tests just added that rely on unimplemented mocks
Moved a lot of helper methods to Shared so that the Mock version of the service is not erroring with missing methods even if requests are not implemented.
A Compute instance encapsulates a connection for a client to the Brightbox API. Users can have multiple accounts but there was no easy way to switch between them when account had to be passed in via the initializer. Now the scoped account can be set on an existing instance which overrides any configured setting but it can be reset if needed. The #request method still can accept `account_id` as an option which again overrides the previous settings. Finally the parameter is now correctly sent as a query string parameter not part of the API request JSON.
Original request method handles missing tokens and the first Unauthorized response by requesting a new access token. This magic can be disruptive for clients so can be disabled by passing in `:brightbox_token_management => false` to the Compute service.
Passing in a refresh token to `Compute#new` will allow the token to be used to request new access tokens as the original authenticated user so the username and password do not have to be stored locally.
* Adds simple helper to get token for service * Low level request #request_access_token is provided to request access tokens
Extracting existing strategies out of Compute
Moving the URL for the authentication endpoint up to the instance level rather than hiding the logic in the method. Eliminate the need for options on a private method. Also cleaned up references to credentials in same method.
Updates to the OpenStack address tests so that: * The tests cleanup after themselves when executed in Real mode. Previously running these tests in Real mode would leak servers and floating IPs. * DRY things up a bit. * Make use of the floating IP we create in subsequent tests. Previously the last floating IP in the full list was used. This could be problematic in some cases. -- Also adds a missing Mock class for the release_address request so that FOG_MOCK tests continue to pass.