Class: BeakerHostGenerator::Hypervisor::Interface

Inherits:
Object
  • Object
show all
Defined in:
lib/beaker-hostgenerator/hypervisor.rb

Direct Known Subclasses

ABS, Docker, Hcloud, Lima, Unknown, Vagrant, Vmpooler

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Interface



57
58
59
# File 'lib/beaker-hostgenerator/hypervisor.rb', line 57

def initialize(name)
  @name = name
end

Instance Method Details

#generate_node(_node_info, _base_config, _bhg_version) ⇒ Object

Returns a map of host configuration for a single node.

This will be called for each individual node requested in the hosts specification input.

Any configuration that is required by this hypervisor but is not specific to each node can be put in the global_config map.



92
93
94
# File 'lib/beaker-hostgenerator/hypervisor.rb', line 92

def generate_node(_node_info, _base_config, _bhg_version)
  raise "Method 'generate_node' not implemented!"
end

#global_configObject

Returns a map containing any general configuration required by this hypervisor. This map will be merged into the ‘CONFIG’ section of the final hosts configuration output.

This will only be called if the hypervisor is used for a node, in which case the returned map will be merged in with global configuration from other hypervisors.



68
69
70
# File 'lib/beaker-hostgenerator/hypervisor.rb', line 68

def global_config
  {}
end