1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Darren Hague
847a79bdc7 [openstack] hierarchical projects: Add test to check that a newly added subproject appears in a top-level project's list 2015-07-24 15:04:10 +01:00
Darren Hague
cf76a320af [openstack] hierarchical projects: subtree_as_list and parents_as_list - set subtree and parents attributes as Array of Project instead of Array of Hash. 2015-07-24 11:24:37 +01:00
Darren Hague
ecf4ec15b8 [openstack] Add tests for subtree_as_list and parents_as_list in hierarchical projects
Also enhanced identity service to make the ID of the current user accessible as current_user_id.

Note that the returned lists are empty (even if *_as_ids return values) unless the calling user has a role in the projects - i.e. the only projects returned are those for which the user has a role.
2015-07-16 17:14:22 +01:00
Darren Hague
3edb6b205b [openstack] Add test for subnet creation
Initially the test failed because too many params are set to nil instead of just gateway_ip (see https://github.com/fog/fog/pull/3613) - in fact gateway_ip is the *only* parameter where a null value should be passed to OpenStack.
2015-07-16 14:52:28 +01:00
Darren Hague
aff41b7199 [openstack] Add support for hierarchical projects 2015-07-15 18:21:15 +01:00
Stefan Majewsky
8b68318259 [openstack] add volume transfer models/requests 2015-07-08 15:24:30 +02:00
Stefan Majewsky
acd852083e [openstack] reduce code duplication in volume spec...
...by introducing helper methods for object setup/teardown
2015-07-08 15:24:05 +02:00
Wesley Beary
3c75141851 Merge pull request #3619 from majewsky/openstack-simplify-specs
[openstack] reduce code duplication between specs
2015-07-07 15:10:58 -05:00
Stefan Majewsky
688cb97dea fix test run on JRuby
For reasons that are completely, positively, absolutely, beyond my
understanding, the contain_exactly matcher crashes on JRuby.

The stacktrace indicates that the `@service` member of the `volumes`
collection is somehow reset to `nil`, which I cannot reproduce in any
way outside the contain_exactly matcher.
2015-07-06 14:52:03 +02:00
Stefan Majewsky
0955222b65 [openstack] reduce code duplication between specs
This adds an RSpec.shared_context which contains the code that the
`before :all` blocks of both specs need.

I've merged and simplified the setup logic of both specs. Most
prominently, the environment variable $DEBUG is scrapped. There are only
two execution modes now, controlled by the presence of Openstack
credentials in the environment variables.
2015-07-06 11:33:25 +02:00
Stefan Majewsky
8f8d7da244 add extend_volume request to Fog::Volume::OpenStack 2015-07-03 14:43:53 +02:00
Stefan Majewsky
d60ca52592 test the model create() method instead of the create_volume request
As requested by @dhague, who's comment on the pull-request unfortunately
was trashed by my previous force-push.
2015-06-26 17:11:29 +02:00
Stefan Majewsky
13d7ef3a11 first bits of a spec for Fog::OpenStack::Volume
This has some code duplication with the Fog::Identity::OpenStack::V3
spec right now. I'm going to discuss this with @dhague next week and
consolidate this.
2015-06-26 16:55:05 +02:00
Darren Hague
da3af0d4dd [openstack] Minor bugfixes & cleanups in identity_v3 test code 2015-06-23 17:55:12 +01:00
Ladislav Smola
7d544d467a We need to move all list methods to unified interface, where
only Hash is passed as a first argument. The hash can have
specific fields, that will be recognized and deleted. Rest
of the Hash goes directly to request :query.

Also filtering of options has been deleted, so Fog is now
passing everything, this way we don't have to support changes
in API. Also default values page and per_page has been deleted
because these default values are already set on keystone side.
Default values has been deleted also from recorded VCRs.

This way we can start using the list methods the same. Which
is very important for handling e.g. pagination, filtering,
etc.

All changes are made backwards compatible, with deprecation
warnings, when old interface is used.
2015-06-19 16:51:36 +02:00
Darren Hague
11b9e6b7dd Add missing reference to openstack_project_name & simplify test code a little 2015-06-17 16:40:25 +01:00
Darren Hague
9cffccb803 Fix ruby 1.8.7 failure 2015-06-16 14:20:21 +01:00
Darren Hague
83b61986bd Reintroduce user_domain and project_domain
Refactor - move repetitive code from compute & network to core.
Tweak VCR config and Rakefile to make sure tests are run correctly
2015-06-16 14:20:21 +01:00
Darren Hague
dc8ecca627 Various fixes & tweaks for OpenStack Identity V3 API & related tests 2015-06-16 14:20:20 +01:00
Darren Hague
803dedb297 Fixes #3084: Implement OpenStack Identity V3 API
Fog::Identity::OpenStack.new() will return either a V2 API object or a V3 API object depending on the auth URL
Fog::OpenStack::Core.authenticate switches on the auth URL to call the V2 or V3 authentication API
2015-05-13 12:48:43 +01:00