Class: Bosh::Director::Errand::DeploymentPreparer

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/errand/deployment_preparer.rb

Instance Method Summary collapse

Constructor Details

#initialize(deployment, job, event_log, base_job) ⇒ DeploymentPreparer

Returns a new instance of DeploymentPreparer.

Parameters:



7
8
9
10
11
12
# File 'lib/bosh/director/errand/deployment_preparer.rb', line 7

def initialize(deployment, job, event_log, base_job)
  @deployment = deployment
  @job = job
  @event_log = event_log
  @base_job = base_job
end

Instance Method Details

#prepare_deploymentObject



14
15
16
17
18
19
20
21
22
# File 'lib/bosh/director/errand/deployment_preparer.rb', line 14

def prepare_deployment
  assembler = DeploymentPlan::Assembler.new(@deployment)

  preparer = DeploymentPlan::Preparer.new(@base_job, assembler)
  preparer.prepare

  compiler = PackageCompiler.new(@deployment)
  compiler.compile
end

#prepare_jobObject



24
25
26
27
# File 'lib/bosh/director/errand/deployment_preparer.rb', line 24

def prepare_job
  @job.bind_unallocated_vms
  @job.bind_instance_networks
end