repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
saltstack/salt
salt/states/kmod.py
_append_comment
def _append_comment(ret, comment): ''' append ``comment`` to ``ret['comment']`` ''' if ret['comment']: ret['comment'] = ret['comment'].rstrip() + '\n' + comment else: ret['comment'] = comment return ret
python
def _append_comment(ret, comment): ''' append ``comment`` to ``ret['comment']`` ''' if ret['comment']: ret['comment'] = ret['comment'].rstrip() + '\n' + comment else: ret['comment'] = comment return ret
[ "def", "_append_comment", "(", "ret", ",", "comment", ")", ":", "if", "ret", "[", "'comment'", "]", ":", "ret", "[", "'comment'", "]", "=", "ret", "[", "'comment'", "]", ".", "rstrip", "(", ")", "+", "'\\n'", "+", "comment", "else", ":", "ret", "["...
append ``comment`` to ``ret['comment']``
[ "append", "comment", "to", "ret", "[", "comment", "]" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/kmod.py#L43-L52
train
append comment to the end of the alphabetical tree
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/kmod.py
present
def present(name, persist=False, mods=None): ''' Ensure that the specified kernel module is loaded name The name of the kernel module to verify is loaded persist Also add module to ``/etc/modules`` mods A list of modules to verify are loaded. If this argument is used, the...
python
def present(name, persist=False, mods=None): ''' Ensure that the specified kernel module is loaded name The name of the kernel module to verify is loaded persist Also add module to ``/etc/modules`` mods A list of modules to verify are loaded. If this argument is used, the...
[ "def", "present", "(", "name", ",", "persist", "=", "False", ",", "mods", "=", "None", ")", ":", "if", "not", "isinstance", "(", "mods", ",", "(", "list", ",", "tuple", ")", ")", ":", "mods", "=", "[", "name", "]", "ret", "=", "{", "'name'", ":...
Ensure that the specified kernel module is loaded name The name of the kernel module to verify is loaded persist Also add module to ``/etc/modules`` mods A list of modules to verify are loaded. If this argument is used, the ``name`` argument, although still required, is n...
[ "Ensure", "that", "the", "specified", "kernel", "module", "is", "loaded" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/kmod.py#L55-L159
train
Ensure that the specified kernel module is present.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/kmod.py
absent
def absent(name, persist=False, comment=True, mods=None): ''' Verify that the named kernel module is not loaded name The name of the kernel module to verify is not loaded persist Remove module from ``/etc/modules`` comment Comment out module in ``/etc/modules`` rather than...
python
def absent(name, persist=False, comment=True, mods=None): ''' Verify that the named kernel module is not loaded name The name of the kernel module to verify is not loaded persist Remove module from ``/etc/modules`` comment Comment out module in ``/etc/modules`` rather than...
[ "def", "absent", "(", "name", ",", "persist", "=", "False", ",", "comment", "=", "True", ",", "mods", "=", "None", ")", ":", "if", "not", "isinstance", "(", "mods", ",", "(", "list", ",", "tuple", ")", ")", ":", "mods", "=", "[", "name", "]", "...
Verify that the named kernel module is not loaded name The name of the kernel module to verify is not loaded persist Remove module from ``/etc/modules`` comment Comment out module in ``/etc/modules`` rather than remove it mods A list of modules to verify are unloaded....
[ "Verify", "that", "the", "named", "kernel", "module", "is", "not", "loaded" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/kmod.py#L162-L245
train
Verify that the named kernel module is not loaded and that it is not loaded.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
_do
def _do(name, fun, path=None): ''' Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' host = find_guest(name, quiet=True, path=path) if not host: return False ...
python
def _do(name, fun, path=None): ''' Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' host = find_guest(name, quiet=True, path=path) if not host: return False ...
[ "def", "_do", "(", "name", ",", "fun", ",", "path", "=", "None", ")", ":", "host", "=", "find_guest", "(", "name", ",", "quiet", "=", "True", ",", "path", "=", "path", ")", "if", "not", "host", ":", "return", "False", "client", "=", "salt", ".", ...
Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0
[ "Invoke", "a", "function", "in", "the", "lxc", "module", "with", "no", "args" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L36-L61
train
Invoke a function in the lxc module with no args path to the container parent default is the system default
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
_do_names
def _do_names(names, fun, path=None): ''' Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' ret = {} hosts = find_guests(names, path=path) if not hosts: re...
python
def _do_names(names, fun, path=None): ''' Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' ret = {} hosts = find_guests(names, path=path) if not hosts: re...
[ "def", "_do_names", "(", "names", ",", "fun", ",", "path", "=", "None", ")", ":", "ret", "=", "{", "}", "hosts", "=", "find_guests", "(", "names", ",", "path", "=", "path", ")", "if", "not", "hosts", ":", "return", "False", "client", "=", "salt", ...
Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0
[ "Invoke", "a", "function", "in", "the", "lxc", "module", "with", "no", "args" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L64-L94
train
Invoke a function in the lxc module with no args path to the container parent parent default path to the container parent
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
find_guest
def find_guest(name, quiet=False, path=None): ''' Returns the host for a container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.find_guest name ''' if quiet: log...
python
def find_guest(name, quiet=False, path=None): ''' Returns the host for a container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.find_guest name ''' if quiet: log...
[ "def", "find_guest", "(", "name", ",", "quiet", "=", "False", ",", "path", "=", "None", ")", ":", "if", "quiet", ":", "log", ".", "warning", "(", "\"'quiet' argument is being deprecated.\"", "' Please migrate to --quiet'", ")", "for", "data", "in", "_list_iter",...
Returns the host for a container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.find_guest name
[ "Returns", "the", "host", "for", "a", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L97-L125
train
Returns the host for a container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
find_guests
def find_guests(names, path=None): ''' Return a dict of hosts and named guests path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' ret = {} names = names.split(',') for data in _list_iter(path=path): host,...
python
def find_guests(names, path=None): ''' Return a dict of hosts and named guests path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' ret = {} names = names.split(',') for data in _list_iter(path=path): host,...
[ "def", "find_guests", "(", "names", ",", "path", "=", "None", ")", ":", "ret", "=", "{", "}", "names", "=", "names", ".", "split", "(", "','", ")", "for", "data", "in", "_list_iter", "(", "path", "=", "path", ")", ":", "host", ",", "stat", "=", ...
Return a dict of hosts and named guests path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0
[ "Return", "a", "dict", "of", "hosts", "and", "named", "guests" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L128-L150
train
Return a dict of hosts and named guests
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
init
def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs): ''' Initialize a new container .. code-block:: bash salt-run lxc.init name host=minion_id [cpuset=cgroups_cpuset] \\ [cpushare=cgroups_cpushare] [memory=cgroups_memory] \\ [template=lxc_templa...
python
def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs): ''' Initialize a new container .. code-block:: bash salt-run lxc.init name host=minion_id [cpuset=cgroups_cpuset] \\ [cpushare=cgroups_cpushare] [memory=cgroups_memory] \\ [template=lxc_templa...
[ "def", "init", "(", "names", ",", "host", "=", "None", ",", "saltcloud_mode", "=", "False", ",", "quiet", "=", "False", ",", "*", "*", "kwargs", ")", ":", "path", "=", "kwargs", ".", "get", "(", "'path'", ",", "None", ")", "if", "quiet", ":", "lo...
Initialize a new container .. code-block:: bash salt-run lxc.init name host=minion_id [cpuset=cgroups_cpuset] \\ [cpushare=cgroups_cpushare] [memory=cgroups_memory] \\ [template=lxc_template_name] [clone=original name] \\ [profile=lxc_profile] [network_prof...
[ "Initialize", "a", "new", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L153-L405
train
Initialize a new container with the given names.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
cloud_init
def cloud_init(names, host=None, quiet=False, **kwargs): ''' Wrapper for using lxc.init in saltcloud compatibility mode names Name of the containers, supports a single name or a comma delimited list of names. host Minion to start the container on. Required. path pa...
python
def cloud_init(names, host=None, quiet=False, **kwargs): ''' Wrapper for using lxc.init in saltcloud compatibility mode names Name of the containers, supports a single name or a comma delimited list of names. host Minion to start the container on. Required. path pa...
[ "def", "cloud_init", "(", "names", ",", "host", "=", "None", ",", "quiet", "=", "False", ",", "*", "*", "kwargs", ")", ":", "if", "quiet", ":", "log", ".", "warning", "(", "\"'quiet' argument is being deprecated. Please migrate to --quiet\"", ")", "return", "_...
Wrapper for using lxc.init in saltcloud compatibility mode names Name of the containers, supports a single name or a comma delimited list of names. host Minion to start the container on. Required. path path to the container parent default: /var/lib/lxc (system defa...
[ "Wrapper", "for", "using", "lxc", ".", "init", "in", "saltcloud", "compatibility", "mode" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L408-L431
train
Wrapper for using lxc. init in saltcloud compatibility mode
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
_list_iter
def _list_iter(host=None, path=None): ''' Return a generator iterating over hosts path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' tgt = host or '*' client = salt.client.get_local_client(__opts__['conf_file']) f...
python
def _list_iter(host=None, path=None): ''' Return a generator iterating over hosts path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' tgt = host or '*' client = salt.client.get_local_client(__opts__['conf_file']) f...
[ "def", "_list_iter", "(", "host", "=", "None", ",", "path", "=", "None", ")", ":", "tgt", "=", "host", "or", "'*'", "client", "=", "salt", ".", "client", ".", "get_local_client", "(", "__opts__", "[", "'conf_file'", "]", ")", "for", "container_info", "...
Return a generator iterating over hosts path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0
[ "Return", "a", "generator", "iterating", "over", "hosts" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L434-L464
train
Return a generator iterating over hosts and paths to the container parent directories
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
list_
def list_(host=None, quiet=False, path=None): ''' List defined containers (running, stopped, and frozen) for the named (or all) host(s). path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-r...
python
def list_(host=None, quiet=False, path=None): ''' List defined containers (running, stopped, and frozen) for the named (or all) host(s). path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-r...
[ "def", "list_", "(", "host", "=", "None", ",", "quiet", "=", "False", ",", "path", "=", "None", ")", ":", "it", "=", "_list_iter", "(", "host", ",", "path", "=", "path", ")", "ret", "=", "{", "}", "for", "chunk", "in", "it", ":", "ret", ".", ...
List defined containers (running, stopped, and frozen) for the named (or all) host(s). path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.list [host=minion_id]
[ "List", "defined", "containers", "(", "running", "stopped", "and", "frozen", ")", "for", "the", "named", "(", "or", "all", ")", "host", "(", "s", ")", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L467-L489
train
List the named containers for the named host.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
purge
def purge(name, delete_key=True, quiet=False, path=None): ''' Purge the named container and delete its minion key if present. WARNING: Destroys all data associated with the container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 201...
python
def purge(name, delete_key=True, quiet=False, path=None): ''' Purge the named container and delete its minion key if present. WARNING: Destroys all data associated with the container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 201...
[ "def", "purge", "(", "name", ",", "delete_key", "=", "True", ",", "quiet", "=", "False", ",", "path", "=", "None", ")", ":", "data", "=", "_do_names", "(", "name", ",", "'destroy'", ",", "path", "=", "path", ")", "if", "data", "is", "False", ":", ...
Purge the named container and delete its minion key if present. WARNING: Destroys all data associated with the container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.purge name
[ "Purge", "the", "named", "container", "and", "delete", "its", "minion", "key", "if", "present", ".", "WARNING", ":", "Destroys", "all", "data", "associated", "with", "the", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L492-L521
train
Purge the named container and delete its minion key if present.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/lxc.py
start
def start(name, quiet=False, path=None): ''' Start the named container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.start name ''' data = _do_names(name, 'start', path=pa...
python
def start(name, quiet=False, path=None): ''' Start the named container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.start name ''' data = _do_names(name, 'start', path=pa...
[ "def", "start", "(", "name", ",", "quiet", "=", "False", ",", "path", "=", "None", ")", ":", "data", "=", "_do_names", "(", "name", ",", "'start'", ",", "path", "=", "path", ")", "if", "data", "and", "not", "quiet", ":", "__jid_event__", ".", "fire...
Start the named container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.start name
[ "Start", "the", "named", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/lxc.py#L524-L542
train
Start a named container.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
selinux_fs_path
def selinux_fs_path(): ''' Return the location of the SELinux VFS directory CLI Example: .. code-block:: bash salt '*' selinux.selinux_fs_path ''' # systems running systemd (e.g. Fedora 15 and newer) # have the selinux filesystem in a different location try: for direct...
python
def selinux_fs_path(): ''' Return the location of the SELinux VFS directory CLI Example: .. code-block:: bash salt '*' selinux.selinux_fs_path ''' # systems running systemd (e.g. Fedora 15 and newer) # have the selinux filesystem in a different location try: for direct...
[ "def", "selinux_fs_path", "(", ")", ":", "# systems running systemd (e.g. Fedora 15 and newer)", "# have the selinux filesystem in a different location", "try", ":", "for", "directory", "in", "(", "'/sys/fs/selinux'", ",", "'/selinux'", ")", ":", "if", "os", ".", "path", ...
Return the location of the SELinux VFS directory CLI Example: .. code-block:: bash salt '*' selinux.selinux_fs_path
[ "Return", "the", "location", "of", "the", "SELinux", "VFS", "directory" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L62-L82
train
Return the location of the SELinux VFS directory
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
getenforce
def getenforce(): ''' Return the mode selinux is running in CLI Example: .. code-block:: bash salt '*' selinux.getenforce ''' _selinux_fs_path = selinux_fs_path() if _selinux_fs_path is None: return 'Disabled' try: enforce = os.path.join(_selinux_fs_path, 'enfo...
python
def getenforce(): ''' Return the mode selinux is running in CLI Example: .. code-block:: bash salt '*' selinux.getenforce ''' _selinux_fs_path = selinux_fs_path() if _selinux_fs_path is None: return 'Disabled' try: enforce = os.path.join(_selinux_fs_path, 'enfo...
[ "def", "getenforce", "(", ")", ":", "_selinux_fs_path", "=", "selinux_fs_path", "(", ")", "if", "_selinux_fs_path", "is", "None", ":", "return", "'Disabled'", "try", ":", "enforce", "=", "os", ".", "path", ".", "join", "(", "_selinux_fs_path", ",", "'enforce...
Return the mode selinux is running in CLI Example: .. code-block:: bash salt '*' selinux.getenforce
[ "Return", "the", "mode", "selinux", "is", "running", "in" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L85-L106
train
Return the mode selinux is running in CLI Example : bash salt '*' selinux. getenforce
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
getconfig
def getconfig(): ''' Return the selinux mode from the config file CLI Example: .. code-block:: bash salt '*' selinux.getconfig ''' try: config = '/etc/selinux/config' with salt.utils.files.fopen(config, 'r') as _fp: for line in _fp: line = s...
python
def getconfig(): ''' Return the selinux mode from the config file CLI Example: .. code-block:: bash salt '*' selinux.getconfig ''' try: config = '/etc/selinux/config' with salt.utils.files.fopen(config, 'r') as _fp: for line in _fp: line = s...
[ "def", "getconfig", "(", ")", ":", "try", ":", "config", "=", "'/etc/selinux/config'", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "config", ",", "'r'", ")", "as", "_fp", ":", "for", "line", "in", "_fp", ":", "line", "=", "salt", ...
Return the selinux mode from the config file CLI Example: .. code-block:: bash salt '*' selinux.getconfig
[ "Return", "the", "selinux", "mode", "from", "the", "config", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L109-L128
train
Return the selinux mode from the config file
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
setenforce
def setenforce(mode): ''' Set the SELinux enforcing mode CLI Example: .. code-block:: bash salt '*' selinux.setenforce enforcing ''' if isinstance(mode, six.string_types): if mode.lower() == 'enforcing': mode = '1' modestring = 'Enforcing' elif ...
python
def setenforce(mode): ''' Set the SELinux enforcing mode CLI Example: .. code-block:: bash salt '*' selinux.setenforce enforcing ''' if isinstance(mode, six.string_types): if mode.lower() == 'enforcing': mode = '1' modestring = 'Enforcing' elif ...
[ "def", "setenforce", "(", "mode", ")", ":", "if", "isinstance", "(", "mode", ",", "six", ".", "string_types", ")", ":", "if", "mode", ".", "lower", "(", ")", "==", "'enforcing'", ":", "mode", "=", "'1'", "modestring", "=", "'Enforcing'", "elif", "mode"...
Set the SELinux enforcing mode CLI Example: .. code-block:: bash salt '*' selinux.setenforce enforcing
[ "Set", "the", "SELinux", "enforcing", "mode" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L131-L186
train
Set the SELinux enforcing mode for the current node
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
setsebool
def setsebool(boolean, value, persist=False): ''' Set the value for a boolean CLI Example: .. code-block:: bash salt '*' selinux.setsebool virt_use_usb off ''' if persist: cmd = 'setsebool -P {0} {1}'.format(boolean, value) else: cmd = 'setsebool {0} {1}'.format(bo...
python
def setsebool(boolean, value, persist=False): ''' Set the value for a boolean CLI Example: .. code-block:: bash salt '*' selinux.setsebool virt_use_usb off ''' if persist: cmd = 'setsebool -P {0} {1}'.format(boolean, value) else: cmd = 'setsebool {0} {1}'.format(bo...
[ "def", "setsebool", "(", "boolean", ",", "value", ",", "persist", "=", "False", ")", ":", "if", "persist", ":", "cmd", "=", "'setsebool -P {0} {1}'", ".", "format", "(", "boolean", ",", "value", ")", "else", ":", "cmd", "=", "'setsebool {0} {1}'", ".", "...
Set the value for a boolean CLI Example: .. code-block:: bash salt '*' selinux.setsebool virt_use_usb off
[ "Set", "the", "value", "for", "a", "boolean" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L202-L216
train
Set the value for a boolean CLI Example : bash virt_use_usb off
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
setsebools
def setsebools(pairs, persist=False): ''' Set the value of multiple booleans CLI Example: .. code-block:: bash salt '*' selinux.setsebools '{virt_use_usb: on, squid_use_tproxy: off}' ''' if not isinstance(pairs, dict): return {} if persist: cmd = 'setsebool -P ' ...
python
def setsebools(pairs, persist=False): ''' Set the value of multiple booleans CLI Example: .. code-block:: bash salt '*' selinux.setsebools '{virt_use_usb: on, squid_use_tproxy: off}' ''' if not isinstance(pairs, dict): return {} if persist: cmd = 'setsebool -P ' ...
[ "def", "setsebools", "(", "pairs", ",", "persist", "=", "False", ")", ":", "if", "not", "isinstance", "(", "pairs", ",", "dict", ")", ":", "return", "{", "}", "if", "persist", ":", "cmd", "=", "'setsebool -P '", "else", ":", "cmd", "=", "'setsebool '",...
Set the value of multiple booleans CLI Example: .. code-block:: bash salt '*' selinux.setsebools '{virt_use_usb: on, squid_use_tproxy: off}'
[ "Set", "the", "value", "of", "multiple", "booleans" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L219-L237
train
Set the value of multiple booleans CLI Example : Set the value of multiple booleans
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
list_sebool
def list_sebool(): ''' Return a structure listing all of the selinux booleans on the system and what state they are in CLI Example: .. code-block:: bash salt '*' selinux.list_sebool ''' bdata = __salt__['cmd.run']('semanage boolean -l').splitlines() ret = {} for line in bd...
python
def list_sebool(): ''' Return a structure listing all of the selinux booleans on the system and what state they are in CLI Example: .. code-block:: bash salt '*' selinux.list_sebool ''' bdata = __salt__['cmd.run']('semanage boolean -l').splitlines() ret = {} for line in bd...
[ "def", "list_sebool", "(", ")", ":", "bdata", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'semanage boolean -l'", ")", ".", "splitlines", "(", ")", "ret", "=", "{", "}", "for", "line", "in", "bdata", "[", "1", ":", "]", ":", "if", "not", "line", ...
Return a structure listing all of the selinux booleans on the system and what state they are in CLI Example: .. code-block:: bash salt '*' selinux.list_sebool
[ "Return", "a", "structure", "listing", "all", "of", "the", "selinux", "booleans", "on", "the", "system", "and", "what", "state", "they", "are", "in" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L240-L260
train
Return a list of the selinux booleans on the system and what state they are in
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
setsemod
def setsemod(module, state): ''' Enable or disable an SELinux module. CLI Example: .. code-block:: bash salt '*' selinux.setsemod nagios Enabled .. versionadded:: 2016.3.0 ''' if state.lower() == 'enabled': cmd = 'semodule -e {0}'.format(module) elif state.lower() == ...
python
def setsemod(module, state): ''' Enable or disable an SELinux module. CLI Example: .. code-block:: bash salt '*' selinux.setsemod nagios Enabled .. versionadded:: 2016.3.0 ''' if state.lower() == 'enabled': cmd = 'semodule -e {0}'.format(module) elif state.lower() == ...
[ "def", "setsemod", "(", "module", ",", "state", ")", ":", "if", "state", ".", "lower", "(", ")", "==", "'enabled'", ":", "cmd", "=", "'semodule -e {0}'", ".", "format", "(", "module", ")", "elif", "state", ".", "lower", "(", ")", "==", "'disabled'", ...
Enable or disable an SELinux module. CLI Example: .. code-block:: bash salt '*' selinux.setsemod nagios Enabled .. versionadded:: 2016.3.0
[ "Enable", "or", "disable", "an", "SELinux", "module", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L278-L294
train
Enable or disable an SELinux module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
install_semod
def install_semod(module_path): ''' Install custom SELinux module from file CLI Example: .. code-block:: bash salt '*' selinux.install_semod [salt://]path/to/module.pp .. versionadded:: 2016.11.6 ''' if module_path.find('salt://') == 0: module_path = __salt__['cp.cache_fi...
python
def install_semod(module_path): ''' Install custom SELinux module from file CLI Example: .. code-block:: bash salt '*' selinux.install_semod [salt://]path/to/module.pp .. versionadded:: 2016.11.6 ''' if module_path.find('salt://') == 0: module_path = __salt__['cp.cache_fi...
[ "def", "install_semod", "(", "module_path", ")", ":", "if", "module_path", ".", "find", "(", "'salt://'", ")", "==", "0", ":", "module_path", "=", "__salt__", "[", "'cp.cache_file'", "]", "(", "module_path", ")", "cmd", "=", "'semodule -i {0}'", ".", "format...
Install custom SELinux module from file CLI Example: .. code-block:: bash salt '*' selinux.install_semod [salt://]path/to/module.pp .. versionadded:: 2016.11.6
[ "Install", "custom", "SELinux", "module", "from", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L297-L312
train
Install custom SELinux module from file
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
list_semod
def list_semod(): ''' Return a structure listing all of the selinux modules on the system and what state they are in CLI Example: .. code-block:: bash salt '*' selinux.list_semod .. versionadded:: 2016.3.0 ''' helptext = __salt__['cmd.run']('semodule -h').splitlines() sem...
python
def list_semod(): ''' Return a structure listing all of the selinux modules on the system and what state they are in CLI Example: .. code-block:: bash salt '*' selinux.list_semod .. versionadded:: 2016.3.0 ''' helptext = __salt__['cmd.run']('semodule -h').splitlines() sem...
[ "def", "list_semod", "(", ")", ":", "helptext", "=", "__salt__", "[", "'cmd.run'", "]", "(", "'semodule -h'", ")", ".", "splitlines", "(", ")", "semodule_version", "=", "''", "for", "line", "in", "helptext", ":", "if", "line", ".", "strip", "(", ")", "...
Return a structure listing all of the selinux modules on the system and what state they are in CLI Example: .. code-block:: bash salt '*' selinux.list_semod .. versionadded:: 2016.3.0
[ "Return", "a", "structure", "listing", "all", "of", "the", "selinux", "modules", "on", "the", "system", "and", "what", "state", "they", "are", "in" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L331-L376
train
Return a structure listing all of the selinux modules on the system and ridge what state they are in
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
_parse_protocol_port
def _parse_protocol_port(name, protocol, port): ''' .. versionadded:: 2019.2.0 Validates and parses the protocol and port/port range from the name if both protocol and port are not provided. If the name is in a valid format, the protocol and port are ignored if provided Examples: tcp/8080 or ...
python
def _parse_protocol_port(name, protocol, port): ''' .. versionadded:: 2019.2.0 Validates and parses the protocol and port/port range from the name if both protocol and port are not provided. If the name is in a valid format, the protocol and port are ignored if provided Examples: tcp/8080 or ...
[ "def", "_parse_protocol_port", "(", "name", ",", "protocol", ",", "port", ")", ":", "protocol_port_pattern", "=", "r'^(tcp|udp)\\/(([\\d]+)\\-?[\\d]+)$'", "name_parts", "=", "re", ".", "match", "(", "protocol_port_pattern", ",", "name", ")", "if", "not", "name_parts...
.. versionadded:: 2019.2.0 Validates and parses the protocol and port/port range from the name if both protocol and port are not provided. If the name is in a valid format, the protocol and port are ignored if provided Examples: tcp/8080 or udp/20-21
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L391-L410
train
Parses the protocol and port range from the name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
_context_string_to_dict
def _context_string_to_dict(context): ''' .. versionadded:: 2017.7.0 Converts an SELinux file context from string to dict. ''' if not re.match('[^:]+:[^:]+:[^:]+:[^:]+$', context): raise SaltInvocationError('Invalid SELinux context string: {0}. ' + 'Expecte...
python
def _context_string_to_dict(context): ''' .. versionadded:: 2017.7.0 Converts an SELinux file context from string to dict. ''' if not re.match('[^:]+:[^:]+:[^:]+:[^:]+$', context): raise SaltInvocationError('Invalid SELinux context string: {0}. ' + 'Expecte...
[ "def", "_context_string_to_dict", "(", "context", ")", ":", "if", "not", "re", ".", "match", "(", "'[^:]+:[^:]+:[^:]+:[^:]+$'", ",", "context", ")", ":", "raise", "SaltInvocationError", "(", "'Invalid SELinux context string: {0}. '", "+", "'Expected \"sel_user:sel_role:se...
.. versionadded:: 2017.7.0 Converts an SELinux file context from string to dict.
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L422-L435
train
Converts an SELinux file context string to dict.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
fcontext_get_policy
def fcontext_get_policy(name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Returns the current entry in the SELinux policy list as a dictionary. Returns None if no exact match was found. Returned keys are: * filespec (the name supplied and match...
python
def fcontext_get_policy(name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Returns the current entry in the SELinux policy list as a dictionary. Returns None if no exact match was found. Returned keys are: * filespec (the name supplied and match...
[ "def", "fcontext_get_policy", "(", "name", ",", "filetype", "=", "None", ",", "sel_type", "=", "None", ",", "sel_user", "=", "None", ",", "sel_level", "=", "None", ")", ":", "if", "filetype", ":", "_validate_filetype", "(", "filetype", ")", "re_spacer", "=...
.. versionadded:: 2017.7.0 Returns the current entry in the SELinux policy list as a dictionary. Returns None if no exact match was found. Returned keys are: * filespec (the name supplied and matched) * filetype (the descriptive name of the filetype supplied) * sel_user, sel_role, sel_type, s...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L450-L503
train
Get the current SELinux policy list for a file or directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
fcontext_add_policy
def fcontext_add_policy(name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2019.2.0 Adds the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have to remove an entry before set...
python
def fcontext_add_policy(name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2019.2.0 Adds the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have to remove an entry before set...
[ "def", "fcontext_add_policy", "(", "name", ",", "filetype", "=", "None", ",", "sel_type", "=", "None", ",", "sel_user", "=", "None", ",", "sel_level", "=", "None", ")", ":", "return", "_fcontext_add_or_delete_policy", "(", "'add'", ",", "name", ",", "filetyp...
.. versionadded:: 2019.2.0 Adds the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have to remove an entry before setting a new one for a given filespec and filetype, as adding one with semanage automatically over...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L506-L542
train
Adds a SELinux policy to a context.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
fcontext_delete_policy
def fcontext_delete_policy(name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2019.2.0 Deletes the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have to remove an entry befo...
python
def fcontext_delete_policy(name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2019.2.0 Deletes the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have to remove an entry befo...
[ "def", "fcontext_delete_policy", "(", "name", ",", "filetype", "=", "None", ",", "sel_type", "=", "None", ",", "sel_user", "=", "None", ",", "sel_level", "=", "None", ")", ":", "return", "_fcontext_add_or_delete_policy", "(", "'delete'", ",", "name", ",", "f...
.. versionadded:: 2019.2.0 Deletes the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have to remove an entry before setting a new one for a given filespec and filetype, as adding one with semanage automatically o...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L545-L581
train
A function to delete an SELinux context.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
fcontext_add_or_delete_policy
def fcontext_add_or_delete_policy(action, name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Adds or deletes the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have ...
python
def fcontext_add_or_delete_policy(action, name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Adds or deletes the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have ...
[ "def", "fcontext_add_or_delete_policy", "(", "action", ",", "name", ",", "filetype", "=", "None", ",", "sel_type", "=", "None", ",", "sel_user", "=", "None", ",", "sel_level", "=", "None", ")", ":", "salt", ".", "utils", ".", "versions", ".", "warn_until",...
.. versionadded:: 2017.7.0 Adds or deletes the SELinux policy for a given filespec and other optional parameters. Returns the result of the call to semanage. Note that you don't have to remove an entry before setting a new one for a given filespec and filetype, as adding one with semanage automat...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L584-L637
train
Add or delete a SELinux policy for a given file or directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
_fcontext_add_or_delete_policy
def _fcontext_add_or_delete_policy(action, name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2019.2.0 Performs the action as called from ``fcontext_add_policy`` or ``fcontext_delete_policy``. Returns the result of the call to semanage. ''' if action not ...
python
def _fcontext_add_or_delete_policy(action, name, filetype=None, sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2019.2.0 Performs the action as called from ``fcontext_add_policy`` or ``fcontext_delete_policy``. Returns the result of the call to semanage. ''' if action not ...
[ "def", "_fcontext_add_or_delete_policy", "(", "action", ",", "name", ",", "filetype", "=", "None", ",", "sel_type", "=", "None", ",", "sel_user", "=", "None", ",", "sel_level", "=", "None", ")", ":", "if", "action", "not", "in", "[", "'add'", ",", "'dele...
.. versionadded:: 2019.2.0 Performs the action as called from ``fcontext_add_policy`` or ``fcontext_delete_policy``. Returns the result of the call to semanage.
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L640-L663
train
Add or delete a new resource from a semanage context.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
fcontext_policy_is_applied
def fcontext_policy_is_applied(name, recursive=False): ''' .. versionadded:: 2017.7.0 Returns an empty string if the SELinux policy for a given filespec is applied, returns string with differences in policy and actual situation otherwise. name filespec of the file or directory. Regex s...
python
def fcontext_policy_is_applied(name, recursive=False): ''' .. versionadded:: 2017.7.0 Returns an empty string if the SELinux policy for a given filespec is applied, returns string with differences in policy and actual situation otherwise. name filespec of the file or directory. Regex s...
[ "def", "fcontext_policy_is_applied", "(", "name", ",", "recursive", "=", "False", ")", ":", "cmd", "=", "'restorecon -n -v '", "if", "recursive", ":", "cmd", "+=", "'-R '", "cmd", "+=", "re", ".", "escape", "(", "name", ")", "return", "__salt__", "[", "'cm...
.. versionadded:: 2017.7.0 Returns an empty string if the SELinux policy for a given filespec is applied, returns string with differences in policy and actual situation otherwise. name filespec of the file or directory. Regex syntax is allowed. CLI Example: .. code-block:: bash ...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L666-L687
train
Returns a string with differences in policy and actual SELinux policy for a given filespec.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
fcontext_apply_policy
def fcontext_apply_policy(name, recursive=False): ''' .. versionadded:: 2017.7.0 Applies SElinux policies to filespec using `restorecon [-R] filespec`. Returns dict with changes if successful, the output of the restorecon command otherwise. name filespec of the file or directory. Regex...
python
def fcontext_apply_policy(name, recursive=False): ''' .. versionadded:: 2017.7.0 Applies SElinux policies to filespec using `restorecon [-R] filespec`. Returns dict with changes if successful, the output of the restorecon command otherwise. name filespec of the file or directory. Regex...
[ "def", "fcontext_apply_policy", "(", "name", ",", "recursive", "=", "False", ")", ":", "ret", "=", "{", "}", "changes_text", "=", "fcontext_policy_is_applied", "(", "name", ",", "recursive", ")", "cmd", "=", "'restorecon -v -F '", "if", "recursive", ":", "cmd"...
.. versionadded:: 2017.7.0 Applies SElinux policies to filespec using `restorecon [-R] filespec`. Returns dict with changes if successful, the output of the restorecon command otherwise. name filespec of the file or directory. Regex syntax is allowed. recursive Recursively apply S...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L690-L734
train
Applies SElinux policies to filespec using restorecon - R
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
port_get_policy
def port_get_policy(name, sel_type=None, protocol=None, port=None): ''' .. versionadded:: 2019.2.0 Returns the current entry in the SELinux policy list as a dictionary. Returns None if no exact match was found. Returned keys are: * sel_type (the selinux type) * proto (the protocol) * ...
python
def port_get_policy(name, sel_type=None, protocol=None, port=None): ''' .. versionadded:: 2019.2.0 Returns the current entry in the SELinux policy list as a dictionary. Returns None if no exact match was found. Returned keys are: * sel_type (the selinux type) * proto (the protocol) * ...
[ "def", "port_get_policy", "(", "name", ",", "sel_type", "=", "None", ",", "protocol", "=", "None", ",", "port", "=", "None", ")", ":", "(", "protocol", ",", "port", ")", "=", "_parse_protocol_port", "(", "name", ",", "protocol", ",", "port", ")", "re_s...
.. versionadded:: 2019.2.0 Returns the current entry in the SELinux policy list as a dictionary. Returns None if no exact match was found. Returned keys are: * sel_type (the selinux type) * proto (the protocol) * port (the port(s) and/or port range(s)) name The protocol and port ...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L737-L786
train
Return the current SELinux policy list for the specified port.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
port_add_policy
def port_add_policy(name, sel_type=None, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Adds the SELinux policy for a given protocol and port. Returns the result of the call to semanage. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port...
python
def port_add_policy(name, sel_type=None, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Adds the SELinux policy for a given protocol and port. Returns the result of the call to semanage. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port...
[ "def", "port_add_policy", "(", "name", ",", "sel_type", "=", "None", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "sel_range", "=", "None", ")", ":", "return", "_port_add_or_delete_policy", "(", "'add'", ",", "name", ",", "sel_type", ",", ...
.. versionadded:: 2019.2.0 Adds the SELinux policy for a given protocol and port. Returns the result of the call to semanage. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_type The SELinux Type. Required. protocol The protocol ...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L789-L819
train
Adds a SELinux policy for a given protocol and port.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/selinux.py
_port_add_or_delete_policy
def _port_add_or_delete_policy(action, name, sel_type=None, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Performs the action as called from ``port_add_policy`` or ``port_delete_policy``. Returns the result of the call to semanage. ''' if action not in ['add', 'dele...
python
def _port_add_or_delete_policy(action, name, sel_type=None, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Performs the action as called from ``port_add_policy`` or ``port_delete_policy``. Returns the result of the call to semanage. ''' if action not in ['add', 'dele...
[ "def", "_port_add_or_delete_policy", "(", "action", ",", "name", ",", "sel_type", "=", "None", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "sel_range", "=", "None", ")", ":", "if", "action", "not", "in", "[", "'add'", ",", "'delete'", ...
.. versionadded:: 2019.2.0 Performs the action as called from ``port_add_policy`` or ``port_delete_policy``. Returns the result of the call to semanage.
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/selinux.py#L849-L868
train
Add or delete a port policy.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
_get_conn
def _get_conn(opts, profile=None): ''' Establish a connection to etcd ''' if profile is None: profile = opts.get('etcd.returner') path = opts.get('etcd.returner_root', '/salt/return') return salt.utils.etcd_util.get_conn(opts, profile), path
python
def _get_conn(opts, profile=None): ''' Establish a connection to etcd ''' if profile is None: profile = opts.get('etcd.returner') path = opts.get('etcd.returner_root', '/salt/return') return salt.utils.etcd_util.get_conn(opts, profile), path
[ "def", "_get_conn", "(", "opts", ",", "profile", "=", "None", ")", ":", "if", "profile", "is", "None", ":", "profile", "=", "opts", ".", "get", "(", "'etcd.returner'", ")", "path", "=", "opts", ".", "get", "(", "'etcd.returner_root'", ",", "'/salt/return...
Establish a connection to etcd
[ "Establish", "a", "connection", "to", "etcd" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L97-L104
train
Establish a connection to etcd
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
returner
def returner(ret): ''' Return data to an etcd server or cluster ''' write_profile = __opts__.get('etcd.returner_write_profile') if write_profile: ttl = __opts__.get(write_profile, {}).get('etcd.ttl') else: ttl = __opts__.get('etcd.ttl') client, path = _get_conn(__opts__, wri...
python
def returner(ret): ''' Return data to an etcd server or cluster ''' write_profile = __opts__.get('etcd.returner_write_profile') if write_profile: ttl = __opts__.get(write_profile, {}).get('etcd.ttl') else: ttl = __opts__.get('etcd.ttl') client, path = _get_conn(__opts__, wri...
[ "def", "returner", "(", "ret", ")", ":", "write_profile", "=", "__opts__", ".", "get", "(", "'etcd.returner_write_profile'", ")", "if", "write_profile", ":", "ttl", "=", "__opts__", ".", "get", "(", "write_profile", ",", "{", "}", ")", ".", "get", "(", "...
Return data to an etcd server or cluster
[ "Return", "data", "to", "an", "etcd", "server", "or", "cluster" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L107-L134
train
Return data to an etcd server or cluster
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
save_load
def save_load(jid, load, minions=None): ''' Save the load to the specified jid ''' log.debug('sdstack_etcd returner <save_load> called jid: %s', jid) write_profile = __opts__.get('etcd.returner_write_profile') client, path = _get_conn(__opts__, write_profile) if write_profile: ttl = ...
python
def save_load(jid, load, minions=None): ''' Save the load to the specified jid ''' log.debug('sdstack_etcd returner <save_load> called jid: %s', jid) write_profile = __opts__.get('etcd.returner_write_profile') client, path = _get_conn(__opts__, write_profile) if write_profile: ttl = ...
[ "def", "save_load", "(", "jid", ",", "load", ",", "minions", "=", "None", ")", ":", "log", ".", "debug", "(", "'sdstack_etcd returner <save_load> called jid: %s'", ",", "jid", ")", "write_profile", "=", "__opts__", ".", "get", "(", "'etcd.returner_write_profile'",...
Save the load to the specified jid
[ "Save", "the", "load", "to", "the", "specified", "jid" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L137-L152
train
Save the load to the specified jid
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
get_load
def get_load(jid): ''' Return the load data that marks a specified jid ''' log.debug('sdstack_etcd returner <get_load> called jid: %s', jid) read_profile = __opts__.get('etcd.returner_read_profile') client, path = _get_conn(__opts__, read_profile) return salt.utils.json.loads(client.get('/'....
python
def get_load(jid): ''' Return the load data that marks a specified jid ''' log.debug('sdstack_etcd returner <get_load> called jid: %s', jid) read_profile = __opts__.get('etcd.returner_read_profile') client, path = _get_conn(__opts__, read_profile) return salt.utils.json.loads(client.get('/'....
[ "def", "get_load", "(", "jid", ")", ":", "log", ".", "debug", "(", "'sdstack_etcd returner <get_load> called jid: %s'", ",", "jid", ")", "read_profile", "=", "__opts__", ".", "get", "(", "'etcd.returner_read_profile'", ")", "client", ",", "path", "=", "_get_conn",...
Return the load data that marks a specified jid
[ "Return", "the", "load", "data", "that", "marks", "a", "specified", "jid" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L169-L176
train
Return the load data that marks a specified jid
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
get_jid
def get_jid(jid): ''' Return the information returned when the specified job id was executed ''' log.debug('sdstack_etcd returner <get_jid> called jid: %s', jid) ret = {} client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'jobs', jid))) for item in items.children: ...
python
def get_jid(jid): ''' Return the information returned when the specified job id was executed ''' log.debug('sdstack_etcd returner <get_jid> called jid: %s', jid) ret = {} client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'jobs', jid))) for item in items.children: ...
[ "def", "get_jid", "(", "jid", ")", ":", "log", ".", "debug", "(", "'sdstack_etcd returner <get_jid> called jid: %s'", ",", "jid", ")", "ret", "=", "{", "}", "client", ",", "path", "=", "_get_conn", "(", "__opts__", ")", "items", "=", "client", ".", "get", ...
Return the information returned when the specified job id was executed
[ "Return", "the", "information", "returned", "when", "the", "specified", "job", "id", "was", "executed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L179-L193
train
Return the information returned when the specified job id was executed
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
get_fun
def get_fun(fun): ''' Return a dict of the last function called for all minions ''' log.debug('sdstack_etcd returner <get_fun> called fun: %s', fun) ret = {} client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'minions'))) for item in items.children: comps = str...
python
def get_fun(fun): ''' Return a dict of the last function called for all minions ''' log.debug('sdstack_etcd returner <get_fun> called fun: %s', fun) ret = {} client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'minions'))) for item in items.children: comps = str...
[ "def", "get_fun", "(", "fun", ")", ":", "log", ".", "debug", "(", "'sdstack_etcd returner <get_fun> called fun: %s'", ",", "fun", ")", "ret", "=", "{", "}", "client", ",", "path", "=", "_get_conn", "(", "__opts__", ")", "items", "=", "client", ".", "get", ...
Return a dict of the last function called for all minions
[ "Return", "a", "dict", "of", "the", "last", "function", "called", "for", "all", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L196-L209
train
Return a dict of the last function called for all minions
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
get_jids
def get_jids(): ''' Return a list of all job ids ''' log.debug('sdstack_etcd returner <get_jids> called') ret = [] client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'jobs'))) for item in items.children: if item.dir is True: jid = str(item.key).spli...
python
def get_jids(): ''' Return a list of all job ids ''' log.debug('sdstack_etcd returner <get_jids> called') ret = [] client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'jobs'))) for item in items.children: if item.dir is True: jid = str(item.key).spli...
[ "def", "get_jids", "(", ")", ":", "log", ".", "debug", "(", "'sdstack_etcd returner <get_jids> called'", ")", "ret", "=", "[", "]", "client", ",", "path", "=", "_get_conn", "(", "__opts__", ")", "items", "=", "client", ".", "get", "(", "'/'", ".", "join"...
Return a list of all job ids
[ "Return", "a", "list", "of", "all", "job", "ids" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L212-L224
train
Return a list of all job ids
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/etcd_return.py
get_minions
def get_minions(): ''' Return a list of minions ''' log.debug('sdstack_etcd returner <get_minions> called') ret = [] client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'minions'))) for item in items.children: comps = str(item.key).split('/') ret.append(...
python
def get_minions(): ''' Return a list of minions ''' log.debug('sdstack_etcd returner <get_minions> called') ret = [] client, path = _get_conn(__opts__) items = client.get('/'.join((path, 'minions'))) for item in items.children: comps = str(item.key).split('/') ret.append(...
[ "def", "get_minions", "(", ")", ":", "log", ".", "debug", "(", "'sdstack_etcd returner <get_minions> called'", ")", "ret", "=", "[", "]", "client", ",", "path", "=", "_get_conn", "(", "__opts__", ")", "items", "=", "client", ".", "get", "(", "'/'", ".", ...
Return a list of minions
[ "Return", "a", "list", "of", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/etcd_return.py#L227-L238
train
Return a list of minions
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/linux_acl.py
present
def present(name, acl_type, acl_name='', perms='', recurse=False, force=False): ''' Ensure a Linux ACL is present name The acl path acl_type The type of the acl is used for it can be 'user' or 'group' acl_name The user or group perms Set the permissions eg.: ...
python
def present(name, acl_type, acl_name='', perms='', recurse=False, force=False): ''' Ensure a Linux ACL is present name The acl path acl_type The type of the acl is used for it can be 'user' or 'group' acl_name The user or group perms Set the permissions eg.: ...
[ "def", "present", "(", "name", ",", "acl_type", ",", "acl_name", "=", "''", ",", "perms", "=", "''", ",", "recurse", "=", "False", ",", "force", "=", "False", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'...
Ensure a Linux ACL is present name The acl path acl_type The type of the acl is used for it can be 'user' or 'group' acl_name The user or group perms Set the permissions eg.: rwx recurse Set the permissions recursive in the path force Wipe o...
[ "Ensure", "a", "Linux", "ACL", "is", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/linux_acl.py#L82-L219
train
Ensure a Linux ACL is present in the named path.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/linux_acl.py
absent
def absent(name, acl_type, acl_name='', perms='', recurse=False): ''' Ensure a Linux ACL does not exist name The acl path acl_type The type of the acl is used for, it can be 'user' or 'group' acl_names The user or group perms Remove the permissions eg.: rwx ...
python
def absent(name, acl_type, acl_name='', perms='', recurse=False): ''' Ensure a Linux ACL does not exist name The acl path acl_type The type of the acl is used for, it can be 'user' or 'group' acl_names The user or group perms Remove the permissions eg.: rwx ...
[ "def", "absent", "(", "name", ",", "acl_type", ",", "acl_name", "=", "''", ",", "perms", "=", "''", ",", "recurse", "=", "False", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{", "}", ","...
Ensure a Linux ACL does not exist name The acl path acl_type The type of the acl is used for, it can be 'user' or 'group' acl_names The user or group perms Remove the permissions eg.: rwx recurse Set the permissions recursive in the path
[ "Ensure", "a", "Linux", "ACL", "does", "not", "exist" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/linux_acl.py#L222-L307
train
Ensure a Linux ACL does not exist
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/linux_acl.py
list_present
def list_present(name, acl_type, acl_names=None, perms='', recurse=False, force=False): ''' Ensure a Linux ACL list is present Takes a list of acl names and add them to the given path name The acl path acl_type The type of the acl is used for it can be 'user' or 'group' acl_n...
python
def list_present(name, acl_type, acl_names=None, perms='', recurse=False, force=False): ''' Ensure a Linux ACL list is present Takes a list of acl names and add them to the given path name The acl path acl_type The type of the acl is used for it can be 'user' or 'group' acl_n...
[ "def", "list_present", "(", "name", ",", "acl_type", ",", "acl_names", "=", "None", ",", "perms", "=", "''", ",", "recurse", "=", "False", ",", "force", "=", "False", ")", ":", "if", "acl_names", "is", "None", ":", "acl_names", "=", "[", "]", "ret", ...
Ensure a Linux ACL list is present Takes a list of acl names and add them to the given path name The acl path acl_type The type of the acl is used for it can be 'user' or 'group' acl_names The list of users or groups perms Set the permissions eg.: rwx recurs...
[ "Ensure", "a", "Linux", "ACL", "list", "is", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/linux_acl.py#L310-L499
train
Ensure a Linux ACL list is present.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/linux_acl.py
list_absent
def list_absent(name, acl_type, acl_names=None, recurse=False): ''' Ensure a Linux ACL list does not exist Takes a list of acl names and remove them from the given path name The acl path acl_type The type of the acl is used for, it can be 'user' or 'group' acl_names T...
python
def list_absent(name, acl_type, acl_names=None, recurse=False): ''' Ensure a Linux ACL list does not exist Takes a list of acl names and remove them from the given path name The acl path acl_type The type of the acl is used for, it can be 'user' or 'group' acl_names T...
[ "def", "list_absent", "(", "name", ",", "acl_type", ",", "acl_names", "=", "None", ",", "recurse", "=", "False", ")", ":", "if", "acl_names", "is", "None", ":", "acl_names", "=", "[", "]", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":",...
Ensure a Linux ACL list does not exist Takes a list of acl names and remove them from the given path name The acl path acl_type The type of the acl is used for, it can be 'user' or 'group' acl_names The list of users or groups perms Remove the permissions eg.: rw...
[ "Ensure", "a", "Linux", "ACL", "list", "does", "not", "exist" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/linux_acl.py#L502-L584
train
Ensure a Linux ACL list does not exist
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_cognitoidentity.py
_get_object
def _get_object(objname, objtype): ''' Helper function to retrieve objtype from pillars if objname is string_types, used for SupportedLoginProviders and OpenIdConnectProviderARNs. ''' ret = None if objname is None: return ret if isinstance(objname, string_types): if objn...
python
def _get_object(objname, objtype): ''' Helper function to retrieve objtype from pillars if objname is string_types, used for SupportedLoginProviders and OpenIdConnectProviderARNs. ''' ret = None if objname is None: return ret if isinstance(objname, string_types): if objn...
[ "def", "_get_object", "(", "objname", ",", "objtype", ")", ":", "ret", "=", "None", "if", "objname", "is", "None", ":", "return", "ret", "if", "isinstance", "(", "objname", ",", "string_types", ")", ":", "if", "objname", "in", "__opts__", ":", "ret", "...
Helper function to retrieve objtype from pillars if objname is string_types, used for SupportedLoginProviders and OpenIdConnectProviderARNs.
[ "Helper", "function", "to", "retrieve", "objtype", "from", "pillars", "if", "objname", "is", "string_types", "used", "for", "SupportedLoginProviders", "and", "OpenIdConnectProviderARNs", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_cognitoidentity.py#L66-L90
train
Helper function to retrieve object from pillars or opts
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_cognitoidentity.py
_role_present
def _role_present(ret, IdentityPoolId, AuthenticatedRole, UnauthenticatedRole, conn_params): ''' Helper function to set the Roles to the identity pool ''' r = __salt__['boto_cognitoidentity.get_identity_pool_roles'](IdentityPoolName='', Id...
python
def _role_present(ret, IdentityPoolId, AuthenticatedRole, UnauthenticatedRole, conn_params): ''' Helper function to set the Roles to the identity pool ''' r = __salt__['boto_cognitoidentity.get_identity_pool_roles'](IdentityPoolName='', Id...
[ "def", "_role_present", "(", "ret", ",", "IdentityPoolId", ",", "AuthenticatedRole", ",", "UnauthenticatedRole", ",", "conn_params", ")", ":", "r", "=", "__salt__", "[", "'boto_cognitoidentity.get_identity_pool_roles'", "]", "(", "IdentityPoolName", "=", "''", ",", ...
Helper function to set the Roles to the identity pool
[ "Helper", "function", "to", "set", "the", "Roles", "to", "the", "identity", "pool" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_cognitoidentity.py#L93-L131
train
Helper function to set the roles of the identity pool
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_cognitoidentity.py
pool_present
def pool_present(name, IdentityPoolName, AuthenticatedRole, AllowUnauthenticatedIdentities=False, UnauthenticatedRole=None, SupportedLoginProviders=None, DeveloperProviderName=None, OpenIdConnectProvid...
python
def pool_present(name, IdentityPoolName, AuthenticatedRole, AllowUnauthenticatedIdentities=False, UnauthenticatedRole=None, SupportedLoginProviders=None, DeveloperProviderName=None, OpenIdConnectProvid...
[ "def", "pool_present", "(", "name", ",", "IdentityPoolName", ",", "AuthenticatedRole", ",", "AllowUnauthenticatedIdentities", "=", "False", ",", "UnauthenticatedRole", "=", "None", ",", "SupportedLoginProviders", "=", "None", ",", "DeveloperProviderName", "=", "None", ...
Ensure Cognito Identity Pool exists. name The name of the state definition IdentityPoolName Name of the Cognito Identity Pool AuthenticatedRole An IAM role name or ARN that will be associated with temporary AWS credentials for an authenticated cognito identity. AllowU...
[ "Ensure", "Cognito", "Identity", "Pool", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_cognitoidentity.py#L134-L279
train
Ensure a Cognito Identity Pool exists and is up - to - date and associated with a temporary AWS account.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_cognitoidentity.py
pool_absent
def pool_absent(name, IdentityPoolName, RemoveAllMatched=False, region=None, key=None, keyid=None, profile=None): ''' Ensure cognito identity pool with passed properties is absent. name The name of the state definition. IdentityPoolName Name of the Cognito Identity Pool. Plea...
python
def pool_absent(name, IdentityPoolName, RemoveAllMatched=False, region=None, key=None, keyid=None, profile=None): ''' Ensure cognito identity pool with passed properties is absent. name The name of the state definition. IdentityPoolName Name of the Cognito Identity Pool. Plea...
[ "def", "pool_absent", "(", "name", ",", "IdentityPoolName", ",", "RemoveAllMatched", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", ...
Ensure cognito identity pool with passed properties is absent. name The name of the state definition. IdentityPoolName Name of the Cognito Identity Pool. Please note that this may match multiple pools with the same given name, in which case, all will be removed. RemoveAll...
[ "Ensure", "cognito", "identity", "pool", "with", "passed", "properties", "is", "absent", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_cognitoidentity.py#L282-L378
train
Ensure the Cognito Identity Pool with passed properties is absent.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/minion.py
running
def running(opts): ''' Return the running jobs on this minion ''' ret = [] proc_dir = os.path.join(opts['cachedir'], 'proc') if not os.path.isdir(proc_dir): return ret for fn_ in os.listdir(proc_dir): path = os.path.join(proc_dir, fn_) try: data = _read_p...
python
def running(opts): ''' Return the running jobs on this minion ''' ret = [] proc_dir = os.path.join(opts['cachedir'], 'proc') if not os.path.isdir(proc_dir): return ret for fn_ in os.listdir(proc_dir): path = os.path.join(proc_dir, fn_) try: data = _read_p...
[ "def", "running", "(", "opts", ")", ":", "ret", "=", "[", "]", "proc_dir", "=", "os", ".", "path", ".", "join", "(", "opts", "[", "'cachedir'", "]", ",", "'proc'", ")", "if", "not", "os", ".", "path", ".", "isdir", "(", "proc_dir", ")", ":", "r...
Return the running jobs on this minion
[ "Return", "the", "running", "jobs", "on", "this", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minion.py#L21-L41
train
Return the running jobs on this minion
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/minion.py
cache_jobs
def cache_jobs(opts, jid, ret): ''' Write job information to cache ''' serial = salt.payload.Serial(opts=opts) fn_ = os.path.join( opts['cachedir'], 'minion_jobs', jid, 'return.p') jdir = os.path.dirname(fn_) if not os.path.isdir(jdir): os.makedirs(jd...
python
def cache_jobs(opts, jid, ret): ''' Write job information to cache ''' serial = salt.payload.Serial(opts=opts) fn_ = os.path.join( opts['cachedir'], 'minion_jobs', jid, 'return.p') jdir = os.path.dirname(fn_) if not os.path.isdir(jdir): os.makedirs(jd...
[ "def", "cache_jobs", "(", "opts", ",", "jid", ",", "ret", ")", ":", "serial", "=", "salt", ".", "payload", ".", "Serial", "(", "opts", "=", "opts", ")", "fn_", "=", "os", ".", "path", ".", "join", "(", "opts", "[", "'cachedir'", "]", ",", "'minio...
Write job information to cache
[ "Write", "job", "information", "to", "cache" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minion.py#L44-L59
train
Write job information to cache
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/minion.py
_read_proc_file
def _read_proc_file(path, opts): ''' Return a dict of JID metadata, or None ''' serial = salt.payload.Serial(opts) current_thread = threading.currentThread().name pid = os.getpid() with salt.utils.files.fopen(path, 'rb') as fp_: buf = fp_.read() fp_.close() if buf: ...
python
def _read_proc_file(path, opts): ''' Return a dict of JID metadata, or None ''' serial = salt.payload.Serial(opts) current_thread = threading.currentThread().name pid = os.getpid() with salt.utils.files.fopen(path, 'rb') as fp_: buf = fp_.read() fp_.close() if buf: ...
[ "def", "_read_proc_file", "(", "path", ",", "opts", ")", ":", "serial", "=", "salt", ".", "payload", ".", "Serial", "(", "opts", ")", "current_thread", "=", "threading", ".", "currentThread", "(", ")", ".", "name", "pid", "=", "os", ".", "getpid", "(",...
Return a dict of JID metadata, or None
[ "Return", "a", "dict", "of", "JID", "metadata", "or", "None" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minion.py#L62-L122
train
Read a proc file and return a dict of JID metadata or None if the file does not exist.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/minion.py
_check_cmdline
def _check_cmdline(data): ''' In some cases where there are an insane number of processes being created on a system a PID can get recycled or assigned to a non-Salt process. On Linux this fn checks to make sure the PID we are checking on is actually a Salt process. For non-Linux systems we punt...
python
def _check_cmdline(data): ''' In some cases where there are an insane number of processes being created on a system a PID can get recycled or assigned to a non-Salt process. On Linux this fn checks to make sure the PID we are checking on is actually a Salt process. For non-Linux systems we punt...
[ "def", "_check_cmdline", "(", "data", ")", ":", "if", "not", "salt", ".", "utils", ".", "platform", ".", "is_linux", "(", ")", ":", "return", "True", "pid", "=", "data", ".", "get", "(", "'pid'", ")", "if", "not", "pid", ":", "return", "False", "if...
In some cases where there are an insane number of processes being created on a system a PID can get recycled or assigned to a non-Salt process. On Linux this fn checks to make sure the PID we are checking on is actually a Salt process. For non-Linux systems we punt and just return True
[ "In", "some", "cases", "where", "there", "are", "an", "insane", "number", "of", "processes", "being", "created", "on", "a", "system", "a", "PID", "can", "get", "recycled", "or", "assigned", "to", "a", "non", "-", "Salt", "process", ".", "On", "Linux", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minion.py#L125-L149
train
Checks to see if the process is actually a Salt process.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/file_tree.py
_check_newline
def _check_newline(prefix, file_name, keep_newline): ''' Return a boolean stating whether or not a file's trailing newline should be removed. To figure this out, first check if keep_newline is a boolean and if so, return its opposite. Otherwise, iterate over keep_newline and check if any of the patt...
python
def _check_newline(prefix, file_name, keep_newline): ''' Return a boolean stating whether or not a file's trailing newline should be removed. To figure this out, first check if keep_newline is a boolean and if so, return its opposite. Otherwise, iterate over keep_newline and check if any of the patt...
[ "def", "_check_newline", "(", "prefix", ",", "file_name", ",", "keep_newline", ")", ":", "if", "isinstance", "(", "keep_newline", ",", "bool", ")", ":", "return", "not", "keep_newline", "full_path", "=", "os", ".", "path", ".", "join", "(", "prefix", ",", ...
Return a boolean stating whether or not a file's trailing newline should be removed. To figure this out, first check if keep_newline is a boolean and if so, return its opposite. Otherwise, iterate over keep_newline and check if any of the patterns match the file path. If a match is found, return False, ...
[ "Return", "a", "boolean", "stating", "whether", "or", "not", "a", "file", "s", "trailing", "newline", "should", "be", "removed", ".", "To", "figure", "this", "out", "first", "check", "if", "keep_newline", "is", "a", "boolean", "and", "if", "so", "return", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/file_tree.py#L174-L192
train
Check if a trailing newline should be removed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/file_tree.py
_construct_pillar
def _construct_pillar(top_dir, follow_dir_links, keep_newline=False, render_default=None, renderer_blacklist=None, renderer_whitelist=None, template=False): ''' Construct pillar fr...
python
def _construct_pillar(top_dir, follow_dir_links, keep_newline=False, render_default=None, renderer_blacklist=None, renderer_whitelist=None, template=False): ''' Construct pillar fr...
[ "def", "_construct_pillar", "(", "top_dir", ",", "follow_dir_links", ",", "keep_newline", "=", "False", ",", "render_default", "=", "None", ",", "renderer_blacklist", "=", "None", ",", "renderer_whitelist", "=", "None", ",", "template", "=", "False", ")", ":", ...
Construct pillar from file tree.
[ "Construct", "pillar", "from", "file", "tree", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/file_tree.py#L195-L265
train
Construct pillar from file tree.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/file_tree.py
ext_pillar
def ext_pillar(minion_id, pillar, root_dir=None, follow_dir_links=False, debug=False, keep_newline=False, render_default=None, renderer_blacklist=None, renderer_whitelist=None, template...
python
def ext_pillar(minion_id, pillar, root_dir=None, follow_dir_links=False, debug=False, keep_newline=False, render_default=None, renderer_blacklist=None, renderer_whitelist=None, template...
[ "def", "ext_pillar", "(", "minion_id", ",", "pillar", ",", "root_dir", "=", "None", ",", "follow_dir_links", "=", "False", ",", "debug", "=", "False", ",", "keep_newline", "=", "False", ",", "render_default", "=", "None", ",", "renderer_blacklist", "=", "Non...
Compile pillar data from the given ``root_dir`` specific to Nodegroup names and Minion IDs. If a Minion's ID is not found at ``<root_dir>/host/<minion_id>`` or if it is not included in any Nodegroups named at ``<root_dir>/nodegroups/<node_group>``, no pillar data provided by this pillar module will...
[ "Compile", "pillar", "data", "from", "the", "given", "root_dir", "specific", "to", "Nodegroup", "names", "and", "Minion", "IDs", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/file_tree.py#L268-L448
train
Compile pillar data from the given root_dir and return a new pillar module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/file_tree.py
_ext_pillar
def _ext_pillar(minion_id, root_dir, follow_dir_links, debug, keep_newline, render_default, renderer_blacklist, renderer_whitelist, template): ''' Compile pillar data for a single root...
python
def _ext_pillar(minion_id, root_dir, follow_dir_links, debug, keep_newline, render_default, renderer_blacklist, renderer_whitelist, template): ''' Compile pillar data for a single root...
[ "def", "_ext_pillar", "(", "minion_id", ",", "root_dir", ",", "follow_dir_links", ",", "debug", ",", "keep_newline", ",", "render_default", ",", "renderer_blacklist", ",", "renderer_whitelist", ",", "template", ")", ":", "log", ".", "debug", "(", "'file_tree: read...
Compile pillar data for a single root_dir for the specified minion ID
[ "Compile", "pillar", "data", "for", "a", "single", "root_dir", "for", "the", "specified", "minion", "ID" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/file_tree.py#L451-L540
train
Compile pillar data for a single root_dir for a single minion ID
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/at.py
present
def present(name, timespec, tag=None, user=None, job=None, unique_tag=False): ''' .. versionchanged:: 2017.7.0 Add a job to queue. job : string Command to run. timespec : string The 'timespec' follows the format documented in the at(1) manpage. tag : string Make a tag...
python
def present(name, timespec, tag=None, user=None, job=None, unique_tag=False): ''' .. versionchanged:: 2017.7.0 Add a job to queue. job : string Command to run. timespec : string The 'timespec' follows the format documented in the at(1) manpage. tag : string Make a tag...
[ "def", "present", "(", "name", ",", "timespec", ",", "tag", "=", "None", ",", "user", "=", "None", ",", "job", "=", "None", ",", "unique_tag", "=", "False", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", ...
.. versionchanged:: 2017.7.0 Add a job to queue. job : string Command to run. timespec : string The 'timespec' follows the format documented in the at(1) manpage. tag : string Make a tag for the job. user : string The user to run the at job .. versionadde...
[ "..", "versionchanged", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/at.py#L26-L125
train
Ensure a job with the given timespec is present.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/at.py
absent
def absent(name, jobid=None, **kwargs): ''' .. versionchanged:: 2017.7.0 Remove a job from queue jobid: string|int Specific jobid to remove tag : string Job's tag runas : string Runs user-specified jobs kwargs Addition kwargs can be provided to filter job...
python
def absent(name, jobid=None, **kwargs): ''' .. versionchanged:: 2017.7.0 Remove a job from queue jobid: string|int Specific jobid to remove tag : string Job's tag runas : string Runs user-specified jobs kwargs Addition kwargs can be provided to filter job...
[ "def", "absent", "(", "name", ",", "jobid", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "# limit was never ...
.. versionchanged:: 2017.7.0 Remove a job from queue jobid: string|int Specific jobid to remove tag : string Job's tag runas : string Runs user-specified jobs kwargs Addition kwargs can be provided to filter jobs. See output of `at.jobcheck` for more. ...
[ "..", "versionchanged", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/at.py#L128-L245
train
Ensure a queue entry is absent
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/at.py
watch
def watch(name, timespec, tag=None, user=None, job=None, unique_tag=False): ''' .. versionadded:: 2017.7.0 Add an at job if trigger by watch job : string Command to run. timespec : string The 'timespec' follows the format documented in the at(1) manpage. tag : string ...
python
def watch(name, timespec, tag=None, user=None, job=None, unique_tag=False): ''' .. versionadded:: 2017.7.0 Add an at job if trigger by watch job : string Command to run. timespec : string The 'timespec' follows the format documented in the at(1) manpage. tag : string ...
[ "def", "watch", "(", "name", ",", "timespec", ",", "tag", "=", "None", ",", "user", "=", "None", ",", "job", "=", "None", ",", "unique_tag", "=", "False", ")", ":", "return", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'res...
.. versionadded:: 2017.7.0 Add an at job if trigger by watch job : string Command to run. timespec : string The 'timespec' follows the format documented in the at(1) manpage. tag : string Make a tag for the job. user : string The user to run the at job .....
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/at.py#L248-L288
train
Watch a new entry in the trye log.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/at.py
mod_watch
def mod_watch(name, **kwargs): ''' The at watcher, called to invoke the watch command. .. note:: This state exists to support special handling of the ``watch`` :ref:`requisite <requisites>`. It should not be called directly. Parameters for this function should be set by the state b...
python
def mod_watch(name, **kwargs): ''' The at watcher, called to invoke the watch command. .. note:: This state exists to support special handling of the ``watch`` :ref:`requisite <requisites>`. It should not be called directly. Parameters for this function should be set by the state b...
[ "def", "mod_watch", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", "}", "if", "kwargs", "[", "'sfun'", "]", "=="...
The at watcher, called to invoke the watch command. .. note:: This state exists to support special handling of the ``watch`` :ref:`requisite <requisites>`. It should not be called directly. Parameters for this function should be set by the state being triggered. name The name ...
[ "The", "at", "watcher", "called", "to", "invoke", "the", "watch", "command", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/at.py#L291-L316
train
The at watcher called to invoke the watch command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
_normalize_args
def _normalize_args(args): ''' Return args as a list of strings ''' if isinstance(args, six.string_types): return shlex.split(args) if isinstance(args, (tuple, list)): return [six.text_type(arg) for arg in args] else: return [six.text_type(args)]
python
def _normalize_args(args): ''' Return args as a list of strings ''' if isinstance(args, six.string_types): return shlex.split(args) if isinstance(args, (tuple, list)): return [six.text_type(arg) for arg in args] else: return [six.text_type(args)]
[ "def", "_normalize_args", "(", "args", ")", ":", "if", "isinstance", "(", "args", ",", "six", ".", "string_types", ")", ":", "return", "shlex", ".", "split", "(", "args", ")", "if", "isinstance", "(", "args", ",", "(", "tuple", ",", "list", ")", ")",...
Return args as a list of strings
[ "Return", "args", "as", "a", "list", "of", "strings" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L49-L59
train
Return args as a list of strings
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
_find_guids
def _find_guids(guid_string): ''' Return the set of GUIDs found in guid_string :param str guid_string: String containing zero or more GUIDs. Each GUID may or may not be enclosed in {} Example data (this string contains two distinct GUIDs): PARENT_SNAPSHOT_ID ...
python
def _find_guids(guid_string): ''' Return the set of GUIDs found in guid_string :param str guid_string: String containing zero or more GUIDs. Each GUID may or may not be enclosed in {} Example data (this string contains two distinct GUIDs): PARENT_SNAPSHOT_ID ...
[ "def", "_find_guids", "(", "guid_string", ")", ":", "guids", "=", "[", "]", "for", "found_guid", "in", "re", ".", "finditer", "(", "GUID_REGEX", ",", "guid_string", ")", ":", "if", "found_guid", ".", "groups", "(", ")", ":", "guids", ".", "append", "("...
Return the set of GUIDs found in guid_string :param str guid_string: String containing zero or more GUIDs. Each GUID may or may not be enclosed in {} Example data (this string contains two distinct GUIDs): PARENT_SNAPSHOT_ID SNAPSHOT_ID ...
[ "Return", "the", "set", "of", "GUIDs", "found", "in", "guid_string" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L62-L80
train
Return the set of GUIDs found in guid_string
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
prlsrvctl
def prlsrvctl(sub_cmd, args=None, runas=None): ''' Execute a prlsrvctl command .. versionadded:: 2016.11.0 :param str sub_cmd: prlsrvctl subcommand to execute :param str args: The arguments supplied to ``prlsrvctl <sub_cmd>`` :param str runas: The user that the prlsrv...
python
def prlsrvctl(sub_cmd, args=None, runas=None): ''' Execute a prlsrvctl command .. versionadded:: 2016.11.0 :param str sub_cmd: prlsrvctl subcommand to execute :param str args: The arguments supplied to ``prlsrvctl <sub_cmd>`` :param str runas: The user that the prlsrv...
[ "def", "prlsrvctl", "(", "sub_cmd", ",", "args", "=", "None", ",", "runas", "=", "None", ")", ":", "if", "not", "salt", ".", "utils", ".", "path", ".", "which", "(", "'prlsrvctl'", ")", ":", "raise", "CommandExecutionError", "(", "'prlsrvctl utility not av...
Execute a prlsrvctl command .. versionadded:: 2016.11.0 :param str sub_cmd: prlsrvctl subcommand to execute :param str args: The arguments supplied to ``prlsrvctl <sub_cmd>`` :param str runas: The user that the prlsrvctl command will be run as Example: .. code-block...
[ "Execute", "a", "prlsrvctl", "command" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L83-L115
train
Execute a prlsrvctl command and return the output
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
list_vms
def list_vms(name=None, info=False, all=False, args=None, runas=None, template=False): ''' List information about the VMs :param str name: Name/ID of VM to list .. versionchanged:: 2016.11.0 No longer implies ``info=True`` :param str info: List extra information ...
python
def list_vms(name=None, info=False, all=False, args=None, runas=None, template=False): ''' List information about the VMs :param str name: Name/ID of VM to list .. versionchanged:: 2016.11.0 No longer implies ``info=True`` :param str info: List extra information ...
[ "def", "list_vms", "(", "name", "=", "None", ",", "info", "=", "False", ",", "all", "=", "False", ",", "args", "=", "None", ",", "runas", "=", "None", ",", "template", "=", "False", ")", ":", "# Construct argument list", "if", "args", "is", "None", "...
List information about the VMs :param str name: Name/ID of VM to list .. versionchanged:: 2016.11.0 No longer implies ``info=True`` :param str info: List extra information :param bool all: List all non-template VMs :param tuple args: Additional a...
[ "List", "information", "about", "the", "VMs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L151-L205
train
List virtual machines in the virtual machine store.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
clone
def clone(name, new_name, linked=False, template=False, runas=None): ''' Clone a VM .. versionadded:: 2016.11.0 :param str name: Name/ID of VM to clone :param str new_name: Name of the new VM :param bool linked: Create a linked virtual machine. :param bool templa...
python
def clone(name, new_name, linked=False, template=False, runas=None): ''' Clone a VM .. versionadded:: 2016.11.0 :param str name: Name/ID of VM to clone :param str new_name: Name of the new VM :param bool linked: Create a linked virtual machine. :param bool templa...
[ "def", "clone", "(", "name", ",", "new_name", ",", "linked", "=", "False", ",", "template", "=", "False", ",", "runas", "=", "None", ")", ":", "args", "=", "[", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", ",", "'--name'", ...
Clone a VM .. versionadded:: 2016.11.0 :param str name: Name/ID of VM to clone :param str new_name: Name of the new VM :param bool linked: Create a linked virtual machine. :param bool template: Create a virtual machine template instead of a real virtual machine. ...
[ "Clone", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L208-L241
train
Clone a virtual machine
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
delete
def delete(name, runas=None): ''' Delete a VM .. versionadded:: 2016.11.0 :param str name: Name/ID of VM to clone :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.exec macvm 'find /etc/paths.d' ru...
python
def delete(name, runas=None): ''' Delete a VM .. versionadded:: 2016.11.0 :param str name: Name/ID of VM to clone :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.exec macvm 'find /etc/paths.d' ru...
[ "def", "delete", "(", "name", ",", "runas", "=", "None", ")", ":", "return", "prlctl", "(", "'delete'", ",", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", ",", "runas", "=", "runas", ")" ]
Delete a VM .. versionadded:: 2016.11.0 :param str name: Name/ID of VM to clone :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.exec macvm 'find /etc/paths.d' runas=macdev
[ "Delete", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L244-L262
train
Delete a VM from the
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
exists
def exists(name, runas=None): ''' Query whether a VM exists .. versionadded:: 2016.11.0 :param str name: Name/ID of VM :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.exists macvm runas=macdev ...
python
def exists(name, runas=None): ''' Query whether a VM exists .. versionadded:: 2016.11.0 :param str name: Name/ID of VM :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.exists macvm runas=macdev ...
[ "def", "exists", "(", "name", ",", "runas", "=", "None", ")", ":", "vm_info", "=", "list_vms", "(", "name", ",", "info", "=", "True", ",", "runas", "=", "runas", ")", ".", "splitlines", "(", ")", "for", "info_line", "in", "vm_info", ":", "if", "'Na...
Query whether a VM exists .. versionadded:: 2016.11.0 :param str name: Name/ID of VM :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.exists macvm runas=macdev
[ "Query", "whether", "a", "VM", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L265-L287
train
Returns True if a VM exists in the system False otherwise.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
start
def start(name, runas=None): ''' Start a VM :param str name: Name/ID of VM to start :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.start macvm runas=macdev ''' return prlctl('start', salt.uti...
python
def start(name, runas=None): ''' Start a VM :param str name: Name/ID of VM to start :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.start macvm runas=macdev ''' return prlctl('start', salt.uti...
[ "def", "start", "(", "name", ",", "runas", "=", "None", ")", ":", "return", "prlctl", "(", "'start'", ",", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", ",", "runas", "=", "runas", ")" ]
Start a VM :param str name: Name/ID of VM to start :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.start macvm runas=macdev
[ "Start", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L290-L306
train
Start a VM in the
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
stop
def stop(name, kill=False, runas=None): ''' Stop a VM :param str name: Name/ID of VM to stop :param bool kill: Perform a hard shutdown :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.stop...
python
def stop(name, kill=False, runas=None): ''' Stop a VM :param str name: Name/ID of VM to stop :param bool kill: Perform a hard shutdown :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.stop...
[ "def", "stop", "(", "name", ",", "kill", "=", "False", ",", "runas", "=", "None", ")", ":", "# Construct argument list", "args", "=", "[", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", "]", "if", "kill", ":", "args", ".", "app...
Stop a VM :param str name: Name/ID of VM to stop :param bool kill: Perform a hard shutdown :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.stop macvm runas=macdev salt '*' parallels.stop ...
[ "Stop", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L309-L335
train
Stop a single virtual machine
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
restart
def restart(name, runas=None): ''' Restart a VM by gracefully shutting it down and then restarting it :param str name: Name/ID of VM to restart :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.rest...
python
def restart(name, runas=None): ''' Restart a VM by gracefully shutting it down and then restarting it :param str name: Name/ID of VM to restart :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.rest...
[ "def", "restart", "(", "name", ",", "runas", "=", "None", ")", ":", "return", "prlctl", "(", "'restart'", ",", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", ",", "runas", "=", "runas", ")" ]
Restart a VM by gracefully shutting it down and then restarting it :param str name: Name/ID of VM to restart :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.restart macvm runas=macdev
[ "Restart", "a", "VM", "by", "gracefully", "shutting", "it", "down", "and", "then", "restarting", "it" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L338-L355
train
Restarts a single virtual machine by gracefully shutting it down and then restarting it
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
reset
def reset(name, runas=None): ''' Reset a VM by performing a hard shutdown and then a restart :param str name: Name/ID of VM to reset :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.reset macvm runas=m...
python
def reset(name, runas=None): ''' Reset a VM by performing a hard shutdown and then a restart :param str name: Name/ID of VM to reset :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.reset macvm runas=m...
[ "def", "reset", "(", "name", ",", "runas", "=", "None", ")", ":", "return", "prlctl", "(", "'reset'", ",", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", ",", "runas", "=", "runas", ")" ]
Reset a VM by performing a hard shutdown and then a restart :param str name: Name/ID of VM to reset :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.reset macvm runas=macdev
[ "Reset", "a", "VM", "by", "performing", "a", "hard", "shutdown", "and", "then", "a", "restart" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L358-L374
train
Reset a VM by performing hard shutdown and then restarting it
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
status
def status(name, runas=None): ''' Status of a VM :param str name: Name/ID of VM whose status will be returned :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.status macvm runas=macdev ''' retu...
python
def status(name, runas=None): ''' Status of a VM :param str name: Name/ID of VM whose status will be returned :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.status macvm runas=macdev ''' retu...
[ "def", "status", "(", "name", ",", "runas", "=", "None", ")", ":", "return", "prlctl", "(", "'status'", ",", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", ",", "runas", "=", "runas", ")" ]
Status of a VM :param str name: Name/ID of VM whose status will be returned :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.status macvm runas=macdev
[ "Status", "of", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L377-L393
train
Returns the status of a VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
exec_
def exec_(name, command, runas=None): ''' Run a command on a VM :param str name: Name/ID of VM whose exec will be returned :param str command: Command to run on the VM :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash...
python
def exec_(name, command, runas=None): ''' Run a command on a VM :param str name: Name/ID of VM whose exec will be returned :param str command: Command to run on the VM :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash...
[ "def", "exec_", "(", "name", ",", "command", ",", "runas", "=", "None", ")", ":", "# Construct argument list", "args", "=", "[", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", "]", "args", ".", "extend", "(", "_normalize_args", "("...
Run a command on a VM :param str name: Name/ID of VM whose exec will be returned :param str command: Command to run on the VM :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.exec macvm 'find /etc...
[ "Run", "a", "command", "on", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L396-L420
train
Execute a command on a VM and return the output
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
snapshot_id_to_name
def snapshot_id_to_name(name, snap_id, strict=False, runas=None): ''' Attempt to convert a snapshot ID to a snapshot name. If the snapshot has no name or if the ID is not found or invalid, an empty string will be returned :param str name: Name/ID of VM whose snapshots are inspected :param...
python
def snapshot_id_to_name(name, snap_id, strict=False, runas=None): ''' Attempt to convert a snapshot ID to a snapshot name. If the snapshot has no name or if the ID is not found or invalid, an empty string will be returned :param str name: Name/ID of VM whose snapshots are inspected :param...
[ "def", "snapshot_id_to_name", "(", "name", ",", "snap_id", ",", "strict", "=", "False", ",", "runas", "=", "None", ")", ":", "# Validate VM name and snapshot ID", "name", "=", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", "if", "not",...
Attempt to convert a snapshot ID to a snapshot name. If the snapshot has no name or if the ID is not found or invalid, an empty string will be returned :param str name: Name/ID of VM whose snapshots are inspected :param str snap_id: ID of the snapshot :param bool strict: Rais...
[ "Attempt", "to", "convert", "a", "snapshot", "ID", "to", "a", "snapshot", "name", ".", "If", "the", "snapshot", "has", "no", "name", "or", "if", "the", "ID", "is", "not", "found", "or", "invalid", "an", "empty", "string", "will", "be", "returned" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L423-L501
train
Convert a snapshot ID to a snapshot name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
snapshot_name_to_id
def snapshot_name_to_id(name, snap_name, strict=False, runas=None): ''' Attempt to convert a snapshot name to a snapshot ID. If the name is not found an empty string is returned. If multiple snapshots share the same name, a list will be returned :param str name: Name/ID of VM whose snapsh...
python
def snapshot_name_to_id(name, snap_name, strict=False, runas=None): ''' Attempt to convert a snapshot name to a snapshot ID. If the name is not found an empty string is returned. If multiple snapshots share the same name, a list will be returned :param str name: Name/ID of VM whose snapsh...
[ "def", "snapshot_name_to_id", "(", "name", ",", "snap_name", ",", "strict", "=", "False", ",", "runas", "=", "None", ")", ":", "# Validate VM and snapshot names", "name", "=", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", "snap_name", ...
Attempt to convert a snapshot name to a snapshot ID. If the name is not found an empty string is returned. If multiple snapshots share the same name, a list will be returned :param str name: Name/ID of VM whose snapshots are inspected :param str snap_name: Name of the snapshot :...
[ "Attempt", "to", "convert", "a", "snapshot", "name", "to", "a", "snapshot", "ID", ".", "If", "the", "name", "is", "not", "found", "an", "empty", "string", "is", "returned", ".", "If", "multiple", "snapshots", "share", "the", "same", "name", "a", "list", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L504-L559
train
Attempt to convert a snapshot name to an ID.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
_validate_snap_name
def _validate_snap_name(name, snap_name, strict=True, runas=None): ''' Validate snapshot name and convert to snapshot ID :param str name: Name/ID of VM whose snapshot name is being validated :param str snap_name: Name/ID of snapshot :param bool strict: Raise an exception i...
python
def _validate_snap_name(name, snap_name, strict=True, runas=None): ''' Validate snapshot name and convert to snapshot ID :param str name: Name/ID of VM whose snapshot name is being validated :param str snap_name: Name/ID of snapshot :param bool strict: Raise an exception i...
[ "def", "_validate_snap_name", "(", "name", ",", "snap_name", ",", "strict", "=", "True", ",", "runas", "=", "None", ")", ":", "snap_name", "=", "salt", ".", "utils", ".", "data", ".", "decode", "(", "snap_name", ")", "# Try to convert snapshot name to an ID wi...
Validate snapshot name and convert to snapshot ID :param str name: Name/ID of VM whose snapshot name is being validated :param str snap_name: Name/ID of snapshot :param bool strict: Raise an exception if multiple snapshot IDs are found :param str runas: The user that ...
[ "Validate", "snapshot", "name", "and", "convert", "to", "snapshot", "ID" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L562-L584
train
Validate snapshot name and convert to snapshot ID
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
list_snapshots
def list_snapshots(name, snap_name=None, tree=False, names=False, runas=None): ''' List the snapshots :param str name: Name/ID of VM whose snapshots will be listed :param str snap_id: Name/ID of snapshot to display information about. If ``tree=True`` is also specified, display...
python
def list_snapshots(name, snap_name=None, tree=False, names=False, runas=None): ''' List the snapshots :param str name: Name/ID of VM whose snapshots will be listed :param str snap_id: Name/ID of snapshot to display information about. If ``tree=True`` is also specified, display...
[ "def", "list_snapshots", "(", "name", ",", "snap_name", "=", "None", ",", "tree", "=", "False", ",", "names", "=", "False", ",", "runas", "=", "None", ")", ":", "# Validate VM and snapshot names", "name", "=", "salt", ".", "utils", ".", "data", ".", "dec...
List the snapshots :param str name: Name/ID of VM whose snapshots will be listed :param str snap_id: Name/ID of snapshot to display information about. If ``tree=True`` is also specified, display the snapshot subtree having this snapshot as the root snapshot :param bool tr...
[ "List", "the", "snapshots" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L587-L646
train
Return a list of snapshots for the given VM and snapshot name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
snapshot
def snapshot(name, snap_name=None, desc=None, runas=None): ''' Create a snapshot :param str name: Name/ID of VM to take a snapshot of :param str snap_name: Name of snapshot :param str desc: Description of snapshot :param str runas: The user that the prlctl com...
python
def snapshot(name, snap_name=None, desc=None, runas=None): ''' Create a snapshot :param str name: Name/ID of VM to take a snapshot of :param str snap_name: Name of snapshot :param str desc: Description of snapshot :param str runas: The user that the prlctl com...
[ "def", "snapshot", "(", "name", ",", "snap_name", "=", "None", ",", "desc", "=", "None", ",", "runas", "=", "None", ")", ":", "# Validate VM and snapshot names", "name", "=", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", "if", "sn...
Create a snapshot :param str name: Name/ID of VM to take a snapshot of :param str snap_name: Name of snapshot :param str desc: Description of snapshot :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash sa...
[ "Create", "a", "snapshot" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L649-L685
train
Create a snapshot of a node
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
delete_snapshot
def delete_snapshot(name, snap_name, runas=None, all=False): ''' Delete a snapshot .. note:: Deleting a snapshot from which other snapshots are dervied will not delete the derived snapshots :param str name: Name/ID of VM whose snapshot will be deleted :param str snap_name...
python
def delete_snapshot(name, snap_name, runas=None, all=False): ''' Delete a snapshot .. note:: Deleting a snapshot from which other snapshots are dervied will not delete the derived snapshots :param str name: Name/ID of VM whose snapshot will be deleted :param str snap_name...
[ "def", "delete_snapshot", "(", "name", ",", "snap_name", ",", "runas", "=", "None", ",", "all", "=", "False", ")", ":", "# strict means raise an error if multiple snapshot IDs found for the name given", "strict", "=", "not", "all", "# Validate VM and snapshot names", "nam...
Delete a snapshot .. note:: Deleting a snapshot from which other snapshots are dervied will not delete the derived snapshots :param str name: Name/ID of VM whose snapshot will be deleted :param str snap_name: Name/ID of snapshot to delete :param str runas: Th...
[ "Delete", "a", "snapshot" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L688-L742
train
Delete a snapshot from the base virtual machine
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/parallels.py
revert_snapshot
def revert_snapshot(name, snap_name, runas=None): ''' Revert a VM to a snapshot :param str name: Name/ID of VM to revert to a snapshot :param str snap_name: Name/ID of snapshot to revert to :param str runas: The user that the prlctl command will be run as Example: ...
python
def revert_snapshot(name, snap_name, runas=None): ''' Revert a VM to a snapshot :param str name: Name/ID of VM to revert to a snapshot :param str snap_name: Name/ID of snapshot to revert to :param str runas: The user that the prlctl command will be run as Example: ...
[ "def", "revert_snapshot", "(", "name", ",", "snap_name", ",", "runas", "=", "None", ")", ":", "# Validate VM and snapshot names", "name", "=", "salt", ".", "utils", ".", "data", ".", "decode", "(", "name", ")", "snap_name", "=", "_validate_snap_name", "(", "...
Revert a VM to a snapshot :param str name: Name/ID of VM to revert to a snapshot :param str snap_name: Name/ID of snapshot to revert to :param str runas: The user that the prlctl command will be run as Example: .. code-block:: bash salt '*' parallels.revert_snap...
[ "Revert", "a", "VM", "to", "a", "snapshot" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/parallels.py#L745-L772
train
Revert a VM to a snapshot
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
rpc
def rpc(name, dest=None, **kwargs): ''' Executes the given rpc. The returned data can be stored in a file by specifying the destination path with dest as an argument .. code-block:: yaml get-interface-information: junos: - rpc - dest: /home/user/rpc.log ...
python
def rpc(name, dest=None, **kwargs): ''' Executes the given rpc. The returned data can be stored in a file by specifying the destination path with dest as an argument .. code-block:: yaml get-interface-information: junos: - rpc - dest: /home/user/rpc.log ...
[ "def", "rpc", "(", "name", ",", "dest", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'chang...
Executes the given rpc. The returned data can be stored in a file by specifying the destination path with dest as an argument .. code-block:: yaml get-interface-information: junos: - rpc - dest: /home/user/rpc.log - interface_name: lo0 Parame...
[ "Executes", "the", "given", "rpc", ".", "The", "returned", "data", "can", "be", "stored", "in", "a", "file", "by", "specifying", "the", "destination", "path", "with", "dest", "as", "an", "argument" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L35-L75
train
Executes a given rpc on the specified file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
set_hostname
def set_hostname(name, **kwargs): ''' Changes the hostname of the device. .. code-block:: yaml device_name: junos: - set_hostname - comment: "Host-name set via saltstack." Parameters: Required * hostname: The name to be set. (def...
python
def set_hostname(name, **kwargs): ''' Changes the hostname of the device. .. code-block:: yaml device_name: junos: - set_hostname - comment: "Host-name set via saltstack." Parameters: Required * hostname: The name to be set. (def...
[ "def", "set_hostname", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "__...
Changes the hostname of the device. .. code-block:: yaml device_name: junos: - set_hostname - comment: "Host-name set via saltstack." Parameters: Required * hostname: The name to be set. (default = None) Optional * kwargs: K...
[ "Changes", "the", "hostname", "of", "the", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L79-L109
train
Sets the hostname of the device.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
commit
def commit(name, **kwargs): ''' Commits the changes loaded into the candidate configuration. .. code-block:: yaml commit the changes: junos: - commit - confirm: 10 Parameters: Optional * kwargs: Keyworded arguments which can be ...
python
def commit(name, **kwargs): ''' Commits the changes loaded into the candidate configuration. .. code-block:: yaml commit the changes: junos: - commit - confirm: 10 Parameters: Optional * kwargs: Keyworded arguments which can be ...
[ "def", "commit", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "__salt__...
Commits the changes loaded into the candidate configuration. .. code-block:: yaml commit the changes: junos: - commit - confirm: 10 Parameters: Optional * kwargs: Keyworded arguments which can be provided like- * timeout: ...
[ "Commits", "the", "changes", "loaded", "into", "the", "candidate", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L113-L153
train
Commits the changes loaded into the candidate configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
rollback
def rollback(name, **kwargs): ''' Rollbacks the committed changes. .. code-block:: yaml rollback the changes: junos: - rollback - id: 5 Parameters: Optional * id: The rollback id value [0-49]. (default = 0) * kw...
python
def rollback(name, **kwargs): ''' Rollbacks the committed changes. .. code-block:: yaml rollback the changes: junos: - rollback - id: 5 Parameters: Optional * id: The rollback id value [0-49]. (default = 0) * kw...
[ "def", "rollback", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "__salt...
Rollbacks the committed changes. .. code-block:: yaml rollback the changes: junos: - rollback - id: 5 Parameters: Optional * id: The rollback id value [0-49]. (default = 0) * kwargs: Keyworded arguments which can be pro...
[ "Rollbacks", "the", "committed", "changes", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L157-L188
train
Rollbacks the committed changes in the specified node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
diff
def diff(name, **kwargs): ''' Gets the difference between the candidate and the current configuration. .. code-block:: yaml get the diff: junos: - diff - id: 10 Parameters: Optional * id: The rollback id value [0-49]. (...
python
def diff(name, **kwargs): ''' Gets the difference between the candidate and the current configuration. .. code-block:: yaml get the diff: junos: - diff - id: 10 Parameters: Optional * id: The rollback id value [0-49]. (...
[ "def", "diff", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "__salt__",...
Gets the difference between the candidate and the current configuration. .. code-block:: yaml get the diff: junos: - diff - id: 10 Parameters: Optional * id: The rollback id value [0-49]. (default = 0)
[ "Gets", "the", "difference", "between", "the", "candidate", "and", "the", "current", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L192-L210
train
Returns the difference between the candidate and the current configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
cli
def cli(name, format='text', **kwargs): ''' Executes the CLI commands and reuturns the text output. .. code-block:: yaml show version: junos: - cli - format: xml Parameters: Required * command: The command that need to ...
python
def cli(name, format='text', **kwargs): ''' Executes the CLI commands and reuturns the text output. .. code-block:: yaml show version: junos: - cli - format: xml Parameters: Required * command: The command that need to ...
[ "def", "cli", "(", "name", ",", "format", "=", "'text'", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'c...
Executes the CLI commands and reuturns the text output. .. code-block:: yaml show version: junos: - cli - format: xml Parameters: Required * command: The command that need to be executed on Junos CLI. (default = None) Opt...
[ "Executes", "the", "CLI", "commands", "and", "reuturns", "the", "text", "output", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L214-L243
train
Execute the CLI commands and reuturns the text output of the specified node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
shutdown
def shutdown(name, **kwargs): ''' Shuts down the device. .. code-block:: yaml shut the device: junos: - shutdown - in_min: 10 Parameters: Optional * kwargs: * reboot: Whether to reboot instead of shutdow...
python
def shutdown(name, **kwargs): ''' Shuts down the device. .. code-block:: yaml shut the device: junos: - shutdown - in_min: 10 Parameters: Optional * kwargs: * reboot: Whether to reboot instead of shutdow...
[ "def", "shutdown", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "__salt...
Shuts down the device. .. code-block:: yaml shut the device: junos: - shutdown - in_min: 10 Parameters: Optional * kwargs: * reboot: Whether to reboot instead of shutdown. (default=False) * at: ...
[ "Shuts", "down", "the", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L247-L270
train
Shuts down the specified Electronic.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
install_config
def install_config(name, **kwargs): ''' Loads and commits the configuration provided. .. code-block:: yaml Install the mentioned config: junos: - install_config - path: salt//configs/interface.set - timeout: 100 - di...
python
def install_config(name, **kwargs): ''' Loads and commits the configuration provided. .. code-block:: yaml Install the mentioned config: junos: - install_config - path: salt//configs/interface.set - timeout: 100 - di...
[ "def", "install_config", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "...
Loads and commits the configuration provided. .. code-block:: yaml Install the mentioned config: junos: - install_config - path: salt//configs/interface.set - timeout: 100 - diffs_file: 'var/log/diff' .. code-block:: y...
[ "Loads", "and", "commits", "the", "configuration", "provided", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L274-L342
train
Installs and commits the configuration file provided.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
install_os
def install_os(name, **kwargs): ''' Installs the given image on the device. After the installation is complete the device is rebooted, if reboot=True is given as a keyworded argument. .. code-block:: yaml salt://images/junos_image.tgz: junos: - install_os ...
python
def install_os(name, **kwargs): ''' Installs the given image on the device. After the installation is complete the device is rebooted, if reboot=True is given as a keyworded argument. .. code-block:: yaml salt://images/junos_image.tgz: junos: - install_os ...
[ "def", "install_os", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "__sa...
Installs the given image on the device. After the installation is complete the device is rebooted, if reboot=True is given as a keyworded argument. .. code-block:: yaml salt://images/junos_image.tgz: junos: - install_os - timeout: 100 -...
[ "Installs", "the", "given", "image", "on", "the", "device", ".", "After", "the", "installation", "is", "complete", "the", "device", "is", "rebooted", "if", "reboot", "=", "True", "is", "given", "as", "a", "keyworded", "argument", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L363-L395
train
Installs the given image on the device.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
file_copy
def file_copy(name, dest=None, **kwargs): ''' Copies the file from the local device to the junos device. .. code-block:: yaml /home/m2/info.txt: junos: - file_copy - dest: info_copy.txt Parameters: Required * src: The s...
python
def file_copy(name, dest=None, **kwargs): ''' Copies the file from the local device to the junos device. .. code-block:: yaml /home/m2/info.txt: junos: - file_copy - dest: info_copy.txt Parameters: Required * src: The s...
[ "def", "file_copy", "(", "name", ",", "dest", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "...
Copies the file from the local device to the junos device. .. code-block:: yaml /home/m2/info.txt: junos: - file_copy - dest: info_copy.txt Parameters: Required * src: The sorce path where the file is kept. * dest: ...
[ "Copies", "the", "file", "from", "the", "local", "device", "to", "the", "junos", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L399-L419
train
Copies the file from the local device to the junos device.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
load
def load(name, **kwargs): ''' Loads the configuration provided onto the junos device. .. code-block:: yaml Install the mentioned config: junos: - load - path: salt//configs/interface.set .. code-block:: yaml Install the mentioned ...
python
def load(name, **kwargs): ''' Loads the configuration provided onto the junos device. .. code-block:: yaml Install the mentioned config: junos: - load - path: salt//configs/interface.set .. code-block:: yaml Install the mentioned ...
[ "def", "load", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "[", "'changes'", "]", "=", "__salt__",...
Loads the configuration provided onto the junos device. .. code-block:: yaml Install the mentioned config: junos: - load - path: salt//configs/interface.set .. code-block:: yaml Install the mentioned config: junos: ...
[ "Loads", "the", "configuration", "provided", "onto", "the", "junos", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L461-L519
train
Load the configuration file into the specified device.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/junos.py
get_table
def get_table(name, table, table_file, **kwargs): ''' Retrieve data from a Junos device using Tables/Views name (required) task definition table (required) Name of PyEZ Table file YAML file that has the table specified in table parameter path: Path of location...
python
def get_table(name, table, table_file, **kwargs): ''' Retrieve data from a Junos device using Tables/Views name (required) task definition table (required) Name of PyEZ Table file YAML file that has the table specified in table parameter path: Path of location...
[ "def", "get_table", "(", "name", ",", "table", ",", "table_file", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "ret", "...
Retrieve data from a Junos device using Tables/Views name (required) task definition table (required) Name of PyEZ Table file YAML file that has the table specified in table parameter path: Path of location of the YAML file. defaults to op directory in jnpr.ju...
[ "Retrieve", "data", "from", "a", "Junos", "device", "using", "Tables", "/", "Views" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/junos.py#L540-L581
train
Retrieve data from a Junos device using Tables and Views
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/extfs.py
mkfs
def mkfs(device, fs_type, **kwargs): ''' Create a file system on the specified device CLI Example: .. code-block:: bash salt '*' extfs.mkfs /dev/sda1 fs_type=ext4 opts='acl,noexec' Valid options are: * **block_size**: 1024, 2048 or 4096 * **check**: check for bad blocks * **...
python
def mkfs(device, fs_type, **kwargs): ''' Create a file system on the specified device CLI Example: .. code-block:: bash salt '*' extfs.mkfs /dev/sda1 fs_type=ext4 opts='acl,noexec' Valid options are: * **block_size**: 1024, 2048 or 4096 * **check**: check for bad blocks * **...
[ "def", "mkfs", "(", "device", ",", "fs_type", ",", "*", "*", "kwargs", ")", ":", "kwarg_map", "=", "{", "'block_size'", ":", "'b'", ",", "'check'", ":", "'c'", ",", "'direct'", ":", "'D'", ",", "'ext_opts'", ":", "'E'", ",", "'fragment_size'", ":", "...
Create a file system on the specified device CLI Example: .. code-block:: bash salt '*' extfs.mkfs /dev/sda1 fs_type=ext4 opts='acl,noexec' Valid options are: * **block_size**: 1024, 2048 or 4096 * **check**: check for bad blocks * **direct**: use direct IO * **ext_opts**: exten...
[ "Create", "a", "file", "system", "on", "the", "specified", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/extfs.py#L29-L123
train
Create a file system on the specified device
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/extfs.py
tune
def tune(device, **kwargs): ''' Set attributes for the specified device (using tune2fs) CLI Example: .. code-block:: bash salt '*' extfs.tune /dev/sda1 force=True label=wildstallyns opts='acl,noexec' Valid options are: * **max**: max mount count * **count**: mount count * **...
python
def tune(device, **kwargs): ''' Set attributes for the specified device (using tune2fs) CLI Example: .. code-block:: bash salt '*' extfs.tune /dev/sda1 force=True label=wildstallyns opts='acl,noexec' Valid options are: * **max**: max mount count * **count**: mount count * **...
[ "def", "tune", "(", "device", ",", "*", "*", "kwargs", ")", ":", "kwarg_map", "=", "{", "'max'", ":", "'c'", ",", "'count'", ":", "'C'", ",", "'error'", ":", "'e'", ",", "'extended_opts'", ":", "'E'", ",", "'force'", ":", "'f'", ",", "'group'", ":"...
Set attributes for the specified device (using tune2fs) CLI Example: .. code-block:: bash salt '*' extfs.tune /dev/sda1 force=True label=wildstallyns opts='acl,noexec' Valid options are: * **max**: max mount count * **count**: mount count * **error**: error behavior * **extended...
[ "Set", "attributes", "for", "the", "specified", "device", "(", "using", "tune2fs", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/extfs.py#L126-L191
train
Tune the specified device and return the reserved blocks.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/extfs.py
dump
def dump(device, args=None): ''' Return all contents of dumpe2fs for a specified device CLI Example: .. code-block:: bash salt '*' extfs.dump /dev/sda1 ''' cmd = 'dumpe2fs {0}'.format(device) if args: cmd = cmd + ' -' + args ret = {'attributes': {}, 'blocks': {}} o...
python
def dump(device, args=None): ''' Return all contents of dumpe2fs for a specified device CLI Example: .. code-block:: bash salt '*' extfs.dump /dev/sda1 ''' cmd = 'dumpe2fs {0}'.format(device) if args: cmd = cmd + ' -' + args ret = {'attributes': {}, 'blocks': {}} o...
[ "def", "dump", "(", "device", ",", "args", "=", "None", ")", ":", "cmd", "=", "'dumpe2fs {0}'", ".", "format", "(", "device", ")", "if", "args", ":", "cmd", "=", "cmd", "+", "' -'", "+", "args", "ret", "=", "{", "'attributes'", ":", "{", "}", ","...
Return all contents of dumpe2fs for a specified device CLI Example: .. code-block:: bash salt '*' extfs.dump /dev/sda1
[ "Return", "all", "contents", "of", "dumpe2fs", "for", "a", "specified", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/extfs.py#L222-L285
train
Return all contents of dumpe2fs for a specified device
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
zmq_version
def zmq_version(): ''' ZeroMQ python bindings >= 2.1.9 are required ''' try: import zmq except Exception: # Return True for local mode return True ver = zmq.__version__ # The last matched group can be None if the version # is something like 3.1 and that will work ...
python
def zmq_version(): ''' ZeroMQ python bindings >= 2.1.9 are required ''' try: import zmq except Exception: # Return True for local mode return True ver = zmq.__version__ # The last matched group can be None if the version # is something like 3.1 and that will work ...
[ "def", "zmq_version", "(", ")", ":", "try", ":", "import", "zmq", "except", "Exception", ":", "# Return True for local mode", "return", "True", "ver", "=", "zmq", ".", "__version__", "# The last matched group can be None if the version", "# is something like 3.1 and that wi...
ZeroMQ python bindings >= 2.1.9 are required
[ "ZeroMQ", "python", "bindings", ">", "=", "2", ".", "1", ".", "9", "are", "required" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L40-L98
train
Check if ZeroMQ python bindings > = 2. 1. 9 are required and return the current ZeroMQ version.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/verify.py
lookup_family
def lookup_family(hostname): ''' Lookup a hostname and determine its address family. The first address returned will be AF_INET6 if the system is IPv6-enabled, and AF_INET otherwise. ''' # If lookups fail, fall back to AF_INET sockets (and v4 addresses). fallback = socket.AF_INET try: ...
python
def lookup_family(hostname): ''' Lookup a hostname and determine its address family. The first address returned will be AF_INET6 if the system is IPv6-enabled, and AF_INET otherwise. ''' # If lookups fail, fall back to AF_INET sockets (and v4 addresses). fallback = socket.AF_INET try: ...
[ "def", "lookup_family", "(", "hostname", ")", ":", "# If lookups fail, fall back to AF_INET sockets (and v4 addresses).", "fallback", "=", "socket", ".", "AF_INET", "try", ":", "hostnames", "=", "socket", ".", "getaddrinfo", "(", "hostname", "or", "None", ",", "None",...
Lookup a hostname and determine its address family. The first address returned will be AF_INET6 if the system is IPv6-enabled, and AF_INET otherwise.
[ "Lookup", "a", "hostname", "and", "determine", "its", "address", "family", ".", "The", "first", "address", "returned", "will", "be", "AF_INET6", "if", "the", "system", "is", "IPv6", "-", "enabled", "and", "AF_INET", "otherwise", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/verify.py#L101-L117
train
Lookup a hostname and determine its address family.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...