daemon/core/netns/vnodeclient.py
def cmd(self, args, wait = True):
        ''' Execute a command on a node and return the status (return code).
        '''
        if USE_VCMD_MODULE:
            if not self.cmdchnl.connected():
                raise ValueError, "self.cmdchnl not connected"
            tmp = self.cmdchnl.qcmd(args)
            if not wait:
                return tmp
            tmp = tmp.wait()
        else:
            if wait:
                mode = os.P_WAIT
            else:
                mode = os.P_NOWAIT
            tmp = os.spawnlp(mode, VCMD, VCMD, "-c",
                             self.ctrlchnlname, "-q", "--", *args)
            if not wait:
                return tmp
        if tmp:
            self.warn("cmd exited with status %s: %s" % (tmp, str(args)))
        return tmp
 Execute a command on a node and return the status (return code).
        
Execute a command on a node and return the status (return code).
Execute a command on a node and return the status ( return code ) .
def cmd(self, args, wait = True):
        if USE_VCMD_MODULE:
            if not self.cmdchnl.connected():
                raise ValueError, "self.cmdchnl not connected"
            tmp = self.cmdchnl.qcmd(args)
            if not wait:
                return tmp
            tmp = tmp.wait()
        else:
            if wait:
                mode = os.P_WAIT
            else:
                mode = os.P_NOWAIT
            tmp = os.spawnlp(mode, VCMD, VCMD, "-c",
                             self.ctrlchnlname, "-q", "--", *args)
            if not wait:
                return tmp
        if tmp:
            self.warn("cmd exited with status %s: %s" % (tmp, str(args)))
        return tmp
def cmd ( self , args , wait = True ) : if USE_VCMD_MODULE : if not self . cmdchnl . connected ( ) : raise ValueError , "self.cmdchnl not connected" tmp = self . cmdchnl . qcmd ( args ) if not wait : return tmp tmp = tmp . wait ( ) else : if wait : mode = os . P_WAIT else : mode = os . P_NOWAIT tmp = os . spawnlp ( mode , VCMD , VCMD , "-c" , self . ctrlchnlname , "-q" , "--" , * args ) if not wait : return tmp if tmp : self . warn ( "cmd exited with status %s: %s" % ( tmp , str ( args ) ) ) return tmp
Execute a command on a node and return the status (return code).
Execute a command on a node and return the status ( return code ) .
''' Execute a command on a node and return the status (return code).
        '''
self
args
wait