Merge "Remove run_as_root which fails without root_helper"

This commit is contained in:
Zuul 2020-12-04 01:36:37 +00:00 committed by Gerrit Code Review
commit d36befada6
3 changed files with 2 additions and 6 deletions

View File

@ -70,5 +70,4 @@ def _set_vf_interface_vlan(pf_ifname, vf_num, mac_addr, vlan=0):
'vf', vf_num,
'mac', mac_addr,
'vlan', vlan,
run_as_root=True,
check_exit_code=exit_code)

View File

@ -114,7 +114,7 @@ def port_unbind(endpoint_id, neutron_port, **kwargs):
network_id = neutron_port['network_id']
stdout, stderr = processutils.execute(
unbinding_exec_path, constants.UNBINDING_SUBCOMMAND, port_id, ifname,
endpoint_id, mac_address, vif_details, network_id, run_as_root=True)
endpoint_id, mac_address, vif_details, network_id)
try:
utils.remove_device(ifname)
except pyroute2.NetlinkError:
@ -148,6 +148,5 @@ def _configure_host_iface(ifname, endpoint_id, port_id, net_id, project_id,
stdout, stderr = processutils.execute(
binding_exec_path, constants.BINDING_SUBCOMMAND, port_id, ifname,
endpoint_id, hwaddr, net_id, project_id,
lib_utils.string_mappings(details),
run_as_root=True)
lib_utils.string_mappings(details))
return stdout, stderr

View File

@ -63,7 +63,6 @@ class TestHwVebDriver(base.TestCase):
'vf', fake_vf_num,
'mac', fake_port['port']['mac_address'],
'vlan', fake_vlan_id,
run_as_root=True,
check_exit_code=[0, 2, 254])
@mock.patch('oslo_concurrency.processutils.execute',
@ -91,5 +90,4 @@ class TestHwVebDriver(base.TestCase):
'vf', fake_vf_num,
'mac', fake_port['port']['mac_address'],
'vlan', 0,
run_as_root=True,
check_exit_code=[0, 2, 254])