Class: BeakerHostGenerator::Hypervisor::Interface
- Inherits:
-
Object
- Object
- BeakerHostGenerator::Hypervisor::Interface
- Defined in:
- lib/beaker-hostgenerator/hypervisor.rb
Instance Method Summary collapse
-
#generate_node(_node_info, _base_config, _bhg_version) ⇒ Object
Returns a map of host configuration for a single node.
-
#global_config ⇒ Object
Returns a map containing any general configuration required by this hypervisor.
-
#initialize(name) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(name) ⇒ Interface
Returns a new instance of Interface.
56 57 58 |
# File 'lib/beaker-hostgenerator/hypervisor.rb', line 56 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.
91 92 93 |
# File 'lib/beaker-hostgenerator/hypervisor.rb', line 91 def generate_node(_node_info, _base_config, _bhg_version) raise "Method 'generate_node' not implemented!" end |
#global_config ⇒ Object
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.
67 68 69 |
# File 'lib/beaker-hostgenerator/hypervisor.rb', line 67 def global_config {} end |