Skip to content

Commit

Permalink
feat: Add show service id sap (networktocode#1914)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Bear <[email protected]>
  • Loading branch information
bennnnnnnn and mjbear authored Nov 27, 2024
1 parent 5ee49d4 commit f516d04
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ntc_templates/templates/alcatel_sros_show_service_id_0_sap.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value PORT_ID (\S+)
Value SERVICE_ID (\d+)
Value INGRESS_QOS (\d+)
Value INGRESS_FILTER (\S+)
Value EGRESS_QOS (\d+)
Value EGRESS_FILTER (\S+)
Value ADMIN_STATUS (\S+)
Value OPERATIONAL_STATUS (\S+)

Start
^=+\s*$$
^SAP\(Summary\), Service \d+\s*$$
^PortId\s+SvcId\s+Ing\.\s+Ing\.\s+Egr\.\s+Egr\.\s+Adm\s+Opr\s*$$
^\s+QoS\s+Fltr\s+QoS\s+Fltr\s*$$
^${PORT_ID}\s+${SERVICE_ID}\s+${INGRESS_QOS}\s+${INGRESS_FILTER}\s+${EGRESS_QOS}\s+${EGRESS_FILTER}\s+${ADMIN_STATUS}\s+${OPERATIONAL_STATUS}\s*$$ -> Record
^-+\s*$$
^Number\s+of\s+SAPs\s+:\s+\d+\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ alcatel_sros_show_service_sap-using.textfsm, .*, alcatel_sros, sh[[ow]] service
alcatel_sros_show_service_sdp-using.textfsm, .*, alcatel_sros, sh[[ow]] service sdp-using
alcatel_sros_show_port_description.textfsm, .*, alcatel_sros, sh[[ow]] port (\S+ )?des[[cription]]
alcatel_sros_show_router_interface.textfsm, .*, alcatel_sros, sh[[ow]] router (\d+ int[[erface]]|int[[erface]])
alcatel_sros_show_service_id_0_sap.textfsm, .*, alcatel_sros, sh[[ow]] serv[[ice]] id \d+ sa[[p]]
alcatel_sros_show_router_mpls_lsp.textfsm, .*, alcatel_sros, sh[[ow]] router mpls lsp
alcatel_sros_show_service_id_base.textfsm, .*, alcatel_sros, sh[[ow]] serv[[ice]] id ba[[se]]
alcatel_sros_show_service_sdp.textfsm, .*, alcatel_sros, sh[[ow]] service sdp
Expand Down
11 changes: 11 additions & 0 deletions tests/alcatel_sros/show_service_id_0_sap/show_service_id_0_sap.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
===============================================================================
SAP(Summary), Service 24731
===============================================================================
PortId SvcId Ing. Ing. Egr. Egr. Adm Opr
QoS Fltr QoS Fltr
-------------------------------------------------------------------------------
lag-54:950 24731 1 none 1 none Up Down
-------------------------------------------------------------------------------
Number of SAPs : 1
-------------------------------------------------------------------------------
===============================================================================
10 changes: 10 additions & 0 deletions tests/alcatel_sros/show_service_id_0_sap/show_service_id_0_sap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
parsed_sample:
- admin_status: "Up"
egress_filter: "none"
egress_qos: "1"
ingress_filter: "none"
ingress_qos: "1"
operational_status: "Down"
port_id: "lag-54:950"
service_id: "24731"

0 comments on commit f516d04

Please sign in to comment.