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:
parent
d7da8ef3d7
commit
3c8a1e4846
1 changed files with 4 additions and 0 deletions
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue