[system-tests] Replace ipaddr to netaddr in system tests

Bug #1510142 reported by Dmitry Tyzhnenko
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Opinion
Medium
Fuel QA Team

Bug Description

Because we have started use EUI module from netaddr package for work with mac addresses [1] we should stop using ipaddr package because modules do not have compatibilities.

[1] - https://github.com/openstack/fuel-qa/blob/bd5e806553a89b41b97eae71b703d97b66623214/fuelweb_test/models/fuel_web_client.py#L819

tags: added: non-release
Revision history for this message
Artem Panchenko (apanchenko-8) wrote :

Dmitry,

as far as I know we switched to 'ipaddr' in fuel-qa because it's used by fuel-devops and we wanted to make them more strict (for example bug #1433656). Could you please explain why 'ipaddr' module can't be used along with 'netaddr' in fuel-qa, because for me the issue is not clear?

Dmitry Pyzhov (dpyzhov)
tags: added: area-qa
Changed in fuel:
status: New → Opinion
Revision history for this message
Dmitry Tyzhnenko (dtyzhnenko) wrote :

Artem,

We will get AttributeError, when try create netaddr.IPNetwork from instance of ipaddr.IPNetwork. We should more careful if we using two packages in tests

net1 = ipaddr.IPNetwork('10.109.0.0/24')
net2 = netaddr.IPNetwork('10.109.1.0/24')

net1, net2
(IPv4Network('10.109.0.0/24'), IPNetwork('10.109.1.0/24'))

net3 = ipaddr.IPNetwork(net2)
net3
IPv4Network('10.109.1.0/24')

net4 = netaddr.IPNetwork(net1)
AttributeError: 'IPv4Network' object has no attribute '_value'

Revision history for this message
Artem Panchenko (apanchenko-8) wrote :

Dmitry,

for me that's absolutely fine. Those objects types have the same name, but they are different, so we can't compare them and so on. Currently we use 'ipaddr' and 'netaddr' modules in different places, that's why I believe there is no issue with compatibility.

tags: removed: non-release
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.