Fog::Compute[:openstack].images.all returns nil without the patch.
The patch should bring the images collection behaviour in-line with
other collections I think.
The added test should expose the issue.
Updates the OpenStack compute server model so that it stores/handles
metadata correctly on Server create again.
This was a regression from 21499d8 (and should properly handle the
concern there too).
Includes an update to the test that fails without these fixes.
The following patch adds the following missing attributes:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| provider:network_type | gre |
| provider:physical_network | |
| provider:segmentation_id | 1 |
| router:external | False |
+---------------------------+--------------------------------------+
Not sure if the code style I've used for the attributes is OK though,
I did it so I don't break the 80 col. barrier.
Added also a small test for the new and existing attributes.
Updates to the OpenStack identity tests to they pass in both real
and mock modes.
Also, fixes an issue in the delete_user_role request where it
was expecting 200 instead of 204 (which seems to match the
spec and implementation).
Updates the get_limits request Mock and test so that it includes the
new totalFloatingIpsUsed limit.
Also, drops the totalKeyPairsUsed limit since it is no longer used
since https://bugs.launchpad.net/nova/+bug/1089877.
Issue #1477 conceals a bug in the #formats helper that allowed this to
pass such that the response of #delete_user_role does not match the
declared schema.
Response when mocked is an empty String which does not match the
declared schema of a Hash.
This patch updates the OpenStack auth implementation so that
it supports selecting API service by both 'name' and 'type'.
Previously the implementation was confusing because it
used a config param called :openstack_service_name to
select the service 'type' from the catalog. This patch
swaps it so that :openstack_service_name actually selects
by 'name'.
The previous logic to select service by type ('compute' for example)
has been preserved in a new :openstack_service_type parameter.
This option is used just as it was before for backwards compatability.
This change is potentially breaking for anyone previously using
:openstack_service_name (which I don't think is that common but is
possible). As such we should probably make a release note saying
that previous users of :openstack_service_name should migrate to
use :openstack_service_type instead.
Fixes an exception class name error for the custom
OpenStack ServiceUnavailable exception. Previously the wrong
class name was being used.
Also cleans up and simplifies some other exceptions in the OpenStack
implementation. (We can simply use NotFound from Fog::Errors instead)
Added default security group to the OpenStack compute mocks.
OpenStack server creation mock now stores the security groups for the
created server.
OpenStack security group mock deletion now deletes created security
groups.
OpenStack security group mock list now accepts a server id like the real
implementation.
Updates to the OpenStack server tests to get things running in *real*
test mode.
This patch also adds some useful helper functions which
are now used to:
-get the flavor ref for testing
-get the image ref for testing
-get the resize flavor ref for testing (defaults to flavor + 1)
-disable password testing (not all hypervisors support this in OS)
Previously the mocks would return the same data as list_servers_detail.
OpenStack does not return all of this data so you must reload a server
after creation to get the necessary data when using fog for real.
Now the mock returns the same detail as the real call with the extra
detail stored in the mock data for retrieval by list_servers_detail.
Altered the paths for EC2 credential requests to remove an extra / in
the request URIs.
Altered Fog::Open::Identity::Real#request to retry only once when given
a 401 error response code. The EC2 API returns 401 when attempting to
fetch nonexistent EC2 credentials instead of something sensible like
404, leading to an infinite loop. Also, the "Bad username or password"
check was removed. My version of OpenStack does not return this message
when a token is expired, but returns the same message as for a missing
EC2 credential.
This wraps API discovered from python-keystoneclient that allows CRUD
for EC2 credentials for an OpenStack service. Unfortunately I haven't
been able to find documentation for this API.
Previously a NoMethodError would be raised giving no information about
what was missing. Now an appropriate exception with a useful message is
returned.
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.
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).