neutron/neutron/tests/functional/sanity
Rodolfo Alonso Hernandez c5d8fd6329 Use pyroute2 for SRIOV VF commands
Recent changes in some versions of iproute2 CLI output (v4.18),
have invalidated the regular expression used to parse the
"ip link" output.

To solve this problem and avoid future ones, pyroute2 is used to
retrieve the virtual functions information and set the VF attributes
(spoofcheck, min_tx_rate, max_tx_rate and link_state).

pyroute2 extended the "ip link" support to retrieve this information,
adding "ext_mask=1" in the get command. If no virtual functions are
present in this particular network interface, the added method,
"get_link_vfs",  will return an empty list.

The set commands can return a "InterfaceOperationNotSupported" in
case the operation is not supported. For min_tx_rate, if the driver
does not support to set a minimum bandwidth, an "InvalidArgument"
(from a pyroute2.NetlinkError(22)) exception will be raised.

Change-Id: I680da4f64bd114f1caecaaeedbf8a4b1915a0849
Closes-Bug: #1878042
2020-05-27 16:58:02 +00:00
..
__init__.py Remove run-time version checking for openvswitch features 2014-06-04 09:25:53 -05:00
test_sanity.py Use pyroute2 for SRIOV VF commands 2020-05-27 16:58:02 +00:00