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."
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."
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."