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

[openstack|image] Check for glance version (fog only supports v1)

This commit is contained in:
Ferran Rodenas 2013-03-05 13:16:38 +01:00
parent c3dac20b6d
commit b52d8912f9

View file

@ -206,6 +206,10 @@ module Fog
@host = uri.host @host = uri.host
@path = uri.path @path = uri.path
@path.sub!(/\/$/, '') @path.sub!(/\/$/, '')
unless @path.match(/v1(\.1)*/)
raise Fog::OpenStack::Errors::ServiceUnavailable.new(
"OpenStack binding only supports version 1.1 (a.k.a. 1)")
end
@port = uri.port @port = uri.port
@scheme = uri.scheme @scheme = uri.scheme
true true