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

IOS XR: policy map parsing #6432

Merged
merged 7 commits into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2621,6 +2621,11 @@ DCE_MODE
'dce-mode'
;

DEACTIVATE
:
'deactivate'
;

DEAD_INTERVAL
:
'dead-interval'
Expand Down Expand Up @@ -3211,6 +3216,11 @@ DISCARD_ROUTE
'discard-route'
;

DISCONNECT
:
'disconnect'
;

DISCOVERED_AP_CNT
:
'discovered-ap-cnt'
Expand Down Expand Up @@ -3276,11 +3286,21 @@ DO
'do'
;

DO_ALL
:
'do-all'
;

DO_UNTIL_FAILURE
:
'do-until-failure'
;

DO_UNTIL_SUCCESS
:
'do-until-success'
;

DOD_HOST_PROHIBITED
:
'dod-host-prohibited'
Expand Down Expand Up @@ -3541,6 +3561,11 @@ DYNAMIC_MCAST_OPTIMIZATION_THRESH
'dynamic-mcast-optimization-thresh'
;

DYNAMIC_TEMPLATE
:
'dynamic-template'
;

E164
:
'e164'
Expand Down Expand Up @@ -8672,6 +8697,11 @@ PERCENT_LITERAL
'percent'
;

PERFORMANCE_TRAFFIC
:
'performance-traffic'
;

PERIODIC
:
'periodic'
Expand Down Expand Up @@ -10669,6 +10699,11 @@ SET_OVERLOAD_BIT
'set-overload-bit'
;

SET_TIMER
:
'set-timer'
;

SETUP
:
'setup'
Expand Down Expand Up @@ -11336,6 +11371,11 @@ STOP_RECORD
'stop-record'
;

STOP_TIMER
:
'stop-timer'
;

STOPBITS
:
'stopbits'
Expand Down Expand Up @@ -12046,6 +12086,11 @@ TRADITIONAL
'traditional'
;

TRAFFIC
:
'traffic'
;

TRAFFIC_ENG
:
'traffic-eng'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3552,7 +3552,6 @@ stanza
| s_passwd
| s_phone_proxy
| s_policy_map
| s_policy_map_ios
| s_privilege
| s_process_max_time
| s_qos_mapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,88 +667,24 @@ pm_end_policy_map
END_POLICY_MAP NEWLINE
;

pm_event
pmtcs_event
:
EVENT null_rest_of_line
(
pm_event_class
pmtcse_class
)*
;

pm_event_class
pmtcse_class
:
DEC CLASS
CLASS
(
ALWAYS
| classname = variable
) DO_UNTIL_FAILURE NEWLINE
(
DEC
(
ACTIVATE SERVICE_TEMPLATE stname = variable
| AUTHENTICATE
| AUTHENTICATION_RESTART
| AUTHORIZE
| CLEAR_SESSION
| PAUSE
| RESTRICT
| RESUME
| TERMINATE
) null_rest_of_line
)*
;

pm_ios_inspect
:
INSPECT name = variable_permissive NEWLINE
(
pm_iosi_class_default
| pm_iosi_class_type_inspect
)*
;

pm_iosi_class_default
:
CLASS CLASS_DEFAULT NEWLINE
(
pi_iosicd_drop
| pi_iosicd_pass
)*
;

pm_iosi_class_type_inspect
:
CLASS TYPE INSPECT name = variable NEWLINE
(
pm_iosict_drop
| pm_iosict_inspect
| pm_iosict_pass
)*
;

pi_iosicd_drop
:
DROP LOG? NEWLINE
;

pi_iosicd_pass
:
PASS NEWLINE
;

pm_iosict_drop
:
DROP LOG? NEWLINE
;

pm_iosict_inspect
:
INSPECT NEWLINE
;

pm_iosict_pass
:
PASS NEWLINE
CLASS_DEFAULT
| TYPE CONTROL SUBSCRIBER classname = variable
)
pmtcsec_do?
NEWLINE
pmtcsec_tail*
;

pm_null
Expand All @@ -768,6 +704,13 @@ pm_parameters
)*
;

pm_tail
:
pm_class
| pm_null
| pm_parameters
;

pmc_null
:
NO?
Expand Down Expand Up @@ -815,6 +758,28 @@ pmcp_null
) null_rest_of_line
;

pmtcsec_do
:
DO_ALL
| DO_UNTIL_FAILURE
| DO_UNTIL_SUCCESS
;

pmtcsec_tail
:
DEC
(
ACTIVATE DYNAMIC_TEMPLATE dtname = variable
| AUTHENTICATE
| AUTHORIZE
| DEACTIVATE
| DISCONNECT
| MONITOR
| SET_TIMER
| STOP_TIMER
) null_rest_of_line
;

pmp_null
:
NO?
Expand All @@ -827,6 +792,11 @@ pmp_null
) null_rest_of_line
;

pmtcs_tail
:
pmtcs_event
;

qm_null
:
NO?
Expand Down Expand Up @@ -898,39 +868,23 @@ s_policy_map
:
POLICY_MAP
(
variable_policy_map_header
|
(
TYPE variable variable variable
)
mapname = variable NEWLINE pm_tail*
|
TYPE
(
TYPE
(
CONTROL_PLANE
| NETWORK_QOS
| PBR
| QUEUEING
| QUEUING
| QOS
) mapname = variable
(
TEMPLATE template = variable
)?
CONTROL SUBSCRIBER mapname = variable NEWLINE pmtcs_tail
|
(
ACCOUNTING
| PBR
| PERFORMANCE_TRAFFIC
| QOS
| REDIRECT
| TRAFFIC
) mapname = variable NEWLINE pm_tail*
)
) NEWLINE
(
pm_class
| pm_end_policy_map
| pm_event
| pm_null
| pm_parameters
)*
;

s_policy_map_ios
:
POLICY_MAP TYPE pm_ios_inspect
)
pm_end_policy_map?
;

s_qos_mapping
Expand Down