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> >
17 18 19 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 17 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> >
23 24 25 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 23 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>):
List of (or single) sets 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.
50 51 52 53 54 55 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 50 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>):
List of (or single) sets 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.
37 38 39 40 41 42 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 37 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
26 27 28 29 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb', line 26 def init_mounts_test @mount_rules_that_should_be_absent = [] @mount_rules_that_should_be_present = [] end |