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

6 commits

Author SHA1 Message Date
Sergio Rubio
3b0f9f50a2 [openstack|storage] added missing mocks 2013-03-05 18:59:46 +01:00
Sergio Rubio
ac9c0ceb40 [openstack|storage] Added support to impersonate other accounts
The patch would allow to impersonate other accounts if you have
an admin role:

     require 'fog'
     require 'pp'

     auth_url = 'https://identity.test.lan/v2.0/tokens'
     user = 'admin@test.lan'
     password = 'secret'

     id = Fog::Identity.new :provider => 'OpenStack',
                            :openstack_auth_url => auth_url,
                            :openstack_username => user,
                            :openstack_api_key  => password

     st = Fog::Storage.new :provider => 'OpenStack',
                           :openstack_auth_url => auth_url,
                           :openstack_username => user,
                           :openstack_api_key  => password

     id.tenants.each do |t|
       puts "Changing account to #{t.name}"
       st.change_account "AUTH_#{t.id}"
       # list account containers
       pp st.directories
       # We could also head the account and get usage information
       pp st.request :method => 'HEAD'
     end
2013-03-05 18:46:11 +01:00
Sergio Rubio
df225b2f21 [openstack|storage] replace 'object_store' service type with 'object-store'
See #1496
2013-01-28 21:46:32 +01:00
Sergio Rubio
31a3bfa2fe [openstack|storage] added openstack_tenant and openstack_region params
Added openstack_tenant and openstack_region as recognized parameters
and pass them to OpenStack.authenticate_v2.
2013-01-28 16:38:23 +01:00
Sergio Rubio
bab6f73a68 [openstack|storage] configurable service_type and service_name
- openstack_service_type defaults to object_storage
- openstack_service_name defaults to nil

refs #1496
2013-01-28 14:35:29 +01:00
Sergio Rubio
9ace35ce5f [openstack|storage] intial import
Porting Fog Rackspace Storage service to OpenStack.
Mostly replaced names, removed CDN stuff (perhaps Rackspace specific)
and used authenticate_v2 (keystone).
2013-01-23 20:26:17 +01:00