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

[openstack] Match both OS API 1.1 and v2 since they are the same.

This commit is contained in:
Josh Kearney 2012-04-23 17:01:56 -05:00 committed by Nelvin Driz
parent 7b46964770
commit d084c7f364

View file

@ -328,6 +328,13 @@ module Fog
@host = uri.host @host = uri.host
@path, @tenant_id = uri.path.scan(/(\/.*)\/(.*)/).flatten @path, @tenant_id = uri.path.scan(/(\/.*)\/(.*)/).flatten
@path.sub!(/\/$/, '')
unless @path.match(/1\.1|v2/)
raise Fog::Compute::OpenStack::ServiceUnavailable.new(
"OpenStack binding only supports version 2 (a.k.a. 1.1)")
end
@port = uri.port @port = uri.port
@scheme = uri.scheme @scheme = uri.scheme
@identity_connection = Fog::Connection.new( @identity_connection = Fog::Connection.new(