Ejemplo n.º 1
0
def cli_op(node):
    "CLI format for an <op> tag"
    action, pl = xmlutil.op2list(node)
    if not action:
        return ""
    ret = ["%s %s" % (clidisplay.keyword("op"), action)]
    ret += [nvpair_format(n, v) for n, v in pl]
    ret += [cli_nvpair(v) for v in op_instattr(node)]
    return ' '.join(ret)
Ejemplo n.º 2
0
def cli_op(node):
    "CLI format for an <op> tag"
    action, pl = xmlutil.op2list(node)
    if not action:
        return ""
    ret = ["%s %s" % (clidisplay.keyword("op"), action)]
    ret += [nvpair_format(n, v) for n, v in pl]
    ret += [cli_nvpair(v) for v in op_instattr(node)]
    return ' '.join(ret)
Ejemplo n.º 3
0
def cli_op(node):
    action, pl = xmlutil.op2list(node)
    if not action:
        return ""
    pl += op_instattr(node)
    return "%s %s %s" % (cli_display.keyword("op"), action, cli_pairs(pl))
Ejemplo n.º 4
0
def cli_op(node):
    action, pl = xmlutil.op2list(node)
    if not action:
        return ""
    pl += op_instattr(node)
    return "%s %s %s" % (cli_display.keyword("op"), action, cli_pairs(pl))