Module: HybridPlatformsConductor::HpcPlugins::Test::LocalUsers::ConfigDslExtension
- Defined in:
- lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb
Overview
Config DSL extension for this test plugin
Instance Attribute Summary collapse
-
#users_that_should_be_absent ⇒ Object
readonly
List of users that should be absent from local users.
-
#users_that_should_be_present ⇒ Object
readonly
List of users that should be present from local users.
Instance Method Summary collapse
-
#check_local_users_do_exist(users) ⇒ Object
Set a list of local users that should be present.
-
#check_local_users_do_not_exist(users) ⇒ Object
Set a list of local users that should be absent.
-
#init_local_users_test ⇒ Object
Initialize the DSL.
Instance Attribute Details
#users_that_should_be_absent ⇒ Object (readonly)
List of users that should be absent from local users. Each info has the following properties:
-
nodes_selectors_stack (Array<Object>): Stack of nodes selectors impacted by this rule
-
users (Array<String>): List of users.
Array< Hash<Symbol, Object> >
19 20 21 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 19 def users_that_should_be_absent @users_that_should_be_absent end |
#users_that_should_be_present ⇒ Object (readonly)
List of users that should be present from local users. Each info has the following properties:
-
nodes_selectors_stack (Array<Object>): Stack of nodes selectors impacted by this rule
-
users (Array<String>): List of users.
Array< Hash<Symbol, Object> >
25 26 27 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 25 def users_that_should_be_present @users_that_should_be_present end |
Instance Method Details
#check_local_users_do_exist(users) ⇒ Object
Set a list of local users that should be present.
- Parameters
-
users (String or Array<String>): List of (or single) users
48 49 50 51 52 53 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 48 def check_local_users_do_exist(users) @users_that_should_be_present << { nodes_selectors_stack: current_nodes_selectors_stack, users: users.is_a?(Array) ? users : [users] } end |
#check_local_users_do_not_exist(users) ⇒ Object
Set a list of local users that should be absent.
- Parameters
-
users (String or Array<String>): List of (or single) users
37 38 39 40 41 42 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 37 def check_local_users_do_not_exist(users) @users_that_should_be_absent << { nodes_selectors_stack: current_nodes_selectors_stack, users: users.is_a?(Array) ? users : [users] } end |
#init_local_users_test ⇒ Object
Initialize the DSL
28 29 30 31 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 28 def init_local_users_test @users_that_should_be_absent = [] @users_that_should_be_present = [] end |