def cmd_NODE(self, line):
        """ Handler for node command.

            @param line:    line input from terminal.
            @type  line:    string
        """
        config = NodeOptions(self.terminal)

        try:
            config.parseOptions(line)
            cmd = config.subCommand
            opts = config.subOptions if hasattr(config, 'subOptions') else {}
        except usage.UsageError as errortext:
            self.terminal.write("BUG in usage: {0}".format(errortext))
        else:
            if cmd == 'start':
                if (opts['args'] and opts['ctag'] and opts['ntag']
                    and opts['pkg'] and opts['exe']):
                    self.callToUser('addNode', 'robot', opts['ctag'],
                                    opts['ntag'], opts['pkg'], opts['exe'],
                                    opts['args'])
                elif (opts['ctag'] and opts['ntag']  and opts['pkg']
                      and opts['exe']):
                    self.callToUser('addNode', 'robot', opts['ctag'],
                                    opts['ntag'], opts['pkg'], opts['exe'])
            elif cmd == 'stop':
                if opts['ctag'] and opts['ntag']:
                    self.callToUser('removeNode', 'robot', opts['ctag'],
                                    opts['ntag'])
dataset/ETHPy150Open rapyuta/rce/rce-console/rce/console/console.py/ConsoleClient.cmd_NODE/original