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

26 commits

Author SHA1 Message Date
Greg Blomquist
25fbf06bf4 Update the Openstack Storage service type
Change the Openstack Storage service (Swift) openstack_service_type default value from
"object-store" to ["object-store"].

The problem with "object-store" as an openstack_service_type is that if the
Swift service is unavailable, the authenticate_v2 method will attempt to call:

    service_type.join ", "

This will fail for anything that isn't an array.

Changing the openstack_service_type to an array solves this problem.
Additionally, it keeps the openstack_service_type consistent with all of the
other Openstack services' openstack_service_type default values.

https://github.com/fog/fog/issues/3112
2014-08-15 15:16:43 -04:00
Paul Thornthwaite
2e0b7e545a Standardise empty lines throughout codebase
Done with `rubocop --auto-correct --only EmptyLineBetweenDefs,EmptyLines,EmptyLinesAroundBody`
2014-05-26 14:20:02 +01:00
Evan Light
94a881905f [OpenStack] Use JSON instead of XML
Current implementation will fail of OpenStack is required
by itself because of Fog::XML::Connection.  Prefer to use
JSON in any event. Replaced with Fog::Core::Connection.
2014-04-09 12:00:38 -04:00
Paul Thornthwaite
0e1daf3ddd [GH-2711] Replace Fog::Connection with XML shim
Unlike last attempt this replaces Fog::Connection with
Fog::XML::Connection which should be directly compatible.

Fog::Connection is there for old PRs but should be removed real soon.

Providers using JSON should be able to replace "XML" with "Core" within
their code to cut down on the dependency.

If I get the time I may attempt to clean up some but testing with Mock
will mean that is mostly educated guesswork.
2014-02-27 00:54:17 +00:00
Paul Thornthwaite
5007aac401 Revert "[core] Replace Fog::Connection with stable version"
This reverts commit 7ee3535d99.
2014-02-26 09:52:02 +00:00
Paul Thornthwaite
7ee3535d99 [core] Replace Fog::Connection with stable version
Fog::Connection mixed in XML parsing via the `parser` argument which
wasn't much use for the majority of APIs using JSON.

This adds the deprecation warning and attempts to update providers to
the correct version of Connection that they need.

Either the cleaner `Fog::Core::Connection` or if reliant on the XML
parsing still `Fog::XML::SAXParserConnection`

The SAX parser will be moving to `fog/xml` fairly soon.
2014-02-25 21:42:34 +00:00
Paul Thornthwaite
a72433d2f8 Remove duplicate requires from services
Following work on reorganising the requires, there was an inconsistent
approach to where service wrappers are required. (Fog::Compute...)

Since they should be standardised and shared across providers (although
they really aren't yet) they have been moved to `fog-core` gem.

Each provider has their own `lib/fog/{provider}/core` files that is
required by each of their services. These files should all require
`fog/core` which already required most or these.

So this removes the extra cases to concentrate them in core.
2014-02-13 17:44:48 +00:00
Lance Ivy
1cdd969a34 create core for each provider. keep load hook for provider. 2014-02-01 21:13:17 -05:00
bugagazavr
52869830f1 get non capitalized content-type 2014-01-24 00:13:30 +04:00
Kyle Rames
6324e9c0ca [openstack|storage] adding missing request methods to Storage service. 2013-11-20 14:47:43 -06:00
Brian D. Burns
fe2b2d9f30 [openstack] remove :host from Excon request params 2013-10-11 11:45:38 -04:00
Brian D. Burns
56c28d2cb2 [openstack|storage] add #put_dynamic_obj_manifest
Renames the current #put_object_manifest method to better differentiate
this from the new #put_static_obj_manifest method. #put_object_manifest
has been retained for backward compatibility.
2013-09-29 18:43:12 +00:00
Brian D. Burns
d3ac285625 [openstack|storage] add methods for SLO support
Adds #put_static_obj_manifest and #delete_static_large_object methods.
2013-09-29 18:37:41 +00:00
Brian D. Burns
912760e735 [openstack|storage] add #delete_multiple_objects 2013-09-29 18:34:23 +00:00
Brian D. Burns
c97c566277 [openstack|storage] add default Accept header 2013-09-29 18:33:24 +00:00
Brian D. Burns
921766c753 [openstack|storage] remove deprecated response block from request 2013-09-24 13:27:21 -04:00
Brian D. Burns
4ea463eb7b require mime/types in Fog::Storage 2013-08-27 20:43:49 -04:00
Wesley Beary
aa0f162512 Merge pull request #2052 from snoopie/openstack_legacy_v1_auth
Allow legacy v1 auth for OpenStack
2013-08-15 12:34:21 -07:00
Yauheni Kryudziuk
3ae372d847 Allow v1 auth for OpenStack 2013-08-15 08:48:13 +02:00
Yauheni Kryudziuk
06778fb112 [openstack|storage] Added temporary signed URL support 2013-08-14 10:24:40 +02:00
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