)]}'
{"neutron/objects/ports.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3ac27d63dba9a26f16e8892a56eef1e51f940560","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    filter_by(port_id\u003dport_id)."},{"line_number":84,"context_line":"                    with_lockmode(\u0027update\u0027)."},{"line_number":85,"context_line":"                    one())"},{"line_number":86,"context_line":"            return binding"},{"line_number":87,"context_line":"        except exc.NoResultFound:"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_bc2586af","line":86,"updated":"2016-12-29 17:21:32.000000000","message":"why is this not returning an object?","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"cce37eb9305d61304a92feb5978e29e9dd18b3f6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    filter_by(port_id\u003dport_id)."},{"line_number":84,"context_line":"                    with_lockmode(\u0027update\u0027)."},{"line_number":85,"context_line":"                    one())"},{"line_number":86,"context_line":"            return binding"},{"line_number":87,"context_line":"        except exc.NoResultFound:"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_dc996a21","line":86,"in_reply_to":"ba5201f7_bc2586af","updated":"2016-12-29 18:25:29.000000000","message":"I can use load_object which is in objects/base.py but I think its not needed the only motive of this method is to access it via object instance.","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"3c5e2d0b0cbc7a8f0f9f70c54edaf1b61a334e8b","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    filter_by(port_id\u003dport_id)."},{"line_number":84,"context_line":"                    with_lockmode(\u0027update\u0027)."},{"line_number":85,"context_line":"                    one())"},{"line_number":86,"context_line":"            return binding"},{"line_number":87,"context_line":"        except exc.NoResultFound:"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_7d73fcb1","line":86,"in_reply_to":"ba5201f7_dc996a21","updated":"2017-01-02 12:11:30.000000000","message":"This method is covered in other patch:\nhttps://review.openstack.org/#/c/407868","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3ac27d63dba9a26f16e8892a56eef1e51f940560","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    one())"},{"line_number":86,"context_line":"            return binding"},{"line_number":87,"context_line":"        except exc.NoResultFound:"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"@obj_base.VersionedObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_fc1f0e59","line":88,"updated":"2016-12-29 17:21:32.000000000","message":"by default None is returned. No need to specifically return None","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"3c5e2d0b0cbc7a8f0f9f70c54edaf1b61a334e8b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    one())"},{"line_number":86,"context_line":"            return binding"},{"line_number":87,"context_line":"        except exc.NoResultFound:"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"@obj_base.VersionedObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_7d5cdc25","line":88,"in_reply_to":"ba5201f7_1ca4d255","updated":"2017-01-02 12:11:30.000000000","message":"I guess that garyk\u0027s comment was about typing only \u0027return\u0027\n\n        except exc.NoResultFound:\n            return","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"cce37eb9305d61304a92feb5978e29e9dd18b3f6","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                    one())"},{"line_number":86,"context_line":"            return binding"},{"line_number":87,"context_line":"        except exc.NoResultFound:"},{"line_number":88,"context_line":"            return None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"@obj_base.VersionedObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_1ca4d255","line":88,"in_reply_to":"ba5201f7_fc1f0e59","updated":"2016-12-29 18:25:29.000000000","message":"sqlalchemy\u0027s one will either return exactly one or raise an exception in all other cases, this will handle that exception raise, in case it happens","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3ac27d63dba9a26f16e8892a56eef1e51f940560","unresolved":false,"context_lines":[{"line_number":393,"context_line":"                    filter_by(id\u003dport_id)."},{"line_number":394,"context_line":"                    with_lockmode(\u0027update\u0027)."},{"line_number":395,"context_line":"                    one())"},{"line_number":396,"context_line":"            return port"},{"line_number":397,"context_line":"        except exc.NoResultFound:"},{"line_number":398,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_3c3a76ce","line":396,"updated":"2016-12-29 17:21:32.000000000","message":"ditto","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3ac27d63dba9a26f16e8892a56eef1e51f940560","unresolved":false,"context_lines":[{"line_number":395,"context_line":"                    one())"},{"line_number":396,"context_line":"            return port"},{"line_number":397,"context_line":"        except exc.NoResultFound:"},{"line_number":398,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_5c373ae3","line":398,"updated":"2016-12-29 17:21:32.000000000","message":"ditto","commit_id":"152066cd7de87c3224767a8abe84c805d32deec3"}],"neutron/plugins/ml2/db.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"00a8a17c217bbacb7d3ec7ec3027a3b6a72d6260","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        return record"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def get_locked_port_and_binding(context, port_id):"},{"line_number":52,"context_line":"    \"\"\"Get port and port binding records for update within transaction.\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    port \u003d port_obj.Port.get_locked_port(context, port_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da4df55a_100e7d34","line":51,"range":{"start_line":51,"start_character":4,"end_line":51,"end_character":50},"updated":"2016-12-22 00:28:13.000000000","message":"I did not remove get_locked_port_binding, it looked simple doing this way, but it can be modified as reviewers post suggestions, there are two ways it can be done either do both queries within one method either port object or portbinding object and call it directly on all places in neutron code where get_locked_port_and_binding is used or have them in respective objects and call them directly.","commit_id":"4ae7d30e0ef245fb568bc58e2f911ed55aaf95ce"}]}
