@options([make_option('-l', '--list', action="store_true",
                          help="List MO routes"),
              make_option('-a', '--add', action="store_true",
                          help="Add a new MO route"),
              make_option('-r', '--remove', type="string", metavar="ORDER",
                          help="Remove MO route using it's ORDER"),
              make_option('-s', '--show', type="string", metavar="ORDER",
                          help="Show MO route using it's ORDER"),
              make_option('-f', '--flush', action="store_true",
                          help="Flush MO routing table")], '')
    def do_morouter(self, arg, opts=None):

        if opts.list:
            self.managers['morouter'].list(arg, opts)
        elif opts.add:
            self.managers['morouter'].add(arg, opts)
        elif opts.remove:
            self.managers['morouter'].remove(arg, opts)
        elif opts.show:
            self.managers['morouter'].show(arg, opts)
        elif opts.flush:
            self.managers['morouter'].flush(arg, opts)
        else:
            return self.sendData('Missing required option')
MO Router management
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/jcli.py/JCliProtocol.do_morouter