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> >
17 18 19 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 17 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> >
23 24 25 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 23 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
46 47 48 49 50 51 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 46 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
35 36 37 38 39 40 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 35 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
26 27 28 29 |
# File 'lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb', line 26 def init_local_users_test @users_that_should_be_absent = [] @users_that_should_be_present = [] end |