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

36 commits

Author SHA1 Message Date
Sergio Rubio
be9ce8a928 [openstack|identity] Configurable :openstack_endpoint_type
:openstack_endpoint_type is missing as a recognized parameter. This
patch fixes that, and allows the :openstack_endpoint_type to be
configurable instead of hardcoding the value to 'adminURL'

That is, you can create the connection to the service as follows:

require 'fog'

conn = Fog::Identity.new({
:provider => 'OpenStack',
:openstack_api_key => ENV['OS_PASSWORD'],
:openstack_username => ENV["OS_USERNAME"],
:openstack_auth_url => ENV["OS_AUTH_URL"]
:openstack_tenant => ENV["OS_TENANT_NAME"],
:openstack_endpoint_type => 'publicURL', # publicURL, adminURL, etc
})

Defaults to adminURL to maintain backwards compatibility.
2013-01-24 11:38:45 +01:00
Dan Prince
ba26129001 OpenStack auth updates to select by service name.
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.
2012-12-10 07:55:54 -05:00
Nelvin Driz
c054fcb841 [openstack|identity] Update User Role Membership Mocks
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-12-06 14:42:25 +08:00
Eric Hodel
97d50bbeae Added OpenStack EC2 credential management models
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.
2012-12-05 14:27:10 -08:00
Eric Hodel
8c76badfba Add OpenStack EC2 credentials requests.
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.
2012-12-05 14:27:10 -08:00
Nelvin Driz
b6d68a6c8c [openstack] Update Mocks and Cleanup Unused Code
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-12-04 16:11:54 +08:00
Philip Mark M. Deazeta
41b7e330af [openstack|identity] Add attr_accessor :unscoped_token to Mock
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-11-26 22:42:48 +08:00
Philip Mark M. Deazeta
a9fb65985c [openstack] Make use of the unscoped token for reauthentication 2012-11-26 17:23:13 +08:00
Philip Mark M. Deazeta
e908197c66 [opnestack|identity] Added set_tenant request for identity service 2012-11-26 17:14:24 +08:00
Nelvin Driz
adadaf9ef6 [openstack] Refactor Openstack Authentication
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-11-26 17:13:53 +08:00
Dan Prince
794f1159a2 Merge pull request #1142 from grkvlt/accept-headers-openstack
Add Accept header with application/json media type to OpenStack requests
2012-11-13 12:06:24 -08:00
Nelvin Driz
92aed2a18d [openstack|identity] Update Fog Mocks on Authentication, User and Roles
Signed-off-by: Nelvin Driz <nelvindriz@live.com>

Conflicts:
	lib/fog/openstack/identity.rb
	lib/fog/openstack/requests/identity/delete_role.rb
	lib/fog/openstack/requests/identity/list_roles.rb
2012-09-28 15:17:57 +08:00
Nelvin Driz
8f12717d25 [openstack|identity] Update Identity Mocking Process
Signed-off-by: Nelvin Driz <nelvindriz@live.com>

Conflicts:
	lib/fog/openstack/identity.rb
2012-09-28 15:15:16 +08:00
Philip Mark M. Deazeta
609995ccbe [openstack] Fixed mocks for failing shindo tests
reverted back to double quoted string

Conflicts:
	lib/fog/openstack/identity.rb
	lib/fog/openstack/requests/compute/get_volume_details.rb
	lib/fog/openstack/requests/compute/list_security_groups.rb
	lib/fog/openstack/requests/identity/list_tenants.rb
	lib/fog/openstack/requests/image/create_image.rb
	lib/fog/openstack/requests/image/list_public_images.rb
	lib/fog/openstack/requests/image/list_public_images_detailed.rb
	lib/fog/openstack/requests/image/update_image.rb
	tests/openstack/requests/compute/volume_tests.rb
2012-09-28 15:07:38 +08:00
Nelvin Driz
7c72e5394f [openstack] Authentication Mocks
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-09-28 14:41:59 +08:00
Andrew Donald Kennedy
2d4f0fa0db [openstack] Add Accept header with application/json media type to requests 2012-09-12 16:19:21 +03:00
geemus
230c61dad5 [openstack|identity] fixes for mocks 2012-05-28 16:45:22 -05:00
James Herdman
97b16d08d2 Remove absolute path when requiring 2012-05-26 11:27:28 -04:00
Nelvin Driz
530d860a04 [openstack] Fix Authentication as well as Fog::JSON call bugs
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-04-30 10:35:03 +08:00
Nelvin Driz
7b46964770 [openstack] Make current_user and current_token accessible to services
- This is for users with no permission to access keystone admin API

Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-04-30 10:35:03 +08:00
Nelvin Driz
e47c5eb9c4 [openstack|identity] Update Fog to Accomodate Tenant Deletion Workaround
Workflow

Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-04-30 10:35:02 +08:00
Nelvin Driz
92523f763a [openstack] Update mocks for login and identity request #get_user_by_id
Signed-off-by: Nelvin Driz <nelvindriz@live.com>
2012-04-30 10:35:01 +08:00
Nelvin Driz
ae66ab45d7 [openstack] Update Authentication through X-Auth-Token 2012-04-30 10:35:01 +08:00
Philip Mark Deazeta
e38799fc50 [openstack|identity] Added function to add user to a tenant 2012-04-30 10:35:01 +08:00
Alfonso Juan Dillera
df54e750a3 [openstack|identity] Updated current user id for identity 2012-04-30 10:35:01 +08:00
Alfonso Juan Dillera
4b3cb2a984 [openstack|identity] Added current user id 2012-04-30 10:35:00 +08:00
Nelvin Driz
a76c244eba [openstack] Wrong instance variables accessed for #credentials 2012-04-30 10:35:00 +08:00
Nelvin Driz
4910768827 [openstack] Add Export of Credentials 2012-04-30 10:35:00 +08:00
Nelvin Driz
c643bd8e03 [openstack] Update Reinitialization Process of Existing Auth Token 2012-04-30 10:35:00 +08:00
Philip Mark Deazeta
df3c374e33 [openstack] Modify authentication process 2012-04-30 10:35:00 +08:00
Alvin Garcia
b122f0c85e [openstack|identity] Keystone Roles and Users 2012-04-30 10:34:59 +08:00
Alvin Garcia
c623858312 [openstack|identity] Keystone Roles 2012-04-30 10:34:59 +08:00
Nelvin Driz
42d2cb94ec [openstack|identity] Update Tenants (Complete CRUD) 2012-04-30 10:34:59 +08:00
Nelvin Driz
e1c5155a34 [openstack|identity] Update Tenants 2012-04-30 10:34:58 +08:00
Nelvin Driz
3e43a571e0 [openstack|identity] Fix Authentication Implementation 2012-04-30 10:34:58 +08:00
Hunter Nield
330c28c5a8 [openstack|identity] Rough implementation of the Keystone API (untested)
Updated Openstack to handle other endpoints
2012-04-30 10:34:58 +08:00