Class: Bosh::Director::DeploymentPlan::GlobalNetworkResolver

Inherits:
Object
  • Object
show all
Includes:
IpUtil, ValidationHelper
Defined in:
lib/bosh/director/deployment_plan/global_network_resolver.rb

Instance Method Summary collapse

Methods included from IpUtil

#each_ip, #format_ip, #ip_to_i, #ip_to_netaddr

Methods included from ValidationHelper

#safe_property

Constructor Details

#initialize(current_deployment, director_ips, logger) ⇒ GlobalNetworkResolver

Returns a new instance of GlobalNetworkResolver.



13
14
15
16
17
18
# File 'lib/bosh/director/deployment_plan/global_network_resolver.rb', line 13

def initialize(current_deployment, director_ips, logger)
  @current_deployment = current_deployment
  @director_ips = director_ips || []
  @logger = logger
  @range_combiner = CidrRangeCombiner.new
end

Instance Method Details

#reserved_rangesObject



20
21
22
23
24
25
# File 'lib/bosh/director/deployment_plan/global_network_resolver.rb', line 20

def reserved_ranges
  return Set.new unless @current_deployment.using_global_networking?
  combined = reserved_legacy_ranges + director_reserved_ranges
  log_reserved_ranges(combined)
  combined
end