partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
archive
.. versionchanged:: 2015.8.0 Returns ``True`` if successful, raises an error if not. Interface to `git-archive(1)`_, exports a tarball/zip file of the repository cwd The path to be archived .. note:: ``git archive`` permits a partial archive to be created. Thus, this ...
salt/modules/git.py
def archive(cwd, output, rev='HEAD', prefix=None, git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' .. versionchanged:: 2015.8.0 Returns ``True`` if...
def archive(cwd, output, rev='HEAD', prefix=None, git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' .. versionchanged:: 2015.8.0 Returns ``True`` if...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "0", "Returns", "True", "if", "successful", "raises", "an", "error", "if", "not", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L546-L699
[ "def", "archive", "(", "cwd", ",", "output", ",", "rev", "=", "'HEAD'", ",", "prefix", "=", "None", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
branch
Interface to `git-branch(1)`_ cwd The path to the git checkout name Name of the branch on which to operate. If not specified, the current branch will be assumed. opts Any additional options to add to the command line, in a single string .. note:: To cr...
salt/modules/git.py
def branch(cwd, name=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-branch(1)`_ cwd The path to the git checkout name Name of the branc...
def branch(cwd, name=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-branch(1)`_ cwd The path to the git checkout name Name of the branc...
[ "Interface", "to", "git", "-", "branch", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L702-L799
[ "def", "branch", "(", "cwd", ",", "name", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
checkout
Interface to `git-checkout(1)`_ cwd The path to the git checkout opts Any additional options to add to the command line, in a single string .. note:: On the Salt CLI, if the opts are preceded with a dash, it is necessary to precede them with ``opts=`` (as in th...
salt/modules/git.py
def checkout(cwd, rev=None, force=False, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-checkout(1)`_ cwd The path to the git c...
def checkout(cwd, rev=None, force=False, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-checkout(1)`_ cwd The path to the git c...
[ "Interface", "to", "git", "-", "checkout", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L802-L910
[ "def", "checkout", "(", "cwd", ",", "rev", "=", "None", ",", "force", "=", "False", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
clone
Interface to `git-clone(1)`_ cwd Location of git clone .. versionchanged:: 2015.8.0 If ``name`` is passed, then the clone will be made *within* this directory. url The URL of the repository to be cloned .. versionchanged:: 2015.8.0 Argument...
salt/modules/git.py
def clone(cwd, url=None, # Remove default value once 'repository' arg is removed name=None, opts='', git_opts='', user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, ...
def clone(cwd, url=None, # Remove default value once 'repository' arg is removed name=None, opts='', git_opts='', user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, ...
[ "Interface", "to", "git", "-", "clone", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L913-L1074
[ "def", "clone", "(", "cwd", ",", "url", "=", "None", ",", "# Remove default value once 'repository' arg is removed", "name", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "iden...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
commit
Interface to `git-commit(1)`_ cwd The path to the git checkout message Commit message opts Any additional options to add to the command line, in a single string. These opts will be added to the end of the git command being run. .. note:: On the Salt CL...
salt/modules/git.py
def commit(cwd, message, opts='', git_opts='', user=None, password=None, filename=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-commit(1)`_ cwd The path to the git checkout messag...
def commit(cwd, message, opts='', git_opts='', user=None, password=None, filename=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-commit(1)`_ cwd The path to the git checkout messag...
[ "Interface", "to", "git", "-", "commit", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1077-L1178
[ "def", "commit", "(", "cwd", ",", "message", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "filename", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
config_get
Get the value of a key in the git configuration file key The name of the configuration key to get .. versionchanged:: 2015.8.0 Argument renamed from ``setting_name`` to ``key`` cwd The path to the git checkout .. versionchanged:: 2015.8.0 Now optional ...
salt/modules/git.py
def config_get(key, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' Get the value of a key in the git configuration file key The name of the configuration key to ...
def config_get(key, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' Get the value of a key in the git configuration file key The name of the configuration key to ...
[ "Get", "the", "value", "of", "a", "key", "in", "the", "git", "configuration", "file" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1181-L1276
[ "def", "config_get", "(", "key", ",", "cwd", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# Sanitize kwargs and make sure ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
config_get_regexp
r''' .. versionadded:: 2015.8.0 Get the value of a key or keys in the git configuration file using regexes for more flexible matching. The return data is a dictionary mapping keys to lists of values matching the ``value_regex``. If no values match, an empty dictionary will be returned. key ...
salt/modules/git.py
def config_get_regexp(key, value_regex=None, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): r''' .. versionadded::...
def config_get_regexp(key, value_regex=None, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): r''' .. versionadded::...
[ "r", "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1279-L1373
[ "def", "config_get_regexp", "(", "key", ",", "value_regex", "=", "None", ",", "cwd", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ",", "*", "*", "kwargs", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
config_set
.. versionchanged:: 2015.8.0 Return the value(s) of the key being set Set a key in the git configuration file cwd The path to the git checkout. Must be an absolute path, or the word ``global`` to indicate that a global key should be set. .. versionchanged:: 2014.7.0 ...
salt/modules/git.py
def config_set(key, value=None, multivar=None, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' .. versionchanged:: 2015.8.0 Return the va...
def config_set(key, value=None, multivar=None, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' .. versionchanged:: 2015.8.0 Return the va...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "0", "Return", "the", "value", "(", "s", ")", "of", "the", "key", "being", "set" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1379-L1534
[ "def", "config_set", "(", "key", ",", "value", "=", "None", ",", "multivar", "=", "None", ",", "cwd", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
config_unset
.. versionadded:: 2015.8.0 Unset a key in the git configuration file cwd The path to the git checkout. Must be an absolute path, or the word ``global`` to indicate that a global key should be unset. key The name of the configuration key to unset value_regex Regular ex...
salt/modules/git.py
def config_unset(key, value_regex=None, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' .. versionadded:: 2015.8.0 Unset a key in the git con...
def config_unset(key, value_regex=None, cwd=None, user=None, password=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' .. versionadded:: 2015.8.0 Unset a key in the git con...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1537-L1663
[ "def", "config_unset", "(", "key", ",", "value_regex", "=", "None", ",", "cwd", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ",", "*", "*", "kwargs", ")",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
current_branch
Returns the current branch name of a local checkout. If HEAD is detached, return the SHA1 of the revision which is currently checked out. cwd The path to the git checkout user User under which to run the git command. By default, the command is run by the user under which the minion...
salt/modules/git.py
def current_branch(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Returns the current branch name of a local checkout. If HEAD is detached, return the SHA1 of the revision which is currently checked ...
def current_branch(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Returns the current branch name of a local checkout. If HEAD is detached, return the SHA1 of the revision which is currently checked ...
[ "Returns", "the", "current", "branch", "name", "of", "a", "local", "checkout", ".", "If", "HEAD", "is", "detached", "return", "the", "SHA1", "of", "the", "revision", "which", "is", "currently", "checked", "out", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1666-L1719
[ "def", "current_branch", "(", "cwd", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", "user", ")", "command", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
describe
Returns the `git-describe(1)`_ string (or the SHA1 hash if there are no tags) for the given revision. cwd The path to the git checkout rev : HEAD The revision to describe user User under which to run the git command. By default, the command is run by the user under whi...
salt/modules/git.py
def describe(cwd, rev='HEAD', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Returns the `git-describe(1)`_ string (or the SHA1 hash if there are no tags) for the given revision. cwd The path to the git...
def describe(cwd, rev='HEAD', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Returns the `git-describe(1)`_ string (or the SHA1 hash if there are no tags) for the given revision. cwd The path to the git...
[ "Returns", "the", "git", "-", "describe", "(", "1", ")", "_", "string", "(", "or", "the", "SHA1", "hash", "if", "there", "are", "no", "tags", ")", "for", "the", "given", "revision", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1722-L1785
[ "def", "describe", "(", "cwd", ",", "rev", "=", "'HEAD'", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", "user", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
diff
.. versionadded:: 2015.8.12,2016.3.3,2016.11.0 Interface to `git-diff(1)`_ cwd The path to the git checkout item1 and item2 Revision(s) to pass to the ``git diff`` command. One or both of these arguments may be ignored if some of the options below are set to ``True``. When...
salt/modules/git.py
def diff(cwd, item1=None, item2=None, opts='', git_opts='', user=None, password=None, no_index=False, cached=False, paths=None, output_encoding=None): ''' .. versionadded:: 2015.8.12,2016.3.3,2016.11.0 Interface to `g...
def diff(cwd, item1=None, item2=None, opts='', git_opts='', user=None, password=None, no_index=False, cached=False, paths=None, output_encoding=None): ''' .. versionadded:: 2015.8.12,2016.3.3,2016.11.0 Interface to `g...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "12", "2016", ".", "3", ".", "3", "2016", ".", "11", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1788-L1957
[ "def", "diff", "(", "cwd", ",", "item1", "=", "None", ",", "item2", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "no_index", "=", "False", ",", "cached", "=", "False...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
discard_local_changes
.. versionadded:: 2019.2.0 Runs a ``git checkout -- <path>`` from the directory specified by ``cwd``. cwd The path to the git checkout path path relative to cwd (defaults to ``.``) user User under which to run the git command. By default, the command is run by the use...
salt/modules/git.py
def discard_local_changes(cwd, path='.', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2019.2.0 Runs a ``git checkout -- <path>`` ...
def discard_local_changes(cwd, path='.', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2019.2.0 Runs a ``git checkout -- <path>`` ...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L1960-L2015
[ "def", "discard_local_changes", "(", "cwd", ",", "path", "=", "'.'", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
fetch
.. versionchanged:: 2015.8.2 Return data is now a dictionary containing information on branches and tags that were added/updated Interface to `git-fetch(1)`_ cwd The path to the git checkout remote Optional remote name to fetch. If not passed, then git will use its ...
salt/modules/git.py
def fetch(cwd, remote=None, force=False, refspecs=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None): ''' .. versionchanged:...
def fetch(cwd, remote=None, force=False, refspecs=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None): ''' .. versionchanged:...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "2", "Return", "data", "is", "now", "a", "dictionary", "containing", "information", "on", "branches", "and", "tags", "that", "were", "added", "/", "updated" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2018-L2192
[ "def", "fetch", "(", "cwd", ",", "remote", "=", "None", ",", "force", "=", "False", ",", "refspecs", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "identity", "=", "N...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
init
Interface to `git-init(1)`_ cwd The path to the directory to be initialized bare : False If ``True``, init a bare repository .. versionadded:: 2015.8.0 template Set this argument to specify an alternate `template directory`_ .. versionadded:: 2015.8.0 separa...
salt/modules/git.py
def init(cwd, bare=False, template=None, separate_git_dir=None, shared=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-init(1)`_ cwd The...
def init(cwd, bare=False, template=None, separate_git_dir=None, shared=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-init(1)`_ cwd The...
[ "Interface", "to", "git", "-", "init", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2195-L2317
[ "def", "init", "(", "cwd", ",", "bare", "=", "False", ",", "template", "=", "None", ",", "separate_git_dir", "=", "None", ",", "shared", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "="...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
is_worktree
.. versionadded:: 2015.8.0 This function will attempt to determine if ``cwd`` is part of a worktree by checking its ``.git`` to see if it is a file containing a reference to another gitdir. cwd path to the worktree to be removed user User under which to run the git command. By def...
salt/modules/git.py
def is_worktree(cwd, user=None, password=None, output_encoding=None): ''' .. versionadded:: 2015.8.0 This function will attempt to determine if ``cwd`` is part of a worktree by checking its ``.git`` to see if it is a file containing a reference to ano...
def is_worktree(cwd, user=None, password=None, output_encoding=None): ''' .. versionadded:: 2015.8.0 This function will attempt to determine if ``cwd`` is part of a worktree by checking its ``.git`` to see if it is a file containing a reference to ano...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2320-L2389
[ "def", "is_worktree", "(", "cwd", ",", "user", "=", "None", ",", "password", "=", "None", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", "user", ")", "try", ":", "toplevel", "=", "_get_toplevel", "(", "cwd",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_branches
.. versionadded:: 2015.8.0 Return a list of branches cwd The path to the git checkout remote : False If ``True``, list remote branches. Otherwise, local branches will be listed. .. warning:: This option will only return remote branches of which the local ...
salt/modules/git.py
def list_branches(cwd, remote=False, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Return a list of branches cwd The path to the git checkout r...
def list_branches(cwd, remote=False, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Return a list of branches cwd The path to the git checkout r...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2392-L2459
[ "def", "list_branches", "(", "cwd", ",", "remote", "=", "False", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", "u...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_tags
.. versionadded:: 2015.8.0 Return a list of tags cwd The path to the git checkout user User under which to run the git command. By default, the command is run by the user under which the minion is running. password Windows only. Required when specifying ``user``. This...
salt/modules/git.py
def list_tags(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Return a list of tags cwd The path to the git checkout user User under which to run the git command. By ...
def list_tags(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Return a list of tags cwd The path to the git checkout user User under which to run the git command. By ...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2462-L2517
[ "def", "list_tags", "(", "cwd", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", "user", ")", "command", "=", "[", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_worktrees
.. versionadded:: 2015.8.0 Returns information on worktrees .. versionchanged:: 2015.8.4 Version 2.7.0 added the ``list`` subcommand to `git-worktree(1)`_ which provides a lot of additional information. The return data has been changed to include this information, even for pre-2.7.0 ve...
salt/modules/git.py
def list_worktrees(cwd, stale=False, user=None, password=None, output_encoding=None, **kwargs): ''' .. versionadded:: 2015.8.0 Returns information on worktrees .. versionchanged:: 2015.8.4 Version 2....
def list_worktrees(cwd, stale=False, user=None, password=None, output_encoding=None, **kwargs): ''' .. versionadded:: 2015.8.0 Returns information on worktrees .. versionchanged:: 2015.8.4 Version 2....
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2520-L2827
[ "def", "list_worktrees", "(", "cwd", ",", "stale", "=", "False", ",", "user", "=", "None", ",", "password", "=", "None", ",", "output_encoding", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "not", "_check_worktree_support", "(", "failhard", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ls_remote
Interface to `git-ls-remote(1)`_. Returns the upstream hash for a remote reference. cwd The path to the git checkout. Optional (and ignored if present) when ``remote`` is set to a URL instead of a remote name. remote : origin The name of the remote to query. Can be the name of a gi...
salt/modules/git.py
def ls_remote(cwd=None, remote='origin', ref=None, opts='', git_opts='', user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, ...
def ls_remote(cwd=None, remote='origin', ref=None, opts='', git_opts='', user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, ...
[ "Interface", "to", "git", "-", "ls", "-", "remote", "(", "1", ")", "_", ".", "Returns", "the", "upstream", "hash", "for", "a", "remote", "reference", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2830-L2992
[ "def", "ls_remote", "(", "cwd", "=", "None", ",", "remote", "=", "'origin'", ",", "ref", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "identity", "=", "None", ",", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
merge
Interface to `git-merge(1)`_ cwd The path to the git checkout rev Revision to merge into the current branch. If not specified, the remote tracking branch will be merged. .. versionadded:: 2015.8.0 opts Any additional options to add to the command line, in a single...
salt/modules/git.py
def merge(cwd, rev=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' Interface to `git-merge(1)`_ cwd The path to the git checkout ...
def merge(cwd, rev=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, output_encoding=None, **kwargs): ''' Interface to `git-merge(1)`_ cwd The path to the git checkout ...
[ "Interface", "to", "git", "-", "merge", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L2995-L3109
[ "def", "merge", "(", "cwd", ",", "rev", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "identity", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
merge_base
.. versionadded:: 2015.8.0 Interface to `git-merge-base(1)`_. cwd The path to the git checkout refs Any refs/commits to check for a merge base. Can be passed as a comma-separated list or a Python list. all : False Return a list of all matching merge bases. Not compati...
salt/modules/git.py
def merge_base(cwd, refs=None, octopus=False, is_ancestor=False, independent=False, fork_point=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False,...
def merge_base(cwd, refs=None, octopus=False, is_ancestor=False, independent=False, fork_point=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False,...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L3112-L3322
[ "def", "merge_base", "(", "cwd", ",", "refs", "=", "None", ",", "octopus", "=", "False", ",", "is_ancestor", "=", "False", ",", "independent", "=", "False", ",", "fork_point", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "use...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
merge_tree
.. versionadded:: 2015.8.0 Interface to `git-merge-tree(1)`_, shows the merge results and conflicts from a 3-way merge without touching the index. cwd The path to the git checkout ref1 First ref/commit to compare ref2 Second ref/commit to compare base The bas...
salt/modules/git.py
def merge_tree(cwd, ref1, ref2, base=None, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Interface to `git-merge-tree(1)`_, shows the merge result...
def merge_tree(cwd, ref1, ref2, base=None, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Interface to `git-merge-tree(1)`_, shows the merge result...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L3325-L3405
[ "def", "merge_tree", "(", "cwd", ",", "ref1", ",", "ref2", ",", "base", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
push
Interface to `git-push(1)`_ cwd The path to the git checkout remote Name of the remote to which the ref should being pushed .. versionadded:: 2015.8.0 ref : master Name of the ref to push .. note:: Being a refspec_, this argument can include a colon t...
salt/modules/git.py
def push(cwd, remote=None, ref=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None, **kwargs): ''' Interface to `git-push(1)`_ cwd ...
def push(cwd, remote=None, ref=None, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None, **kwargs): ''' Interface to `git-push(1)`_ cwd ...
[ "Interface", "to", "git", "-", "push", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L3519-L3653
[ "def", "push", "(", "cwd", ",", "remote", "=", "None", ",", "ref", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "identity", "=", "None", ",", "ignore_retcode", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
rebase
Interface to `git-rebase(1)`_ cwd The path to the git checkout rev : master The revision to rebase onto the current branch opts Any additional options to add to the command line, in a single string .. note:: On the Salt CLI, if the opts are preceded with a das...
salt/modules/git.py
def rebase(cwd, rev='master', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-rebase(1)`_ cwd The path to the git checkout rev : master The re...
def rebase(cwd, rev='master', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-rebase(1)`_ cwd The path to the git checkout rev : master The re...
[ "Interface", "to", "git", "-", "rebase", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L3656-L3745
[ "def", "rebase", "(", "cwd", ",", "rev", "=", "'master'", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remote_get
Get the fetch and push URL for a specific remote cwd The path to the git checkout remote : origin Name of the remote to query user User under which to run the git command. By default, the command is run by the user under which the minion is running. password W...
salt/modules/git.py
def remote_get(cwd, remote='origin', user=None, password=None, redact_auth=True, ignore_retcode=False, output_encoding=None): ''' Get the fetch and push URL for a specific remote cwd The path to the git checko...
def remote_get(cwd, remote='origin', user=None, password=None, redact_auth=True, ignore_retcode=False, output_encoding=None): ''' Get the fetch and push URL for a specific remote cwd The path to the git checko...
[ "Get", "the", "fetch", "and", "push", "URL", "for", "a", "specific", "remote" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L3748-L3823
[ "def", "remote_get", "(", "cwd", ",", "remote", "=", "'origin'", ",", "user", "=", "None", ",", "password", "=", "None", ",", "redact_auth", "=", "True", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remote_refs
.. versionadded:: 2015.8.0 Return the remote refs for the specified URL by running ``git ls-remote``. url URL of the remote repository filter Optionally provide a ref name to ``git ls-remote``. This can be useful to make this function run faster on repositories with many b...
salt/modules/git.py
def remote_refs(url, heads=False, tags=False, user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, output_encoding=None, ...
def remote_refs(url, heads=False, tags=False, user=None, password=None, identity=None, https_user=None, https_pass=None, ignore_retcode=False, output_encoding=None, ...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L3826-L3959
[ "def", "remote_refs", "(", "url", ",", "heads", "=", "False", ",", "tags", "=", "False", ",", "user", "=", "None", ",", "password", "=", "None", ",", "identity", "=", "None", ",", "https_user", "=", "None", ",", "https_pass", "=", "None", ",", "ignor...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remote_set
cwd The path to the git checkout url Remote URL to set remote : origin Name of the remote to set push_url If unset, the push URL will be identical to the fetch URL. .. versionadded:: 2015.8.0 user User under which to run the git command. By default, t...
salt/modules/git.py
def remote_set(cwd, url, remote='origin', user=None, password=None, https_user=None, https_pass=None, push_url=None, push_https_user=None, push_https_pass=None, ignore_re...
def remote_set(cwd, url, remote='origin', user=None, password=None, https_user=None, https_pass=None, push_url=None, push_https_user=None, push_https_pass=None, ignore_re...
[ "cwd", "The", "path", "to", "the", "git", "checkout" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L3962-L4098
[ "def", "remote_set", "(", "cwd", ",", "url", ",", "remote", "=", "'origin'", ",", "user", "=", "None", ",", "password", "=", "None", ",", "https_user", "=", "None", ",", "https_pass", "=", "None", ",", "push_url", "=", "None", ",", "push_https_user", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
remotes
Get fetch and push URLs for each remote in a git checkout cwd The path to the git checkout user User under which to run the git command. By default, the command is run by the user under which the minion is running. password Windows only. Required when specifying ``user``. ...
salt/modules/git.py
def remotes(cwd, user=None, password=None, redact_auth=True, ignore_retcode=False, output_encoding=None): ''' Get fetch and push URLs for each remote in a git checkout cwd The path to the git checkout user User under which to ...
def remotes(cwd, user=None, password=None, redact_auth=True, ignore_retcode=False, output_encoding=None): ''' Get fetch and push URLs for each remote in a git checkout cwd The path to the git checkout user User under which to ...
[ "Get", "fetch", "and", "push", "URLs", "for", "each", "remote", "in", "a", "git", "checkout" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4101-L4189
[ "def", "remotes", "(", "cwd", ",", "user", "=", "None", ",", "password", "=", "None", ",", "redact_auth", "=", "True", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", "use...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
reset
Interface to `git-reset(1)`_, returns the stdout from the git command cwd The path to the git checkout opts Any additional options to add to the command line, in a single string .. note:: On the Salt CLI, if the opts are preceded with a dash, it is necessary to...
salt/modules/git.py
def reset(cwd, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-reset(1)`_, returns the stdout from the git command cwd The path to the git checkout...
def reset(cwd, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-reset(1)`_, returns the stdout from the git command cwd The path to the git checkout...
[ "Interface", "to", "git", "-", "reset", "(", "1", ")", "_", "returns", "the", "stdout", "from", "the", "git", "command" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4192-L4289
[ "def", "reset", "(", "cwd", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "identity", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
rev_parse
.. versionadded:: 2015.8.0 Interface to `git-rev-parse(1)`_ cwd The path to the git checkout rev Revision to parse. See the `SPECIFYING REVISIONS`_ section of the `git-rev-parse(1)`_ manpage for details on how to format this argument. This argument is optional when using ...
salt/modules/git.py
def rev_parse(cwd, rev=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Interface to `git-rev-parse(1)`_ cwd The pa...
def rev_parse(cwd, rev=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Interface to `git-rev-parse(1)`_ cwd The pa...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4292-L4385
[ "def", "rev_parse", "(", "cwd", ",", "rev", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
revision
Returns the SHA1 hash of a given identifier (hash, branch, tag, HEAD, etc.) cwd The path to the git checkout rev : HEAD The revision short : False If ``True``, return an abbreviated SHA1 git hash user User under which to run the git command. By default, the command is...
salt/modules/git.py
def revision(cwd, rev='HEAD', short=False, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Returns the SHA1 hash of a given identifier (hash, branch, tag, HEAD, etc.) cwd The path to the git che...
def revision(cwd, rev='HEAD', short=False, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Returns the SHA1 hash of a given identifier (hash, branch, tag, HEAD, etc.) cwd The path to the git che...
[ "Returns", "the", "SHA1", "hash", "of", "a", "given", "identifier", "(", "hash", "branch", "tag", "HEAD", "etc", ".", ")" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4388-L4451
[ "def", "revision", "(", "cwd", ",", "rev", "=", "'HEAD'", ",", "short", "=", "False", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
rm_
Interface to `git-rm(1)`_ cwd The path to the git checkout filename The location of the file/directory to remove, relative to ``cwd`` .. note:: To remove a directory, ``-r`` must be part of the ``opts`` parameter. opts Any additional options to add...
salt/modules/git.py
def rm_(cwd, filename, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-rm(1)`_ cwd The path to the git checkout filename The location of the file/directory to remo...
def rm_(cwd, filename, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-rm(1)`_ cwd The path to the git checkout filename The location of the file/directory to remo...
[ "Interface", "to", "git", "-", "rm", "(", "1", ")", "_" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4454-L4541
[ "def", "rm_", "(", "cwd", ",", "filename", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
stash
Interface to `git-stash(1)`_, returns the stdout from the git command cwd The path to the git checkout opts Any additional options to add to the command line, in a single string. Use this to complete the ``git stash`` command by adding the remaining arguments (i.e. ``'save <st...
salt/modules/git.py
def stash(cwd, action='save', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-stash(1)`_, returns the stdout from the git command cwd The path to the git checkout...
def stash(cwd, action='save', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-stash(1)`_, returns the stdout from the git command cwd The path to the git checkout...
[ "Interface", "to", "git", "-", "stash", "(", "1", ")", "_", "returns", "the", "stdout", "from", "the", "git", "command" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4544-L4623
[ "def", "stash", "(", "cwd", ",", "action", "=", "'save'", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
status
.. versionchanged:: 2015.8.0 Return data has changed from a list of lists to a dictionary Returns the changes to the repository cwd The path to the git checkout user User under which to run the git command. By default, the command is run by the user under which the minion ...
salt/modules/git.py
def status(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionchanged:: 2015.8.0 Return data has changed from a list of lists to a dictionary Returns the changes to the repository cwd The path to the git...
def status(cwd, user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionchanged:: 2015.8.0 Return data has changed from a list of lists to a dictionary Returns the changes to the repository cwd The path to the git...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "0", "Return", "data", "has", "changed", "from", "a", "list", "of", "lists", "to", "a", "dictionary" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4626-L4695
[ "def", "status", "(", "cwd", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", "cwd", "=", "_expand_path", "(", "cwd", ",", "user", ")", "state_map", "=", "{", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
submodule
.. versionchanged:: 2015.8.0 Added the ``command`` argument to allow for operations other than ``update`` to be run on submodules, and deprecated the ``init`` argument. To do a submodule update with ``init=True`` moving forward, use ``command=update opts='--init'`` Interface to `git...
salt/modules/git.py
def submodule(cwd, command, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None, **kwargs): ''' .. ver...
def submodule(cwd, command, opts='', git_opts='', user=None, password=None, identity=None, ignore_retcode=False, saltenv='base', output_encoding=None, **kwargs): ''' .. ver...
[ "..", "versionchanged", "::", "2015", ".", "8", ".", "0", "Added", "the", "command", "argument", "to", "allow", "for", "operations", "other", "than", "update", "to", "be", "run", "on", "submodules", "and", "deprecated", "the", "init", "argument", ".", "To"...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4698-L4853
[ "def", "submodule", "(", "cwd", ",", "command", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "identity", "=", "None", ",", "ignore_retcode", "=", "False", ",", "saltenv", "=", "'base...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
symbolic_ref
.. versionadded:: 2015.8.0 Interface to `git-symbolic-ref(1)`_ cwd The path to the git checkout ref Symbolic ref to read/modify value If passed, then the symbolic ref will be set to this value and an empty string will be returned. If not passed, then the ref ...
salt/modules/git.py
def symbolic_ref(cwd, ref, value=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Interfac...
def symbolic_ref(cwd, ref, value=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2015.8.0 Interfac...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4856-L4957
[ "def", "symbolic_ref", "(", "cwd", ",", "ref", ",", "value", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "N...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
tag
.. versionadded:: 2018.3.4 Interface to `git-tag(1)`_, adds and removes tags. cwd The path to the main git checkout or a linked worktree name Name of the tag ref : HEAD Which ref to tag (defaults to local clone's HEAD) .. note:: This argument is ignored w...
salt/modules/git.py
def tag(cwd, name, ref='HEAD', message=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2018.3.4 Interface to `git-tag(1)`_, adds and removes tags. cwd ...
def tag(cwd, name, ref='HEAD', message=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' .. versionadded:: 2018.3.4 Interface to `git-tag(1)`_, adds and removes tags. cwd ...
[ "..", "versionadded", "::", "2018", ".", "3", ".", "4" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4960-L5067
[ "def", "tag", "(", "cwd", ",", "name", ",", "ref", "=", "'HEAD'", ",", "message", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
version
.. versionadded:: 2015.8.0 Returns the version of Git installed on the minion versioninfo : False If ``True``, return the version in a versioninfo list (e.g. ``[2, 5, 0]``) CLI Example: .. code-block:: bash salt myminion git.version
salt/modules/git.py
def version(versioninfo=False): ''' .. versionadded:: 2015.8.0 Returns the version of Git installed on the minion versioninfo : False If ``True``, return the version in a versioninfo list (e.g. ``[2, 5, 0]``) CLI Example: .. code-block:: bash salt myminion git.versio...
def version(versioninfo=False): ''' .. versionadded:: 2015.8.0 Returns the version of Git installed on the minion versioninfo : False If ``True``, return the version in a versioninfo list (e.g. ``[2, 5, 0]``) CLI Example: .. code-block:: bash salt myminion git.versio...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L5070-L5116
[ "def", "version", "(", "versioninfo", "=", "False", ")", ":", "contextkey", "=", "'git.version'", "contextkey_info", "=", "'git.versioninfo'", "if", "contextkey", "not", "in", "__context__", ":", "try", ":", "version_", "=", "_git_run", "(", "[", "'git'", ",",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
worktree_add
.. versionadded:: 2015.8.0 Interface to `git-worktree(1)`_, adds a worktree cwd The path to the git checkout worktree_path Path to the new worktree. Can be either absolute, or relative to ``cwd``. branch Name of new branch to create. If omitted, will be set to the bas...
salt/modules/git.py
def worktree_add(cwd, worktree_path, ref=None, reset_branch=None, force=None, detach=False, opts='', git_opts='', user=None, password=None, ignore_ret...
def worktree_add(cwd, worktree_path, ref=None, reset_branch=None, force=None, detach=False, opts='', git_opts='', user=None, password=None, ignore_ret...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L5119-L5266
[ "def", "worktree_add", "(", "cwd", ",", "worktree_path", ",", "ref", "=", "None", ",", "reset_branch", "=", "None", ",", "force", "=", "None", ",", "detach", "=", "False", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
worktree_prune
.. versionadded:: 2015.8.0 Interface to `git-worktree(1)`_, prunes stale worktree administrative data from the gitdir cwd The path to the main git checkout or a linked worktree dry_run : False If ``True``, then this function will report what would have been pruned, but no chan...
salt/modules/git.py
def worktree_prune(cwd, dry_run=False, verbose=True, expire=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encodi...
def worktree_prune(cwd, dry_run=False, verbose=True, expire=None, opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encodi...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L5269-L5380
[ "def", "worktree_prune", "(", "cwd", ",", "dry_run", "=", "False", ",", "verbose", "=", "True", ",", "expire", "=", "None", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retco...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
worktree_rm
.. versionadded:: 2015.8.0 Recursively removes the worktree located at ``cwd``, returning ``True`` if successful. This function will attempt to determine if ``cwd`` is actually a worktree by invoking :py:func:`git.is_worktree <salt.modules.git.is_worktree>`. If the path does not correspond to a wor...
salt/modules/git.py
def worktree_rm(cwd, user=None, output_encoding=None): ''' .. versionadded:: 2015.8.0 Recursively removes the worktree located at ``cwd``, returning ``True`` if successful. This function will attempt to determine if ``cwd`` is actually a worktree by invoking :py:func:`git.is_worktree <salt.modu...
def worktree_rm(cwd, user=None, output_encoding=None): ''' .. versionadded:: 2015.8.0 Recursively removes the worktree located at ``cwd``, returning ``True`` if successful. This function will attempt to determine if ``cwd`` is actually a worktree by invoking :py:func:`git.is_worktree <salt.modu...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L5383-L5438
[ "def", "worktree_rm", "(", "cwd", ",", "user", "=", "None", ",", "output_encoding", "=", "None", ")", ":", "_check_worktree_support", "(", ")", "cwd", "=", "_expand_path", "(", "cwd", ",", "user", ")", "if", "not", "os", ".", "path", ".", "exists", "("...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_
.. versionadded:: 2016.11.0 .. versionchanged:: 2016.11.2 The rarfile_ Python module is now supported for listing the contents of rar archives. This is necessary on minions with older releases of the ``rar`` CLI tool, which do not support listing the contents in a parsable format. ...
salt/modules/archive.py
def list_(name, archive_format=None, options=None, strip_components=None, clean=False, verbose=False, saltenv='base', source_hash=None): ''' .. versionadded:: 2016.11.0 .. versionchanged:: 2016.11.2 The rarfile_ Python module is n...
def list_(name, archive_format=None, options=None, strip_components=None, clean=False, verbose=False, saltenv='base', source_hash=None): ''' .. versionadded:: 2016.11.0 .. versionchanged:: 2016.11.2 The rarfile_ Python module is n...
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0", "..", "versionchanged", "::", "2016", ".", "11", ".", "2", "The", "rarfile_", "Python", "module", "is", "now", "supported", "for", "listing", "the", "contents", "of", "rar", "archives", ".", "This"...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L58-L432
[ "def", "list_", "(", "name", ",", "archive_format", "=", "None", ",", "options", "=", "None", ",", "strip_components", "=", "None", ",", "clean", "=", "False", ",", "verbose", "=", "False", ",", "saltenv", "=", "'base'", ",", "source_hash", "=", "None", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_expand_sources
Expands a user-provided specification of source files into a list of paths.
salt/modules/archive.py
def _expand_sources(sources): ''' Expands a user-provided specification of source files into a list of paths. ''' if sources is None: return [] if isinstance(sources, six.string_types): sources = [x.strip() for x in sources.split(',')] elif isinstance(sources, (float, six.integer...
def _expand_sources(sources): ''' Expands a user-provided specification of source files into a list of paths. ''' if sources is None: return [] if isinstance(sources, six.string_types): sources = [x.strip() for x in sources.split(',')] elif isinstance(sources, (float, six.integer...
[ "Expands", "a", "user", "-", "provided", "specification", "of", "source", "files", "into", "a", "list", "of", "paths", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L450-L462
[ "def", "_expand_sources", "(", "sources", ")", ":", "if", "sources", "is", "None", ":", "return", "[", "]", "if", "isinstance", "(", "sources", ",", "six", ".", "string_types", ")", ":", "sources", "=", "[", "x", ".", "strip", "(", ")", "for", "x", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
tar
.. note:: This function has changed for version 0.17.0. In prior versions, the ``cwd`` and ``template`` arguments must be specified, with the source directories/files coming as a space-separated list at the end of the command. Beginning with 0.17.0, ``sources`` must be a comma-separated...
salt/modules/archive.py
def tar(options, tarfile, sources=None, dest=None, cwd=None, template=None, runas=None): ''' .. note:: This function has changed for version 0.17.0. In prior versions, the ``cwd`` and ``template`` arguments must be specified, with the source directories/files coming as a space-s...
def tar(options, tarfile, sources=None, dest=None, cwd=None, template=None, runas=None): ''' .. note:: This function has changed for version 0.17.0. In prior versions, the ``cwd`` and ``template`` arguments must be specified, with the source directories/files coming as a space-s...
[ "..", "note", "::" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L466-L550
[ "def", "tar", "(", "options", ",", "tarfile", ",", "sources", "=", "None", ",", "dest", "=", "None", ",", "cwd", "=", "None", ",", "template", "=", "None", ",", "runas", "=", "None", ")", ":", "if", "not", "options", ":", "# Catch instances were people...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
gzip
Uses the gzip command to create gzip files template : None Can be set to 'jinja' or another supported template engine to render the command arguments before execution: .. code-block:: bash salt '*' archive.gzip template=jinja /tmp/{{grains.id}}.txt runas : None Th...
salt/modules/archive.py
def gzip(sourcefile, template=None, runas=None, options=None): ''' Uses the gzip command to create gzip files template : None Can be set to 'jinja' or another supported template engine to render the command arguments before execution: .. code-block:: bash salt '*' arch...
def gzip(sourcefile, template=None, runas=None, options=None): ''' Uses the gzip command to create gzip files template : None Can be set to 'jinja' or another supported template engine to render the command arguments before execution: .. code-block:: bash salt '*' arch...
[ "Uses", "the", "gzip", "command", "to", "create", "gzip", "files" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L554-L590
[ "def", "gzip", "(", "sourcefile", ",", "template", "=", "None", ",", "runas", "=", "None", ",", "options", "=", "None", ")", ":", "cmd", "=", "[", "'gzip'", "]", "if", "options", ":", "cmd", ".", "append", "(", "options", ")", "cmd", ".", "append",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
gunzip
Uses the gunzip command to unpack gzip files template : None Can be set to 'jinja' or another supported template engine to render the command arguments before execution: .. code-block:: bash salt '*' archive.gunzip template=jinja /tmp/{{grains.id}}.txt.gz runas : None ...
salt/modules/archive.py
def gunzip(gzipfile, template=None, runas=None, options=None): ''' Uses the gunzip command to unpack gzip files template : None Can be set to 'jinja' or another supported template engine to render the command arguments before execution: .. code-block:: bash salt '*' ar...
def gunzip(gzipfile, template=None, runas=None, options=None): ''' Uses the gunzip command to unpack gzip files template : None Can be set to 'jinja' or another supported template engine to render the command arguments before execution: .. code-block:: bash salt '*' ar...
[ "Uses", "the", "gunzip", "command", "to", "unpack", "gzip", "files" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L594-L630
[ "def", "gunzip", "(", "gzipfile", ",", "template", "=", "None", ",", "runas", "=", "None", ",", "options", "=", "None", ")", ":", "cmd", "=", "[", "'gunzip'", "]", "if", "options", ":", "cmd", ".", "append", "(", "options", ")", "cmd", ".", "append...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cmd_zip
.. versionadded:: 2015.5.0 In versions 2014.7.x and earlier, this function was known as ``archive.zip``. Uses the ``zip`` command to create zip files. This command is part of the `Info-ZIP`_ suite of tools, and is typically packaged as simply ``zip``. .. _`Info-ZIP`: http://www.info-zip.or...
salt/modules/archive.py
def cmd_zip(zip_file, sources, template=None, cwd=None, runas=None): ''' .. versionadded:: 2015.5.0 In versions 2014.7.x and earlier, this function was known as ``archive.zip``. Uses the ``zip`` command to create zip files. This command is part of the `Info-ZIP`_ suite of tools, and is ...
def cmd_zip(zip_file, sources, template=None, cwd=None, runas=None): ''' .. versionadded:: 2015.5.0 In versions 2014.7.x and earlier, this function was known as ``archive.zip``. Uses the ``zip`` command to create zip files. This command is part of the `Info-ZIP`_ suite of tools, and is ...
[ "..", "versionadded", "::", "2015", ".", "5", ".", "0", "In", "versions", "2014", ".", "7", ".", "x", "and", "earlier", "this", "function", "was", "known", "as", "archive", ".", "zip", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L634-L699
[ "def", "cmd_zip", "(", "zip_file", ",", "sources", ",", "template", "=", "None", ",", "cwd", "=", "None", ",", "runas", "=", "None", ")", ":", "cmd", "=", "[", "'zip'", ",", "'-r'", "]", "cmd", ".", "append", "(", "'{0}'", ".", "format", "(", "zi...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
zip_
Uses the ``zipfile`` Python module to create zip files .. versionchanged:: 2015.5.0 This function was rewritten to use Python's native zip file support. The old functionality has been preserved in the new function :mod:`archive.cmd_zip <salt.modules.archive.cmd_zip>`. For versions 2...
salt/modules/archive.py
def zip_(zip_file, sources, template=None, cwd=None, runas=None, zip64=False): ''' Uses the ``zipfile`` Python module to create zip files .. versionchanged:: 2015.5.0 This function was rewritten to use Python's native zip file support. The old functionality has been preserved in the new fun...
def zip_(zip_file, sources, template=None, cwd=None, runas=None, zip64=False): ''' Uses the ``zipfile`` Python module to create zip files .. versionchanged:: 2015.5.0 This function was rewritten to use Python's native zip file support. The old functionality has been preserved in the new fun...
[ "Uses", "the", "zipfile", "Python", "module", "to", "create", "zip", "files" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L703-L850
[ "def", "zip_", "(", "zip_file", ",", "sources", ",", "template", "=", "None", ",", "cwd", "=", "None", ",", "runas", "=", "None", ",", "zip64", "=", "False", ")", ":", "if", "runas", ":", "euid", "=", "os", ".", "geteuid", "(", ")", "egid", "=", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
cmd_unzip
.. versionadded:: 2015.5.0 In versions 2014.7.x and earlier, this function was known as ``archive.unzip``. Uses the ``unzip`` command to unpack zip files. This command is part of the `Info-ZIP`_ suite of tools, and is typically packaged as simply ``unzip``. .. _`Info-ZIP`: http://www.info-...
salt/modules/archive.py
def cmd_unzip(zip_file, dest, excludes=None, options=None, template=None, runas=None, trim_output=False, password=None): ''' .. versionadded:: 2015.5.0 In versions 2014.7.x and earlier, this function was kn...
def cmd_unzip(zip_file, dest, excludes=None, options=None, template=None, runas=None, trim_output=False, password=None): ''' .. versionadded:: 2015.5.0 In versions 2014.7.x and earlier, this function was kn...
[ "..", "versionadded", "::", "2015", ".", "5", ".", "0", "In", "versions", "2014", ".", "7", ".", "x", "and", "earlier", "this", "function", "was", "known", "as", "archive", ".", "unzip", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L854-L957
[ "def", "cmd_unzip", "(", "zip_file", ",", "dest", ",", "excludes", "=", "None", ",", "options", "=", "None", ",", "template", "=", "None", ",", "runas", "=", "None", ",", "trim_output", "=", "False", ",", "password", "=", "None", ")", ":", "if", "isi...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
unzip
Uses the ``zipfile`` Python module to unpack zip files .. versionchanged:: 2015.5.0 This function was rewritten to use Python's native zip file support. The old functionality has been preserved in the new function :mod:`archive.cmd_unzip <salt.modules.archive.cmd_unzip>`. For versions ...
salt/modules/archive.py
def unzip(zip_file, dest, excludes=None, options=None, template=None, runas=None, trim_output=False, password=None, extract_perms=True): ''' Uses the ``zipfile`` Python module to unpack zip files .. versionchanged:: 2015.5.0 ...
def unzip(zip_file, dest, excludes=None, options=None, template=None, runas=None, trim_output=False, password=None, extract_perms=True): ''' Uses the ``zipfile`` Python module to unpack zip files .. versionchanged:: 2015.5.0 ...
[ "Uses", "the", "zipfile", "Python", "module", "to", "unpack", "zip", "files" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L960-L1119
[ "def", "unzip", "(", "zip_file", ",", "dest", ",", "excludes", "=", "None", ",", "options", "=", "None", ",", "template", "=", "None", ",", "runas", "=", "None", ",", "trim_output", "=", "False", ",", "password", "=", "None", ",", "extract_perms", "=",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
is_encrypted
.. versionadded:: 2016.11.0 Returns ``True`` if the zip archive is password-protected, ``False`` if not. If the specified file is not a ZIP archive, an error will be raised. name The path / URL of the archive to check. clean : False Set this value to ``True`` to delete the path referr...
salt/modules/archive.py
def is_encrypted(name, clean=False, saltenv='base', source_hash=None): ''' .. versionadded:: 2016.11.0 Returns ``True`` if the zip archive is password-protected, ``False`` if not. If the specified file is not a ZIP archive, an error will be raised. name The path / URL of the archive to che...
def is_encrypted(name, clean=False, saltenv='base', source_hash=None): ''' .. versionadded:: 2016.11.0 Returns ``True`` if the zip archive is password-protected, ``False`` if not. If the specified file is not a ZIP archive, an error will be raised. name The path / URL of the archive to che...
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L1122-L1195
[ "def", "is_encrypted", "(", "name", ",", "clean", "=", "False", ",", "saltenv", "=", "'base'", ",", "source_hash", "=", "None", ")", ":", "cached", "=", "__salt__", "[", "'cp.cache_file'", "]", "(", "name", ",", "saltenv", ",", "source_hash", "=", "sourc...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
rar
Uses `rar for Linux`_ to create rar files .. _`rar for Linux`: http://www.rarlab.com/ rarfile Path of rar file to be created sources Comma-separated list of sources to include in the rar file. Sources can also be passed in a Python list. .. versionchanged:: 2017.7.0 ...
salt/modules/archive.py
def rar(rarfile, sources, template=None, cwd=None, runas=None): ''' Uses `rar for Linux`_ to create rar files .. _`rar for Linux`: http://www.rarlab.com/ rarfile Path of rar file to be created sources Comma-separated list of sources to include in the rar file. Sources can ...
def rar(rarfile, sources, template=None, cwd=None, runas=None): ''' Uses `rar for Linux`_ to create rar files .. _`rar for Linux`: http://www.rarlab.com/ rarfile Path of rar file to be created sources Comma-separated list of sources to include in the rar file. Sources can ...
[ "Uses", "rar", "for", "Linux", "_", "to", "create", "rar", "files" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L1199-L1246
[ "def", "rar", "(", "rarfile", ",", "sources", ",", "template", "=", "None", ",", "cwd", "=", "None", ",", "runas", "=", "None", ")", ":", "cmd", "=", "[", "'rar'", ",", "'a'", ",", "'-idp'", ",", "'{0}'", ".", "format", "(", "rarfile", ")", "]", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
unrar
Uses `rar for Linux`_ to unpack rar files .. _`rar for Linux`: http://www.rarlab.com/ rarfile Name of rar file to be unpacked dest The destination directory into which to **unpack** the rar file template : None Can be set to 'jinja' or another supported template engine to ren...
salt/modules/archive.py
def unrar(rarfile, dest, excludes=None, template=None, runas=None, trim_output=False): ''' Uses `rar for Linux`_ to unpack rar files .. _`rar for Linux`: http://www.rarlab.com/ rarfile Name of rar file to be unpacked dest The destination directory into which to **unpack** the rar ...
def unrar(rarfile, dest, excludes=None, template=None, runas=None, trim_output=False): ''' Uses `rar for Linux`_ to unpack rar files .. _`rar for Linux`: http://www.rarlab.com/ rarfile Name of rar file to be unpacked dest The destination directory into which to **unpack** the rar ...
[ "Uses", "rar", "for", "Linux", "_", "to", "unpack", "rar", "files" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L1250-L1295
[ "def", "unrar", "(", "rarfile", ",", "dest", ",", "excludes", "=", "None", ",", "template", "=", "None", ",", "runas", "=", "None", ",", "trim_output", "=", "False", ")", ":", "if", "isinstance", "(", "excludes", ",", "six", ".", "string_types", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_render_filenames
Process markup in the :param:`filenames` and :param:`zipfile` variables (NOT the files under the paths they ultimately point to) according to the markup format provided by :param:`template`.
salt/modules/archive.py
def _render_filenames(filenames, zip_file, saltenv, template): ''' Process markup in the :param:`filenames` and :param:`zipfile` variables (NOT the files under the paths they ultimately point to) according to the markup format provided by :param:`template`. ''' if not template: return (f...
def _render_filenames(filenames, zip_file, saltenv, template): ''' Process markup in the :param:`filenames` and :param:`zipfile` variables (NOT the files under the paths they ultimately point to) according to the markup format provided by :param:`template`. ''' if not template: return (f...
[ "Process", "markup", "in", "the", ":", "param", ":", "filenames", "and", ":", "param", ":", "zipfile", "variables", "(", "NOT", "the", "files", "under", "the", "paths", "they", "ultimately", "point", "to", ")", "according", "to", "the", "markup", "format",...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L1298-L1348
[ "def", "_render_filenames", "(", "filenames", ",", "zip_file", ",", "saltenv", ",", "template", ")", ":", "if", "not", "template", ":", "return", "(", "filenames", ",", "zip_file", ")", "# render the path as a template using path_template_engine as the engine", "if", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_trim_files
Trim the file list for output.
salt/modules/archive.py
def _trim_files(files, trim_output): ''' Trim the file list for output. ''' count = 100 if not isinstance(trim_output, bool): count = trim_output if not(isinstance(trim_output, bool) and trim_output is False) and len(files) > count: files = files[:count] files.append("Li...
def _trim_files(files, trim_output): ''' Trim the file list for output. ''' count = 100 if not isinstance(trim_output, bool): count = trim_output if not(isinstance(trim_output, bool) and trim_output is False) and len(files) > count: files = files[:count] files.append("Li...
[ "Trim", "the", "file", "list", "for", "output", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/archive.py#L1351-L1363
[ "def", "_trim_files", "(", "files", ",", "trim_output", ")", ":", "count", "=", "100", "if", "not", "isinstance", "(", "trim_output", ",", "bool", ")", ":", "count", "=", "trim_output", "if", "not", "(", "isinstance", "(", "trim_output", ",", "bool", ")"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_get_token
retrieve the auth_token from nsot :param url: str :param email: str :param secret_key: str :return: str
salt/pillar/nsot.py
def _get_token(url, email, secret_key): ''' retrieve the auth_token from nsot :param url: str :param email: str :param secret_key: str :return: str ''' url = urlparse.urljoin(url, 'authenticate') data_dict = {"email": email, "secret_key": secret_key} query = salt.utils.http.quer...
def _get_token(url, email, secret_key): ''' retrieve the auth_token from nsot :param url: str :param email: str :param secret_key: str :return: str ''' url = urlparse.urljoin(url, 'authenticate') data_dict = {"email": email, "secret_key": secret_key} query = salt.utils.http.quer...
[ "retrieve", "the", "auth_token", "from", "nsot" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/nsot.py#L80-L100
[ "def", "_get_token", "(", "url", ",", "email", ",", "secret_key", ")", ":", "url", "=", "urlparse", ".", "urljoin", "(", "url", ",", "'authenticate'", ")", "data_dict", "=", "{", "\"email\"", ":", "email", ",", "\"secret_key\"", ":", "secret_key", "}", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_check_regex
check whether or not this minion should have this external pillar returned :param minion_id: str :param minion_regex: list :return: bool
salt/pillar/nsot.py
def _check_regex(minion_id, regex): ''' check whether or not this minion should have this external pillar returned :param minion_id: str :param minion_regex: list :return: bool ''' get_pillar = False for pattern in regex: log.debug('nsot external pillar comparing %s with %s', mi...
def _check_regex(minion_id, regex): ''' check whether or not this minion should have this external pillar returned :param minion_id: str :param minion_regex: list :return: bool ''' get_pillar = False for pattern in regex: log.debug('nsot external pillar comparing %s with %s', mi...
[ "check", "whether", "or", "not", "this", "minion", "should", "have", "this", "external", "pillar", "returned" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/nsot.py#L103-L120
[ "def", "_check_regex", "(", "minion_id", ",", "regex", ")", ":", "get_pillar", "=", "False", "for", "pattern", "in", "regex", ":", "log", ".", "debug", "(", "'nsot external pillar comparing %s with %s'", ",", "minion_id", ",", "regex", ")", "match", "=", "re",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_query_nsot
if a device is given, query nsot for that specific device, otherwise return all devices :param url: str :param headers: dict :param device: None or str :return:
salt/pillar/nsot.py
def _query_nsot(url, headers, device=None): ''' if a device is given, query nsot for that specific device, otherwise return all devices :param url: str :param headers: dict :param device: None or str :return: ''' url = urlparse.urljoin(url, 'devices') ret = {} if not device:...
def _query_nsot(url, headers, device=None): ''' if a device is given, query nsot for that specific device, otherwise return all devices :param url: str :param headers: dict :param device: None or str :return: ''' url = urlparse.urljoin(url, 'devices') ret = {} if not device:...
[ "if", "a", "device", "is", "given", "query", "nsot", "for", "that", "specific", "device", "otherwise", "return", "all", "devices" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/nsot.py#L123-L147
[ "def", "_query_nsot", "(", "url", ",", "headers", ",", "device", "=", "None", ")", ":", "url", "=", "urlparse", ".", "urljoin", "(", "url", ",", "'devices'", ")", "ret", "=", "{", "}", "if", "not", "device", ":", "query", "=", "salt", ".", "utils",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_proxy_info
retrieve a dict of a device that exists in nsot :param minion_id: str :param api_url: str :param email: str :param secret_key: str :param fqdn_separator: str :return: dict
salt/pillar/nsot.py
def _proxy_info(minion_id, api_url, email, secret_key, fqdn_separator): ''' retrieve a dict of a device that exists in nsot :param minion_id: str :param api_url: str :param email: str :param secret_key: str :param fqdn_separator: str :return: dict ''' device_info = {} if fqd...
def _proxy_info(minion_id, api_url, email, secret_key, fqdn_separator): ''' retrieve a dict of a device that exists in nsot :param minion_id: str :param api_url: str :param email: str :param secret_key: str :param fqdn_separator: str :return: dict ''' device_info = {} if fqd...
[ "retrieve", "a", "dict", "of", "a", "device", "that", "exists", "in", "nsot" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/nsot.py#L150-L169
[ "def", "_proxy_info", "(", "minion_id", ",", "api_url", ",", "email", ",", "secret_key", ",", "fqdn_separator", ")", ":", "device_info", "=", "{", "}", "if", "fqdn_separator", ":", "minion_id", "=", "minion_id", ".", "replace", "(", "'.'", ",", "fqdn_separat...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_all_nsot_devices
retrieve a list of all devices that exist in nsot :param api_url: str :param email: str :param secret_key: str :return: dict
salt/pillar/nsot.py
def _all_nsot_devices(api_url, email, secret_key): ''' retrieve a list of all devices that exist in nsot :param api_url: str :param email: str :param secret_key: str :return: dict ''' token = _get_token(api_url, email, secret_key) all_devices = {} if token: headers = {'A...
def _all_nsot_devices(api_url, email, secret_key): ''' retrieve a list of all devices that exist in nsot :param api_url: str :param email: str :param secret_key: str :return: dict ''' token = _get_token(api_url, email, secret_key) all_devices = {} if token: headers = {'A...
[ "retrieve", "a", "list", "of", "all", "devices", "that", "exist", "in", "nsot" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/nsot.py#L172-L187
[ "def", "_all_nsot_devices", "(", "api_url", ",", "email", ",", "secret_key", ")", ":", "token", "=", "_get_token", "(", "api_url", ",", "email", ",", "secret_key", ")", "all_devices", "=", "{", "}", "if", "token", ":", "headers", "=", "{", "'Authorization'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
ext_pillar
Query NSoT API for network devices
salt/pillar/nsot.py
def ext_pillar(minion_id, pillar, api_url, email, secret_key, fqdn_separator=None, all_devices_regex=None, minion_regex=None): ''' Query NSoT API for network devices ''' ret = {} if minion_id == ...
def ext_pillar(minion_id, pillar, api_url, email, secret_key, fqdn_separator=None, all_devices_regex=None, minion_regex=None): ''' Query NSoT API for network devices ''' ret = {} if minion_id == ...
[ "Query", "NSoT", "API", "for", "network", "devices" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/nsot.py#L190-L224
[ "def", "ext_pillar", "(", "minion_id", ",", "pillar", ",", "api_url", ",", "email", ",", "secret_key", ",", "fqdn_separator", "=", "None", ",", "all_devices_regex", "=", "None", ",", "minion_regex", "=", "None", ")", ":", "ret", "=", "{", "}", "if", "min...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_check_cron
Return the changes
salt/states/incron.py
def _check_cron(user, path, mask, cmd): ''' Return the changes ''' arg_mask = mask.split(',') arg_mask.sort() lst = __salt__['incron.list_tab'](user) for cron in lst['crons']: if path == cron['path'] and cron['cmd'] == cmd: ...
def _check_cron(user, path, mask, cmd): ''' Return the changes ''' arg_mask = mask.split(',') arg_mask.sort() lst = __salt__['incron.list_tab'](user) for cron in lst['crons']: if path == cron['path'] and cron['cmd'] == cmd: ...
[ "Return", "the", "changes" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/incron.py#L48-L67
[ "def", "_check_cron", "(", "user", ",", "path", ",", "mask", ",", "cmd", ")", ":", "arg_mask", "=", "mask", ".", "split", "(", "','", ")", "arg_mask", ".", "sort", "(", ")", "lst", "=", "__salt__", "[", "'incron.list_tab'", "]", "(", "user", ")", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
present
Verifies that the specified incron job is present for the specified user. For more advanced information about what exactly can be set in the cron timing parameters, check your incron system's documentation. Most Unix-like systems' incron documentation can be found via the incrontab man page: ``man 5 inc...
salt/states/incron.py
def present(name, path, mask, cmd, user='root'): ''' Verifies that the specified incron job is present for the specified user. For more advanced information about what exactly can be set in the cron timing parameters, check your incron system's documentati...
def present(name, path, mask, cmd, user='root'): ''' Verifies that the specified incron job is present for the specified user. For more advanced information about what exactly can be set in the cron timing parameters, check your incron system's documentati...
[ "Verifies", "that", "the", "specified", "incron", "job", "is", "present", "for", "the", "specified", "user", ".", "For", "more", "advanced", "information", "about", "what", "exactly", "can", "be", "set", "in", "the", "cron", "timing", "parameters", "check", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/incron.py#L90-L160
[ "def", "present", "(", "name", ",", "path", ",", "mask", ",", "cmd", ",", "user", "=", "'root'", ")", ":", "mask", "=", "','", ".", "join", "(", "mask", ")", "ret", "=", "{", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", ",", "'name'...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
insert
Add an item or items to a queue CLI Example: .. code-block:: bash salt-run queue.insert myqueue myitem salt-run queue.insert myqueue "['item1', 'item2', 'item3']" salt-run queue.insert myqueue myitem backend=sqlite salt-run queue.insert myqueue "['item1', 'item2', 'item3']" ba...
salt/runners/queue.py
def insert(queue, items, backend='sqlite'): ''' Add an item or items to a queue CLI Example: .. code-block:: bash salt-run queue.insert myqueue myitem salt-run queue.insert myqueue "['item1', 'item2', 'item3']" salt-run queue.insert myqueue myitem backend=sqlite salt-r...
def insert(queue, items, backend='sqlite'): ''' Add an item or items to a queue CLI Example: .. code-block:: bash salt-run queue.insert myqueue myitem salt-run queue.insert myqueue "['item1', 'item2', 'item3']" salt-run queue.insert myqueue myitem backend=sqlite salt-r...
[ "Add", "an", "item", "or", "items", "to", "a", "queue" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L75-L93
[ "def", "insert", "(", "queue", ",", "items", ",", "backend", "=", "'sqlite'", ")", ":", "queue_funcs", "=", "salt", ".", "loader", ".", "queues", "(", "__opts__", ")", "cmd", "=", "'{0}.insert'", ".", "format", "(", "backend", ")", "if", "cmd", "not", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_queues
Return a list of Salt Queues on the backend CLI Example: .. code-block:: bash salt-run queue.list_queues salt-run queue.list_queues backend=sqlite
salt/runners/queue.py
def list_queues(backend='sqlite'): ''' Return a list of Salt Queues on the backend CLI Example: .. code-block:: bash salt-run queue.list_queues salt-run queue.list_queues backend=sqlite ''' queue_funcs = salt.loader.queues(__opts__) cmd = '{0}.list_queues'.format(backend) ...
def list_queues(backend='sqlite'): ''' Return a list of Salt Queues on the backend CLI Example: .. code-block:: bash salt-run queue.list_queues salt-run queue.list_queues backend=sqlite ''' queue_funcs = salt.loader.queues(__opts__) cmd = '{0}.list_queues'.format(backend) ...
[ "Return", "a", "list", "of", "Salt", "Queues", "on", "the", "backend" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L116-L132
[ "def", "list_queues", "(", "backend", "=", "'sqlite'", ")", ":", "queue_funcs", "=", "salt", ".", "loader", ".", "queues", "(", "__opts__", ")", "cmd", "=", "'{0}.list_queues'", ".", "format", "(", "backend", ")", "if", "cmd", "not", "in", "queue_funcs", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_length
Provide the number of items in a queue CLI Example: .. code-block:: bash salt-run queue.list_length myqueue salt-run queue.list_length myqueue backend=sqlite
salt/runners/queue.py
def list_length(queue, backend='sqlite'): ''' Provide the number of items in a queue CLI Example: .. code-block:: bash salt-run queue.list_length myqueue salt-run queue.list_length myqueue backend=sqlite ''' queue_funcs = salt.loader.queues(__opts__) cmd = '{0}.list_length...
def list_length(queue, backend='sqlite'): ''' Provide the number of items in a queue CLI Example: .. code-block:: bash salt-run queue.list_length myqueue salt-run queue.list_length myqueue backend=sqlite ''' queue_funcs = salt.loader.queues(__opts__) cmd = '{0}.list_length...
[ "Provide", "the", "number", "of", "items", "in", "a", "queue" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L135-L151
[ "def", "list_length", "(", "queue", ",", "backend", "=", "'sqlite'", ")", ":", "queue_funcs", "=", "salt", ".", "loader", ".", "queues", "(", "__opts__", ")", "cmd", "=", "'{0}.list_length'", ".", "format", "(", "backend", ")", "if", "cmd", "not", "in", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
pop
Pop one or more or all items from a queue CLI Example: .. code-block:: bash salt-run queue.pop myqueue salt-run queue.pop myqueue 6 salt-run queue.pop myqueue all salt-run queue.pop myqueue 6 backend=sqlite salt-run queue.pop myqueue all backend=sqlite
salt/runners/queue.py
def pop(queue, quantity=1, backend='sqlite', is_runner=False): ''' Pop one or more or all items from a queue CLI Example: .. code-block:: bash salt-run queue.pop myqueue salt-run queue.pop myqueue 6 salt-run queue.pop myqueue all salt-run queue.pop myqueue 6 backend=sq...
def pop(queue, quantity=1, backend='sqlite', is_runner=False): ''' Pop one or more or all items from a queue CLI Example: .. code-block:: bash salt-run queue.pop myqueue salt-run queue.pop myqueue 6 salt-run queue.pop myqueue all salt-run queue.pop myqueue 6 backend=sq...
[ "Pop", "one", "or", "more", "or", "all", "items", "from", "a", "queue" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L173-L192
[ "def", "pop", "(", "queue", ",", "quantity", "=", "1", ",", "backend", "=", "'sqlite'", ",", "is_runner", "=", "False", ")", ":", "queue_funcs", "=", "salt", ".", "loader", ".", "queues", "(", "__opts__", ")", "cmd", "=", "'{0}.pop'", ".", "format", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
process_queue
Pop items off a queue and create an event on the Salt event bus to be processed by a Reactor. CLI Example: .. code-block:: bash salt-run queue.process_queue myqueue salt-run queue.process_queue myqueue 6 salt-run queue.process_queue myqueue all backend=sqlite
salt/runners/queue.py
def process_queue(queue, quantity=1, backend='sqlite', is_runner=False): ''' Pop items off a queue and create an event on the Salt event bus to be processed by a Reactor. CLI Example: .. code-block:: bash salt-run queue.process_queue myqueue salt-run queue.process_queue myqueue 6 ...
def process_queue(queue, quantity=1, backend='sqlite', is_runner=False): ''' Pop items off a queue and create an event on the Salt event bus to be processed by a Reactor. CLI Example: .. code-block:: bash salt-run queue.process_queue myqueue salt-run queue.process_queue myqueue 6 ...
[ "Pop", "items", "off", "a", "queue", "and", "create", "an", "event", "on", "the", "Salt", "event", "bus", "to", "be", "processed", "by", "a", "Reactor", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L195-L227
[ "def", "process_queue", "(", "queue", ",", "quantity", "=", "1", ",", "backend", "=", "'sqlite'", ",", "is_runner", "=", "False", ")", ":", "# get ready to send an event", "event", "=", "get_event", "(", "'master'", ",", "__opts__", "[", "'sock_dir'", "]", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
__get_queue_opts
Get consistent opts for the queued runners
salt/runners/queue.py
def __get_queue_opts(queue=None, backend=None): ''' Get consistent opts for the queued runners ''' if queue is None: queue = __opts__.get('runner_queue', {}).get('queue') if backend is None: backend = __opts__.get('runner_queue', {}).get('backend', 'pgjsonb') return {'backend': b...
def __get_queue_opts(queue=None, backend=None): ''' Get consistent opts for the queued runners ''' if queue is None: queue = __opts__.get('runner_queue', {}).get('queue') if backend is None: backend = __opts__.get('runner_queue', {}).get('backend', 'pgjsonb') return {'backend': b...
[ "Get", "consistent", "opts", "for", "the", "queued", "runners" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L230-L239
[ "def", "__get_queue_opts", "(", "queue", "=", "None", ",", "backend", "=", "None", ")", ":", "if", "queue", "is", "None", ":", "queue", "=", "__opts__", ".", "get", "(", "'runner_queue'", ",", "{", "}", ")", ".", "get", "(", "'queue'", ")", "if", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
insert_runner
Insert a reference to a runner into the queue so that it can be run later. fun The runner function that is going to be run args list or comma-seperated string of args to send to fun kwargs dictionary of keyword arguments to send to fun queue queue to insert the runner...
salt/runners/queue.py
def insert_runner(fun, args=None, kwargs=None, queue=None, backend=None): ''' Insert a reference to a runner into the queue so that it can be run later. fun The runner function that is going to be run args list or comma-seperated string of args to send to fun kwargs dictio...
def insert_runner(fun, args=None, kwargs=None, queue=None, backend=None): ''' Insert a reference to a runner into the queue so that it can be run later. fun The runner function that is going to be run args list or comma-seperated string of args to send to fun kwargs dictio...
[ "Insert", "a", "reference", "to", "a", "runner", "into", "the", "queue", "so", "that", "it", "can", "be", "run", "later", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L242-L277
[ "def", "insert_runner", "(", "fun", ",", "args", "=", "None", ",", "kwargs", "=", "None", ",", "queue", "=", "None", ",", "backend", "=", "None", ")", ":", "if", "args", "is", "None", ":", "args", "=", "[", "]", "elif", "isinstance", "(", "args", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
process_runner
Process queued runners quantity number of runners to process queue queue to insert the runner reference into backend backend that to use for the queue CLI Example: .. code-block:: bash salt-run queue.process_runner salt-run queue.process_runner 5
salt/runners/queue.py
def process_runner(quantity=1, queue=None, backend=None): ''' Process queued runners quantity number of runners to process queue queue to insert the runner reference into backend backend that to use for the queue CLI Example: .. code-block:: bash salt-ru...
def process_runner(quantity=1, queue=None, backend=None): ''' Process queued runners quantity number of runners to process queue queue to insert the runner reference into backend backend that to use for the queue CLI Example: .. code-block:: bash salt-ru...
[ "Process", "queued", "runners" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/queue.py#L280-L304
[ "def", "process_runner", "(", "quantity", "=", "1", ",", "queue", "=", "None", ",", "backend", "=", "None", ")", ":", "queue_kwargs", "=", "__get_queue_opts", "(", "queue", "=", "queue", ",", "backend", "=", "backend", ")", "data", "=", "process_queue", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_parse_args
yamlify `arg` and ensure it's outermost datatype is a list
salt/modules/publish.py
def _parse_args(arg): ''' yamlify `arg` and ensure it's outermost datatype is a list ''' yaml_args = salt.utils.args.yamlify_arg(arg) if yaml_args is None: return [] elif not isinstance(yaml_args, list): return [yaml_args] else: return yaml_args
def _parse_args(arg): ''' yamlify `arg` and ensure it's outermost datatype is a list ''' yaml_args = salt.utils.args.yamlify_arg(arg) if yaml_args is None: return [] elif not isinstance(yaml_args, list): return [yaml_args] else: return yaml_args
[ "yamlify", "arg", "and", "ensure", "it", "s", "outermost", "datatype", "is", "a", "list" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/publish.py#L27-L38
[ "def", "_parse_args", "(", "arg", ")", ":", "yaml_args", "=", "salt", ".", "utils", ".", "args", ".", "yamlify_arg", "(", "arg", ")", "if", "yaml_args", "is", "None", ":", "return", "[", "]", "elif", "not", "isinstance", "(", "yaml_args", ",", "list", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_publish
Publish a command from the minion out to other minions, publications need to be enabled on the Salt master and the minion needs to have permission to publish the command. The Salt master will also prevent a recursive publication loop, this means that a minion cannot command another minion to command ano...
salt/modules/publish.py
def _publish( tgt, fun, arg=None, tgt_type='glob', returner='', timeout=5, form='clean', wait=False, via_master=None): ''' Publish a command from the minion out to other minions, publications need to be enabled on the Salt master and th...
def _publish( tgt, fun, arg=None, tgt_type='glob', returner='', timeout=5, form='clean', wait=False, via_master=None): ''' Publish a command from the minion out to other minions, publications need to be enabled on the Salt master and th...
[ "Publish", "a", "command", "from", "the", "minion", "out", "to", "other", "minions", "publications", "need", "to", "be", "enabled", "on", "the", "Salt", "master", "and", "the", "minion", "needs", "to", "have", "permission", "to", "publish", "the", "command",...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/publish.py#L41-L179
[ "def", "_publish", "(", "tgt", ",", "fun", ",", "arg", "=", "None", ",", "tgt_type", "=", "'glob'", ",", "returner", "=", "''", ",", "timeout", "=", "5", ",", "form", "=", "'clean'", ",", "wait", "=", "False", ",", "via_master", "=", "None", ")", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
publish
Publish a command from the minion out to other minions. Publications need to be enabled on the Salt master and the minion needs to have permission to publish the command. The Salt master will also prevent a recursive publication loop, this means that a minion cannot command another minion to command an...
salt/modules/publish.py
def publish(tgt, fun, arg=None, tgt_type='glob', returner='', timeout=5, via_master=None): ''' Publish a command from the minion out to other minions. Publications need to be enabled on the Salt master and the minion needs to have ...
def publish(tgt, fun, arg=None, tgt_type='glob', returner='', timeout=5, via_master=None): ''' Publish a command from the minion out to other minions. Publications need to be enabled on the Salt master and the minion needs to have ...
[ "Publish", "a", "command", "from", "the", "minion", "out", "to", "other", "minions", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/publish.py#L182-L263
[ "def", "publish", "(", "tgt", ",", "fun", ",", "arg", "=", "None", ",", "tgt_type", "=", "'glob'", ",", "returner", "=", "''", ",", "timeout", "=", "5", ",", "via_master", "=", "None", ")", ":", "return", "_publish", "(", "tgt", ",", "fun", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
full_data
Return the full data about the publication, this is invoked in the same way as the publish function CLI Example: .. code-block:: bash salt system.example.com publish.full_data '*' cmd.run 'ls -la /tmp' .. admonition:: Attention If you need to pass a value to a function argument and ...
salt/modules/publish.py
def full_data(tgt, fun, arg=None, tgt_type='glob', returner='', timeout=5): ''' Return the full data about the publication, this is invoked in the same way as the publish function CLI Example: .. code-block:: bash salt ...
def full_data(tgt, fun, arg=None, tgt_type='glob', returner='', timeout=5): ''' Return the full data about the publication, this is invoked in the same way as the publish function CLI Example: .. code-block:: bash salt ...
[ "Return", "the", "full", "data", "about", "the", "publication", "this", "is", "invoked", "in", "the", "same", "way", "as", "the", "publish", "function" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/publish.py#L266-L300
[ "def", "full_data", "(", "tgt", ",", "fun", ",", "arg", "=", "None", ",", "tgt_type", "=", "'glob'", ",", "returner", "=", "''", ",", "timeout", "=", "5", ")", ":", "return", "_publish", "(", "tgt", ",", "fun", ",", "arg", "=", "arg", ",", "tgt_t...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
runner
Execute a runner on the master and return the data from the runner function CLI Example: .. code-block:: bash salt publish.runner manage.down
salt/modules/publish.py
def runner(fun, arg=None, timeout=5): ''' Execute a runner on the master and return the data from the runner function CLI Example: .. code-block:: bash salt publish.runner manage.down ''' arg = _parse_args(arg) if 'master_uri' not in __opts__: return 'No access to mas...
def runner(fun, arg=None, timeout=5): ''' Execute a runner on the master and return the data from the runner function CLI Example: .. code-block:: bash salt publish.runner manage.down ''' arg = _parse_args(arg) if 'master_uri' not in __opts__: return 'No access to mas...
[ "Execute", "a", "runner", "on", "the", "master", "and", "return", "the", "data", "from", "the", "runner", "function" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/publish.py#L303-L335
[ "def", "runner", "(", "fun", ",", "arg", "=", "None", ",", "timeout", "=", "5", ")", ":", "arg", "=", "_parse_args", "(", "arg", ")", "if", "'master_uri'", "not", "in", "__opts__", ":", "return", "'No access to master. If using salt-call with --local, please rem...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
__execute_kadmin
Execute kadmin commands
salt/modules/kerberos.py
def __execute_kadmin(cmd): ''' Execute kadmin commands ''' ret = {} auth_keytab = __opts__.get('auth_keytab', None) auth_principal = __opts__.get('auth_principal', None) if __salt__['file.file_exists'](auth_keytab) and auth_principal: return __salt__['cmd.run_all']( 'ka...
def __execute_kadmin(cmd): ''' Execute kadmin commands ''' ret = {} auth_keytab = __opts__.get('auth_keytab', None) auth_principal = __opts__.get('auth_principal', None) if __salt__['file.file_exists'](auth_keytab) and auth_principal: return __salt__['cmd.run_all']( 'ka...
[ "Execute", "kadmin", "commands" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L40-L60
[ "def", "__execute_kadmin", "(", "cmd", ")", ":", "ret", "=", "{", "}", "auth_keytab", "=", "__opts__", ".", "get", "(", "'auth_keytab'", ",", "None", ")", "auth_principal", "=", "__opts__", ".", "get", "(", "'auth_principal'", ",", "None", ")", "if", "__...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_principals
Get all principals CLI Example: .. code-block:: bash salt 'kde.example.com' kerberos.list_principals
salt/modules/kerberos.py
def list_principals(): ''' Get all principals CLI Example: .. code-block:: bash salt 'kde.example.com' kerberos.list_principals ''' ret = {} cmd = __execute_kadmin('list_principals') if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] = cmd['stderr'].splitlines()...
def list_principals(): ''' Get all principals CLI Example: .. code-block:: bash salt 'kde.example.com' kerberos.list_principals ''' ret = {} cmd = __execute_kadmin('list_principals') if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] = cmd['stderr'].splitlines()...
[ "Get", "all", "principals" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L63-L88
[ "def", "list_principals", "(", ")", ":", "ret", "=", "{", "}", "cmd", "=", "__execute_kadmin", "(", "'list_principals'", ")", "if", "cmd", "[", "'retcode'", "]", "!=", "0", "or", "cmd", "[", "'stderr'", "]", ":", "ret", "[", "'comment'", "]", "=", "c...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_principal
Get princial details CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.get_principal root/admin
salt/modules/kerberos.py
def get_principal(name): ''' Get princial details CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.get_principal root/admin ''' ret = {} cmd = __execute_kadmin('get_principal {0}'.format(name)) if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] ...
def get_principal(name): ''' Get princial details CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.get_principal root/admin ''' ret = {} cmd = __execute_kadmin('get_principal {0}'.format(name)) if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] ...
[ "Get", "princial", "details" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L91-L116
[ "def", "get_principal", "(", "name", ")", ":", "ret", "=", "{", "}", "cmd", "=", "__execute_kadmin", "(", "'get_principal {0}'", ".", "format", "(", "name", ")", ")", "if", "cmd", "[", "'retcode'", "]", "!=", "0", "or", "cmd", "[", "'stderr'", "]", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
list_policies
List policies CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.list_policies
salt/modules/kerberos.py
def list_policies(): ''' List policies CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.list_policies ''' ret = {} cmd = __execute_kadmin('list_policies') if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] = cmd['stderr'].splitlines()[-1] ...
def list_policies(): ''' List policies CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.list_policies ''' ret = {} cmd = __execute_kadmin('list_policies') if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] = cmd['stderr'].splitlines()[-1] ...
[ "List", "policies" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L119-L144
[ "def", "list_policies", "(", ")", ":", "ret", "=", "{", "}", "cmd", "=", "__execute_kadmin", "(", "'list_policies'", ")", "if", "cmd", "[", "'retcode'", "]", "!=", "0", "or", "cmd", "[", "'stderr'", "]", ":", "ret", "[", "'comment'", "]", "=", "cmd",...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
get_privs
Current privileges CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.get_privs
salt/modules/kerberos.py
def get_privs(): ''' Current privileges CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.get_privs ''' ret = {} cmd = __execute_kadmin('get_privs') if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] = cmd['stderr'].splitlines()[-1] ret['...
def get_privs(): ''' Current privileges CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.get_privs ''' ret = {} cmd = __execute_kadmin('get_privs') if cmd['retcode'] != 0 or cmd['stderr']: ret['comment'] = cmd['stderr'].splitlines()[-1] ret['...
[ "Current", "privileges" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L175-L200
[ "def", "get_privs", "(", ")", ":", "ret", "=", "{", "}", "cmd", "=", "__execute_kadmin", "(", "'get_privs'", ")", "if", "cmd", "[", "'retcode'", "]", "!=", "0", "or", "cmd", "[", "'stderr'", "]", ":", "ret", "[", "'comment'", "]", "=", "cmd", "[", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_principal
Create Principal CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.create_principal host/example.com
salt/modules/kerberos.py
def create_principal(name, enctypes=None): ''' Create Principal CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.create_principal host/example.com ''' ret = {} krb_cmd = 'addprinc -randkey' if enctypes: krb_cmd += ' -e {0}'.format(enctypes) krb_...
def create_principal(name, enctypes=None): ''' Create Principal CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.create_principal host/example.com ''' ret = {} krb_cmd = 'addprinc -randkey' if enctypes: krb_cmd += ' -e {0}'.format(enctypes) krb_...
[ "Create", "Principal" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L203-L231
[ "def", "create_principal", "(", "name", ",", "enctypes", "=", "None", ")", ":", "ret", "=", "{", "}", "krb_cmd", "=", "'addprinc -randkey'", "if", "enctypes", ":", "krb_cmd", "+=", "' -e {0}'", ".", "format", "(", "enctypes", ")", "krb_cmd", "+=", "' {0}'"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
delete_principal
Delete Principal CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.delete_principal host/example.com@EXAMPLE.COM
salt/modules/kerberos.py
def delete_principal(name): ''' Delete Principal CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.delete_principal host/example.com@EXAMPLE.COM ''' ret = {} cmd = __execute_kadmin('delprinc -force {0}'.format(name)) if cmd['retcode'] != 0 or cmd['stderr']: ...
def delete_principal(name): ''' Delete Principal CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.delete_principal host/example.com@EXAMPLE.COM ''' ret = {} cmd = __execute_kadmin('delprinc -force {0}'.format(name)) if cmd['retcode'] != 0 or cmd['stderr']: ...
[ "Delete", "Principal" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L234-L254
[ "def", "delete_principal", "(", "name", ")", ":", "ret", "=", "{", "}", "cmd", "=", "__execute_kadmin", "(", "'delprinc -force {0}'", ".", "format", "(", "name", ")", ")", "if", "cmd", "[", "'retcode'", "]", "!=", "0", "or", "cmd", "[", "'stderr'", "]"...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
create_keytab
Create keytab CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.create_keytab host/host1.example.com host1.example.com.keytab
salt/modules/kerberos.py
def create_keytab(name, keytab, enctypes=None): ''' Create keytab CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.create_keytab host/host1.example.com host1.example.com.keytab ''' ret = {} krb_cmd = 'ktadd -k {0}'.format(keytab) if enctypes: krb_cmd...
def create_keytab(name, keytab, enctypes=None): ''' Create keytab CLI Example: .. code-block:: bash salt 'kdc.example.com' kerberos.create_keytab host/host1.example.com host1.example.com.keytab ''' ret = {} krb_cmd = 'ktadd -k {0}'.format(keytab) if enctypes: krb_cmd...
[ "Create", "keytab" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kerberos.py#L257-L284
[ "def", "create_keytab", "(", "name", ",", "keytab", ",", "enctypes", "=", "None", ")", ":", "ret", "=", "{", "}", "krb_cmd", "=", "'ktadd -k {0}'", ".", "format", "(", "keytab", ")", "if", "enctypes", ":", "krb_cmd", "+=", "' -e {0}'", ".", "format", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
present
Ensures that the named host is present with the given ip name The host to assign an ip to ip The ip addr(s) to apply to the host. Can be a single IP or a list of IP addresses. clean : False Remove any entries which don't match those configured in the ``ip`` option....
salt/states/host.py
def present(name, ip, clean=False): # pylint: disable=C0103 ''' Ensures that the named host is present with the given ip name The host to assign an ip to ip The ip addr(s) to apply to the host. Can be a single IP or a list of IP addresses. clean : False Remove any...
def present(name, ip, clean=False): # pylint: disable=C0103 ''' Ensures that the named host is present with the given ip name The host to assign an ip to ip The ip addr(s) to apply to the host. Can be a single IP or a list of IP addresses. clean : False Remove any...
[ "Ensures", "that", "the", "named", "host", "is", "present", "with", "the", "given", "ip" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/host.py#L70-L165
[ "def", "present", "(", "name", ",", "ip", ",", "clean", "=", "False", ")", ":", "# pylint: disable=C0103", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", "if", "__opts__", "[", "'test'", "]", "e...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
absent
Ensure that the named host is absent name The host to remove ip The ip addr(s) of the host to remove
salt/states/host.py
def absent(name, ip): # pylint: disable=C0103 ''' Ensure that the named host is absent name The host to remove ip The ip addr(s) of the host to remove ''' ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''} if not isinstance...
def absent(name, ip): # pylint: disable=C0103 ''' Ensure that the named host is absent name The host to remove ip The ip addr(s) of the host to remove ''' ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''} if not isinstance...
[ "Ensure", "that", "the", "named", "host", "is", "absent" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/host.py#L168-L203
[ "def", "absent", "(", "name", ",", "ip", ")", ":", "# pylint: disable=C0103", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "if", "not", "isinstance", "(", "ip...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
only
Ensure that only the given hostnames are associated with the given IP address. .. versionadded:: 2016.3.0 name The IP address to associate with the given hostnames. hostnames Either a single hostname or a list of hostnames to associate with the given IP address in the given or...
salt/states/host.py
def only(name, hostnames): ''' Ensure that only the given hostnames are associated with the given IP address. .. versionadded:: 2016.3.0 name The IP address to associate with the given hostnames. hostnames Either a single hostname or a list of hostnames to associate wi...
def only(name, hostnames): ''' Ensure that only the given hostnames are associated with the given IP address. .. versionadded:: 2016.3.0 name The IP address to associate with the given hostnames. hostnames Either a single hostname or a list of hostnames to associate wi...
[ "Ensure", "that", "only", "the", "given", "hostnames", "are", "associated", "with", "the", "given", "IP", "address", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/host.py#L206-L254
[ "def", "only", "(", "name", ",", "hostnames", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "if", "isinstance", "(", "hostnames", ",", "six", ".", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_rev
Returns revision ID of repo
salt/fileserver/svnfs.py
def _rev(repo): ''' Returns revision ID of repo ''' try: repo_info = dict(six.iteritems(CLIENT.info(repo['repo']))) except (pysvn._pysvn.ClientError, TypeError, KeyError, AttributeError) as exc: log.error( 'Error retrieving revision ID for svnfs remote %s ' ...
def _rev(repo): ''' Returns revision ID of repo ''' try: repo_info = dict(six.iteritems(CLIENT.info(repo['repo']))) except (pysvn._pysvn.ClientError, TypeError, KeyError, AttributeError) as exc: log.error( 'Error retrieving revision ID for svnfs remote %s ' ...
[ "Returns", "revision", "ID", "of", "repo" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L103-L118
[ "def", "_rev", "(", "repo", ")", ":", "try", ":", "repo_info", "=", "dict", "(", "six", ".", "iteritems", "(", "CLIENT", ".", "info", "(", "repo", "[", "'repo'", "]", ")", ")", ")", "except", "(", "pysvn", ".", "_pysvn", ".", "ClientError", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
init
Return the list of svn remotes and their configuration information
salt/fileserver/svnfs.py
def init(): ''' Return the list of svn remotes and their configuration information ''' bp_ = os.path.join(__opts__['cachedir'], 'svnfs') new_remote = False repos = [] per_remote_defaults = {} for param in PER_REMOTE_OVERRIDES: per_remote_defaults[param] = \ six.text_...
def init(): ''' Return the list of svn remotes and their configuration information ''' bp_ = os.path.join(__opts__['cachedir'], 'svnfs') new_remote = False repos = [] per_remote_defaults = {} for param in PER_REMOTE_OVERRIDES: per_remote_defaults[param] = \ six.text_...
[ "Return", "the", "list", "of", "svn", "remotes", "and", "their", "configuration", "information" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L130-L252
[ "def", "init", "(", ")", ":", "bp_", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", "'svnfs'", ")", "new_remote", "=", "False", "repos", "=", "[", "]", "per_remote_defaults", "=", "{", "}", "for", "param", "in", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_clear_old_remotes
Remove cache directories for remotes no longer configured
salt/fileserver/svnfs.py
def _clear_old_remotes(): ''' Remove cache directories for remotes no longer configured ''' bp_ = os.path.join(__opts__['cachedir'], 'svnfs') try: cachedir_ls = os.listdir(bp_) except OSError: cachedir_ls = [] repos = init() # Remove actively-used remotes from list fo...
def _clear_old_remotes(): ''' Remove cache directories for remotes no longer configured ''' bp_ = os.path.join(__opts__['cachedir'], 'svnfs') try: cachedir_ls = os.listdir(bp_) except OSError: cachedir_ls = [] repos = init() # Remove actively-used remotes from list fo...
[ "Remove", "cache", "directories", "for", "remotes", "no", "longer", "configured" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L255-L293
[ "def", "_clear_old_remotes", "(", ")", ":", "bp_", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", "'svnfs'", ")", "try", ":", "cachedir_ls", "=", "os", ".", "listdir", "(", "bp_", ")", "except", "OSError", ":", "ca...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
clear_cache
Completely clear svnfs cache
salt/fileserver/svnfs.py
def clear_cache(): ''' Completely clear svnfs cache ''' fsb_cachedir = os.path.join(__opts__['cachedir'], 'svnfs') list_cachedir = os.path.join(__opts__['cachedir'], 'file_lists/svnfs') errors = [] for rdir in (fsb_cachedir, list_cachedir): if os.path.exists(rdir): try: ...
def clear_cache(): ''' Completely clear svnfs cache ''' fsb_cachedir = os.path.join(__opts__['cachedir'], 'svnfs') list_cachedir = os.path.join(__opts__['cachedir'], 'file_lists/svnfs') errors = [] for rdir in (fsb_cachedir, list_cachedir): if os.path.exists(rdir): try: ...
[ "Completely", "clear", "svnfs", "cache" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L296-L309
[ "def", "clear_cache", "(", ")", ":", "fsb_cachedir", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", "'svnfs'", ")", "list_cachedir", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
clear_lock
Clear update.lk ``remote`` can either be a dictionary containing repo configuration information, or a pattern. If the latter, then remotes for which the URL matches the pattern will be locked.
salt/fileserver/svnfs.py
def clear_lock(remote=None): ''' Clear update.lk ``remote`` can either be a dictionary containing repo configuration information, or a pattern. If the latter, then remotes for which the URL matches the pattern will be locked. ''' def _do_clear_lock(repo): def _add_error(errlist, rep...
def clear_lock(remote=None): ''' Clear update.lk ``remote`` can either be a dictionary containing repo configuration information, or a pattern. If the latter, then remotes for which the URL matches the pattern will be locked. ''' def _do_clear_lock(repo): def _add_error(errlist, rep...
[ "Clear", "update", ".", "lk" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L312-L365
[ "def", "clear_lock", "(", "remote", "=", "None", ")", ":", "def", "_do_clear_lock", "(", "repo", ")", ":", "def", "_add_error", "(", "errlist", ",", "repo", ",", "exc", ")", ":", "msg", "=", "(", "'Unable to remove update lock for {0} ({1}): {2} '", ".", "fo...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
update
Execute an svn update on all of the repos
salt/fileserver/svnfs.py
def update(): ''' Execute an svn update on all of the repos ''' # data for the fileserver event data = {'changed': False, 'backend': 'svnfs'} # _clear_old_remotes runs init(), so use the value from there to avoid a # second init() data['changed'], repos = _clear_old_remotes()...
def update(): ''' Execute an svn update on all of the repos ''' # data for the fileserver event data = {'changed': False, 'backend': 'svnfs'} # _clear_old_remotes runs init(), so use the value from there to avoid a # second init() data['changed'], repos = _clear_old_remotes()...
[ "Execute", "an", "svn", "update", "on", "all", "of", "the", "repos" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L415-L488
[ "def", "update", "(", ")", ":", "# data for the fileserver event", "data", "=", "{", "'changed'", ":", "False", ",", "'backend'", ":", "'svnfs'", "}", "# _clear_old_remotes runs init(), so use the value from there to avoid a", "# second init()", "data", "[", "'changed'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_env_is_exposed
Check if an environment is exposed by comparing it against a whitelist and blacklist.
salt/fileserver/svnfs.py
def _env_is_exposed(env): ''' Check if an environment is exposed by comparing it against a whitelist and blacklist. ''' if __opts__['svnfs_env_whitelist']: salt.utils.versions.warn_until( 'Neon', 'The svnfs_env_whitelist config option has been renamed to ' ...
def _env_is_exposed(env): ''' Check if an environment is exposed by comparing it against a whitelist and blacklist. ''' if __opts__['svnfs_env_whitelist']: salt.utils.versions.warn_until( 'Neon', 'The svnfs_env_whitelist config option has been renamed to ' ...
[ "Check", "if", "an", "environment", "is", "exposed", "by", "comparing", "it", "against", "a", "whitelist", "and", "blacklist", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L491-L520
[ "def", "_env_is_exposed", "(", "env", ")", ":", "if", "__opts__", "[", "'svnfs_env_whitelist'", "]", ":", "salt", ".", "utils", ".", "versions", ".", "warn_until", "(", "'Neon'", ",", "'The svnfs_env_whitelist config option has been renamed to '", "'svnfs_saltenv_whitel...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
envs
Return a list of refs that can be used as environments
salt/fileserver/svnfs.py
def envs(ignore_cache=False): ''' Return a list of refs that can be used as environments ''' if not ignore_cache: env_cache = os.path.join(__opts__['cachedir'], 'svnfs/envs.p') cache_match = salt.fileserver.check_env_cache(__opts__, env_cache) if cache_match is not None: ...
def envs(ignore_cache=False): ''' Return a list of refs that can be used as environments ''' if not ignore_cache: env_cache = os.path.join(__opts__['cachedir'], 'svnfs/envs.p') cache_match = salt.fileserver.check_env_cache(__opts__, env_cache) if cache_match is not None: ...
[ "Return", "a", "list", "of", "refs", "that", "can", "be", "used", "as", "environments" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L523-L562
[ "def", "envs", "(", "ignore_cache", "=", "False", ")", ":", "if", "not", "ignore_cache", ":", "env_cache", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", "'svnfs/envs.p'", ")", "cache_match", "=", "salt", ".", "fileser...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_env_root
Return the root of the directory corresponding to the desired environment, or None if the environment was not found.
salt/fileserver/svnfs.py
def _env_root(repo, saltenv): ''' Return the root of the directory corresponding to the desired environment, or None if the environment was not found. ''' # If 'base' is desired, look for the trunk if saltenv == 'base': trunk = os.path.join(repo['repo'], repo['trunk']) if os.path...
def _env_root(repo, saltenv): ''' Return the root of the directory corresponding to the desired environment, or None if the environment was not found. ''' # If 'base' is desired, look for the trunk if saltenv == 'base': trunk = os.path.join(repo['repo'], repo['trunk']) if os.path...
[ "Return", "the", "root", "of", "the", "directory", "corresponding", "to", "the", "desired", "environment", "or", "None", "if", "the", "environment", "was", "not", "found", "." ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L565-L588
[ "def", "_env_root", "(", "repo", ",", "saltenv", ")", ":", "# If 'base' is desired, look for the trunk", "if", "saltenv", "==", "'base'", ":", "trunk", "=", "os", ".", "path", ".", "join", "(", "repo", "[", "'repo'", "]", ",", "repo", "[", "'trunk'", "]", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
find_file
Find the first file to match the path and ref. This operates similarly to the roots file sever but with assumptions of the directory structure based on svn standard practices.
salt/fileserver/svnfs.py
def find_file(path, tgt_env='base', **kwargs): # pylint: disable=W0613 ''' Find the first file to match the path and ref. This operates similarly to the roots file sever but with assumptions of the directory structure based on svn standard practices. ''' fnd = {'path': '', 'rel': ''}...
def find_file(path, tgt_env='base', **kwargs): # pylint: disable=W0613 ''' Find the first file to match the path and ref. This operates similarly to the roots file sever but with assumptions of the directory structure based on svn standard practices. ''' fnd = {'path': '', 'rel': ''}...
[ "Find", "the", "first", "file", "to", "match", "the", "path", "and", "ref", ".", "This", "operates", "similarly", "to", "the", "roots", "file", "sever", "but", "with", "assumptions", "of", "the", "directory", "structure", "based", "on", "svn", "standard", ...
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L591-L635
[ "def", "find_file", "(", "path", ",", "tgt_env", "=", "'base'", ",", "*", "*", "kwargs", ")", ":", "# pylint: disable=W0613", "fnd", "=", "{", "'path'", ":", "''", ",", "'rel'", ":", "''", "}", "if", "os", ".", "path", ".", "isabs", "(", "path", ")...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
file_hash
Return a file hash, the hash type is set in the master config file
salt/fileserver/svnfs.py
def file_hash(load, fnd): ''' Return a file hash, the hash type is set in the master config file ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if not all(x in load for x in ('path', 'saltenv')): return '' saltenv = load['saltenv'] if ...
def file_hash(load, fnd): ''' Return a file hash, the hash type is set in the master config file ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if not all(x in load for x in ('path', 'saltenv')): return '' saltenv = load['saltenv'] if ...
[ "Return", "a", "file", "hash", "the", "hash", "type", "is", "set", "in", "the", "master", "config", "file" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L667-L718
[ "def", "file_hash", "(", "load", ",", "fnd", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "if", "not", "all", "(", "x", "in", "load", "for", "x", "in", "(", "'path'", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
train
_file_lists
Return a dict containing the file lists for files, dirs, emptydirs and symlinks
salt/fileserver/svnfs.py
def _file_lists(load, form): ''' Return a dict containing the file lists for files, dirs, emptydirs and symlinks ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if 'saltenv' not in load or load['saltenv'] not in envs(): return [] list_cach...
def _file_lists(load, form): ''' Return a dict containing the file lists for files, dirs, emptydirs and symlinks ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if 'saltenv' not in load or load['saltenv'] not in envs(): return [] list_cach...
[ "Return", "a", "dict", "containing", "the", "file", "lists", "for", "files", "dirs", "emptydirs", "and", "symlinks" ]
saltstack/salt
python
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/svnfs.py#L721-L789
[ "def", "_file_lists", "(", "load", ",", "form", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "if", "'saltenv'", "not", "in", "load", "or", "load", "[", "'saltenv'", "]", ...
e8541fd6e744ab0df786c0f76102e41631f45d46