)]}'
{"neutron/db/migration/alembic_migrations/versions/newton/contract/accdb995b261_add_binding_result_table_and_remove_vif_.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fec9ba51e912b351c162a1a1f9704decf4e090b0","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    op.drop_column(\u0027ml2_port_bindings\u0027, \u0027vif_details\u0027)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def _copy_data_to_binding_result():"},{"line_number":44,"context_line":"    binding_table \u003d sa.Table(ML2_PORT_BINDING_TABLE,"},{"line_number":45,"context_line":"                             sa.MetaData(),"},{"line_number":46,"context_line":"                             sa.Column(\u0027port_id\u0027, sa.String(255)),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1aa78d24_88a8cf78","line":43,"updated":"2016-07-06 13:34:28.000000000","message":"I think this should go in the expand migration. Expand is run before contract, and the intention (one day) is to run contract only during a planned maintenance time which may be long after expand upgrade.\n\nBy doing the copy in expand you no longer depend on the contract migration. The vif columns will be present in ml2_port_bindings until contract is run, but they are unused so that is not a problem.","commit_id":"708e7e8ff0a9b5423912889f44070afa95407cff"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"9faab6be182890dcde83bac6a73fad07bbc169c1","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    op.drop_column(\u0027ml2_port_bindings\u0027, \u0027vif_details\u0027)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def _copy_data_to_binding_result():"},{"line_number":44,"context_line":"    binding_table \u003d sa.Table(ML2_PORT_BINDING_TABLE,"},{"line_number":45,"context_line":"                             sa.MetaData(),"},{"line_number":46,"context_line":"                             sa.Column(\u0027port_id\u0027, sa.String(255)),"}],"source_content_type":"text/x-python","patch_set":19,"id":"1aa78d24_f402dcb2","line":43,"in_reply_to":"1aa78d24_88a8cf78","updated":"2016-07-07 09:06:57.000000000","message":"thanks. I will consider this when continuing the work!","commit_id":"708e7e8ff0a9b5423912889f44070afa95407cff"}],"neutron/db/migration/alembic_migrations/versions/newton/expand/ce6032e0f033_add_binding_result_table_and_remove_vif_.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"909f1e80fb65332e7fc253c3c8d3bf9b82e19069","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def upgrade():"},{"line_number":34,"context_line":"    ### commands auto generated by Alembic - please adjust! ###"},{"line_number":35,"context_line":"    op.create_table(\u0027ml2_port_binding_results\u0027,"},{"line_number":36,"context_line":"    sa.Column(\u0027port_id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_b1f11d04","line":33,"updated":"2016-06-16 08:14:47.000000000","message":"need to move data from port_binding table to this table","commit_id":"a881d0edf3475889932d2a8bee36fe32a6f94ca2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"c23a45e6a3284069fa7ba58a6d1af7472d6ff558","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    sa.Column(\u0027vif_details\u0027, sa.String(length\u003d4095), server_default\u003d\u0027\u0027, nullable\u003dFalse),"},{"line_number":40,"context_line":"    sa.ForeignKeyConstraint([\u0027port_id\u0027], [\u0027ports.id\u0027], ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":41,"context_line":"    sa.PrimaryKeyConstraint(\u0027port_id\u0027, \u0027host\u0027),"},{"line_number":42,"context_line":"    mysql_engine\u003d\u0027InnoDB\u0027"},{"line_number":43,"context_line":"    )"},{"line_number":44,"context_line":"    ### end Alembic commands ###"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a9d85d2_dd6f77c3","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":25},"updated":"2016-06-21 14:53:15.000000000","message":"remove this line, it is not needed","commit_id":"14e9821aa05a05f557ab022f7d8062a87f6f49b8"}],"neutron/plugins/ml2/driver_context.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron_lib import constants"},{"line_number":18,"context_line":"from oslo_log import log"},{"line_number":19,"context_line":"from oslo_serialization import jsonutils"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_b3b22c92","line":16,"updated":"2016-06-14 13:54:28.000000000","message":"unrelated","commit_id":"a881d0edf3475889932d2a8bee36fe32a6f94ca2"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"84a7cba1d4579c77ffd97beecbfaaab321c386ae","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    def vif_type(self):"},{"line_number":242,"context_line":"        if self._binding_result:"},{"line_number":243,"context_line":"            return self._binding_result.vif_type"},{"line_number":244,"context_line":"        # to ensure transparency of dvr presence to tenants"},{"line_number":245,"context_line":"        #elif (self._port[\u0027device_owner\u0027] \u003d\u003d"},{"line_number":246,"context_line":"        #      constants.DEVICE_OWNER_DVR_INTERFACE):"},{"line_number":247,"context_line":"        #    return self._binding.vif_type"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_7431310b","line":244,"updated":"2016-06-29 06:58:43.000000000","message":"absence of those lines leads to a unit test failure. however I wanna test, if this is just a UT thing, or if also production code requires those lines.","commit_id":"08bb5237255213839167b9f445e0bdef647b529a"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"f894079f9a8f19c1217c9461b31e06018c7ce41d","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            if self._original_binding_result:"},{"line_number":256,"context_line":"                return self._original_binding_result.vif_type"},{"line_number":257,"context_line":"            # REVISIT(andreas_s): to ensure transparency of dvr presence in"},{"line_number":258,"context_line":"            # unit tests. DVR production code seems not to use context.vif_type"},{"line_number":259,"context_line":"            elif (self._original_port[\u0027device_owner\u0027] \u003d\u003d"},{"line_number":260,"context_line":"                  constants.DEVICE_OWNER_DVR_INTERFACE):"},{"line_number":261,"context_line":"                return self._original_vif_type"}],"source_content_type":"text/x-python","patch_set":18,"id":"3aaa91ec_1584afd0","line":258,"range":{"start_line":258,"start_character":71,"end_line":258,"end_character":79},"updated":"2016-07-01 06:45:27.000000000","message":"nit: original_vif_type","commit_id":"0ee5d0ba95d4d4af45243d892a222ccd8ead99af"}],"neutron/plugins/ml2/models.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    # Add a relationship to the Port model in order to instruct SQLAlchemy to"},{"line_number":49,"context_line":"    # eagerly load port bindings"},{"line_number":50,"context_line":"    port \u003d orm.relationship("},{"line_number":51,"context_line":"        models_v2.Port,"},{"line_number":52,"context_line":"        backref\u003dorm.backref(\"port_binding\","},{"line_number":53,"context_line":"                            lazy\u003d\u0027joined\u0027, uselist\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_9eac57ee","line":50,"updated":"2016-06-14 13:54:28.000000000","message":"add that for binding_result as well! I remember at least one place where this was useful!","commit_id":"a881d0edf3475889932d2a8bee36fe32a6f94ca2"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9ea4be4d66e657e78676f97ca711cec1226f4a72","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    # eagerly load port binding results"},{"line_number":78,"context_line":"    # REVISIT(andreas_s): Until now there\u0027s only one binding_result per"},{"line_number":79,"context_line":"    # port. This will change when distributed ports get ported to use"},{"line_number":80,"context_line":"    # that table as well. Then this should be renamed to binding_results."},{"line_number":81,"context_line":"    port \u003d orm.relationship("},{"line_number":82,"context_line":"        models_v2.Port,"},{"line_number":83,"context_line":"        backref\u003dorm.backref(\"binding_result\","}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_ea26f566","line":80,"range":{"start_line":80,"start_character":25,"end_line":80,"end_character":72},"updated":"2016-07-05 11:56:30.000000000","message":"is it worth waiting then instead of doing it straight away?","commit_id":"0ee5d0ba95d4d4af45243d892a222ccd8ead99af"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            LOG.debug(\"Port %s was deleted so its status cannot be updated.\","},{"line_number":208,"context_line":"                      port_id)"},{"line_number":209,"context_line":"            return"},{"line_number":210,"context_line":"        binding_result \u003d db.get_binding_result(context.session, port_id,"},{"line_number":211,"context_line":"                                               port.port_binding.host)"},{"line_number":212,"context_line":"        if binding_result.vif_type in (portbindings.VIF_TYPE_BINDING_FAILED,"},{"line_number":213,"context_line":"                                       portbindings.VIF_TYPE_UNBOUND):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_7e240b5f","line":210,"updated":"2016-06-14 13:54:28.000000000","message":"if we use the eager load thing, we could get rid of that explicit call","commit_id":"a881d0edf3475889932d2a8bee36fe32a6f94ca2"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        binding \u003d port_db.port_binding"},{"line_number":581,"context_line":"        if binding:"},{"line_number":582,"context_line":"            session \u003d db_api.get_session()"},{"line_number":583,"context_line":"            with session.begin(subtransactions\u003dTrue):"},{"line_number":584,"context_line":"                binding_result \u003d (binding.host and"},{"line_number":585,"context_line":"                                  db.get_binding_result(session,"},{"line_number":586,"context_line":"                                                        binding.port_id,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_1e9a2714","line":583,"updated":"2016-06-14 13:54:28.000000000","message":"DVR case?","commit_id":"a881d0edf3475889932d2a8bee36fe32a6f94ca2"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"                                                      dhcp_opts)"},{"line_number":1171,"context_line":"            self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1172,"context_line":"            self._setup_dhcp_agent_provisioning_component(context, result)"},{"line_number":1173,"context_line":""},{"line_number":1174,"context_line":""},{"line_number":1175,"context_line":"        self._apply_dict_extend_functions(\u0027ports\u0027, result, port_db)"},{"line_number":1176,"context_line":"        return result, mech_context"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_9e23b704","line":1173,"updated":"2016-06-14 13:54:28.000000000","message":"unrelated","commit_id":"a881d0edf3475889932d2a8bee36fe32a6f94ca2"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":1397,"context_line":"        # at certain times, we just pass the port-context and return it, so"},{"line_number":1398,"context_line":"        # that we don\u0027t disturb other methods that are expecting a return"},{"line_number":1399,"context_line":"        # value."},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"        bound_context \u003d self._bind_port_if_needed("},{"line_number":1402,"context_line":"            mech_context,"},{"line_number":1403,"context_line":"            allow_notify\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_be7953ca","line":1400,"updated":"2016-06-14 13:54:28.000000000","message":"unrelated","commit_id":"a881d0edf3475889932d2a8bee36fe32a6f94ca2"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9ea4be4d66e657e78676f97ca711cec1226f4a72","unresolved":false,"context_lines":[{"line_number":281,"context_line":"    def _binding_result_to_ovo(context, binding_result):"},{"line_number":282,"context_line":"        if not binding_result:"},{"line_number":283,"context_line":"            return None"},{"line_number":284,"context_line":"        return portbinding_obj.ML2PortBindingResult.get_object("},{"line_number":285,"context_line":"            context, port_id\u003dbinding_result.port_id, host\u003dbinding_result.host)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _process_port_binding(self, mech_context, attrs):"}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_caeb3977","line":284,"updated":"2016-07-05 11:56:30.000000000","message":"it should work even if you don\u0027t get the object from the DB using get_object but just use the constructor as in line 412. In this way we avoid one db call.","commit_id":"0ee5d0ba95d4d4af45243d892a222ccd8ead99af"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9ea4be4d66e657e78676f97ca711cec1226f4a72","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            # _process_port_binding. Seems like the session is open pretty"},{"line_number":464,"context_line":"            # long. Manual refresh helps."},{"line_number":465,"context_line":"            session.refresh(port_db)"},{"line_number":466,"context_line":"            # REVISIT(andreas_s): Eager loads return a db schema object, but"},{"line_number":467,"context_line":"            # deleting the cur_binding_result further below requires an OVO."},{"line_number":468,"context_line":"            cur_binding_result \u003d self._binding_result_to_ovo("},{"line_number":469,"context_line":"                plugin_context, port_db.binding_result)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_5421ab4c","line":466,"updated":"2016-07-05 11:56:30.000000000","message":"you can add that when the port will be an ovo too, this won\u0027t be needed anymore since the binding_result will be loaded automatically inside the port ovo as you wrote in line 1308","commit_id":"0ee5d0ba95d4d4af45243d892a222ccd8ead99af"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9ea4be4d66e657e78676f97ca711cec1226f4a72","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                # results."},{"line_number":514,"context_line":"                if port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DVR_INTERFACE:"},{"line_number":515,"context_line":"                    cur_binding.vif_type \u003d bind_context.vif_type"},{"line_number":516,"context_line":"                    cur_binding.vif_details \u003d \\"},{"line_number":517,"context_line":"                        jsonutils.dumps(bind_context.vif_details)"},{"line_number":518,"context_line":"                    new_binding_result \u003d None"},{"line_number":519,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_b4d60f25","line":516,"range":{"start_line":516,"start_character":45,"end_line":516,"end_character":47},"updated":"2016-07-05 11:56:30.000000000","message":"meh, prefer parenthesis for multi lines as per hacking guidelines","commit_id":"0ee5d0ba95d4d4af45243d892a222ccd8ead99af"}],"neutron/tests/unit/objects/port/extensions/test_portbinding.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"9ea4be4d66e657e78676f97ca711cec1226f4a72","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        super(ML2PortBindingResultDbObjTestCase, self).setUp()"},{"line_number":33,"context_line":"        self._create_test_network()"},{"line_number":34,"context_line":"        self._create_test_port(self._network)"},{"line_number":35,"context_line":"        for obj in self.db_objs:"},{"line_number":36,"context_line":"            obj[\u0027port_id\u0027] \u003d self._port[\u0027id\u0027]"},{"line_number":37,"context_line":"        for obj in self.obj_fields:"},{"line_number":38,"context_line":"            obj[\u0027port_id\u0027] \u003d self._port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_08e8a4b3","line":35,"updated":"2016-07-05 11:56:30.000000000","message":"you could use itertools.chain instead of 2 for cycles","commit_id":"0ee5d0ba95d4d4af45243d892a222ccd8ead99af"}],"neutron/tests/unit/plugins/ml2/drivers/mechanism_test.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        self._check_port_info(context.current, context.host,"},{"line_number":92,"context_line":"                              context.vif_type, context.vif_details)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        if context.vif_type in (portbindings.VIF_TYPE_UNBOUND,"},{"line_number":95,"context_line":"                                portbindings.VIF_TYPE_BINDING_FAILED):"},{"line_number":96,"context_line":"            if (context.segments_to_bind and"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_f96ad57f","side":"PARENT","line":93,"updated":"2016-06-14 13:54:28.000000000","message":"unrelated","commit_id":"36e314599489d2d92578b8aad3f7d0ccfb072672"}],"neutron/tests/unit/plugins/ml2/test_port_binding.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"fd7196c6f748f95ddf2ee42dd9d5397279bc050d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            self.plugin.update_dvr_port_binding(ctx, port_id, {\u0027port\u0027: {"},{"line_number":227,"context_line":"                portbindings.HOST_ID: \u0027host-ovs-no_filter\u0027,"},{"line_number":228,"context_line":"                \u0027device_id\u0027: \u0027router1\u0027}})"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            # Get port and verify VIF type and status unchanged."},{"line_number":231,"context_line":"            port \u003d self._show(\u0027ports\u0027, port_id)"},{"line_number":232,"context_line":"            self.assertEqual(portbindings.VIF_TYPE_DISTRIBUTED,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7aa08908_79a9c58f","side":"PARENT","line":229,"updated":"2016-06-14 13:54:28.000000000","message":"unrelated","commit_id":"36e314599489d2d92578b8aad3f7d0ccfb072672"}]}
