Exemplo n.º 1
0
Arquivo: pnodes.py Projeto: yrs1/core
    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
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
 def localdevexists():
     args = [constants.IP_BIN, "link", "show", self.localname]
     return utils.cmd(args)