From 89942ed31568199f08ffa60982001f814eaa5b5e Mon Sep 17 00:00:00 2001 From: Dan Wendlandt Date: Sat, 25 Aug 2012 14:59:33 -0700 Subject: [PATCH] prevent OVS + LB plugins from clearing device_id and device_owner 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 | 3 --- quantum/plugins/openvswitch/ovs_db_v2.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/quantum/plugins/linuxbridge/db/l2network_db_v2.py b/quantum/plugins/linuxbridge/db/l2network_db_v2.py index a0ede60dc..985332c62 100644 --- a/quantum/plugins/linuxbridge/db/l2network_db_v2.py +++ b/quantum/plugins/linuxbridge/db/l2network_db_v2.py @@ -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: diff --git a/quantum/plugins/openvswitch/ovs_db_v2.py b/quantum/plugins/openvswitch/ovs_db_v2.py index 4d939e4ed..324ea896a 100644 --- a/quantum/plugins/openvswitch/ovs_db_v2.py +++ b/quantum/plugins/openvswitch/ovs_db_v2.py @@ -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: -- 2.45.2