def cmd(self, args, wait=True): """ Runs shell command on node, with option to not wait for a result. :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 """ os.chdir(self.nodedir) status = utils.cmd(args, wait) return status
def localdevexists(): args = [constants.IP_BIN, "link", "show", self.localname] return utils.cmd(args)