class Bosh::Director::Jobs::CreateSnapshot
Public Class Methods
job_type()
click to toggle source
# File lib/bosh/director/jobs/create_snapshot.rb, line 7 def self.job_type :create_snapshot end
new(instance_id, options)
click to toggle source
# File lib/bosh/director/jobs/create_snapshot.rb, line 11 def initialize(instance_id, options) @instance = Bosh::Director::Api::InstanceManager.new.find_instance(instance_id) @options = options end
Public Instance Methods
perform()
click to toggle source
# File lib/bosh/director/jobs/create_snapshot.rb, line 16 def perform logger.info("taking snapshot of: #{@instance.job}/#{@instance.index} (#{@instance.vm_cid})") snapshot_cids = Bosh::Director::Api::SnapshotManager.take_snapshot(@instance, @options) "snapshot(s) #{snapshot_cids.join(', ')} created" end