From d1345fe688546082a1d8283ccb0c3b05bcd0a1d3 Mon Sep 17 00:00:00 2001 From: fett0 Date: Thu, 30 Mar 2023 22:54:16 +0000 Subject: T5131: fix op-mode show isis segment-routing prefix-sids --- op-mode-definitions/include/isis-common.xml.i | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 95a171515..4a2f1e503 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -122,6 +122,12 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + Show Prefix-SID information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + vtysh -c "show isis route" @@ -136,12 +142,6 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - Show prefix segment IDs - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - -- cgit v1.2.3 From 15922541cef35956107e0b32ee952fee05928dbd Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 1 Apr 2023 12:33:21 +0200 Subject: isis: op-mode: T5132: bugfix VRF commands for route and neighbor show isis vrf neighbor|route did not call the vtysh wrapper but instead always called the commands for the default routing table. --- op-mode-definitions/include/isis-common.xml.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 4a2f1e503..0e20861c7 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -94,7 +94,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - vtysh -c "show isis neighbor" + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -129,7 +129,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - vtysh -c "show isis route" + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ -- cgit v1.2.3 From 3ffb5ff16543576e73f23125e4590fa57b02f0b7 Mon Sep 17 00:00:00 2001 From: Cheeze_It Date: Sun, 19 Mar 2023 19:24:50 -0600 Subject: T5081: ISIS and OSPF syncronization with IGP-LDP sync --- data/templates/frr/isisd.frr.j2 | 11 ++++++ data/templates/frr/ospfd.frr.j2 | 11 ++++++ .../include/isis/protocol-common-config.xml.i | 4 +- .../include/ldp-sync-interface.xml.i | 22 +++++++++++ .../include/ldp-sync-protocol.xml.i | 21 +++++++++++ .../include/ospf/protocol-common-config.xml.i | 4 +- op-mode-definitions/include/isis-common.xml.i | 26 ++++++++++++- op-mode-definitions/include/ospf-common.xml.i | 26 ++++++++++++- smoketest/scripts/cli/test_protocols_isis.py | 43 ++++++++++++++++++++++ smoketest/scripts/cli/test_protocols_ospf.py | 41 +++++++++++++++++++++ 10 files changed, 205 insertions(+), 4 deletions(-) create mode 100644 interface-definitions/include/ldp-sync-interface.xml.i create mode 100644 interface-definitions/include/ldp-sync-protocol.xml.i (limited to 'op-mode-definitions/include') diff --git a/data/templates/frr/isisd.frr.j2 b/data/templates/frr/isisd.frr.j2 index 8df1e9513..3c37e28b9 100644 --- a/data/templates/frr/isisd.frr.j2 +++ b/data/templates/frr/isisd.frr.j2 @@ -25,6 +25,12 @@ interface {{ iface }} {% if iface_config.hello_padding is vyos_defined %} isis hello padding {% endif %} +{% if iface_config.ldp_sync.disable is vyos_defined %} + no isis mpls ldp-sync +{% elif iface_config.ldp_sync.holddown is vyos_defined %} + isis mpls ldp-sync + isis mpls ldp-sync holddown {{ iface_config.ldp_sync.holddown }} +{% endif %} {% if iface_config.metric is vyos_defined %} isis metric {{ iface_config.metric }} {% endif %} @@ -84,6 +90,11 @@ router isis VyOS {{ 'vrf ' + vrf if vrf is vyos_defined }} {% if max_lsp_lifetime is vyos_defined %} max-lsp-lifetime {{ max_lsp_lifetime }} {% endif %} +{% if ldp_sync.holddown is vyos_defined %} + mpls ldp-sync holddown {{ ldp_sync.holddown }} +{% elif ldp_sync is vyos_defined %} + mpls ldp-sync +{% endif %} {% if spf_interval is vyos_defined %} spf-interval {{ spf_interval }} {% endif %} diff --git a/data/templates/frr/ospfd.frr.j2 b/data/templates/frr/ospfd.frr.j2 index 8c4a81c57..3f97b7325 100644 --- a/data/templates/frr/ospfd.frr.j2 +++ b/data/templates/frr/ospfd.frr.j2 @@ -44,6 +44,12 @@ interface {{ iface }} {% if iface_config.bfd.profile is vyos_defined %} ip ospf bfd profile {{ iface_config.bfd.profile }} {% endif %} +{% if iface_config.ldp_sync.disable is vyos_defined %} + no ip ospf mpls ldp-sync +{% elif iface_config.ldp_sync.holddown is vyos_defined %} + ip ospf mpls ldp-sync + ip ospf mpls ldp-sync holddown {{ iface_config.ldp_sync.holddown }} +{% endif %} {% if iface_config.mtu_ignore is vyos_defined %} ip ospf mtu-ignore {% endif %} @@ -133,6 +139,11 @@ router ospf {{ 'vrf ' ~ vrf if vrf is vyos_defined }} {% if maximum_paths is vyos_defined %} maximum-paths {{ maximum_paths }} {% endif %} +{% if ldp_sync.holddown is vyos_defined %} + mpls ldp-sync holddown {{ ldp_sync.holddown }} +{% elif ldp_sync is vyos_defined %} + mpls ldp-sync +{% endif %} {% if distance.global is vyos_defined %} distance {{ distance.global }} {% endif %} diff --git a/interface-definitions/include/isis/protocol-common-config.xml.i b/interface-definitions/include/isis/protocol-common-config.xml.i index 0e6f19480..983a085ec 100644 --- a/interface-definitions/include/isis/protocol-common-config.xml.i +++ b/interface-definitions/include/isis/protocol-common-config.xml.i @@ -152,6 +152,7 @@ +#include A Network Entity Title for this process (ISO only) @@ -172,7 +173,7 @@ - Show IS-IS neighbor adjacencies + IS-IS traffic engineering extensions @@ -631,6 +632,7 @@ #include + #include Set network type diff --git a/interface-definitions/include/ldp-sync-interface.xml.i b/interface-definitions/include/ldp-sync-interface.xml.i new file mode 100644 index 000000000..b24831bbe --- /dev/null +++ b/interface-definitions/include/ldp-sync-interface.xml.i @@ -0,0 +1,22 @@ + + + + LDP-IGP synchronization configuration for interface + + + #include + + + Hold down timer for LDP-IGP cost restoration + + u32:0-10000 + Time to wait in seconds for LDP-IGP synchronization to occur before restoring interface cost + + + + + + + + + diff --git a/interface-definitions/include/ldp-sync-protocol.xml.i b/interface-definitions/include/ldp-sync-protocol.xml.i new file mode 100644 index 000000000..c82c811f6 --- /dev/null +++ b/interface-definitions/include/ldp-sync-protocol.xml.i @@ -0,0 +1,21 @@ + + + + Protocol wide LDP-IGP synchronization configuration + + + + + Protocol wide hold down timer for LDP-IGP cost restoration + + u32:0-10000 + Time to wait in seconds for LDP-IGP synchronization to occur before restoring interface cost + + + + + + + + + diff --git a/interface-definitions/include/ospf/protocol-common-config.xml.i b/interface-definitions/include/ospf/protocol-common-config.xml.i index f39b9c5e3..425d3b01c 100644 --- a/interface-definitions/include/ospf/protocol-common-config.xml.i +++ b/interface-definitions/include/ospf/protocol-common-config.xml.i @@ -331,6 +331,7 @@ +#include Administrative distance @@ -385,6 +386,7 @@ #include #include #include + #include Interface bandwidth (Mbit/s) @@ -875,4 +877,4 @@ - + \ No newline at end of file diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 0e20861c7..53e85a7ef 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -54,6 +54,30 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + Show IS-IS MPLS specific information + + + + + Show IS-IS LDP-IGP synchronization information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show specific IS-IS LDP-IGP synchronization for an interface + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + Show IS-IS MPLS traffic engineering information @@ -176,4 +200,4 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + \ No newline at end of file diff --git a/op-mode-definitions/include/ospf-common.xml.i b/op-mode-definitions/include/ospf-common.xml.i index 098254f4e..7d9e541cf 100644 --- a/op-mode-definitions/include/ospf-common.xml.i +++ b/op-mode-definitions/include/ospf-common.xml.i @@ -517,6 +517,30 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + Show OSPF MPLS specific information + + + + + Show OSPF LDP-IGP synchronization information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show specific OSPF LDP-IGP synchronization for an interface + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + Show IPv4 OSPF neighbor information @@ -547,4 +571,4 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + \ No newline at end of file diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index d11d80a1f..61e29c449 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -308,5 +308,48 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): self.assertIn(f' segment-routing prefix {prefix_three} absolute {prefix_three_value} explicit-null', tmp) self.assertIn(f' segment-routing prefix {prefix_four} absolute {prefix_four_value} no-php-flag', tmp) + def test_isis_08_ldp_sync(self): + holddown = "500" + interface = 'lo' + + self.cli_set(base_path + ['net', net]) + self.cli_set(base_path + ['interface', interface]) + self.cli_set(base_path + ['ldp-sync', 'holddown', holddown]) + + # Commit main ISIS changes + self.cli_commit() + + # Verify main ISIS changes + tmp = self.getFRRconfig(f'router isis {domain}', daemon='isisd') + self.assertIn(f' net {net}', tmp) + self.assertIn(f' mpls ldp-sync', tmp) + self.assertIn(f' mpls ldp-sync holddown {holddown}', tmp) + + for interface in self._interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'holddown', holddown]) + + # Commit interface changes for holddown + self.cli_commit() + + # Verify interface changes for holddown + tmp = self.getFRRconfig(f'interface {interface}', daemon='isisd') + self.assertIn(f'interface {interface}', tmp) + self.assertIn(f' ip router isis {domain}', tmp) + self.assertIn(f' ipv6 router isis {domain}', tmp) + self.assertIn(f' isis mpls ldp-sync holddown {holddown}', tmp) + + for interface in self._interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'disable']) + + # Commit interface changes for disable + self.cli_commit() + + # Verify interface changes for disable + tmp = self.getFRRconfig(f'interface {interface}', daemon='isisd') + self.assertIn(f'interface {interface}', tmp) + self.assertIn(f' ip router isis {domain}', tmp) + self.assertIn(f' ipv6 router isis {domain}', tmp) + self.assertIn(f' no isis mpls ldp-sync', tmp) + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py index 581959b15..d4c85f2b2 100755 --- a/smoketest/scripts/cli/test_protocols_ospf.py +++ b/smoketest/scripts/cli/test_protocols_ospf.py @@ -434,6 +434,47 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase): self.assertIn(f' segment-routing prefix {prefix_one} index {prefix_one_value} explicit-null', frrconfig) self.assertIn(f' segment-routing prefix {prefix_two} index {prefix_two_value} no-php-flag', frrconfig) + def test_ospf_15_ldp_sync(self): + holddown = "500" + interface = 'lo' + interfaces = Section.interfaces('ethernet') + + self.cli_set(base_path + ['interface', interface]) + self.cli_set(base_path + ['ldp-sync', 'holddown', holddown]) + + # Commit main OSPF changes + self.cli_commit() + + # Verify main OSPF changes + frrconfig = self.getFRRconfig('router ospf') + self.assertIn(f'router ospf', frrconfig) + self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) + self.assertIn(f' mpls ldp-sync holddown {holddown}', frrconfig) + + for interface in interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'holddown', holddown]) + + # Commit interface changes for holddown + self.cli_commit() + + # Verify interface changes for holddown + config = self.getFRRconfig(f'interface {interface}') + self.assertIn(f'interface {interface}', config) + self.assertIn(f' ip ospf dead-interval 40', config) + self.assertIn(f' ip ospf mpls ldp-sync', config) + self.assertIn(f' ip ospf mpls ldp-sync holddown {holddown}', config) + + for interface in interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'disable']) + + # Commit interface changes for disable + self.cli_commit() + + # Verify interface changes for disable + config = self.getFRRconfig(f'interface {interface}') + self.assertIn(f'interface {interface}', config) + self.assertIn(f' ip ospf dead-interval 40', config) + self.assertIn(f' no ip ospf mpls ldp-sync', config) if __name__ == '__main__': unittest.main(verbosity=2) -- cgit v1.2.3 From 6efdab7cccdd697b4479c9af9f000369c3729011 Mon Sep 17 00:00:00 2001 From: Tobias Fiebig Date: Fri, 10 Mar 2023 12:48:09 +0100 Subject: T5078: Added filtered-routes BGP command --- op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i | 6 ++++++ op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i index 7dbc4fde5..820d507fd 100644 --- a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i @@ -195,6 +195,12 @@ + + + Show filtered routes from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + Show received routes from BGP neighbor diff --git a/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i index 36cc9a3fa..db9021f3e 100644 --- a/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i +++ b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i @@ -93,6 +93,12 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + Show the filtered routes from neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + Show the received routes from neighbor -- cgit v1.2.3 From 9347bfa209626167f7f04856a81fc4ccab1aaccd Mon Sep 17 00:00:00 2001 From: Cheeze_It Date: Sun, 9 Apr 2023 17:38:36 -0600 Subject: T5081: ISIS and OSPF syncronization with IGP-LDP sync --- op-mode-definitions/include/isis-common.xml.i | 22 +++------------------- op-mode-definitions/include/ldp-sync.xml.i | 19 +++++++++++++++++++ op-mode-definitions/include/ospf-common.xml.i | 20 ++------------------ 3 files changed, 24 insertions(+), 37 deletions(-) create mode 100644 op-mode-definitions/include/ldp-sync.xml.i (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 53e85a7ef..b5b4f9b5d 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -56,31 +56,15 @@ - Show IS-IS MPLS specific information + Show MPLS information - - - Show IS-IS LDP-IGP synchronization information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show specific IS-IS LDP-IGP synchronization for an interface - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - + #include - Show IS-IS MPLS traffic engineering information + Show MPLS traffic engineering information diff --git a/op-mode-definitions/include/ldp-sync.xml.i b/op-mode-definitions/include/ldp-sync.xml.i new file mode 100644 index 000000000..b3be8f503 --- /dev/null +++ b/op-mode-definitions/include/ldp-sync.xml.i @@ -0,0 +1,19 @@ + + + + Show LDP-IGP synchronization information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show specific LDP-IGP synchronization for an interface + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + \ No newline at end of file diff --git a/op-mode-definitions/include/ospf-common.xml.i b/op-mode-definitions/include/ospf-common.xml.i index 7d9e541cf..d1a62b690 100644 --- a/op-mode-definitions/include/ospf-common.xml.i +++ b/op-mode-definitions/include/ospf-common.xml.i @@ -519,26 +519,10 @@ - Show OSPF MPLS specific information + Show MPLS information - - - Show OSPF LDP-IGP synchronization information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show specific OSPF LDP-IGP synchronization for an interface - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - + #include -- cgit v1.2.3 From 47bd0d8ab940bd8bb9b7c852ac80e0d9a3728a82 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 12 Apr 2023 21:46:07 +0200 Subject: xml: op-mode: T5081: re-use vtysh-generic-detail building block --- op-mode-definitions/include/isis-common.xml.i | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index b5b4f9b5d..53be33b68 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -4,12 +4,7 @@ Show IS-IS link state database - - - Show detailed information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + #include ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -36,12 +31,7 @@ - - - Show detailed information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + #include ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -95,12 +85,7 @@ Show IS-IS neighbor adjacencies - - - Show detailed information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + #include ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ -- cgit v1.2.3 From 23c757dae9b164cdaeba334b509b4def9c71f9b3 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 12 Apr 2023 21:47:31 +0200 Subject: xml: op-mode: T5081: introduce new FRR tagNode interface building block --- op-mode-definitions/include/isis-common.xml.i | 20 ++------------------ op-mode-definitions/include/ldp-sync.xml.i | 10 +--------- op-mode-definitions/include/ospf-common.xml.i | 10 +--------- .../include/vtysh-generic-interface-tagNode.xml.i | 11 +++++++++++ 4 files changed, 15 insertions(+), 36 deletions(-) create mode 100644 op-mode-definitions/include/vtysh-generic-interface-tagNode.xml.i (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 53be33b68..e94d868e8 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -35,15 +35,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - Show specific IS-IS interface - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - +#include Show MPLS information @@ -69,15 +61,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - Show specific IS-IS interface - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + #include diff --git a/op-mode-definitions/include/ldp-sync.xml.i b/op-mode-definitions/include/ldp-sync.xml.i index b3be8f503..b7b04e7e5 100644 --- a/op-mode-definitions/include/ldp-sync.xml.i +++ b/op-mode-definitions/include/ldp-sync.xml.i @@ -5,15 +5,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - Show specific LDP-IGP synchronization for an interface - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + #include \ No newline at end of file diff --git a/op-mode-definitions/include/ospf-common.xml.i b/op-mode-definitions/include/ospf-common.xml.i index d1a62b690..aebbae5ff 100644 --- a/op-mode-definitions/include/ospf-common.xml.i +++ b/op-mode-definitions/include/ospf-common.xml.i @@ -508,15 +508,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - Show IPv4 OSPF information for specified interface - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - +#include Show MPLS information diff --git a/op-mode-definitions/include/vtysh-generic-interface-tagNode.xml.i b/op-mode-definitions/include/vtysh-generic-interface-tagNode.xml.i new file mode 100644 index 000000000..e95961177 --- /dev/null +++ b/op-mode-definitions/include/vtysh-generic-interface-tagNode.xml.i @@ -0,0 +1,11 @@ + + + + Show information about specific interface + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + -- cgit v1.2.3 From a6499ea9d95d2b66d7977cea1d43f96d0116d4c3 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Mon, 17 Apr 2023 22:36:04 +0200 Subject: op-mode: bgp: T1315: add VNI related commands This extends commit 3fa1092930c (op-mode: bgp: support VRF related "show bgp vrf" commands). vyos@vyos:~$ show bgp vni Possible completions: 1-16777215 VXLAN network identifier (VNI) number all vyos@vyos:~$ show bgp vni 1 type Possible completions: 1 EAD (Type-1) route 2 MAC-IP (Type-2) route 3 Multicast (Type-3) route ead EAD (Type-1) route macip MAC-IP (Type-2) route multicast Multicast (Type-3) route vyos@vyos:~$ show bgp vni 1 vtep Possible completions: Remote VTEP IP address --- op-mode-definitions/include/bgp/evpn-type-1.xml.i | 8 +++ op-mode-definitions/include/bgp/evpn-type-2.xml.i | 8 +++ op-mode-definitions/include/bgp/evpn-type-3.xml.i | 8 +++ op-mode-definitions/include/bgp/evpn-type-4.xml.i | 8 +++ op-mode-definitions/include/bgp/evpn-type-5.xml.i | 8 +++ .../include/bgp/evpn-type-ead.xml.i | 8 +++ op-mode-definitions/include/bgp/evpn-type-es.xml.i | 8 +++ .../include/bgp/evpn-type-macip.xml.i | 8 +++ .../include/bgp/evpn-type-multicast.xml.i | 8 +++ .../include/bgp/evpn-type-prefix.xml.i | 8 +++ .../include/bgp/show-bgp-common.xml.i | 70 ++++------------------ op-mode-definitions/show-bgp.xml.in | 27 +++++++++ 12 files changed, 117 insertions(+), 60 deletions(-) create mode 100644 op-mode-definitions/include/bgp/evpn-type-1.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-2.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-3.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-4.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-5.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-ead.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-es.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-macip.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-multicast.xml.i create mode 100644 op-mode-definitions/include/bgp/evpn-type-prefix.xml.i (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/bgp/evpn-type-1.xml.i b/op-mode-definitions/include/bgp/evpn-type-1.xml.i new file mode 100644 index 000000000..b5097c8b1 --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-1.xml.i @@ -0,0 +1,8 @@ + + + + EAD (Type-1) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-2.xml.i b/op-mode-definitions/include/bgp/evpn-type-2.xml.i new file mode 100644 index 000000000..827298d62 --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-2.xml.i @@ -0,0 +1,8 @@ + + + + MAC-IP (Type-2) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-3.xml.i b/op-mode-definitions/include/bgp/evpn-type-3.xml.i new file mode 100644 index 000000000..ae90b2e5c --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-3.xml.i @@ -0,0 +1,8 @@ + + + + Multicast (Type-3) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-4.xml.i b/op-mode-definitions/include/bgp/evpn-type-4.xml.i new file mode 100644 index 000000000..7248b4753 --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-4.xml.i @@ -0,0 +1,8 @@ + + + + Ethernet Segment (Type-4) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-5.xml.i b/op-mode-definitions/include/bgp/evpn-type-5.xml.i new file mode 100644 index 000000000..e3a72168a --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-5.xml.i @@ -0,0 +1,8 @@ + + + + Prefix (Type-5) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-ead.xml.i b/op-mode-definitions/include/bgp/evpn-type-ead.xml.i new file mode 100644 index 000000000..452de2f9a --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-ead.xml.i @@ -0,0 +1,8 @@ + + + + EAD (Type-1) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-es.xml.i b/op-mode-definitions/include/bgp/evpn-type-es.xml.i new file mode 100644 index 000000000..50c40151a --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-es.xml.i @@ -0,0 +1,8 @@ + + + + Ethernet Segment (Type-4) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-macip.xml.i b/op-mode-definitions/include/bgp/evpn-type-macip.xml.i new file mode 100644 index 000000000..6f601eb3f --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-macip.xml.i @@ -0,0 +1,8 @@ + + + + MAC-IP (Type-2) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-multicast.xml.i b/op-mode-definitions/include/bgp/evpn-type-multicast.xml.i new file mode 100644 index 000000000..5194dbb56 --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-multicast.xml.i @@ -0,0 +1,8 @@ + + + + Multicast (Type-3) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/evpn-type-prefix.xml.i b/op-mode-definitions/include/bgp/evpn-type-prefix.xml.i new file mode 100644 index 000000000..d5054d86b --- /dev/null +++ b/op-mode-definitions/include/bgp/evpn-type-prefix.xml.i @@ -0,0 +1,8 @@ + + + + Prefix (Type-5) route + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/show-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-bgp-common.xml.i index c9a112fca..de794a879 100644 --- a/op-mode-definitions/include/bgp/show-bgp-common.xml.i +++ b/op-mode-definitions/include/bgp/show-bgp-common.xml.i @@ -171,66 +171,16 @@ Specify Route type - - - EAD (Type-1) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - MAC-IP (Type-2) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Multicast (Type-3) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Ethernet Segment (Type-4) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Prefix (Type-5) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - EAD (Type-1) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Ethernet Segment (Type-4) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - MAC-IP (Type-2) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Multicast (Type-3) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Prefix (Type-5) route - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include #include diff --git a/op-mode-definitions/show-bgp.xml.in b/op-mode-definitions/show-bgp.xml.in index 974147621..3c212614c 100644 --- a/op-mode-definitions/show-bgp.xml.in +++ b/op-mode-definitions/show-bgp.xml.in @@ -51,6 +51,33 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + #include + + + + + Remote VTEP IP address + + <x.x.x.x> + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display number of prefixes for all afi/safi + + + #include + #include + #include + #include + #include + #include + + + + Show BGP VRF information -- cgit v1.2.3