partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
_process_priv_part
Process part
salt/modules/postgres.py
def _process_priv_part(perms): ''' Process part ''' _tmp = {} previous = None for perm in perms: if previous is None: _tmp[_PRIVILEGES_MAP[perm]] = False previous = _PRIVILEGES_MAP[perm] else: if perm == '*': _tmp[previous] = Tr...
def _process_priv_part(perms): ''' Process part ''' _tmp = {} previous = None for perm in perms: if previous is None: _tmp[_PRIVILEGES_MAP[perm]] = False previous = _PRIVILEGES_MAP[perm] else: if perm == '*': _tmp[previous] = Tr...
[ "Process", "part" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L2742-L2758
[ "def", "_process_priv_part", "(", "perms", ")", ":", "_tmp", "=", "{", "}", "previous", "=", "None", "for", "perm", "in", "perms", ":", "if", "previous", "is", "None", ":", "_tmp", "[", "_PRIVILEGES_MAP", "[", "perm", "]", "]", "=", "False", "previous"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
default_privileges_list
.. versionadded:: 2019.0.0 Return a list of default privileges for the specified object. CLI Example: .. code-block:: bash salt '*' postgres.default_privileges_list table_name table maintenance_db=db_name name Name of the object for which the permissions should be returned objec...
salt/modules/postgres.py
def default_privileges_list( name, object_type, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2019.0.0 Return a list of default privileges for the specified ob...
def default_privileges_list( name, object_type, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2019.0.0 Return a list of default privileges for the specified ob...
[ "..", "versionadded", "::", "2019", ".", "0", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L2761-L2854
[ "def", "default_privileges_list", "(", "name", ",", "object_type", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ",", "password", "=", "None", ",", "runa...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
privileges_list
.. versionadded:: 2016.3.0 Return a list of privileges for the specified object. CLI Example: .. code-block:: bash salt '*' postgres.privileges_list table_name table maintenance_db=db_name name Name of the object for which the permissions should be returned object_type Th...
salt/modules/postgres.py
def privileges_list( name, object_type, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 Return a list of privileges for the specified object. CLI E...
def privileges_list( name, object_type, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 Return a list of privileges for the specified object. CLI E...
[ "..", "versionadded", "::", "2016", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L2857-L2953
[ "def", "privileges_list", "(", "name", ",", "object_type", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ",", "password", "=", "None", ",", "runas", "=...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
has_default_privileges
.. versionadded:: 2019.0.0 Check if a role has the specified privileges on an object CLI Example: .. code-block:: bash salt '*' postgres.has_default_privileges user_name table_name table \\ SELECT,INSERT maintenance_db=db_name name Name of the role whose privileges should be ...
salt/modules/postgres.py
def has_default_privileges(name, object_name, object_type, defprivileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2019...
def has_default_privileges(name, object_name, object_type, defprivileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2019...
[ "..", "versionadded", "::", "2019", ".", "0", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L2956-L3071
[ "def", "has_default_privileges", "(", "name", ",", "object_name", ",", "object_type", ",", "defprivileges", "=", "None", ",", "grant_option", "=", "None", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "ho...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
has_privileges
.. versionadded:: 2016.3.0 Check if a role has the specified privileges on an object CLI Example: .. code-block:: bash salt '*' postgres.has_privileges user_name table_name table \\ SELECT,INSERT maintenance_db=db_name name Name of the role whose privileges should be checked ...
salt/modules/postgres.py
def has_privileges(name, object_name, object_type, privileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 C...
def has_privileges(name, object_name, object_type, privileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 C...
[ "..", "versionadded", "::", "2016", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L3074-L3194
[ "def", "has_privileges", "(", "name", ",", "object_name", ",", "object_type", ",", "privileges", "=", "None", ",", "grant_option", "=", "None", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "host", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
default_privileges_grant
.. versionadded:: 2019.0.0 Grant default privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.default_privileges_grant user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role to which default privileges should be...
salt/modules/postgres.py
def default_privileges_grant(name, object_name, object_type, defprivileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 20...
def default_privileges_grant(name, object_name, object_type, defprivileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 20...
[ "..", "versionadded", "::", "2019", ".", "0", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L3197-L3328
[ "def", "default_privileges_grant", "(", "name", ",", "object_name", ",", "object_type", ",", "defprivileges", "=", "None", ",", "grant_option", "=", "None", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
default_privileges_revoke
.. versionadded:: 2019.0.0 Revoke default privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.default_privileges_revoke user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role whose default privileges should be ...
salt/modules/postgres.py
def default_privileges_revoke(name, object_name, object_type, defprivileges=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2019.0.0 Revoke default...
def default_privileges_revoke(name, object_name, object_type, defprivileges=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2019.0.0 Revoke default...
[ "..", "versionadded", "::", "2019", ".", "0", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L3331-L3434
[ "def", "default_privileges_revoke", "(", "name", ",", "object_name", ",", "object_type", ",", "defprivileges", "=", "None", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "host", "=", "None", ",", "port", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
privileges_grant
.. versionadded:: 2016.3.0 Grant privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.privileges_grant user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role to which privileges should be granted object_nam...
salt/modules/postgres.py
def privileges_grant(name, object_name, object_type, privileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 ...
def privileges_grant(name, object_name, object_type, privileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 ...
[ "..", "versionadded", "::", "2016", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L3437-L3573
[ "def", "privileges_grant", "(", "name", ",", "object_name", ",", "object_type", ",", "privileges", "=", "None", ",", "grant_option", "=", "None", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "host", "=...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
privileges_revoke
.. versionadded:: 2016.3.0 Revoke privileges on a postgres object CLI Example: .. code-block:: bash salt '*' postgres.privileges_revoke user_name table_name table \\ SELECT,UPDATE maintenance_db=db_name name Name of the role whose privileges should be revoked object_name...
salt/modules/postgres.py
def privileges_revoke(name, object_name, object_type, privileges=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 Revoke privileges on a po...
def privileges_revoke(name, object_name, object_type, privileges=None, prepend='public', maintenance_db=None, user=None, host=None, port=None, password=None, runas=None): ''' .. versionadded:: 2016.3.0 Revoke privileges on a po...
[ "..", "versionadded", "::", "2016", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L3576-L3684
[ "def", "privileges_revoke", "(", "name", ",", "object_name", ",", "object_type", ",", "privileges", "=", "None", ",", "prepend", "=", "'public'", ",", "maintenance_db", "=", "None", ",", "user", "=", "None", ",", "host", "=", "None", ",", "port", "=", "N...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
datadir_init
.. versionadded:: 2016.3.0 Initializes a postgres data directory CLI Example: .. code-block:: bash salt '*' postgres.datadir_init '/var/lib/pgsql/data' name The name of the directory to initialize auth The default authentication method for local connections passwor...
salt/modules/postgres.py
def datadir_init(name, auth='password', user=None, password=None, encoding='UTF8', locale=None, waldir=None, checksums=False, runas=None): ''' .. versionadded:: 2016.3.0 Initializes a postgres data directory CLI Example: .. code-bloc...
def datadir_init(name, auth='password', user=None, password=None, encoding='UTF8', locale=None, waldir=None, checksums=False, runas=None): ''' .. versionadded:: 2016.3.0 Initializes a postgres data directory CLI Example: .. code-bloc...
[ "..", "versionadded", "::", "2016", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L3687-L3754
[ "def", "datadir_init", "(", "name", ",", "auth", "=", "'password'", ",", "user", "=", "None", ",", "password", "=", "None", ",", "encoding", "=", "'UTF8'", ",", "locale", "=", "None", ",", "waldir", "=", "None", ",", "checksums", "=", "False", ",", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
datadir_exists
.. versionadded:: 2016.3.0 Checks if postgres data directory has been initialized CLI Example: .. code-block:: bash salt '*' postgres.datadir_exists '/var/lib/pgsql/data' name Name of the directory to check
salt/modules/postgres.py
def datadir_exists(name): ''' .. versionadded:: 2016.3.0 Checks if postgres data directory has been initialized CLI Example: .. code-block:: bash salt '*' postgres.datadir_exists '/var/lib/pgsql/data' name Name of the directory to check ''' _version_file = os.path.jo...
def datadir_exists(name): ''' .. versionadded:: 2016.3.0 Checks if postgres data directory has been initialized CLI Example: .. code-block:: bash salt '*' postgres.datadir_exists '/var/lib/pgsql/data' name Name of the directory to check ''' _version_file = os.path.jo...
[ "..", "versionadded", "::", "2016", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/postgres.py#L3757-L3775
[ "def", "datadir_exists", "(", "name", ")", ":", "_version_file", "=", "os", ".", "path", ".", "join", "(", "name", ",", "'PG_VERSION'", ")", "_config_file", "=", "os", ".", "path", ".", "join", "(", "name", ",", "'postgresql.conf'", ")", "return", "os", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
exec_action
Execute an arbitrary action on a module. module name of the module to be executed action name of the module's action to be run module_parameter additional params passed to the defined module action_parameter additional params passed to the defined action state_on...
salt/modules/eselect.py
def exec_action(module, action, module_parameter=None, action_parameter=None, state_only=False): ''' Execute an arbitrary action on a module. module name of the module to be executed action name of the module's action to be run module_parameter additional params passed to ...
def exec_action(module, action, module_parameter=None, action_parameter=None, state_only=False): ''' Execute an arbitrary action on a module. module name of the module to be executed action name of the module's action to be run module_parameter additional params passed to ...
[ "Execute", "an", "arbitrary", "action", "on", "a", "module", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/eselect.py#L25-L69
[ "def", "exec_action", "(", "module", ",", "action", ",", "module_parameter", "=", "None", ",", "action_parameter", "=", "None", ",", "state_only", "=", "False", ")", ":", "out", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'eselect --brief --colour=no {0} {1} {...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_modules
List available ``eselect`` modules. CLI Example: .. code-block:: bash salt '*' eselect.get_modules
salt/modules/eselect.py
def get_modules(): ''' List available ``eselect`` modules. CLI Example: .. code-block:: bash salt '*' eselect.get_modules ''' modules = [] module_list = exec_action('modules', 'list', action_parameter='--only-names') if not module_list: return None for module in m...
def get_modules(): ''' List available ``eselect`` modules. CLI Example: .. code-block:: bash salt '*' eselect.get_modules ''' modules = [] module_list = exec_action('modules', 'list', action_parameter='--only-names') if not module_list: return None for module in m...
[ "List", "available", "eselect", "modules", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/eselect.py#L72-L90
[ "def", "get_modules", "(", ")", ":", "modules", "=", "[", "]", "module_list", "=", "exec_action", "(", "'modules'", ",", "'list'", ",", "action_parameter", "=", "'--only-names'", ")", "if", "not", "module_list", ":", "return", "None", "for", "module", "in", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_target_list
List available targets for the given module. module name of the module to be queried for its targets action_parameter additional params passed to the defined action .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt '*' eselect.get_target_list kernel
salt/modules/eselect.py
def get_target_list(module, action_parameter=None): ''' List available targets for the given module. module name of the module to be queried for its targets action_parameter additional params passed to the defined action .. versionadded:: 2016.11.0 CLI Example: .. co...
def get_target_list(module, action_parameter=None): ''' List available targets for the given module. module name of the module to be queried for its targets action_parameter additional params passed to the defined action .. versionadded:: 2016.11.0 CLI Example: .. co...
[ "List", "available", "targets", "for", "the", "given", "module", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/eselect.py#L93-L121
[ "def", "get_target_list", "(", "module", ",", "action_parameter", "=", "None", ")", ":", "exec_output", "=", "exec_action", "(", "module", ",", "'list'", ",", "action_parameter", "=", "action_parameter", ")", "if", "not", "exec_output", ":", "return", "None", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_current_target
Get the currently selected target for the given module. module name of the module to be queried for its current target module_parameter additional params passed to the defined module action_parameter additional params passed to the 'show' action CLI Example (current target of...
salt/modules/eselect.py
def get_current_target(module, module_parameter=None, action_parameter=None): ''' Get the currently selected target for the given module. module name of the module to be queried for its current target module_parameter additional params passed to the defined module action_parameter...
def get_current_target(module, module_parameter=None, action_parameter=None): ''' Get the currently selected target for the given module. module name of the module to be queried for its current target module_parameter additional params passed to the defined module action_parameter...
[ "Get", "the", "currently", "selected", "target", "for", "the", "given", "module", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/eselect.py#L124-L156
[ "def", "get_current_target", "(", "module", ",", "module_parameter", "=", "None", ",", "action_parameter", "=", "None", ")", ":", "result", "=", "exec_action", "(", "module", ",", "'show'", ",", "module_parameter", "=", "module_parameter", ",", "action_parameter",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
set_target
Set the target for the given module. Target can be specified by index or name. module name of the module for which a target should be set target name of the target to be set for this module module_parameter additional params passed to the defined module action_parameter ...
salt/modules/eselect.py
def set_target(module, target, module_parameter=None, action_parameter=None): ''' Set the target for the given module. Target can be specified by index or name. module name of the module for which a target should be set target name of the target to be set for this module modul...
def set_target(module, target, module_parameter=None, action_parameter=None): ''' Set the target for the given module. Target can be specified by index or name. module name of the module for which a target should be set target name of the target to be set for this module modul...
[ "Set", "the", "target", "for", "the", "given", "module", ".", "Target", "can", "be", "specified", "by", "index", "or", "name", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/eselect.py#L159-L201
[ "def", "set_target", "(", "module", ",", "target", ",", "module_parameter", "=", "None", ",", "action_parameter", "=", "None", ")", ":", "if", "action_parameter", ":", "action_parameter", "=", "'{0} {1}'", ".", "format", "(", "action_parameter", ",", "target", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
calc
Perform a calculation on the ``num`` most recent values. Requires a list. Valid values for ``oper`` are: - add: Add last ``num`` values together - mul: Multiple last ``num`` values together - mean: Calculate mean of last ``num`` values - median: Calculate median of last ``num`` values - median_...
salt/thorium/calc.py
def calc(name, num, oper, minimum=0, maximum=0, ref=None): ''' Perform a calculation on the ``num`` most recent values. Requires a list. Valid values for ``oper`` are: - add: Add last ``num`` values together - mul: Multiple last ``num`` values together - mean: Calculate mean of last ``num`` val...
def calc(name, num, oper, minimum=0, maximum=0, ref=None): ''' Perform a calculation on the ``num`` most recent values. Requires a list. Valid values for ``oper`` are: - add: Add last ``num`` values together - mul: Multiple last ``num`` values together - mean: Calculate mean of last ``num`` val...
[ "Perform", "a", "calculation", "on", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", ".", "Valid", "values", "for", "oper", "are", ":" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L28-L108
[ "def", "calc", "(", "name", ",", "num", ",", "oper", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
add
Adds together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.add: - name: myregentry - num: 5
salt/thorium/calc.py
def add(name, num, minimum=0, maximum=0, ref=None): ''' Adds together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.add: - name: myregentry - num: 5 ''' return calc( name=name, num=num, ...
def add(name, num, minimum=0, maximum=0, ref=None): ''' Adds together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.add: - name: myregentry - num: 5 ''' return calc( name=name, num=num, ...
[ "Adds", "together", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L111-L131
[ "def", "add", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'add'", ",", "minimum", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
mul
Multiplies together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mul: - name: myregentry - num: 5
salt/thorium/calc.py
def mul(name, num, minimum=0, maximum=0, ref=None): ''' Multiplies together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mul: - name: myregentry - num: 5 ''' return calc( name=name, num=num, ...
def mul(name, num, minimum=0, maximum=0, ref=None): ''' Multiplies together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mul: - name: myregentry - num: 5 ''' return calc( name=name, num=num, ...
[ "Multiplies", "together", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L134-L154
[ "def", "mul", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'mul'", ",", "minimum", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
mean
Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mean: - name: myregentry - num: 5
salt/thorium/calc.py
def mean(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mean: - name: myregentry - num: 5 ''' return calc( name=name, num=nu...
def mean(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mean: - name: myregentry - num: 5 ''' return calc( name=name, num=nu...
[ "Calculates", "the", "mean", "of", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L157-L177
[ "def", "mean", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'mean'", ",", "minimum", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
median
Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median: - name: myregentry - num: 5
salt/thorium/calc.py
def median(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median: - name: myregentry - num: 5 ''' return calc( name=name, nu...
def median(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median: - name: myregentry - num: 5 ''' return calc( name=name, nu...
[ "Calculates", "the", "mean", "of", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L180-L200
[ "def", "median", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'median'", ",", "minimum", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
median_low
Calculates the low mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_low: - name: myregentry - num: 5
salt/thorium/calc.py
def median_low(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the low mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_low: - name: myregentry - num: 5 ''' return calc( name=name...
def median_low(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the low mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_low: - name: myregentry - num: 5 ''' return calc( name=name...
[ "Calculates", "the", "low", "mean", "of", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L203-L223
[ "def", "median_low", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'median_low'", ",", "minim...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
median_high
Calculates the high mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_high: - name: myregentry - num: 5
salt/thorium/calc.py
def median_high(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the high mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_high: - name: myregentry - num: 5 ''' return calc( name=n...
def median_high(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the high mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_high: - name: myregentry - num: 5 ''' return calc( name=n...
[ "Calculates", "the", "high", "mean", "of", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L226-L246
[ "def", "median_high", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'median_high'", ",", "min...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
median_grouped
Calculates the grouped mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_grouped: - name: myregentry - num: 5
salt/thorium/calc.py
def median_grouped(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the grouped mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_grouped: - name: myregentry - num: 5 ''' return calc( ...
def median_grouped(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the grouped mean of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.median_grouped: - name: myregentry - num: 5 ''' return calc( ...
[ "Calculates", "the", "grouped", "mean", "of", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L249-L270
[ "def", "median_grouped", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'median_grouped'", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
mode
Calculates the mode of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mode: - name: myregentry - num: 5
salt/thorium/calc.py
def mode(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mode of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mode: - name: myregentry - num: 5 ''' return calc( name=name, num=nu...
def mode(name, num, minimum=0, maximum=0, ref=None): ''' Calculates the mode of the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mode: - name: myregentry - num: 5 ''' return calc( name=name, num=nu...
[ "Calculates", "the", "mode", "of", "the", "num", "most", "recent", "values", ".", "Requires", "a", "list", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/calc.py#L273-L293
[ "def", "mode", "(", "name", ",", "num", ",", "minimum", "=", "0", ",", "maximum", "=", "0", ",", "ref", "=", "None", ")", ":", "return", "calc", "(", "name", "=", "name", ",", "num", "=", "num", ",", "oper", "=", "'mode'", ",", "minimum", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_libvirt_enum_string
Convert the libvirt enum integer value into a human readable string. :param prefix: start of the libvirt attribute to look for. :param value: integer to convert to string
salt/engines/libvirt_events.py
def _get_libvirt_enum_string(prefix, value): ''' Convert the libvirt enum integer value into a human readable string. :param prefix: start of the libvirt attribute to look for. :param value: integer to convert to string ''' attributes = [attr[len(prefix):] for attr in libvirt.__dict__ if attr.s...
def _get_libvirt_enum_string(prefix, value): ''' Convert the libvirt enum integer value into a human readable string. :param prefix: start of the libvirt attribute to look for. :param value: integer to convert to string ''' attributes = [attr[len(prefix):] for attr in libvirt.__dict__ if attr.s...
[ "Convert", "the", "libvirt", "enum", "integer", "value", "into", "a", "human", "readable", "string", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L156-L175
[ "def", "_get_libvirt_enum_string", "(", "prefix", ",", "value", ")", ":", "attributes", "=", "[", "attr", "[", "len", "(", "prefix", ")", ":", "]", "for", "attr", "in", "libvirt", ".", "__dict__", "if", "attr", ".", "startswith", "(", "prefix", ")", "]...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_domain_event_detail
Convert event and detail numeric values into a tuple of human readable strings
salt/engines/libvirt_events.py
def _get_domain_event_detail(event, detail): ''' Convert event and detail numeric values into a tuple of human readable strings ''' event_name = _get_libvirt_enum_string('VIR_DOMAIN_EVENT_', event) if event_name == 'unknown': return event_name, 'unknown' prefix = 'VIR_DOMAIN_EVENT_{0}_'...
def _get_domain_event_detail(event, detail): ''' Convert event and detail numeric values into a tuple of human readable strings ''' event_name = _get_libvirt_enum_string('VIR_DOMAIN_EVENT_', event) if event_name == 'unknown': return event_name, 'unknown' prefix = 'VIR_DOMAIN_EVENT_{0}_'...
[ "Convert", "event", "and", "detail", "numeric", "values", "into", "a", "tuple", "of", "human", "readable", "strings" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L178-L189
[ "def", "_get_domain_event_detail", "(", "event", ",", "detail", ")", ":", "event_name", "=", "_get_libvirt_enum_string", "(", "'VIR_DOMAIN_EVENT_'", ",", "event", ")", "if", "event_name", "==", "'unknown'", ":", "return", "event_name", ",", "'unknown'", "prefix", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_salt_send_event
Convenience function adding common data to the event and sending it on the salt event bus. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt connection :param data: additional event data dict t...
salt/engines/libvirt_events.py
def _salt_send_event(opaque, conn, data): ''' Convenience function adding common data to the event and sending it on the salt event bus. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt co...
def _salt_send_event(opaque, conn, data): ''' Convenience function adding common data to the event and sending it on the salt event bus. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt co...
[ "Convenience", "function", "adding", "common", "data", "to", "the", "event", "and", "sending", "it", "on", "the", "salt", "event", "bus", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L192-L231
[ "def", "_salt_send_event", "(", "opaque", ",", "conn", ",", "data", ")", ":", "tag_prefix", "=", "opaque", "[", "'prefix'", "]", "object_type", "=", "opaque", "[", "'object'", "]", "event_type", "=", "opaque", "[", "'event'", "]", "# Prepare the connection URI...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_salt_send_domain_event
Helper function send a salt event for a libvirt domain. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt connection :param domain: name of the domain related to the event :param event: name of...
salt/engines/libvirt_events.py
def _salt_send_domain_event(opaque, conn, domain, event, event_data): ''' Helper function send a salt event for a libvirt domain. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt connection ...
def _salt_send_domain_event(opaque, conn, domain, event, event_data): ''' Helper function send a salt event for a libvirt domain. :param opaque: the opaque data that is passed to the callback. This is a dict with 'prefix', 'object' and 'event' keys. :param conn: libvirt connection ...
[ "Helper", "function", "send", "a", "salt", "event", "for", "a", "libvirt", "domain", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L234-L254
[ "def", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "event", ",", "event_data", ")", ":", "data", "=", "{", "'domain'", ":", "{", "'name'", ":", "domain", ".", "name", "(", ")", ",", "'id'", ":", "domain", ".", "ID", "("...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_lifecycle_cb
Domain lifecycle events handler
salt/engines/libvirt_events.py
def _domain_event_lifecycle_cb(conn, domain, event, detail, opaque): ''' Domain lifecycle events handler ''' event_str, detail_str = _get_domain_event_detail(event, detail) _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'event': event_str, 'detail': detail_str ...
def _domain_event_lifecycle_cb(conn, domain, event, detail, opaque): ''' Domain lifecycle events handler ''' event_str, detail_str = _get_domain_event_detail(event, detail) _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'event': event_str, 'detail': detail_str ...
[ "Domain", "lifecycle", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L257-L266
[ "def", "_domain_event_lifecycle_cb", "(", "conn", ",", "domain", ",", "event", ",", "detail", ",", "opaque", ")", ":", "event_str", ",", "detail_str", "=", "_get_domain_event_detail", "(", "event", ",", "detail", ")", "_salt_send_domain_event", "(", "opaque", ",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_rtc_change_cb
Domain RTC change events handler
salt/engines/libvirt_events.py
def _domain_event_rtc_change_cb(conn, domain, utcoffset, opaque): ''' Domain RTC change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'utcoffset': utcoffset })
def _domain_event_rtc_change_cb(conn, domain, utcoffset, opaque): ''' Domain RTC change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'utcoffset': utcoffset })
[ "Domain", "RTC", "change", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L276-L282
[ "def", "_domain_event_rtc_change_cb", "(", "conn", ",", "domain", ",", "utcoffset", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'utcoffset'", ":", "utcoffset", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_watchdog_cb
Domain watchdog events handler
salt/engines/libvirt_events.py
def _domain_event_watchdog_cb(conn, domain, action, opaque): ''' Domain watchdog events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'action': _get_libvirt_enum_string('VIR_DOMAIN_EVENT_WATCHDOG_', action) })
def _domain_event_watchdog_cb(conn, domain, action, opaque): ''' Domain watchdog events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'action': _get_libvirt_enum_string('VIR_DOMAIN_EVENT_WATCHDOG_', action) })
[ "Domain", "watchdog", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L285-L291
[ "def", "_domain_event_watchdog_cb", "(", "conn", ",", "domain", ",", "action", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'action'", ":", "_get_libvirt_enum_stri...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_io_error_cb
Domain I/O Error events handler
salt/engines/libvirt_events.py
def _domain_event_io_error_cb(conn, domain, srcpath, devalias, action, reason, opaque): ''' Domain I/O Error events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'srcPath': srcpath, 'dev': devalias, 'action': _get_libvirt_enum_string('VIR_DOMAIN_EVE...
def _domain_event_io_error_cb(conn, domain, srcpath, devalias, action, reason, opaque): ''' Domain I/O Error events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'srcPath': srcpath, 'dev': devalias, 'action': _get_libvirt_enum_string('VIR_DOMAIN_EVE...
[ "Domain", "I", "/", "O", "Error", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L294-L303
[ "def", "_domain_event_io_error_cb", "(", "conn", ",", "domain", ",", "srcpath", ",", "devalias", ",", "action", ",", "reason", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_graphics_cb
Domain graphics events handler
salt/engines/libvirt_events.py
def _domain_event_graphics_cb(conn, domain, phase, local, remote, auth, subject, opaque): ''' Domain graphics events handler ''' prefix = 'VIR_DOMAIN_EVENT_GRAPHICS_' def get_address(addr): ''' transform address structure into event data piece ''' return {'family': _...
def _domain_event_graphics_cb(conn, domain, phase, local, remote, auth, subject, opaque): ''' Domain graphics events handler ''' prefix = 'VIR_DOMAIN_EVENT_GRAPHICS_' def get_address(addr): ''' transform address structure into event data piece ''' return {'family': _...
[ "Domain", "graphics", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L306-L326
[ "def", "_domain_event_graphics_cb", "(", "conn", ",", "domain", ",", "phase", ",", "local", ",", "remote", ",", "auth", ",", "subject", ",", "opaque", ")", ":", "prefix", "=", "'VIR_DOMAIN_EVENT_GRAPHICS_'", "def", "get_address", "(", "addr", ")", ":", "'''\...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_disk_change_cb
Domain disk change events handler
salt/engines/libvirt_events.py
def _domain_event_disk_change_cb(conn, domain, old_src, new_src, dev, reason, opaque): ''' Domain disk change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'oldSrcPath': old_src, 'newSrcPath': new_src, 'dev': dev, 'reason': _get_libvi...
def _domain_event_disk_change_cb(conn, domain, old_src, new_src, dev, reason, opaque): ''' Domain disk change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'oldSrcPath': old_src, 'newSrcPath': new_src, 'dev': dev, 'reason': _get_libvi...
[ "Domain", "disk", "change", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L336-L345
[ "def", "_domain_event_disk_change_cb", "(", "conn", ",", "domain", ",", "old_src", ",", "new_src", ",", "dev", ",", "reason", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_tray_change_cb
Domain tray change events handler
salt/engines/libvirt_events.py
def _domain_event_tray_change_cb(conn, domain, dev, reason, opaque): ''' Domain tray change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev, 'reason': _get_libvirt_enum_string('VIR_DOMAIN_EVENT_TRAY_CHANGE_', reason) })
def _domain_event_tray_change_cb(conn, domain, dev, reason, opaque): ''' Domain tray change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev, 'reason': _get_libvirt_enum_string('VIR_DOMAIN_EVENT_TRAY_CHANGE_', reason) })
[ "Domain", "tray", "change", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L348-L355
[ "def", "_domain_event_tray_change_cb", "(", "conn", ",", "domain", ",", "dev", ",", "reason", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'dev'", ":", "dev", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_pmwakeup_cb
Domain wakeup events handler
salt/engines/libvirt_events.py
def _domain_event_pmwakeup_cb(conn, domain, reason, opaque): ''' Domain wakeup events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
def _domain_event_pmwakeup_cb(conn, domain, reason, opaque): ''' Domain wakeup events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
[ "Domain", "wakeup", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L358-L364
[ "def", "_domain_event_pmwakeup_cb", "(", "conn", ",", "domain", ",", "reason", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'reason'", ":", "'unknown'", "# curre...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_pmsuspend_cb
Domain suspend events handler
salt/engines/libvirt_events.py
def _domain_event_pmsuspend_cb(conn, domain, reason, opaque): ''' Domain suspend events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
def _domain_event_pmsuspend_cb(conn, domain, reason, opaque): ''' Domain suspend events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
[ "Domain", "suspend", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L367-L373
[ "def", "_domain_event_pmsuspend_cb", "(", "conn", ",", "domain", ",", "reason", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'reason'", ":", "'unknown'", "# curr...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_balloon_change_cb
Domain balloon change events handler
salt/engines/libvirt_events.py
def _domain_event_balloon_change_cb(conn, domain, actual, opaque): ''' Domain balloon change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'actual': actual })
def _domain_event_balloon_change_cb(conn, domain, actual, opaque): ''' Domain balloon change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'actual': actual })
[ "Domain", "balloon", "change", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L376-L382
[ "def", "_domain_event_balloon_change_cb", "(", "conn", ",", "domain", ",", "actual", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'actual'", ":", "actual", "}", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_pmsuspend_disk_cb
Domain disk suspend events handler
salt/engines/libvirt_events.py
def _domain_event_pmsuspend_disk_cb(conn, domain, reason, opaque): ''' Domain disk suspend events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
def _domain_event_pmsuspend_disk_cb(conn, domain, reason, opaque): ''' Domain disk suspend events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'reason': 'unknown' # currently unused })
[ "Domain", "disk", "suspend", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L385-L391
[ "def", "_domain_event_pmsuspend_disk_cb", "(", "conn", ",", "domain", ",", "reason", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'reason'", ":", "'unknown'", "#...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_block_job_cb
Domain block job events handler
salt/engines/libvirt_events.py
def _domain_event_block_job_cb(conn, domain, disk, job_type, status, opaque): ''' Domain block job events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'disk': disk, 'type': _get_libvirt_enum_string('VIR_DOMAIN_BLOCK_JOB_TYPE_', job_type), 'status':...
def _domain_event_block_job_cb(conn, domain, disk, job_type, status, opaque): ''' Domain block job events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'disk': disk, 'type': _get_libvirt_enum_string('VIR_DOMAIN_BLOCK_JOB_TYPE_', job_type), 'status':...
[ "Domain", "block", "job", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L394-L402
[ "def", "_domain_event_block_job_cb", "(", "conn", ",", "domain", ",", "disk", ",", "job_type", ",", "status", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'dis...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_device_removed_cb
Domain device removal events handler
salt/engines/libvirt_events.py
def _domain_event_device_removed_cb(conn, domain, dev, opaque): ''' Domain device removal events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
def _domain_event_device_removed_cb(conn, domain, dev, opaque): ''' Domain device removal events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
[ "Domain", "device", "removal", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L405-L411
[ "def", "_domain_event_device_removed_cb", "(", "conn", ",", "domain", ",", "dev", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'dev'", ":", "dev", "}", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_tunable_cb
Domain tunable events handler
salt/engines/libvirt_events.py
def _domain_event_tunable_cb(conn, domain, params, opaque): ''' Domain tunable events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'params': params })
def _domain_event_tunable_cb(conn, domain, params, opaque): ''' Domain tunable events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'params': params })
[ "Domain", "tunable", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L414-L420
[ "def", "_domain_event_tunable_cb", "(", "conn", ",", "domain", ",", "params", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'params'", ":", "params", "}", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_agent_lifecycle_cb
Domain agent lifecycle events handler
salt/engines/libvirt_events.py
def _domain_event_agent_lifecycle_cb(conn, domain, state, reason, opaque): ''' Domain agent lifecycle events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'state': _get_libvirt_enum_string('VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_', state), 'reason':...
def _domain_event_agent_lifecycle_cb(conn, domain, state, reason, opaque): ''' Domain agent lifecycle events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'state': _get_libvirt_enum_string('VIR_CONNECT_DOMAIN_EVENT_AGENT_LIFECYCLE_STATE_', state), 'reason':...
[ "Domain", "agent", "lifecycle", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L424-L431
[ "def", "_domain_event_agent_lifecycle_cb", "(", "conn", ",", "domain", ",", "state", ",", "reason", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'state'", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_device_added_cb
Domain device addition events handler
salt/engines/libvirt_events.py
def _domain_event_device_added_cb(conn, domain, dev, opaque): ''' Domain device addition events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
def _domain_event_device_added_cb(conn, domain, dev, opaque): ''' Domain device addition events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
[ "Domain", "device", "addition", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L434-L440
[ "def", "_domain_event_device_added_cb", "(", "conn", ",", "domain", ",", "dev", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'dev'", ":", "dev", "}", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_migration_iteration_cb
Domain migration iteration events handler
salt/engines/libvirt_events.py
def _domain_event_migration_iteration_cb(conn, domain, iteration, opaque): ''' Domain migration iteration events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'iteration': iteration })
def _domain_event_migration_iteration_cb(conn, domain, iteration, opaque): ''' Domain migration iteration events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'iteration': iteration })
[ "Domain", "migration", "iteration", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L444-L450
[ "def", "_domain_event_migration_iteration_cb", "(", "conn", ",", "domain", ",", "iteration", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'iteration'", ":", "itera...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_job_completed_cb
Domain job completion events handler
salt/engines/libvirt_events.py
def _domain_event_job_completed_cb(conn, domain, params, opaque): ''' Domain job completion events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'params': params })
def _domain_event_job_completed_cb(conn, domain, params, opaque): ''' Domain job completion events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'params': params })
[ "Domain", "job", "completion", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L453-L459
[ "def", "_domain_event_job_completed_cb", "(", "conn", ",", "domain", ",", "params", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'params'", ":", "params", "}", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_device_removal_failed_cb
Domain device removal failure events handler
salt/engines/libvirt_events.py
def _domain_event_device_removal_failed_cb(conn, domain, dev, opaque): ''' Domain device removal failure events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
def _domain_event_device_removal_failed_cb(conn, domain, dev, opaque): ''' Domain device removal failure events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev })
[ "Domain", "device", "removal", "failure", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L462-L468
[ "def", "_domain_event_device_removal_failed_cb", "(", "conn", ",", "domain", ",", "dev", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'dev'", ":", "dev", "}", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_metadata_change_cb
Domain metadata change events handler
salt/engines/libvirt_events.py
def _domain_event_metadata_change_cb(conn, domain, mtype, nsuri, opaque): ''' Domain metadata change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'type': _get_libvirt_enum_string('VIR_DOMAIN_METADATA_', mtype), 'nsuri': nsuri })
def _domain_event_metadata_change_cb(conn, domain, mtype, nsuri, opaque): ''' Domain metadata change events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'type': _get_libvirt_enum_string('VIR_DOMAIN_METADATA_', mtype), 'nsuri': nsuri })
[ "Domain", "metadata", "change", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L471-L478
[ "def", "_domain_event_metadata_change_cb", "(", "conn", ",", "domain", ",", "mtype", ",", "nsuri", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]", ",", "{", "'type'", ":", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_domain_event_block_threshold_cb
Domain block threshold events handler
salt/engines/libvirt_events.py
def _domain_event_block_threshold_cb(conn, domain, dev, path, threshold, excess, opaque): ''' Domain block threshold events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev, 'path': path, 'threshold': threshold, 'excess': excess ...
def _domain_event_block_threshold_cb(conn, domain, dev, path, threshold, excess, opaque): ''' Domain block threshold events handler ''' _salt_send_domain_event(opaque, conn, domain, opaque['event'], { 'dev': dev, 'path': path, 'threshold': threshold, 'excess': excess ...
[ "Domain", "block", "threshold", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L481-L490
[ "def", "_domain_event_block_threshold_cb", "(", "conn", ",", "domain", ",", "dev", ",", "path", ",", "threshold", ",", "excess", ",", "opaque", ")", ":", "_salt_send_domain_event", "(", "opaque", ",", "conn", ",", "domain", ",", "opaque", "[", "'event'", "]"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_network_event_lifecycle_cb
Network lifecycle events handler
salt/engines/libvirt_events.py
def _network_event_lifecycle_cb(conn, net, event, detail, opaque): ''' Network lifecycle events handler ''' _salt_send_event(opaque, conn, { 'network': { 'name': net.name(), 'uuid': net.UUIDString() }, 'event': _get_libvirt_enum_string('VIR_NETWORK_EVENT_...
def _network_event_lifecycle_cb(conn, net, event, detail, opaque): ''' Network lifecycle events handler ''' _salt_send_event(opaque, conn, { 'network': { 'name': net.name(), 'uuid': net.UUIDString() }, 'event': _get_libvirt_enum_string('VIR_NETWORK_EVENT_...
[ "Network", "lifecycle", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L493-L505
[ "def", "_network_event_lifecycle_cb", "(", "conn", ",", "net", ",", "event", ",", "detail", ",", "opaque", ")", ":", "_salt_send_event", "(", "opaque", ",", "conn", ",", "{", "'network'", ":", "{", "'name'", ":", "net", ".", "name", "(", ")", ",", "'uu...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_pool_event_lifecycle_cb
Storage pool lifecycle events handler
salt/engines/libvirt_events.py
def _pool_event_lifecycle_cb(conn, pool, event, detail, opaque): ''' Storage pool lifecycle events handler ''' _salt_send_event(opaque, conn, { 'pool': { 'name': pool.name(), 'uuid': pool.UUIDString() }, 'event': _get_libvirt_enum_string('VIR_STORAGE_POOL_...
def _pool_event_lifecycle_cb(conn, pool, event, detail, opaque): ''' Storage pool lifecycle events handler ''' _salt_send_event(opaque, conn, { 'pool': { 'name': pool.name(), 'uuid': pool.UUIDString() }, 'event': _get_libvirt_enum_string('VIR_STORAGE_POOL_...
[ "Storage", "pool", "lifecycle", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L508-L519
[ "def", "_pool_event_lifecycle_cb", "(", "conn", ",", "pool", ",", "event", ",", "detail", ",", "opaque", ")", ":", "_salt_send_event", "(", "opaque", ",", "conn", ",", "{", "'pool'", ":", "{", "'name'", ":", "pool", ".", "name", "(", ")", ",", "'uuid'"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_pool_event_refresh_cb
Storage pool refresh events handler
salt/engines/libvirt_events.py
def _pool_event_refresh_cb(conn, pool, opaque): ''' Storage pool refresh events handler ''' _salt_send_event(opaque, conn, { 'pool': { 'name': pool.name(), 'uuid': pool.UUIDString() }, 'event': opaque['event'] })
def _pool_event_refresh_cb(conn, pool, opaque): ''' Storage pool refresh events handler ''' _salt_send_event(opaque, conn, { 'pool': { 'name': pool.name(), 'uuid': pool.UUIDString() }, 'event': opaque['event'] })
[ "Storage", "pool", "refresh", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L522-L532
[ "def", "_pool_event_refresh_cb", "(", "conn", ",", "pool", ",", "opaque", ")", ":", "_salt_send_event", "(", "opaque", ",", "conn", ",", "{", "'pool'", ":", "{", "'name'", ":", "pool", ".", "name", "(", ")", ",", "'uuid'", ":", "pool", ".", "UUIDString...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_nodedev_event_lifecycle_cb
Node device lifecycle events handler
salt/engines/libvirt_events.py
def _nodedev_event_lifecycle_cb(conn, dev, event, detail, opaque): ''' Node device lifecycle events handler ''' _salt_send_event(opaque, conn, { 'nodedev': { 'name': dev.name() }, 'event': _get_libvirt_enum_string('VIR_NODE_DEVICE_EVENT_', event), 'detail': 'u...
def _nodedev_event_lifecycle_cb(conn, dev, event, detail, opaque): ''' Node device lifecycle events handler ''' _salt_send_event(opaque, conn, { 'nodedev': { 'name': dev.name() }, 'event': _get_libvirt_enum_string('VIR_NODE_DEVICE_EVENT_', event), 'detail': 'u...
[ "Node", "device", "lifecycle", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L535-L545
[ "def", "_nodedev_event_lifecycle_cb", "(", "conn", ",", "dev", ",", "event", ",", "detail", ",", "opaque", ")", ":", "_salt_send_event", "(", "opaque", ",", "conn", ",", "{", "'nodedev'", ":", "{", "'name'", ":", "dev", ".", "name", "(", ")", "}", ",",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_nodedev_event_update_cb
Node device update events handler
salt/engines/libvirt_events.py
def _nodedev_event_update_cb(conn, dev, opaque): ''' Node device update events handler ''' _salt_send_event(opaque, conn, { 'nodedev': { 'name': dev.name() }, 'event': opaque['event'] })
def _nodedev_event_update_cb(conn, dev, opaque): ''' Node device update events handler ''' _salt_send_event(opaque, conn, { 'nodedev': { 'name': dev.name() }, 'event': opaque['event'] })
[ "Node", "device", "update", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L548-L557
[ "def", "_nodedev_event_update_cb", "(", "conn", ",", "dev", ",", "opaque", ")", ":", "_salt_send_event", "(", "opaque", ",", "conn", ",", "{", "'nodedev'", ":", "{", "'name'", ":", "dev", ".", "name", "(", ")", "}", ",", "'event'", ":", "opaque", "[", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_secret_event_lifecycle_cb
Secret lifecycle events handler
salt/engines/libvirt_events.py
def _secret_event_lifecycle_cb(conn, secret, event, detail, opaque): ''' Secret lifecycle events handler ''' _salt_send_event(opaque, conn, { 'secret': { 'uuid': secret.UUIDString() }, 'event': _get_libvirt_enum_string('VIR_SECRET_EVENT_', event), 'detail': 'u...
def _secret_event_lifecycle_cb(conn, secret, event, detail, opaque): ''' Secret lifecycle events handler ''' _salt_send_event(opaque, conn, { 'secret': { 'uuid': secret.UUIDString() }, 'event': _get_libvirt_enum_string('VIR_SECRET_EVENT_', event), 'detail': 'u...
[ "Secret", "lifecycle", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L560-L570
[ "def", "_secret_event_lifecycle_cb", "(", "conn", ",", "secret", ",", "event", ",", "detail", ",", "opaque", ")", ":", "_salt_send_event", "(", "opaque", ",", "conn", ",", "{", "'secret'", ":", "{", "'uuid'", ":", "secret", ".", "UUIDString", "(", ")", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_secret_event_value_changed_cb
Secret value change events handler
salt/engines/libvirt_events.py
def _secret_event_value_changed_cb(conn, secret, opaque): ''' Secret value change events handler ''' _salt_send_event(opaque, conn, { 'secret': { 'uuid': secret.UUIDString() }, 'event': opaque['event'] })
def _secret_event_value_changed_cb(conn, secret, opaque): ''' Secret value change events handler ''' _salt_send_event(opaque, conn, { 'secret': { 'uuid': secret.UUIDString() }, 'event': opaque['event'] })
[ "Secret", "value", "change", "events", "handler" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L573-L582
[ "def", "_secret_event_value_changed_cb", "(", "conn", ",", "secret", ",", "opaque", ")", ":", "_salt_send_event", "(", "opaque", ",", "conn", ",", "{", "'secret'", ":", "{", "'uuid'", ":", "secret", ".", "UUIDString", "(", ")", "}", ",", "'event'", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_callbacks_cleanup
Unregister all the registered callbacks :param cnx: libvirt connection :param callback_ids: dictionary mapping a libvirt object type to an ID list of callbacks to deregister
salt/engines/libvirt_events.py
def _callbacks_cleanup(cnx, callback_ids): ''' Unregister all the registered callbacks :param cnx: libvirt connection :param callback_ids: dictionary mapping a libvirt object type to an ID list of callbacks to deregister ''' for obj, ids in callback_ids.items(): ...
def _callbacks_cleanup(cnx, callback_ids): ''' Unregister all the registered callbacks :param cnx: libvirt connection :param callback_ids: dictionary mapping a libvirt object type to an ID list of callbacks to deregister ''' for obj, ids in callback_ids.items(): ...
[ "Unregister", "all", "the", "registered", "callbacks" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L595-L608
[ "def", "_callbacks_cleanup", "(", "cnx", ",", "callback_ids", ")", ":", "for", "obj", ",", "ids", "in", "callback_ids", ".", "items", "(", ")", ":", "register_name", "=", "REGISTER_FUNCTIONS", "[", "obj", "]", "deregister_name", "=", "register_name", ".", "r...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_register_callback
Helper function registering a callback :param cnx: libvirt connection :param tag_prefix: salt event tag prefix to use :param obj: the libvirt object name for the event. Needs to be one of the REGISTER_FUNCTIONS keys. :param event: the event type name. :param real_id: the libvirt nam...
salt/engines/libvirt_events.py
def _register_callback(cnx, tag_prefix, obj, event, real_id): ''' Helper function registering a callback :param cnx: libvirt connection :param tag_prefix: salt event tag prefix to use :param obj: the libvirt object name for the event. Needs to be one of the REGISTER_FUNCTIONS keys. ...
def _register_callback(cnx, tag_prefix, obj, event, real_id): ''' Helper function registering a callback :param cnx: libvirt connection :param tag_prefix: salt event tag prefix to use :param obj: the libvirt object name for the event. Needs to be one of the REGISTER_FUNCTIONS keys. ...
[ "Helper", "function", "registering", "a", "callback" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L611-L643
[ "def", "_register_callback", "(", "cnx", ",", "tag_prefix", ",", "obj", ",", "event", ",", "real_id", ")", ":", "libvirt_name", "=", "real_id", "if", "real_id", "is", "None", ":", "libvirt_name", "=", "'VIR_{0}_EVENT_ID_{1}'", ".", "format", "(", "obj", ",",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_append_callback_id
Helper function adding a callback ID to the IDs dict. The callback ids dict maps an object to event callback ids. :param ids: dict of callback IDs to update :param obj: one of the keys of REGISTER_FUNCTIONS :param callback_id: the result of _register_callback
salt/engines/libvirt_events.py
def _append_callback_id(ids, obj, callback_id): ''' Helper function adding a callback ID to the IDs dict. The callback ids dict maps an object to event callback ids. :param ids: dict of callback IDs to update :param obj: one of the keys of REGISTER_FUNCTIONS :param callback_id: the result of _r...
def _append_callback_id(ids, obj, callback_id): ''' Helper function adding a callback ID to the IDs dict. The callback ids dict maps an object to event callback ids. :param ids: dict of callback IDs to update :param obj: one of the keys of REGISTER_FUNCTIONS :param callback_id: the result of _r...
[ "Helper", "function", "adding", "a", "callback", "ID", "to", "the", "IDs", "dict", ".", "The", "callback", "ids", "dict", "maps", "an", "object", "to", "event", "callback", "ids", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L646-L657
[ "def", "_append_callback_id", "(", "ids", ",", "obj", ",", "callback_id", ")", ":", "if", "obj", "not", "in", "ids", ":", "ids", "[", "obj", "]", "=", "[", "]", "ids", "[", "obj", "]", ".", "append", "(", "callback_id", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
start
Listen to libvirt events and forward them to salt. :param uri: libvirt URI to listen on. Defaults to None to pick the first available local hypervisor :param tag_prefix: the begining of the salt event tag to use. Defaults to 'salt/engines/libvirt_events' :param filter...
salt/engines/libvirt_events.py
def start(uri=None, tag_prefix='salt/engines/libvirt_events', filters=None): ''' Listen to libvirt events and forward them to salt. :param uri: libvirt URI to listen on. Defaults to None to pick the first available local hypervisor :param tag_prefix: the begining of ...
def start(uri=None, tag_prefix='salt/engines/libvirt_events', filters=None): ''' Listen to libvirt events and forward them to salt. :param uri: libvirt URI to listen on. Defaults to None to pick the first available local hypervisor :param tag_prefix: the begining of ...
[ "Listen", "to", "libvirt", "events", "and", "forward", "them", "to", "salt", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/libvirt_events.py#L660-L702
[ "def", "start", "(", "uri", "=", "None", ",", "tag_prefix", "=", "'salt/engines/libvirt_events'", ",", "filters", "=", "None", ")", ":", "if", "filters", "is", "None", ":", "filters", "=", "[", "'all'", "]", "try", ":", "libvirt", ".", "virEventRegisterDef...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_number
Convert a string to a number. Returns an integer if the string represents an integer, a floating point number if the string is a real number, or the string unchanged otherwise.
salt/modules/status.py
def _number(text): ''' Convert a string to a number. Returns an integer if the string represents an integer, a floating point number if the string is a real number, or the string unchanged otherwise. ''' if text.isdigit(): return int(text) try: return float(text) exce...
def _number(text): ''' Convert a string to a number. Returns an integer if the string represents an integer, a floating point number if the string is a real number, or the string unchanged otherwise. ''' if text.isdigit(): return int(text) try: return float(text) exce...
[ "Convert", "a", "string", "to", "a", "number", ".", "Returns", "an", "integer", "if", "the", "string", "represents", "an", "integer", "a", "floating", "point", "number", "if", "the", "string", "is", "a", "real", "number", "or", "the", "string", "unchanged"...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L59-L71
[ "def", "_number", "(", "text", ")", ":", "if", "text", ".", "isdigit", "(", ")", ":", "return", "int", "(", "text", ")", "try", ":", "return", "float", "(", "text", ")", "except", "ValueError", ":", "return", "text" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_boot_time_aix
Return the number of seconds since boot time on AIX t=$(LC_ALL=POSIX ps -o etime= -p 1) d=0 h=0 case $t in *-*) d=${t%%-*}; t=${t#*-};; esac case $t in *:*:*) h=${t%%:*}; t=${t#*:};; esac s=$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:})) t is 7-20:46:46
salt/modules/status.py
def _get_boot_time_aix(): ''' Return the number of seconds since boot time on AIX t=$(LC_ALL=POSIX ps -o etime= -p 1) d=0 h=0 case $t in *-*) d=${t%%-*}; t=${t#*-};; esac case $t in *:*:*) h=${t%%:*}; t=${t#*:};; esac s=$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:})) t is 7-20:46:46 ...
def _get_boot_time_aix(): ''' Return the number of seconds since boot time on AIX t=$(LC_ALL=POSIX ps -o etime= -p 1) d=0 h=0 case $t in *-*) d=${t%%-*}; t=${t#*-};; esac case $t in *:*:*) h=${t%%:*}; t=${t#*:};; esac s=$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:})) t is 7-20:46:46 ...
[ "Return", "the", "number", "of", "seconds", "since", "boot", "time", "on", "AIX" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L74-L94
[ "def", "_get_boot_time_aix", "(", ")", ":", "boot_secs", "=", "0", "res", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "'ps -o etime= -p 1'", ")", "if", "res", "[", "'retcode'", "]", ">", "0", ":", "raise", "CommandExecutionError", "(", "'Unable to find bo...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_aix_loadavg
Return the load average on AIX
salt/modules/status.py
def _aix_loadavg(): ''' Return the load average on AIX ''' # 03:42PM up 9 days, 20:41, 2 users, load average: 0.28, 0.47, 0.69 uptime = __salt__['cmd.run']('uptime') ldavg = uptime.split('load average') load_avg = ldavg[1].split() return {'1-min': load_avg[1].strip(','), ...
def _aix_loadavg(): ''' Return the load average on AIX ''' # 03:42PM up 9 days, 20:41, 2 users, load average: 0.28, 0.47, 0.69 uptime = __salt__['cmd.run']('uptime') ldavg = uptime.split('load average') load_avg = ldavg[1].split() return {'1-min': load_avg[1].strip(','), ...
[ "Return", "the", "load", "average", "on", "AIX" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L97-L107
[ "def", "_aix_loadavg", "(", ")", ":", "# 03:42PM up 9 days, 20:41, 2 users, load average: 0.28, 0.47, 0.69", "uptime", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'uptime'", ")", "ldavg", "=", "uptime", ".", "split", "(", "'load average'", ")", "load_avg", "="...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
procs
Return the process data .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.procs
salt/modules/status.py
def procs(): ''' Return the process data .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.procs ''' # Get the user, pid and cmd ret = {} uind = 0 pind = 0 cind = 0 plines = __salt__['cmd.run'](__grai...
def procs(): ''' Return the process data .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.procs ''' # Get the user, pid and cmd ret = {} uind = 0 pind = 0 cind = 0 plines = __salt__['cmd.run'](__grai...
[ "Return", "the", "process", "data" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L118-L154
[ "def", "procs", "(", ")", ":", "# Get the user, pid and cmd", "ret", "=", "{", "}", "uind", "=", "0", "pind", "=", "0", "cind", "=", "0", "plines", "=", "__salt__", "[", "'cmd.run'", "]", "(", "__grains__", "[", "'ps'", "]", ",", "python_shell", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
custom
Return a custom composite of status data and info for this minion, based on the minion config file. An example config like might be:: status.cpustats.custom: [ 'cpu', 'ctxt', 'btime', 'processes' ] Where status refers to status.py, cpustats is the function where we get our data, and custom is this...
salt/modules/status.py
def custom(): ''' Return a custom composite of status data and info for this minion, based on the minion config file. An example config like might be:: status.cpustats.custom: [ 'cpu', 'ctxt', 'btime', 'processes' ] Where status refers to status.py, cpustats is the function where we get ou...
def custom(): ''' Return a custom composite of status data and info for this minion, based on the minion config file. An example config like might be:: status.cpustats.custom: [ 'cpu', 'ctxt', 'btime', 'processes' ] Where status refers to status.py, cpustats is the function where we get ou...
[ "Return", "a", "custom", "composite", "of", "status", "data", "and", "info", "for", "this", "minion", "based", "on", "the", "minion", "config", "file", ".", "An", "example", "config", "like", "might", "be", "::" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L157-L189
[ "def", "custom", "(", ")", ":", "ret", "=", "{", "}", "conf", "=", "__salt__", "[", "'config.dot_vals'", "]", "(", "'status'", ")", "for", "key", ",", "val", "in", "six", ".", "iteritems", "(", "conf", ")", ":", "func", "=", "'{0}()'", ".", "format...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
uptime
Return the uptime for this system. .. versionchanged:: 2015.8.9 The uptime function was changed to return a dictionary of easy-to-read key/value pairs containing uptime information, instead of the output from a ``cmd.run`` call. .. versionchanged:: 2016.11.0 Support for OpenBSD...
salt/modules/status.py
def uptime(): ''' Return the uptime for this system. .. versionchanged:: 2015.8.9 The uptime function was changed to return a dictionary of easy-to-read key/value pairs containing uptime information, instead of the output from a ``cmd.run`` call. .. versionchanged:: 2016.11.0 ...
def uptime(): ''' Return the uptime for this system. .. versionchanged:: 2015.8.9 The uptime function was changed to return a dictionary of easy-to-read key/value pairs containing uptime information, instead of the output from a ``cmd.run`` call. .. versionchanged:: 2016.11.0 ...
[ "Return", "the", "uptime", "for", "this", "system", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L192-L265
[ "def", "uptime", "(", ")", ":", "curr_seconds", "=", "time", ".", "time", "(", ")", "# Get uptime in seconds", "if", "salt", ".", "utils", ".", "platform", ".", "is_linux", "(", ")", ":", "ut_path", "=", "\"/proc/uptime\"", "if", "not", "os", ".", "path"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
loadavg
Return the load averages for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.loadavg :raises CommandExecutionError: If the system cannot report loadaverages to Python
salt/modules/status.py
def loadavg(): ''' Return the load averages for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.loadavg :raises CommandExecutionError: If the system cannot report loadaverages to Python ''' if __gr...
def loadavg(): ''' Return the load averages for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.loadavg :raises CommandExecutionError: If the system cannot report loadaverages to Python ''' if __gr...
[ "Return", "the", "load", "averages", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L268-L293
[ "def", "loadavg", "(", ")", ":", "if", "__grains__", "[", "'kernel'", "]", "==", "'AIX'", ":", "return", "_aix_loadavg", "(", ")", "try", ":", "load_avg", "=", "os", ".", "getloadavg", "(", ")", "except", "AttributeError", ":", "# Some UNIX-based operating s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cpustats
Return the CPU stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpustats
salt/modules/status.py
def cpustats(): ''' Return the CPU stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpustats ''' def linux_cpustats(): ''...
def cpustats(): ''' Return the CPU stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpustats ''' def linux_cpustats(): ''...
[ "Return", "the", "CPU", "stats", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L296-L441
[ "def", "cpustats", "(", ")", ":", "def", "linux_cpustats", "(", ")", ":", "'''\n linux specific implementation of cpustats\n '''", "ret", "=", "{", "}", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/stat'", ",",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
meminfo
Return the memory info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.meminfo
salt/modules/status.py
def meminfo(): ''' Return the memory info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.meminfo ''' def linux_meminfo(): '''...
def meminfo(): ''' Return the memory info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.meminfo ''' def linux_meminfo(): '''...
[ "Return", "the", "memory", "info", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L444-L604
[ "def", "meminfo", "(", ")", ":", "def", "linux_meminfo", "(", ")", ":", "'''\n linux specific implementation of meminfo\n '''", "ret", "=", "{", "}", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/meminfo'", ",",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cpuinfo
.. versionchanged:: 2016.3.2 Return the CPU info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for NetBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpuinfo
salt/modules/status.py
def cpuinfo(): ''' .. versionchanged:: 2016.3.2 Return the CPU info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for NetBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpuinfo...
def cpuinfo(): ''' .. versionchanged:: 2016.3.2 Return the CPU info for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for NetBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.cpuinfo...
[ "..", "versionchanged", "::", "2016", ".", "3", ".", "2", "Return", "the", "CPU", "info", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L607-L812
[ "def", "cpuinfo", "(", ")", ":", "def", "linux_cpuinfo", "(", ")", ":", "'''\n linux specific cpuinfo implementation\n '''", "ret", "=", "{", "}", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/cpuinfo'", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
diskstats
.. versionchanged:: 2016.3.2 Return the disk stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.diskstats
salt/modules/status.py
def diskstats(): ''' .. versionchanged:: 2016.3.2 Return the disk stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.diskstats ''' def linux_diskstats(): ''' linux specific im...
def diskstats(): ''' .. versionchanged:: 2016.3.2 Return the disk stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.diskstats ''' def linux_diskstats(): ''' linux specific im...
[ "..", "versionchanged", "::", "2016", ".", "3", ".", "2", "Return", "the", "disk", "stats", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L815-L941
[ "def", "diskstats", "(", ")", ":", "def", "linux_diskstats", "(", ")", ":", "'''\n linux specific implementation of diskstats\n '''", "ret", "=", "{", "}", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/diskstats'"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
diskusage
Return the disk usage for this minion Usage:: salt '*' status.diskusage [paths and/or filesystem types] CLI Example: .. code-block:: bash salt '*' status.diskusage # usage for all filesystems salt '*' status.diskusage / /tmp # usage for / and /tmp salt '*' statu...
salt/modules/status.py
def diskusage(*args): ''' Return the disk usage for this minion Usage:: salt '*' status.diskusage [paths and/or filesystem types] CLI Example: .. code-block:: bash salt '*' status.diskusage # usage for all filesystems salt '*' status.diskusage / /tmp # usage for...
def diskusage(*args): ''' Return the disk usage for this minion Usage:: salt '*' status.diskusage [paths and/or filesystem types] CLI Example: .. code-block:: bash salt '*' status.diskusage # usage for all filesystems salt '*' status.diskusage / /tmp # usage for...
[ "Return", "the", "disk", "usage", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L944-L1017
[ "def", "diskusage", "(", "*", "args", ")", ":", "selected", "=", "set", "(", ")", "fstypes", "=", "set", "(", ")", "if", "not", "args", ":", "# select all filesystems", "fstypes", ".", "add", "(", "'*'", ")", "else", ":", "for", "arg", "in", "args", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
vmstats
.. versionchanged:: 2016.3.2 Return the virtual memory stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.vmstats
salt/modules/status.py
def vmstats(): ''' .. versionchanged:: 2016.3.2 Return the virtual memory stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.vmstats ''' def linux_vmstats(): ''' linux specifi...
def vmstats(): ''' .. versionchanged:: 2016.3.2 Return the virtual memory stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.vmstats ''' def linux_vmstats(): ''' linux specifi...
[ "..", "versionchanged", "::", "2016", ".", "3", ".", "2", "Return", "the", "virtual", "memory", "stats", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1020-L1074
[ "def", "vmstats", "(", ")", ":", "def", "linux_vmstats", "(", ")", ":", "'''\n linux specific implementation of vmstats\n '''", "ret", "=", "{", "}", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/vmstat'", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
nproc
Return the number of processing units available on this system .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for Darwin, FreeBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.nproc
salt/modules/status.py
def nproc(): ''' Return the number of processing units available on this system .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for Darwin, FreeBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.nproc ...
def nproc(): ''' Return the number of processing units available on this system .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for Darwin, FreeBSD and OpenBSD CLI Example: .. code-block:: bash salt '*' status.nproc ...
[ "Return", "the", "number", "of", "processing", "units", "available", "on", "this", "system" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1077-L1123
[ "def", "nproc", "(", ")", ":", "def", "linux_nproc", "(", ")", ":", "'''\n linux specific implementation of nproc\n '''", "try", ":", "return", "_number", "(", "__salt__", "[", "'cmd.run'", "]", "(", "'nproc'", ")", ".", "strip", "(", ")", ")", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
netstats
Return the network stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.netstats
salt/modules/status.py
def netstats(): ''' Return the network stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.netstats ''' def linux_netstats(): ...
def netstats(): ''' Return the network stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.netstats ''' def linux_netstats(): ...
[ "Return", "the", "network", "stats", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1126-L1251
[ "def", "netstats", "(", ")", ":", "def", "linux_netstats", "(", ")", ":", "'''\n linux specific netstats implementation\n '''", "ret", "=", "{", "}", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/net/netstat'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
netdev
.. versionchanged:: 2016.3.2 Return the network device stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.netdev
salt/modules/status.py
def netdev(): ''' .. versionchanged:: 2016.3.2 Return the network device stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.netdev ''' def linux_netdev(): ''' linux specific i...
def netdev(): ''' .. versionchanged:: 2016.3.2 Return the network device stats for this minion .. versionchanged:: 2016.11.4 Added support for AIX CLI Example: .. code-block:: bash salt '*' status.netdev ''' def linux_netdev(): ''' linux specific i...
[ "..", "versionchanged", "::", "2016", ".", "3", ".", "2", "Return", "the", "network", "device", "stats", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1254-L1431
[ "def", "netdev", "(", ")", ":", "def", "linux_netdev", "(", ")", ":", "'''\n linux specific implementation of netdev\n '''", "ret", "=", "{", "}", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/net/dev'", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
w
Return a list of logged in users for this minion, using the w command CLI Example: .. code-block:: bash salt '*' status.w
salt/modules/status.py
def w(): # pylint: disable=C0103 ''' Return a list of logged in users for this minion, using the w command CLI Example: .. code-block:: bash salt '*' status.w ''' def linux_w(): ''' Linux specific implementation for w ''' user_list = [] users =...
def w(): # pylint: disable=C0103 ''' Return a list of logged in users for this minion, using the w command CLI Example: .. code-block:: bash salt '*' status.w ''' def linux_w(): ''' Linux specific implementation for w ''' user_list = [] users =...
[ "Return", "a", "list", "of", "logged", "in", "users", "for", "this", "minion", "using", "the", "w", "command" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1434-L1492
[ "def", "w", "(", ")", ":", "# pylint: disable=C0103", "def", "linux_w", "(", ")", ":", "'''\n Linux specific implementation for w\n '''", "user_list", "=", "[", "]", "users", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'w -fh'", ")", ".", "splitlin...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
all_status
Return a composite of all status data and info for this minion. Warning: There is a LOT here! CLI Example: .. code-block:: bash salt '*' status.all_status
salt/modules/status.py
def all_status(): ''' Return a composite of all status data and info for this minion. Warning: There is a LOT here! CLI Example: .. code-block:: bash salt '*' status.all_status ''' return {'cpuinfo': cpuinfo(), 'cpustats': cpustats(), 'diskstats': diskstats...
def all_status(): ''' Return a composite of all status data and info for this minion. Warning: There is a LOT here! CLI Example: .. code-block:: bash salt '*' status.all_status ''' return {'cpuinfo': cpuinfo(), 'cpustats': cpustats(), 'diskstats': diskstats...
[ "Return", "a", "composite", "of", "all", "status", "data", "and", "info", "for", "this", "minion", ".", "Warning", ":", "There", "is", "a", "LOT", "here!" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1495-L1516
[ "def", "all_status", "(", ")", ":", "return", "{", "'cpuinfo'", ":", "cpuinfo", "(", ")", ",", "'cpustats'", ":", "cpustats", "(", ")", ",", "'diskstats'", ":", "diskstats", "(", ")", ",", "'diskusage'", ":", "diskusage", "(", ")", ",", "'loadavg'", ":...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
pid
Return the PID or an empty string if the process is running or not. Pass a signature to use to find the process via ps. Note you can pass a Python-compatible regular expression to return all pids of processes matching the regexp. .. versionchanged:: 2016.11.4 Added support for AIX CLI Exa...
salt/modules/status.py
def pid(sig): ''' Return the PID or an empty string if the process is running or not. Pass a signature to use to find the process via ps. Note you can pass a Python-compatible regular expression to return all pids of processes matching the regexp. .. versionchanged:: 2016.11.4 Added su...
def pid(sig): ''' Return the PID or an empty string if the process is running or not. Pass a signature to use to find the process via ps. Note you can pass a Python-compatible regular expression to return all pids of processes matching the regexp. .. versionchanged:: 2016.11.4 Added su...
[ "Return", "the", "PID", "or", "an", "empty", "string", "if", "the", "process", "is", "running", "or", "not", ".", "Pass", "a", "signature", "to", "use", "to", "find", "the", "process", "via", "ps", ".", "Note", "you", "can", "pass", "a", "Python", "-...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1519-L1548
[ "def", "pid", "(", "sig", ")", ":", "cmd", "=", "__grains__", "[", "'ps'", "]", "output", "=", "__salt__", "[", "'cmd.run_stdout'", "]", "(", "cmd", ",", "python_shell", "=", "True", ")", "pids", "=", "''", "for", "line", "in", "output", ".", "splitl...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
version
Return the system version for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.version
salt/modules/status.py
def version(): ''' Return the system version for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.version ''' def linux_version(): ...
def version(): ''' Return the system version for this minion .. versionchanged:: 2016.11.4 Added support for AIX .. versionchanged:: 2018.3.0 Added support for OpenBSD CLI Example: .. code-block:: bash salt '*' status.version ''' def linux_version(): ...
[ "Return", "the", "system", "version", "for", "this", "minion" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1551-L1592
[ "def", "version", "(", ")", ":", "def", "linux_version", "(", ")", ":", "'''\n linux specific implementation of version\n '''", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/version'", ",", "'r'", ")", "as", "fp...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
master
.. versionadded:: 2014.7.0 Return the connection status with master. Fire an event if the connection to master is not as expected. This function is meant to be run via a scheduled job from the minion. If master_ip is an FQDN/Hostname, it must be resolvable to a valid IPv4 address. .. versionchange...
salt/modules/status.py
def master(master=None, connected=True): ''' .. versionadded:: 2014.7.0 Return the connection status with master. Fire an event if the connection to master is not as expected. This function is meant to be run via a scheduled job from the minion. If master_ip is an FQDN/Hostname, it must be reso...
def master(master=None, connected=True): ''' .. versionadded:: 2014.7.0 Return the connection status with master. Fire an event if the connection to master is not as expected. This function is meant to be run via a scheduled job from the minion. If master_ip is an FQDN/Hostname, it must be reso...
[ "..", "versionadded", "::", "2014", ".", "7", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1595-L1639
[ "def", "master", "(", "master", "=", "None", ",", "connected", "=", "True", ")", ":", "master_ips", "=", "None", "if", "master", ":", "master_ips", "=", "salt", ".", "utils", ".", "network", ".", "host_to_ips", "(", "master", ")", "if", "not", "master_...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ping_master
.. versionadded:: 2016.3.0 Sends ping request to the given master. Fires '__master_failback' event on success. Returns bool result. CLI Example: .. code-block:: bash salt '*' status.ping_master localhost
salt/modules/status.py
def ping_master(master): ''' .. versionadded:: 2016.3.0 Sends ping request to the given master. Fires '__master_failback' event on success. Returns bool result. CLI Example: .. code-block:: bash salt '*' status.ping_master localhost ''' if master is None or master == '': ...
def ping_master(master): ''' .. versionadded:: 2016.3.0 Sends ping request to the given master. Fires '__master_failback' event on success. Returns bool result. CLI Example: .. code-block:: bash salt '*' status.ping_master localhost ''' if master is None or master == '': ...
[ "..", "versionadded", "::", "2016", ".", "3", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1642-L1683
[ "def", "ping_master", "(", "master", ")", ":", "if", "master", "is", "None", "or", "master", "==", "''", ":", "return", "False", "opts", "=", "copy", ".", "deepcopy", "(", "__opts__", ")", "opts", "[", "'master'", "]", "=", "master", "if", "'master_ip'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
proxy_reconnect
Forces proxy minion reconnection when not alive. proxy_name The virtual name of the proxy module. opts: None Opts dictionary. Not intended for CLI usage. CLI Example: salt '*' status.proxy_reconnect rest_sample
salt/modules/status.py
def proxy_reconnect(proxy_name, opts=None): ''' Forces proxy minion reconnection when not alive. proxy_name The virtual name of the proxy module. opts: None Opts dictionary. Not intended for CLI usage. CLI Example: salt '*' status.proxy_reconnect rest_sample ''' ...
def proxy_reconnect(proxy_name, opts=None): ''' Forces proxy minion reconnection when not alive. proxy_name The virtual name of the proxy module. opts: None Opts dictionary. Not intended for CLI usage. CLI Example: salt '*' status.proxy_reconnect rest_sample ''' ...
[ "Forces", "proxy", "minion", "reconnection", "when", "not", "alive", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/status.py#L1686-L1719
[ "def", "proxy_reconnect", "(", "proxy_name", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "if", "'proxy'", "not", "in", "opts", ":", "return", "False", "# fail", "proxy_keepalive_fn", "=", "proxy_name", "+", "'.ali...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_revoked_to_list
Turn the mess of OrderedDicts and Lists into a list of dicts for use in the CRL module.
salt/states/x509.py
def _revoked_to_list(revs): ''' Turn the mess of OrderedDicts and Lists into a list of dicts for use in the CRL module. ''' list_ = [] for rev in revs: for rev_name, props in six.iteritems( rev): # pylint: disable=unused-variable dict_ = {} ...
def _revoked_to_list(revs): ''' Turn the mess of OrderedDicts and Lists into a list of dicts for use in the CRL module. ''' list_ = [] for rev in revs: for rev_name, props in six.iteritems( rev): # pylint: disable=unused-variable dict_ = {} ...
[ "Turn", "the", "mess", "of", "OrderedDicts", "and", "Lists", "into", "a", "list", "of", "dicts", "for", "use", "in", "the", "CRL", "module", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/x509.py#L187-L205
[ "def", "_revoked_to_list", "(", "revs", ")", ":", "list_", "=", "[", "]", "for", "rev", "in", "revs", ":", "for", "rev_name", ",", "props", "in", "six", ".", "iteritems", "(", "rev", ")", ":", "# pylint: disable=unused-variable", "dict_", "=", "{", "}", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
private_key_managed
Manage a private key's existence. name: Path to the private key bits: Key length in bits. Default 2048. passphrase: Passphrase for encrypting the private key. cipher: Cipher for encrypting the private key. new: Always create a new key. Defaults to False. ...
salt/states/x509.py
def private_key_managed(name, bits=2048, passphrase=None, cipher='aes_128_cbc', new=False, overwrite=False, verbose=True, **kwargs): ''' Manage ...
def private_key_managed(name, bits=2048, passphrase=None, cipher='aes_128_cbc', new=False, overwrite=False, verbose=True, **kwargs): ''' Manage ...
[ "Manage", "a", "private", "key", "s", "existence", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/x509.py#L246-L320
[ "def", "private_key_managed", "(", "name", ",", "bits", "=", "2048", ",", "passphrase", "=", "None", ",", "cipher", "=", "'aes_128_cbc'", ",", "new", "=", "False", ",", "overwrite", "=", "False", ",", "verbose", "=", "True", ",", "*", "*", "kwargs", ")...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
csr_managed
Manage a Certificate Signing Request name: Path to the CSR properties: The properties to be added to the certificate request, including items like subject, extensions and public key. See above for valid properties. kwargs: Any arguments supported by :py:func:`file.managed ...
salt/states/x509.py
def csr_managed(name, **kwargs): ''' Manage a Certificate Signing Request name: Path to the CSR properties: The properties to be added to the certificate request, including items like subject, extensions and public key. See above for valid properties. kwarg...
def csr_managed(name, **kwargs): ''' Manage a Certificate Signing Request name: Path to the CSR properties: The properties to be added to the certificate request, including items like subject, extensions and public key. See above for valid properties. kwarg...
[ "Manage", "a", "Certificate", "Signing", "Request" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/x509.py#L323-L385
[ "def", "csr_managed", "(", "name", ",", "*", "*", "kwargs", ")", ":", "try", ":", "old", "=", "__salt__", "[", "'x509.read_csr'", "]", "(", "name", ")", "except", "salt", ".", "exceptions", ".", "SaltInvocationError", ":", "old", "=", "'{0} is not a valid ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
certificate_managed
Manage a Certificate name Path to the certificate days_remaining : 90 The minimum number of days remaining when the certificate should be recreated. A value of 0 disables automatic renewal. managed_private_key Manages the private key corresponding to the certificate. All o...
salt/states/x509.py
def certificate_managed(name, days_remaining=90, managed_private_key=None, append_certs=None, **kwargs): ''' Manage a Certificate name Path to the certificate days_remaining : 90 The minimum...
def certificate_managed(name, days_remaining=90, managed_private_key=None, append_certs=None, **kwargs): ''' Manage a Certificate name Path to the certificate days_remaining : 90 The minimum...
[ "Manage", "a", "Certificate" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/x509.py#L388-L610
[ "def", "certificate_managed", "(", "name", ",", "days_remaining", "=", "90", ",", "managed_private_key", "=", "None", ",", "append_certs", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "'path'", "in", "kwargs", ":", "name", "=", "kwargs", ".", "p...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
crl_managed
Manage a Certificate Revocation List name Path to the certificate signing_private_key The private key that will be used to sign this crl. This is usually your CA's private key. signing_private_key_passphrase Passphrase to decrypt the private key. signing_cert ...
salt/states/x509.py
def crl_managed(name, signing_private_key, signing_private_key_passphrase=None, signing_cert=None, revoked=None, days_valid=100, digest="", days_remaining=30, include_expired=False, ...
def crl_managed(name, signing_private_key, signing_private_key_passphrase=None, signing_cert=None, revoked=None, days_valid=100, digest="", days_remaining=30, include_expired=False, ...
[ "Manage", "a", "Certificate", "Revocation", "List" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/x509.py#L613-L731
[ "def", "crl_managed", "(", "name", ",", "signing_private_key", ",", "signing_private_key_passphrase", "=", "None", ",", "signing_cert", "=", "None", ",", "revoked", "=", "None", ",", "days_valid", "=", "100", ",", "digest", "=", "\"\"", ",", "days_remaining", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
pem_managed
Manage the contents of a PEM file directly with the content in text, ensuring correct formatting. name: The path to the file to manage text: The PEM formatted text to write. kwargs: Any arguments supported by :py:func:`file.managed <salt.states.file.managed>` are supported.
salt/states/x509.py
def pem_managed(name, text, backup=False, **kwargs): ''' Manage the contents of a PEM file directly with the content in text, ensuring correct formatting. name: The path to the file to manage text: The PEM formatted text to write. kw...
def pem_managed(name, text, backup=False, **kwargs): ''' Manage the contents of a PEM file directly with the content in text, ensuring correct formatting. name: The path to the file to manage text: The PEM formatted text to write. kw...
[ "Manage", "the", "contents", "of", "a", "PEM", "file", "directly", "with", "the", "content", "in", "text", "ensuring", "correct", "formatting", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/x509.py#L734-L753
[ "def", "pem_managed", "(", "name", ",", "text", ",", "backup", "=", "False", ",", "*", "*", "kwargs", ")", ":", "file_args", ",", "kwargs", "=", "_get_file_args", "(", "name", ",", "*", "*", "kwargs", ")", "file_args", "[", "'contents'", "]", "=", "s...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
date_cast
Casts any object into a datetime.datetime object date any datetime, time string representation...
salt/utils/dateutils.py
def date_cast(date): ''' Casts any object into a datetime.datetime object date any datetime, time string representation... ''' if date is None: return datetime.datetime.now() elif isinstance(date, datetime.datetime): return date # fuzzy date try: if isinst...
def date_cast(date): ''' Casts any object into a datetime.datetime object date any datetime, time string representation... ''' if date is None: return datetime.datetime.now() elif isinstance(date, datetime.datetime): return date # fuzzy date try: if isinst...
[ "Casts", "any", "object", "into", "a", "datetime", ".", "datetime", "object" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dateutils.py#L25-L60
[ "def", "date_cast", "(", "date", ")", ":", "if", "date", "is", "None", ":", "return", "datetime", ".", "datetime", ".", "now", "(", ")", "elif", "isinstance", "(", "date", ",", "datetime", ".", "datetime", ")", ":", "return", "date", "# fuzzy date", "t...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
present
Checks existance of the named user. If not present, creates the user with the specified roles and options. name The name of the user to manage login If not specified, will be created WITHOUT LOGIN domain Creates a Windows authentication user. Needs to be NetBIOS domain o...
salt/states/mssql_user.py
def present(name, login=None, domain=None, database=None, roles=None, options=None, **kwargs): ''' Checks existance of the named user. If not present, creates the user with the specified roles and options. name The name of the user to manage login If not specified, will be created W...
def present(name, login=None, domain=None, database=None, roles=None, options=None, **kwargs): ''' Checks existance of the named user. If not present, creates the user with the specified roles and options. name The name of the user to manage login If not specified, will be created W...
[ "Checks", "existance", "of", "the", "named", "user", ".", "If", "not", "present", "creates", "the", "user", "with", "the", "specified", "roles", "and", "options", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mssql_user.py#L37-L85
[ "def", "present", "(", "name", ",", "login", "=", "None", ",", "domain", "=", "None", ",", "database", "=", "None", ",", "roles", "=", "None", ",", "options", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
absent
Ensure that the named user is absent name The username of the user to remove
salt/states/mssql_user.py
def absent(name, **kwargs): ''' Ensure that the named user is absent name The username of the user to remove ''' ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''} if not __salt__['mssql.user_exists'](name): ret['comment'] = 'Use...
def absent(name, **kwargs): ''' Ensure that the named user is absent name The username of the user to remove ''' ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''} if not __salt__['mssql.user_exists'](name): ret['comment'] = 'Use...
[ "Ensure", "that", "the", "named", "user", "is", "absent" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mssql_user.py#L88-L114
[ "def", "absent", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "if", "not", "__salt__", "[", "'mssql.user_exi...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_strip_odict
dump to json and load it again, replaces OrderedDicts with regular ones
salt/modules/jinja.py
def _strip_odict(wrapped): ''' dump to json and load it again, replaces OrderedDicts with regular ones ''' @functools.wraps(wrapped) def strip(*args): return salt.utils.json.loads(salt.utils.json.dumps(wrapped(*args))) return strip
def _strip_odict(wrapped): ''' dump to json and load it again, replaces OrderedDicts with regular ones ''' @functools.wraps(wrapped) def strip(*args): return salt.utils.json.loads(salt.utils.json.dumps(wrapped(*args))) return strip
[ "dump", "to", "json", "and", "load", "it", "again", "replaces", "OrderedDicts", "with", "regular", "ones" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jinja.py#L23-L30
[ "def", "_strip_odict", "(", "wrapped", ")", ":", "@", "functools", ".", "wraps", "(", "wrapped", ")", "def", "strip", "(", "*", "args", ")", ":", "return", "salt", ".", "utils", ".", "json", ".", "loads", "(", "salt", ".", "utils", ".", "json", "."...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
load_map
Loads the map at the specified path, and returns the specified value from that map. CLI Example: .. code-block:: bash # Assuming the map is loaded in your formula SLS as follows: # # {% from "myformula/map.jinja" import myformula with context %} # # the following s...
salt/modules/jinja.py
def load_map(path, value): ''' Loads the map at the specified path, and returns the specified value from that map. CLI Example: .. code-block:: bash # Assuming the map is loaded in your formula SLS as follows: # # {% from "myformula/map.jinja" import myformula with context...
def load_map(path, value): ''' Loads the map at the specified path, and returns the specified value from that map. CLI Example: .. code-block:: bash # Assuming the map is loaded in your formula SLS as follows: # # {% from "myformula/map.jinja" import myformula with context...
[ "Loads", "the", "map", "at", "the", "specified", "path", "and", "returns", "the", "specified", "value", "from", "that", "map", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jinja.py#L34-L60
[ "def", "load_map", "(", "path", ",", "value", ")", ":", "tmplstr", "=", "textwrap", ".", "dedent", "(", "'''\\\n {{% from \"{path}\" import {value} with context %}}\n {{{{ {value} | tojson }}}}\n '''", ".", "format", "(", "path", "=", "path", ",", "va...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get
.. versionadded:: 0.14 Attempt to retrieve the named value from :ref:`in-memory pillar data <pillar-in-memory>`. If the pillar key is not present in the in-memory pillar, then the value specified in the ``default`` option (described below) will be returned. If the merge parameter is set to ``True`...
salt/modules/pillar.py
def get(key, default=KeyError, merge=False, merge_nested_lists=None, delimiter=DEFAULT_TARGET_DELIM, pillarenv=None, saltenv=None): ''' .. versionadded:: 0.14 Attempt to retrieve the named value from :ref:`in-memory pillar data <pillar-in-memory>`. If the...
def get(key, default=KeyError, merge=False, merge_nested_lists=None, delimiter=DEFAULT_TARGET_DELIM, pillarenv=None, saltenv=None): ''' .. versionadded:: 0.14 Attempt to retrieve the named value from :ref:`in-memory pillar data <pillar-in-memory>`. If the...
[ "..", "versionadded", "::", "0", ".", "14" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pillar.py#L32-L189
[ "def", "get", "(", "key", ",", "default", "=", "KeyError", ",", "merge", "=", "False", ",", "merge_nested_lists", "=", "None", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ",", "pillarenv", "=", "None", ",", "saltenv", "=", "None", ")", ":", "if", "not...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
items
Calls the master for a fresh pillar and generates the pillar data on the fly Contrast with :py:func:`raw` which returns the pillar data that is currently loaded into the minion. pillar If specified, allows for a dictionary of pillar data to be made available to pillar and ext_pillar re...
salt/modules/pillar.py
def items(*args, **kwargs): ''' Calls the master for a fresh pillar and generates the pillar data on the fly Contrast with :py:func:`raw` which returns the pillar data that is currently loaded into the minion. pillar If specified, allows for a dictionary of pillar data to be made ...
def items(*args, **kwargs): ''' Calls the master for a fresh pillar and generates the pillar data on the fly Contrast with :py:func:`raw` which returns the pillar data that is currently loaded into the minion. pillar If specified, allows for a dictionary of pillar data to be made ...
[ "Calls", "the", "master", "for", "a", "fresh", "pillar", "and", "generates", "the", "pillar", "data", "on", "the", "fly" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pillar.py#L192-L277
[ "def", "items", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Preserve backwards compatibility", "if", "args", ":", "return", "item", "(", "*", "args", ")", "pillarenv", "=", "kwargs", ".", "get", "(", "'pillarenv'", ")", "if", "pillarenv", "is...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_obfuscate_inner
Recursive obfuscation of collection types. Leaf or unknown Python types get replaced by the type name Known collection types trigger recursion. In the special case of mapping types, keys are not obfuscated
salt/modules/pillar.py
def _obfuscate_inner(var): ''' Recursive obfuscation of collection types. Leaf or unknown Python types get replaced by the type name Known collection types trigger recursion. In the special case of mapping types, keys are not obfuscated ''' if isinstance(var, (dict, salt.utils.odict.Ordered...
def _obfuscate_inner(var): ''' Recursive obfuscation of collection types. Leaf or unknown Python types get replaced by the type name Known collection types trigger recursion. In the special case of mapping types, keys are not obfuscated ''' if isinstance(var, (dict, salt.utils.odict.Ordered...
[ "Recursive", "obfuscation", "of", "collection", "types", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pillar.py#L284-L298
[ "def", "_obfuscate_inner", "(", "var", ")", ":", "if", "isinstance", "(", "var", ",", "(", "dict", ",", "salt", ".", "utils", ".", "odict", ".", "OrderedDict", ")", ")", ":", "return", "var", ".", "__class__", "(", "(", "key", ",", "_obfuscate_inner", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
item
.. versionadded:: 0.16.2 Return one or more pillar entries from the :ref:`in-memory pillar data <pillar-in-memory>`. delimiter Delimiter used to traverse nested dictionaries. .. note:: This is different from :py:func:`pillar.get <salt.modules.pillar.get>` in that n...
salt/modules/pillar.py
def item(*args, **kwargs): ''' .. versionadded:: 0.16.2 Return one or more pillar entries from the :ref:`in-memory pillar data <pillar-in-memory>`. delimiter Delimiter used to traverse nested dictionaries. .. note:: This is different from :py:func:`pillar.get ...
def item(*args, **kwargs): ''' .. versionadded:: 0.16.2 Return one or more pillar entries from the :ref:`in-memory pillar data <pillar-in-memory>`. delimiter Delimiter used to traverse nested dictionaries. .. note:: This is different from :py:func:`pillar.get ...
[ "..", "versionadded", "::", "0", ".", "16", ".", "2" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pillar.py#L350-L423
[ "def", "item", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "default", "=", "kwargs", ".", "get", "(", "'default'", ",", "''", ")", "delimiter", "=", "kwargs", ".", "get", "(", "'delimiter'", ",", "DEFAULT_TARGET_DELIM",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ext
.. versionchanged:: 2016.3.6,2016.11.3,2017.7.0 The supported ext_pillar types are now tunable using the :conf_master:`on_demand_ext_pillar` config option. Earlier releases used a hard-coded default. Generate the pillar and apply an explicit external pillar external A single e...
salt/modules/pillar.py
def ext(external, pillar=None): ''' .. versionchanged:: 2016.3.6,2016.11.3,2017.7.0 The supported ext_pillar types are now tunable using the :conf_master:`on_demand_ext_pillar` config option. Earlier releases used a hard-coded default. Generate the pillar and apply an explicit exter...
def ext(external, pillar=None): ''' .. versionchanged:: 2016.3.6,2016.11.3,2017.7.0 The supported ext_pillar types are now tunable using the :conf_master:`on_demand_ext_pillar` config option. Earlier releases used a hard-coded default. Generate the pillar and apply an explicit exter...
[ "..", "versionchanged", "::", "2016", ".", "3", ".", "6", "2016", ".", "11", ".", "3", "2017", ".", "7", ".", "0", "The", "supported", "ext_pillar", "types", "are", "now", "tunable", "using", "the", ":", "conf_master", ":", "on_demand_ext_pillar", "confi...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pillar.py#L452-L516
[ "def", "ext", "(", "external", ",", "pillar", "=", "None", ")", ":", "if", "isinstance", "(", "external", ",", "six", ".", "string_types", ")", ":", "external", "=", "salt", ".", "utils", ".", "yaml", ".", "safe_load", "(", "external", ")", "pillar_obj...
e8541fd6e744ab0df786c0f76102e41631f45d46