Cleaned packstack.installer.common_utils
- cleaned from useless functions - refactored to be pep8 compliant - separated to standalone modules - added unit tests Change-Id: If5a300fe04efab9e13549f2b4d05c1b28e2e40c6
This commit is contained in:
@@ -12,7 +12,7 @@ import tempfile
|
||||
import traceback
|
||||
|
||||
import basedefs
|
||||
import common_utils as utils
|
||||
from . import utils
|
||||
|
||||
from .setup_controller import Controller
|
||||
from .exceptions import ParamValidationError
|
||||
@@ -175,8 +175,8 @@ def validate_ping(param, options=None):
|
||||
# TO-DO: to be more flexible, remove this and exit in case param is empty
|
||||
validate_not_empty(param)
|
||||
|
||||
cmd = ["/bin/ping", "-c", "1", str(param)]
|
||||
out, rc = utils.execCmd(cmdList=cmd)
|
||||
rc, out = utils.execute(['/bin/ping', '-c', '1', str(param)],
|
||||
can_fail=True)
|
||||
if rc != 0:
|
||||
logging.debug('validate_ping(%s, options=%s) failed.' %
|
||||
(param, options))
|
||||
|
||||
Reference in New Issue
Block a user