diff --git a/lib/fog/openstack/image.rb b/lib/fog/openstack/image.rb index 76c7a2a1e..74eec7f07 100644 --- a/lib/fog/openstack/image.rb +++ b/lib/fog/openstack/image.rb @@ -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