コード例 #1
0
ファイル: pnodes.py プロジェクト: 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
コード例 #2
0
ファイル: pnodes.py プロジェクト: gsomlo/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
コード例 #3
0
 def localdevexists():
     args = [constants.IP_BIN, "link", "show", self.localname]
     return utils.cmd(args)