File tree Expand file tree Collapse file tree 5 files changed +14
-32
lines changed Expand file tree Collapse file tree 5 files changed +14
-32
lines changed Original file line number Diff line number Diff line change 4
4
<help>VXLAN network identifier (VNI) number</help>
5
5
<completionHelp>
6
6
<list><1 -16777215 > all</list>
7
- <script>${vyos_completion_dir}/list_vni.py </script>
7
+ <script>${vyos_completion_dir}/list_vni.sh </script>
8
8
</completionHelp>
9
9
</properties>
10
10
<command>${vyos_op_scripts_dir}/evpn.py show_evpn --command " $*" </command>
Original file line number Diff line number Diff line change 4
4
<help>VXLAN network identifier (VNI) number</help>
5
5
<completionHelp>
6
6
<list><1 -16777215 ></list>
7
- <script>${vyos_completion_dir}/list_vni.py </script>
7
+ <script>${vyos_completion_dir}/list_vni.sh </script>
8
8
</completionHelp>
9
9
</properties>
10
10
<command>${vyos_op_scripts_dir}/evpn.py show_evpn --command " $*" </command>
Original file line number Diff line number Diff line change 48
48
<help >Show ESI information for specified ESI</help >
49
49
<completionHelp >
50
50
<list >< esi> </list >
51
- <script >${vyos_completion_dir}/list_esi.py </script >
51
+ <script >${vyos_completion_dir}/list_esi.sh </script >
52
52
</completionHelp >
53
53
</properties >
54
54
<command >${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command >
Original file line number Diff line number Diff line change 1
- #!/usr/ bin/env python3
1
+ #! /bin/bash
2
2
#
3
- # Copyright (C) 2016- 2024 VyOS maintainers and contributors
3
+ # Copyright (C) 2024 VyOS maintainers and contributors
4
4
#
5
5
# This program is free software; you can redistribute it and/or modify
6
6
# it under the terms of the GNU General Public License version 2 or later as
7
7
# published by the Free Software Foundation.
8
8
#
9
9
# This program is distributed in the hope that it will be useful,
10
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
12
# GNU General Public License for more details.
13
13
#
14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
#
17
- # This script is completion helper to list all configured VNIs that are visible to FRR
17
+ # This script is completion helper to list all valid ESEs that are visible to FRR
18
18
19
- import json
20
- from vyos .utils .process import cmd
21
-
22
- def get_esi ():
23
- esiDict = json .loads (cmd (f"vtysh -c 'show evpn es json'" ))
24
- esiList = []
25
- for i in esiDict :
26
- esiList .append (i ['esi' ])
27
-
28
- print (' ' .join (esiList ))
29
-
30
- if __name__ == '__main__' :
31
- get_esi ()
19
+ esiJson=$( vtysh -c ' show evpn es json' )
20
+ echo " $( echo " $esiJson " | jq -r ' .[] | .esi' ) "
Original file line number Diff line number Diff line change 1
- #!/usr/ bin/env python3
1
+ #! /bin/bash
2
2
#
3
- # Copyright (C) 2016- 2024 VyOS maintainers and contributors
3
+ # Copyright (C) 2024 VyOS maintainers and contributors
4
4
#
5
5
# This program is free software; you can redistribute it and/or modify
6
6
# it under the terms of the GNU General Public License version 2 or later as
7
7
# published by the Free Software Foundation.
8
8
#
9
9
# This program is distributed in the hope that it will be useful,
10
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
12
# GNU General Public License for more details.
13
13
#
14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
#
17
17
# This script is completion helper to list all configured VNIs that are visible to FRR
18
18
19
- import json
20
- from vyos .utils .process import cmd
21
-
22
- def get_vni ():
23
- vniDict = json .loads (cmd (f"vtysh -c 'show evpn vni json'" ))
24
- print (' ' .join (vniDict .keys ()))
25
-
26
- if __name__ == '__main__' :
27
- get_vni ()
19
+ vniJson=$( vtysh -c ' show evpn vni json' )
20
+ echo " $( echo " $vniJson " | jq -r ' keys | .[]' ) "
You can’t perform that action at this time.
0 commit comments