An interface's name is limited to INTERFACE_MAX_SIZE. In some cases, IP
utils truncate this name automatically. In Ubuntu Xenial, ip link
returns an error instead of this behaviour.
This change truncates the device's name upon read (The full name is
still stored on the object). This way, the code does not rely on IP
utils to do the truncation. This solves the error in the test.
Closes-Bug: 1637993
Conflicts:
neutron/agent/linux/ip_lib.py
Change-Id: I41b226e4b52239b861e2b6e806296025502b9b60
(cherry picked from commit 0140a183dc0d5610f51badae82a16c4c44ff9885)
(cherry picked from commit 7295beec362d4754d1eb6c353efdf14a8edde8cb)
Reviewed: https:/ /review. openstack. org/421992 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=3a7c9d0e4d1 ef2d3cf44305f7c 885f1ad9267946
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 3a7c9d0e4d1ef2d 3cf44305f7c885f 1ad9267946
Author: Omer Anson <email address hidden>
Date: Mon Oct 31 08:52:43 2016 +0200
Truncate IPDevice's name to interface max size
An interface's name is limited to INTERFACE_MAX_SIZE. In some cases, IP
utils truncate this name automatically. In Ubuntu Xenial, ip link
returns an error instead of this behaviour.
This change truncates the device's name upon read (The full name is
still stored on the object). This way, the code does not rely on IP
utils to do the truncation. This solves the error in the test.
Closes-Bug: 1637993
Conflicts: agent/linux/ ip_lib. py
neutron/
Change-Id: I41b226e4b52239 b861e2b6e806296 025502b9b60 0f51badae82a16c 4c44ff9885) 4d1eb6c353efdf1 4a8edde8cb)
(cherry picked from commit 0140a183dc0d561
(cherry picked from commit 7295beec362d475