There seems to be a difference in results coming from these two:
export FOG_MOCK=true && bundle exec shindont +openstack
FOG_MOCK=true shindo tests/openstack/requests/compute/security_group_tests.rb
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
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.
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 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.
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.
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.
Updates the OpenStack flavors model/request/and tests so
that they support the latest upstream flavor extensions in
Nova Folsom.
Also updated the Fog tests so they pass with both mocks and reals
(tested against OpenStack deployed on Fedora).
No longer need to read in `lib/fog` to access the VERSION mostly because
we are already requiring it anyway in the Rakefile!
The #version method just repeats Fog::VERSION
`rake -T` works and changelog generates
Now available within "fog/core"
Just reverted a change where depending on Fog::VERSION for the
User-Agent made a dependency on requiring "lib/fog" which also requires
all providers and services.
That is highly undesirable from a modular perspective!
This reverts commit a07f3203a6.
The change made a dependency on Fog::VERSION which is defined in
`lib/fog` forcing more of the system to be loaded in some cases.
Github issue #1310