further cleanup in regards the commands that are being used within core

This commit is contained in:
Blake J. Harnden 2018-03-01 16:23:58 -08:00
parent 870d87804b
commit 6211b09585
15 changed files with 322 additions and 316 deletions

View file

@ -412,33 +412,33 @@ class PyCoreNode(PyCoreObj):
return common
def check_cmd(self, cmd):
def check_cmd(self, args):
"""
Runs shell command on node.
:param list[str]/str cmd: command to run
:param list[str]|str args: command to run
:return: exist status and combined stdout and stderr
:rtype: tuple[int, str]
:raises subprocess.CalledProcessError: when a non-zero exit status occurs
"""
raise NotImplementedError
def cmd(self, cmd, wait=True):
def cmd(self, args, wait=True):
"""
Runs shell command on node, with option to not wait for a result.
:param list[str]/str cmd: command to run
:param list[str]|str args: command to run
:param bool wait: wait for command to exit, defaults to True
:return: exit status for command
:rtype: int
"""
raise NotImplementedError
def cmd_output(self, cmd):
def cmd_output(self, args):
"""
Runs shell command on node and get exit status and output.
:param list[str]/str cmd: command to run
:param list[str]|str args: command to run
:return: exit status and combined stdout and stderr
:rtype: tuple[int, str]
"""