mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add versionadded.
This commit is contained in:
parent
93a6397598
commit
1a2c41c9e3
1 changed files with 20 additions and 1 deletions
|
@ -14,6 +14,7 @@ __func_alias__ = {
|
|||
'list_': 'list'
|
||||
}
|
||||
|
||||
|
||||
# Define the module's virtual name
|
||||
__virtualname__ = 'service'
|
||||
|
||||
|
@ -31,6 +32,8 @@ def get_all():
|
|||
'''
|
||||
Return a list of all available services
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -43,7 +46,9 @@ def get_all():
|
|||
|
||||
def list_():
|
||||
'''
|
||||
Return a list of all available services
|
||||
Return a list of all available services.
|
||||
|
||||
.. versionadded: 2015.8.1
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -58,6 +63,8 @@ def start(name, sig=None):
|
|||
'''
|
||||
Start the specified service on the rest_sample
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -73,6 +80,8 @@ def stop(name, sig=None):
|
|||
'''
|
||||
Stop the specified service on the rest_sample
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -87,6 +96,8 @@ def restart(name, sig=None):
|
|||
'''
|
||||
Restart the specified service with rest_sample
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -103,6 +114,8 @@ def status(name, sig=None):
|
|||
Return the status for a service via rest_sample, returns a bool
|
||||
whether the service is running.
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -121,6 +134,9 @@ def status(name, sig=None):
|
|||
def running(name, sig=None):
|
||||
'''
|
||||
Return whether this service is running.
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
'''
|
||||
return status(name).get(name, False)
|
||||
|
||||
|
@ -128,5 +144,8 @@ def running(name, sig=None):
|
|||
def enabled(name, sig=None):
|
||||
'''
|
||||
Only the 'redbull' service is 'enabled' in the test
|
||||
|
||||
.. versionadded:: 2015.8.1
|
||||
|
||||
'''
|
||||
return name == 'redbull'
|
||||
|
|
Loading…
Add table
Reference in a new issue