The Architect Manager

exception architect.ArchitectManager.StartupException(msg, exit_code=None)
class architect.ArchitectManagerLibs.ArchitectManager(instance, instance_dir, config, logger, reconnect=False, push_instances_dir=False, suppress_node_output=True, return_after_start_role=False)

Manage nodeconfs on multiple nodes.

__init__ – start Pyro Name Server, register PML commands __start_pyro – start the Pyro Name Server __pipe_out – redirect stdout/err from all nodeconfs to here _start_node – start nodeconf on a node _stop_node – stop a running node __monitor – ping nodes and publish changes to sve _connect_sve – connect to an sve _set_status – change status and publish to sve _get_node_env – get environment variables on a node _start_role – start a role on a node _desymbolize_ports – replace port strings with free port numbers on node reload_config – not implemented parse_config – connect to nodes to desymbolize port value execute_minimal_config – start nodes, SVE, and Logger in config file execute_config – start roles not handled by execute_minimal __signaled_shutdown – run shutdown when getting a sigterm, -int, or -hup __shutdown – the actual shutdown process ~~~Registered PML commands~~~ start_node – pml command to start a node stop_node – pml command to stop a node get_node_env – pml version of _get_node_env start_role – pml version of _start_role restart_role – shutdown, then start input_to_role – send input to role on node stop_role – stop (sigint) a role on a node kill_role – kill (sigkill) a role on a node list_nodes – list information about nodes and roles on them list_roles – list information about roles that have started list_all_roles – list information about all roles in ini file _list_all_roles_machine – as with list_all_roles, just json’d dict role_info – return current status and ini file info on a role set_log_level – set the log level for all nodes uptime – return number of seconds since startup reset – stop all roles other SVE/LOGGER/DISCOVERYENGINE/GUISERVER, and run execute_config again shutdown – start shutdown thread

get_published_value(sv)

returns a tuple with the current published value and update time for the requested SV returns (None, None) if the sv or the SVE are not available or not connected or the variable hasn’t yet been written to

get_config()

Return configuration in configobj format.

parse_config()

Start up all the nodeconfs and software in the config.

execute_minimal_config()

Parse config, start SVE and Logger

execute_config(myroles=None)

Start all roles defined in config file.

start_node(args, event=None)

PML command to start a node that was not definied in the config.

args should be “node [dos_home]”

stop_node(args, event=None)

PML command to stop a running node.

args should be “node [message]

get_node_env(args)

PML version of _get_node_env.

args are “node variable”

start_role(args, event=None)

PML version of _start_role.

args are “role [node [command]]”.

restart_role(role, event=None)

If role is running, kill it. Then start it.

input_to_role(args, event=None)

Send input to a role on a node.

args are “role input”.

stop_role(role, event=None)

Send a sigint to a role.

kill_role(role)

Send a sigkill to a role on a node.

args are “node role”.

list_nodes(nodes=None)

List roles running on node(s).

list_roles(roles=None)

List status of roles.

list_all_roles(roles=None, return_as_string=True)

List all roles in the ini file.

role_info(role)

Return complete information about one role.

reset(reason=None)

Shut down non-essential roles, and restart them all.

shutdown(reason=None)

Flag shutdown as happening and start __shutdown in a thread.

The threading is so that Pyro commands to shutdown will return,
and not confuse the Manager.
set_log_level(level)

Set the log level for the entire Architect.

uptime(arg=None)

Return the number of seconds Architect has been running.

class architect.config_validator.ConfigValidator(logger=None, allow_multiple_nodes=False)

Check the config file.

__init__ – keep list of used config files __port_check – implements port type for validation file __merge_configs – merge an indefinite number of config files _valdiate_role_device_name – validate the names of devices and roles validate_config – validate a file

validate_config(file)

Use ConfigObj and custom validation to check an ini file.