kv interface — VMware Salt API

kv interface — VMware Salt API

kv interface

The LoadedMod class allows for the module loaded onto the sub to return custom sequencing, for instance it can be iterated over to return all functions

delete_key(key: <class 'str'>)
Returns: <class 'int'>

Delete a key for the current user.

Parameters

key:The key to delete.

Returns the number of keys deleted (0 or 1).

delete_system_key(key: <class 'str'>)
Returns: <class 'int'>

Delete a system key. System keys are used internally and cannot be retrieved directly.

Parameters

key:The system key to delete.

Returns the number of system keys deleted (0 or 1).

get_key(key: <class 'str'>)
Returns: Union[NoneType, int, str, dict, list]

Get the value of a key for the current user.

Parameters

key:The key to get.

Returns the value of the key, or None if the key was not found.

list_keys()
Returns: list[str]

Get a list of key names for the current user.

Returns a (possibly empty) list of key names.

set_key(key: <class 'str'>, value: Union[NoneType, int, str, dict, list])

Set the value of a key for the current user.

Parameters

key:The key to set.
value:The key value.
set_system_key(key: <class 'str'>, value: Union[NoneType, int, str, dict, list])

Set the value of a system key. System keys are used internally and cannot be retrieved directly.

Parameters:

key:The system key to set.
value:The value to set.