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

[openstack] Show an error message when there aren't any endpoints available for a region

This commit is contained in:
Ferran Rodenas 2012-12-04 18:46:21 +01:00
parent d7da8ef3d7
commit 3c8a1e4846

View file

@ -118,6 +118,10 @@ module Fog
endpoint['region'] == openstack_region
end if openstack_region
if service['endpoints'].empty?
raise Errors::NotFound.new("No endpoints available for region '#{openstack_region}'")
end if openstack_region
unless service
available = body['access']['serviceCatalog'].map { |endpoint|
endpoint['type']