示例#1
0
def main(args):
    device = NXOS(args.mgmt_ip)
    device.PromptCreds()
    intfstatus = device.cli_show('show interface status')
    intflist = intfstatus['TABLE_interface']['ROW_interface']
    commands = []
    for intf in intflist:
        commands.append("int {} ;no description".format(intf['interface']))
    device.cli_conf(commands)
    print "Descriptions Cleared."
示例#2
0
def main(args):
    n9k = NXOS(args.mgmt_ip)
    n9k.PromptCreds()
    print "Gathering data."
    try:
        route_data = n9k.cli_show('show ip route')
        stats = GetRouteStats(route_data)
        PrintRouteStats(stats)
    except Timeout, e:
        print e
示例#3
0
def main(args):
    n9k = NXOS(args.mgmt_ip)
    n9k.PromptCreds()
    print "Gathering data."
    cdp_data = n9k.cli_show('show cdp neighbor detail')
    pc_data = n9k.cli_show('show port-channel summary')
    desc_cmds = makeDescriptions(cdp_data, pc_data)
    n9k.cli_conf(desc_cmds)
    print "Descriptions Complete."
示例#4
0
def main(args):
    device = NXOS(args.mgmt_ip)
    device.PromptCreds()
    intfstatus = device.cli_show('show interface status')
    intflist = intfstatus['TABLE_interface']['ROW_interface']
    commands = []
    for intf in intflist:
        commands.append("int {} ;no description".format(intf['interface']))
    device.cli_conf(commands)
    print "Descriptions Cleared."
示例#5
0
def main(args):
    n9k = NXOS(args.mgmt_ip)
    n9k.PromptCreds()
    commands = ["int m0 ;no desc", "int e1/1-48 ;no desc", "int e2/1-12 ;no desc", "int Po1 ;no desc"]
    n9k.cli_conf(commands)
    print "Descriptions Cleared."