mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Updated versions for file.replace file.search functions
This is going out with 0.17 instead of 0.17.1.
This commit is contained in:
parent
1d671b6f6b
commit
2f8393478b
@ -553,7 +553,7 @@ def sed(path,
|
|||||||
escape_all=False,
|
escape_all=False,
|
||||||
negate_match=False):
|
negate_match=False):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :py:func:`~salt.modules.file.replace` instead.
|
Use :py:func:`~salt.modules.file.replace` instead.
|
||||||
|
|
||||||
Make a simple edit to a file
|
Make a simple edit to a file
|
||||||
@ -627,7 +627,7 @@ def sed_contains(path,
|
|||||||
limit='',
|
limit='',
|
||||||
flags='g'):
|
flags='g'):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :func:`search` instead.
|
Use :func:`search` instead.
|
||||||
|
|
||||||
Return True if the file at ``path`` contains ``text``. Utilizes sed to
|
Return True if the file at ``path`` contains ``text``. Utilizes sed to
|
||||||
@ -673,7 +673,7 @@ def psed(path,
|
|||||||
escape_all=False,
|
escape_all=False,
|
||||||
multi=False):
|
multi=False):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :py:func:`~salt.modules.file.replace` instead.
|
Use :py:func:`~salt.modules.file.replace` instead.
|
||||||
|
|
||||||
Make a simple edit to a file (pure Python version)
|
Make a simple edit to a file (pure Python version)
|
||||||
@ -785,7 +785,7 @@ def uncomment(path,
|
|||||||
char='#',
|
char='#',
|
||||||
backup='.bak'):
|
backup='.bak'):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :py:func:`~salt.modules.file.replace` instead.
|
Use :py:func:`~salt.modules.file.replace` instead.
|
||||||
|
|
||||||
Uncomment specified commented lines in a file
|
Uncomment specified commented lines in a file
|
||||||
@ -824,7 +824,7 @@ def comment(path,
|
|||||||
char='#',
|
char='#',
|
||||||
backup='.bak'):
|
backup='.bak'):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :py:func:`~salt.modules.file.replace` instead.
|
Use :py:func:`~salt.modules.file.replace` instead.
|
||||||
|
|
||||||
Comment out specified lines in a file
|
Comment out specified lines in a file
|
||||||
@ -904,7 +904,7 @@ def replace(path,
|
|||||||
'''
|
'''
|
||||||
Replace occurances of a pattern in a file
|
Replace occurances of a pattern in a file
|
||||||
|
|
||||||
.. versionadded:: 0.17.1
|
.. versionadded:: 0.17
|
||||||
|
|
||||||
This is a pure Python implementation that wraps Python's :py:func:`~re.sub`.
|
This is a pure Python implementation that wraps Python's :py:func:`~re.sub`.
|
||||||
|
|
||||||
@ -997,7 +997,7 @@ def search(path,
|
|||||||
'''
|
'''
|
||||||
Search for occurances of a pattern in a file
|
Search for occurances of a pattern in a file
|
||||||
|
|
||||||
.. versionadded:: 0.17.1
|
.. versionadded:: 0.17
|
||||||
|
|
||||||
Params are identical to :py:func:`~salt.modules.file.replace`.
|
Params are identical to :py:func:`~salt.modules.file.replace`.
|
||||||
|
|
||||||
@ -1057,7 +1057,7 @@ def patch(originalfile, patchfile, options='', dry_run=False):
|
|||||||
|
|
||||||
def contains(path, text):
|
def contains(path, text):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :func:`search` instead.
|
Use :func:`search` instead.
|
||||||
|
|
||||||
Return ``True`` if the file at ``path`` contains ``text``
|
Return ``True`` if the file at ``path`` contains ``text``
|
||||||
@ -1084,7 +1084,7 @@ def contains(path, text):
|
|||||||
|
|
||||||
def contains_regex(path, regex, lchar=''):
|
def contains_regex(path, regex, lchar=''):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :func:`search` instead.
|
Use :func:`search` instead.
|
||||||
|
|
||||||
Return True if the given regular expression matches on any line in the text
|
Return True if the given regular expression matches on any line in the text
|
||||||
@ -1116,7 +1116,7 @@ def contains_regex(path, regex, lchar=''):
|
|||||||
|
|
||||||
def contains_regex_multiline(path, regex):
|
def contains_regex_multiline(path, regex):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :func:`search` instead.
|
Use :func:`search` instead.
|
||||||
|
|
||||||
Return True if the given regular expression matches anything in the text
|
Return True if the given regular expression matches anything in the text
|
||||||
@ -1146,7 +1146,7 @@ def contains_regex_multiline(path, regex):
|
|||||||
|
|
||||||
def contains_glob(path, glob):
|
def contains_glob(path, glob):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :func:`search` instead.
|
Use :func:`search` instead.
|
||||||
|
|
||||||
Return True if the given glob matches a string in the named file
|
Return True if the given glob matches a string in the named file
|
||||||
|
@ -1673,7 +1673,7 @@ def replace(name,
|
|||||||
'''
|
'''
|
||||||
Maintain an edit in a file
|
Maintain an edit in a file
|
||||||
|
|
||||||
.. versionadded:: 0.17.1
|
.. versionadded:: 0.17
|
||||||
|
|
||||||
Params are identical to :py:func:`~salt.modules.file.replace`.
|
Params are identical to :py:func:`~salt.modules.file.replace`.
|
||||||
|
|
||||||
@ -1714,7 +1714,7 @@ def sed(name,
|
|||||||
flags='g',
|
flags='g',
|
||||||
negate_match=False):
|
negate_match=False):
|
||||||
'''
|
'''
|
||||||
.. deprecated:: 0.17.1
|
.. deprecated:: 0.17
|
||||||
Use :py:func:`~salt.states.file.replace` instead.
|
Use :py:func:`~salt.states.file.replace` instead.
|
||||||
|
|
||||||
Maintain a simple edit to a file
|
Maintain a simple edit to a file
|
||||||
|
Loading…
Reference in New Issue
Block a user