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:
parent
c3dac20b6d
commit
b52d8912f9
1 changed files with 4 additions and 0 deletions
|
@ -206,6 +206,10 @@ module Fog
|
|||
@host = uri.host
|
||||
@path = uri.path
|
||||
@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
|
||||
@scheme = uri.scheme
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue