Skip to content

Commit

Permalink
Fix call to get_targets_for_source in allowed_cloud_networks
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Jan 18, 2018
1 parent 257ae38 commit 3eb218e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def allowed_cloud_subnets(_options = {})

def allowed_cloud_networks(_options = {})
return {} unless (src = provider_or_tenant_object)
targets = get_targets_for_source(src, :cloud_filter, CloudNetwork, 'cloud_networks')
targets = get_targets_for_source(src, :cloud_filter, CloudNetwork, 'all_cloud_networks')
allowed_ci(:cloud_network, [:availability_zone], targets.map(&:id))
end

Expand Down Expand Up @@ -95,7 +95,7 @@ def availability_zone_to_cloud_network(src)
hash[cn.id] = cn.name
end
else
load_ar_obj(src[:ems]).cloud_subnets.collect(&:cloud_network).each_with_object({}) do |cn, hash|
load_ar_obj(src[:ems]).all_cloud_networks.each_with_object({}) do |cn, hash|
hash[cn.id] = cn.name
end
end
Expand Down

0 comments on commit 3eb218e

Please sign in to comment.