1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

14 Commits

Author SHA1 Message Date
4955b6017a Merge branch 'master-next' into python3
* master-next:
  addons: address: convert ip addresses from statemanager to IPNetwork objects
  main: add extra log info to output the exit status
2020-01-21 09:33:20 +01:00
9873823902 main: add extra log info to output the exit status
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-21 09:29:09 +01:00
0e936c3ffa python3: replacing ipaddr with custom ipnetwork.IPNetwork object
As mentioned in a previous commit:
python3 ipaddress behave differently from python2-ipaddr, this is
a serious problem for us since it breaks most of the ip addresses
code.

>>> import ipaddress
>>> ipaddress.ip_network("10.10.10.242/10", False)
IPv4Network('10.0.0.0/10')

This is a problem for us, so we need to use a custom IPNetwork object.
Our custom IPNetwork object uses ipaddress.IPAddress under the hood

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2020-01-08 11:09:08 +01:00
45864399b0 Revert "python3: ipaddress is now part of the standard library (removing python-ipaddr)"
This reverts commit 5dded70eaa1be660f80ebb50bfdb35e86d7e1fac.
2019-12-17 17:35:51 +01:00
5dded70eaa python3: ipaddress is now part of the standard library (removing python-ipaddr)
IPNetwork doesn't exists anymore and is replaced by ip_network. IPv?Network (4 and 6)
objects take an optional argument "strict" that defaults to True. If strict is set
and the ip address has the host bit set it will raise an exception. This is bad
for ifupdown2, so we need to replace all calls to IPNetwork and IPv?Network with
function who will set strict to False. That way we can limit the number of changes
for this patch.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:27:51 +01:00
bd441a519d python3: pypi support: except ImportError and ModuleNotFoundError
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:25:32 +01:00
e36ad206ac python3: utils.exec_command now returns str and not bytes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:20:27 +01:00
c46af1c992 python3: logging: the 'warn' method is deprecated, use warning instead
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:19:05 +01:00
47881fc0bb python3: nlcache: keeping ifname as str (and not bytes) to keep the cache working with minimal disruption
Spoiler alert: it is still super disrupted.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:12 +01:00
b47b030330 python3: nlcache: can't compare NoneType with integer using > or < anymore
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 17:01:04 +01:00
7f87d9d869 python3: nlcache: cache key (ifname) should of type str not bytes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:59:39 +01:00
3b01ed7618 python3: 2to3 changes
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:55:49 +01:00
35681c0608 python3: shebang update
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 16:40:10 +01:00
223ba5af1d ifupdown2 2.0.0-1
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
2019-12-17 13:46:18 +01:00