]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
prevent OVS + LB plugins from clearing device_id and device_owner
authorDan Wendlandt <dan@nicira.com>
Sat, 25 Aug 2012 21:59:33 +0000 (14:59 -0700)
committerDan Wendlandt <dan@nicira.com>
Sat, 25 Aug 2012 21:59:48 +0000 (14:59 -0700)
bug 1041669

the fact that these plugins ever cleared this field is probably just a
misunderstanding of how the field is supposed to be used, as I don't think
it ever makes sense for the L2 plugin logic to change this field.

Change-Id: Ie9579e2f88d322cfdce51a2ca126f4dfab680022

quantum/plugins/linuxbridge/db/l2network_db_v2.py
quantum/plugins/openvswitch/ovs_db_v2.py

index a0ede60dca3e6467774315806f50f099be363cd8..985332c62e2de58263283047b4acb1b23e4f7237 100644 (file)
@@ -188,9 +188,6 @@ def set_port_status(port_id, status):
     try:
         port = session.query(models_v2.Port).filter_by(id=port_id).one()
         port['status'] = status
-        if status == constants.PORT_STATUS_DOWN:
-            port['device_id'] = ''
-            port['device_owner'] = ''
         session.merge(port)
         session.flush()
     except exc.NoResultFound:
index 4d939e4edeebecbe13b8a78aca0ae4d720189817..324ea896af33a253ab05a3371e272e3a2753b30f 100644 (file)
@@ -186,9 +186,6 @@ def set_port_status(port_id, status):
     try:
         port = session.query(models_v2.Port).filter_by(id=port_id).one()
         port['status'] = status
-        if status == constants.PORT_STATUS_DOWN:
-            port['device_id'] = ''
-            port['device_owner'] = ''
         session.merge(port)
         session.flush()
     except exc.NoResultFound: