Module: HybridPlatformsConductor::HpcPlugins::Test::Mounts::ConfigDslExtension
- Defined in:
- lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb
Overview
Config DSL extension for this test plugin
Instance Attribute Summary collapse
-
#mount_rules_that_should_be_absent ⇒ Object
readonly
List of mount rules that should be absent.
-
#mount_rules_that_should_be_present ⇒ Object
readonly
List of mount rules that should be present.
Instance Method Summary collapse
-
#check_mounts_do_include(mount_rules) ⇒ Object
Give a list of mounts rules to check for presence.
-
#check_mounts_do_not_include(mount_rules) ⇒ Object
Give a list of mounts rules to check for absence.
-
#init_mounts_test ⇒ Object
Initialize the DSL.
Instance Attribute Details
#mount_rules_that_should_be_absent ⇒ Object (readonly)
List of mount rules that should be absent. Each info has the following properties:
-
nodes_selectors_stack (Array<Object>): Stack of nodes selectors impacted by this rule
-
mount_rules (Hash<String or Regexp, String or Regexp>): List of rules to check for absence.
Array< Hash<Symbol, Object> >
19 20 21 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 19 def mount_rules_that_should_be_absent @mount_rules_that_should_be_absent end |
#mount_rules_that_should_be_present ⇒ Object (readonly)
List of mount rules that should be present. Each info has the following properties:
-
nodes_selectors_stack (Array<Object>): Stack of nodes selectors impacted by this rule
-
mount_rules (Hash<String or Regexp, String or Regexp>): List of rules to check for presence.
Array< Hash<Symbol, Object> >
25 26 27 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 25 def mount_rules_that_should_be_present @mount_rules_that_should_be_present end |
Instance Method Details
#check_mounts_do_include(mount_rules) ⇒ Object
Give a list of mounts rules to check for presence
- Parameters
-
mount_rules (Hash<String or Regexp, String or Regexp>):
Set of { source => destination } mounts that should be present. Each source or destination can be a string for exact match, or a regexp to match a pattern on the mounts done on the node.
52 53 54 55 56 57 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 52 def check_mounts_do_include(mount_rules) @mount_rules_that_should_be_present << { mount_rules: mount_rules, nodes_selectors_stack: current_nodes_selectors_stack } end |
#check_mounts_do_not_include(mount_rules) ⇒ Object
Give a list of mounts rules to check for absence
- Parameters
-
mount_rules (Hash<String or Regexp, String or Regexp>):
Set of { source => destination } mounts that should not be present. Each source or destination can be a string for exact match, or a regexp to match a pattern on the mounts done on the node.
39 40 41 42 43 44 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 39 def check_mounts_do_not_include(mount_rules) @mount_rules_that_should_be_absent << { mount_rules: mount_rules, nodes_selectors_stack: current_nodes_selectors_stack } end |
#init_mounts_test ⇒ Object
Initialize the DSL
28 29 30 31 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 28 def init_mounts_test @mount_rules_that_should_be_absent = [] @mount_rules_that_should_be_present = [] end |