Skip to content

Commit 062f7f4

Browse files
authored
Merge pull request #4565 from dmbaturin/T7560-op-virtual-tag-nodes
op-mode: T7560: add support for virtual tag nodes
2 parents 5c2f70f + edc64e7 commit 062f7f4

File tree

71 files changed

+1747
-1790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1747
-1790
lines changed

op-mode-definitions/clear-ip.xml.in

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,28 @@
77
<help>Clear Internet Protocol (IP) statistics or status</help>
88
</properties>
99
<children>
10-
<node name="prefix-list">
11-
<properties>
12-
<help>Clear prefix-list statistics or status</help>
13-
</properties>
14-
<command>vtysh -c "$*"</command>
15-
</node>
1610
<tagNode name="prefix-list">
1711
<properties>
1812
<help>Clear prefix-list statistics or status for specified word</help>
1913
<completionHelp>
2014
<list>&lt;WORD&gt;</list>
2115
</completionHelp>
2216
</properties>
17+
<standalone>
18+
<help>Clear prefix-list statistics or status</help>
19+
<command>vtysh -c "$*"</command>
20+
</standalone>
2321
<command>vtysh -c "$*"</command>
2422
<children>
25-
<leafNode name="node.tag">
23+
<virtualTagNode>
2624
<properties>
2725
<help>Clear prefix-list statistics or status for given word|network</help>
2826
<completionHelp>
2927
<list>&lt;x.x.x.x/x&gt;</list>
3028
</completionHelp>
3129
</properties>
3230
<command>vtysh -c "$*"</command>
33-
</leafNode>
31+
</virtualTagNode>
3432
</children>
3533
</tagNode>
3634
</children>

op-mode-definitions/clear-ipv6.xml.in

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,28 @@
77
<help>Clear Internet Protocol (IPv6) statistics or status</help>
88
</properties>
99
<children>
10-
<node name="prefix-list">
11-
<properties>
12-
<help>Clear prefix-list statistics or status</help>
13-
</properties>
14-
<command>vtysh -c "$*"</command>
15-
</node>
1610
<tagNode name="prefix-list">
1711
<properties>
1812
<help>Clear prefix-list statistics or status for specified word</help>
1913
<completionHelp>
2014
<list>WORD</list>
2115
</completionHelp>
2216
</properties>
17+
<standalone>
18+
<help>Clear prefix-list statistics or status</help>
19+
<command>vtysh -c "$*"</command>
20+
</standalone>
2321
<command>vtysh -c "$*"</command>
2422
<children>
25-
<leafNode name="node.tag">
23+
<virtualTagNode>
2624
<properties>
2725
<help>Clear prefix-list statistics or status for given word|network</help>
2826
<completionHelp>
2927
<list>&lt;h:h:h:h:h:h:h:h/x&gt;</list>
3028
</completionHelp>
3129
</properties>
3230
<command>vtysh -c "$*"</command>
33-
</leafNode>
31+
</virtualTagNode>
3432
</children>
3533
</tagNode>
3634
</children>

op-mode-definitions/execute-port-scan.xml.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
</properties>
1717
<command>nmap -p- -T4 --max-retries=1 --host-timeout=30s "$4"</command>
1818
<children>
19-
<leafNode name="node.tag">
19+
<virtualTagNode>
2020
<properties>
2121
<help>Port scan options</help>
2222
<completionHelp>
2323
<script>${vyos_op_scripts_dir}/execute_port-scan.py --get-options-nested "${COMP_WORDS[@]}"</script>
2424
</completionHelp>
2525
</properties>
2626
<command>${vyos_op_scripts_dir}/execute_port-scan.py "${@:4}"</command>
27-
</leafNode>
27+
</virtualTagNode>
2828
</children>
2929
</tagNode>
3030
</children>

op-mode-definitions/firewall.xml.in

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,43 @@
77
<help>Show firewall information</help>
88
</properties>
99
<children>
10-
<tagNode name="group">
10+
<node name="group">
1111
<properties>
1212
<help>Show firewall group</help>
13-
<completionHelp>
14-
<path>firewall group address-group</path>
15-
<path>firewall group network-group</path>
16-
<path>firewall group port-group</path>
17-
<path>firewall group domain-group</path>
18-
<path>firewall group dynamic-group address-group</path>
19-
<path>firewall group dynamic-group ipv6-address-group</path>
20-
<path>firewall group interface-group</path>
21-
<path>firewall group ipv6-address-group</path>
22-
<path>firewall group ipv6-network-group</path>
23-
<path>firewall group mac-group</path>
24-
<path>firewall group network-group</path>
25-
<path>firewall group port-group</path>
26-
<path>firewall group remote-group</path>
27-
</completionHelp>
2813
</properties>
2914
<children>
30-
<leafNode name="detail">
15+
<virtualTagNode>
3116
<properties>
32-
<help>Show list view of firewall groups</help>
17+
<help>Show firewall group</help>
3318
<completionHelp>
34-
<path>firewall group detail</path>
19+
<path>firewall group address-group</path>
20+
<path>firewall group network-group</path>
21+
<path>firewall group port-group</path>
22+
<path>firewall group domain-group</path>
23+
<path>firewall group dynamic-group address-group</path>
24+
<path>firewall group dynamic-group ipv6-address-group</path>
25+
<path>firewall group interface-group</path>
26+
<path>firewall group ipv6-address-group</path>
27+
<path>firewall group ipv6-network-group</path>
28+
<path>firewall group mac-group</path>
29+
<path>firewall group network-group</path>
30+
<path>firewall group port-group</path>
31+
<path>firewall group remote-group</path>
3532
</completionHelp>
3633
</properties>
37-
<command>${vyos_op_scripts_dir}/firewall.py --action show_group --name $4 --detail $5</command>
38-
</leafNode>
39-
</children>
40-
<command>${vyos_op_scripts_dir}/firewall.py --action show_group --name $4</command>
41-
</tagNode>
42-
<node name="group">
43-
<properties>
44-
<help>Show firewall group</help>
45-
</properties>
46-
<children>
34+
<children>
35+
<leafNode name="detail">
36+
<properties>
37+
<help>Show list view of firewall groups</help>
38+
<completionHelp>
39+
<path>firewall group detail</path>
40+
</completionHelp>
41+
</properties>
42+
<command>${vyos_op_scripts_dir}/firewall.py --action show_group --name $4 --detail $5</command>
43+
</leafNode>
44+
</children>
45+
<command>${vyos_op_scripts_dir}/firewall.py --action show_group --name $4</command>
46+
</virtualTagNode>
4747
<leafNode name="detail">
4848
<properties>
4949
<help>Show list view of firewall group</help>

op-mode-definitions/include/bgp/afi-common.xml.i

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11
<!-- included start from bgp/afi-common.xml.i -->
2-
<tagNode name="community">
3-
<properties>
4-
<help>Community number where AA and NN are (0-65535)</help>
5-
<completionHelp>
6-
<list>AA:NN</list>
7-
</completionHelp>
8-
</properties>
9-
<children>
10-
#include <include/bgp/exact-match.xml.i>
11-
</children>
12-
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
13-
</tagNode>
14-
<tagNode name="large-community">
15-
<properties>
16-
<help>Display routes matching the large-communities</help>
17-
<completionHelp>
18-
<list>AA:BB:CC</list>
19-
</completionHelp>
20-
</properties>
21-
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
22-
<children>
23-
#include <include/bgp/exact-match.xml.i>
24-
</children>
25-
</tagNode>
262
<tagNode name="large-community-list">
273
<properties>
284
<help>Display routes matching the large-community-list</help>

op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44
<help>Display routes matching the community</help>
55
</properties>
66
<children>
7+
<virtualTagNode>
8+
<properties>
9+
<help>Community number where AA and NN are (0-65535)</help>
10+
<completionHelp>
11+
<list>AA:NN</list>
12+
</completionHelp>
13+
</properties>
14+
<children>
15+
#include <include/bgp/exact-match.xml.i>
16+
</children>
17+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
18+
</virtualTagNode>
719
<leafNode name="accept-own">
820
<properties>
921
<help>Should accept local VPN route if exported and imported into different VRF (well-known community)</help>
@@ -142,20 +154,32 @@
142154
<help>Show BGP routes matching the specified large-communities</help>
143155
</properties>
144156
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
157+
<children>
158+
<virtualTagNode>
159+
<properties>
160+
<help>Display routes matching the large-communities</help>
161+
<completionHelp>
162+
<list>AA:BB:CC</list>
163+
</completionHelp>
164+
</properties>
165+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
166+
<children>
167+
#include <include/bgp/exact-match.xml.i>
168+
</children>
169+
</virtualTagNode>
170+
</children>
145171
</node>
146-
<leafNode name="neighbors">
147-
<properties>
148-
<help>Detailed information on TCP and BGP neighbor connections</help>
149-
</properties>
150-
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
151-
</leafNode>
152172
<tagNode name="neighbors">
153173
<properties>
154174
<help>Show BGP information for specified neighbor</help>
155175
<completionHelp>
156176
<script>vtysh -c "$(IFS=$' '; echo "${COMP_WORDS[@]:0:${#COMP_WORDS[@]}-2} summary")" | awk '/^[0-9a-f]/ {print $1}'</script>
157177
</completionHelp>
158178
</properties>
179+
<standalone>
180+
<help>Detailed information on TCP and BGP neighbor connections</help>
181+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
182+
</standalone>
159183
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
160184
<children>
161185
#include <include/bgp/advertised-routes.xml.i>

op-mode-definitions/include/bgp/afi-ipv4-ipv6-flowspec.xml.i

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
<!-- included start from bgp/afi-ipv4-ipv6-flowspec.xml.i -->
2-
<tagNode name="flowspec">
3-
<properties>
4-
<help>Network in the BGP routing table to display</help>
5-
<completionHelp>
6-
<list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt; &lt;h:h:h:h:h:h:h:h&gt; &lt;h:h:h:h:h:h:h:h/x&gt;</list>
7-
</completionHelp>
8-
</properties>
9-
<children>
10-
#include <include/bgp/prefix-bestpath-multipath.xml.i>
11-
</children>
12-
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
13-
</tagNode>
142
<node name="flowspec">
153
<properties>
164
<help>Flowspec Address Family modifier</help>
@@ -19,6 +7,18 @@
197
#include <include/bgp/afi-common.xml.i>
208
#include <include/bgp/afi-ipv4-ipv6-common.xml.i>
219
#include <include/vtysh-generic-detail.xml.i>
10+
<virtualTagNode>
11+
<properties>
12+
<help>Network in the BGP routing table to display</help>
13+
<completionHelp>
14+
<list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt; &lt;h:h:h:h:h:h:h:h&gt; &lt;h:h:h:h:h:h:h:h/x&gt;</list>
15+
</completionHelp>
16+
</properties>
17+
<children>
18+
#include <include/bgp/prefix-bestpath-multipath.xml.i>
19+
</children>
20+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
21+
</virtualTagNode>
2222
</children>
2323
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
2424
</node>

op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn-rd.xml.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
</properties>
99
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
1010
<children>
11-
<tagNode name="">
11+
<virtualTagNode>
1212
<properties>
1313
<help>Show IP routes of specified prefix</help>
1414
<completionHelp>
1515
<list>&lt;x.x.x.x/x&gt; &lt;x:x:x:x:x:x:x:x/x&gt;</list>
1616
</completionHelp>
1717
</properties>
1818
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
19-
</tagNode>
19+
</virtualTagNode>
2020
</children>
2121
</tagNode>
2222
<!-- included end -->

op-mode-definitions/include/bgp/afi-ipv4-ipv6-vpn.xml.i

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
<!-- included start from bgp/afi-ipv4-ipv6-vpn.xml.i -->
2-
<tagNode name="vpn">
3-
<properties>
4-
<help>Network in the BGP routing table to display</help>
5-
<completionHelp>
6-
<list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt; &lt;h:h:h:h:h:h:h:h&gt; &lt;h:h:h:h:h:h:h:h/x&gt;</list>
7-
</completionHelp>
8-
</properties>
9-
<children>
10-
#include <include/bgp/prefix-bestpath-multipath.xml.i>
11-
</children>
12-
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
13-
</tagNode>
142
<node name="vpn">
153
<properties>
164
<help>VPN Address Family modifier</help>
@@ -19,6 +7,18 @@
197
#include <include/bgp/afi-common.xml.i>
208
#include <include/bgp/afi-ipv4-ipv6-common.xml.i>
219
#include <include/bgp/afi-ipv4-ipv6-vpn-rd.xml.i>
10+
<virtualTagNode>
11+
<properties>
12+
<help>Network in the BGP routing table to display</help>
13+
<completionHelp>
14+
<list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt; &lt;h:h:h:h:h:h:h:h&gt; &lt;h:h:h:h:h:h:h:h/x&gt;</list>
15+
</completionHelp>
16+
</properties>
17+
<children>
18+
#include <include/bgp/prefix-bestpath-multipath.xml.i>
19+
</children>
20+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
21+
</virtualTagNode>
2222
</children>
2323
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
2424
</node>

op-mode-definitions/include/bgp/next-hop.xml.i

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
</properties>
66
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
77
<children>
8+
<virtualTagNode>
9+
<properties>
10+
<help>IPv4/IPv6 nexthop address</help>
11+
<completionHelp>
12+
<list>&lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
13+
</completionHelp>
14+
</properties>
15+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
16+
<children>
17+
#include <include/vtysh-generic-detail.xml.i>
18+
</children>
19+
</virtualTagNode>
820
#include <include/vtysh-generic-detail.xml.i>
921
</children>
1022
</node>
11-
<tagNode name="nexthop">
12-
<properties>
13-
<help>IPv4/IPv6 nexthop address</help>
14-
<completionHelp>
15-
<list>&lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
16-
</completionHelp>
17-
</properties>
18-
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
19-
<children>
20-
#include <include/vtysh-generic-detail.xml.i>
21-
</children>
22-
</tagNode>
2323
<!-- included end -->

0 commit comments

Comments
 (0)