neutron/neutron/cmd
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
..
eventlet [OVN] Add OVN metadata entry points 2020-01-09 09:49:49 +00:00
ovn Refactor OVN client QoS extension 2020-04-10 13:11:00 +00:00
sanity Use pyroute2 for SRIOV VF commands 2020-05-27 16:58:02 +00:00
upgrade_checks Add upgrade check for NIC Switch agent 2019-12-01 11:58:16 +02:00
__init__.py Fix logging error for Guru Meditation Report 2016-02-08 16:52:17 -08:00
ipset_cleanup.py Make use of -w argument for iptables calls 2017-08-31 20:28:53 +00:00
keepalived_state_change.py Replace keepalived notifier bash script with Python ip monitor 2015-03-18 18:59:33 -04:00
linuxbridge_cleanup.py Switch IPDevice.exists() method to use pyroute2 2018-03-19 11:56:45 +01:00
netns_cleanup.py Remove Neutron LBaaS 2019-09-20 07:46:06 +00:00
ovs_cleanup.py Deprecate config option "ovs_integration_bridge" 2020-02-17 11:02:16 +00:00
pd_notify.py Fix pylint R1714 (consider-using-in) refactor messages 2019-02-21 21:11:34 +00:00
runtime_checks.py Use dhcp-host tag support when supported 2020-05-07 01:38:14 +02:00
sanity_check.py Use pyroute2 for SRIOV VF commands 2020-05-27 16:58:02 +00:00
status.py Add check for external_network_bridge in neutron-status 2019-03-22 13:14:24 +00:00