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.
Reviewed: https:/ /review. openstack. org/391808 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=0140a183dc0 d5610f51badae82 a16c4c44ff9885
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0140a183dc0d561 0f51badae82a16c 4c44ff9885
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.
Change-Id: I41b226e4b52239 b861e2b6e806296 025502b9b60
Closes-Bug: 1637993