return True
- def update_port_postcommit(self, context):
+ def update_port_precommit(self, context):
port = context.current
orig = context.original
context.status == const.PORT_STATUS_ACTIVE):
LOG.warning(_LW("unable to modify mac_address of ACTIVE port "
"%s"), port['id'])
- raise ml2_exc.MechanismDriverError(method='update_port_postcommit')
+ raise ml2_exc.MechanismDriverError(method='update_port_precommit')
+
+ def update_port_postcommit(self, context):
+ port = context.current
+ orig = context.original
+
diff_ips = self._get_diff_ips(orig, port)
if diff_ips:
self._fixed_ips_changed(context, orig, port, diff_ips)
[constants.FLOODING_ENTRY]}}
self.assertEqual(expected_result, result)
- def test_update_port_postcommit_mac_address_changed_raises(self):
+ def test_update_port_precommit_mac_address_changed_raises(self):
port = {'status': u'ACTIVE',
'device_owner': u'compute:None',
'mac_address': u'12:34:56:78:4b:0e',
mech_driver = l2pop_mech_driver.L2populationMechanismDriver()
with testtools.ExpectedException(ml2_exc.MechanismDriverError):
- mech_driver.update_port_postcommit(ctx)
+ mech_driver.update_port_precommit(ctx)