Merge "Move simple execute call to processutils."
This commit is contained in:
commit
56811efa35
|
@ -37,7 +37,6 @@ import six
|
|||
import nova.conf
|
||||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova.network import linux_utils as linux_net_utils
|
||||
from nova import objects
|
||||
from nova.pci import utils as pci_utils
|
||||
import nova.privsep.linux_net
|
||||
|
@ -1671,7 +1670,7 @@ class LinuxOVSInterfaceDriver(LinuxNetInterfaceDriver):
|
|||
'external-ids:attached-mac=%s' % mac_address])
|
||||
_execute('ip', 'link', 'set', dev, 'address', mac_address,
|
||||
run_as_root=True)
|
||||
linux_net_utils.set_device_mtu(dev, network.get('mtu'))
|
||||
nova.privsep.linux_net.set_device_mtu(dev, network.get('mtu'))
|
||||
_execute('ip', 'link', 'set', dev, 'up', run_as_root=True)
|
||||
if not gateway:
|
||||
# If we weren't instructed to act as a gateway then add the
|
||||
|
|
|
@ -31,6 +31,7 @@ import math
|
|||
import re
|
||||
|
||||
import netaddr
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging as messaging
|
||||
from oslo_service import periodic_task
|
||||
|
@ -67,7 +68,7 @@ CONF = nova.conf.CONF
|
|||
|
||||
def get_my_linklocal(interface):
|
||||
try:
|
||||
if_str = utils.execute(
|
||||
if_str = processutils.execute(
|
||||
'ip', '-f', 'inet6', '-o', 'addr', 'show', interface)
|
||||
condition = '\s+inet6\s+([0-9a-f:]+)/\d+\s+scope\s+link'
|
||||
links = [re.search(condition, x) for x in if_str[0].split('\n')]
|
||||
|
|
Loading…
Reference in New Issue