)]}'
{"neutron/db/api.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"beb4148291c0be59453a7ec5fd7ed8b2ae5fa0d2","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    return db_obj.__dict__"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def _safe_get_object(context, model, id, key\u003d\u0027id\u0027, **kwargs):"},{"line_number":116,"context_line":"    kwargs[key] \u003d id"},{"line_number":117,"context_line":"    db_obj \u003d get_object(context, model, **kwargs)"},{"line_number":118,"context_line":"    if db_obj is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_7704af14","line":115,"updated":"2016-02-03 18:23:39.000000000","message":"I think we don\u0027t need id and key as args anymore and maybe it\u0027s worth adding a check that raises an exception if not some primary key is not provided.","commit_id":"52bd4e4051a1f64f26dbb119778a176649cbfdf4"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1d6b242e930062c6e689700aaa47c47c6d732b7c","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    db_obj \u003d get_object(context, model, **kwargs)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    if db_obj is None:"},{"line_number":119,"context_line":"        raise n_exc.ObjectNotFound(id\u003dkwargs)"},{"line_number":120,"context_line":"    return db_obj"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_1eae06e6","line":119,"updated":"2016-02-08 12:56:47.000000000","message":"meh, id\u003dkwargs doesn\u0027t look right","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"fe8b0f09bf1f3f5d2228fdb76267ca6556843e66","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    db_obj \u003d get_object(context, model, **kwargs)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    if db_obj is None:"},{"line_number":119,"context_line":"        raise n_exc.ObjectNotFound(id\u003dkwargs)"},{"line_number":120,"context_line":"    return db_obj"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_816da49a","line":119,"in_reply_to":"5a5ae5dd_1eae06e6","updated":"2016-02-16 11:54:09.000000000","message":"Done","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"50f7c6a80402c7496f140ce8dced0d699984ea24","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    return db_obj"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"def update_object(context, model, id, values, **kwargs):"},{"line_number":124,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":125,"context_line":"        if id:"},{"line_number":126,"context_line":"            kwargs[\u0027id\u0027] \u003d id"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_9670dfdd","line":123,"range":{"start_line":123,"start_character":34,"end_line":123,"end_character":36},"updated":"2016-02-05 16:02:43.000000000","message":"Is \u0027id\u0027 still necessary?","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1d6b242e930062c6e689700aaa47c47c6d732b7c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    return db_obj"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"def update_object(context, model, id, values, **kwargs):"},{"line_number":124,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":125,"context_line":"        if id:"},{"line_number":126,"context_line":"            kwargs[\u0027id\u0027] \u003d id"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_61bc3abb","line":123,"range":{"start_line":123,"start_character":34,"end_line":123,"end_character":36},"in_reply_to":"5a5ae5dd_2a7620d7","updated":"2016-02-08 12:56:47.000000000","message":"I wonder which subproject...ovo in Neutron is a pretty new thing.","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"49c403c886c0df98a2a6bcead6206b7f2d300746","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    return db_obj"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"def update_object(context, model, id, values, **kwargs):"},{"line_number":124,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":125,"context_line":"        if id:"},{"line_number":126,"context_line":"            kwargs[\u0027id\u0027] \u003d id"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_2a7620d7","line":123,"range":{"start_line":123,"start_character":34,"end_line":123,"end_character":36},"in_reply_to":"5a5ae5dd_9670dfdd","updated":"2016-02-08 11:16:48.000000000","message":"I did not want to change the update_object signature, since I\u0027ve seen in other patch comments from Ihar, that this function can be used in subprojects and changing the signature can break them. If it not the case, I\u0027m for removing the ID param to simplify the function.","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"50f7c6a80402c7496f140ce8dced0d699984ea24","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    return db_obj.__dict__"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"def delete_object(context, model, id, **kwargs):"},{"line_number":134,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"        if id:"},{"line_number":136,"context_line":"            kwargs[\u0027id\u0027] \u003d id"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_b64cfb9e","line":133,"range":{"start_line":133,"start_character":34,"end_line":133,"end_character":36},"updated":"2016-02-05 16:02:43.000000000","message":"ditto line 123","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"f67c68499e08bc7dcdf835faa191dcf2230e89d4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3a57f1b5_6b0bd57d","updated":"2016-02-12 19:34:47.000000000","message":"It looks like the methods here are new for the OVO work and are undergoing some churn?\n\nMay I suggest that you put the new methods in a separate module and make the module or the methods \"private\" (begin with a leading underscore). This will prevent external projects from using them, and you can un-private them when they are ready and stable.\n\nI want to move the contents of this module, without the new OVO stuff, to neutron-lib.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"dae33548_63953ae3","in_reply_to":"3a57f1b5_6b0bd57d","updated":"2016-02-15 12:16:21.000000000","message":"That\u0027s fair suggestion. Let\u0027s move them under neutron/objects/ ? Probably in a follow up.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e08091183781e633a3354800a3749e791b89fd8b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"dae33548_4169dcbd","in_reply_to":"dae33548_63953ae3","updated":"2016-02-16 11:57:05.000000000","message":"The OVO work moved to neutron/objects/db/api.py","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    return db_obj.__dict__"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def _safe_get_object_id(context, model, id):"},{"line_number":116,"context_line":"    db_obj \u003d get_object(context, model, id\u003did)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    if db_obj is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a57f1b5_a73cabc8","line":115,"updated":"2016-02-15 12:16:21.000000000","message":"Why do we need a separate helper for id based fetch? I think _safe_get_object is enough for the job.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    db_obj \u003d get_object(context, model, id\u003did)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    if db_obj is None:"},{"line_number":119,"context_line":"        raise n_exc.ObjectNotFound(id\u003did)"},{"line_number":120,"context_line":"    return db_obj"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a57f1b5_94019b08","line":119,"updated":"2016-02-15 12:16:21.000000000","message":"Since now we moved exceptions into neutron-lib, please import the NotFound type from there.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e08091183781e633a3354800a3749e791b89fd8b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    db_obj \u003d get_object(context, model, id\u003did)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    if db_obj is None:"},{"line_number":119,"context_line":"        raise n_exc.ObjectNotFound(id\u003did)"},{"line_number":120,"context_line":"    return db_obj"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_01b514ed","line":119,"in_reply_to":"3a57f1b5_94019b08","updated":"2016-02-16 11:57:05.000000000","message":"I will look into it in next PS (6...)","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    db_obj \u003d get_object(context, model, **kwargs)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    if db_obj is None:"},{"line_number":127,"context_line":"        key \u003d \"\".join([\u0027%s:: %s\u0027 % (key, value) for (key, value)"},{"line_number":128,"context_line":"                       in kwargs.items()])"},{"line_number":129,"context_line":"        raise n_exc.ObjectNotFound(id\u003dkey)"},{"line_number":130,"context_line":"    return db_obj"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a57f1b5_31eb1915","line":127,"range":{"start_line":127,"start_character":24,"end_line":127,"end_character":31},"updated":"2016-02-15 12:16:21.000000000","message":"Doesn\u0027t it end up as: key1:: val1key2:: val2 ...? Doesn\u0027t seem right to me.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e08091183781e633a3354800a3749e791b89fd8b","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    db_obj \u003d get_object(context, model, **kwargs)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    if db_obj is None:"},{"line_number":127,"context_line":"        key \u003d \"\".join([\u0027%s:: %s\u0027 % (key, value) for (key, value)"},{"line_number":128,"context_line":"                       in kwargs.items()])"},{"line_number":129,"context_line":"        raise n_exc.ObjectNotFound(id\u003dkey)"},{"line_number":130,"context_line":"    return db_obj"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_01a6b40f","line":127,"range":{"start_line":127,"start_character":24,"end_line":127,"end_character":31},"in_reply_to":"3a57f1b5_31eb1915","updated":"2016-02-16 11:57:05.000000000","message":"Done","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a9c721e80953cdeb550845a94f795537fecc65b5","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import contextlib"},{"line_number":17,"context_line":"import debtcollector"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":"from oslo_db import api as oslo_db_api"}],"source_content_type":"text/x-python","patch_set":8,"id":"bae84128_4ddc9a18","line":17,"updated":"2016-02-25 11:19:09.000000000","message":"nit: that\u0027s 3rd party lib, should go into the next section","commit_id":"038bf88983850a83435d2d275a3d038c4ac699a1"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"5dbf556d1b695340226ede1b6141d39dfa1023e7","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import contextlib"},{"line_number":17,"context_line":"import debtcollector"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":"from oslo_db import api as oslo_db_api"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_00682db8","line":17,"in_reply_to":"bae84128_4ddc9a18","updated":"2016-02-29 13:26:28.000000000","message":"Done","commit_id":"038bf88983850a83435d2d275a3d038c4ac699a1"}],"neutron/objects/base.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"beb4148291c0be59453a7ec5fd7ed8b2ae5fa0d2","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self.obj_reset_changes()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    @classmethod"},{"line_number":115,"context_line":"    def get_by_id(cls, context, id, **kwargs):"},{"line_number":116,"context_line":"        keys \u003d {cls.primary_keys[0]: id}"},{"line_number":117,"context_line":"        for key in cls.primary_keys[1:]:"},{"line_number":118,"context_line":"            keys[key] \u003d kwargs.get(key, None)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_7a825302","line":115,"updated":"2016-02-03 18:23:39.000000000","message":"it\u0027s a bit weird to have a method called get_by_id and have kwargs..well anyway I don\u0027t have any better suggestion right now...","commit_id":"52bd4e4051a1f64f26dbb119778a176649cbfdf4"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"beb4148291c0be59453a7ec5fd7ed8b2ae5fa0d2","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        updates \u003d self._validate_changed_fields(updates)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if updates:"},{"line_number":168,"context_line":"            keys \u003d {}"},{"line_number":169,"context_line":"            for key in self.primary_keys[1:]:"},{"line_number":170,"context_line":"                keys[key] \u003d getattr(self, key)"},{"line_number":171,"context_line":"            db_obj \u003d db_api.update_object(self._context, self.db_model,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_17b69b8a","line":168,"updated":"2016-02-03 18:23:39.000000000","message":"lines 168-170 are repeated in delete, it seems we should create an internal method, _get_primary_keys or get_composite_keys something like that.","commit_id":"52bd4e4051a1f64f26dbb119778a176649cbfdf4"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dcb653b9ad8f06607e688bdfa92a17af268cabf7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        raise NotImplementedError()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    @classmethod"},{"line_number":74,"context_line":"    def get_by_composite_id(cls, context, **kwargs):"},{"line_number":75,"context_line":"        raise NotImplementedError()"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_0e55e61b","line":74,"updated":"2016-02-05 08:55:05.000000000","message":"I am not very happy about having two public methods for the same thing. I see you had a single one in the first version of the patch. Can we converge those methods, even if we now may need to change the signature of the get_by_id method slightly? We may rename it into something more generic, like get_object() if the name is of concern.\n\nWe are in early days of versionedobjects in neutron, and so we can change directions a bit.","commit_id":"77693016e4818c57958297a5ea6c22f2b3a3e4bb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dcb653b9ad8f06607e688bdfa92a17af268cabf7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    def get_by_composite_id(cls, context, **kwargs):"},{"line_number":125,"context_line":"        missing_keys \u003d set(cls.primary_keys).difference(kwargs.keys())"},{"line_number":126,"context_line":"        if missing_keys:"},{"line_number":127,"context_line":"            msg \u003d \"Missing primary keys: {0}\".format(missing_keys)"},{"line_number":128,"context_line":"            raise exceptions.BadRequest(resource\u003dcls.db_model, msg\u003dmsg)"},{"line_number":129,"context_line":"        keys \u003d {}"},{"line_number":130,"context_line":"        for key in cls.primary_keys:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_c9782892","line":127,"updated":"2016-02-05 08:55:05.000000000","message":"Should we translate the message?","commit_id":"77693016e4818c57958297a5ea6c22f2b3a3e4bb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dcb653b9ad8f06607e688bdfa92a17af268cabf7","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        missing_keys \u003d set(cls.primary_keys).difference(kwargs.keys())"},{"line_number":126,"context_line":"        if missing_keys:"},{"line_number":127,"context_line":"            msg \u003d \"Missing primary keys: {0}\".format(missing_keys)"},{"line_number":128,"context_line":"            raise exceptions.BadRequest(resource\u003dcls.db_model, msg\u003dmsg)"},{"line_number":129,"context_line":"        keys \u003d {}"},{"line_number":130,"context_line":"        for key in cls.primary_keys:"},{"line_number":131,"context_line":"            keys[key] \u003d kwargs[key]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_697d746d","line":128,"updated":"2016-02-05 08:55:05.000000000","message":"Should we start some hierarchy for objects specific failures so that it\u0027s easier to capture them? BadRequest seems a bit generic.","commit_id":"77693016e4818c57958297a5ea6c22f2b3a3e4bb"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"50f7c6a80402c7496f140ce8dced0d699984ea24","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            values\u003ddb_exception.value)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class NeutronPrimaryKeyMissing(exceptions.NeutronException):"},{"line_number":42,"context_line":"    message \u003d _(\"For class %(object_type)s missing primary keys: \""},{"line_number":43,"context_line":"                \"%(missing_keys)s\")"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_f1011db0","line":41,"range":{"start_line":41,"start_character":58,"end_line":41,"end_character":60},"updated":"2016-02-05 16:02:43.000000000","message":"I am open whether a new Exception class is needed?","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"fe8b0f09bf1f3f5d2228fdb76267ca6556843e66","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            values\u003ddb_exception.value)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class NeutronPrimaryKeyMissing(exceptions.NeutronException):"},{"line_number":42,"context_line":"    message \u003d _(\"For class %(object_type)s missing primary keys: \""},{"line_number":43,"context_line":"                \"%(missing_keys)s\")"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_e15bd0f4","line":41,"range":{"start_line":41,"start_character":58,"end_line":41,"end_character":60},"in_reply_to":"5a5ae5dd_9598b5c1","updated":"2016-02-16 11:54:09.000000000","message":"Done in PS5","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a5846520cd9b6bac122c1c0bdc6d9b284ebd085b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            values\u003ddb_exception.value)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class NeutronPrimaryKeyMissing(exceptions.NeutronException):"},{"line_number":42,"context_line":"    message \u003d _(\"For class %(object_type)s missing primary keys: \""},{"line_number":43,"context_line":"                \"%(missing_keys)s\")"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_9598b5c1","line":41,"range":{"start_line":41,"start_character":58,"end_line":41,"end_character":60},"in_reply_to":"5a5ae5dd_f1011db0","updated":"2016-02-08 13:53:17.000000000","message":"Yeah, I would have a generic objects-exception, then inherit from it.","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"50f7c6a80402c7496f140ce8dced0d699984ea24","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.obj_reset_changes()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def get_by_id(cls, context, id\u003dNone, **kwargs):"},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        This method fetches the object from DB and convert them to OVO."},{"line_number":130,"context_line":"        There are 2 possible usage:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_190bbf8f","line":127,"range":{"start_line":127,"start_character":35,"end_line":127,"end_character":39},"updated":"2016-02-05 16:02:43.000000000","message":"Is \u0027id\u0027 still necessary?","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"49c403c886c0df98a2a6bcead6206b7f2d300746","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.obj_reset_changes()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def get_by_id(cls, context, id\u003dNone, **kwargs):"},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        This method fetches the object from DB and convert them to OVO."},{"line_number":130,"context_line":"        There are 2 possible usage:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_8dd3ae5f","line":127,"range":{"start_line":127,"start_character":35,"end_line":127,"end_character":39},"in_reply_to":"5a5ae5dd_190bbf8f","updated":"2016-02-08 11:16:48.000000000","message":"Like I have described it in comment below, user of get_by_id can implicitly pass the id value, and the OVO take care of the db query - what is the real primary key. If we remove the ID, caller of get_by_id function have to be aware of every OVO primary keys structures. \n\nThe workaround of it is to override the get_by_id function in every OVO classes inheriting from NeutronDbObject implementing the id explicitly.","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"fe8b0f09bf1f3f5d2228fdb76267ca6556843e66","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.obj_reset_changes()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def get_by_id(cls, context, id\u003dNone, **kwargs):"},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        This method fetches the object from DB and convert them to OVO."},{"line_number":130,"context_line":"        There are 2 possible usage:"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_41fa7cbe","line":127,"range":{"start_line":127,"start_character":35,"end_line":127,"end_character":39},"in_reply_to":"5a5ae5dd_41bd7ed6","updated":"2016-02-16 11:54:09.000000000","message":"renamed to get_object(**kwargs)","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1d6b242e930062c6e689700aaa47c47c6d732b7c","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.obj_reset_changes()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def get_by_id(cls, context, id\u003dNone, **kwargs):"},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        This method fetches the object from DB and convert them to OVO."},{"line_number":130,"context_line":"        There are 2 possible usage:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_41bd7ed6","line":127,"range":{"start_line":127,"start_character":35,"end_line":127,"end_character":39},"in_reply_to":"5a5ae5dd_8dd3ae5f","updated":"2016-02-08 12:56:47.000000000","message":"Ihar suggested renaming this method, I agree with him","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1d6b242e930062c6e689700aaa47c47c6d732b7c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if missing_keys:"},{"line_number":146,"context_line":"            raise NeutronPrimaryKeyMissing(object_class\u003dcls.__class__,"},{"line_number":147,"context_line":"                                           missing_keys\u003dmissing_keys)"},{"line_number":148,"context_line":"        keys \u003d {}"},{"line_number":149,"context_line":"        for key in cls.primary_keys:"},{"line_number":150,"context_line":"            keys[key] \u003d kwargs[key]"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_7e085ada","line":148,"updated":"2016-02-08 12:56:47.000000000","message":"why do you need to create a new dictionary? Can\u0027t you use kwargs straight away?","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"fe8b0f09bf1f3f5d2228fdb76267ca6556843e66","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if missing_keys:"},{"line_number":146,"context_line":"            raise NeutronPrimaryKeyMissing(object_class\u003dcls.__class__,"},{"line_number":147,"context_line":"                                           missing_keys\u003dmissing_keys)"},{"line_number":148,"context_line":"        keys \u003d {}"},{"line_number":149,"context_line":"        for key in cls.primary_keys:"},{"line_number":150,"context_line":"            keys[key] \u003d kwargs[key]"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_21f5b8ca","line":148,"in_reply_to":"5a5ae5dd_7e085ada","updated":"2016-02-16 11:54:09.000000000","message":"Done","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"50f7c6a80402c7496f140ce8dced0d699984ea24","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        updates \u003d self._validate_changed_fields(updates)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        if updates:"},{"line_number":210,"context_line":"            id \u003d getattr(self, \u0027id\u0027) if \u0027id\u0027 in self.primary_keys else None"},{"line_number":211,"context_line":"            db_obj \u003d db_api.update_object(self._context, self.db_model,"},{"line_number":212,"context_line":"                                          id, updates,"},{"line_number":213,"context_line":"                                          **self._get_composite_keys())"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_d937674b","line":210,"range":{"start_line":210,"start_character":71,"end_line":210,"end_character":75},"updated":"2016-02-05 16:02:43.000000000","message":"Can the \u0027id\u0027 be removed?","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"49c403c886c0df98a2a6bcead6206b7f2d300746","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        updates \u003d self._validate_changed_fields(updates)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        if updates:"},{"line_number":210,"context_line":"            id \u003d getattr(self, \u0027id\u0027) if \u0027id\u0027 in self.primary_keys else None"},{"line_number":211,"context_line":"            db_obj \u003d db_api.update_object(self._context, self.db_model,"},{"line_number":212,"context_line":"                                          id, updates,"},{"line_number":213,"context_line":"                                          **self._get_composite_keys())"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_6d43d213","line":210,"range":{"start_line":210,"start_character":71,"end_line":210,"end_character":75},"in_reply_to":"5a5ae5dd_d937674b","updated":"2016-02-08 11:16:48.000000000","message":"\u0027id\u0027 can be removed if we decide to change the db_api functions signatures","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"50f7c6a80402c7496f140ce8dced0d699984ea24","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            self.from_db_object(self, db_obj)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def delete(self):"},{"line_number":217,"context_line":"        id \u003d getattr(self, \u0027id\u0027) if \u0027id\u0027 in self.primary_keys else None"},{"line_number":218,"context_line":"        db_api.delete_object(self._context, self.db_model, id,"},{"line_number":219,"context_line":"                             **self._get_composite_keys())"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_d9a1a747","line":217,"range":{"start_line":217,"start_character":67,"end_line":217,"end_character":71},"updated":"2016-02-05 16:02:43.000000000","message":"Ditto line 210.","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def get_object(cls, context, **kwargs):"},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        This method fetches the object from DB and convert them to OVO."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        :param context:"},{"line_number":132,"context_line":"        :param kwargs: multiple primary key defined key\u003dvalue pairs"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_03d9ce21","line":129,"updated":"2016-02-15 12:16:21.000000000","message":"prefer: to \u0027versioned object\u0027.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e08091183781e633a3354800a3749e791b89fd8b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    @classmethod"},{"line_number":127,"context_line":"    def get_object(cls, context, **kwargs):"},{"line_number":128,"context_line":"        \"\"\""},{"line_number":129,"context_line":"        This method fetches the object from DB and convert them to OVO."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        :param context:"},{"line_number":132,"context_line":"        :param kwargs: multiple primary key defined key\u003dvalue pairs"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_01835405","line":129,"in_reply_to":"dae33548_03d9ce21","updated":"2016-02-16 11:57:05.000000000","message":"Will correct in PS6.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        :param context:"},{"line_number":132,"context_line":"        :param kwargs: multiple primary key defined key\u003dvalue pairs"},{"line_number":133,"context_line":"        :return: single object of OVO class"},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"        missing_keys \u003d set(cls.primary_keys).difference(kwargs.keys())"},{"line_number":136,"context_line":"        if missing_keys:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_83ecbec8","line":133,"range":{"start_line":133,"start_character":34,"end_line":133,"end_character":43},"updated":"2016-02-15 12:16:21.000000000","message":"OVO is not well known outside our team. Let\u0027s refer to NeutronDbObject","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e08091183781e633a3354800a3749e791b89fd8b","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        :param context:"},{"line_number":132,"context_line":"        :param kwargs: multiple primary key defined key\u003dvalue pairs"},{"line_number":133,"context_line":"        :return: single object of OVO class"},{"line_number":134,"context_line":"        \"\"\""},{"line_number":135,"context_line":"        missing_keys \u003d set(cls.primary_keys).difference(kwargs.keys())"},{"line_number":136,"context_line":"        if missing_keys:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_e1859007","line":133,"range":{"start_line":133,"start_character":34,"end_line":133,"end_character":43},"in_reply_to":"dae33548_83ecbec8","updated":"2016-02-16 11:57:05.000000000","message":"Will correct in PS6.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"c647682e9633573a86947031a197d3e93e6e5e46","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import abc"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron_lib import exceptions"},{"line_number":16,"context_line":"from oslo_db import exception as obj_exc"},{"line_number":17,"context_line":"from oslo_utils import reflection"},{"line_number":18,"context_line":"from oslo_versionedobjects import base as obj_base"}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_fd011e06","line":15,"range":{"start_line":15,"start_character":5,"end_line":15,"end_character":16},"updated":"2016-02-18 16:04:22.000000000","message":"Isn\u0027t this neutron.common instead of neutron_lib?","commit_id":"e3495dacea1d65652896ec62633c1a082e33ae69"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"b909b31fa183dfabb4f905e789b7c318649e5298","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import abc"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from neutron_lib import exceptions"},{"line_number":16,"context_line":"from oslo_db import exception as obj_exc"},{"line_number":17,"context_line":"from oslo_utils import reflection"},{"line_number":18,"context_line":"from oslo_versionedobjects import base as obj_base"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_79e7b6e4","line":15,"range":{"start_line":15,"start_character":5,"end_line":15,"end_character":16},"in_reply_to":"dae33548_fd011e06","updated":"2016-02-19 15:30:23.000000000","message":"The neutron.common has been deprecated in favor of neutron_lib package","commit_id":"e3495dacea1d65652896ec62633c1a082e33ae69"}],"neutron/objects/db/api.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"91376903c7f8175bb950d22bd5ef35e071072a5a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"dae33548_24b5c1ed","updated":"2016-02-16 13:36:10.000000000","message":"Now you have duplicate methods in neutron/db/api.py\n\nAre you going to remove them from there, or is it too late for that?","commit_id":"ddf631d6136b850b6e8fda385ed63afe0240b6d8"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"a63f25615b6308b8b3f80a121c66284999817f2c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"dae33548_1598a8bf","in_reply_to":"dae33548_24b5c1ed","updated":"2016-02-16 14:31:21.000000000","message":"So in my patch 3 methods are reworked, get_object(s) and create_object is copied from db/api.py - I was not sure which way to go - split them in 2 files or store them in one place for OVO usage. I\u0027ve chosen the latter but I\u0027m open to reviewers opinions. If we duplicate, the OVO db API will be consistent, otherwise OVO base class will use 2 places to fetch/operate on DB records...","commit_id":"ddf631d6136b850b6e8fda385ed63afe0240b6d8"}],"neutron/services/qos/notification_drivers/message_queue.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"f0b135869de76fcd4f8e3edb62b38d6cd1ee7cfc","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        )"},{"line_number":34,"context_line":"        return"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    policy \u003d policy_object.QosPolicy.get_object(context, policy_id)"},{"line_number":37,"context_line":"    return policy"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_271647a7","line":36,"updated":"2016-02-28 16:42:00.000000000","message":"this should be:\n\npolicy \u003d policy_object.QosPolicy.get_object(context, id\u003dpolicy_id)","commit_id":"038bf88983850a83435d2d275a3d038c4ac699a1"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"5dbf556d1b695340226ede1b6141d39dfa1023e7","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        )"},{"line_number":34,"context_line":"        return"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    policy \u003d policy_object.QosPolicy.get_object(context, policy_id)"},{"line_number":37,"context_line":"    return policy"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_c0a805de","line":36,"in_reply_to":"9aed3d3a_271647a7","updated":"2016-02-29 13:26:28.000000000","message":"Done","commit_id":"038bf88983850a83435d2d275a3d038c4ac699a1"}],"neutron/services/qos/qos_plugin.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"f0b135869de76fcd4f8e3edb62b38d6cd1ee7cfc","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        policy.delete()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_policy_obj(self, context, policy_id):"},{"line_number":64,"context_line":"        obj \u003d policy_object.QosPolicy.get_object(context, policy_id)"},{"line_number":65,"context_line":"        if obj is None:"},{"line_number":66,"context_line":"            raise n_exc.QosPolicyNotFound(policy_id\u003dpolicy_id)"},{"line_number":67,"context_line":"        return obj"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_870d9392","line":64,"range":{"start_line":64,"start_character":8,"end_line":64,"end_character":68},"updated":"2016-02-28 16:42:00.000000000","message":"obj \u003d policy_object.QosPolicy.get_object(context, id\u003dpolicy_id)","commit_id":"038bf88983850a83435d2d275a3d038c4ac699a1"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"5dbf556d1b695340226ede1b6141d39dfa1023e7","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        policy.delete()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_policy_obj(self, context, policy_id):"},{"line_number":64,"context_line":"        obj \u003d policy_object.QosPolicy.get_object(context, policy_id)"},{"line_number":65,"context_line":"        if obj is None:"},{"line_number":66,"context_line":"            raise n_exc.QosPolicyNotFound(policy_id\u003dpolicy_id)"},{"line_number":67,"context_line":"        return obj"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aed3d3a_60b8192b","line":64,"range":{"start_line":64,"start_character":8,"end_line":64,"end_character":68},"in_reply_to":"9aed3d3a_870d9392","updated":"2016-02-29 13:26:28.000000000","message":"Done","commit_id":"038bf88983850a83435d2d275a3d038c4ac699a1"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"beb4148291c0be59453a7ec5fd7ed8b2ae5fa0d2","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    _test_class \u003d FakeNeutronObjectNonStandardPrimaryKey"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"class BaseDbObjectCompositePrimaryKeyTestCase(BaseObjectIfaceTestCase):"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    _test_class \u003d FakeNeutronObjectCompositePrimaryKey"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_b763061a","line":318,"updated":"2016-02-03 18:23:39.000000000","message":"code duplication here that can be avoided I guess","commit_id":"52bd4e4051a1f64f26dbb119778a176649cbfdf4"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1d6b242e930062c6e689700aaa47c47c6d732b7c","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    _test_class \u003d FakeNeutronObjectNonStandardPrimaryKey"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    @mock.patch.object(db_api, \u0027update_object\u0027)"},{"line_number":335,"context_line":"    def test_update_changes(self, update_mock):"},{"line_number":336,"context_line":"        fields_to_update \u003d self.get_updatable_fields(self.db_obj)"},{"line_number":337,"context_line":"        with mock.patch.object(base.NeutronDbObject,"},{"line_number":338,"context_line":"                               \u0027_get_changed_persistent_fields\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_c1440e4b","line":335,"updated":"2016-02-08 12:56:47.000000000","message":"in the tests you added there\u0027s lots of code duplication. I am pretty sure we can avoid overriding all these tests methods if we add to BaseObjectIfaceTestCase a way to automatically calculate the kwargs that need to be passed to update/delete etc based on the specific test class.","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"fe8b0f09bf1f3f5d2228fdb76267ca6556843e66","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    _test_class \u003d FakeNeutronObjectNonStandardPrimaryKey"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    @mock.patch.object(db_api, \u0027update_object\u0027)"},{"line_number":335,"context_line":"    def test_update_changes(self, update_mock):"},{"line_number":336,"context_line":"        fields_to_update \u003d self.get_updatable_fields(self.db_obj)"},{"line_number":337,"context_line":"        with mock.patch.object(base.NeutronDbObject,"},{"line_number":338,"context_line":"                               \u0027_get_changed_persistent_fields\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_61ffc0aa","line":335,"in_reply_to":"5a5ae5dd_c1440e4b","updated":"2016-02-16 11:54:09.000000000","message":"Done","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"1d6b242e930062c6e689700aaa47c47c6d732b7c","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            update_mock.assert_called_once_with("},{"line_number":343,"context_line":"                self.context, self._test_class.db_model, None,"},{"line_number":344,"context_line":"                fields_to_update,"},{"line_number":345,"context_line":"                **{self._test_class.primary_keys[0]:"},{"line_number":346,"context_line":"                    self.db_obj[self._test_class.primary_keys[0]]})"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    @mock.patch.object(db_api, \u0027delete_object\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_c14e4e3a","line":345,"updated":"2016-02-08 12:56:47.000000000","message":"e.g. here instead of overriding test_update_changes just because of this line we could have in BaseObjectIfaceTestCase something like:\n\nupdate_mock.assert_called_once_with(\n                self.context, self._test_class.db_model, None,\n                fields_to_update,\n                obj._get_composite_keys())\n\nDidn\u0027t test it, just an idea","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"fe8b0f09bf1f3f5d2228fdb76267ca6556843e66","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            update_mock.assert_called_once_with("},{"line_number":343,"context_line":"                self.context, self._test_class.db_model, None,"},{"line_number":344,"context_line":"                fields_to_update,"},{"line_number":345,"context_line":"                **{self._test_class.primary_keys[0]:"},{"line_number":346,"context_line":"                    self.db_obj[self._test_class.primary_keys[0]]})"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    @mock.patch.object(db_api, \u0027delete_object\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_c12ccc4c","line":345,"in_reply_to":"5a5ae5dd_c14e4e3a","updated":"2016-02-16 11:54:09.000000000","message":"Done","commit_id":"84833fc87d7dc537d4a723cc5da970a607423c98"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def test_get_object_missing_primary_key(self):"},{"line_number":188,"context_line":"        obj_keys \u003d self.generate_object_keys(self._test_class)"},{"line_number":189,"context_line":"        if len(obj_keys) \u003e 1:"},{"line_number":190,"context_line":"            obj_keys.popitem()"},{"line_number":191,"context_line":"            self.assertRaises(base.NeutronPrimaryKeyMissing,"},{"line_number":192,"context_line":"                              self._test_class.get_object,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_63d37a39","line":189,"updated":"2016-02-15 12:16:21.000000000","message":"nit: you could avoid the \u0027if\u0027 by: 1) always popping out an item; 2) passing remaining keys into get_object.","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e08091183781e633a3354800a3749e791b89fd8b","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def test_get_object_missing_primary_key(self):"},{"line_number":188,"context_line":"        obj_keys \u003d self.generate_object_keys(self._test_class)"},{"line_number":189,"context_line":"        if len(obj_keys) \u003e 1:"},{"line_number":190,"context_line":"            obj_keys.popitem()"},{"line_number":191,"context_line":"            self.assertRaises(base.NeutronPrimaryKeyMissing,"},{"line_number":192,"context_line":"                              self._test_class.get_object,"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_a1d3885e","line":189,"in_reply_to":"dae33548_63d37a39","updated":"2016-02-16 11:57:05.000000000","message":"Done","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9fe320ae5ee722615aad3f58d5852c0d1e0ff57d","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        obj.create()"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        new \u003d self._test_class.get_object(self.context,"},{"line_number":393,"context_line":"            **{obj.primary_keys[0]: getattr(obj, obj.primary_keys[0])})"},{"line_number":394,"context_line":"        self.assertEqual(obj, new)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        obj \u003d new"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_a3d102d0","line":393,"range":{"start_line":393,"start_character":31,"end_line":393,"end_character":34},"updated":"2016-02-15 12:16:21.000000000","message":"why do we pass only the first key field here? Won\u0027t it fail for composite key objects?","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e08091183781e633a3354800a3749e791b89fd8b","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        obj.create()"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        new \u003d self._test_class.get_object(self.context,"},{"line_number":393,"context_line":"            **{obj.primary_keys[0]: getattr(obj, obj.primary_keys[0])})"},{"line_number":394,"context_line":"        self.assertEqual(obj, new)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        obj \u003d new"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_e144701c","line":393,"range":{"start_line":393,"start_character":31,"end_line":393,"end_character":34},"in_reply_to":"dae33548_a3d102d0","updated":"2016-02-16 11:57:05.000000000","message":"changed to obj._get_composite_keys()","commit_id":"cb7211b486e22ed4886f36e7cb0d1d2325303746"}]}
