def fileprocessor_iosxr(debug1, filename): if debug1: print("\tModule#\t\tios_iosxr") if debug1: print("\tSubroutine#\tfileprocessor_iosxr") splitbydot = filename.split(".") if (filename.startswith("asr9k-px-") and splitbydot[3].startswith("CSC") or filename.startswith("asr9k-x64-") and splitbydot[3].startswith("CSC") or filename.startswith("asr9k-sysadmin-") and splitbydot[3].startswith("CSC")): iosxr_asr9ksmu(debug1, filename) elif (filename.startswith("ASR9K") or filename.startswith("ASR9k") or filename.startswith("ASR9000") or filename.startswith("asr9k")): iosxr_asr9k(debug1, filename) elif (filename.startswith("fullk9")): iosxr_asr9kv(debug1, filename) elif (filename.startswith("xrv9k")): iosxr_asr9kvsmu(debug1, filename) elif (filename == "XRV9K-docs-7.4.1.tar" or filename == "XRV9000-docs-623.tar" or filename == "XRV9000-docs-6225.tar"): prodname = product("iosxrvfull") imagecode = imagelookup("docs") filepath = filepath2(prodname, imagecode) filemove(filepath, filename) elif (filename == "xrvr-full-4.3.2.vmdk" or filename == "xrvr-fullk9-4.3.2.vmdk"): prodname = product("iosxrvdemo") filepath = filepath2(prodname, "4.3.2") filemove(filepath, filename) elif (filename.startswith("iosxrv-demo") or filename.startswith("iosxrv-k9-demo")): iosxr_iosxrv_demo(debug1, filename) else: # if prodname == "UNKNOWN": # messageunknowndev() # elif imagecode == "UNKNOWN": # messageunknownfeat() messageunknowndev()
def iosxr_asr9kvsmu(debug1, filename): if debug1: print("\tSubroutine#\tiosxr_asr9kvsmu") prodname = product("iosxrvfull") imagecode = imagelookup("smu") workname = filename.replace("xrv9k-sysadmin-", "") workname = workname.replace("xrv9k-", "") splitbydot = workname.split(".") vertwo = util2digit(splitbydot[0], splitbydot[1]) versmu = util3digit(splitbydot[0], splitbydot[1], splitbydot[2]) filepath = filepath5(prodname, vertwo, versmu, imagecode, splitbydot[3]) filemove(filepath, filename)
def fileprocessorvoice(debug1, filename): if debug1: print("\tModule#\t\tios_voice") if debug1: print("\tSubroutine#\tfileprocessorvoice") if filename.startswith("cmterm"): fileprocphone(debug1, filename) elif (filename == "vgc-main.1-3-1ES8-2.tar" or filename == "vgc-main.1-3-2.tar" or filename == "vgc-main.1-3-2ES3.tar" or filename == "vgc-main_1-3-1es8-2_Readme.txt" or filename == "vgc-main_1-3-2es3_Readme.txt"): prodname = product("vg248") utilssingleprodname(debug1, filename, prodname) elif (filename.startswith("cme") or filename.startswith("CME")): prodname = product("voice") imagecode = imagelookup("cme") utilssinglemove(debug1, filename, prodname, imagecode) else: messageunknownfile()
def iosxr_iosxrv_demo(debug1, filename): if debug1: print("\tSubroutine#\tiosxr_iosxrv_demo") prodname = product("iosxrvdemo") workname = filename.replace("iosxrv-demo.ova-", "") workname = workname.replace("iosxrv-demo.vmdk-", "") workname = workname.replace(".vmdk", "") workname = workname.replace(".ova", "") workname = workname.replace("iosxrv-k9-demo-", "") workname = workname.replace("iosxrv-demo-", "") splitbydot = workname.split(".") verthree = util3digit(splitbydot[0], splitbydot[1], splitbydot[2]) filepath = filepath2(prodname, verthree) filemove(filepath, filename)
def file_proc_servers_apicem(debug1, filename): splitbydash = filename.split("-") if debug1: print("\tSubroutine#\tfile_proc_servers_apicem") prodname = product("apicem") if filename.startswith("apic_em_update-apic"): splitbydash = filename.split("-") splitbydot = splitbydash[3].split(".") elif filename.startswith("APIC-EM"): splitbydash = filename.split("-") splitbydot = splitbydash[2].split(".") vertwo = util2digit(splitbydot[0], splitbydot[1]) verthree = util3digit(splitbydot[0], splitbydot[1], splitbydot[2]) filepath = filepath3(prodname, vertwo, verthree) filemove(filepath, filename)
def fileprocessornxosplatform7700v8(filename): if debug1: print("\tSubroutine#\tfileprocessornxosplatform7700v8") splitbydash = filename.split("-") splitbydot = filename.split(".") if filename.startswith == "n7700-s2-kickstart-npe": imagecode = "KICKSTART-NPE" elif filename.startswith == "n7700-s2-kickstart": imagecode = "KICKSTART" elif filename.startswith == "n7700-s2-dk9-npe": imagecode = "SYSTEM-NPE" elif filename.startswith == "n7700-s2-dk9": imagecode = "SYSTEM" if splitbydash[0] == "n7700": prodname = product(splitbydash[0]) if splitbydash[1] == "s2": imagecode = "SUP-2" elif splitbydash[1] == "s3": imagecode = "SUP-3" iosmain = util2digit(splitbydot[1], splitbydot[2]) iosfull = util3digit(splitbydot[1], splitbydot[2], splitbydot[3]) filepath = prodname + "/" + iosmain + "/" + iosfull + "/" + imagecode
def iosxr_asr9kv(debug1, filename): if debug1: print("\tSubroutine#\tiosxr_asr9kv") prodname = product("iosxrvfull") workname = filename.replace(".tar", "") splitbydash = workname.split("-") if filename.endswith("-RRVG.tar"): imagecode = imagelookup("rrvga") elif filename.endswith("-RR.tar"): imagecode = imagelookup("rr") elif filename.endswith("-VG.tar"): imagecode = imagelookup("basevga") else: imagecode = imagelookup("base") verlist = list(splitbydash[3]) if len(verlist) == 4: verfull = util4digit(verlist[0], verlist[1], verlist[2], verlist[3]) vertwo = util2digit(verlist[0], verlist[1]) elif len(verlist) == 3: verfull = util3digit(verlist[0], verlist[1], verlist[2]) vertwo = util2digit(verlist[0], verlist[1]) filepath = filepath4(prodname, vertwo, verfull, imagecode) filemove(filepath, filename)
def fileproccontroller(debug1, filename): if debug1: print("\tSubroutine#\tfileproccontroller") if filename.startswith("C9800-40-universalk9_wlc"): prodname = product("C9800-40") fileproc_iosxe_controller(debug1, filename, prodname) elif filename.startswith("C9800-80-universalk9_wlc"): prodname = product("C9800-80") fileproc_iosxe_controller(debug1, filename, prodname) elif filename.startswith("C9800-CL-universalk9_kvm"): prodname = product("C9800-CL") fileproc_iosxe_controller(debug1, filename, prodname) elif filename.startswith("C9800-CL-universalk9"): prodname = product("C9800-CL") fileproc_iosxe_controller(debug1, filename, prodname) elif filename.startswith("C9800-L-universalk9_wlc"): prodname = product("C9800-L") fileproc_iosxe_controller(debug1, filename, prodname) elif filename.startswith("C9800-SW-iosxe-wlc"): prodname = product("C9800-SW") fileproc_iosxe_controller(debug1, filename, prodname) elif filename.startswith("C9800-AP-universalk9"): prodname = product("C9800-AP") fileproc_iosxe_controller(debug1, filename, prodname)
def fileprocessor_iosxe(debug1, filename): if debug1: print("\tModule#\t\tios_iosxe") if debug1: print("\tSubroutine#\tfileprocessor_iosxe") splitbydot = filename.split(".") splitbydash = filename.split("-") if (filename == "cat9k_iosxe.16.00.00fpgautility.SPA.bin" or filename == "cat9k_fpga_upgrade_utility.pdf"): prodname = product("cat9k") imagecode = imagelookup("fpga") utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "asr1000rpx86-universalk9.V1612_1_CVE_2019_1649.SPA.bin": prodname = product("asr1000rpx86") imagecode = imagelookup("hardware") utilssingleprodname(debug1, filename, prodname) elif filename == "asr1000rp1-advipservicesk9.V152_1_S1_CSCTR15153_3.bin": prodname = product("asr1000rp1") utilssingleprodname(debug1, filename, prodname) elif filename == "asr903rsp1-universalk9_npe.V154_3_S3_SR637267017_1.bin": prodname = product("asr903rsp1") utilssingleprodname(debug1, filename, prodname) elif filename == "asr1000rp1-adventerprisek9.BLD_V122_33_XNC_ASR_RLS3_THROTTLE_LATEST_20090513_080032.bin": prodname = product("asr1000rp1") utilssingleprodname(debug1, filename, prodname) elif (filename.startswith("c1100_gfast") or filename.startswith("c1100_phy")): prodname = product("c1100router") imagecode = imagelookup("dslfirmware") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "nim_vab_phy_fw_A39x3_B39x3_Bond39t.pkg" or filename == "nim_vab_phy_fw_A39t_B39g1_Bond39t.pkg" or filename == "nim_vab_phy_fw_A39t_B39g1_Bond39t.pkg" or filename.startswith("isr4300-firmware_nim_xdsl")): prodname = product("isr4300") imagecode = imagelookup("dslfirmware") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("iosxe-sd-avc")): prodname = product("iosxe-sd-avc") utilssingleprodname(debug1, filename, prodname) elif (filename.startswith("iosxe-remote-mgmt")): prodname = product("iosxe-remote-mgmt") utilssingleprodname(debug1, filename, prodname) elif (filename.startswith("CAT3650_WEBAUTH_BUNDLE") or filename.startswith("CAT3850_WEBAUTH_BUNDLE")): prodname = product("cat3k_caa") imagecode = imagelookup("webauth") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4200-firmware_nim_xdsl"): prodname = product("isr4200") imagecode = imagelookup("dslfirmware") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4400-firmware_nim_xdsl"): prodname = product("isr4400") imagecode = imagelookup("dslfirmware") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4400v2-firmware_nim_xdsl"): prodname = product("isr4400v2") imagecode = imagelookup("dslfirmware") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4300-hw-programmables"): prodname = product("isr4300") imagecode = imagelookup("hardware") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr-hw-programmables"): prodname = product("isr4400") imagecode = imagelookup("hardware") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4200_cpld_update"): prodname = product("isr4200") imagecode = imagelookup("cpld_update") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4300_cpld_update"): prodname = product("isr4300") imagecode = imagelookup("cpld_update") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4400_cpld_update"): prodname = product("isr4400") imagecode = imagelookup("cpld_update") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("isr4400v2_cpld_update"): prodname = product("isr4400v2") imagecode = imagelookup("cpld_update") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("asr1000-hw-programmables") or filename.startswith("asr1002x-hw-programmables") or filename == "ASR1K-fpga_prog.16.0.1.xe.bin"): prodname = product("asr1000") imagecode = imagelookup("hardware") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("asr1000rpx86-hw-programmables")): prodname = product("asr1000rpx86") imagecode = imagelookup("hardware") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("cat9k_iosxe") or filename.startswith( "cat9k_lite"): if filename.startswith("cat9k_iosxe"): prodname = product("cat9k") elif filename.startswith("cat9k_lite"): prodname = product("cat9k_lite") if prodname == "UNKNOWN": messageunknownfile() else: if filename.endswith("smu.bin"): imagecode = imagelookup("smu") fileproc_iosxe(debug1, filename, prodname, imagecode) else: imagecode = imagelookup(splitbydot[0]) fileproc_iosxe(debug1, filename, prodname, imagecode) elif filename.startswith("cat3k_caa"): prodname = product(splitbydash[0]) mdash = splitbydot[0].split("-") imagecode = imagelookup(mdash[1]) if (filename.startswith("cat3k_caa-universalk9.SPA") or filename.startswith("cat3k_caa-universalk9ldpe.SPA")): fileproc_iosxe_3(debug1, filename, prodname, imagecode) else: fileproc_iosxe(debug1, filename, prodname, imagecode) elif filename.startswith("cat4500es8"): mdash = splitbydot[0].split("-") prodname = product(mdash[0]) imagecode = imagelookup(mdash[1]) fileproc_iosxe_3(debug1, filename, prodname, imagecode) elif filename.startswith("ct5760"): mdash = splitbydot[0].split("-") prodname = product(mdash[0]) imagecode = imagelookup(mdash[1]) fileproc_iosxe_3(debug1, filename, prodname, imagecode) elif filename.startswith("WP76xx"): prodname = product("isrg4moduleslte") utilssingleprodname(debug1, filename, prodname) elif filename.endswith("comp_matrix.xml"): prodname = product("iosxeissumatrix") utilssingleprodname(debug1, filename, prodname) elif filename.startswith("cat4500e"): prodname = product(splitbydash[0]) mdash = splitbydot[0].split("-") imagecode = imagelookup(mdash[1]) if (filename.startswith("cat4500e-universalk9") or filename.startswith("cat4500e-universal") or filename.startswith("cat4500e-universalk9_lite") or filename.startswith("cat4500e-universal_lite")): fileproc_iosxe_3(debug1, filename, prodname, imagecode) else: fileproc_iosxe(debug1, filename, prodname, imagecode) elif filename.startswith("C9800-"): fileproccontroller(debug1, filename) elif filename.startswith("ie9k_"): if filename.startswith("ie9k_iosxe"): prodname = product("ie9k") imagecode = imagelookup("iosxe") workname = filename.replace("ie9k_iosxe.", "") workname = workname.replace(".SPA.bin", "") # utils_dev_imagecode_v2_vf (debug1,filename,prodname,imagecode,workname) utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif filename.startswith("c8000v"): if filename.startswith("c8000v-universalk9_16G_serial"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_16G_serial_efi"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_16G_vga"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_16G_vga_efi"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_8G_serial"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_8G_serial_efi"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_8G_vga"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_8G_vga_efi"): prodname = product("c8000v") imagecode = imagelookup("universalk9") elif filename.startswith("c8000v-universalk9_vga"): prodname = product("c8000v") imagecode = imagelookup("universalk9") splitbydot = filename.split(".") iosmain = util2digit(splitbydot[1], splitbydot[2]) iosfull = util3digit(splitbydot[1], splitbydot[2], splitbydot[3]) filepath = filepath4(prodname, iosmain, iosfull, imagecode) filemove(filepath, filename) else: if splitbydash[0] == "c1100": prodname = product("c1100router") else: prodname = product(splitbydash[0]) mdash = splitbydot[0].split("-") imagecode = imagelookup(mdash[1]) if prodname == "UNKNOWN": messageunknowndev() elif imagecode == "UNKNOWN": messageunknownfeat() else: fileproc_iosxe(debug1, filename, prodname, imagecode)
def file_proc_servers(filename, debug1): if debug1: print("\tModule#\t\tios_servers") if debug1: print("\tSubroutine#\tfile_proc_servers") if (filename == "B57BCMCD_v15.2.4.1.tgz" or filename == "B57CiscoCD_T6.4.4.3-57712.zip" or filename == "Intel_Windows_drv_MR_6.714.18.00_pv.zip" or filename == "LSI_x64_Signed_Driver_5.2.116.64.zip" or filename == "MR_WINDOWS_DRIVER-6.506.02.00-WHQL.zip" or filename == "intel9.2.3.1023.tar" or filename == "rste_4.5.0.1335_install.zip"): prodname = product("ucseseries") imagecode = imagelookup("driverseseries") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("DNAC") or filename.startswith("dnac"): prodname = product("dnac") if filename == "dnac1307_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.0.7" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename == "dnac1314_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.1.4" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename == "dnac1317_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.1.7" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename == "dnac1331_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.3.1" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename == "dnac1333_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.3.3" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename == "dnac1334_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.3.4" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename == "dnac1335_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.3.5" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename == "dnac1336_cisco_image_verification_key.pub": v2 = "1.3" vf = "1.3.3.6" prodpath = prodname + "/" + v2 + "/" + vf filemove(prodpath, filename) elif filename.startswith("DNAC-witness"): workname = filename.replace("DNAC-witness-", "") workname = workname.replace(".ova", "") imagecode = imagelookup("witness") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) else: workname = filename.replace("DNAC-SW-", "") workname = workname.replace("dnac", "") workname = workname.replace(".sig", "") workname = workname.replace(".iso", "") workname = workname.replace("_cisco_image_verification_key.pub", "") utils_dev_v2_vf(debug1, filename, prodname, workname) elif filename.startswith("ucs-catalog"): prodname = product("ucsgeneric") imagecode = imagelookup("catalog") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("pid-ctlg"): prodname = product("c2xxm3") imagecode = imagelookup("catalog") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("delnorte") or filename.startswith("delnorte2")): prodname = product("c2xxm4") imagecode = imagelookup("catalog") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("plumas1") or filename.startswith("plumas2") or filename.startswith("UCSC-C220-M5-") or filename.startswith("UCSC-C240-M5-")): prodname = product("c2xxm5") imagecode = imagelookup("catalog") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("Collector") or filename.startswith("collector") or filename == "JeOS_Patch_To_Enable_ASD.zip" or filename == "cspc28backupscript.zip"): prodname = product("cspc") utilssingleprodname(debug1, filename, prodname) elif (filename == "efi-obd-v12-07-18.diag" or filename == "efi-obd-v13-10-15.diag" or filename == "efi-obd-v13-7-3.diag"): prodname = product("ucseseries") imagecode = imagelookup("hdiag") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("ucs-cxx-diag")): prodname = product("ucscseries") imagecode = imagelookup("hdiag") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("ucs-cxxx-scu") or filename.startswith("ucs-cxx-scu")): prodname = product("ucscseries") imagecode = imagelookup("scu") workname = filename.replace("ucs-cxxx-scu-", "") workname = workname.replace("ucs-cxx-scu-", "") workname = workname.replace(".iso", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif (filename.startswith("ucs-blade-diags") or filename.startswith("ucs-blade-server-diags")): prodname = product("ucsbseries") imagecode = imagelookup("hdiag") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "huu-2.3.1.iso" or filename == "huu-2.3.2.iso" or filename == "huu-2.3.3.iso" or filename == "huu-2.4.1.iso" or filename == "huu-3.0.1.iso" or filename == "huu-3.1.1.iso" or filename == "huu_3.1.2.iso" or filename == "huu_3.1.3.iso" or filename == "huu_3.1.4.iso" or filename == "huu_3.2.6.v3.iso" or filename == "ucse-huu-2.1.1.iso" or filename == "ucs-e100-huu-2.2.1.iso"): prodname = product("ucseseries") imagecode = imagelookup("huu") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "DW_16MB_release_1029.bin" or filename == "DW_BIOS.bin.SPA" or filename == "DW_Signed_Bios_Image.bin.SPA" or filename == "1X0DBIOSv4.8" or filename == "1X0SBIOSv4.8" or filename == "Signed_EN_BIOS_1.5.0.4.bin.SPA" or filename.startswith("CIMC_") and filename.endswith(".bin") or filename == "Signed_DW_M1M2_BIOS_2.5.0.4.bin.SPA" or filename == "Signed_DW_M1M2_BIOS_2.5.0.5.bin.SPA" or filename == "Signed_DW_M1M2_BIOS_2.5.0.6.bin.SPA" or filename == "Signed_DW_M1M2_Bios_Image_041015.bin.SPA" or filename == "Signed_EN_BIOS_1.5.0.5.bin.SPA" or filename == "Signed_EN_BIOS_1.5.0.6.bin.SPA" or filename == "Signed_SW_M2_BIOS_1.5.0.6.bin.SPA" or filename == "Signed_SW_M2_BIOS_1.5.0.7.bin.SPA" or filename == "Signed_SW_M2_BIOS_1.5.0.8.bin.SPA" or filename == "Signed_SW_M2_Bios_1.5.0.5.bin.SPA" or filename == "UCSEDM3_BIOS_2.4.SPA" or filename == "UCSEDM3_BIOS_2.5.SPA" or filename == "UCSEDM3_BIOS_2.6.SPA" or filename == "UCSE_CIMC_2.3.1.bin" or filename == "UCSE_CIMC_2.3.2.bin" or filename == "UCSE_CIMC_2.3.3.bin" or filename == "UCSE_CIMC_2.3.5.bin" or filename == "update_pkg-Mar-22-MR-rebuild.bin" or filename == "update_pkg-ucse.combined.120808.bin" or filename == "update_pkg-ucse.combined.REL.2.2.2.bin" or filename == "update_pkg-ucse.combined.REL.2.2.1.bin" or filename == "update_pkg-ucse.combined.REL.bin" or filename == "SW_16MB_release_1102.bin" or filename == "SW_Signed_Bios_Image.bin.SPA"): prodname = product("ucseseries") imagecode = imagelookup("firmwareeseries") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "UCS_docs_20110510.iso"): prodname = product("ucsgeneric") imagecode = imagelookup("docs") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("ucs") or filename == "b2xx-m1-drivers-1.1.1j.iso" or filename == "c2xx-m1-utils-1.0.2.iso"): file_proc_servers_ucs(debug1, filename) elif (filename == "BashFix-update-0-x86_64.tar.gz" or filename == "Datacenter_Technology_Pack-1.0.53.ubf" or filename == "Datacenter_Technology_Pack_Update_1_Patch-1.0.58.ubf" or filename == "GlibcFix-pi22-update-0-x86_64.tar.gz" or filename == "PrimeInfra.pem" or filename == "ca_technology_package-2.1.0.0.41.ubf" or filename == "operations_center_pi_2_1_2_enable_update.ubf" or filename == "rhel-vulnerability-patch-pnp-2.2.0.14.tar.gz" or filename == "InstallerUpdateBE-1.0.5.tar.gz" or filename.startswith("CiscoPI") or filename.startswith("Device-Pack") or filename.startswith("PI") or filename.startswith("pi") or filename.startswith("PNP-GATEWAY-VM-") or filename.startswith("cisco-prime-pnp") or filename.startswith("pnp-") or filename.startswith("DnacPreCheckASSESMENTUbf")): file_proc_servers_primeinfra(debug1, filename) elif (filename.startswith("Cisco_ACI") or filename.startswith("acisim") or filename.startswith("aci-simulator") or filename.startswith("aci-apic") or filename.startswith("aci-msft-pkg") or filename.startswith("aci-n9000-dk9") or filename.startswith("apic-vrealize") or filename.startswith("esx-msc") or filename.startswith("msc") or filename.startswith("vcenter-plugin") or filename.startswith("tools-msc")): prodname = product("aci") file_proc_servers_aci(debug1, filename, prodname) elif (filename.startswith("storfs-packages") or filename.startswith("HX-ESXi") or filename.startswith("HX-Kubernetes") or filename.startswith("Cisco-HX-Data-Platform-Installer") or filename.startswith("cisco-HX-Data-Platform-Installer") or filename.startswith("HyperFlex-VC-HTML") or filename.startswith("hxcsi") or filename.startswith("HyperFlex-Witness-") or filename.startswith("HxClone-HyperV")): prodname = product("hyperflex") file_proc_servers_hyperflex(debug1, filename, prodname) elif (filename.startswith("DCNM") or filename.startswith("dcnm")): prodname = product("dcnm") file_proc_servers_dcnm(debug1, filename, prodname) elif filename == "readme_10.2.1.ST.1": prodname = product("dcnm") filepath = filepath3(prodname, "10.2", "10.2.1") filemove(filepath, filename) elif (filename.startswith("apic_em_update-apic-") or filename.startswith("APIC-EM-")): file_proc_servers_apicem(debug1, filename) else: messageunknownfile()
def file_proc_servers_ucs(debug1, filename): if debug1: print("\tSubroutine#\tfile_proc_servers_ucs") splitbydash = filename.split("-") if filename.startswith("ucs-utils"): prodname = product("ucsgeneric") imagecode = imagelookup("utils") elif (filename.startswith("ucs-drivers") or filename.startswith("ucs-b2xx-drivers") or filename.startswith("ucs-bxxx-drivers") or filename.startswith("ucs-c2xx-drivers") or filename.startswith("ucs-cxxx-drivers") or filename.startswith("ucs-cxxx-fw") or filename == "b2xx-m1-drivers-1.1.1j.iso"): if filename == "ucs-drivers.1.0.2.iso": prodname = product("ucsgeneric") imagecode = imagelookup("driversucsb") file_proc_servers_p2_d3(debug1, filename, prodname, imagecode) elif filename == "b2xx-m1-drivers-1.1.1j.iso": prodname = product("ucsgeneric") imagecode = imagelookup("driversucsc") file_proc_servers_p3_d3(filename, prodname, imagecode) elif filename.startswith("ucs-cxxx-drivers") or filename.startswith( "ucs-c2xx-drivers"): prodname = product("ucsgeneric") imagecode = imagelookup("driversucsc") file_proc_servers_p2_d3(debug1, filename, prodname, imagecode) elif filename.startswith("ucs-cxxx-fw"): prodname = product("ucsgeneric") imagecode = imagelookup("driversucsc") file_proc_servers_p2_d3(debug1, filename, prodname, imagecode) elif filename.startswith("ucs-bxxx-drivers"): prodname = product("ucsgeneric") imagecode = imagelookup("driversucsb") file_proc_servers_p2_d3(debug1, filename, prodname, imagecode) elif filename.startswith("ucs-b2xx-drivers"): prodname = product("ucsgeneric") imagecode = imagelookup("driversucsb") file_proc_servers_p2_d3(debug1, filename, prodname, imagecode) elif (filename.startswith("ucs_k9_bundle") or filename.startswith("ucs-k9-bundle") or filename.startswith("ucs-k9-bundle-b-series") or filename.startswith("ucs-k9-bundle-c-series") or filename.startswith("ucs-k9-bundle-infra") or filename.startswith("ucs-k9-bundle-m-series") or filename.startswith("ucs-mini-k9-bundle-infra") or filename.startswith("ucs-6300-k9-bundle-infra") or filename.startswith("ucs-6400-k9-bundle-infra")): prodname = product("ucsgeneric") imagecode = imagelookup("ucsbundle") file_proc_servers_p2_d3(debug1, filename, prodname, imagecode) elif (filename.startswith("ucs-b2xx-utils") or filename.startswith("ucs-bxxx-utils") or filename.startswith("ucs-c2xx-utils") or filename.startswith("ucs-cxxx-utils") or filename == "c2xx-m1-utils-1.0.2.iso"): if (filename.startswith("ucs-b2xx-utils-") and filename.endswith("-vmware.iso")): prodname = product("ucsgeneric") imagecode = imagelookup("utilsbseries") imagecode2 = imagelookup("vmware") file_proc_servers_p3_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename == "c2xx-m1-utils-1.0.2.iso"): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("ucs-b2xx-utils-") and filename.endswith("-windows.iso")): prodname = product("ucsgeneric") imagecode = imagelookup("utilsbseries") imagecode2 = imagelookup("windows") file_proc_servers_p3_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-b2xx-utils-") and filename.endswith("-linux.iso")): prodname = product("ucsgeneric") imagecode = imagelookup("utilsbseries") imagecode2 = imagelookup("ucslinux") file_proc_servers_p3_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-c2xx-utils-") and filename.endswith("-vmware.iso")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("vmware") file_proc_servers_p3_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-c2xx-utils-") and filename.endswith("-windows.iso")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("windows") file_proc_servers_p3_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-c2xx-utils-") and filename.endswith("-linux.iso")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("ucslinux") file_proc_servers_p3_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-c2xx-utils-") and filename.endswith("-efi.iso")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("efi") file_proc_servers_p3_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-bxxx-utils-vmware") or filename.startswith("ucs-b2xx-utils-vmware")): prodname = product("ucsgeneric") imagecode = imagelookup("utilsbseries") imagecode2 = imagelookup("vmware") file_proc_servers_p2_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-cxxx-utils-vmware") or filename.startswith("ucs-c2xx-utils-vmware")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("vmware") file_proc_servers_p2_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-bxxx-utils-windows") or filename.startswith("ucs-b2xx-utils-windows")): prodname = product("ucsgeneric") imagecode = imagelookup("utilsbseries") imagecode2 = imagelookup("windows") file_proc_servers_p2_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-cxxx-utils-windows") or filename.startswith("ucs-c2xx-utils-windows")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("windows") file_proc_servers_p2_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-bxxx-utils-linux") or filename.startswith("ucs-b2xx-utils-linux")): prodname = product("ucsgeneric") imagecode = imagelookup("utilsbseries") imagecode2 = imagelookup("ucslinux") file_proc_servers_p2_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-cxxx-utils-linux") or filename.startswith("ucs-c2xx-utils-linux")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("ucslinux") file_proc_servers_p2_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif (filename.startswith("ucs-cxxx-utils-efi") or filename.startswith("ucs-c2xx-utils-efi")): prodname = product("ucsgeneric") imagecode = imagelookup("utilscseries") imagecode2 = imagelookup("efi") file_proc_servers_p2_d3_utils(debug1, filename, prodname, imagecode, imagecode2) elif splitbydash[0] == "ucs" and splitbydash[2] == "huu": prodname = product(splitbydash[1]) imagecode = imagelookup(splitbydash[2]) file_proc_servers_p3_d3(debug1, filename, prodname, imagecode)
def file_proc_servers_primeinfra(debug1, filename): splitbydash = filename.split("-") if debug1: print("\tSubroutine#\tfile_proc_servers_primeinfra") prodname = product("cpi") if (filename == "PrimeInfra.pem" or filename == "PI_3_2_FIPS_Update_01-1.0.0.ubf" or filename == "PI-APL-3.2.50.0.70-1-K9.iso.signature" or filename == "PI-APL-3.2.50.0.70-1-K9.iso" or filename == "PI-VA-3.2.50.0.70.ova"): utilssinglemove(debug1, filename, prodname, "3.2-FIPS") elif (filename == "PI_1.4_0_45_Update_1-39.tar.gz" or filename == "PI_1_4_0_45-CSCui77571-2.tar.gz" or filename == "PI_1_4-CSCum71308-0.tar.gz" or filename == "PI-upgrade-bundle-1.4.0.45-2.tar.gz" or filename == "PI-VA-1.4.0.45-2-large.ova" or filename == "PI-VA-1.4.0.45-2-medium.ova" or filename == "PI-VA-1.4.0.45-2-small.ova" or filename == "PI-VA-1.4.0.45-2-xl.ova"): utilssinglemove(debug1, filename, prodname, "1.4") elif (filename == "pi_2.0device_packs_5-39.ubf" or filename == "PI_2_0-CSCum71308-0.tar.gz" or filename == "pi_update_2.0-3.zip" or filename == "PI-APL-2.0.0.0.294-2-K9.iso" or filename == "PI-Upgrade-2.0.0.0.294-2.tar.gz" or filename == "PI-VA-2.0.0.0.294-2-Express.ova" or filename == "PI-VA-2.0.0.0.294-2-Pro.ova" or filename == "PI-VA-2.0.0.0.294-2-Standard.ova" or filename == "PI-VA-2.0.0.0.294-Pro.ova" or filename == "PI-VA-2.0.0.0.294-Standard.ova"): utilssinglemove(debug1, filename, prodname, "2.0") elif (filename == "pi_2.1device_packs_5-45.ubf" or filename == "ca_technology_package-2.1.0.0.41.ubf" or filename == "operations_center_pi_2_1_2_enable_update.ubf" or filename == "pi_2.1device_packs_8-56.ubf" or filename == "pi212_20141118_01.ubf" or filename == "pi212_PIGEN_CSCur43834_01.ubf" or filename == "Datacenter_Technology_Pack-1.0.53.ubf" or filename == "Datacenter_Technology_Pack_Update_1_Patch-1.0.58.ubf" or filename == "PI-APL-2.1.0.0.87-1-K9.iso" or filename == "PI-Upgrade-2.1.0.0.87.tar.gz" or filename == "PI-VA-2.1.0.0.87-Express.ova" or filename == "PI-VA-2.1.0.0.87-Pro.ova" or filename == "PI-VA-2.1.0.0.87-Standard.ova"): utilssinglemove(debug1, filename, prodname, "2.1") elif (filename == "GlibcFix-pi22-update-0-x86_64.tar.gz" or filename == "pi_2.2_device-pack_10-72.ubf" or filename == "pi22_disable3des-1.ubf" or filename == "pi222_Update_04-3.ubf" or filename == "pi223_Update_06-8.ubf" or filename == "pi223-26.ubf" or filename == "PI-APL-2.2.0.0.158-1-K9.iso" or filename == "PI-UCS-APL-2.2.0.0.158-1-K9.iso" or filename == "PI-UCS-APL-2.2.0.0.158-1-K9-usb.img" or filename == "PI-VA-2.2.0.0.158.ova"): utilssinglemove(debug1, filename, prodname, "2.2") elif (filename == "PI-Upgrade-3.0.X_to_3.1.0.0.132.tar.gz" or filename == "PI-VA-3.1.0.0.132.ova" or filename == "Device-Pack-16-PI3.1-133.ubf" or filename == "PI_3_1_7_update_05-1.0.11.ubf" or filename == "PI_3_1_7-1.0.16.ubf" or filename == "PI-APL-3.1.0.0.132-1-K9.iso" or filename == "PI_3_1_7-1.0.16.ubf" or filename == "PI_3_1_7-1.0.16.ubf"): utilssinglemove(debug1, filename, prodname, "3.1") elif (filename == "Device-Pack-4-PI3.2-12.ubf" or filename == "PI_3_2_2-1.0.13.ubf" or filename == "PI_3_2_2_update_05-1.0.5.ubf" or filename == "PI-VA-3.2.0.0.258.ova" or filename == "PI-APL-3.2.0.0.258-1-K9.iso.signature" or filename == "PI-APL-3.2.0.0.258-1-K9.iso" or filename == "PI-Upgrade-3.X_to_3.2.0.0.258.tar.gz" or filename == "CiscoPI3.2.pem" or filename == "InstallerUpdateBE-1.0.5.tar.gz"): utilssinglemove(debug1, filename, prodname, "3.2") elif (filename == "PI-Upgrade-3.3.0.0.342.tar.gz" or filename == "PI-APL-3.3.0.0.342-1-K9.iso" or filename == "PI-VA-3.3.0.0.342.ova" or filename == "PI-APL-3.3.0.0.342-1-K9.iso.signature" or filename == "CiscoPI3.3.pem" or filename == "PI_3_3_1-1.0.15.ubf" or filename == "PI_3_3_1_update_04-1.0.4.ubf" or filename == "PI_3_3_1_update_04-1.0.5.ubf" or filename == "Device-Pack-4-Update-03-PI3.3-2.ubf" or filename == "Device-Pack-4-PI3.3-11.ubf"): utilssinglemove(debug1, filename, prodname, "3.3") elif (filename == "PI_3_4_2_Update_01-1.0.2.ubf" or filename == "PI_3_4_2-1.0.23.ubf" or filename == "PI_3_4_1_Update_02-1.0.9.ubf" or filename == "PI_3_4_1-1.0.27.ubf" or filename == "PI-VA-3.4.0.0.348.ova" or filename == "PI-APL-3.4.0.0.348-1-K9.iso" or filename == "CiscoPI3.4.pem" or filename == "PI_BUNDLE-3.4.0.0.348-Upgrade.tar.gz" or filename == "PI-APL-3.4.0.0.348-1-K9.iso.signature" or filename == "Device-Pack-2-PI3.4-07.ubf" or filename == "Device-Pack-4-PI3.4-11.ubf" or filename == "Device-Pack-9-PI3.4-09.ubf" or filename == "Device-Pack-11-PI3.4-09.ubf"): utilssinglemove(debug1, filename, prodname, "3.4") elif (filename == "PI-Upgrade-3.X_to_3.5.0.0.550.tar.gz" or filename == "PI-APL-3.5.0.0.550-1-K9.iso.signature" or filename == "PI_3_5_Update_01-1.0.10.ubf" or filename == "PI-APL-3.5.0.0.550-1-K9.iso" or filename == "CiscoPI3.5.pem" or filename == "PI-VA-3.5.0.0.550.ova" or filename == "PI_3_5_1-1.0.22.ubf" or filename == "PI_3_5_1_Security_Update_02_Part_02of02-1.0.7.ubf" or filename == "PI_3_5_1_Security_Update_02_Part_01of02-1.0.4.ubf" or filename == "PI_3_5_1_Update_02-1.0.21.ubf" or filename == "Device-Pack-1-PI3.5-29.ubf" or filename == "Device-Pack-4-PI3.5-21.ubf" or filename == "DnacPreCheckASSESMENTUbf_3_5-1.0.3.ubf"): utilssinglemove(debug1, filename, prodname, "3.5") elif (filename == "Device-Pack-1-PI3.6-13.ubf" or filename == "PI_3_6_Update_03-1.0.2.ubf" or filename == "PI-VA-3.6.0.0.172.ova" or filename == "PI-Upgrade-3.4_to_3.6.0.0.172.tar.gz" or filename == "PI-APL-3.6.0.0.172-1-K9.iso.signature" or filename == "PI-APL-3.6.0.0.172-1-K9.iso" or filename == "CiscoPI3.6.pem" or filename == "PI-Upgrade-3.5_to_3.6.0.0.172.tar.gz" or filename == "DnacPreCheckASSESMENTUbf_3_6-1.0.5.ubf"): utilssinglemove(debug1, filename, prodname, "3.6") elif (filename == "Device-Pack-2-PI3.7-17.ubf" or filename == "PI_3_7_1_Update_04-1.0.4.ubf" or filename == "PI_3_7_1-1.0.36.ubf" or filename == "PI_3_7_Update_03-1.0.2.ubf" or filename == "PI-VA-3.7.0.0.159.ova" or filename == "PI-Upgrade-31x_32x_33x_34x_to_3.7.0.0.159.tar.gz" or filename == "PI-Upgrade-35x_36x_to_3.7.0.0.159.tar.gz" or filename == "CiscoPI3.7.pem" or filename == "PI-APL-3.7.0.0.159-1-K9.iso.signature" or filename == "PI-APL-3.7.0.0.159-1-K9.iso" or filename == "DnacPreCheckASSESMENTUbf_3_7-1.0.4.ubf"): utilssinglemove(debug1, filename, prodname, "3.7") elif (filename == "Device-Pack-1-PI3.8-22.ubf" or filename == "PI_3_8_1-1.0.26.ubf" or filename == "PI_3_8_Update_02-1.0.15.ubf" or filename == "PI-APL-3.8.0.0.310-1-K9.iso" or filename == "PI-APL-3.8.0.0.310-1-K9.iso.signature" or filename == "CiscoPI3.8.pem" or filename == "PI-VA-3.8.0.0.310.ova" or filename == "PI-Upgrade-36x_37x_to_3.8.0.0.310.tar.gz" or filename == "DnacPreCheckASSESMENTUbf_3_8-1.0.3.ubf"): utilssinglemove(debug1, filename, prodname, "3.8") elif (filename == "PI_3_9_Oct_Oracle_patch-1.0.8.ubf" or filename == "PI-APL-3.9.0.0.219-1-K9.iso" or filename == "PI-APL-3.9.0.0.219-1-K9.iso.signature" or filename == "CiscoPI3.9.pem" or filename == "PI-Upgrade-37x_38x_to_3.9.0.0.219.tar.gz" or filename == "PI-VA-3.9.0.0.219.ova" or filename == "DnacPreCheckASSESMENTUbf_3_9-1.0.5.ubf"): utilssinglemove(debug1, filename, prodname, "3.9") elif (filename == "PNP-GATEWAY-VM-2.2.0.15.ova" or filename == "pnp-kickstart-2.2.0.15-K9.iso" or filename == "pnp-packaging-2.2.0.15.tar.gz"): utilssinglemove(debug1, filename, prodname, "PNP/3.1") elif (filename == "PNP-GATEWAY-VM-2.0.0.28.ova" or filename == "pnp-packaging-2.0.0.30.tar.gz" or filename == "pnp-gateway-patch-2.0.0.28.tar.gz" or filename == "cisco-prime-pnp-app-k9-2.0.0.28.zip"): utilssinglemove(debug1, filename, prodname, "PNP/2.0") elif (filename == "PNP-GATEWAY-VM-2.2.0.9.ova" or filename == "pnp-packaging-2.2.0.10.tar.gz" or filename == "pnp-packaging-2.2.0.9.tar.gz" or filename == "rhel-vulnerability-patch-pnp-2.2.0.14.tar.gz"): utilssinglemove(debug1, filename, prodname, "PNP/2.2") elif (filename == "pnp-kickstart-2.2.0.14-K9.iso" or filename == "pnp-packaging-2.2.0.14.tar.gz"): utilssinglemove(debug1, filename, prodname, "PNP/2.2") elif (filename == "cisco-prime-pnp-app-k9-2.0.1.2.zip"): utilssinglemove(debug1, filename, prodname, "PNP/3.0-3.1") else: utilssingleprodname(debug1, filename, prodname)
def fileprocessornxos(filename, debug1): if debug1: print("\tModule#\t\tios_nexus") if debug1: print("\tSubroutine#\tfileprocessornxos") splitbydash = filename.split("-") splitbydot = filename.split(".") if (filename.startswith("ssd_c400_upgrade") or filename == "upgrade_m500_firmware.tar.gz"): prodname = product("nxos") imagecode = imagelookup("firmware") utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "n9000-epld-secure-boot-update.img": prodname = product("nxos") imagecode = imagelookup("epld") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "poap_script.py" or filename == "poap_script.tcl"): prodname = product("n3500") imagecode = imagelookup("poap") utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "L2-L3_CT.zip": prodname = product("n1000v") imagecode = imagelookup("l2l3cvt") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "nxos-n3kbios.bin" or filename == "n3k_bios_release_rn.pdf"): prodname = product("n3000") imagecode = imagelookup("bios") utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "nxos.9.3.4-capacity-emulator.tgz": prodname = product("nxos") imagecode = imagelookup("capacity-emulator") workname = filename.replace("-capacity-emulator.tgz", "") workname = workname.replace("nxos.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename == "ntp-1.0.1-7.0.3.I2.2d.lib32_n9000.rpm": prodname = product("nxos") imagecode = imagelookup("smu") imagecode = imagecode + "/7.0/7.0.3.I2.2d/NTP" utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "ntp-1.0.1-7.0.3.I2.2e.lib32_n9000.rpm": prodname = product("nxos") imagecode = imagelookup("smu") imagecode = imagecode + "/7.0/7.0.3.I2.2e/NTP" utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "ntp-1.0.2-7.0.3.I2.2e.lib32_n9000.rpm": prodname = product("nxos") imagecode = imagelookup("smu") imagecode = imagecode + "/7.0/7.0.3.I2.2e/NTP" utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "nxos.nsqos_lc_tor-n9k_TOR-1.0.0-7.0.3.I2.2e.lib32_n9000.rpm": prodname = product("nxos") imagecode = imagelookup("smu") imagecode = imagecode + "/7.0/7.0.3.I2.2e/QoS" utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "nxos.nsqos_sup_tor-n9k_TOR-1.0.0-7.0.3.I2.2e.lib32_n9000.rpm": prodname = product("nxos") imagecode = imagelookup("smu") imagecode = imagecode + "/7.0/7.0.3.I2.2e/QoS" utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "snmp-1.0.1-7.0.3.I2.2e.lib32_n9000.rpm": prodname = product("nxos") imagecode = imagelookup("smu") imagecode = imagecode + "/7.0/7.0.3.I2.2e/SNMP" utilssinglemove(debug1, filename, prodname, imagecode) elif filename == "vxlan-2.0.1.0-9.2.3.lib32_n9000.rpm": prodname = product("nxos") imagecode = imagelookup("smu") imagecode = imagecode + "/9.2/9.2.3/VXLAN" utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("n6000_poap_script"): prodname = product("n6000") imagecode = imagelookup("poap") utilssinglemove(debug1, filename, prodname, imagecode) elif filename.startswith("poap_ng"): prodname = product("Nexus") imagecode = imagelookup("poap_ng") workname = filename.replace(".py", "") workname = workname.replace("poap_ng.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif (filename.startswith("Nexus1000v") or filename.startswith("Nexus1000V")): prodname = product("n1000v") fileprocnxos1000v(debug1, filename, prodname) elif splitbydot[0] == "n9000-epld": prodname = product("nxos") imagecode = imagelookup("epld") if splitbydot[1] == "6" or splitbydot[1] == "7": fileprocnxosfivedigit(filename, prodname, imagecode, debug1) else: fileprocnxosthreedigit(filename, prodname, imagecode, debug1) elif splitbydot[0] == "n9000-dk9": prodname = product("n9000") if splitbydot[1] == "6" or splitbydot[1] == "7": if splitbydot[6].startswith("CSC"): imagecode = imagelookup("smu") fileprocnxosfivedigit(filename, prodname, imagecode, debug1) else: imagecode = imagelookup("system") fileprocnxosfivedigit(filename, prodname, imagecode, debug1) elif splitbydot[0] == "n7000-s1-epld" or splitbydot[0] == "n7000-s2-epld": prodname = product("n7000") imagecode = imagelookup("epld") if splitbydot[1] == "7": fileprocnxosfivedigit(filename, prodname, imagecode, debug1) else: fileprocnxosthreedigit(filename, prodname, imagecode, debug1) elif (splitbydot[0] == "nxos" or splitbydot[0] == "nxos64"): prodname = product("nxos") if len(splitbydot) == 5: imagecode = imagelookup("system") fileprocnxosthreedigit(filename, prodname, imagecode, debug1) elif len(splitbydot) == 6: imagecode = imagelookup("system") fileprocnxosthreedigit(filename, prodname, imagecode, debug1) elif len(splitbydot) == 7: imagecode = imagelookup("system") fileprocnxosfivedigit(filename, prodname, imagecode, debug1) elif len(splitbydot) == 7: imagecode = imagelookup("system") fileprocnxosfivedigit(filename, prodname, imagecode, debug1) elif splitbydot[1].startswith("CSC"): imagecode = imagelookup("smu") fileprocessornxos9ksmu(filename, prodname, imagecode, debug1) elif splitbydash[0] == "n6000": prodname = product(splitbydash[0]) if splitbydot[0] == "n6000-uk9-kickstart": imagecode = imagelookup("kickstart") fileprocnxosfivedigit(filename, prodname, imagecode, debug1) elif splitbydot[0] == "n6000-uk9": imagecode = imagelookup("system") fileprocnxosfivedigit(filename, prodname, imagecode, debug1) elif splitbydash[0] == "n7000": prodname = product(splitbydash[0]) if splitbydash[1] == "s1": imagecode = imagelookup("s1") nexus7ksliceandice(filename, prodname, imagecode, debug1) elif splitbydash[1] == "s2": imagecode = imagelookup("s2") nexus7ksliceandice(filename, prodname, imagecode, debug1) elif splitbydash[0] == "n7700": prodname = product(splitbydash[0]) if splitbydash[1] == "s2": imagecode = imagelookup("s2") nexus7ksliceandice(filename, prodname, imagecode, debug1) elif splitbydash[1] == "s3": imagecode = imagelookup("s3") nexus7ksliceandice(filename, prodname, imagecode, debug1) elif filename.startswith("n3000"): prodname = product("n3000") if filename.startswith("n3000-uk9-kickstart."): imagecode = imagelookup("kickstart") workname = filename.replace(".bin", "") workname = workname.replace("n3000-uk9-kickstart.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif filename.startswith("n3000-compact"): imagecode = imagelookup("system") workname = filename.replace(".bin", "") workname = workname.replace("n3000-compact.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif filename.startswith("n3000_xsd."): imagecode = imagelookup("xsd") workname = filename.replace(".tar.gz", "") workname = workname.replace("n3000_xsd.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) else: imagecode = imagelookup("system") workname = filename.replace(".bin", "") workname = workname.replace("n3000-uk9.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif filename.startswith("guestshell"): prodname = product("Nexus") imagecode = imagelookup("guestshell") workname = filename.replace(".ova", "") workname = workname.replace("guestshell.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("oac"): prodname = product("Nexus") imagecode = imagelookup("oac") workname = filename.replace(".ova", "") workname = workname.replace("oac.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif (filename.startswith("nxosv-final") or filename.startswith("nxosv") or filename.startswith("nexus9300v") or filename.startswith("nexus9500v")): prodname = product("nxosv") imagecode = imagelookup("system") workname = filename.replace(".box", "") workname = workname.replace(".ova", "") workname = workname.replace(".qcow2", "") workname = workname.replace(".vmdk", "") workname = workname.replace("nxosv-final.", "") workname = workname.replace("nxosv.", "") workname = workname.replace("nexus9300v.", "") workname = workname.replace("nexus9500v64.", "") workname = workname.replace("nexus9500v.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif (filename.startswith("n3500") or filename.startswith("poap_script.6") or filename.startswith("poap_script_n3k.")): prodname = product("n3500") if filename.startswith("n3500-uk9-kickstart."): imagecode = imagelookup("kickstart") workname = filename.replace(".bin", "") workname = workname.replace("n3500-uk9-kickstart.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif (filename.startswith("poap_script.") or filename.startswith("poap_script_n3k.")): imagecode = imagelookup("poap") workname = filename.replace(".py", "") workname = workname.replace(".tcl", "") workname = workname.replace("poap_script_n3k.", "") workname = workname.replace("poap_script.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) else: imagecode = imagelookup("system") workname = filename.replace(".bin", "") workname = workname.replace("n3500-uk9.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif splitbydash[0] == "n4000": prodname = product("n4000") workname = filename.replace(".bin", "") workname = workname.replace("n4000-bk9-kickstart.", "") workname = workname.replace("n4000-bk9.", "") if filename.startswith("n4000-bk9-kickstart."): imagecode = imagelookup("kickstart") else: imagecode = imagelookup("system") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif (filename.startswith("n5000") or filename.startswith("poap_script")): prodname = product("n5000") if filename.startswith("n5000-uk9-kickstart."): imagecode = imagelookup("kickstart") workname = filename.replace(".bin", "") workname = workname.replace("n5000-uk9-kickstart.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif (filename.startswith("n5000_poap_script.") or filename.startswith("poap_script.")): imagecode = imagelookup("poap") workname = filename.replace(".py", "") workname = workname.replace(".tcl", "") workname = workname.replace("n5000_poap_script.", "") workname = workname.replace("poap_script.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("n5000_xsd."): imagecode = imagelookup("xsd") workname = filename.replace(".tar.gz", "") workname = workname.replace("n5000_xsd.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) else: imagecode = imagelookup("system") workname = filename.replace(".bin", "") workname = workname.replace("n5000-uk9.", "") utils_dev_v2_vf_imagecode(debug1, filename, prodname, imagecode, workname) elif (splitbydash[0] == "m9000" or splitbydash[0] == "m9500"): prodname = product("m9500") if filename.startswith("m9000-pkg1.") and filename.endswith(".epld"): imagecode = imagelookup("epld") workname = filename.replace(".epld", "") workname = workname.replace("m9000-pkg1.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9000-epld-") and filename.endswith(".img"): imagecode = imagelookup("epld") workname = filename.replace(".img", "") workname = workname.replace("m9000-epld-", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9000-ek9-ssi-mz.") and filename.endswith( ".bin"): imagecode = imagelookup("ssi") workname = filename.replace(".bin", "") workname = workname.replace("m9000-ek9-ssi-mz.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9500-sf1ek9-kickstart-mz."): imagecode = imagelookup("s1ek9") workname = filename.replace(".bin", "") workname = workname.replace("m9500-sf1ek9-kickstart-mz.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9500-sf1ek9-mz."): imagecode = imagelookup("s1ek9") workname = filename.replace(".bin", "") workname = workname.replace("m9500-sf1ek9-mz.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9500-sf2ek9-kickstart-mz."): imagecode = imagelookup("s2ek9") workname = filename.replace(".bin", "") workname = workname.replace("m9500-sf2ek9-kickstart-mz.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9500-sf2ek9-mz."): imagecode = imagelookup("s2ek9") workname = filename.replace(".bin", "") workname = workname.replace("m9500-sf2ek9-mz.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9000-cd-npe-"): imagecode = imagelookup("fabman") workname = filename.replace(".zip", "") workname = workname.replace("m9000-cd-npe-", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9000-cd-"): imagecode = imagelookup("fabman") workname = filename.replace(".zip", "") workname = workname.replace("m9000-cd-", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9000-fm-update-"): imagecode = imagelookup("fabman") workname = filename.replace(".jar", "") workname = workname.replace("m9000-fm-update-", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9000-fm-"): imagecode = imagelookup("fabman") workname = filename.replace(".jar", "") workname = workname.replace("m9000-fm-", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif filename.startswith("m9000-sha-"): imagecode = imagelookup("fabman") workname = filename.replace(".npe.jar", "") workname = workname.replace("m9000-sha-", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif splitbydash[0] == "m9100": prodname = product("m9100") workname = filename.replace(".bin", "") workname = workname.replace("m9100-", "") if workname.startswith("s1ek9-"): imagecode = imagelookup("s1ek9") workname = workname.replace("s1ek9-", "") elif workname.startswith("s2ek9-"): imagecode = imagelookup("s2ek9") workname = workname.replace("s2ek9-", "") elif workname.startswith("s3ek9-"): imagecode = imagelookup("s3ek9") workname = workname.replace("s3ek9-", "") elif workname.startswith("s5ek9-"): imagecode = imagelookup("s5ek9") workname = workname.replace("s5ek9-", "") else: messageunknowndev() workname = workname.replace("kickstart-mz.", "") workname = workname.replace("kickstart-mz-npe.", "") workname = workname.replace("mz.", "") workname = workname.replace("mz-npe.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif splitbydash[0] == "m9200": prodname = product("m9200") workname = filename.replace(".bin", "") workname = workname.replace("m9200-", "") if workname.startswith("s1ek9-"): imagecode = imagelookup("s1ek9") workname = workname.replace("s1ek9-", "") elif workname.startswith("s2ek9-"): imagecode = imagelookup("s2ek9") workname = workname.replace("s2ek9-", "") elif workname.startswith("s3ek9-"): imagecode = imagelookup("s3ek9") workname = workname.replace("s3ek9-", "") elif workname.startswith("s5ek9-"): imagecode = imagelookup("s5ek9") workname = workname.replace("s5ek9-", "") else: messageunknowndev() workname = workname.replace("kickstart-mz.", "") workname = workname.replace("kickstart-mz-npe.", "") workname = workname.replace("mz.", "") workname = workname.replace("mz-npe.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif splitbydash[0] == "m9250": prodname = product("m9250") workname = filename.replace(".bin", "") workname = workname.replace("m9250-", "") if workname.startswith("s5ek9-"): imagecode = imagelookup("s5ek9") workname = workname.replace("s5ek9-", "") else: messageunknowndev() workname = workname.replace("kickstart-mz.", "") workname = workname.replace("kickstart-mz-npe.", "") workname = workname.replace("mz.", "") workname = workname.replace("mz-npe.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) elif splitbydash[0] == "m9700": prodname = product("m9700") workname = filename.replace(".bin", "") workname = workname.replace("m9700-", "") if workname.startswith("s3ek9-"): imagecode = imagelookup("s3ek9") workname = workname.replace("s3ek9-", "") elif workname.startswith("s4ek9-"): imagecode = imagelookup("s4ek9") workname = workname.replace("s4ek9-", "") else: messageunknowndev() workname = workname.replace("kickstart-mz.", "") workname = workname.replace("kickstart-mz-npe.", "") workname = workname.replace("mz.", "") workname = workname.replace("mz-npe.", "") utils_dev_imagecode_v2_vf(debug1, filename, prodname, imagecode, workname) else: messageunknownfile()
def fileprocphone(debug1, filename): if filename.startswith("cmterm-3905"): prodname = product("ipp3905") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-3905.", "") file_proc_phone_noimage(debug1, filename, prodname, workname) elif filename.startswith("cmterm-7911_7906-sccp"): prodname = product("ipp7911_7906") imagecode = imagelookup("sccp") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7911_7906-sip"): prodname = product("ipp7911_7906") imagecode = imagelookup("sip") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7914-sccp"): prodname = product("ipp7914") imagecode = imagelookup("sccp") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7914-sip"): prodname = product("ipp7914") imagecode = imagelookup("sip") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7915"): prodname = product("ipp7915") fileprocphone3digit(debug1, filename, prodname) elif filename.startswith("cmterm-7916"): prodname = product("ipp7916") fileprocphone3digit(debug1, filename, prodname) elif filename.startswith("cmterm-7921-sccp"): prodname = product("ipp7921") imagecode = imagelookup("sccp") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7921-sip"): prodname = product("ipp7921") imagecode = imagelookup("sip") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7931-sccp"): prodname = product("ipp7931") imagecode = imagelookup("sccp") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7931-sip"): prodname = product("ipp7931") imagecode = imagelookup("sip") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7940_7960-sccp"): prodname = product("ipp7940_7960") imagecode = imagelookup("sccp") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7940_7960-sip"): prodname = product("ipp7940_7960") imagecode = imagelookup("sip") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7940-7960"): prodname = product("ipp7940_7960") fileprocphone3digittwo(debug1, filename, prodname) elif filename.startswith("cmterm-7941_7961-sccp"): prodname = product("ipp7941_7961") imagecode = imagelookup("sccp") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7941_7961-sip"): prodname = product("ipp7941_7961") imagecode = imagelookup("sip") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7942_7962-sccp"): prodname = product("ipp7942_7962") imagecode = imagelookup("sccp") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7942_7962-sip"): prodname = product("ipp7942_7962") imagecode = imagelookup("sip") fileprocphone3digittype(debug1, filename, prodname, imagecode) elif filename.startswith("cmterm-7970_7971-sccp"): prodname = product("ipp7970_7971") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7970_7971-sccp.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7970_7971-sip"): prodname = product("ipp7970_7971") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7970_7971-sip.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7975-sccp"): prodname = product("ipp7975") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7975-sccp.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7975-sip"): prodname = product("ipp7975") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7975-sip.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-8845_65-sip"): prodname = product("ipp8845_65") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-8845_65-sip.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-8845_65"): prodname = product("ipp8845_65") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-8845_65.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7937-sccp"): prodname = product("ipp7937") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7937-sccp.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7937-QED"): prodname = product("ipp7937") imagecode = imagelookup("qed") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7937-QED-", "") workname = workname.replace("-SCCP", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7937-"): prodname = product("ipp7937") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7937-", "") workname = workname.replace("-SCCP", "") workname = workname.replace("-sccp", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7945_7965-sccp"): prodname = product("ipp7945_7965") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7945_7965-sccp.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-7945_7965-sip"): prodname = product("ipp7945_7965") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-7945_7965-sip.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-894x-sccp"): prodname = product("ipp894x") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-894x-sccp.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-8941_8945-sccp"): prodname = product("ipp894x") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-8941_8945-sccp.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-894x-sip"): prodname = product("ipp894x") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-894x-sip.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-8941_8945-sip"): prodname = product("ipp894x") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-8941_8945-sip.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-SIP8941_8945."): prodname = product("ipp894x") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-SIP8941_8945.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-SIP894x"): prodname = product("ipp894x") imagecode = imagelookup("sip") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-SIP894x.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-SCCP894x."): prodname = product("ipp894x") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-SCCP894x.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-SCCP8941_8945."): prodname = product("ipp894x") imagecode = imagelookup("sccp") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-SCCP8941_8945.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-ata187-qed."): prodname = product("ata187") imagecode = imagelookup("qed") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-ata187-qed.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-ata187."): prodname = product("ata187") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-ata187.", "") file_proc_phone_noimage(debug1, filename, prodname, workname) elif filename.startswith("cmterm-ata190-qed."): prodname = product("ata190") imagecode = imagelookup("qed") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-ata190-qed.", "") file_proc_phone_dash(debug1, filename, prodname, imagecode, workname) elif filename.startswith("cmterm-ata190."): prodname = product("ata187") imagecode = imagelookup("qed") workname = file_proc_strip(debug1, filename) workname = workname.replace("cmterm-ata190.", "") file_proc_phone_noimage(debug1, filename, prodname, workname) else: messageunknownfile()
def iosxr_asr9k(debug1, filename): if debug1: print("\tSubroutine#\tiosxr_asr9k") prodname = product("asr9k") if (filename.startswith("ASR9K-iosxr-px") and filename.endswith("turboboot.tar") or filename.startswith("ASR9K-iosxr-px") and filename.endswith("Turboboot.tar")): imagecode = imagelookup("turboboot") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif (filename.startswith("ASR9K-iosxr-px") and filename.endswith("bridge_smus.tar") or filename.startswith("ASR9k-iosxr-px") and filename.endswith("bridge_smus.tar")): imagecode = imagelookup("bridge_smus") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif (filename.startswith("ASR9K-iosxr-") and filename.endswith("bridge_smus.tar")): imagecode = imagelookup("bridge_smus") iosxr_tab2_ver3(debug1, filename, prodname, imagecode) elif (filename.startswith("ASR9K-px-docs-") or filename.startswith("ASR9K-x64-docs")): imagecode = imagelookup("docs") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif (filename.startswith("asr9k-") and filename.endswith("sp-1.0.0.tar") or filename.startswith("asr9k-") and filename.endswith("sp1.tar") or filename.startswith("asr9k-") and filename.endswith("sp2.tar") or filename.startswith("asr9k-") and filename.endswith("sp3.tar") or filename.startswith("asr9k-") and filename.endswith("sp4.tar") or filename.startswith("asr9k-") and filename.endswith("sp5.tar") or filename.startswith("asr9k-") and filename.endswith("sp6.tar") or filename.startswith("asr9k-") and filename.endswith("sp7.tar") or filename.startswith("asr9k-") and filename.endswith("sp8.tar") or filename.startswith("asr9k-") and filename.endswith("sp9.tar") or filename.startswith("asr9k-") and filename.endswith("sp10.tar") or filename.startswith("asr9k-") and filename.endswith("sp11.tar") or filename.startswith("asr9k-") and filename.endswith("sp12.tar")): iosxr_service_pack(debug1, filename, prodname) elif filename.startswith("asr9k-mini-x64-migrate_to_eXR.tar"): imagecode = imagelookup("migrate_to_eXR") iosxr_tab4_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-mini-x64-migrate_to_eXR"): imagecode = imagelookup("migrate_to_eXR") iosxr_dot1_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-full-x64-migrate_to_eXR.tar"): imagecode = imagelookup("migrate_to_eXR") iosxr_dot1_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-mini-x64-"): imagecode = imagelookup("mini-x64") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-vsm-cgv6"): imagecode = imagelookup("cgv6") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9K-x64-iosxr-px-k9"): imagecode = imagelookup("core64k9") iosxr_tab5_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9K-x64-iosxr-px"): imagecode = imagelookup("core64") iosxr_tab4_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9K-iosxr-px-k9"): imagecode = imagelookup("corek9") iosxr_tab4_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9K-iosxr-p-k9"): imagecode = imagelookup("corek9") iosxr_tab4_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9K-iosxr-px-"): imagecode = imagelookup("core") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9K-iosxr-p-"): imagecode = imagelookup("core") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9000-iosxr-k9"): imagecode = imagelookup("corek9") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("ASR9K-iosxr-k9"): imagecode = imagelookup("corek9") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-ncs500x-nV-px"): imagecode = imagelookup("nvsat") iosxr_tab4_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-9000v-nV-x64"): imagecode = imagelookup("nvsat") iosxr_nv_x64(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-x64-usb_boot"): imagecode = imagelookup("usb_boot") iosxr_tab3_ver3(debug1, filename, prodname, imagecode) elif filename.startswith("asr9k-goldenk9-x64-"): imagecode = imagelookup("goldenk9") iosxr_tab3_ver3(debug1, filename, prodname, imagecode)
def fileprocessor_wireless(debug1, filename): if debug1: print("\tModule#\t\tios_wireless") if debug1: print("\tSubroutine#\tfileprocessor_wireless") if (filename.startswith("AIR_CTVM_LARGE-K9_") or filename.startswith("AIR_CTVM_LARGE_") or filename.startswith("MFG_CTVM_SMALL_") or filename.startswith("AIR_CTVM-K9_") or filename.startswith("MFG_CTVM_")): prodname = product("CTVM") wireless_controller_virtual(debug1, filename, prodname) elif (filename.startswith("AIR-AP1815-K9-ME-")): prodname = product("AP1815") workname = filename.replace(".tar", "") workname = workname.replace(".zip", "") workname = workname.replace(".aes", "") workname = workname.replace("AIR-AP1815-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP1830-K9-")): newname = filename.split(".") prodname = product("AP1830") workname = filename.replace(".tar", "") workname = workname.replace(".zip", "") workname = workname.replace(".aes", "") workname = workname.replace("AIR-AP1830-K9-", "") if len(newname) > 2: wireless_all_dash_dot(debug1, filename, prodname, workname) else: wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP1850-K9-")): newname = filename.split(".") prodname = product("AP1850") workname = filename.replace(".tar", "") workname = workname.replace(".zip", "") workname = workname.replace(".aes", "") workname = workname.replace("AIR-AP1850-K9-", "") if len(newname) > 2: wireless_all_dash_dot(debug1, filename, prodname, workname) else: wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("SWISMK9-")): prodname = product("SWISMK9") workname = filename.replace(".tar", "") workname = workname.replace(".zip", "") workname = workname.replace(".aes", "") workname = workname.replace("SWISMK9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("SWLC3750K9-")): prodname = product("SWLC3750K9") workname = filename.replace(".tar", "") workname = workname.replace(".zip", "") workname = workname.replace(".aes", "") workname = workname.replace("SWLC3750K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT5500-K9-")): prodname = product("CT5500") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT5500-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT5500-LDPE-K9-")): prodname = product("CT5500") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT5500-LDPE-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CTVM-")): prodname = product("CTVM") workname = filename.replace(".aes", "") workname = workname.replace(".ova", "") workname = workname.replace("AIR-CTVM-K9-", "") workname = workname.replace("AIR-CTVM-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT2500-K9-")): prodname = product("CT2500") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT2500-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WLC4400-K9-")): prodname = product("WLC4400") workname = filename.replace(".aes", "") workname = workname.replace("AIR-WLC4400-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WLC4100-K9-")): prodname = product("WLC4100") workname = filename.replace(".aes", "") workname = workname.replace("AIR-WLC4100-K9-", "") newname = filename.split(".") if len(newname) > 2: wireless_all_dash_dot(debug1, filename, prodname, workname) else: wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WLC2100-K9-")): prodname = product("WLC2100") workname = filename.replace(".aes", "") workname = workname.replace("AIR-WLC2100-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WLC2006-K9-")): prodname = product("WLC2006") workname = filename.replace(".aes", "") workname = workname.replace("AIR-WLC2006-K9-", "") newname = filename.split(".") if len(newname) > 2: wireless_all_dash_dot(debug1, filename, prodname, workname) else: wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT5520-K9-")): prodname = product("CT5520") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT5520-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT3504-K9-")): prodname = product("CT3504") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT3504-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT7500-K9-")): prodname = product("CT7500") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT7500-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT8500-K9-")): prodname = product("CT8500") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT8500-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WLCM-K9-")): prodname = product("WLCM") workname = filename.replace(".aes", "") workname = workname.replace("AIR-WLCM-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT8540-K9-")): prodname = product("CT8540") workname = filename.replace(".aes", "") workname = workname.replace("AIR-CT8540-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WISM2-K9-")): prodname = product("WISM2") workname = filename.replace(".aes", "") workname = workname.replace("AIR-WISM2-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP1840-K9-ME-")): prodname = product("AP1840") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-AP1840-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP1540-K9-ME-")): prodname = product("AP1540") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-AP1540-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP1560-K9-ME-")): prodname = product("AP1560") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-AP1560-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP2800-K9-ME-")): prodname = product("AP2800") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-AP2800-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP3800-K9-ME-")): prodname = product("AP3800") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-AP3800-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP4800-K9-ME-")): prodname = product("AP4800") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-AP4800-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-AP4800-K9-ME-")): prodname = product("AP4800") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-AP4800-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WLC-SRE-K9-")): prodname = product("SRE") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-WLC-SRE-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-6300-K9-ME-") or filename.startswith("AIR-AP6300-K9-ME-")): prodname = product("AP6300") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace(".tar", "") workname = workname.replace("AIR-6300-K9-ME-", "") workname = workname.replace("AIR-AP6300-K9-ME-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-LOC2700-L-K9-")): prodname = product("LOC2700") workname = filename.replace(".bin.gz", "") workname = workname.replace(".bin", "") workname = workname.replace("AIR-LOC2700-L-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AP_BUNDLE_3500_")): prodname = product("CT3504") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AP_BUNDLE_3500_", "") wireless_all_underscore(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT2500-AP_BUNDLE-K9-")): prodname = product("CT2500") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-CT2500-AP_BUNDLE-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT5500-LDPE-AP_BUNDLE-K9-")): prodname = product("CT5500") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-CT5500-LDPE-AP_BUNDLE-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-CT5500-AP_BUNDLE-K9-")): prodname = product("CT5500") workname = filename.replace(".aes", "") workname = workname.replace(".zip", "") workname = workname.replace("AIR-CT5500-AP_BUNDLE-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("AIR-WISM2-AP_BUNDLE-K9-")): prodname = product("CT5500") workname = filename.replace(".aes", "") workname = workname.replace("AIR-WISM2-AP_BUNDLE-K9-", "") wireless_all_dash(debug1, filename, prodname, workname) elif (filename.startswith("WGB350") and filename.endswith("exe")): prodname = product("c350") imagecode = imagelookup("WKGBDG") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("BR350") and filename.endswith("exe")): prodname = product("c350") imagecode = imagelookup("WRLBDG") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "AP350-Cisco-IOS-Upgrade-Image-v2.img"): prodname = product("c350") imagecode = imagelookup("vxworks") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "AP1200-Cisco-IOS-Upgrade-Image-v3.img"): prodname = product("c1200") imagecode = imagelookup("vxworks") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "webauth_bundle.zip" or filename == "webauth_bundle-1.0.2.zip"): prodname = product("wireless") imagecode = imagelookup("webauth") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("CiscoAironet-AP-to-LWAPP-Upgrade-Tool-")): prodname = product("wireless") imagecode = imagelookup("aptolwapp") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename == "Aironet-AP-Cisco-IOS-Conversion-Tool-v2.1.exe"): prodname = product("wireless") imagecode = imagelookup("vxworkstoios") utilssinglemove(debug1, filename, prodname, imagecode) elif (filename.startswith("WCS-STANDARD-K9-")): prodname = product("wcs") workname = filename.replace(".bin", "") workname = workname.replace(".exe", "") workname = workname.replace("WCS-STANDARD-K9-", "") wireless_all_dash_dot(debug1, filename, prodname, workname)