ovs: do not delete port if already exists
Change-Id: I0ab28bc38be1f72635afa97c2c4651cd1c2ab336 Closes-Bug: #1670628
This commit is contained in:
parent
6adbaa4b42
commit
dadc65c0fa
@ -65,8 +65,7 @@ def _ovs_vsctl(args, timeout=None):
|
||||
def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,
|
||||
instance_id, interface_type=None,
|
||||
vhost_server_path=None):
|
||||
cmd = ['--', '--if-exists', 'del-port', dev, '--',
|
||||
'add-port', bridge, dev,
|
||||
cmd = ['--', '--may-exist', 'add-port', bridge, dev,
|
||||
'--', 'set', 'Interface', dev,
|
||||
'external-ids:iface-id=%s' % iface_id,
|
||||
'external-ids:iface-status=active',
|
||||
|
@ -132,8 +132,7 @@ class LinuxNetTest(testtools.TestCase):
|
||||
mock.call('brctl', 'addif', 'br0', 'vnet1')])
|
||||
|
||||
def test_ovs_vif_port_cmd(self):
|
||||
expected = ['--', '--if-exists',
|
||||
'del-port', 'fake-dev', '--', 'add-port',
|
||||
expected = ['--', '--may-exist', 'add-port',
|
||||
'fake-bridge', 'fake-dev',
|
||||
'--', 'set', 'Interface', 'fake-dev',
|
||||
'external-ids:iface-id=fake-iface-id',
|
||||
|
Loading…
Reference in New Issue
Block a user