Commit Graph

3 Commits

Author SHA1 Message Date
Andrew Bonney cdb9fe351d Remove run_as_root which fails without root_helper
It appears that this library is typically run as the root user
which shouldn't require 'run_as_root'. When running as an
unprivileged user the required permissions can be granted by
specifying 'AmbientCapabilities = CAP_NET_ADMIN' in the service,
rather than 'CapabilityBoundingSet'.

An alternative approach would be to specify a 'root_helper' or to
switch to oslo.privsep, but these don't fully solve the problem
as the 'pyroute2' library also requires 'CAP_NET_ADMIN'.

Closes-Bug: #1852105
Change-Id: I9d0942f1cfc06cc3a7585683a030516096297767
2020-12-01 08:32:18 +00:00
Sean McGinnis 0f47555b38
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ibe31e2d17b8baf88c40e00e3beaa019b13594c7c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:53:47 -05:00
Hongbin Lu 48e3f4f91d Introduce a SR-IOV binding driver
The driver is for binding/unbinding SR-IOV port. Basically,
what it does is setting the vlan id for the VF interface.

Change-Id: Ife43b57a11c9aac9c0bece84adf719e62f708fda
Partial-Implements: blueprint sriov-binding
2017-10-16 13:45:16 +00:00