mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
don't use empty string as command parameter
This commit is contained in:
parent
97f91e5817
commit
ab7346be17
@ -71,7 +71,9 @@ def pvdisplay(pvname=''):
|
||||
salt '*' lvm.pvdisplay /dev/md0
|
||||
'''
|
||||
ret = {}
|
||||
cmd = ['pvdisplay', '-c', pvname]
|
||||
cmd = ['pvdisplay', '-c']
|
||||
if pvname:
|
||||
cmd.append(pvname)
|
||||
cmd_ret = __salt__['cmd.run_all'](cmd, python_shell=False)
|
||||
|
||||
if cmd_ret['retcode'] != 0:
|
||||
@ -109,7 +111,9 @@ def vgdisplay(vgname=''):
|
||||
salt '*' lvm.vgdisplay nova-volumes
|
||||
'''
|
||||
ret = {}
|
||||
cmd = ['vgdisplay', '-c', vgname]
|
||||
cmd = ['vgdisplay', '-c']
|
||||
if vgname:
|
||||
cmd.append(vgname)
|
||||
cmd_ret = __salt__['cmd.run_all'](cmd, python_shell=False)
|
||||
|
||||
if cmd_ret['retcode'] != 0:
|
||||
@ -152,7 +156,9 @@ def lvdisplay(lvname=''):
|
||||
salt '*' lvm.lvdisplay /dev/vg_myserver/root
|
||||
'''
|
||||
ret = {}
|
||||
cmd = ['lvdisplay', '-c', lvname]
|
||||
cmd = ['lvdisplay', '-c']
|
||||
if lvname:
|
||||
cmd.append(lvname)
|
||||
cmd_ret = __salt__['cmd.run_all'](cmd, python_shell=False)
|
||||
|
||||
if cmd_ret['retcode'] != 0:
|
||||
|
Loading…
Reference in New Issue
Block a user