diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-08-23 14:22:41 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-08-23 14:22:41 +0200 |
commit | aa25690c83c4812c92490d29b564dd0330b24d34 (patch) | |
tree | 15c5f45b5f82fd5b788c842caeba06d3d81d96f9 /python/vyos/ifconfig/bond.py | |
parent | 20ef1aab793504cf4956dedeeadaf528933b7ccf (diff) | |
download | vyos-1x-aa25690c83c4812c92490d29b564dd0330b24d34.tar.gz vyos-1x-aa25690c83c4812c92490d29b564dd0330b24d34.zip |
T2755: convert jmespath.search() to vyos_dict_search() for performance
Diffstat (limited to 'python/vyos/ifconfig/bond.py')
-rw-r--r-- | python/vyos/ifconfig/bond.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/bond.py b/python/vyos/ifconfig/bond.py index 193cea321..64407401b 100644 --- a/python/vyos/ifconfig/bond.py +++ b/python/vyos/ifconfig/bond.py @@ -14,12 +14,12 @@ # License along with this library. If not, see <http://www.gnu.org/licenses/>. import os -import jmespath from vyos.ifconfig.interface import Interface from vyos.ifconfig.vlan import VLAN from vyos.util import cmd +from vyos.util import vyos_dict_search from vyos.validate import assert_list from vyos.validate import assert_positive @@ -336,7 +336,7 @@ class BondIf(Interface): self.set_arp_ip_target('-' + addr) # Add configured ARP target addresses - value = jmespath.search('arp_monitor.target', config) + value = vyos_dict_search('arp_monitor.target', config) if isinstance(value, str): value = [value] if value: @@ -359,7 +359,7 @@ class BondIf(Interface): if value: self.set_mode(value) # Add (enslave) interfaces to bond - value = jmespath.search('member.interface', config) + value = vyos_dict_search('member.interface', config) if value: for interface in value: # if we've come here we already verified the interface |