Class: Bosh::Director::DeploymentPlan::Steps::UpdateStep

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/deployment_plan/steps/update_step.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_job, deployment_plan, multi_job_updater, cloud) ⇒ UpdateStep

Returns a new instance of UpdateStep.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/bosh/director/deployment_plan/steps/update_step.rb', line 5

def initialize(base_job, deployment_plan, multi_job_updater, cloud)
  @base_job = base_job
  @logger = base_job.logger
  @cloud = cloud
  @deployment_plan = deployment_plan
  @multi_job_updater = multi_job_updater
  @vm_deleter = Bosh::Director::VmDeleter.new(@cloud, @logger, false, Config.enable_virtual_delete_vms)
  @disk_manager = DiskManager.new(@cloud, @logger)
  job_renderer = JobRenderer.create
  arp_flusher = ArpFlusher.new
  @vm_creator = Bosh::Director::VmCreator.new(@cloud, @logger, @vm_deleter, @disk_manager, job_renderer, arp_flusher)
end

Instance Method Details

#performObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/bosh/director/deployment_plan/steps/update_step.rb', line 18

def perform
  begin
    @logger.info('Updating deployment')
    assemble
    update_jobs
    @logger.info('Committing updates')
    @deployment_plan.persist_updates!
    @logger.info('Finished updating deployment')
  ensure
    @deployment_plan.update_stemcell_references!
  end
end