Skip to content
Open
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
15 changes: 15 additions & 0 deletions ntc_templates/templates/hp_comware_display_route-policy.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Value Filldown POLICY_NAME (\S+)
Value Required ACTION (Permit|Deny)
Value Required NODE (\d+)
Value List IF_MATCH (.+)
Value List APPLY (.+)

Start
^Route-policy:\s+ -> Continue.Record
^Route-policy:\s+${POLICY_NAME}\s*$$
^\s+(Permit|Deny)\s+:\s+\d+ -> Continue.Record
^\s+${ACTION}\s+:\s+${NODE}\s*$$
^\s+if-match\s+${IF_MATCH}\s*$$
^\s+apply\s+${APPLY}\s*$$
^\s*$$ -> Record
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ hp_comware_display_interface_brief.textfsm, .*, hp_comware, di[[splay]] int[[erf
hp_comware_display_ip_vpn-instance.textfsm, .*, hp_comware, di[[splay]] ip vpn[[-instance]]
hp_comware_display_bgp_peer_ipv4.textfsm, .*, hp_comware, di[[splay]] bg[[p]] pe[[er]] ipv4
hp_comware_display_ip_interface.textfsm, .*, hp_comware, dis[[play]] ip i[[nterface]]
hp_comware_display_route-policy.textfsm, .*, hp_comware, di[[splay]] route[[-policy]]
hp_comware_display_mac-address.textfsm, .*, hp_comware, di[[splay]] mac-ad[[dress]]
hp_comware_display_vlan_brief.textfsm, .*, hp_comware, di[[splay]] v[[lan]] b[[rief]]
hp_comware_display_interface.textfsm, .*, hp_comware, dis[[play]] int[[erface]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Route-policy: ACTIVE_OUT
Permit : 10
if-match ip address prefix-list pl_customer_only

Route-policy: BACKUP_ACT_OUT
Permit : 10
if-match ip address prefix-list pl_customer_only
apply community 1111:135
Deny : 99

Route-policy: BACKUP_SBY_OUT
Permit : 10
if-match ip address prefix-list pl_customer_only
apply community 1111:130
Comment thread
mjbear marked this conversation as resolved.
Deny : 99
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
parsed_sample:
- action: "Permit"
apply: []
if_match:
- "ip address prefix-list pl_customer_only"
node: "10"
policy_name: "ACTIVE_OUT"
- action: "Permit"
apply:
- "community 1111:135"
if_match:
- "ip address prefix-list pl_customer_only"
node: "10"
policy_name: "BACKUP_ACT_OUT"
- action: "Deny"
apply: []
if_match: []
node: "99"
policy_name: "BACKUP_ACT_OUT"
- action: "Permit"
apply:
- "community 1111:130"
if_match:
- "ip address prefix-list pl_customer_only"
node: "10"
policy_name: "BACKUP_SBY_OUT"
- action: "Deny"
apply: []
if_match: []
node: "99"
policy_name: "BACKUP_SBY_OUT"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Route-policy: active_out
Permit : 10
if-match ip address prefix-list pl_customer_only

Route-policy: test_policy
Permit : 10
if-match cost 10
if-match ip address prefix-list pl_customer_only
apply community 1111:100
apply local-preference 200
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
parsed_sample:
- action: "Permit"
apply: []
if_match:
- "ip address prefix-list pl_customer_only"
node: "10"
policy_name: "active_out"
- action: "Permit"
apply:
- "community 1111:100"
- "local-preference 200"
if_match:
- "cost 10"
- "ip address prefix-list pl_customer_only"
node: "10"
policy_name: "test_policy"
Loading