Class: Kitchen::Driver::Machine

Inherits:
Base
  • Object
show all
Defined in:
lib/kitchen/driver/machine.rb

Overview

Machine driver for Kitchen.

Instance Method Summary collapse

Instance Method Details

#create(state) ⇒ Object

Creates a instance.

Parameters:

  • state (Hash)

    mutable instance state

Raises:

  • (ActionFailed)

    if the action could not be completed



44
45
46
47
48
# File 'lib/kitchen/driver/machine.rb', line 44

def create(state)
  update_state(state)
  instance.transport.connection(state).wait_until_ready
  info("Machine instance #{instance.to_str} ready.")
end

#destroy(state) ⇒ Object

Destroys an instance.

Parameters:

  • state (Hash)

    mutable instance state

Raises:

  • (ActionFailed)

    if the action could not be completed



54
55
56
57
# File 'lib/kitchen/driver/machine.rb', line 54

def destroy(state)
  instance.transport.connection(state).close
  state.delete(:hostname)
end