├── .gitignore ├── ConfigurationTemplates ├── ArubaOS │ └── readme.md ├── CiscoIOS │ └── readme.md ├── Comware5 │ └── readme.md ├── Comware7 │ └── readme.md └── readme.md ├── DeviceAdapters ├── Alcatel │ ├── Alcatel7450 │ │ ├── Alcatel7450_Cleanup_Parser.xml │ │ ├── Alcatel7450_Cleanup_Parser_Script.pl │ │ ├── Alcatel7450_Common_CLI.xml │ │ ├── Alcatel7450_Config_Backup_Builder.xml │ │ ├── Alcatel7450_Config_Backup_Builder_Script.xml │ │ ├── Alcatel7450_Config_Deploy_Builder.xml │ │ ├── Alcatel7450_Config_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_startup_config_cli-test1.tcl │ │ ├── backup_startup_config_cli.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── deploy_running_config_tftp.tcl │ │ ├── enter_enable-test1.tcl │ │ ├── enter_enable.tcl │ │ ├── enter_exec.tcl │ │ ├── exit_enable.tcl │ │ ├── exit_exec.tcl │ │ ├── get_partion_info.tcl │ │ ├── initialize - old.tcl │ │ ├── initialize.tcl │ │ ├── reload.tcl │ │ ├── save.tcl │ │ └── save_config.tcl │ └── Readme.md ├── Arista Networks │ ├── AristaEOSGeneric │ │ ├── Arista_Cleanup_Parser.xml │ │ ├── Arista_Cleanup_Parser_Script.pl │ │ ├── Arista_Common_CLI.xml │ │ ├── Arista_Config_Backup_Builder.xml │ │ ├── Arista_Config_Backup_Builder_Script.xml │ │ ├── Arista_Config_Deploy_Builder.xml │ │ ├── Arista_Config_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_running_config_cli.tcl │ │ ├── backup_running_config_scp.tcl │ │ ├── backup_running_config_tftp.tcl │ │ ├── backup_startup_config_cli.tcl │ │ ├── backup_startup_config_scp.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── backup_to_dev.tcl │ │ ├── cleanup.tcl │ │ ├── clearboot_cli.tcl │ │ ├── copy_flash.tcl │ │ ├── delete_directory.tcl │ │ ├── delete_file.tcl │ │ ├── delete_image.tcl │ │ ├── deploy_image.tcl │ │ ├── deploy_image_extract.tcl │ │ ├── deploy_image_ftp.tcl │ │ ├── deploy_image_scp.tcl │ │ ├── deploy_running_config_scp.tcl │ │ ├── deploy_running_config_tftp.tcl │ │ ├── deploy_startup_config_scp.tcl │ │ ├── deploy_startup_config_tftp.tcl │ │ ├── determine_boot.tcl │ │ ├── determine_tar.tcl │ │ ├── enter_config_terminal.tcl │ │ ├── enter_enable.tcl │ │ ├── enter_exec.tcl │ │ ├── exit_config_terminal.tcl │ │ ├── exit_enable.tcl │ │ ├── exit_exec.tcl │ │ ├── extract_tar.tcl │ │ ├── get_image_position.tcl │ │ ├── get_image_size.tcl │ │ ├── get_image_version.tcl │ │ ├── get_partion_info.tcl │ │ ├── get_startup_config.tcl │ │ ├── getversion.tcl │ │ ├── getversion_cli.tcl │ │ ├── initialize.tcl │ │ ├── reload.tcl │ │ ├── save.tcl │ │ ├── save_config.tcl │ │ ├── set_device_boot.tcl │ │ └── verify_image.tcl │ ├── adapter-index.xml │ ├── arista sample config.txt │ └── readme.md ├── Cisco │ ├── CiscoSG500 │ │ ├── CiscoSG500_Cleanup_Parser.xml │ │ ├── CiscoSG500_Cleanup_Parser_Script.pl │ │ ├── CiscoSG500_Common_CLI.xml │ │ ├── CiscoSG500_Config_Backup_Builder.xml │ │ ├── CiscoSG500_Config_Backup_Builder_Script.xml │ │ ├── CiscoSG500_Config_Deploy_Builder.xml │ │ ├── CiscoSG500_Config_Deploy_Builder_Script.xml │ │ ├── CiscoSG500_Image_Deploy_Builder.xml │ │ ├── CiscoSG500_Image_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_running_config_tftp.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── cleanup.tcl │ │ ├── deploy_image.tcl │ │ ├── deploy_startup_config_tftp.tcl │ │ ├── enter_admin.tcl │ │ ├── enter_enable.tcl │ │ ├── exit_admin.tcl │ │ ├── exit_enable.tcl │ │ ├── get_partion_info.tcl │ │ ├── initialize.tcl │ │ ├── reload.tcl │ │ ├── save.tcl │ │ └── set_device_boot.tcl │ └── readme.md ├── Juniper networks │ ├── JuniperGeneric │ │ ├── Juniper_Cleanup_Parser.xml │ │ ├── Juniper_Cleanup_Parser_Script.pl │ │ ├── Juniper_Common_CLI.xml │ │ ├── Juniper_Config_Backup_Builder.xml │ │ ├── Juniper_Config_Backup_Builder_Script.xml │ │ ├── Juniper_Config_Deploy_Builder.xml │ │ ├── Juniper_Config_Deploy_Builder_Script.xml │ │ ├── Juniper_Image_Deploy_Builder.xml │ │ ├── Juniper_Image_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_image_scp.tcl │ │ ├── backup_startup_config_cli.tcl │ │ ├── backup_startup_config_scp.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── cleanup_deployed_file.tcl │ │ ├── clearup.tcl │ │ ├── commit_config.tcl │ │ ├── delete_file.tcl │ │ ├── delete_image.tcl │ │ ├── deploy_config_scp.tcl │ │ ├── deploy_image_ftp.tcl │ │ ├── deploy_image_ftp_shell.tcl │ │ ├── deploy_image_scp.tcl │ │ ├── deploy_image_scp_cli.tcl │ │ ├── deploy_startup_config_tftp.tcl │ │ ├── enter_config_term.tcl │ │ ├── enter_exec.tcl │ │ ├── enter_shell.tcl │ │ ├── exit_config_term.tcl │ │ ├── exit_exec.tcl │ │ ├── exit_shell.tcl │ │ ├── get_board_number.tcl │ │ ├── get_image_position.tcl │ │ ├── get_image_size.tcl │ │ ├── get_image_version.tcl │ │ ├── get_partion_info.tcl │ │ ├── get_startup_config.tcl │ │ ├── initialize.tcl │ │ ├── load_image.tcl │ │ ├── load_running_config_cli.tcl │ │ ├── load_startup_config_cli.tcl │ │ ├── prepare_startup_config_cli.tcl │ │ ├── reload.tcl │ │ ├── save.tcl │ │ ├── save_config.tcl │ │ ├── set_device_boot.tcl │ │ └── verify_image.tcl │ └── NetScreen │ │ ├── NetScreen_Cleanup_Parser.xml │ │ ├── NetScreen_Cleanup_Parser_Script.pl │ │ ├── NetScreen_Common_CLI.xml │ │ ├── NetScreen_Config_Backup_Builder.xml │ │ ├── NetScreen_Config_Backup_Builder_Script.xml │ │ ├── NetScreen_Config_Deploy_Builder.xml │ │ ├── NetScreen_Config_Deploy_Builder_Script.xml │ │ ├── NetScreen_Image_Deploy_Builder.xml │ │ ├── NetScreen_Image_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_running_config_cli.tcl │ │ ├── backup_running_config_tftp.tcl │ │ ├── backup_startup_config_cli.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── delete_image.tcl │ │ ├── deploy_image.tcl │ │ ├── deploy_running_config_tftp.tcl │ │ ├── deploy_startup_config_tftp.tcl │ │ ├── enter_exec.tcl │ │ ├── exit_exec.tcl │ │ ├── initialize.tcl │ │ ├── reload.tcl │ │ ├── save_config.tcl │ │ └── set_device_boot.tcl ├── MikroTik │ ├── Readme.md │ ├── RouterOS6 │ │ ├── Mikrotik_Cleanup_Parser.xml │ │ ├── Mikrotik_Cleanup_Parser_Script.pl │ │ ├── Mikrotik_Common_CLI.xml │ │ ├── Mikrotik_Config_Backup_Builder.xml │ │ ├── Mikrotik_Config_Backup_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_startup_config_cli.tcl │ │ ├── enter_exec.tcl │ │ ├── exit_exec.tcl │ │ └── initialize.tcl │ └── adapter-index.xml ├── Motorola │ ├── AP5131 │ │ ├── Moto_Cleanup_Parser.xml │ │ ├── Moto_Cleanup_Parser_Script.pl │ │ ├── Moto_Common_CLI.xml │ │ ├── Moto_Config_Backup_Builder.xml │ │ ├── Moto_Config_Backup_Builder_Script.xml │ │ ├── Moto_Config_Deploy_Builder.xml │ │ ├── Moto_Config_Deploy_Builder_Script.xml │ │ ├── Moto_Image_Deploy_Builder.xml │ │ ├── Moto_Image_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_startup_config_cli.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── backup_to_dev.tcl │ │ ├── deploy_image.tcl │ │ ├── deploy_image_scp.tcl │ │ ├── deploy_image_sftp.tcl │ │ ├── deploy_running_config_cli.tcl │ │ ├── deploy_startup_config_tftp.tcl │ │ ├── do_nothing.tcl │ │ ├── enter_config_term.tcl │ │ ├── enter_enable.tcl │ │ ├── enter_exec.tcl │ │ ├── exit_config_term.tcl │ │ ├── exit_enable.tcl │ │ ├── exit_exec.tcl │ │ ├── get_image_position.tcl │ │ ├── get_image_version.tcl │ │ ├── get_image_version.xml │ │ ├── initialize.tcl │ │ ├── reload.tcl │ │ ├── save.tcl │ │ ├── save_config.tcl │ │ └── set_device_boot.tcl │ └── adapter-index.xml ├── Nortel │ ├── BayStack425 │ │ ├── BayStack425_Cleanup_Parser.xml │ │ ├── BayStack425_Cleanup_Parser_Script.pl │ │ ├── BayStack425_Common_CLI.xml │ │ ├── BayStack425_Config_Backup_Builder.xml │ │ ├── BayStack425_Config_Backup_Builder_Script.xml │ │ ├── BayStack425_Config_Deploy_Builder.xml │ │ ├── BayStack425_Config_Deploy_Builder_Script.xml │ │ ├── BayStack425_Image_Deploy_Builder.xml │ │ ├── BayStack425_Image_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_running_config_cli.tcl │ │ ├── backup_running_config_tftp.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── deploy_startup_config_tftp.tcl │ │ ├── determine_diag.tcl │ │ ├── enter_enable.tcl │ │ ├── enter_exec.tcl │ │ ├── exit_enable.tcl │ │ ├── exit_exec.tcl │ │ ├── initialize.tcl │ │ ├── reload.tcl │ │ ├── save_config.tcl │ │ ├── updatediag_cli.tcl │ │ └── updateimage_cli.tcl │ ├── NortelERS │ │ ├── NortelERS_Cleanup_Parser.xml │ │ ├── NortelERS_Cleanup_Parser_Script.pl │ │ ├── NortelERS_Common_CLI.xml │ │ ├── NortelERS_Config_Backup_Builder.xml │ │ ├── NortelERS_Config_Backup_Builder_Script.xml │ │ ├── NortelERS_Config_Deploy_Builder.xml │ │ ├── NortelERS_Config_Deploy_Builder_Script.xml │ │ ├── adapter.xml │ │ ├── backup_running_config_cli.tcl │ │ ├── backup_running_config_tftp.tcl │ │ ├── backup_startup_config_cli.tcl │ │ ├── backup_startup_config_tftp.tcl │ │ ├── clearup.tcl │ │ ├── deploy_startup_config_tftp.tcl │ │ ├── enter_config_term.tcl │ │ ├── enter_enable.tcl │ │ ├── enter_exec.tcl │ │ ├── exit_config_term.tcl │ │ ├── exit_enable.tcl │ │ ├── exit_exec.tcl │ │ ├── initialize.tcl │ │ ├── reload.tcl │ │ ├── save.tcl │ │ └── save_config.tcl │ └── Readme.md └── readme.md ├── DevicePanels ├── 14988_devicepanel.zip └── readme.md ├── LICENSE ├── PythonUtilities ├── Add_Custom_Views │ ├── add_devs_to_custom_view.py │ ├── custom_views.csv │ ├── delete_custom_views.py │ ├── import_custom_views.py │ └── readme.md ├── Add_SNMP_Poll │ ├── Auto_Create_Perf_task.py │ ├── P4000_Perf_Task.csv │ ├── perf_task.csv │ └── readme.md ├── Check Interface VLAN Config │ ├── check_interface_vlans.py │ └── readme.md ├── Export_Alarms │ ├── exportAlarm.py │ ├── readme.md │ └── recAlarm.csv ├── Export_Assets │ ├── Export_Assets.py │ └── readme.md ├── Export_Conf │ ├── categories.csv │ ├── exportDeviceDefinition.py │ ├── models.csv │ ├── readme.md │ ├── series.csv │ └── vendors.csv ├── Gather_IMC_Data │ ├── Gather_Configuration_Templates │ │ └── Readme.md │ ├── Gather_Custom_Views │ │ ├── Readme.md │ │ ├── gather_custom_views.py │ │ └── import_custom_views.py │ ├── Gather_Device_Groups │ │ └── Readme.md │ ├── Gather_Device_Models │ │ ├── Readme.md │ │ └── gather_device_models.py │ ├── Gather_Device_Series │ │ ├── Readme.md │ │ └── gather_device_series.py │ ├── Gather_Device_Vendor │ │ ├── Readme.md │ │ └── gather_device_vendor.py │ ├── Gather_Devices │ │ └── Readme.md │ ├── Gather_Operator_Groups │ │ └── Readme.md │ ├── Gather_Operators │ │ ├── Readme.md │ │ └── gather_operators.py │ ├── Gather_Performance_Indices │ │ └── Readme.md │ ├── Gather_Port_Groups │ │ └── Readme.md │ ├── Gather_SNMP_Templates │ │ └── Readme.md │ ├── Gather_System_Device_Categories │ │ ├── Readme.md │ │ └── gather_system_device_categories.py │ ├── Gather_System_Vendors │ │ ├── gather_system_vendors.py │ │ └── readme.md │ ├── Gather_Telnet_Templates │ │ └── Readme.md │ └── readme.md ├── Gen_ICMP_Device_CSV │ ├── gen_icmp_dev_csv.py │ └── readme.md ├── ImportOperators │ ├── delete_operator.py │ ├── imc_operator_list.csv │ ├── import_operators.py │ └── readme.md ├── Interface_Vlan_Reports │ ├── get_access_vlans.py │ └── get_all_trunk_interfaces.py ├── Philips_Hue_Alarm_Notification │ ├── IMCPhillipsHueNotification.py │ └── test.py ├── Twitter_Alarm_Notification │ └── IMCTwitterNotification.py ├── readme.md └── reset_operator_password │ ├── readme.md │ └── reset_operator_password.py ├── README.md ├── ReportTemplates ├── V1 │ ├── CustomSLAReport_CrossTab_Hour_max_delay_v2.rpt │ ├── Perf_Availability_SLA.rpt │ ├── Perf_Multiple_SameGraph.rpt │ ├── Subnet_IPAM.rpt │ ├── Subnet_IPView.rpt │ ├── VLANReport.rpt │ ├── detailed_inventory_0_2.rpt │ ├── operator_report.rpt │ └── readme.md └── readme.md ├── ZeroTouchProvisioning ├── HomeLab.csv ├── InitialConfigFiles │ ├── ArubaOS │ │ ├── 2530 │ │ │ ├── 2530_Final_Config.cfg │ │ │ └── ArubaOSInitialConfig_Ignore.cfg │ │ ├── 2920 │ │ │ ├── 2920_Final_Config.cfg │ │ │ ├── Aruba2920InitialConfig.cfg │ │ │ └── readme.md │ │ ├── 3800 │ │ │ ├── 3800_Final_Config.cfg │ │ │ ├── ArubaOSInitialConfig3800.cfg │ │ │ └── README.md │ │ ├── 5400 │ │ │ ├── 5400_Final_Config.cfg │ │ │ ├── ArubaOSInitialConfig5400.cfg │ │ │ └── README.md │ │ ├── 3500yl │ │ │ ├── 3500_Final_Config.cfg │ │ │ ├── ArubaOSInitialConfig3500.cfg │ │ │ └── README.md │ │ ├── 5400R │ │ │ ├── 5400R_Final_Config.cfg │ │ │ ├── Aruba5400RInitialConfig.cfg │ │ │ └── readme.md │ │ └── readme.md │ ├── CiscoIOS │ │ ├── Cisco_ADP_init.cfg │ │ └── readme.md │ ├── Comware5 │ │ ├── CW5_initialConfig_ADP.cfg │ │ ├── Routers │ │ │ ├── Comware5RtrInitialConfig.cfg │ │ │ ├── MSR930_Final_Config.cfg │ │ │ └── readme.md │ │ └── readme.md │ └── Comware7 │ │ ├── 5900ADP_w_Netconf.cfg │ │ ├── CW7_initialConfig_ADP.cfg │ │ └── readme.md └── readme.md └── imcTwilio ├── hpe_imc__twilio.py └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | ./.idea/* 6 | from py 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | env/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *,cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # IPython Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # dotenv 80 | .env 81 | 82 | # virtualenv 83 | venv/ 84 | ENV/ 85 | 86 | # Spyder project settings 87 | .spyderproject 88 | 89 | # Rope project settings 90 | .ropeproject 91 | .idea/ 92 | Export_Assets/all_assets.csv 93 | -------------------------------------------------------------------------------- /ConfigurationTemplates/ArubaOS/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ConfigurationTemplates/ArubaOS/readme.md -------------------------------------------------------------------------------- /ConfigurationTemplates/CiscoIOS/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ConfigurationTemplates/CiscoIOS/readme.md -------------------------------------------------------------------------------- /ConfigurationTemplates/Comware5/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ConfigurationTemplates/Comware5/readme.md -------------------------------------------------------------------------------- /ConfigurationTemplates/Comware7/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ConfigurationTemplates/Comware7/readme.md -------------------------------------------------------------------------------- /ConfigurationTemplates/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ConfigurationTemplates/readme.md -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/Alcatel7450_Cleanup_Parser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Alcatel7450_Cleanup_Parser_Script.pl 5 | 6 | 12 | 13 | 19 | 20 | 26 | 27 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/Alcatel7450_Common_CLI.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | connect 7 | 8 | initialize.tcl 9 | 10 | 11 | 12 | 13 | Failed to get to exec mode. 14 | initialize 15 | 16 | enter_exec.tcl 17 | 18 | 19 | exit_exec.tcl 20 | 21 | 22 | 23 | 24 | Failed to get to enable mode. 25 | exec 26 | 27 | enter_enable.tcl 28 | 29 | 30 | exit_enable.tcl 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/Alcatel7450_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/Alcatel7450_Config_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/Alcatel7450_Config_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | An error occurred while trying to save the configuration. 6 | exec 7 | 10 | 11 | 12 | 13 | Failed to download configuration from TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 14 | enable 15 | 18 | 19 | 20 | 21 | An error occurred while trying to reload device. 22 | enable 23 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | Alcatel 7450, 7705, 7710, 7750, 7950 series switches,routers TiMOS version 3.x - 11.x 3 | 1.0.0 4 | 5 | 6 | Alcatel7450_Common_CLI.xml 7 | 8 | 9 | 10 | Alcatel7450_Cleanup_Parser.xml 11 | Alcatel7450_Cleanup_Parser_Script.pl 12 | 13 | 14 | 15 | Alcatel7450_Config_Backup_Builder.xml 16 | Alcatel7450_Config_Backup_Builder_Script.xml 17 | 18 | 19 | 20 | Alcatel7450_Config_Deploy_Builder.xml 21 | Alcatel7450_Config_Deploy_Builder_Script.xml 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/backup_startup_config_cli-test1.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | set timeout $long_timeout 8 | 9 | send "admin display-config\r\n" 10 | 11 | set loop true 12 | 13 | while {$loop == "true"} { 14 | 15 | expect { 16 | -re "$more_prompt" { 17 | send " " 18 | } 19 | -re "$enable_prompt" { 20 | set loop false 21 | } 22 | } 23 | } 24 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/backup_startup_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | set timeout $long_timeout 8 | 9 | send "admin display-config\r\n" 10 | expect $enable_prompt 11 | 12 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/backup_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_tftp 4 | # Purpose: backup startup configuration by tftp 5 | #************************************************************************** 6 | 7 | 8 | set timeout $very_long_timeout 9 | set WARNING_RESULT true 10 | send "admin save tftp://$TFTPServer/$TFTPFile\r\n" 11 | expect { 12 | -re "(Upload failed|Cannot write configuration)" { 13 | set ERROR_RESULT true 14 | set ERROR_MESSAGE "TFTP configuration upload failed. Server may be down or unreachable." 15 | } $enable_prompt { 16 | # Success 17 | } 18 | } 19 | if { $ERROR_RESULT != "true" } { 20 | set WARNING_RESULT false 21 | } 22 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/enter_enable-test1.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_exec 4 | # Purpose: enter the "exec" mode on the device 5 | #************************************************************************** 6 | 7 | #send "environment\r\n" 8 | send "\r\n" 9 | 10 | set loop true 11 | 12 | while {$loop == "true"} { 13 | expect { 14 | # -re "environment#" { 15 | # send "no more\r\n" 16 | # send "exit\r\n" 17 | } 18 | -re $enable_prompt { 19 | set loop false 20 | } 21 | } 22 | } 23 | set IGNORE_DELAY false -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/enter_enable.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_exec 4 | # Purpose: enter the "exec" mode on the device 5 | #************************************************************************** 6 | 7 | #send "environment\r\n" 8 | send "\r\n" 9 | 10 | set loop true 11 | 12 | while {$loop == "true"} { 13 | expect { 14 | # -re "environment#" { 15 | # send "no more\r\n" 16 | # send "exit\r\n" 17 | } 18 | -re $enable_prompt { 19 | set loop false 20 | } 21 | } 22 | } 23 | set IGNORE_DELAY false -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/exit_enable.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_enable 4 | # Purpose: exit the "enable" mode on the device 5 | #************************************************************************** 6 | 7 | send "logout\r" 8 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_enable 4 | # Purpose: exit the "enable" mode on the device 5 | #************************************************************************** 6 | 7 | send "logout\r" 8 | -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/get_partion_info.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_partion_info.tcl 3 | # Purpose: get device partion info 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | send "dir\r" 9 | set loop true 10 | 11 | while {$loop == "true"} { 12 | expect { 13 | -re $more_prompt { 14 | send " " 15 | } -re "Invalid.*|Error .*|Incomplete.*|Wrong.*" { 16 | expect -re $enable_prompt 17 | set ERROR_RESULT true 18 | set ERROR_MESSAGE "Wrong command" 19 | set loop false 20 | } -re $enable_prompt { 21 | # Done 22 | set loop false 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/initialize - old.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:initialize 4 | # Purpose: initialize variables 5 | #************************************************************************** 6 | 7 | set standard_timeout 10 8 | set long_timeout 60 9 | set very_long_timeout 120 10 | set squeeze_timeout 300 11 | set username_prompt ogin: 12 | set password_prompt assword: 13 | set enable_prompt # 14 | set config_prompt "config(\S*)#" 15 | set orig_enable_prompt # 16 | set orig_config_prompt config# 17 | set enforce_save false 18 | set timeout $standard_timeout 19 | set more_prompt "Press any key to continue" 20 | set pause $more_prompt 21 | set -f sent_password "false" 22 | set banner_skip_repeat 0 -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/initialize.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:initialize 4 | # Purpose: initialize variables 5 | #************************************************************************** 6 | 7 | set standard_timeout 10 8 | set long_timeout 60 9 | set very_long_timeout 120 10 | set squeeze_timeout 300 11 | set username_prompt ogin: 12 | set login_prompt "ogin as:" 13 | set password_prompt assword: 14 | set enable_prompt # 15 | set exec_prompt # 16 | set config_prompt "config(\S*)#" 17 | set orig_enable_prompt "# " 18 | set orig_config_prompt config# 19 | set enforce_save false 20 | set timeout $standard_timeout 21 | set more_prompt "Press any key to continue" 22 | set pause $more_prompt 23 | set sent_password "false" 24 | set banner_skip_repeat 0 -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/reload.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:reload.tcl 3 | # Purpose: reload device 4 | #************************************************************************** 5 | 6 | if {$enforce_save == "true"} { 7 | save 8 | } 9 | 10 | send "admin reboot now\r\n" 11 | close -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/save.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification: save.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | proc save {} { 7 | global enable_prompt 8 | global standard_timeout 9 | global very_long_timeout 10 | 11 | set timeout $very_long_timeout 12 | send "copy running-config startup-config\r" 13 | expect { 14 | "Overwrite the previous NVRAM configuration" { 15 | send "\r" 16 | expect $enable_prompt 17 | } -re "Warning: (.*)" { 18 | set error $expect_out(1,string) 19 | set ERROR_MESSAGE "Check the device. The configuration may be in jeopardy: $error" 20 | set ERROR_RESULT true 21 | send "\r" 22 | expect $enable_prompt 23 | } $enable_prompt { 24 | } 25 | } 26 | set timeout $standard_timeout 27 | } -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Alcatel7450/save_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:save_config.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | 7 | save; -------------------------------------------------------------------------------- /DeviceAdapters/Alcatel/Readme.md: -------------------------------------------------------------------------------- 1 | # Some Alcatel adapters 2 | 3 | 03-08-2016 : I made some correction / addition in the existing Alcatel 7450 device adapter 4 | 5 | Don't forget to restart the following IMC porcess after copying / editing adapters: 6 | imccmdmgrdm, imccfgbakdm, and imcupgdm -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/Arista_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Arista EOS Version 4.x 4 | 1.0.0 5 | 6 | 7 | Arista_Common_CLI.xml 8 | 9 | 10 | 11 | Arista_Cleanup_Parser.xml 12 | Arista_Cleanup_Parser_Script.pl 13 | 14 | 15 | 16 | Arista_Config_Backup_Builder.xml 17 | Arista_Config_Backup_Builder_Script.xml 18 | 19 | 20 | 21 | Arista_Config_Deploy_Builder.xml 22 | Arista_Config_Deploy_Builder_Script.xml 23 | 24 | 25 | 26 | Arista_Image_Deploy_Builder.xml 27 | Arista_Image_Deploy_Builder_Script.xml 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/backup_to_dev.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:set_device_boot.tcl 4 | # Purpose: set current software to backup 5 | #************************************************************************** 6 | 7 | 8 | set SEND_CMD true 9 | if { $CurImage != "" && $PosImage != "" } { 10 | if { $SEND_CMD } { 11 | send "boot system flash $PosImage$CurImage\r" 12 | expect { 13 | -re "Unrecognized|Incomplete|Too many|Ambiguous|not support" { 14 | expect -re $exec_prompt 15 | } -re $config_prompt { 16 | set SEND_CMD false 17 | return 18 | } 19 | } 20 | } 21 | if { $SEND_CMD } { 22 | send "boot system $PosImage$CurImage\r" 23 | expect { 24 | -re "Unrecognized|Incomplete|Too many|Ambiguous|not support" { 25 | expect -re $exec_prompt 26 | } -re $config_prompt { 27 | set SEND_CMD false 28 | return 29 | } 30 | } 31 | } 32 | } 33 | 34 | if { $SEND_CMD } { 35 | set ERROR_MESSAGE "Incorrect command. Could not backup current software to the device. Do not support" 36 | set ERROR_RESULT true 37 | set SEND_CMD false 38 | return 39 | } 40 | 41 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/cleanup.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:cleanup.tcl 4 | # Purpose: try to recover a prompt, then exit 5 | #************************************************************************** 6 | 7 | proc cleanup {} { 8 | global ERROR_RESULT 9 | global enable_prompt 10 | global exec_prompt 11 | global config_prompt 12 | 13 | if { $ERROR_RESULT == "true" } { 14 | set loop true 15 | while { $loop == "true" } { 16 | send "\r" 17 | expect { 18 | $enable_prompt { 19 | send "logout\r" 20 | set loop false 21 | } $exec_prompt { 22 | send "exit\r" 23 | set loop false 24 | } $config_prompt { 25 | send "exit\r" 26 | } -re "(Bad|denied)" { 27 | send "\r" 28 | } 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/clearboot_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:clearboot_cli 4 | # Purpose: clearboot_cli 5 | #************************************************************************** 6 | 7 | set WARNING_RESULT true 8 | if { $slot == "bootflash:" } { 9 | if { $setBootImage == "true" } { 10 | send "no boot bootldr\r" 11 | expect $config_prompt 12 | send "no boot system\r" 13 | expect $config_prompt 14 | } 15 | } 16 | 17 | if { $slot != "bootflash:" } { 18 | if { $setOSImage == "true" } { 19 | if { $isC3750 == "true" || $isC3560 == "true"} { 20 | if { $tarAutoExtracted == "true" } { 21 | send "\r" 22 | } else { 23 | send "no boot system\r" 24 | } 25 | } else { 26 | send "no boot system\r" 27 | } 28 | expect { 29 | "% missing parameter detected at" { 30 | # maybe Cisco ACE? 31 | expect $config_prompt 32 | send "no boot system image:\r" 33 | expect $config_prompt 34 | } $config_prompt { 35 | } 36 | } 37 | } 38 | } 39 | if { $ERROR_RESULT != "true" } { 40 | set WARNING_RESULT false 41 | } 42 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/copy_flash.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_image_cli.tcl 4 | # Purpose: deploy image to device by cli 5 | #************************************************************************** 6 | 7 | set timeout $squeeze_timeout 8 | 9 | set my_cmd "copy $MainSlot$CopyFile $CopyFlash$CopyFile" 10 | 11 | send "$my_cmd\r" 12 | set loop true 13 | 14 | while { $loop == "true"} { 15 | expect { 16 | "Not enough space" { 17 | set loop false 18 | set ERROR_RESULT true 19 | set ERROR_MESSAGE "insufficient space on device." 20 | } "no enough space" { 21 | set loop false 22 | set ERROR_RESULT true 23 | set ERROR_MESSAGE "insufficient space on device." 24 | } -re "Error:(.*)\n|\n Wrong filename" { 25 | set loop false 26 | set ERROR_RESULT true 27 | set ERROR_MESSAGE "Device returned an error" 28 | } "estination filename" { 29 | send "\r"; 30 | } "over write" { 31 | send "\r"; 32 | } "% Incomplete" { 33 | set loop false 34 | set ERROR_RESULT true 35 | set ERROR_MESSAGE "Device returned an error" 36 | } "bytes copied" { 37 | expect $enable_prompt 38 | set loop false 39 | #success 40 | } 41 | } 42 | } 43 | 44 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/deploy_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_startup_config_tftp 4 | # Purpose: deploy startup configuration by tftp 5 | #************************************************************************** 6 | 7 | set timeout $long_timeout 8 | send "copy tftp://$TFTPServer/$TFTPFile startup-config\r" 9 | expect { 10 | "uthorization failed" { 11 | set ERROR_MESSAGE "The user is not authorized to use the command copy tftp startup-config" 12 | set ERROR_RESULT true 13 | expect -re $enable_prompt 14 | } "\\?" { 15 | send "\r" 16 | expect { 17 | "no]:" { 18 | send "yes\r" 19 | expect "bytes copied" 20 | expect -re $enable_prompt 21 | } "Error opening" { 22 | set ERROR_RESULT true 23 | set ERROR_MESSAGE "Could not copy the configuration from the server $TFTPServer" 24 | } "bytes copied" { 25 | expect -re $enable_prompt 26 | } 27 | } 28 | } 29 | } 30 | set timeout $standard_timeout 31 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/determine_boot.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:determine_boot 4 | # Purpose: determine_boot 5 | #************************************************************************** 6 | 7 | set WARNING_RESULT true 8 | send "! $TFTPFile\r" 9 | expect $enable_prompt 10 | 11 | if { $ERROR_RESULT != "true" } { 12 | set WARNING_RESULT false 13 | } 14 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/determine_tar.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:determine_tar 4 | # Purpose: determine_tar 5 | #************************************************************************** 6 | 7 | set WARNING_RESULT true 8 | send "! $TFTPFile\r" 9 | expect $enable_prompt 10 | 11 | if { $ERROR_RESULT != "true" } { 12 | set WARNING_RESULT false 13 | } 14 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/enter_config_terminal.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_config_terminal 4 | # Purpose: enter the "config terminal" mode on the device 5 | #************************************************************************** 6 | 7 | send "config terminal\r" 8 | expect { 9 | -re "nvalid" { 10 | set ERROR_MESSAGE "Could not enter configuration mode." 11 | set ERROR_RESULT true 12 | expect $enable_prompt 13 | } "uthorization failed" { 14 | set ERROR_MESSAGE "The user is not authorized to enter configuration mode." 15 | set ERROR_RESULT true 16 | expect $enable_prompt 17 | } -re $config_prompt { 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/exit_enable.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_enable 4 | # Purpose: exit the "enable" mode on the device 5 | #************************************************************************** 6 | 7 | if {$enforce_save == "true"} { 8 | save 9 | } 10 | send "disable\r" 11 | expect { 12 | $exec_prompt { 13 | } $orig_exec_prompt { 14 | if {$useTruePrompt != "false"} { 15 | send "\r" 16 | expect -re "(.*?$orig_exec_prompt)" 17 | set exec_prompt $expect_out(1,string) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_exec 4 | # Purpose: quit the "exec" mode on the device 5 | #************************************************************************** 6 | 7 | send "logout\r" 8 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/get_image_position.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_software_position.tcl 3 | # Purpose: get device current software position 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | send "show version\r" 9 | set loop true 10 | while {$loop == "true"} { 11 | expect { 12 | -re $more_prompt { 13 | send " " 14 | } "Device#" { 15 | } -re "uthorization failed" { 16 | set ERROR_MESSAGE "The user is not authorized to use the command show version" 17 | set ERROR_RESULT true 18 | expect $enable_prompt 19 | } -re $enable_prompt { 20 | send "\r" 21 | expect -re $enable_prompt 22 | set loop false 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/get_image_size.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_software_size.tcl 3 | # Purpose: get device current software size 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | 9 | send "dir $slot:/$TFTPFile\r" 10 | expect { 11 | -re $more_prompt { 12 | send " " 13 | } -re "uthorization failed" { 14 | set ERROR_MESSAGE "The user is not authorized to use the command dir" 15 | set ERROR_RESULT true 16 | expect $enable_prompt 17 | } -re $enable_prompt { 18 | # Done 19 | } 20 | } -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/get_image_version.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_software_version.tcl 3 | # Purpose: get device software version 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | send "show version\r" 9 | set loop true 10 | while {$loop == "true"} { 11 | expect { 12 | -re $more_prompt { 13 | send " " 14 | } "Device#" { 15 | } -re "uthorization failed" { 16 | set ERROR_MESSAGE "The user is not authorized to use the command show version" 17 | set ERROR_RESULT true 18 | expect $enable_prompt 19 | } -re $enable_prompt { 20 | send "\r" 21 | expect -re $enable_prompt 22 | set loop false 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/get_partion_info.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_partion_info.tcl 3 | # Purpose: get device partion info 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | send "dir\r" 9 | set loop true 10 | 11 | while {$loop == "true"} { 12 | expect { 13 | -re $more_prompt { 14 | send " " 15 | } -re "Error|Unknown command" { 16 | set error_message $expect_out(1,string) 17 | expect -re $exec_prompt 18 | set ERROR_RESULT true 19 | set ERROR_MESSAGE "Device error: $error_message" 20 | set loop false 21 | } -re $exec_prompt { 22 | # Done 23 | set loop false 24 | } -re $enable_prompt { 25 | # Done 26 | set loop false 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/get_startup_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:get_startup_config.tcl 4 | # Purpose: get startup configuration file name by cli 5 | #************************************************************************** 6 | 7 | # need do notihing 8 | 9 | send "pwd\r" 10 | set loop true 11 | while {$loop == "true"} { 12 | expect { 13 | -re $more_prompt { 14 | send " " 15 | } -re "uthorization failed" { 16 | set ERROR_MESSAGE "The user is not authorized to use the command show version" 17 | set ERROR_RESULT true 18 | expect $enable_prompt 19 | } -re $enable_prompt { 20 | # Done 21 | set loop false 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/getversion.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:getversion 4 | # Purpose: getversion 5 | #************************************************************************** 6 | 7 | send "show version\r" 8 | expect { 9 | "uthorization failed" { 10 | set ERROR_MESSAGE "The user is not authorized to use the command show version" 11 | set ERROR_RESULT true 12 | expect $enable_prompt 13 | } -re $enable_prompt { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/reload.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:reload 4 | # Purpose: reload 5 | #************************************************************************** 6 | 7 | 8 | if {$enforce_save == "true"} { 9 | save 10 | } 11 | 12 | send "reload\r" 13 | expect { 14 | "Save?" { 15 | send "no\r" 16 | expect { 17 | "\\?" { 18 | } "confirm" { 19 | } 20 | } 21 | } "uthorization failed" { 22 | set ERROR_MESSAGE "The user is not authorized to use the command reload" 23 | set ERROR_RESULT true 24 | expect $enable_prompt 25 | } "\\?" { 26 | } "confirm" { 27 | send " " 28 | } 29 | } 30 | 31 | send "\r" 32 | sleep 10 33 | close 34 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/save.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification: save.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | proc save {} { 7 | global exec_prompt 8 | global enable_prompt 9 | global standard_timeout 10 | global long_timeout 11 | set timeout $long_timeout 12 | 13 | send "write memory\r" 14 | expect { 15 | "Overwrite the previous NVRAM configuration" { 16 | send "\r" 17 | expect $enable_prompt 18 | } -re "Warning: (.*)" { 19 | set error $expect_out(1,string) 20 | set ERROR_MESSAGE "Check the device. The configuration may be in jeopardy: $error" 21 | set ERROR_RESULT true 22 | send "\r" 23 | expect $enable_prompt 24 | } -re $enable_prompt { 25 | } 26 | } 27 | set timeout $standard_timeout 28 | } 29 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/AristaEOSGeneric/save_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:save_config.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | 7 | 8 | save; -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/adapter-index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Arista EOS Version 4.x 7 | 1.3.6.1.4.1.30065.1.* 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DeviceAdapters/Arista Networks/readme.md: -------------------------------------------------------------------------------- 1 | # Arista Device Adapter 2 | 3 | Tested with the following 4 | 5 | vEOS 14.6.6m (Telnet + TFTP, SSH + SCP ) 6 | Arista Networks EOS version 4.16.7M running on an Arista Networks DCS-7010T-48 ( Telnet+TFTP, SSH + SCP ) -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Cleanup_Parser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CiscoIOS_XR_Cleanup_Parser_Script.pl 5 | 6 | 12 | 13 | 19 | 20 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Cleanup_Parser_Script.pl: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/perl 2 | 3 | sub cleanupPartionName 4 | { 5 | my($config) = @_; 6 | 7 | # CLI sometimes leaks in some syslog messages.. remove them _first_ [important] 8 | $config =~ s/(^|\n)\%.*//g; 9 | 10 | $config =~ m/Directory of (\S+:)/; 11 | 12 | $config = "$1:"; 13 | return $config; 14 | 15 | return "/"; 16 | } 17 | 18 | sub cleanupFreeSize 19 | { 20 | my($config) = @_; 21 | # CLI sometimes leaks in some syslog messages.. remove them _first_ [important] 22 | $config =~ s/(^|\n)\%.*//g; 23 | 24 | $config =~ m/(\d+)$/; 25 | $config = "$1:"; 26 | 27 | return $config; 28 | 29 | return "-1"; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Common_CLI.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | connect 7 | 8 | initialize.tcl 9 | 10 | 11 | 12 | 13 | Failed to get to enable mode. 14 | initialize 15 | 16 | enter_enable.tcl 17 | 18 | 19 | exit_enable.tcl 20 | 21 | 22 | 23 | 24 | Failed to get to admin mode. 25 | initialize 26 | 27 | enter_admin.tcl 28 | 29 | 30 | exit_admin.tcl 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Config_Backup_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Failed to upload configuration to TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 7 | enable 8 | 11 | 12 | 13 | 14 | Failed to upload startup configuration to TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 15 | enable 16 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Config_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Config_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Failed to download configuration from TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 7 | enable 8 | 11 | 12 | 13 | 14 | Failed to reload device. 15 | enable 16 | 19 | 20 | 21 | 22 | Failed to save config. 23 | enable 24 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Image_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/CiscoSG500_Image_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Unkonwn commmand. Out of memory. transmit error. 7 | enable 8 | 11 | 12 | 13 | 14 | Failed to get partion information in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 15 | enable 16 | 19 | 20 | 21 | 22 | Unkonwn commmand. transmit error. 23 | enable 24 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Smart Business SG500 Switch 5 | 1.0.0 6 | 7 | 8 | CiscoSG500_Common_CLI.xml 9 | 10 | 11 | CiscoSG500_Cleanup_Parser.xml 12 | CiscoSG500_Cleanup_Parser_Script.pl 13 | 14 | 15 | CiscoSG500_Config_Backup_Builder.xml 16 | CiscoSG500_Config_Backup_Builder_Script.xml 17 | 18 | 19 | CiscoSG500_Config_Deploy_Builder.xml 20 | CiscoSG500_Config_Deploy_Builder_Script.xml 21 | 22 | 23 | 24 | CiscoSG500_Image_Deploy_Builder.xml 25 | CiscoSG500_Image_Deploy_Builder_Script.xml 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/backup_running_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_tftp 4 | # Purpose: backup startup configuration by tftp 5 | #************************************************************************** 6 | 7 | 8 | set timeout $very_long_timeout 9 | set WARNING_RESULT true 10 | send "copy $runningConfig tftp://$TFTPServer/$TFTPFile\r" 11 | expect { 12 | "Unable to read configuration" { 13 | set ERROR_MESSAGE "Unable to read configuration. The device may be suffering from a failure." 14 | set ERROR_RESULT true 15 | expect $enable_prompt 16 | } -re "% Invalid" { 17 | set ERROR_MESSAGE "Could not copy the $runningConfig to a tftp server." 18 | set ERROR_RESULT true 19 | expect $enable_prompt 20 | } -re "(This command is not authorized|Command authorization failed)" { 21 | set ERROR_MESSAGE "The user is not authorized to use the command copy $runningConfig tftp" 22 | set ERROR_LOGIN true 23 | expect $enable_prompt 24 | } -re $enable_prompt { 25 | send "\r" 26 | expect -re $enable_prompt 27 | } 28 | } 29 | if { $ERROR_RESULT != "true" } { 30 | set WARNING_RESULT false 31 | } 32 | set timeout $standard_timeout 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/backup_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_tftp 4 | # Purpose: backup startup configuration by tftp 5 | #************************************************************************** 6 | 7 | 8 | set timeout $very_long_timeout 9 | set WARNING_RESULT true 10 | send "copy $startupConfig tftp://$TFTPServer/$TFTPFile\r" 11 | expect { 12 | "Unable to read configuration" { 13 | set ERROR_MESSAGE "Unable to read configuration. The device may be suffering from a failure." 14 | set ERROR_RESULT true 15 | expect $enable_prompt 16 | } -re "% Invalid" { 17 | set ERROR_MESSAGE "Could not copy the $runningConfig to a tftp server." 18 | set ERROR_RESULT true 19 | expect $enable_prompt 20 | } -re "(This command is not authorized|Command authorization failed)" { 21 | set ERROR_MESSAGE "The user is not authorized to use the command copy $runningConfig tftp" 22 | set ERROR_LOGIN true 23 | expect $enable_prompt 24 | } -re $enable_prompt { 25 | send "\r" 26 | expect -re $enable_prompt 27 | } 28 | } 29 | if { $ERROR_RESULT != "true" } { 30 | set WARNING_RESULT false 31 | } 32 | set timeout $standard_timeout 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/cleanup.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:cleanup.tcl 4 | # Purpose: try to recover a prompt, then exit 5 | #************************************************************************** 6 | 7 | proc cleanup {} { 8 | global ERROR_RESULT 9 | global exec_prompt 10 | global config_prompt 11 | 12 | if { $ERROR_RESULT == "true" } { 13 | set loop true 14 | while { $loop == "true" } { 15 | send "\r" 16 | expect { 17 | -re $exec_prompt { 18 | send "logout\r" 19 | set loop false 20 | } -re $config_prompt { 21 | send "exit\r" 22 | expect $exec_prompt 23 | } -re "(Bad|denied)" { 24 | send "\r" 25 | expect $exec_prompt 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/deploy_image.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:deploy_image 3 | # Purpose: deploy image by tftp 4 | #************************************************************************** 5 | 6 | set timeout $long_timeout 7 | set WARNING_RESULT true 8 | 9 | send "copy tftp://$TFTPServer/$TFTPFile image $TFTPDestFile\r" 10 | 11 | set loop true 12 | while { $loop == "true" } { 13 | expect { 14 | -re "Unkonwn commmand" { 15 | expect $enable_prompt 16 | set loop false 17 | } -re "TFTP Failed:" { 18 | set ERROR_RESULT true 19 | set ERROR_MESSAGE "Device reports insufficent space to update. Please remove some files." 20 | expect $enable_prompt 21 | set loop false 22 | } -re "Out of memory" { 23 | set ERROR_RESULT true 24 | set ERROR_MESSAGE "Device reports insufficent space to update. Please remove some files." 25 | expect $enable_prompt 26 | set loop false 27 | } -re "transmit error" { 28 | set ERROR_RESULT true 29 | set ERROR_MESSAGE "TFTP update of software image failed. Server may be unreachable from device." 30 | expect $enable_prompt 31 | set loop false 32 | } timeout { 33 | 34 | } 35 | } 36 | } 37 | 38 | 39 | set timeout $standard_timeout 40 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/deploy_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_startup_config_tftp 4 | # Purpose: deploy startup configuration by tftp 5 | #************************************************************************** 6 | 7 | set timeout $long_timeout 8 | send "copy tftp://$TFTPServer/$TFTPFile startup-config\r" 9 | expect { 10 | "uthorization failed" { 11 | set ERROR_MESSAGE "The user is not authorized to use the command copy tftp startup-config" 12 | set ERROR_RESULT true 13 | expect -re $enable_prompt 14 | } "\\?" { 15 | send "\r" 16 | expect { 17 | "no]:" { 18 | send "yes\r" 19 | expect "bytes copied" 20 | expect -re $enable_prompt 21 | } "Error opening" { 22 | set ERROR_RESULT true 23 | set ERROR_MESSAGE "Could not copy the configuration from the server $TFTPServer" 24 | } "bytes copied" { 25 | expect -re $enable_prompt 26 | } 27 | } 28 | } 29 | } 30 | set timeout $standard_timeout 31 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/enter_admin.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:enter_admin 3 | # Purpose: enter the "admin" mode on the device 4 | #************************************************************************** 5 | 6 | send "admin\r" 7 | 8 | set loop true 9 | 10 | while ($loop == "true") { 11 | expect { 12 | -re $error_pattern { 13 | set ERROR_MESSAGE "Incomplete/Unknown/Unrecognized/Too many parameters/Invalid/.*uthorization failed" 14 | set ERROR_RESULT true 15 | expect $enable_prompt 16 | set loop false 17 | } -re $admin_prompt { 18 | set loop false 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/exit_admin.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:exit_admin 3 | # Purpose: exit the "admin" mode on the device 4 | #************************************************************************** 5 | 6 | send "exit\r" 7 | expect $enable_prompt 8 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/exit_enable.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_exec 4 | # Purpose: exit the "enable" mode on the device 5 | #************************************************************************** 6 | 7 | send "exit\r" 8 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/get_partion_info.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_partion_info.tcl 3 | # Purpose: get device partion info 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | send "dir\r" 9 | set loop true 10 | 11 | while {$loop == "true"} { 12 | expect { 13 | -re $more_prompt { 14 | send " " 15 | } -re "\n.+$error_pattern" { 16 | set error_message $expect_out(1,string) 17 | expect -re $enable_prompt 18 | set ERROR_RESULT true 19 | set ERROR_MESSAGE "Device error: $error_message" 20 | set loop false 21 | } -re $enable_prompt { 22 | # Done 23 | set loop false 24 | } -re "" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/reload.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:reload.tcl 4 | # Purpose: reload device 5 | #************************************************************************** 6 | 7 | send "reload\r" 8 | 9 | set loop true 10 | 11 | while($loop == "true") { 12 | expect { 13 | -re "save ?" { 14 | send "no\r" 15 | except "?" 16 | } -re "?" { 17 | send " " 18 | except "confirm" 19 | } -re "confirm" { 20 | send " " 21 | set loop false 22 | } -re "The connection is no longer available." { 23 | set loop false 24 | return 25 | } -re "undefined" { 26 | set ERROR_MESSAGE "Incomplete command" 27 | set ERROR_RESULT true 28 | set loop false 29 | expect $enable_prompt 30 | } -re "reboot_timeout" { 31 | set ERROR_MESSAGE "Incomplete command" 32 | set ERROR_RESULT true 33 | set loop false 34 | expect $enable_prompt 35 | } 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/save.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification: save.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | 7 | send "commit \r" 8 | set loop true 9 | while {$loop == "true"} { 10 | expect -re "Install operation" { 11 | set ERROR_MESSAGE "Missing password" 12 | set ERROR_RESULT true 13 | set loop false 14 | expect $enable_prompt 15 | } -re "y/n" { 16 | send "y" 17 | } -re "Do you wish to proceed" { 18 | send "yes" 19 | } -re "No configuration changes to commit" { 20 | expect $enable_prompt 21 | } -re $enable_prompt { 22 | set loop false 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/CiscoSG500/set_device_boot.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:set_device_boot 3 | # Purpose: set device boot by tftp 4 | #************************************************************************** 5 | 6 | set timeout $long_timeout 7 | set WARNING_RESULT true 8 | 9 | send "boot flash $TFTPFile\r" 10 | 11 | set loop true 12 | 13 | while { $loop == "true" } { 14 | expect { 15 | -re "Install operation failed" { 16 | set ERROR_RESULT true 17 | set ERROR_MESSAGE "Device reports insufficent space to update. Please remove some files." 18 | expect $admin_prompt 19 | set loop false 20 | } -re "Skipped adding the following package as it was already present" { 21 | set ERROR_RESULT true 22 | set ERROR_MESSAGE "Device reports insufficent space to update. Please remove some files." 23 | expect $admin_prompt 24 | set loop false 25 | } -re "Install operation completed successfully" { 26 | expect $enable_prompt 27 | set loop false 28 | } 29 | } 30 | } 31 | 32 | 33 | set timeout $standard_timeout 34 | -------------------------------------------------------------------------------- /DeviceAdapters/Cisco/readme.md: -------------------------------------------------------------------------------- 1 | 2 | # A Cisco Adapter # 3 | ######################################################################### 4 | Import those lines into your adapter-index.xml in the Cisco Root Directory: 5 | # 6 | 7 | 8 | Cisco SG 500 LineUp 9 | 1.3.6.1.4.1.9.6.1.85.16.7 10 | 11 | 12 | # 13 | Don't forget to restart the following IMC process after copying / editing adapters: 14 | imccmdmgrdm, imccfgbakdm, and imcupgdm 15 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/Juniper_Common_CLI.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | connect 6 | 7 | initialize.tcl 8 | 9 | 10 | 11 | 12 | Failed to get to exec mode. 13 | initialize 14 | 15 | enter_exec.tcl 16 | 17 | 18 | exit_exec.tcl 19 | 20 | 21 | 22 | 23 | Failed to get to exec mode. 24 | exec 25 | 26 | enter_shell.tcl 27 | 28 | 29 | exit_shell.tcl 30 | 31 | 32 | 33 | 34 | Failed to get to configure terminal mode. 35 | exec 36 | 37 | enter_config_term.tcl 38 | 39 | 40 | exit_config_term.tcl 41 | 42 | 43 | 44 | 45 | An error occurred while trying to save the configuration. 46 | 47 | save.tcl 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/Juniper_Config_Backup_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Failed to prepare configuration in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 6 | exec 7 | 10 | 11 | 12 | 13 | Failed to copy configuration from the device using SCP. 14 | exec 15 | 18 | 19 | 20 | 21 | Failed to upload configuration to TFTP server. 22 | exec 23 | 26 | 27 | 28 | 29 | Failed to dump startup configuration in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 30 | exec 31 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Juniper routers, EX series switches, OS version 5.5, 6.x, 7.x, 8.x, 9.x 4 | 1.0.0 5 | 6 | 7 | Juniper_Common_CLI.xml 8 | 9 | 10 | 11 | Juniper_Cleanup_Parser.xml 12 | Juniper_Cleanup_Parser_Script.pl 13 | 14 | 15 | 16 | Juniper_Config_Backup_Builder.xml 17 | Juniper_Config_Backup_Builder_Script.xml 18 | 19 | 20 | 21 | Juniper_Config_Deploy_Builder.xml 22 | Juniper_Config_Deploy_Builder_Script.xml 23 | 24 | 25 | 26 | Juniper_Image_Deploy_Builder.xml 27 | Juniper_Image_Deploy_Builder_Script.xml 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/backup_image_scp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_image_scp.tcl 4 | # Purpose: retrieve image or file from device via SCP 5 | #************************************************************************** 6 | 7 | 8 | open 9 | $host 10 | $username 11 | $password 12 | 13 | 14 | 15 | get 16 | $TFTPPath 17 | $TFTPFile 18 | binary 19 | $TFTPFile 20 | 21 | 22 | 23 | close 24 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/backup_startup_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | set timeout $long_timeout 8 | send "show configuration\r" 9 | expect { 10 | "Unable to read configuration" { 11 | set ERROR_MESSAGE "Unable to read configuration. The device may be suffering from a failure." 12 | set ERROR_RESULT true 13 | expect $exec_prompt 14 | } "uthorization failed" { 15 | set ERROR_MESSAGE "The user is not authorized to use the command show running" 16 | set ERROR_RESULT true 17 | expect $exec_prompt 18 | } "syntax error" { 19 | set ERROR_MESSAGE "Could not run command: show configuration" 20 | set ERROR_RESULT true 21 | } -re $exec_prompt { 22 | } 23 | } 24 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/backup_startup_config_scp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_config_scp.tcl 4 | # Purpose: deploy config by scp 5 | #************************************************************************** 6 | 7 | 8 | open 9 | $host 10 | $username 11 | $password 12 | 13 | 14 | 15 | get 16 | ascii 17 | rn_config 18 | 19 | 20 | 21 | close 22 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/cleanup_deployed_file.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:cleanup_deployed_file.tcl 4 | # Purpose: cleanup deployed file 5 | #************************************************************************** 6 | 7 | set WARNING_RESULT true 8 | send "file delete rn_config\r" 9 | expect { 10 | -re "\\d+ errors" { 11 | #set ERROR_MESSAGE "Could not delete rn_config." 12 | #set ERROR_RESULT true 13 | } -re "error: (.*)" { 14 | #set error $expect_out(1,string) 15 | #set ERROR_MESSAGE "Could not delete rn_config: $error" 16 | #set ERROR_RESULT true 17 | } -re $exec_prompt { 18 | } 19 | } 20 | 21 | if { $ERROR_RESULT != "true" } { 22 | set WARNING_RESULT false 23 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/clearup.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:clearup.tcl 4 | # Purpose: try to recover a prompt, then exit 5 | #************************************************************************** 6 | 7 | proc clearup {} { 8 | global ERROR_RESULT 9 | global enable_prompt 10 | global exec_prompt 11 | 12 | if { $ERROR_RESULT == "true" } { 13 | set loop true 14 | while { $loop == "true" } { 15 | send "\r" 16 | expect { 17 | $enable_prompt { 18 | send "quit\r" 19 | set loop false 20 | } -re $exec_prompt { 21 | send "quit\r" 22 | set loop false 23 | } -re "(Bad|denied)" { 24 | send "\r" 25 | } 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/commit_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:commit_config.tcl 4 | # Purpose: commit config 5 | #************************************************************************** 6 | 7 | set WARNING_RESULT true 8 | send "commit\r" 9 | expect { 10 | -re "(error: .*)" { 11 | set error $expect_out(1,string) 12 | set ERROR_MESSAGE "Unable to commit changes. Device returned $error" 13 | set ERROR_RESULT true 14 | } -re $config_prompt { 15 | } -re $exec_prompt { 16 | } 17 | } 18 | 19 | if { $ERROR_RESULT != "true" } { 20 | set WARNING_RESULT false 21 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/delete_file.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:delete_file 4 | # Purpose: delete device file 5 | #************************************************************************** 6 | 7 | proc delete_file {} { 8 | global enable_prompt 9 | global exec_prompt 10 | global error_pattern 11 | global _filename 12 | 13 | send "delete /unreserved $_filename\r" 14 | expect { 15 | "Y/N" { 16 | send "y\r" 17 | } -re $error_pattern { 18 | expect -re $exec_prompt 19 | set ERROR_MESSAGE "The user is not authorized to use the 'system-view' command." 20 | set ERROR_RESULT true 21 | } -re "(can't be found|No such file|Execution failure)" { 22 | } 23 | } 24 | expect -re "($exec_prompt|$enable_prompt)" { 25 | } 26 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/delete_image.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:delete_image.tcl 4 | # Purpose: delete image file 5 | #************************************************************************** 6 | 7 | 8 | if { $delete_everything == "true" } { 9 | 10 | send "file delete \x2a.tgz\r" 11 | expect { 12 | "No such file or directory" { 13 | set ERROR_MESSAGE "Could not delete *.tgz" 14 | set ERROR_RESULT true 15 | $exec_prompt 16 | } -re $exec_prompt { 17 | } 18 | } 19 | 20 | } else { 21 | 22 | send "file delete $slot$TFTPFile\r" 23 | expect { 24 | "No such file or directory" { 25 | set ERROR_MESSAGE "Could not delete $TFTPFile" 26 | set ERROR_RESULT true 27 | $exec_prompt 28 | } -re $exec_prompt { 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/deploy_config_scp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_config_scp.tcl 4 | # Purpose: deploy config by scp 5 | #************************************************************************** 6 | 7 | 8 | open 9 | $host 10 | $username 11 | $password 12 | 13 | 14 | 15 | put 16 | ascii 17 | rn_config 18 | 19 | 20 | 21 | close 22 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/deploy_image_ftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_image_ftp.tcl 4 | # Purpose: deploy image to device by cli 5 | #************************************************************************** 6 | 7 | set timeout 1800 8 | set WARNING_RESULT true 9 | send "file copy ftp://$FTPUser@$TFTPServer/$TFTPFile $slot$DestTFTPFile\r" 10 | set loop true 11 | while {$loop == "true"} { 12 | expect { 13 | -re "Password.*:" { 14 | send "$FTPPassword\r" 15 | set loop false 16 | } -re "(error.*)" { 17 | set plugin $expect_out(1,string) 18 | set ERROR_RESULT true 19 | set ERROR_MESSAGE $plugin 20 | set loop false 21 | return 22 | } 23 | } 24 | } 25 | expect { 26 | -re "(error.*)" { 27 | set plugin $expect_out(1,string) 28 | set ERROR_RESULT true 29 | set ERROR_MESSAGE $plugin 30 | #expect $exec_prompt 31 | return 32 | } -re $exec_prompt { 33 | } 34 | } 35 | 36 | set timeout $standard_timeout 37 | expect $exec_prompt 38 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/deploy_image_scp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_image_scp_cli.tcl 4 | # Purpose: deploy image to device by cli 5 | #************************************************************************** 6 | 7 | if { $SSHUser == "" } { 8 | set ERROR_RESULT true 9 | set ERROR_MESSAGE "The SSHUser configuration option must be set in Administrative Options, Device Access" 10 | } 11 | if { $ERROR_RESULT != "true" } { 12 | set timeout 1000 13 | set WARNING_RESULT true 14 | send "file copy scp://$SSHUser@$TFTPServer/$TFTPFile $TFTPFile\r" 15 | set loop true 16 | while {$loop == "true"} { 17 | expect { 18 | "continue connecting (yes/no)?" { 19 | send "yes\r" 20 | } "assword:" { 21 | send "$SSHPassword\r" 22 | set loop false 23 | } -re "(error.*)" { 24 | set plugin $expect_out(1,string) 25 | set ERROR_RESULT true 26 | set ERROR_MESSAGE $plugin 27 | set loop false 28 | } 29 | } 30 | } 31 | expect { 32 | -re "(error.*)" { 33 | set plugin $expect_out(1,string) 34 | set ERROR_RESULT true 35 | set ERROR_MESSAGE $plugin 36 | expect $exec_prompt 37 | } -re $exec_prompt { 38 | } 39 | } 40 | 41 | set timeout $standard_timeout 42 | if { $ERROR_RESULT != "true" } { 43 | set WARNING_RESULT false 44 | } 45 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/deploy_image_scp_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_image_scp_cli.tcl 4 | # Purpose: deploy image to device by cli 5 | #************************************************************************** 6 | 7 | if { $SSHUser == "" } { 8 | set ERROR_RESULT true 9 | set ERROR_MESSAGE "The SSHUser configuration option must be set in Administrative Options, Device Access" 10 | } 11 | if { $ERROR_RESULT != "true" } { 12 | set timeout 1000 13 | set WARNING_RESULT true 14 | send "file copy scp://$SSHUser@$TFTPServer/$TFTPFile $TFTPFile\r" 15 | set loop true 16 | while {$loop == "true"} { 17 | expect { 18 | "continue connecting (yes/no)?" { 19 | send "yes\r" 20 | } "assword:" { 21 | send "$SSHPassword\r" 22 | set loop false 23 | } -re "(error.*)" { 24 | set plugin $expect_out(1,string) 25 | set ERROR_RESULT true 26 | set ERROR_MESSAGE $plugin 27 | set loop false 28 | } 29 | } 30 | } 31 | expect { 32 | -re "(error.*)" { 33 | set plugin $expect_out(1,string) 34 | set ERROR_RESULT true 35 | set ERROR_MESSAGE $plugin 36 | expect $exec_prompt 37 | } -re $exec_prompt { 38 | } 39 | } 40 | 41 | set timeout $standard_timeout 42 | if { $ERROR_RESULT != "true" } { 43 | set WARNING_RESULT false 44 | } 45 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/enter_config_term.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_config_term 4 | # Purpose: enter the "config term" mode on the device 5 | #************************************************************************** 6 | 7 | send "configure\r" 8 | expect { 9 | "unknown command" { 10 | set ERROR_MESSAGE "Could not utilize the configure command on this device." 11 | set ERROR_RESULT true 12 | expect $exec_prompt 13 | } "Users currently editing" { 14 | # Look for a config prompt that _starts_ the line [there are two here] 15 | expect -re "edit]" 16 | } -re $config_prompt { 17 | expect $enable_prompt 18 | } 19 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/enter_shell.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_shell 4 | # Purpose: enter the "shell" mode on the device 5 | #************************************************************************** 6 | 7 | set timeout $standard_timeout 8 | 9 | send "start shell\r" 10 | expect { 11 | $shell_prompt { 12 | #ok 13 | } -re $error_pattern { 14 | set error_message $expect_out(1,string) 15 | expect -re $exec_prompt 16 | set ERROR_RESULT true 17 | set ERROR_MESSAGE "Device error: $error_message" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/exit_config_term.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_config_term 4 | # Purpose: exit the "config term" mode on the device 5 | #************************************************************************** 6 | 7 | if { $enforce_save == "true" } { 8 | save 9 | } 10 | 11 | send "exit\r" 12 | expect { 13 | "\\?" { 14 | send "yes\r" 15 | expect $exec_prompt 16 | } $orig_exec_prompt { 17 | if {$useTruePrompt != "false"} { 18 | send "\r" 19 | expect -re "(.*?$orig_exec_prompt)" 20 | set exec_prompt $expect_out(1,string) 21 | } 22 | } $exec_prompt { 23 | } 24 | } 25 | 26 | if { $ERROR_RESULT != "true" } { 27 | set WARNING_RESULT false 28 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_exec 4 | # Purpose: quit the "exec" mode on the device 5 | #************************************************************************** 6 | 7 | if {$enforce_save == "true"} { 8 | send "configure\r" 9 | expect { 10 | "unknown command" { 11 | set ERROR_MESSAGE "Could not save the configuration. The configure command was not accepted by the device." 12 | set ERROR_RESULT true 13 | expect $exec_prompt 14 | } $config_prompt { 15 | send "commit\r" 16 | expect $config_prompt 17 | send "exit\r" 18 | expect { 19 | "Exit with uncommitted changes" { 20 | # Commit may have failed,.. but exit anyways 21 | send "yes\r" 22 | expect $exec_prompt 23 | } $exec_prompt { 24 | # Success 25 | } 26 | } 27 | } 28 | } 29 | } 30 | 31 | send "exit\r" -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/exit_shell.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_shell 4 | # Purpose: quit the "shell" mode on the device 5 | #************************************************************************** 6 | 7 | set timeout $standard_timeout 8 | send "exit\r" 9 | expect $exec_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/get_board_number.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_board_number.tcl 3 | # Purpose: get device board number which current image is located 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | send "display boot-loader\r" 9 | set loop true 10 | 11 | while {$loop == "true"} { 12 | expect { 13 | -re $more_prompt { 14 | send " " 15 | } -re "\n.+$error_pattern" { 16 | expect -re $exec_prompt 17 | set loop false 18 | } -re $exec_prompt { 19 | set loop false 20 | } "Unrecognized command" { 21 | set loop false 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/get_image_position.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_software_position.tcl 3 | # Purpose: get device current software position 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | expect * 9 | send "show system storage\r" 10 | set loop true 11 | 12 | while {$loop == "true"} { 13 | expect { 14 | -re "$more_prompt" { 15 | send " " 16 | } -re "\n.+$error_pattern" { 17 | set error_message $expect_out(1,string) 18 | expect -re $exec_prompt 19 | set ERROR_RESULT true 20 | set ERROR_MESSAGE "Device error: $error_message" 21 | set loop false 22 | } -re $exec_prompt { 23 | # Done 24 | set loop false 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/get_image_size.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_software_size.tcl 3 | # Purpose: get device current software size 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | expect * 9 | send "dir $slot/$TFTPFile\r" 10 | set loop true 11 | 12 | while {$loop == "true"} { 13 | expect { 14 | -re "$more_prompt" { 15 | send " " 16 | } -re "\n.+$error_pattern" { 17 | set error_message $expect_out(1,string) 18 | expect -re $exec_prompt 19 | set ERROR_RESULT true 20 | set ERROR_MESSAGE "Device error: $error_message" 21 | set loop false 22 | } -re $exec_prompt { 23 | # Done 24 | set loop false 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/get_image_version.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_software_version.tcl 3 | # Purpose: get device software version 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | 9 | send "show system software\r" 10 | set loop true 11 | 12 | while {$loop == "true"} { 13 | expect { 14 | -re $more_prompt { 15 | send " " 16 | } -re "\n.+$error_pattern" { 17 | set error_message $expect_out(1,string) 18 | expect -re $exec_prompt 19 | #set ERROR_RESULT true 20 | #set ERROR_MESSAGE "Device error: $error_message" 21 | set redo "true" 22 | set loop false 23 | } -re $exec_prompt { 24 | # Done 25 | set loop false 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/get_partion_info.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_partion_info.tcl 3 | # Purpose: get device partion info 4 | #************************************************************************** 5 | 6 | sleep 1 7 | 8 | send "show system storage\r" 9 | set loop true 10 | 11 | while {$loop == "true"} { 12 | expect { 13 | -re $more_prompt { 14 | send " " 15 | } -re "\n.+$error_pattern" { 16 | set error_message $expect_out(1,string) 17 | expect -re $exec_prompt 18 | set ERROR_RESULT true 19 | set ERROR_MESSAGE "Device error: $error_message" 20 | set loop false 21 | } -re $exec_prompt { 22 | # Done 23 | set loop false 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/get_startup_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:get_startup_config.tcl 4 | # Purpose: get startup configuration file name by cli 5 | #************************************************************************** 6 | 7 | 8 | # Display startup returns the name of the startup configuration file 9 | send "display startup\r" 10 | set loop true 11 | 12 | while {$loop == "true"} { 13 | expect { 14 | -re $more_prompt { 15 | send " " 16 | } -re "\n.+$error_pattern" { 17 | set error_message $expect_out(1,string) 18 | expect -re $exec_prompt 19 | set ERROR_RESULT true 20 | set ERROR_MESSAGE "Device error: $error_message" 21 | set loop false 22 | } -re $exec_prompt { 23 | # Done 24 | set loop false 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/initialize.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:initialize 4 | # Purpose: initialize variables 5 | #************************************************************************** 6 | 7 | set standard_timeout 12 8 | set long_timeout 120 9 | set very_long_timeout 1800 10 | set very_very_long_timeout 2400 11 | set squeeze_timeout 15000 12 | 13 | set username_prompt login: 14 | set password_prompt "assword:|nter PASSCODE:" 15 | set next_passcode_prompt "tokencode:|ext PASSCODE:" 16 | set orig_exec_prompt > 17 | set orig_enable_prompt # 18 | set exec_prompt > 19 | set enable_prompt # 20 | set shell_prompt % 21 | set config_prompt "edit]" 22 | set config_filename rn_config 23 | set enforce_save true 24 | set timeout $standard_timeout 25 | set more_prompt {---.more} 26 | set pause $more_prompt 27 | set sent_password "false" 28 | set banner_skip_repeat 0 29 | set banner_skip {(($password_prompt)|($username_prompt)|($exec_prompt)|($enable_prompt)){$banner_skip_repeat}} 30 | set error_pattern {((Unknown|syntax error).*)} 31 | set delete_files "true" 32 | set delete_everything "false" 33 | set use_securid "exec" 34 | set next_passcode " " 35 | set useTruePrompt "false" 36 | set resetMorePrompting "true" 37 | set ERROR_RESULT "" 38 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/load_image.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:load_image.tcl 4 | # Purpose: set the device next startup image by cli 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | send "request system software add $slot$TFTPFile no-validate\r" 9 | expect { 10 | -re "ERROR: (.*)" { 11 | set error $expect_out(1,string) 12 | set ERROR_MESSAGE "Could not load OS image: $error" 13 | set ERROR_RESULT true 14 | return 15 | } -re "error: (.*)" { 16 | set error $expect_out(1,string) 17 | set ERROR_MESSAGE "Could not load OS image: $error" 18 | set ERROR_RESULT true 19 | return 20 | } -re "Installing package" { 21 | #begin 22 | } "Checking pending install" { 23 | #begin 24 | } 25 | } 26 | 27 | expect { 28 | -re "ERROR: (.*)" { 29 | set error $expect_out(1,string) 30 | set ERROR_MESSAGE "Could not load OS image: $error" 31 | set ERROR_RESULT true 32 | return 33 | } -re "error: (.*)" { 34 | set error $expect_out(1,string) 35 | set ERROR_MESSAGE "Could not load OS image: $error" 36 | set ERROR_RESULT true 37 | return 38 | } -re "$exec_prompt" { 39 | } 40 | } 41 | 42 | set timeout $standard_timeout 43 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/load_running_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_running_config_cli 4 | # Purpose: deploy running configuration by cli 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | set WARNING_RESULT true 9 | send "load replace rn_config\r" 10 | 11 | expect { 12 | -re "\\d+ errors" { 13 | set ERROR_MESSAGE "Could not merge the configuration due to errors in the deployed configuration." 14 | set ERROR_RESULT true 15 | } -re "error: (.*)" { 16 | set ERROR_MESSAGE "Could not load configuration." 17 | set ERROR_RESULT true 18 | } "load complete" { 19 | } 20 | } 21 | expect $config_prompt 22 | 23 | if { $ERROR_RESULT != "true" } { 24 | set WARNING_RESULT false 25 | } 26 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/prepare_startup_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | #Identification: prepare_startup_config_cli 4 | #Purpose: prepare startup config by cli. 5 | #************************************************************************** 6 | 7 | set timeout $long_timeout 8 | send "show configuration | no-more | save $config_filename\r" 9 | expect { 10 | "Unable to read configuration" { 11 | set ERROR_MESSAGE "Unable to read configuration. The device may be suffering from a failure." 12 | set ERROR_RESULT true 13 | expect $exec_prompt 14 | } "uthorization failed" { 15 | set ERROR_MESSAGE "The user is not authorized to use the command show running" 16 | set ERROR_RESULT true 17 | expect $exec_prompt 18 | } "syntax error" { 19 | set ERROR_MESSAGE "Could not run command: show configuration" 20 | set ERROR_RESULT true 21 | } "lines of output to" { 22 | # Warning: sometimes device re-echoes the prompt because of a line wrap... look for 23 | # the actual 'save' message to exit properly without truncating the configuration. 24 | 25 | # Success -- wrote so-and-so many lines 26 | expect $exec_prompt 27 | } 28 | } 29 | set timeout $standard_timeout 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/reload.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:reload.tcl 4 | # Purpose: reload device 5 | #************************************************************************** 6 | 7 | expect "*" 8 | 9 | #set timeout 60 10 | send "request system reboot\r" 11 | 12 | set loop true 13 | while {$loop == "true"} { 14 | expect { 15 | -re "Reboot" { 16 | send "yes\r" 17 | set loop flase 18 | #close 19 | } -re $exec_prompt { 20 | set loop flase 21 | } 22 | } 23 | } 24 | 25 | set timeout 4 -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/save_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:save_config.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | 7 | save; -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/set_device_boot.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:set_device_boot.tcl 4 | # Purpose: set the device next startup image by cli 5 | # don't support 6 | #************************************************************************** 7 | 8 | return -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/JuniperGeneric/verify_image.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:verify_image.tcl 4 | # Purpose: verify OS via CLI 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | send "request system software validate $slot$DestTFTPFile\r" 9 | 10 | expect { 11 | "truncated or corrupted package" { 12 | } -re "ERROR: (.*)" { 13 | set error $expect_out(1,string) 14 | set ERROR_MESSAGE "Could not verify OS image: $error" 15 | set ERROR_RESULT true 16 | } -re "error: (.*)" { 17 | set error $expect_out(1,string) 18 | set ERROR_MESSAGE "Could not verify OS image: $error" 19 | set ERROR_RESULT true 20 | } "Validation succeeded" { 21 | expect $exec_prompt 22 | } $exec_prompt { 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Cleanup_Parser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NetScreen_Cleanup_Parser_Script.pl 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Cleanup_Parser_Script.pl: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/perl 2 | 3 | sub stripCarriageReturns 4 | { 5 | my($rawdata) = @_; 6 | 7 | $rawdata =~ s/[\r\x80\xC0]//g; 8 | 9 | return $rawdata; 10 | } 11 | 12 | sub removeMores 13 | { 14 | my($rawdata) = @_; 15 | 16 | $rawdata = stripCarriageReturns($rawdata); 17 | $rawdata =~ s/ ?---\(more\)--[ \S]*[\s\cH]+\cH//g; 18 | 19 | return $rawdata; 20 | } 21 | 22 | sub stripLastLine 23 | { 24 | my($rawdata) = @_; 25 | 26 | @lines = split('\n', $rawdata); 27 | 28 | $#lines--; 29 | 30 | my($cleandata) = ""; 31 | my($linecount) = 0; 32 | foreach $line (@lines) 33 | { 34 | if ($linecount == $#lines) 35 | { 36 | $cleandata .= "$line"; 37 | } 38 | else 39 | { 40 | $cleandata .= "$line\n"; 41 | } 42 | $linecount++; 43 | } 44 | 45 | while ($cleandata =~ /\n$/) 46 | { 47 | $cleandata =~ s/\n$//g; 48 | } 49 | 50 | return $cleandata; 51 | } 52 | 53 | sub cleanupCLIConfiguration 54 | { 55 | my($config) = @_; 56 | my(@array) = (); 57 | 58 | $start = index($config, "version"); 59 | if ($start == -1) 60 | { 61 | $start = 0; 62 | } 63 | $cleanConfig = substr($config, $start); 64 | $cleanConfig = removeMores($cleanConfig); 65 | $cleanConfig = stripLastLine($cleanConfig); 66 | 67 | return $cleanConfig . "\n"; 68 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Common_CLI.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | connect 6 | 7 | initialize.tcl 8 | 9 | 10 | 11 | 12 | Failed to get to exec mode. 13 | initialize 14 | 15 | enter_exec.tcl 16 | 17 | 18 | exit_exec.tcl 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Config_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Config_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Failed to download configuration to TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 5 | exec 6 | 9 | 10 | 11 | 12 | An error occurred while trying to save the config 13 | exec 14 | 17 | 18 | 19 | 20 | An error occurred while trying to reload device. 21 | exec 22 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Image_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/NetScreen_Image_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Failed to retrieve image in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 6 | exec 7 | 10 | 11 | 12 | 13 | exec 14 | 17 | 18 | 19 | 20 | exec 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Juniper (formerly NetScreen) firewalls; VPNs, OS version 2.6.1, 5.x, 6.x 4 | 1.0.0 5 | 6 | 7 | NetScreen_Common_CLI.xml 8 | 9 | 10 | 11 | NetScreen_Cleanup_Parser.xml 12 | NetScreen_Cleanup_Parser_Script.pl 13 | 14 | 15 | 16 | NetScreen_Config_Backup_Builder.xml 17 | NetScreen_Config_Backup_Builder_Script.xml 18 | 19 | 20 | 21 | NetScreen_Config_Deploy_Builder.xml 22 | NetScreen_Config_Deploy_Builder_Script.xml 23 | 24 | 25 | 26 | NetScreen_Image_Deploy_Builder.xml 27 | NetScreen_Image_Deploy_Builder_Script.xml 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/backup_running_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | expect "*" 8 | send "get config\n" 9 | expect $exec_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/backup_running_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_running_config_tftp 4 | # Purpose: backup running configuration by tftp 5 | #************************************************************************** 6 | send "\r" 7 | expect -re $exec_prompt 8 | set timeout $very_long_timeout 9 | set WARNING_RESULT true 10 | send "get config > tftp $TFTPServer $TFTPFile $TFTPInterface\r" 11 | expect { 12 | -re "tftp success!" { 13 | } -re "tftp (abort|timeout max|send rrq error)" { 14 | set ERROR_MESSAGE "Could not copy configuration to the TFTP server." 15 | set ERROR_RESULT true 16 | } -re "redirect tty failed" { 17 | set plugin1 expect_out(1,string) 18 | set ERROR_MESSAGE "The TFTP transaction failed: $plugin1" 19 | set ERROR_RESULT true 20 | } 21 | } 22 | expect -re $exec_prompt 23 | if { $ERROR_RESULT != "true" } { 24 | set WARNING_RESULT false 25 | } 26 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/backup_startup_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | expect "*" 8 | send "get config saved\n" 9 | expect $exec_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/backup_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_tftp 4 | # Purpose: backup startup configuration by tftp 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | set WARNING_RESULT true 9 | send "get config saved > tftp $TFTPServer $TFTPFile $TFTPInterface\r" 10 | expect { 11 | -re "tftp success" { 12 | } -re "tftp (abort|timeout max|send rrq error)" { 13 | set ERROR_MESSAGE "Could not copy configuration to the TFTP server." 14 | set ERROR_RESULT true 15 | } -re "redirect tty failed" { 16 | set plugin1 expect_out(1,string) 17 | set ERROR_MESSAGE "The TFTP transaction failed: $plugin1" 18 | set ERROR_RESULT true 19 | } 20 | } 21 | expect -re $exec_prompt 22 | if { $ERROR_RESULT != "true" } { 23 | set WARNING_RESULT false 24 | } 25 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/delete_image.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:delete_image.tcl 4 | # Purpose: delete image file 5 | # don't support 6 | #************************************************************************** 7 | 8 | return -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/deploy_image.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_image_cli.tcl 4 | # Purpose: deploy image to device by cli 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | set WARNING_RESULT true 9 | 10 | send "save config to tftp $TFTPServer backup.cfg" 11 | expect { 12 | -re "TFTP Succeeded" { 13 | } -re "Failed" { 14 | set ERROR_RESULT true 15 | set ERROR_MESSAGE "Could not backup configuration file to TFTPServer: $TFTPServer." 16 | expect -re exec_prompt 17 | } 18 | } 19 | send "\r" 20 | expect -re $exec_prompt 21 | send "save software from tftp $TFTPServer $TFTPFile to flash\r" 22 | 23 | expect { 24 | -re "tftp success!" { 25 | } -re " failed" { 26 | set ERROR_RESULT true 27 | set ERROR_MESSAGE "Could not copy image from TFTP server. Image did not exist or content was invalid." 28 | expect -re $exec_prompt 29 | } 30 | 31 | } 32 | 33 | 34 | set timeout $standard_timeout 35 | if { $ERROR_RESULT != "true" } { 36 | set WARNING_RESULT false 37 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/deploy_running_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_running_config_tftp 4 | # Purpose: depoly running configuration by tftp 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | send "save config from tftp $TFTPServer $TFTPFile merge\r" 9 | expect { 10 | -re "TFTP Failed" { 11 | set ERROR_MESSAGE "Could not read file $TFTPFile from server $TFTPServer on $TFTPInterface" 12 | set ERROR_RESULT true 13 | expect $exec_prompt 14 | } -re "TFTP Succeeded" { 15 | set Testvalue true 16 | } 17 | } 18 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/deploy_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_startup_config_tftp 4 | # Purpose: depoly startup configuration by tftp 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | set WARNING_RESULT true 9 | send "save config from tftp $TFTPServer $TFTPFile $TFTPInterface\r" 10 | expect { 11 | "unknown keyword" { 12 | set ERROR_MESSAGE "Invalid TFTP command" 13 | set ERROR_RESULT true 14 | expect $exec_prompt 15 | } -re "(tftp abort|TFTP Failed)" { 16 | set ERROR_MESSAGE "Could not read file $TFTPFile from server $TFTPServer on $TFTPInterface" 17 | set ERROR_RESULT true 18 | expect $exec_prompt 19 | } "TFTP Succeeded" { 20 | expect { 21 | -re "[Ff]ailed[\t ]+[Cc]ommand.*" { 22 | set ERROR_NONFATAL "true" 23 | expect $exec_prompt 24 | } $exec_prompt { 25 | } 26 | } 27 | } 28 | } 29 | if { $ERROR_RESULT != "true" && $ERROR_NONFATAL != "true" } { 30 | set WARNING_RESULT false 31 | } 32 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/enter_exec.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_exec 4 | # Purpose: enter the "exec" mode on the device 5 | #************************************************************************** 6 | 7 | set IGNORE_DELAY true 8 | set loop true 9 | set sent_password false 10 | while {$loop == "true"} { 11 | expect { 12 | "Store key in cache? (y/n)" { 13 | send "y\r" 14 | } -re $password_prompt { 15 | if {$sent_password == "true"} { 16 | set ERROR_MESSAGE "Incorrect password" 17 | set ERROR_RESULT true 18 | exit 19 | } 20 | send "$password\r" 21 | set sent_password true 22 | } -re $username_prompt { 23 | send "$username\r" 24 | } -re "Accept this agreement" { 25 | send "y\r" 26 | } -re $exec_prompt { 27 | send "\r" 28 | expect -re $exec_prompt 29 | set loop false 30 | } -re "failed" { 31 | set ERROR_MESSAGE "Login failed" 32 | set ERROR_RESULT true 33 | exit 34 | } 35 | } 36 | } 37 | set IGNORE_DELAY true -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_exec 4 | # Purpose: quit the "exec" mode on the device 5 | #************************************************************************** 6 | 7 | send "exit\r" 8 | expect { 9 | -re "Configuration modified, save?" { 10 | send "y\r" 11 | } -re "closed" { 12 | # May receive this from a bastion host connection 13 | } timeout { 14 | } 15 | } -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/initialize.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:initialize 4 | # Purpose: initialize variables 5 | #************************************************************************** 6 | 7 | set standard_timeout 10 8 | set long_timeout 60 9 | set very_long_timeout 120 10 | set username_prompt login: 11 | set password_prompt assword: 12 | set orig_exec_prompt -> 13 | set exec_prompt -> 14 | set enforce_save false 15 | set timeout $standard_timeout 16 | set more_prompt "--- more ---" 17 | set pause $more_prompt 18 | set page_size 22 19 | set banner_skip_repeat 0 20 | set TFTPInterface "" 21 | #set banner_skip "([\s\S]*?($password_prompt)|($username_prompt)|($exec_prompt)){$banner_skip_repeat}" 22 | # Reset this custom variable if it's not set 23 | #if {$TFTPInterface == "\x24TFTPInterface"} { 24 | # set TFTPInterface " " 25 | #} -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/reload.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:reload.tcl 4 | # Purpose: reload device 5 | #************************************************************************** 6 | 7 | send "reset\r" 8 | expect { 9 | -re "Configuration modified, save?" { 10 | send "y\r" 11 | expect -re "System reset" 12 | send "y\r" 13 | } -re "System reset" { 14 | send "y\r" 15 | } 16 | } 17 | close -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/save_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:save_config.tcl 4 | # Purpose: set the device next startup image by cli 5 | #************************************************************************** 6 | 7 | send "save\r" 8 | expect -re $exec_prompt 9 | -------------------------------------------------------------------------------- /DeviceAdapters/Juniper networks/NetScreen/set_device_boot.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:set_device_boot.tcl 4 | # Purpose: set the device next startup image by cli 5 | #************************************************************************** 6 | 7 | send "reset\r" 8 | expect { 9 | -re "are you sure?" { 10 | send "\r" 11 | expect -re "reset" { 12 | } 13 | } 14 | } 15 | return -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/Readme.md: -------------------------------------------------------------------------------- 1 | # Adapter for MikroTik router 2 | 3 | 03-08-2016: Adding Router OS6. 4 | 5 | Don't forget to restart the following IMC porcess after copying / editing adapters: 6 | imccmdmgrdm, imccfgbakdm, and imcupgdm -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/Mikrotik_Cleanup_Parser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Mikrotik_Cleanup_Parser_Script.pl 5 | 11 | 12 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/Mikrotik_Cleanup_Parser_Script.pl: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/perl 2 | 3 | sub cleanupConfiguration 4 | { 5 | my($config) = @_; 6 | 7 | # CLI sometimes leaks in some syslog messages.. remove them _first_ [important] 8 | # $config =~ s/(^|\n)\%.*//g; 9 | 10 | $start = index($config, "\# software id = "); 11 | if ($start == -1) 12 | { 13 | $start = 0; 14 | } 15 | 16 | $cleanConfig = substr($config, $start); 17 | 18 | # Get rid of the exec prompt at the end, and any blank lines 19 | $cleanConfig =~ s/\[.*\] \>.*/\n/; 20 | $cleanConfig =~ s/\n+$//; 21 | 22 | # Add a trailing newline to match file transfer results 23 | $cleanConfig = $cleanConfig . "\n"; 24 | 25 | return $cleanConfig; 26 | } 27 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/Mikrotik_Common_CLI.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | connect 6 | 7 | initialize.tcl 8 | 9 | 10 | 11 | 12 | Failed to get to exec mode. 13 | initialize 14 | 15 | enter_exec.tcl 16 | 17 | 18 | exit_exec.tcl 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/Mikrotik_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/Mikrotik_Config_Backup_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Failed to backup configuration 5 | exec 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 3 | 4 | 5 | Mikrotik_Common_CLI.xml 6 | 7 | 8 | 9 | Mikrotik_Config_Backup_Builder.xml 10 | Mikrotik_Config_Backup_Builder_Script.xml 11 | 12 | 13 | 14 | Mikrotik_Cleanup_Parser.xml 15 | Mikrotik_Cleanup_Parser_Script.pl 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/backup_startup_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | set timeout $standard_timeout 3 | sleep 1 4 | 5 | expect -re $exec_prompt { 6 | } 7 | 8 | send "export\r" 9 | 10 | expect -re # 11 | 12 | expect -re $exec_prompt { 13 | } 14 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/enter_exec.tcl: -------------------------------------------------------------------------------- 1 | set IGNORE_DELAY true 2 | 3 | set loop true 4 | set timeout $standard_timeout 5 | 6 | while {$loop == "true"} { 7 | expect { 8 | $password_prompt { 9 | send "$password" 10 | sleep 1 11 | send "\r" 12 | } $username_prompt { 13 | send "$username" 14 | sleep 1 15 | send "\r" 16 | } $login_as { 17 | send "$username" 18 | sleep 1 19 | send "\r" 20 | } $info_prompt { 21 | send "\r" 22 | } "Store key in cache" { 23 | send "y\r" 24 | set loop false 25 | } -re $exec_prompt { 26 | set loop false 27 | } "incorrect username or password" { 28 | set ERROR_MESSAGE "Authentication failed" 29 | set ERROR_RESULT true 30 | return 31 | } "Access denied" { 32 | set ERROR_MESSAGE "Authentication failed" 33 | set ERROR_RESULT true 34 | return 35 | } 36 | } 37 | } 38 | 39 | set IGNORE_DELAY false 40 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | send "quit\r" -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/RouterOS6/initialize.tcl: -------------------------------------------------------------------------------- 1 | set standard_timeout 10 2 | set long_timeout 120 3 | set very_long_timeout 1800 4 | set username_prompt ogin: 5 | set password_prompt assword: 6 | set login_as "ogin as:" 7 | set info_prompt "continue!" 8 | set exec_prompt "] >" 9 | set timeout $standard_timeout 10 | 11 | set ERROR_RESULT false 12 | set ERROR_MESSAGE "" 13 | -------------------------------------------------------------------------------- /DeviceAdapters/MikroTik/adapter-index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Mikrotik demo adapter for RouterOS v6 and Higher 7 | 1.3.6.1.4.1.14988.1 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/Moto_Cleanup_Parser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Moto_Cleanup_Parser_Script.pl 5 | 11 | 12 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/Moto_Common_CLI.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | connect 6 | 7 | initialize.tcl 8 | 9 | 10 | 11 | 12 | Failed to get to exec mode. 13 | initialize 14 | 15 | enter_exec.tcl 16 | 17 | 18 | exit_exec.tcl 19 | 20 | 21 | 22 | 23 | Failed to get to enable mode WCW 24 | exec 25 | 26 | enter_enable.tcl 27 | 28 | 29 | exit_enable.tcl 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/Moto_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/Moto_Config_Backup_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Failed to backup configuration 5 | exec 6 | 9 | 10 | 11 | 12 | Failed to backup configuration 13 | exec 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/Moto_Config_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/Moto_Config_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Failed to Deploy Configurations Via CLI 6 | exec 7 | 10 | 11 | 12 | 13 | Failed to download configuration from TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 14 | exec 15 | 18 | 19 | 20 | 21 | An error occurred while trying to reload device. 22 | exec 23 | 26 | 27 | 28 | 29 | An error occurred while trying to save the configuration. 30 | exec 31 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/Moto_Image_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Failed to deploy image in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 6 | enable 7 | 10 | 11 | 12 | 13 | Failed to deploy image in SFTP. Command syntax may be incorrect, or prompts may not be what was expected. 14 | sftp-exec 15 | 18 | 19 | 20 | 21 | Failed to deploy image by SCP. Command syntax may be incorrect, or prompts may not be what was expected. 22 | connect 23 | 26 | 27 | 28 | 29 | Failed to get version information in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 30 | enable 31 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 3 | 4 | 5 | Moto_Common_CLI.xml 6 | 7 | 8 | 9 | Moto_Config_Backup_Builder.xml 10 | Moto_Config_Backup_Builder_Script.xml 11 | 12 | 13 | 14 | Moto_Config_Deploy_Builder.xml 15 | Moto_Config_Deploy_Builder_Script.xml 16 | 17 | 18 | 19 | Moto_Cleanup_Parser.xml 20 | Moto_Cleanup_Parser_Script.pl 21 | 22 | 23 | 24 | Moto_Image_Deploy_Builder.xml 25 | Moto_Image_Deploy_Builder_Script.xml 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/backup_startup_config_cli.tcl: -------------------------------------------------------------------------------- 1 | set timeout $standard_timeout 2 | sleep 1 3 | 4 | expect -re $exec_prompt { 5 | } 6 | 7 | send "system\r" 8 | expect -re "system)>" 9 | send "config\r" 10 | expect -re "system.config)>" 11 | send "set server 10.0.30.52\r" 12 | send "set file AP5131.cfg\r" 13 | send "export tftp/r" 14 | send "../r" 15 | send "../r" 16 | 17 | expect -re $exec_prompt { 18 | } 19 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/backup_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | set timeout $standard_timeout 2 | sleep 1 3 | 4 | expect -re $exec_prompt { 5 | } 6 | 7 | send "system\r" 8 | expect -re "system.*" 9 | send "config\r" 10 | expect -re "system.config.*" 11 | send "set server $TFTPServer\r" 12 | expect -re "system.config.*" 13 | send "set file $TFTPFile\r" 14 | expect -re "system.config.*" 15 | send "export tftp\r" 16 | expect -re "Export Operation*.*Done.*" 17 | send "..\r" 18 | expect -re "system.*" 19 | send "..\r" 20 | 21 | expect -re $exec_prompt { 22 | } 23 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/backup_to_dev.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:backup_to_dev.tcl 3 | # Purpose: Do Nothing Not supported 4 | #************************************************************************** 5 | 6 | return -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/deploy_image.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_image.tcl 4 | # Purpose: deploy image to device by cli 5 | #************************************************************************** 6 | 7 | send "system\r" 8 | expect $system_prompt 9 | send "fw-update\r" 10 | expect $fwupdate_prompt 11 | send "set file $TFTPFile\r" 12 | expect $fwupdate_prompt 13 | send "set server $TFTPServer\r" 14 | expect $fwupdate_prompt 15 | send "update tftp\r" 16 | expect "Load complete. System will now reset to update" 17 | close 18 | 19 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/deploy_running_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | #Identification: deploy_running_config_cli 4 | #Purpose: deploy running configuration by cli. 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | 9 | foreach entry $commands { 10 | send "$entry\r" 11 | expect $exec_prompt 12 | } 13 | 14 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/deploy_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:deploy_startup_config_tftp 3 | # Purpose: deploy startup configuration by tftp 4 | #************************************************************************** 5 | 6 | set timeout $standard_timeout 7 | sleep 1 8 | 9 | expect -re $exec_prompt { 10 | } 11 | 12 | send "system\r" 13 | expect -re "system.*" 14 | send "config\r" 15 | expect -re "system.config.*" 16 | send "set server $TFTPServer\r" 17 | expect -re "system.config.*" 18 | send "set file $TFTPFile\r" 19 | expect -re "system.config.*" 20 | send "import tftp\r" 21 | expect -re "Import Operation*.*Done.*" 22 | send "..\r" 23 | expect -re "system.*" 24 | send "..\r" 25 | 26 | expect -re $exec_prompt { 27 | } -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/do_nothing.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:set_device_boot.tcl 4 | # Purpose: set the device next startup image by cli 5 | # Does Not Apply to AP 5131 6 | #************************************************************************** 7 | 8 | return 9 | 10 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/enter_config_term.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_config_terminal 4 | # Purpose: enter the "config terminal" mode on the device 5 | # N.A. Do Nothing 6 | #************************************************************************** 7 | 8 | send "\r" 9 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/enter_enable.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:enter_enable 3 | # Purpose: enter the "enable" mode on the device 4 | #************************************************************************** 5 | 6 | expect "*" 7 | sleep 1 8 | send "\r\r" 9 | 10 | set loop true 11 | while {$loop == "true"} { 12 | expect { 13 | -re $enable_prompt { 14 | set loop false 15 | } -re "Access denied" { 16 | set ERROR_MESSAGE "Enable access denied" 17 | set ERROR_RESULT true 18 | set loop false 19 | } -re "% Incorrect Password" { 20 | set ERROR_MESSAGE "Bad enable secret" 21 | set ERROR_RESULT true 22 | set loop false 23 | } 24 | } 25 | } 26 | 27 | expect "*" 28 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/enter_exec.tcl: -------------------------------------------------------------------------------- 1 | set IGNORE_DELAY true 2 | 3 | set loop true 4 | set timeout $standard_timeout 5 | 6 | while {$loop == "true"} { 7 | expect { 8 | $password_prompt { 9 | send "$password" 10 | sleep 1 11 | send "\r\r" 12 | } $username_prompt { 13 | send "$username" 14 | sleep 1 15 | send "\r" 16 | } $login_as { 17 | send "$username" 18 | sleep 1 19 | send "\r" 20 | } $info_prompt { 21 | send "\r" 22 | } -re $exec_prompt { 23 | set loop false 24 | } "Login incorrect" { 25 | set ERROR_MESSAGE "Authentication failed" 26 | set ERROR_RESULT true 27 | return 28 | } 29 | } 30 | } 31 | 32 | set IGNORE_DELAY false 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/exit_config_term.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_config_terminal 4 | # Purpose: exit the "config terminal" mode on the device 5 | # do Nothing Doesn't Apply 6 | #************************************************************************** 7 | 8 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/exit_enable.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:exit_enable 3 | # Purpose: quit the "enable" mode on the device 4 | #************************************************************************** 5 | 6 | send "\r\r" 7 | expect $exec_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | send "quit\r" -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/get_image_position.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_image_position.tcl 3 | # Purpose: get device software postion 4 | # Not supported on Moto AP5131. Does Not apply 5 | #************************************************************************** 6 | return -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/get_image_version.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:get_software_version.tcl 3 | # Purpose: get device software version 4 | #************************************************************************** 5 | 6 | send "system\r" 7 | expect $system_prompt 8 | send "show\r" 9 | expect $system_prompt 10 | return -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/get_image_version.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | Get the image version 22 | Common 23 | Walk 24 | 25 | 26 | 1.3.6.1.4.1.388.11.2.2.1.3.3.0 27 | $image_version 28 | DisplayString 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/initialize.tcl: -------------------------------------------------------------------------------- 1 | set standard_timeout 10 2 | set long_timeout 120 3 | set very_long_timeout 1800 4 | set username_prompt ogin: 5 | set password_prompt assword: 6 | set login_as "ogin as:" 7 | set info_prompt "continue!" 8 | set orig_exec_prompt ">" 9 | set orig_enable_prompt ">" 10 | set exec_prompt ">" 11 | set system_prompt "system)>" 12 | set fwupdate_prompt "system.fw-update)>" 13 | set enable_prompt $exec_prompt 14 | set timeout $standard_timeout 15 | 16 | set ERROR_RESULT false 17 | set ERROR_MESSAGE "" 18 | set send_slow {1 0.2} -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/reload.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:reload.tcl 3 | # Purpose: reload device 4 | #************************************************************************** 5 | 6 | send "system\r\r" 7 | expect { 8 | -re ".*" { 9 | sleep 1 10 | send "restart\r" 11 | expect { 12 | -re ".*" { 13 | sleep 1 14 | send -s "yes\r\n" 15 | } 16 | } 17 | } $enable_prompt { 18 | } 19 | } 20 | 21 | close -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/save.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification: save.tcl 4 | # Purpose: save device configuration 5 | # do nothing 6 | #************************************************************************** 7 | proc save {} { 8 | return 9 | } -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/save_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:save_config.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | 7 | save; -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/AP5131/set_device_boot.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:set_device_boot.tcl 4 | # Purpose: set the device next startup image by cli 5 | # Does Not Apply to AP 5131 6 | #************************************************************************** 7 | 8 | return 9 | 10 | -------------------------------------------------------------------------------- /DeviceAdapters/Motorola/adapter-index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AP5131 5 | 6 | 7 | Motorola AP5131 custom adapter 8 | 1.3.6.1.4.1.388.11.1.2 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Cleanup_Parser.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BayStack425_Cleanup_Parser_Script.pl 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Cleanup_Parser_Script.pl: -------------------------------------------------------------------------------- 1 | #! /usr/local/bin/perl 2 | 3 | sub getDiag 4 | { 5 | my($rawdata) = @_; 6 | my $testvalue = "false"; 7 | 8 | if($rawdata =~ /diag/) { 9 | $testvalue = "true" 10 | } 11 | 12 | return $testvalue; 13 | } 14 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Common_CLI.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | connect 7 | 8 | initialize.tcl 9 | 10 | 11 | 12 | 13 | Failed to get to exec mode. 14 | initialize 15 | 16 | enter_exec.tcl 17 | 18 | 19 | exit_exec.tcl 20 | 21 | 22 | 23 | 24 | Failed to get to enable mode. 25 | exec 26 | 27 | enter_enable.tcl 28 | 29 | 30 | exit_enable.tcl 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Config_Backup_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Failed to upload configuration to TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 7 | exec 8 | 11 | 12 | 13 | 14 | Failed to dump configuration in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 15 | enable 16 | 19 | 20 | 21 | 22 | Failed to upload configuration to TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 23 | exec 24 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Config_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Config_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | An error occurred while trying to save the configuration. 6 | exec 7 | 10 | 11 | 12 | 13 | Failed to load configuration file via TFTP. TFTP server or file may not be valid, or prompts may not be what was expected. 14 | exec 15 | 18 | 19 | 20 | 21 | An error occurred while trying to reload device. 22 | exec 23 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Image_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/BayStack425_Image_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Failed to download configuration from TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 7 | enable 8 | 11 | 12 | 13 | 14 | 15 | Failed to download configuration from TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 16 | enable 17 | 20 | 21 | 22 | 23 | An error occurred while trying to reload device. 24 | enable 25 | 28 | 29 | 30 | 31 | An error occurred while trying to reload device. 32 | enable 33 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BayStack425 4 | 1.0.0 5 | 6 | 7 | BayStack425_Common_CLI.xml 8 | 9 | 10 | 11 | BayStack425_Cleanup_Parser.xml 12 | BayStack425_Cleanup_Parser_Script.pl 13 | 14 | 15 | 16 | BayStack425_Image_Deploy_Builder.xml 17 | BayStack425_Image_Deploy_Builder_Script.xml 18 | 19 | 20 | 21 | BayStack425_Config_Deploy_Builder.xml 22 | BayStack425_Config_Deploy_Builder_Script.xml 23 | 24 | 25 | 26 | BayStack425_Config_Backup_Builder.xml 27 | BayStack425_Config_Backup_Builder_Script.xml 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/backup_running_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | 9 | # Set the terminal to minimize line wrapping 10 | send "terminal width 132\r" 11 | expect $enable_prompt 12 | 13 | # Set the terminal 132 to extend the nr of lines returned between more prompts 14 | # With 0, the device is unstable for large configs 15 | send "terminal length 132\r" 16 | expect $enable_prompt 17 | 18 | # Config contains "#" characters, so be careful 19 | send "show running-config\r" 20 | set loop true 21 | 22 | while {$loop == "true"} { 23 | expect { 24 | -re "$more_prompt" { 25 | send " " 26 | } $enable_prompt { 27 | set loop false 28 | } 29 | } 30 | } 31 | 32 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/determine_diag.tcl: -------------------------------------------------------------------------------- 1 | send "! $TFTPFile\r" 2 | expect -re $enable_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/exit_enable.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_enable 4 | # Purpose: exit the "enable" mode on the device 5 | #************************************************************************** 6 | 7 | send "disable\r"\ 8 | expect $exec_prompt 9 | 10 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_exec 4 | # Purpose: quit the "exec" mode on the device 5 | #************************************************************************** 6 | send "logout\r" 7 | expect { 8 | -re "(Main Menu|Use arrow keys to highlight)" { 9 | send "l\r" 10 | } "logout" { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/initialize.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:initialize 4 | # Purpose: initialize variables 5 | #************************************************************************** 6 | 7 | set switch_sleep 0 8 | set standard_timeout 10 9 | set long_timeout 30 10 | set very_long_timeout 100 11 | set image_timeout 300 12 | set send_delay 2.0 13 | set timeout $standard_timeout 14 | set initial_prompt "Ctrl-Y to|### ###" 15 | set username_prompt "Enter Username:" 16 | set password_prompt "Enter Password:" 17 | set orig_exec_prompt ">" 18 | set enable_prompt "#" 19 | set exec_prompt ">" 20 | set priv_exec_prompt "#" 21 | set config_prompt ")#" 22 | set pause_prompt "--More" 23 | set pause $pause_prompt 24 | set banner_skip_repeat 0 25 | set banner_skip "(.*?($password_prompt)|($username_prompt)|($exec_prompt)|($enable_prompt)){$banner_skip_repeat}" 26 | set menuExit 30 27 | set menuPrompt Selection: 28 | set forceDisable "false" 29 | set use_securid "exec" 30 | set execAccessOnly "false" 31 | set useTruePrompt "false" 32 | set suspect_prompt # 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/reload.tcl: -------------------------------------------------------------------------------- 1 | #************************************************************************** 2 | # Identification:reload.tcl 3 | # Purpose: reload device 4 | #************************************************************************** 5 | 6 | send "boot\r" 7 | expect "?" 8 | send "y\r" 9 | close -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/save_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:save_config.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | 7 | send "save\r" 8 | expect -re $enable_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/updatediag_cli.tcl: -------------------------------------------------------------------------------- 1 | set timeout $image_timeout 2 | send "download address $TFTPServer diag $TFTPFile\r" 3 | expect { 4 | -re "Error (.*)" { 5 | set error expect_out(1,string) 6 | set ERROR_MESSAGE "Could not copy diag image from TFTP server: $error" 7 | set ERROR_RESULT true 8 | } -re "Invalid image" { 9 | set ERROR_MESSAGE "Could not deploy image to device. Invalid image detected." 10 | set ERROR_RESULT true 11 | } "Finished Upgrading" { 12 | 13 | } -re "Ethernet Switch" { 14 | sleep $switch_sleep 15 | } -re $enable_prompt { 16 | 17 | } 18 | } 19 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/BayStack425/updateimage_cli.tcl: -------------------------------------------------------------------------------- 1 | set timeout $image_timeout 2 | send "download address $TFTPServer image $TFTPFile\r" 3 | expect { 4 | -re "Error (.*)" { 5 | set error expect_out(1,string) 6 | set ERROR_MESSAGE "Could not copy image from TFTP server: $error" 7 | set ERROR_RESULT true 8 | } -re "Finished Upgrading Image" { 9 | } -re $enable_prompt { 10 | } 11 | } 12 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/NortelERS_Config_Backup_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/NortelERS_Config_Backup_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Failed to dump configuration in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 7 | enable 8 | 11 | 12 | 13 | 14 | Failed to dump running configuration in TFTP. Command syntax may be incorrect, or prompts may not be what was expected. 15 | enable 16 | 19 | 20 | 21 | 22 | Failed to dump startup configuration in CLI. Command syntax may be incorrect, or prompts may not be what was expected. 23 | enable 24 | 27 | 28 | 29 | 30 | Failed to dump startup configuration in TFTP. Command syntax may be incorrect, or prompts may not be what was expected. 31 | enable 32 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/NortelERS_Config_Deploy_Builder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/NortelERS_Config_Deploy_Builder_Script.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Failed to download configuration from TFTP server. TFTP server may be down, or incorrectly specified, command syntax may be incorrect, or prompts may not be what was expected. 5 | enable 6 | 9 | 10 | 11 | 12 | An error occurred while trying to reload device. 13 | enable 14 | 17 | 18 | 19 | 20 | An error occurred while trying to save the configuration. 21 | enable 22 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/adapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.0.0 5 | 6 | 7 | NortelERS_Common_CLI.xml 8 | 9 | 10 | 11 | NortelERS_Cleanup_Parser.xml 12 | NortelERS_Cleanup_Parser_Script.pl 13 | 14 | 15 | 16 | NortelERS_Config_Backup_Builder.xml 17 | NortelERS_Config_Backup_Builder_Script.xml 18 | 19 | 20 | 21 | NortelERS_Config_Deploy_Builder.xml 22 | NortelERS_Config_Deploy_Builder_Script.xml 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/backup_running_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | 9 | # Set the terminal to minimize line wrapping 10 | send "terminal width 132\r" 11 | expect $enable_prompt 12 | 13 | # Set the terminal 132 to extend the nr of lines returned between more prompts 14 | # With 0, the device is unstable for large configs 15 | send "terminal length 132\r" 16 | expect $enable_prompt 17 | 18 | # Config contains "#" characters, so be careful 19 | send "show running-config\r" 20 | set loop true 21 | 22 | while {$loop == "true"} { 23 | expect { 24 | -re "$more_prompt" { 25 | send " " 26 | } $enable_prompt { 27 | set loop false 28 | } 29 | } 30 | } 31 | 32 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/backup_running_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_tftp 4 | # Purpose: backup startup configuration by tftp 5 | #************************************************************************** 6 | 7 | set timeout $very_very_long_timeout 8 | set WARNING_RESULT true 9 | 10 | send "copy running-config tftp address $TFTPServer filename $TFTPFile\r" 11 | expect { 12 | -re "(nvalid input.*)" { 13 | set error $expect_out(1,string) 14 | set ERROR_MESSAGE "Device returned error: $error" 15 | set ERROR_RESULT true 16 | } "TFTP operation timedout" { 17 | set ERROR_RESULT true 18 | set ERROR_MESSAGE "TFTP server timed out; check network connections." 19 | } "ERROR" { 20 | set ERROR_RESULT true 21 | set ERROR_MESSAGE "TFTP server timed out; check network connections." 22 | } "generation completed" { 23 | # Success 24 | } 25 | } 26 | expect $enable_prompt 27 | 28 | if { $ERROR_RESULT != "true" } { 29 | set WARNING_RESULT false 30 | } 31 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/backup_startup_config_cli.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_cli 4 | # Purpose: backup startup configuration by cli 5 | #************************************************************************** 6 | 7 | set timeout $very_long_timeout 8 | 9 | # Set the terminal to minimize line wrapping 10 | send "terminal width 132\r" 11 | expect $enable_prompt 12 | 13 | # Set the terminal 132 to extend the nr of lines returned between more prompts 14 | # With 0, the device is unstable for large configs 15 | send "terminal length 132\r" 16 | expect $enable_prompt 17 | 18 | # Config contains "#" characters, so be careful 19 | send "show running-config\r" 20 | set loop true 21 | 22 | while {$loop == "true"} { 23 | expect { 24 | -re "$more_prompt" { 25 | send " " 26 | } $enable_prompt { 27 | set loop false 28 | } 29 | } 30 | } 31 | 32 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/backup_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:backup_startup_config_tftp 4 | # Purpose: backup startup configuration by tftp 5 | #************************************************************************** 6 | 7 | set timeout $very_very_long_timeout 8 | set WARNING_RESULT true 9 | 10 | send "copy config tftp address $TFTPServer filename $TFTPFile\r" 11 | expect { 12 | -re "(nvalid input.*)" { 13 | set error $expect_out(1,string) 14 | set ERROR_MESSAGE "Device returned error: $error" 15 | set ERROR_RESULT true 16 | } "TFTP operation timedout" { 17 | set ERROR_RESULT true 18 | set ERROR_MESSAGE "TFTP server timed out; check network connections." 19 | } "ERROR" { 20 | set ERROR_RESULT true 21 | set ERROR_MESSAGE "TFTP server timed out; check network connections." 22 | } "successfully written" { 23 | # Success 24 | } 25 | } 26 | expect $enable_prompt 27 | 28 | if { $ERROR_RESULT != "true" } { 29 | set WARNING_RESULT false 30 | } 31 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/clearup.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:clearup.tcl 4 | # Purpose: try to recover a prompt, then exit 5 | #************************************************************************** 6 | 7 | proc clearup {} { 8 | global ERROR_RESULT 9 | global enable_prompt 10 | global exec_prompt 11 | global config_prompt 12 | 13 | if { $ERROR_RESULT == "true" } { 14 | set loop true 15 | while { $loop == "true" } { 16 | send "\r" 17 | expect { 18 | $enable_prompt { 19 | send "logout\r" 20 | set loop false 21 | } $exec_prompt { 22 | send "logout\r" 23 | set loop false 24 | } $config_prompt { 25 | send "end\r" 26 | } -re "(Bad|denied)" { 27 | send "\r" 28 | } 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/deploy_startup_config_tftp.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:deploy_startup_config_tftp 4 | # Purpose: deploy startup configuration by tftp 5 | #************************************************************************** 6 | 7 | # Device config is about 1MB... 4-5 minutes to download 8 | set timeout $very_very_long_timeout 9 | set WARNING_RESULT true 10 | 11 | send "copy config address $TFTPServer filename $TFTPFile\r" 12 | sleep 100 13 | expect { 14 | "TFTP operation timedout" { 15 | set ERROR_RESULT true 16 | set ERROR_MESSAGE "TFTP server timed out; check network connections." 17 | } "download successful" { 18 | # Success 19 | expect "Performing reconfiguration" 20 | } 21 | } 22 | expect $enable_prompt 23 | 24 | if { $ERROR_RESULT != "true" } { 25 | set WARNING_RESULT false 26 | } 27 | set timeout $standard_timeout -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/enter_config_term.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_config_term 4 | # Purpose: enter the "config_term" mode on the device 5 | #************************************************************************** 6 | 7 | send "configure\r" 8 | expect -re "terminal" 9 | 10 | send "\r" 11 | expect $config_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/enter_enable.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:enter_enable 4 | # Purpose: enter the "enable" mode on the device 5 | #************************************************************************** 6 | 7 | send "enable\r" 8 | expect $enable_prompt 9 | if {$useTruePrompt != "false" } { 10 | send "\r" 11 | expect -re "(.*?$enable_prompt)" 12 | set enable_prompt $expect_out(1,string) 13 | } -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/exit_config_term.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_config_term 4 | # Purpose: exit the "config_term" mode on the device 5 | #************************************************************************** 6 | 7 | send "end\r" 8 | expect $enable_prompt 9 | if {$enforce_save == "true"} { 10 | save 11 | } -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/exit_enable.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_enable 4 | # Purpose: exit the "enable" mode on the device 5 | #************************************************************************** 6 | 7 | if {$enforce_save == "true"} { 8 | save 9 | } 10 | send "disable\r" 11 | expect $exec_prompt -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/exit_exec.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:exit_exec 4 | # Purpose: quit the "exec" mode on the device 5 | #************************************************************************** 6 | 7 | send "logout\r" -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/initialize.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:initialize 4 | # Purpose: initialize variables 5 | #************************************************************************** 6 | 7 | set standard_timeout 20 8 | set long_timeout 60 9 | set very_long_timeout 120 10 | set very_very_long_timeout 300 11 | set squeeze_timeout 300 12 | set username_prompt "Enter Username:" 13 | set password_prompt "Enter Password:" 14 | set exec_prompt > 15 | set enable_prompt # 16 | set config_prompt )# 17 | set config_promptRE \)\# 18 | set enforce_save true 19 | set timeout $standard_timeout 20 | set more_prompt "----More" 21 | set pause $more_prompt 22 | set sent_password "false" 23 | set useTruePrompt "false" 24 | 25 | set ERROR_RESULT false 26 | set ERROR_MESSAGE "" 27 | -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/reload.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:reload.tcl 4 | # Purpose: reload device 5 | #************************************************************************** 6 | 7 | close -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/save.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification: save.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | proc save {} { 7 | global enable_prompt 8 | global standard_timeout 9 | global very_long_timeout 10 | 11 | set timeout $very_long_timeout 12 | send "write memory\r" 13 | expect { 14 | "Overwrite the previous NVRAM configuration" { 15 | send "\r" 16 | expect $enable_prompt 17 | } -re "Warning: (.*)" { 18 | set error $expect_out(1,string) 19 | set ERROR_MESSAGE "Check the device. The configuration may be in jeopardy: $error" 20 | set ERROR_RESULT true 21 | send "\r" 22 | expect $enable_prompt 23 | } $enable_prompt { 24 | } 25 | } 26 | set timeout $standard_timeout 27 | } -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/NortelERS/save_config.tcl: -------------------------------------------------------------------------------- 1 | 2 | #************************************************************************** 3 | # Identification:save_config.tcl 4 | # Purpose: save device configuration 5 | #************************************************************************** 6 | 7 | save; -------------------------------------------------------------------------------- /DeviceAdapters/Nortel/Readme.md: -------------------------------------------------------------------------------- 1 | # Some Nortel adapters 2 | 3 | I made some correction / addition in the existing Nortel adapters. 4 | 5 | Please add the following lines in adapter-index.xml in Nortel directory: 6 | 7 | 8 | Nortel BaysStack 425 series (Fabien GIRAUD home made) 9 | 1.3.6.1.4.1.45.3.57.1 10 | 11 | 12 | Don't forget to restart the following IMC porcess after copying / editing adapters: 13 | imccmdmgrdm, imccfgbakdm, and imcupgdm -------------------------------------------------------------------------------- /DeviceAdapters/readme.md: -------------------------------------------------------------------------------- 1 | # Device Adapters 2 | 3 | 4 | Collection of custom adapters 5 | 6 | In this directory you will find a collection of custom adapters which enhance the support of IMC in term of configuration / software management (backup, restore, deploy ...). 7 | 8 | For more information regarding creating or editing custom device adapters, please see the HPE IMC Platform Administrators guide for your specific version. 9 | 10 | Device adapters included here do not necessarily support all IMC Configuration Center functionality and may only support a subset of functionality. 11 | 12 | ## Working with Device Adapters 13 | 14 | 1) Copy the folder into the \imc\server\conf\adapters\icc folder 15 | 16 | 2) Create the Device Vendor, Device Series, and Device Models for the device you're working with. 17 | 18 | * Note: The Device Vendor name you created in the IMC platform **MUST** be identical to the name of the device adapter base folder in the ICC directory. 19 | 20 | 3) Restart IMC Server 21 | 22 | 4) Discover the new devices. 23 | 24 | 25 | 26 | The device adapter is bound to the device at time of initial discovery, if you had previously discovered the device, you may need to delete and rediscover the device. 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /DevicePanels/14988_devicepanel.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/DevicePanels/14988_devicepanel.zip -------------------------------------------------------------------------------- /DevicePanels/readme.md: -------------------------------------------------------------------------------- 1 | # Device Panels 2 | Collection of custom device panels 3 | 4 | In this directory you will find a collection of custom device panels you can modify. These can be usefull to display correct picture / info when opening the device panel from UI. 5 | To customize these you need to install the "Visual Panel Designer" tool (available in IMC install zip file) 6 | 7 | - 14988_devicepanel : MikroTik router 8 | - 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /PythonUtilities/Add_Custom_Views/custom_views.csv: -------------------------------------------------------------------------------- 1 | name,upperview Branches, Branch1,Branches Branch2,Branches WAN, Branch3, Branch4, Branch5, Branch6, Branch7, Branch8, Branch9, Branch10, Branch11, Branch12, Branch13, Branch14, Branch15, Branch16, Branch17, Branch18, Branch19, Branch20, Branch21, Branch22, Branch23, Branch24, Branch25, Branch26, Branch27, Branch28, Branch29, Branch30, Branch31, Branch32, Branch33, Branch34, Branch35, Branch36, Branch37, Branch38, Branch39, Branch40, Branch41, Branch42, Branch43, Branch44, Branch45, Branch46, Branch47, Branch48, Branch49, Branch50, Branch51, Branch52, Branch53, Branch54, Branch55, Branch56, Branch57, Branch58, Branch59, Branch60, Branch61, Branch62, Branch63, Branch64, Branch65, Branch66, Branch67, Branch68, Branch69, Branch70, Branch71, Branch72, Branch73, Branch74, Branch75, Branch76, Branch77, Branch78, Branch79, Branch80, Branch81, Branch82, Branch83, Branch84, Branch85, Branch86, Branch87, Branch88, Branch89, Branch90, Branch91, Branch92, Branch93, Branch94, Branch95, Branch96, Branch97, Branch98, Branch99, Branch100, -------------------------------------------------------------------------------- /PythonUtilities/Add_Custom_Views/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/PythonUtilities/Add_Custom_Views/readme.md -------------------------------------------------------------------------------- /PythonUtilities/Add_SNMP_Poll/perf_task.csv: -------------------------------------------------------------------------------- 1 | UnitType,itemName,userAddUnit,unit,selectDefaultUnit,indexType,indexDesc,itemFunction 2 | 0,Cisco_Temperature,,Celsius,400,[index1[0]:ciscoEnvMonTemperatureStatusValue:1:0],1.3.6.1.4.1.9.9.13.1.3.1.3,1.3.6.1.4.1.9.9.13.1.3.1.3 3 | 0,ArubaOS_Percentage_of_PoE_Power_Used,$TotalPoE,%,10,[index1[0]:Slot:1:0],1.3.6.1.4.1.11.2.14.11.1.2.3.1.1,1.3.6.1.2.1.105.1.3.1.1.4/1.3.6.1.2.1.105.1.3.1.1.2*100 4 | 1,SrvrTech_Sentry_Total_Sys_Power (Watts),Watts,Watts,,[index1[0]:SystemTotalPower:1:0],1.3.6.1.4.1.1718.3.1.6,1.3.6.1.4.1.1718.3.1.6 5 | 1,Cisco_CME_Registered_Phones,Phones,Phones,,[index1[0]:ccmeEphoneTotRegistered:1:0],1.3.6.1.4.1.9.9.439.1.2.3,1.3.6.1.4.1.9.9.439.1.2.3 6 | -------------------------------------------------------------------------------- /PythonUtilities/Add_SNMP_Poll/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/PythonUtilities/Add_SNMP_Poll/readme.md -------------------------------------------------------------------------------- /PythonUtilities/Check Interface VLAN Config/readme.md: -------------------------------------------------------------------------------- 1 | # Checking Interface VLAN Config 2 | 3 | In large installations, it is common for "cookie-cutter" installations which require identical configurations to be deployed to 4 | devices in multiple configurations. 5 | 6 | The provided script provides automated reporting for the following use case 7 | 8 | There is a large deployment with an HPE 5406R switch in each site. 9 | 10 | There is an IP phone at each site which must be plugged into interface A17. 11 | 12 | Port A17 must be an untagged VLAN ( access interface ) with the PVID 2 configured as it's untagged VLAN. 13 | 14 | This script will perform the following 15 | 16 | - Gather all the 5406Rs that are discovered in IMC into a list 17 | - For each switch in the list do the following 18 | -- Gather the interface name 19 | -- Gather the interface description 20 | -- Make sure it’s an access port ( untagged ) 21 | -- Make sure the PVID of the port is vlan 2 22 | Append each result into as a python dictionary into a list object 23 | - Write the list object into an excel spreadsheet ( csv ) 24 | 25 | 26 | -------------------------------------------------------------------------------- /PythonUtilities/Export_Alarms/readme.md: -------------------------------------------------------------------------------- 1 | # Export IMC Alarm via API 2 | 3 | Here is a short example on how to export alarms and manipulate this exported alarms in order to export a subset in a csv file 4 | Goal is to be able to export all alarms generated after a date/time and recovered after another date/time 5 | 6 | This sample app is provided under an Apache2 license. 7 | 8 | Copyright 2016 Hewlett Packard Enterprise Development LP. 9 | 10 | Licensed under the Apache License, Version 2.0 (the "License"); 11 | you may not use this file except in compliance with the License. 12 | You may obtain a copy of the License at 13 | 14 | http://www.apache.org/licenses/LICENSE-2.0 15 | 16 | Unless required by applicable law or agreed to in writing, software 17 | distributed under the License is distributed on an "AS IS" BASIS, 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | See the License for the specific language governing permissions and 20 | limitations under the License. -------------------------------------------------------------------------------- /PythonUtilities/Export_Assets/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/PythonUtilities/Export_Assets/readme.md -------------------------------------------------------------------------------- /PythonUtilities/Export_Conf/readme.md: -------------------------------------------------------------------------------- 1 | # Export IMC Configuration via API 2 | 3 | In this repository you'll find some Python scripts to export the IMC system configuration 4 | 5 | - exportDeviceDefinition.py : export device categories, vendors, series and models in csv files 6 | 7 | This sample app is provided under an Apache2 license. 8 | 9 | Copyright 2016 Hewlett Packard Enterprise Development LP. 10 | 11 | Licensed under the Apache License, Version 2.0 (the "License"); 12 | you may not use this file except in compliance with the License. 13 | You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Configuration_Templates/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Configuration Templates 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Custom_Views/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Custom Views 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Device_Groups/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Device Groups 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Device_Models/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather System Device Models 2 | 3 | This scripts will export all device models from a live IMC system using the restful API. 4 | 5 | There is currently no way to reimport custom device models, but this script will make all the information necessary to 6 | recreate the custom models available in the exported CSV file. -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Device_Series/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather System Device Series 2 | 3 | This scripts will export all device series from a live IMC system using the restful API. 4 | 5 | There is currently no way to reimport custom device series, but this script will make all the information necessary to 6 | recreate the custom series available in the exported CSV file. -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Device_Vendor/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather System Device Vendors 2 | 3 | This scripts will export all device vendors from a live IMC system using the restful API. 4 | 5 | There is currently no way to reimport custom device vendors, but this script will make all the information necessary to 6 | recreate the custom device vendors available in the exported CSV file. -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Devices/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Devices 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Operator_Groups/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Operator_Groups 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Operators/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Configuration Templates 2 | 3 | This script will export the operator list from the existing system into a csv file named 4 | operators.csv. 5 | 6 | The IMC API does not allow for all parameters to be exported so the following values must be filled in before importing 7 | into the target system. 8 | 9 | * fullName 10 | * name 11 | * desc 12 | * authType 13 | * operatorGroupId 14 | * password 15 | * defaultAcl 16 | * sessionTimeout 17 | 18 | The operatorGroupId represents the integer assigned to the operator within the IMC system 19 | If using custom operator groups, ensure that the custom operator groups have been created before attempting 20 | to import operators assigned to those groups. 21 | 22 | You will also have to adjust your import script to map the appropriate operator group 23 | from the new system to the appropriate ID from the new system. -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Performance_Indices/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Custom Performance Indices 2 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Port_Groups/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Port_Groups 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_SNMP_Templates/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather SNMP Templates 2 | 3 | 4 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_System_Device_Categories/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather System Device Categories 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_System_Vendors/readme.md: -------------------------------------------------------------------------------- 1 | # Gather System Vendors 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/Gather_Telnet_Templates/Readme.md: -------------------------------------------------------------------------------- 1 | # Gather Telnet Templates 2 | 3 | This script is in progress -------------------------------------------------------------------------------- /PythonUtilities/Gather_IMC_Data/readme.md: -------------------------------------------------------------------------------- 1 | # Gather IMC Data 2 | 3 | 4 | Occasionally, I get asked if it's possible to backup and restore only certain components of the IMC configuration. 5 | 6 | The DBMAN backup/restore process does a full backup and restore of the entire IMC system data, including all historical data. 7 | 8 | It is not uncommon to want to grab configuration items only and transfer them to a new system. Although this is not possible 9 | in the system itself, we can use the API to pull the desired data from the old system and export it into a format which can be 10 | pushed through the API into the target system. 11 | 12 | This section contains a set of scripts which will gather the following data 13 | Work in progress. If there are specific requests, please open up an Issue and we'll try and get to it sooner 14 | - Custom Views 15 | - List of Installed Devices 16 | - Configuration Templates 17 | - Custom Performance Indices 18 | - Device Groups 19 | - Operators 20 | - Operator Groups 21 | - Port Groups 22 | - SNMP Templates 23 | - Telnet Templates 24 | - SSH Templates -------------------------------------------------------------------------------- /PythonUtilities/ImportOperators/delete_operator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # author: @netmanchris 3 | 4 | """ 5 | Copyright 2016 Hewlett Packard Enterprise Development LP. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | """ 19 | 20 | 21 | 22 | 23 | 24 | from pyhpeimc.auth import * 25 | from pyhpeimc.plat.operator import * 26 | 27 | 28 | 29 | auth = IMCAuth("http://", "10.101.0.203", "8080", "admin", "admin") 30 | 31 | 32 | 33 | ops_list = ['cyoung', 'lstuart', 'clinzell', 'kgott', 'rkauffman', 'lknapp', 'dwenger', 'jmacdonald', 'tkubica', 'mbreen', 'mventer','ksecino'] 34 | 35 | for operator in ops_list: 36 | delete_plat_operator(operator,url=auth.url, auth=auth.creds) 37 | 38 | 39 | -------------------------------------------------------------------------------- /PythonUtilities/ImportOperators/imc_operator_list.csv: -------------------------------------------------------------------------------- 1 | fullName,sessionTimeout,password,operatorGroupId,name,desc,defaultAcl,authType 2 | Christopher Young,10,access4chris,1,cyoung,Chris account,0,0 3 | Les Stuart,10,access4les,1,lstuart,admin account,0,0 4 | Ken Gott,10,access4ken,1,kgott,admin account,0,0 5 | Rick Kauffman,10,access4rick,1,rkauffman,admin account,0,0 6 | Leonard Knapp,10,access4leonard,1,lknapp,admin account,0,0 7 | Chris Linzell,10,access4chris,1,clinzell,admin account,0,0 8 | Dwayne Wenger,10,access4dwayne,1,dwenger,admin account,0,0 9 | James Macdonald,10,access4jim,1,jmacdonald,admin account,0,0 10 | Tomas Kubica,10,access4tomas,1,tkubica,admin account,0,0 11 | Michael Breen,10,access4michael,1,mbreen,admin account,0,0 12 | Marius Venter,10,access4marius,1,mventer,marius admin account,0,0 13 | Kevin Secino,10,access4kevin,1,ksecino,marius admin account,0,0 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /PythonUtilities/ImportOperators/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/PythonUtilities/ImportOperators/readme.md -------------------------------------------------------------------------------- /PythonUtilities/Philips_Hue_Alarm_Notification/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/PythonUtilities/Philips_Hue_Alarm_Notification/test.py -------------------------------------------------------------------------------- /PythonUtilities/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/PythonUtilities/readme.md -------------------------------------------------------------------------------- /PythonUtilities/reset_operator_password/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/PythonUtilities/reset_operator_password/readme.md -------------------------------------------------------------------------------- /PythonUtilities/reset_operator_password/reset_operator_password.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | #!/usr/bin/env python3 4 | # author: @netmanchris 5 | 6 | """ 7 | Copyright 2016 Hewlett Packard Enterprise Development LP. 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | """ 21 | 22 | """ This file will take the input of a operator name and allow an authenticated operator to change the password. 23 | 24 | 25 | This library uses the pyhpeimc python wrapper around the IMC RESTful API to automatically change the specified operator 26 | password.""" 27 | 28 | 29 | 30 | 31 | from pyhpeimc.auth import * 32 | from pyhpeimc.plat.operator import * 33 | 34 | 35 | 36 | auth = IMCAuth("http://", "10.101.0.203", "8080", "admin", "admin") 37 | 38 | 39 | set_operator_password('cyoung', password='newpass',auth=auth.creds,url=auth.url) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HPEIMCUtils 2 | Collection of Utilities and Templates to extend HPE's Intelligent Management Center NMS Platform 3 | 4 | These scripts and files are provide under an Apache2 license are provided as a starting point to help HPE IMC customers 5 | get starteed with the HPE IMC platform. 6 | 7 | Many of these files will need to be modified before being applicable in any customer environment. Care should be taken 8 | before using any of these scripts or files and it is highly recommended that testing be performend in a lab environment 9 | before using any of the provided files in a production environment. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ReportTemplates/V1/CustomSLAReport_CrossTab_Hour_max_delay_v2.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/CustomSLAReport_CrossTab_Hour_max_delay_v2.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/Perf_Availability_SLA.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/Perf_Availability_SLA.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/Perf_Multiple_SameGraph.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/Perf_Multiple_SameGraph.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/Subnet_IPAM.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/Subnet_IPAM.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/Subnet_IPView.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/Subnet_IPView.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/VLANReport.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/VLANReport.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/detailed_inventory_0_2.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/detailed_inventory_0_2.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/operator_report.rpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/V1/operator_report.rpt -------------------------------------------------------------------------------- /ReportTemplates/V1/readme.md: -------------------------------------------------------------------------------- 1 | # iAR report template V1 (means made with Crystal Reports) 2 | 3 | - Perf_Availability_SLA.rpt : Gives an overview of the availability of the devices with SLA. 4 | I converted unavailability index to availability 5 | SLA (% of availability) are put in the parameters "Warning thresholds", "Major Thresholds" and "Critical". 6 | I also added the concept of "Open hours" (begin and end) so that the report only include the data between these two times 7 | I made pattern matching to identify "Category" and "Branch Code" based on the device name. The pattern is the following: -- 8 | 9 | - Perf_Multiple_SameGraph : gets multiple performance index, shows it in table and also on the same graph 10 | 11 | - VLANReport : list all defined VLANs, which device has the vlan defined and number of access port in this vlan 12 | 13 | - Detailed_inventory_v0_2 : asset inventory (device and modules) with serial, software release, installed since ... 14 | 15 | - operator_report : list of operator with roles 16 | 17 | - CustomSLAReport_CrossTab_Hour_max_delay_v2 : crosstab to show if some NQA info are correct based on SLA 18 | 19 | 20 | -------------------------------------------------------------------------------- /ReportTemplates/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ReportTemplates/readme.md -------------------------------------------------------------------------------- /ZeroTouchProvisioning/HomeLab.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ZeroTouchProvisioning/HomeLab.csv -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/2530/2530_Final_Config.cfg: -------------------------------------------------------------------------------- 1 | ; J9773A Configuration Editor; Created on release #YA.15.13.0003 2 | 3 | ; Ver #04:63.ff.37.27:88 4 | 5 | hostname "HP-2530-24G-PoEP" 6 | 7 | include-credentials 8 | 9 | password manager user-name "admin" sha1 "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" 10 | 11 | ip route 0.0.0.0 0.0.0.0 10.11.10.1 12 | 13 | interface 24 14 | 15 | name "HP-5406zl - HP-2530-24G-PoEP" 16 | 17 | energy-efficient-ethernet 18 | 19 | exit 20 | 21 | snmp-server community "public" 22 | 23 | snmp-server community "private" 24 | 25 | snmpv3 engineid "00:00:00:0b:00:00:80:c1:6e:cd:91:e0" 26 | 27 | vlan 1 28 | 29 | name "DEFAULT_VLAN" 30 | 31 | untagged 1-28 32 | 33 | ip address dhcp-bootp 34 | 35 | exit 36 | 37 | vlan 10 38 | 39 | name "VLAN10" 40 | 41 | tagged 1-28 42 | 43 | ip address 10.11.10.6 255.255.255.0 44 | 45 | exit 46 | 47 | spanning-tree 48 | 49 | no tftp server 50 | 51 | no dhcp config-file-update 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/2530/ArubaOSInitialConfig_Ignore.cfg: -------------------------------------------------------------------------------- 1 | ; J9019B IGNORE Configuration Editor; Created on release #RA.15.17.0008 2 | hostname "ADP-IN-PROGRESS" 3 | include-credentials 4 | password manager user-name ${telnet_user_name} plaintext ${telnet_password} 5 | snmp-server community ${snmpv1_community_read} operator 6 | snmp-server community ${snmpv1_community_write} unrestricted 7 | vlan 1 8 | name "DEFAULT_VLAN" 9 | untagged all 10 | ip address dhcp-bootp 11 | exit 12 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/2920/Aruba2920InitialConfig.cfg: -------------------------------------------------------------------------------- 1 | ; J9727A Configuration Editor; Created on release #WB.16.01.0004 2 | ; Ver #0d:10.91.7c.59.f4.7b.ff.ff.fc.ff.ff.3f.ef:0a 3 | hostname "ADP-in-progress" 4 | include-credentials 5 | password manager user-name ${telnet_user_name} plaintext ${telnet_password} 6 | snmp-server community ${snmpv1_community_read} operator 7 | snmp-server community ${snmpv1_community_write} unrestricted 8 | oobm 9 | ip address dhcp-bootp 10 | exit 11 | vlan 1 12 | name "DEFAULT_VLAN" 13 | ip address dhcp-bootp 14 | exit 15 | spanning-tree 16 | tftp server 17 | dhcp config-file-update 18 | dhcp image-file-update 19 | dhcp tr69-acs-url 20 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/2920/readme.md: -------------------------------------------------------------------------------- 1 | # 2920 ADP 2 | 3 | This folder contains the following files 4 | 5 | - Aruba2920InitialConfig.cfg 6 | - 2920_Final.cfg 7 | 8 | ## J number in Config files 9 | 10 | The initial configuration file provided will only work with the HP 2920-24G-PoE+ Switch (J9727A) in non stacking. 11 | For the provided initial configurations, the J number *MUST* match that of the platform you are trying to auto-deploy to. 12 | 13 | 14 | 15 | ## Notes 16 | 17 | - ArubaOS switches are extremely sensitive to the contents of the startup.cfg file. 18 | If a startup.cfg file contains invalid configurations, this may cause issues such as 19 | the switch not accepting the configuration, or not loading the configuration at boot time. 20 | As such, care should be taken to ensure that the configuration being deployed is 21 | valid on the target device. 22 | 23 | -The 2920 can be in stacking mode or single-unit mode. If the device is in 24 | stacking mode, the interface labels will change, adding a %member__id%/%port_number% 25 | to the initial port number 26 | 27 | **ex. Interface 1 on stack member 2 would now be 2/1** 28 | 29 | You may use the **all** keyword on interface configurations to deal with this issue if applicable 30 | to the specific configuration you're trying to push out. 31 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/3500yl/ArubaOSInitialConfig3500.cfg: -------------------------------------------------------------------------------- 1 | ; J8692A Configuration Editor; Created on release #K.16.01.0004 2 | ; Ver #0b:34.59.24.6b.ff.f7.fc.7f.ff.3f.ef:8d 3 | hostname "ADP-In-Progress" 4 | include-credentials 5 | password manager user-name ${telnet_user_name} plaintext ${telnet_password} 6 | snmp-server community ${snmpv1_community_read} operator 7 | snmp-server community ${snmpv1_community_write} unrestricted 8 | vlan 1 9 | name "DEFAULT_VLAN" 10 | ip address dhcp-bootp 11 | exit 12 | 13 | spanning-tree 14 | no tftp server 15 | no dhcp config-file-update 16 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/3500yl/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/3500yl/README.md -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/3800/ArubaOSInitialConfig3800.cfg: -------------------------------------------------------------------------------- 1 | ; J9573A Configuration Editor; Created on release #KA.16.01.0004 2 | 3 | ; Ver #0b:34.59.34.6b.fb.ff.fd.ff.ff.3f.ef:10 4 | 5 | hostname "ADP-In-Progress" 6 | 7 | include-credentials 8 | 9 | password manager user-name "iMCadmin" plaintext iMCadmin 10 | 11 | snmp-server community "iMCread" unrestricted 12 | 13 | snmp-server community "iMCwrite" unrestricted 14 | 15 | vlan 1 16 | 17 | name "DEFAULT_VLAN" 18 | 19 | ip address dhcp-bootp 20 | 21 | exit 22 | 23 | 24 | spanning-tree 25 | 26 | no tftp server 27 | 28 | no dhcp config-file-update 29 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/3800/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/3800/README.md -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/5400/5400_Final_Config.cfg: -------------------------------------------------------------------------------- 1 | ; J9850A Configuration Editor; Created on release #KB.16.01.0007 2 | 3 | ; Ver #0d:10.91.7c.59.f4.7b.ff.ff.fc.ff.ff.3f.ef:0a 4 | 5 | hostname "HP-5406Rzl2" 6 | 7 | module A type j9536a 8 | 9 | module B type j9534a 10 | 11 | module C type one-06 12 | 13 | module D type one-06 14 | 15 | include-credentials 16 | 17 | password manager user-name "admin" sha1 "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" 18 | 19 | ip route 0.0.0.0 0.0.0.0 10.11.10.1 20 | 21 | snmp-server community "public" unrestricted 22 | 23 | snmp-server community "private" unrestricted 24 | 25 | snmp-server host 10.101.0.203 community "public" 26 | 27 | snmpv3 engineid "00:00:00:0b:00:00:64:51:06:79:0c:00" 28 | 29 | oobm 30 | 31 | ip address dhcp-bootp 32 | 33 | exit 34 | 35 | vlan 1 36 | 37 | name "DEFAULT_VLAN" 38 | 39 | untagged A1-A22,B1-B24,C1i-C3i,D1i-D3i 40 | 41 | ip address dhcp-bootp 42 | 43 | exit 44 | 45 | vlan 10 46 | 47 | name "VLAN10" 48 | 49 | tagged A1-A22,B1-B24,C1i-C3i,D1i-D3i 50 | 51 | ip address 10.11.10.3 255.255.255.0 52 | 53 | exit 54 | 55 | vlan 20 56 | 57 | name "servers" 58 | 59 | tagged A1-A22,B1-B24,C1i-C3i,D1i-D3i 60 | 61 | no ip address 62 | 63 | exit 64 | 65 | spanning-tree 66 | 67 | no autorun 68 | 69 | no dhcp config-file-update 70 | 71 | no dhcp image-file-update 72 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/5400/ArubaOSInitialConfig5400.cfg: -------------------------------------------------------------------------------- 1 | ; J8697A Configuration Editor; Created on release #K.16.01.0004 2 | ; Ver #0b:34.59.24.6b.ff.f7.fc.7f.ff.3f.ef:8d 3 | 4 | hostname "ADP-in-progress" 5 | include-credentials 6 | password manager user-name ${telnet_user_name} plaintext ${telnet_password} 7 | snmp-server community ${snmpv1_community_read} operator 8 | snmp-server community ${snmpv1_community_write} unrestricted 9 | vlan 1 10 | name "DEFAULT_VLAN" 11 | ip address dhcp-bootp 12 | exit 13 | 14 | spanning-tree 15 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/5400/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/5400/README.md -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/5400R/5400R_Final_Config.cfg: -------------------------------------------------------------------------------- 1 | ; J9850A Configuration Editor; Created on release #KB.16.01.0007 2 | 3 | ; Ver #0d:10.91.7c.59.f4.7b.ff.ff.fc.ff.ff.3f.ef:0a 4 | 5 | hostname "HP-5406Rzl2" 6 | 7 | module A type j9536a 8 | 9 | module B type j9534a 10 | 11 | module C type one-06 12 | 13 | module D type one-06 14 | 15 | include-credentials 16 | 17 | password manager user-name "admin" sha1 "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" 18 | 19 | sflow 2 destination 10.101.0.203 20 | 21 | sflow 2 polling A1-A22,B1-B24,C1i-C3i,D1i-D3i 20 22 | 23 | sflow 2 sampling A1-A22,B1-B24,C1i-C3i,D1i-D3i 1000 24 | 25 | ip route 0.0.0.0 0.0.0.0 10.11.10.1 26 | 27 | snmp-server community "public" unrestricted 28 | 29 | snmp-server community "private" unrestricted 30 | 31 | snmp-server host 10.101.0.203 community "public" 32 | 33 | snmpv3 engineid "00:00:00:0b:00:00:64:51:06:79:0c:00" 34 | 35 | oobm 36 | 37 | ip address dhcp-bootp 38 | 39 | exit 40 | 41 | vlan 1 42 | 43 | name "DEFAULT_VLAN" 44 | 45 | untagged A1-A22,B1-B24,C1i-C3i,D1i-D3i 46 | 47 | ip address dhcp-bootp 48 | 49 | exit 50 | 51 | vlan 10 52 | 53 | name "VLAN10" 54 | 55 | tagged A1,B23 56 | 57 | ip address 10.11.10.3 255.255.255.0 58 | 59 | exit 60 | 61 | spanning-tree 62 | 63 | no autorun 64 | 65 | no dhcp config-file-update 66 | 67 | no dhcp image-file-update 68 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/ArubaOS/5400R/Aruba5400RInitialConfig.cfg: -------------------------------------------------------------------------------- 1 | ; J9850A Configuration Editor; Created on release #KB.16.01.0007 2 | ; Ver #0d:10.91.7c.59.f4.7b.ff.ff.fc.ff.ff.3f.ef:0a 3 | hostname "ADP-in-progress" 4 | include-credentials 5 | password manager user-name ${telnet_user_name} plaintext ${telnet_password} 6 | snmp-server community ${snmpv1_community_read} operator 7 | snmp-server community ${snmpv1_community_write} unrestricted 8 | oobm 9 | ip address dhcp-bootp 10 | exit 11 | vlan 1 12 | name "DEFAULT_VLAN" 13 | ip address dhcp-bootp 14 | exit 15 | spanning-tree 16 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/CiscoIOS/Cisco_ADP_init.cfg: -------------------------------------------------------------------------------- 1 | hostname ADP-IN-Progress 2 | ! 3 | aaa new-model 4 | ! 5 | username ${telnet_user_name} privilege 15 password 0 ${telnet_password} 6 | ! 7 | interface Vlan1 8 | ip address dhcp 9 | ! 10 | snmp-server community ${snmpv1_community_read} RO 11 | snmp-server community ${snmpv1_community_write} RW 12 | ! 13 | line vty 0 4 14 | privilege level 15 15 | line vty 5 15 16 | privilege level 15 17 | ! 18 | 19 | end 20 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/CiscoIOS/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ZeroTouchProvisioning/InitialConfigFiles/CiscoIOS/readme.md -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/Comware5/CW5_initialConfig_ADP.cfg: -------------------------------------------------------------------------------- 1 | # 2 | sysname ADP-IN-Progress 3 | # 4 | interface Vlan-interface1 5 | ip address dhcp-alloc 6 | # 7 | telnet-server enable 8 | # 9 | snmp-agent 10 | snmp-agent community read ${snmpv1_community_read} 11 | snmp-agent community write ${snmpv1_community_write} 12 | snmp-agent sys-info version all 13 | # 14 | user-interface vty 0 4 15 | authentication-mode scheme 16 | user privilege level 3 17 | # 18 | local-user ${telnet_user_name} 19 | password simple ${telnet_password} 20 | service-type telnet 21 | level 3 22 | authorization-attribute level 3 23 | # 24 | return 25 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/Comware5/Routers/Comware5RtrInitialConfig.cfg: -------------------------------------------------------------------------------- 1 | # 2 | interface Vlan-interface1 3 | ip address dhcp-alloc 4 | # 5 | interface GigabitEthernet0/0 6 | port link-mode route 7 | ip address dhcp-alloc 8 | # 9 | telnet-server enable 10 | # 11 | snmp-agent 12 | snmp-agent community read iMCread 13 | snmp-agent community write iMCwrite 14 | snmp-agent sys-info version all 15 | # 16 | user-interface vty 0 4 17 | authentication-mode scheme 18 | user privilege level 3 19 | # 20 | local-user iMCadmin 21 | password simple iMCadmin 22 | service-type telnet 23 | level 3 24 | authorization-attribute level 3 25 | # 26 | return 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/Comware5/Routers/MSR930_Final_Config.cfg: -------------------------------------------------------------------------------- 1 | ; J9773A IGNORE Configuration Editor; Created on release #YA.15.13.0003 2 | 3 | ; Ver #04:63.ff.37.27:88 4 | 5 | hostname "ADP-In-Progress" 6 | 7 | include-credentials 8 | 9 | password manager user-name "iMCadmin" plaintext iMCadmin 10 | 11 | snmp-server community "iMCread" unrestricted 12 | 13 | snmp-server community "iMCwrite" unrestricted 14 | 15 | vlan 1 16 | 17 | name "DEFAULT_VLAN" 18 | 19 | ip address dhcp-bootp 20 | 21 | exit 22 | 23 | 24 | spanning-tree 25 | 26 | no tftp server 27 | 28 | no dhcp config-file-update 29 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/Comware5/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ZeroTouchProvisioning/InitialConfigFiles/Comware5/readme.md -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/Comware7/CW7_initialConfig_ADP.cfg: -------------------------------------------------------------------------------- 1 | sysname ADP_Initial_Config 2 | # 3 | interface M-GigabitEthernet0/0/0 4 | ip address dhcp-alloc 5 | # 6 | telnet server enable 7 | # 8 | snmp-agent 9 | snmp-agent community read ${snmpv1_community_read} 10 | snmp-agent community write ${snmpv1_community_write} 11 | snmp-agent sys-info version all 12 | # 13 | line aux 0 14 | user-role network-admin 15 | screen-length 69 16 | # 17 | line vty 0 63 18 | authentication-mode scheme 19 | user-role network-admin 20 | user-role network-operator 21 | screen-length 0 22 | # 23 | local-user ${telnet_user_name} class manage 24 | password simple ${telnet_password} 25 | service-type telnet 26 | authorization-attribute user-role level-15 27 | authorization-attribute user-role network-admin 28 | authorization-attribute user-role network-operator 29 | # 30 | return 31 | 32 | -------------------------------------------------------------------------------- /ZeroTouchProvisioning/InitialConfigFiles/Comware7/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HPENetworking/HPEIMCUtils/f67c2c641933f5b07fac2230d54942a224ebaf6a/ZeroTouchProvisioning/InitialConfigFiles/Comware7/readme.md -------------------------------------------------------------------------------- /imcTwilio/readme.md: -------------------------------------------------------------------------------- 1 | #IMC And Twilio 2 | 3 | Twilio is web-based messaging service that will allow you to make an API call to send an SMS message to a cel phone service, among other things. 4 | 5 | This proof-of-concept code allows a user to gather the current real-time alarms on the IMC system and send them to a SMS endpoint 6 | 7 | This code should not be put in production as is and is only provided as a proof of concept. 8 | 9 | --------------------------------------------------------------------------------