updates to consolidate commands that need to be defined by a new node type
This commit is contained in:
parent
0b8ee7760d
commit
d3bd61ddcf
25 changed files with 314 additions and 175 deletions
|
@ -412,6 +412,47 @@ class PyCoreNode(PyCoreObj):
|
|||
|
||||
return common
|
||||
|
||||
def check_cmd(self, cmd):
|
||||
"""
|
||||
Runs shell command on node.
|
||||
|
||||
:param list[str]/str cmd: 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):
|
||||
"""
|
||||
Runs shell command on node, with option to not wait for a result.
|
||||
|
||||
:param list[str]/str cmd: 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):
|
||||
"""
|
||||
Runs shell command on node and get exit status and output.
|
||||
|
||||
:param list[str]/str cmd: command to run
|
||||
:return: exit status and combined stdout and stderr
|
||||
:rtype: tuple[int, str]
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def termcmdstring(self, sh):
|
||||
"""
|
||||
Create a terminal command string.
|
||||
|
||||
:param str sh: shell to execute command in
|
||||
:return: str
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class PyCoreNet(PyCoreObj):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue