Class: Bosh::Director::DeploymentPlan::PlacementPlanner::BruteForceIpAllocation

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/deployment_plan/placement_planner/bruteforce_ip_allocation.rb

Defined Under Namespace

Classes: AllocatedIps, PreviousAssignment

Instance Method Summary collapse

Constructor Details

#initialize(networks_to_static_ips) ⇒ BruteForceIpAllocation

Returns a new instance of BruteForceIpAllocation.



8
9
10
# File 'lib/bosh/director/deployment_plan/placement_planner/bruteforce_ip_allocation.rb', line 8

def initialize(networks_to_static_ips)
  @networks_to_static_ips = networks_to_static_ips
end

Instance Method Details

#find_best_combinationObject



12
13
14
15
# File 'lib/bosh/director/deployment_plan/placement_planner/bruteforce_ip_allocation.rb', line 12

def find_best_combination
  allocated_ips = AllocatedIps.new
  try_combination(@networks_to_static_ips, allocated_ips)
end