/ Documentation / API / functions
en

API reference: functions

Common functions for most Inquisitor shell script needs.

This file includes all functions that are generic and can be called from multiple different modules. For functions specific to one particular kind of a module (for example, for “test” modules), see “functions-module” file, i.e. “functions-test”.

echo_success

Prints success marker [ DONE ] in success color to stdout.

echo_failure

Prints failure marker [FAILED] in failure color to stdout.

echo_skipped

Prints skipped marker [ SKIP ] in warning color to stdout.

echo_passed

Prints passed marker [PASSED] in warning color to stdout.

echo_running

Prints running test marker [CALLED] in warning color to stdout.

fatal_failure

test_progress

run_test

Issues a managed test run; should be called by a scheduler.

Input

  • $1 – script in test directory to run
  • TEST_NAME – unique identifier of test stage in testing (for database)
  • + variables to pass to the test

monitoring_start

Starts a monitoring in background. Makes sure that running monitoring is unique.

Input

  • $1 – name of monitoring script

monitoring_stop

Stops a monitoring, running in background.

Input

  • $1 – name of monitoring script

refresh_console

watchdog_start

watchdog_stop

start_background

start_background(PIDFILE, CPULIST, CMDLINE) Starts a process CMDLINE in background, setting CPU affinity to CPU_LIST (if not empty). Saves PID of the program in PIDFILE.

stop_background

print_green_message

print_red_message

dev_for_route_to_server

subnet_for_dev

get_hdd_info

get_nic_mac

get_hdds_list

get_odds_list

get_fdds_list

get_nics_list

get_interface_ipaddr

check_writeable_odd

check_readable_odd

hard_reboot

Waits for 10 seconds and forces hard reboot sequence using procfs system request.

hard_shutdown

Waits for 10 seconds and forces hard shutdown (usually a poweroff) sequence using procfs system request.

test_succeed_if_no

need_kernel_module

component_version

cpu_quantity

memory_amount

executable_arch

pushdq

popdq

service_start

add_component