class Bosh::Director::DeploymentPlan::NetworkPlanner::Planner
Public Class Methods
new(logger)
click to toggle source
# File lib/bosh/director/deployment_plan/network_planner/planner.rb, line 4 def initialize(logger) @logger = logger end
Public Instance Methods
network_plan_with_dynamic_reservation(instance_plan, job_network)
click to toggle source
# File lib/bosh/director/deployment_plan/network_planner/planner.rb, line 8 def network_plan_with_dynamic_reservation(instance_plan, job_network) reservation = Bosh::Director::DesiredNetworkReservation.new_dynamic(instance_plan.instance.model, job_network.deployment_network) @logger.debug("Creating new dynamic reservation #{reservation} for instance '#{instance_plan.instance}'") Plan.new(reservation: reservation) end
network_plan_with_static_reservation(instance_plan, job_network, static_ip)
click to toggle source
# File lib/bosh/director/deployment_plan/network_planner/planner.rb, line 14 def network_plan_with_static_reservation(instance_plan, job_network, static_ip) reservation = Bosh::Director::DesiredNetworkReservation.new_static(instance_plan.instance.model, job_network.deployment_network, static_ip) @logger.debug("Creating new static reservation #{reservation} for instance '#{instance_plan.instance}'") Plan.new(reservation: reservation) end