ifquery excluded the last digit of interfaces range given.
ex: eth[1-2] would give only eth1 instead of eth1 + eth2.
This commit fix this behavior by increasing the range in
expand_iface_range.
* Fix: Sonarqube issues
* Fix: ifquery hangs indefinitely on ^C
* Fix: Skipping admin down on deleted vlans
* Fix: Merge existing MTU into new netlink object
* Fix: scheduler: env variable not properly set for user commands (fixes#218)
* Fix: ifquery-check: vlan-protocol for dotted interfaces
* Fix: Down ops on vrf-slave should set the slave admin down
* New: Allow bond creation without slaves
* New: Add `--set-ring` option to ethtool
* New: Openvswitch : add support for fakebridge
* New: add support for systemd logging (--systemd)
* New: Process hwaddress before processing ip addresses
* New: Set protodown off on bond slave before bond is deleted
* New: Make sure bond speed and slaves (swps) speed are matching
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
Rename method "addr_metric_support" to prevent any misunderstanding/clash
with field "ADDR_METRIC_SUPPORT" defined on line 80
Signed-off-by: Julien Fortin <jfortin@nvidia.com>
/etc/network/interfaces
-----------------------
auto eth0.100
iface eth0.100
vlan-protocol 802.1ad
current
-------
ifquery -a -c
auto eth0.100
iface eth0.100 [pass]
new
---
ifquery -a -c
auto eth0.100
iface eth0.100 [pass]
vlan-protocol 802.1ad [pass]
Fake bridge are are ovsbridge child of a parent bridge with a specific vlan tag.
```
auto br-parent
iface br-parent inet manual
ovs_type OVSBridge
auto br-fakev10
iface br-fakev10 inet manual
ovs_type OVSBridge
ovs_bridge br-parent
ovs_options br-parent 10
```
If the output of the subprocess is empty, then an empty <bytes> object
is returned (b''), and not decoded into an empty <string> object.
This may result in errors such as:
info[109734]: executing /bin/ip -6 addr show eth0
networking[109734]: error: eth0: cannot use a string pattern on a
bytes-like object
error[109734]: eth0: cannot use a string pattern on a bytes-like object
As of now, the distutils is deprecated with removal planned for
python 3.12.
The recommended way is to use setuptools which is an enhanced
alternative to distutils maintained by the python packaging authority.
This commit replace with setuptools the distutil import inserted in the
8126ef0c00eb8e2faae2cf1ca9fbaf25c10582cd commit.
This commit also update the debian control runtime dependency.
distutils: https://docs.python.org/3/library/distutils.html
setuptools: https://setuptools.pypa.io/en/latest/
gvgen module require the six module from python3-six package.
This new dependency is only necessary for python2/python3 cross
compatibility on dict.iteritems() (py2) vs dict.items() (py3).
ifupdown2 does not support python2 so we could replace every iteritems
occurrences to it's python3 format but this means the gvgen module will
diff from upstream.
The simplest way is to make ifupdown depends on python3-six.