Sha256: ca7e06a98f5d77675c4dc6a17fa64c05ca4a3fb785c7a2eee10f9034aaedc988

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

class Base::DestroyMachine
  include Interactor

  # @param client
  # @param action_handler
  # @param machine_spec
  def call
    machine_id = context.machine_spec.reference["server_id"]
    context.action_handler.perform_action "Destroy machine #{machine_id}\n" do
      # delete all disks too
      context.client.delete("server/#{machine_id}")
      context.machine_spec.reference = nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chef-provisioning-upcloud-0.2.0 lib/chef/provisioning/interactors/base/destroy_machine.rb