From 1e3de0926517fe7b7b1bd14aa1bd9d74fc021505 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 10 Jan 2021 10:25:41 +0100 Subject: op-mode: T3178: migrate most of the OSPFv3 parts to re-includable snippets This eases CLI maintenance and also migration from legacy code. --- .../include/ospfv3-adv-router-id-node-tag.xml.i | 16 + .../include/ospfv3-adv-router.xml.i | 13 + op-mode-definitions/include/ospfv3-detail.xml.i | 9 + op-mode-definitions/include/ospfv3-dump.xml.i | 9 + op-mode-definitions/include/ospfv3-internal.xml.i | 9 + .../include/ospfv3-linkstate-id.xml.i | 15 + .../include/ospfv3-self-originated.xml.i | 13 + op-mode-definitions/show-ipv6-ospfv3.xml.in | 507 ++------------------- 8 files changed, 123 insertions(+), 468 deletions(-) create mode 100644 op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i create mode 100644 op-mode-definitions/include/ospfv3-adv-router.xml.i create mode 100644 op-mode-definitions/include/ospfv3-detail.xml.i create mode 100644 op-mode-definitions/include/ospfv3-dump.xml.i create mode 100644 op-mode-definitions/include/ospfv3-internal.xml.i create mode 100644 op-mode-definitions/include/ospfv3-linkstate-id.xml.i create mode 100644 op-mode-definitions/include/ospfv3-self-originated.xml.i diff --git a/op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i b/op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i new file mode 100644 index 000000000..b6a64c52a --- /dev/null +++ b/op-mode-definitions/include/ospfv3-adv-router-id-node-tag.xml.i @@ -0,0 +1,16 @@ + + + + Search by Advertising Router ID + + <x.x.x.x> + + + vtysh -c "show ipv6 ospf6 database * $6 $7" + + #include + #include + #include + + + diff --git a/op-mode-definitions/include/ospfv3-adv-router.xml.i b/op-mode-definitions/include/ospfv3-adv-router.xml.i new file mode 100644 index 000000000..6330c0a72 --- /dev/null +++ b/op-mode-definitions/include/ospfv3-adv-router.xml.i @@ -0,0 +1,13 @@ + + + + Search by Advertising Router ID + + <x.x.x.x> + + + + #include + + + diff --git a/op-mode-definitions/include/ospfv3-detail.xml.i b/op-mode-definitions/include/ospfv3-detail.xml.i new file mode 100644 index 000000000..76096fbc8 --- /dev/null +++ b/op-mode-definitions/include/ospfv3-detail.xml.i @@ -0,0 +1,9 @@ + + + + Show detailed information + + + vtysh -c "show ipv6 ospf6 ${@:4}" + + diff --git a/op-mode-definitions/include/ospfv3-dump.xml.i b/op-mode-definitions/include/ospfv3-dump.xml.i new file mode 100644 index 000000000..4271aec53 --- /dev/null +++ b/op-mode-definitions/include/ospfv3-dump.xml.i @@ -0,0 +1,9 @@ + + + + Show dump of LSAs + + + vtysh -c "show ipv6 ospf6 ${@:4}" + + diff --git a/op-mode-definitions/include/ospfv3-internal.xml.i b/op-mode-definitions/include/ospfv3-internal.xml.i new file mode 100644 index 000000000..8b45e86c1 --- /dev/null +++ b/op-mode-definitions/include/ospfv3-internal.xml.i @@ -0,0 +1,9 @@ + + + + Show internal LSA information + + + vtysh -c "show ipv6 ospf6 ${@:4}" + + diff --git a/op-mode-definitions/include/ospfv3-linkstate-id.xml.i b/op-mode-definitions/include/ospfv3-linkstate-id.xml.i new file mode 100644 index 000000000..eab5916f1 --- /dev/null +++ b/op-mode-definitions/include/ospfv3-linkstate-id.xml.i @@ -0,0 +1,15 @@ + + + + Search by Link state ID + + <x.x.x.x> + + + + #include + #include + #include + + + diff --git a/op-mode-definitions/include/ospfv3-self-originated.xml.i b/op-mode-definitions/include/ospfv3-self-originated.xml.i new file mode 100644 index 000000000..76054757b --- /dev/null +++ b/op-mode-definitions/include/ospfv3-self-originated.xml.i @@ -0,0 +1,13 @@ + + + + Show Self-originated LSAs + + vtysh -c "show ipv6 ospf6 database as-external $6 self-originated" + + #include + #include + #include + + + diff --git a/op-mode-definitions/show-ipv6-ospfv3.xml.in b/op-mode-definitions/show-ipv6-ospfv3.xml.in index 36bb5b40e..bbae74c75 100644 --- a/op-mode-definitions/show-ipv6-ospfv3.xml.in +++ b/op-mode-definitions/show-ipv6-ospfv3.xml.in @@ -45,12 +45,7 @@ vtysh -c "show ipv6 ospf6 border-routers" - - - Show OSPFv3 detailed border-router information - - vtysh -c "show ipv6 ospf6 border-routers detail" - + #include @@ -68,44 +63,7 @@ vtysh -c "show ipv6 ospf6 database" - - - Search by Advertising Router ID - - <x.x.x.x> - - - - - - Search by Link state ID - - <x.x.x.x> - - - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database adv-router $6 linkstate-id $8 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database adv-router $6 linkstate-id $8 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database adv-router $6 linkstate-id $8 internal" - - - - - + #include Search by Any Link state Type @@ -119,24 +77,9 @@ - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database * * $7 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database * * $7 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database * * $7 internal" - + #include + #include + #include @@ -150,98 +93,19 @@ vtysh -c "show ipv6 ospf6 database * $6" - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database * $6 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database * $6 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database * $6 internal" - - - - Search by Advertising Router ID - - <x.x.x.x> - - - vtysh -c "show ipv6 ospf6 database * $6 $7" - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database * $6 $7 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database * $6 $7 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database * $6 $7 internal" - - - + #include + #include + #include + #include - - - - - Show AS-External LSAs vtysh -c "show ipv6 ospf6 database as-external" - - - Search by Advertising Router ID - - <x.x.x.x> - - - - - - Search by Link state ID - - <x.x.x.x> - - - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external adv-router $7 linkstate-id $9 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external adv-router $7 linkstate-id $9 internal" - - - - - + #include Search by Advertising Router ID @@ -251,126 +115,16 @@ vtysh -c "show ipv6 ospf6 database as-external * $7" - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database as-external * $7 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external * $7 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external * $7 internal" - - - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database as-external detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external internal" - - - - Search by Link state ID - - <x.x.x.x> - - - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database as-external linkstate-id $7 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external linkstate-id $7 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external linkstate-id $7 internal" - + #include + #include + #include - - - Show Self-originated LSAs - - vtysh -c "show ipv6 ospf6 database as-external self-originated" - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database as-external self-originated detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external self-originated dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external self-originated internal" - - - - Search by Link state ID - - <x.x.x.x> - - - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database as-external self-originated linkstate-id $8 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external self-originated linkstate-id $8 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external self-originated linkstate-id $8 internal" - - - - - + #include + #include + #include + #include + #include @@ -381,140 +135,17 @@ - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database as-external $6 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external $6 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external $6 internal" - - - - Show Self-originated LSAs - - vtysh -c "show ipv6 ospf6 database as-external $6 self-originated" - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database as-external $6 self-originated detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database as-external $6 self-originated dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database as-external $6 self-originated internal" - - - - - - Search by Advertising Router ID - - <x.x.x.x> - - - - - - Show dump of LSAs - - echo vtysh -c "show ipv6 ospf6 database as-external $6 $7 dump" - - - - Show LSAs internal information - - echo vtysh -c "show ipv6 ospf6 database as-external $6 $7 internal" - - - - - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database dump" - - - - Search by Link state ID - - <x.x.x.x> - - - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database linkstate-id $6 detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database linkstate-id $6 dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database linkstate-id $6 internal" - + #include + #include + #include + #include + #include - - - Show Self-originated LSAs - - vtysh -c "show ipv6 ospf6 database self-originated" - - - - Show details of LSAs - - vtysh -c "show ipv6 ospf6 database self-originated detail" - - - - Show dump of LSAs - - vtysh -c "show ipv6 ospf6 database self-originated dump" - - - - Show LSAs internal information - - vtysh -c "show ipv6 ospf6 database self-originated internal" - - - + #include + #include + #include + #include @@ -529,12 +160,7 @@ vtysh -c "show ipv6 ospf6 interface prefix" - - - More detailed interface prefix information - - vtysh -c "show ipv6 ospf6 interface prefix detail" - + #include @@ -546,12 +172,7 @@ vtysh -c "show ipv6 ospf6 interface prefix $6" - - - More detailed information - - vtysh -c "show ipv6 ospf6 interface prefix $6 detail" - + #include Matched interface prefix information @@ -577,12 +198,7 @@ vtysh -c "show ipv6 ospf6 interface $5 prefix" - - - More detailed interface prefix information - - vtysh -c "show ipv6 ospf6 interface $5 prefix detail" - + #include @@ -594,12 +210,7 @@ vtysh -c "show ipv6 ospf6 interface $5 prefix $7" - - - More detailed information - - vtysh -c "show ipv6 ospf6 interface $5 prefix $7 detail" - + #include Matched interface prefix information @@ -615,12 +226,7 @@ Show OSPFv3 linkstate routing information - - - Show detailed linkstate information - - vtysh -c "show ipv6 ospf6 linkstate detail" - + #include Show linkstate Network information @@ -641,12 +247,7 @@ vtysh -c "show ipv6 ospf6 neighbor" - - - Show detailed neighbor information - - vtysh -c "show ipv6 ospf6 neighbor detail" - + #include Show neighbor DR choice information @@ -673,12 +274,7 @@ vtysh -c "show ipv6 ospf6 route external-1" - - - Show detailed Type-1 External route information - - vtysh -c "show ipv6 ospf6 route external-1 detail" - + #include @@ -687,12 +283,7 @@ vtysh -c "show ipv6 ospf6 route external-2" - - - Show detailed Type-2 External route information - - vtysh -c "show ipv6 ospf6 route external-2 detail" - + #include @@ -701,12 +292,7 @@ vtysh -c "show ipv6 ospf6 route inter-area" - - - Show detailed Inter-Area route information - - vtysh -c "show ipv6 ospf6 route inter-area detail" - + #include @@ -715,20 +301,10 @@ vtysh -c "show ipv6 ospf6 route intra-area" - - - Show detailed Intra-Area route information - - vtysh -c "show ipv6 ospf6 route intra-area detail" - + #include - - - Show detailed route information - - vtysh -c "show ipv6 ospf6 route detail" - + #include Show route table summary @@ -758,12 +334,7 @@ vtysh -c "show ipv6 ospf6 route $5 match" - - - Detailed information - - vtysh -c "show ipv6 ospf6 route $5 match detail" - + #include -- cgit v1.2.3