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

13 commits

Author SHA1 Message Date
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
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
Joshua Garnett
b4eae8b13c Fixing [excon][WARNING] Invalid Excon request keys log noise when trying to use STS 2014-02-13 21:01:02 -05:00
Lance Ivy
1cdd969a34 create core for each provider. keep load hook for provider. 2014-02-01 21:13:17 -05:00
Caleb Tennis
d521b84889 [aws|sts] Add support for the AssumeRole STS method. Also enable the ability for the STS
service to use IAM profiles to grab credentials off the EC2 instance, as is in place
          for the other AWS services.
2013-07-16 09:23:38 -04:00
James Bence
7fb0e3753e Refactor error handling
Match against the error object in both the old (against error.message)
and the new (against error.response.body); return a hash from this
method.

In the rescue block, try hard to raise an exception that includes the
code and message extracted from the error.
2013-07-02 19:39:23 -07:00
James Bence
b7b8367770 Inspect error.response.body, not error.message
Recent versions of excon have a middleware component,
Excon::Middleware::Expects and fog requests mostly record an expectation
of a 200 status code. Some calls to AWS return status other than 200 and
in some cases the error handling obscures the underlying error.

Current handling parsed error.message; this instance of error is
constructed by excon and includes the response as an attribute. The
message is always something like 'Expected(200) <=> Actual(404 Not Found)'
and so the parsing never succeeds.

Instead we now attempt to parse error.response.body which should allow
extraction of the underlying AWS Code value, which in turn will produce
an exception that points to the actual underlying cause.
2013-07-01 16:47:29 -07:00
VirtualStaticVoid
5e3ee29e58 fix for AWS error message parsing 2013-03-22 11:45:05 +02:00
James Herdman
97b16d08d2 Remove absolute path when requiring 2012-05-26 11:27:28 -04:00
Kevin Menard
dcefc2d7de Fixed #875: Loosen multi_json version. 2012-04-25 10:31:28 -04:00
Thom May
0aa2badd9b implement STS support
add support for Federated IAM and session tokens.
2011-11-13 20:16:22 +00:00