Class: Kitchen::Driver::VmpoolStores::BaseStore

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/driver/vmpool_stores/base_store.rb

Direct Known Subclasses

FileBaseStore, VmpoolerStore

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ BaseStore

Returns a new instance of BaseStore.


19
20
21
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 19

def initialize(options = {})
  
end

Instance Method Details

#cleanup(pool_member: nil, pool_name: nil, reuse_instances: false, &block) ⇒ Object

a callback that executes when a pool member has been run

Parameters:

  • pool_member (String) (defaults to: nil)
    • the name of the VM

  • pool_name (String) (defaults to: nil)
    • the name of the pool

  • reuse_instances (Boolean) (defaults to: false)
    • whether or not the VM should be discarded when used

Raises:

  • (NotImplemented)

34
35
36
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 34

def cleanup(pool_member: nil, pool_name: nil, reuse_instances: false, &block)
  raise NotImplemented
end

#take_pool_member(pool_name) ⇒ String

mark them used so nobody else can use it

Parameters:

  • pool_name (String)
    • the name of the pool to yank the memeber from

Returns:

  • (String)
    • a random host from the list of systems

Raises:

  • (NotImplemented)

26
27
28
# File 'lib/kitchen/driver/vmpool_stores/base_store.rb', line 26

def take_pool_member(pool_name)
  raise NotImplemented
end