Skip to content

Commit

Permalink
Add zyxel cfg ipalias get
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard Lavaud committed Feb 2, 2022
1 parent 5ef904e commit c9f33db
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,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
15 changes: 15 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,15 @@
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
^\s+IP\sAlias\sSetup\s+Public\sLAN\s*$$
^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*$$
^${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
1 change: 1 addition & 0 deletions tests/test_index_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"vyos",
"watchguard_firebox",
"yamaha",
"zyxel_os",
]
CHOICES_STRING = "|".join(OS_CHOICES)
RE_TEMPLATE_OS = re.compile(rf"^({CHOICES_STRING})")
Expand Down
5 changes: 5 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,5 @@
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 555.666.77.888 255.255.255.252 0 0
LAN VOIX 0 N/A N/A 0 N/A N/A 0 0
Command Successful.
16 changes: 16 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,16 @@
---
parsed_sample:
- name: "Default"
ipalias_active: "0"
ipalias_ip: "N/A"
ipalias_netmask: "N/A"
publan_active: "1"
publan_ip: "555.666.77.888"
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"

0 comments on commit c9f33db

Please sign in to comment.