Skip to content

Commit

Permalink
feat: Add show service service-using (#1913)
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 649998f commit 5ee49d4
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Value SERVICE_ID (\d+)
Value TYPE (\S+)
Value ADMIN_STATUS (\S+)
Value OPERATIONAL_STATUS (\S+)
Value CUSTOMER_ID (\d+)
Value SERVICE_NAME (\S+)

Start
^=+\s*$$
^Services.*$$
^ServiceId\s+Type\s+Adm\s+Opr\s+CustomerId\s+Service\s+Name
^\s*${SERVICE_ID}\s+${TYPE}\s+${ADMIN_STATUS}\s+${OPERATIONAL_STATUS}\s+${CUSTOMER_ID}\s+${SERVICE_NAME}\s*$$ -> Record
^Matching\s+Services\s+:\s+\d+\s*$$
^-+\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ alcatel_sros_show_router_isis_interface.textfsm, .*, alcatel_sros, sh[[ow]] rout
alcatel_sros_show_router_mpls_interface.textfsm, .*, alcatel_sros, sh[[ow]] router mpls int[[erface]]
alcatel_sros_show_router_ospf_interface.textfsm, .*, alcatel_sros, sh[[ow]] router ospf int[[erface]]
alcatel_sros_show_router_rsvp_interface.textfsm, .*, alcatel_sros, sh[[ow]] router rsvp int[[erface]]
alcatel_sros_show_service_service-using.textfsm, .*, alcatel_sros, sh[[ow]] se[[rvice]] service-u[[sing]]
alcatel_sros_show_router_ldp_interface.textfsm, .*, alcatel_sros, sh[[ow]] router ldp int[[erface]]
alcatel_sros_show_router_pim_interface.textfsm, .*, alcatel_sros, sh[[ow]] router pim int[[erface]]
alcatel_sros_show_service_id_interface.textfsm, .*, alcatel_sros, sh[[ow]] se[[rvice]] id (\d+ in[[terface]]|in[[terface]])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

===============================================================================
Services [vpls] Customer 4020
===============================================================================
ServiceId Type Adm Opr CustomerId Service Name
-------------------------------------------------------------------------------
24728 VPLS Up Down 4020 testservice1
24729 VPLS Up Up 4020 test-service2
24730 VPLS Up Down 4020 testservice3
24731 VPLS Up Down 4020 testservice5
-------------------------------------------------------------------------------
Matching Services : 4
-------------------------------------------------------------------------------
===============================================================================
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
parsed_sample:
- admin_status: "Up"
customer_id: "4020"
operational_status: "Down"
service_id: "24728"
service_name: "testservice1"
type: "VPLS"
- admin_status: "Up"
customer_id: "4020"
operational_status: "Up"
service_id: "24729"
service_name: "test-service2"
type: "VPLS"
- admin_status: "Up"
customer_id: "4020"
operational_status: "Down"
service_id: "24730"
service_name: "testservice3"
type: "VPLS"
- admin_status: "Up"
customer_id: "4020"
operational_status: "Down"
service_id: "24731"
service_name: "testservice5"
type: "VPLS"

0 comments on commit 5ee49d4

Please sign in to comment.