Class: CemAcpt::Context::Ctx
- Inherits:
-
Object
- Object
- CemAcpt::Context::Ctx
- Defined in:
- lib/cem_acpt/context.rb
Overview
Ctx holds the context objects for the RunHandler to create and start Runners.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#local_port_allocator ⇒ Object
readonly
Returns the value of attribute local_port_allocator.
-
#module_package_path ⇒ Object
readonly
Returns the value of attribute module_package_path.
-
#node_inventory ⇒ Object
readonly
Returns the value of attribute node_inventory.
-
#test_data ⇒ Object
readonly
Returns the value of attribute test_data.
Instance Method Summary collapse
-
#initialize(opts: nil, config_file: nil, module_package_path: nil) ⇒ Ctx
constructor
A new instance of Ctx.
- #nodes ⇒ Object
Constructor Details
#initialize(opts: nil, config_file: nil, module_package_path: nil) ⇒ Ctx
Returns a new instance of Ctx.
116 117 118 119 120 121 122 123 |
# File 'lib/cem_acpt/context.rb', line 116 def initialize(opts: nil, config_file: nil, module_package_path: nil) @config = CemAcpt::Config.new.load(opts: opts, config_file: config_file) @test_data = CemAcpt::TestData.acceptance_test_data(@config) @module_package_path = module_package_path @node_inventory = CemAcpt::NodeInventory.new @local_port_allocator = CemAcpt::LocalPortAllocator.new prep_environment end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
114 115 116 |
# File 'lib/cem_acpt/context.rb', line 114 def config @config end |
#local_port_allocator ⇒ Object (readonly)
Returns the value of attribute local_port_allocator.
114 115 116 |
# File 'lib/cem_acpt/context.rb', line 114 def local_port_allocator @local_port_allocator end |
#module_package_path ⇒ Object (readonly)
Returns the value of attribute module_package_path.
114 115 116 |
# File 'lib/cem_acpt/context.rb', line 114 def module_package_path @module_package_path end |
#node_inventory ⇒ Object (readonly)
Returns the value of attribute node_inventory.
114 115 116 |
# File 'lib/cem_acpt/context.rb', line 114 def node_inventory @node_inventory end |
#test_data ⇒ Object (readonly)
Returns the value of attribute test_data.
114 115 116 |
# File 'lib/cem_acpt/context.rb', line 114 def test_data @test_data end |
Instance Method Details
#nodes ⇒ Object
125 126 127 128 129 130 131 132 |
# File 'lib/cem_acpt/context.rb', line 125 def nodes return @nodes if defined?(@nodes) raise CemAcpt::Error, 'No platform(s) specified' unless @config.has?('platform') || @config.has?('platforms') @nodes = nodes_from_platforms @nodes end |