Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zyxel cfg ipalias get #1068

Merged
merged 1 commit into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -526,4 +526,5 @@ watchguard_firebox_show_arp.textfsm, .*, watchguard_firebox, sh[[ow]] arp
yamaha_show_environment.textfsm, .*, yamaha, sh[[ow]] en[[vironment]]
yamaha_show_ip_route.textfsm, .*, yamaha, sh[[ow]] ip ro[[ute]]

zyxel_os_cfg_ipalias_get.textfsm, .*, zyxel_os, cfg ipalias get
zyxel_os_cfg_nat_get.textfsm, .*, zyxel_os, cfg nat get
16 changes: 16 additions & 0 deletions ntc_templates/templates/zyxel_os_cfg_ipalias_get.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Value NAME (.+?)
Value IPALIAS_ACTIVE (0|1)
Value IPALIAS_IP (\S+)
Value IPALIAS_NETMASK (\S+)
Value PUBLAN_ACTIVE (0|1)
Value PUBLAN_IP (\S+)
Value PUBLAN_NETMASK (\S+)

Start
^Group\sName\s+Active\s+IPv4\sArrdess\s+Subnet\smask\s+Active\s+IPv4\sArrdess\s+Subnet\smask\s+Offer\sPublic\sIP\sby\sDHCP\s+Enable\sARP\sProxy\s*$$ -> IPALIASTable

IPALIASTable
^${NAME}\s+${IPALIAS_ACTIVE}\s+${IPALIAS_IP}\s+${IPALIAS_NETMASK}\s+${PUBLAN_ACTIVE}\s+${PUBLAN_IP}\s+${PUBLAN_NETMASK}\s+(0|1)\s+(0|1)\s*$$ -> Record
^Command\sSuccessful.\s*$$
^\s*$$
^. -> Error
7 changes: 7 additions & 0 deletions tests/zyxel_os/cfg_ipalias_get/zyxel_os_cfg_ipalias_get.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
handlerName=ethwanlan method=GET i=2
This device do not support Ethernet LAN4 port change to WAN port. IP Alias Setup Public LAN
Group Name Active IPv4 Arrdess Subnet mask Active IPv4 Arrdess Subnet mask Offer Public IP by DHCP Enable ARP Proxy
Default 0 N/A N/A 1 100.200.77.111 255.255.255.252 0 0
LAN VOIX 0 N/A N/A 0 N/A N/A 0 0
2e65ed5d-d 1 192.168.180.1 255.255.255.0 0 N/A N/A 0 0
Command Successful.
23 changes: 23 additions & 0 deletions tests/zyxel_os/cfg_ipalias_get/zyxel_os_cfg_ipalias_get.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
parsed_sample:
- name: "Default"
ipalias_active: "0"
ipalias_ip: "N/A"
ipalias_netmask: "N/A"
publan_active: "1"
publan_ip: "100.200.77.111"
publan_netmask: "255.255.255.252"
- name: "LAN VOIX"
ipalias_active: "0"
ipalias_ip: "N/A"
ipalias_netmask: "N/A"
publan_active: "0"
publan_ip: "N/A"
publan_netmask: "N/A"
- name: "2e65ed5d-d"
ipalias_active: "1"
ipalias_ip: "192.168.180.1"
ipalias_netmask: "255.255.255.0"
publan_active: "0"
publan_ip: "N/A"
publan_netmask: "N/A"