mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #7169 from hulu/func-aliases
add more func aliases to avoid shadowing built-ins
This commit is contained in:
commit
87ea12fd28
@ -15,6 +15,11 @@ import salt.utils
|
||||
# Set up logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Don't shadow built-in's.
|
||||
__func_alias__ = {
|
||||
'list_': 'list'
|
||||
}
|
||||
|
||||
|
||||
def __virtual__():
|
||||
if not salt.utils.which('lxc'):
|
||||
@ -217,7 +222,7 @@ def create(name, config=None, profile=None, options=None, **kwargs):
|
||||
return {'created': False, 'error': 'container could not be created'}
|
||||
|
||||
|
||||
def list():
|
||||
def list_():
|
||||
'''
|
||||
List defined containers (running, stopped, and frozen).
|
||||
|
||||
|
@ -19,6 +19,11 @@ import salt.config
|
||||
# Set up logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Don't shadow built-in's.
|
||||
__func_alias__ = {
|
||||
'apply_': 'apply'
|
||||
}
|
||||
|
||||
|
||||
def _mount(path, ftype):
|
||||
mpt = None
|
||||
@ -44,7 +49,7 @@ def _umount(mpt, ftype):
|
||||
__salt__['img.umount_image'](mpt)
|
||||
|
||||
|
||||
def apply(path, id_=None, config=None, approve_key=True, install=True):
|
||||
def apply_(path, id_=None, config=None, approve_key=True, install=True):
|
||||
'''
|
||||
Seed a location (disk image, directory, or block device) with the
|
||||
minion config, approve the minion's key, and/or install salt-minion.
|
||||
|
Loading…
Reference in New Issue
Block a user