Skip to content

Commit

Permalink
Add Huawei VRP display startup template (networktocode#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-ribot authored and cppmonkey committed Oct 25, 2023
1 parent 76ecb64 commit 044fd43
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ntc_templates/templates/huawei_vrp_display_startup.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Value STARTUP_SYSTEM_SOFTWARE (.+)
Value NEXT_STARTUP_SYSTEM_SOFTWARE (.+)
Value BACKUP_SYSTEM_SOFTWARE_FOR_NEXT_STARTUP (.+)
Value STARTUP_SAVED_CONFIGURATION_FILE (.+)
Value NEXT_STARTUP_SAVED_CONFIGURATION_FILE (.+)
Value STARTUP_LICENSE_FILE (.+)
Value NEXT_STARTUP_LICENSE_FILE (.+)
Value STARTUP_PATCH_PACKAGE (.+)
Value NEXT_STARTUP_PATCH_PACKAGE (.+)
Value STARTUP_VOICE_FILES (.+)
Value NEXT_STARTUP_VOICE_FILES (.+)

Start
^\S+.*:\s*$$ -> Continue.Record
^\S+.*:\s*$$
^\s+Startup\ssystem\ssoftware:\s+${STARTUP_SYSTEM_SOFTWARE}\s*$$\s*$$
^\s+Next\sstartup\s+system\s+software:\s+${NEXT_STARTUP_SYSTEM_SOFTWARE}\s*$$
^\s+Backup\s+system\s+software\s+for\s+next\sstartup:\s+${BACKUP_SYSTEM_SOFTWARE_FOR_NEXT_STARTUP}\s*$$
^\s+Startup\s+saved-configuration\s+file:\s+${STARTUP_SAVED_CONFIGURATION_FILE}\s*$$
^\s+Next\sstartup\s+saved-configuration\s+file:\s+${NEXT_STARTUP_SAVED_CONFIGURATION_FILE}\s*$$
^\s+Startup\s+license\s+file:\s+${STARTUP_LICENSE_FILE}\s*$$
^\s+Next\sstartup\s+license\s+file:\s+${NEXT_STARTUP_LICENSE_FILE}\s*$$
^\s+Startup\s+patch\s+package:\s+${STARTUP_PATCH_PACKAGE}\s*$$
^\s+Next\sstartup\s+patch\s+package:\s+${NEXT_STARTUP_PATCH_PACKAGE}\s*$$
^\s+Startup\s+voice-files:\s+${STARTUP_VOICE_FILES}\s*$$
^\s+Next\sstartup\s+voice-files:\s+${NEXT_STARTUP_VOICE_FILES}\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ huawei_vrp_display_lldp_neighbor.textfsm, .*, huawei_vrp, dis[[play]] lldp nei[[
huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, dis[[play]] tem[[perature]]
huawei_vrp_display_arp_brief.textfsm, .*, huawei_vrp, dis[[play]] arp br[[ief]]
huawei_vrp_display_port_vlan.textfsm, .*, huawei_vrp, dis[[play]] port vl[[an]]
huawei_vrp_display_startup.textfsm, .*, huawei_vrp, dis[[play]] star[[tup]]
huawei_vrp_display_version.textfsm, .*, huawei_vrp, dis[[play]] ver[[sion]]

juniper_junos_show_chassis_cluster_interfaces.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] i[[nterface]]
Expand Down
12 changes: 12 additions & 0 deletions tests/huawei_vrp/display_startup/huawei_vrp_display_startup.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
MainBoard:
Startup system software: flash:/AR610-V300R021C00SPC200.cc
Next startup system software: flash:/AR610-V300R021C00SPC200.cc
Backup system software for next startup: null
Startup saved-configuration file: flash:/vrpcfg.zip
Next startup saved-configuration file: flash:/vrpcfg2.zip
Startup license file: null
Next startup license file: null
Startup patch package: flash:/AR610_V300R021SPH180.pat
Next startup patch package: flash:/AR610_V300R021SPH180.pat
Startup voice-files: null
Next startup voice-files: null
13 changes: 13 additions & 0 deletions tests/huawei_vrp/display_startup/huawei_vrp_display_startup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
parsed_sample:
- startup_system_software: "flash:/AR610-V300R021C00SPC200.cc"
next_startup_system_software: "flash:/AR610-V300R021C00SPC200.cc"
backup_system_software_for_next_startup: "null"
startup_saved_configuration_file: "flash:/vrpcfg.zip"
next_startup_saved_configuration_file: "flash:/vrpcfg2.zip"
startup_license_file: "null"
next_startup_license_file: "null"
startup_patch_package: "flash:/AR610_V300R021SPH180.pat"
next_startup_patch_package: "flash:/AR610_V300R021SPH180.pat"
startup_voice_files: "null"
next_startup_voice_files: "null"

0 comments on commit 044fd43

Please sign in to comment.