Merge pull request #7169 from hulu/func-aliases

add more func aliases to avoid shadowing built-ins
This commit is contained in:
Joseph Hall 2013-09-11 05:36:42 -07:00
commit 87ea12fd28
2 changed files with 12 additions and 2 deletions

View File

@ -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).

View File

@ -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.