)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4d9b198768e4d8bd426a919e1997ebdd12c22aac","unresolved":false,"context_lines":[{"line_number":12,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":13,"context_line":"without first fetching the data from the database."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_objects is returning number of entries deleted from DB."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The default non-db implementation relying on get_objects and delete"},{"line_number":18,"context_line":"method. Db-based objects will call .delete() on SQLAlchemy query."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3a71b18c_720cfb42","line":15,"range":{"start_line":15,"start_character":15,"end_line":15,"end_character":34},"updated":"2016-12-01 16:50:19.000000000","message":"returns the number of","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"1b079da1d978f49abbfbd4616bb93d25ad430f36","unresolved":false,"context_lines":[{"line_number":12,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":13,"context_line":"without first fetching the data from the database."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"delete_objects is returning number of entries deleted from DB."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"The default non-db implementation relying on get_objects and delete"},{"line_number":18,"context_line":"method. Db-based objects will call .delete() on SQLAlchemy query."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3a71b18c_685ea077","line":15,"range":{"start_line":15,"start_character":15,"end_line":15,"end_character":34},"in_reply_to":"3a71b18c_720cfb42","updated":"2016-12-02 12:16:08.000000000","message":"Done","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6726db956fc46594acb3e815594aa52ae5e3aa74","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"objects: add delete_objects public method"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sometimes we don\u0027t need to fetch objects before deleting them, and it\u0027s"},{"line_number":10,"context_line":"a waste to do so."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":13,"context_line":"without first fetching the data from the database."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1a6eadb0_d99421ea","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":17},"updated":"2016-12-12 23:16:31.000000000","message":"In a few cases we do so to make sure sqlalchemy listeners kick in and do their bids (e.g. quota checking). I thought we had documented this somewhere, but I can\u0027t seem to find it. Kevin should know more as he fiddled with this.","commit_id":"27bc36aee102ebe058bee4f04418ad5db2d10f11"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"89e260481100a36e52da41c1ea0f5eb52d664c9e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"objects: add delete_objects public method"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sometimes we don\u0027t need to fetch objects before deleting them, and it\u0027s"},{"line_number":10,"context_line":"a waste to do so."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":13,"context_line":"without first fetching the data from the database."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1a6eadb0_5eab7374","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":17},"in_reply_to":"1a6eadb0_c041783b","updated":"2016-12-13 14:43:08.000000000","message":"Done","commit_id":"27bc36aee102ebe058bee4f04418ad5db2d10f11"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"aa10d3736383e9c0eb3df38a06b47221ba1d4718","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"objects: add delete_objects public method"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Sometimes we don\u0027t need to fetch objects before deleting them, and it\u0027s"},{"line_number":10,"context_line":"a waste to do so."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":13,"context_line":"without first fetching the data from the database."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1a6eadb0_c041783b","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":17},"in_reply_to":"1a6eadb0_d99421ea","updated":"2016-12-13 08:09:08.000000000","message":"That\u0027s more about not constructing OVO objects if not needed. We still fetch it from db.","commit_id":"27bc36aee102ebe058bee4f04418ad5db2d10f11"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"9152cf4d68c9f684003dfbd863e14f3b61165603","unresolved":false,"context_lines":[{"line_number":11,"context_line":"delete_objects call instead of a loop with get_objects and delete."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":14,"context_line":"without first fetching the data from the database."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"before:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"1a6eadb0_9b9433e3","line":14,"updated":"2016-12-13 17:28:58.000000000","message":"This needs an update now.","commit_id":"e9566c13d8c8ea87e54514649c6c5a9e41729a03"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3bf245b8c0d6d66171b0213aafc64356dba4d4ff","unresolved":false,"context_lines":[{"line_number":10,"context_line":"it\u0027s a waste to do so. It may also be easier to use a single"},{"line_number":11,"context_line":"delete_objects call instead of a loop with get_objects and delete."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":14,"context_line":"without first fetching the data from the database."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"before:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"1a6eadb0_7bfe7739","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":50},"updated":"2016-12-13 17:30:09.000000000","message":"is this stale now?","commit_id":"e9566c13d8c8ea87e54514649c6c5a9e41729a03"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dcd40e69ed335a8a7f25e16c6b997ab3f9c9e036","unresolved":false,"context_lines":[{"line_number":10,"context_line":"it\u0027s a waste to do so. It may also be easier to use a single"},{"line_number":11,"context_line":"delete_objects call instead of a loop with get_objects and delete."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch introduces a method that will construct DELETE statement"},{"line_number":14,"context_line":"without first fetching the data from the database."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"before:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"1a6eadb0_beb55d32","line":14,"range":{"start_line":13,"start_character":0,"end_line":14,"end_character":50},"in_reply_to":"1a6eadb0_7bfe7739","updated":"2016-12-13 17:35:07.000000000","message":"Ehm, yea...","commit_id":"e9566c13d8c8ea87e54514649c6c5a9e41729a03"}],"neutron/db/allowedaddresspairs_db.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ab520431620575b729bd3a9b997f445e3f784d39","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        attr.PORTS, [\u0027_extend_port_dict_allowed_address_pairs\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _delete_allowed_address_pairs(self, context, id):"},{"line_number":81,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":82,"context_line":"            obj_addr_pair.AllowedAddressPair.delete_objects("},{"line_number":83,"context_line":"                context, port_id\u003did)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_97da6977","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":57},"updated":"2016-12-01 16:36:53.000000000","message":"are we going to keep the sessions blocks for this delete method?","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"1ad7d97dff13e087b4ab3e244bc3beb1f2492f9d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        attr.PORTS, [\u0027_extend_port_dict_allowed_address_pairs\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _delete_allowed_address_pairs(self, context, id):"},{"line_number":81,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":82,"context_line":"            obj_addr_pair.AllowedAddressPair.delete_objects("},{"line_number":83,"context_line":"                context, port_id\u003did)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_d60f0786","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":57},"in_reply_to":"3a71b18c_97da6977","updated":"2016-12-05 14:44:32.000000000","message":"Yes, I guess we can remove it.","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"}],"neutron/objects/base.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"db8de5502acf988c04adfd006738f36403123c88","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        if validate_filters:"},{"line_number":450,"context_line":"            cls.validate_filters(**kwargs)"},{"line_number":451,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":452,"context_line":"            obj_db_api.delete_objects("},{"line_number":453,"context_line":"                context, cls.db_model, **cls.modify_fields_to_db(kwargs))"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_e7711ce2","line":452,"range":{"start_line":452,"start_character":12,"end_line":452,"end_character":38},"updated":"2016-11-30 13:12:24.000000000","message":"I\u0027m thinking if delete_objects() should return number of entries deleted, it is used in a few places in code:\n\nhttps://review.openstack.org/#/c/338625/19/neutron/db/quota/api.py@150\nhttps://review.openstack.org/#/c/338625/19/neutron/db/quota/api.py@162","commit_id":"a29f77762381de2c1b53cafd0c434ae8323e5f27"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"de2173a78addddb593def83972ba670073235ea8","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        if validate_filters:"},{"line_number":450,"context_line":"            cls.validate_filters(**kwargs)"},{"line_number":451,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":452,"context_line":"            obj_db_api.delete_objects("},{"line_number":453,"context_line":"                context, cls.db_model, **cls.modify_fields_to_db(kwargs))"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_1f2014f7","line":452,"range":{"start_line":452,"start_character":12,"end_line":452,"end_character":38},"in_reply_to":"5a74a57a_e7711ce2","updated":"2016-11-30 16:23:36.000000000","message":"Also here:\nhttps://review.openstack.org/#/c/360799/37/neutron/ipam/drivers/neutrondb_ipam/db_api.py@67","commit_id":"a29f77762381de2c1b53cafd0c434ae8323e5f27"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4d9b198768e4d8bd426a919e1997ebdd12c22aac","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        raise NotImplementedError()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @classmethod"},{"line_number":179,"context_line":"    def delete_objects(cls, context, validate_filters\u003dTrue, **kwargs):"},{"line_number":180,"context_line":"        objs \u003d cls.get_objects(context, validate_filters, **kwargs)"},{"line_number":181,"context_line":"        for obj in objs:"},{"line_number":182,"context_line":"            obj.delete()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_d8109151","line":179,"updated":"2016-12-01 16:50:19.000000000","message":"it made me realize we don\u0027t really cover this non-db implementation","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"1b079da1d978f49abbfbd4616bb93d25ad430f36","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        raise NotImplementedError()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @classmethod"},{"line_number":179,"context_line":"    def delete_objects(cls, context, validate_filters\u003dTrue, **kwargs):"},{"line_number":180,"context_line":"        objs \u003d cls.get_objects(context, validate_filters, **kwargs)"},{"line_number":181,"context_line":"        for obj in objs:"},{"line_number":182,"context_line":"            obj.delete()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_a88518ae","line":179,"in_reply_to":"3a71b18c_d8109151","updated":"2016-12-02 12:16:08.000000000","message":"You mean like in UT?","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f792021042e3dc58521b2509ffe247f67a2130b2","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        raise NotImplementedError()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @classmethod"},{"line_number":179,"context_line":"    def delete_objects(cls, context, validate_filters\u003dTrue, **kwargs):"},{"line_number":180,"context_line":"        objs \u003d cls.get_objects(context, validate_filters, **kwargs)"},{"line_number":181,"context_line":"        for obj in objs:"},{"line_number":182,"context_line":"            obj.delete()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_3e50df31","line":179,"updated":"2016-12-06 14:16:48.000000000","message":"can you at least explain here what the kwargs format should be\n\ndocstring from below would be useful","commit_id":"219e86e8ddce996895b51f4886be1273b8a9360b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"9152cf4d68c9f684003dfbd863e14f3b61165603","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        raise NotImplementedError()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @classmethod"},{"line_number":179,"context_line":"    def delete_objects(cls, context, validate_filters\u003dTrue, **kwargs):"},{"line_number":180,"context_line":"        objs \u003d cls.get_objects(context, validate_filters, **kwargs)"},{"line_number":181,"context_line":"        for obj in objs:"},{"line_number":182,"context_line":"            obj.delete()"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_5b037b42","line":179,"updated":"2016-12-13 17:28:58.000000000","message":"I\u0027m not sure how difficult it would be with the current OVO framework, but there could be a little room for optimization here if you avoid constructing the OVO object and just delete the sqlalchemy objects directly.\n\nBased on how this looks thought, it would probably violate a lot of layers so it\u0027s just something to think about. :)","commit_id":"e9566c13d8c8ea87e54514649c6c5a9e41729a03"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dcd40e69ed335a8a7f25e16c6b997ab3f9c9e036","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        raise NotImplementedError()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @classmethod"},{"line_number":179,"context_line":"    def delete_objects(cls, context, validate_filters\u003dTrue, **kwargs):"},{"line_number":180,"context_line":"        objs \u003d cls.get_objects(context, validate_filters, **kwargs)"},{"line_number":181,"context_line":"        for obj in objs:"},{"line_number":182,"context_line":"            obj.delete()"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_7eabc5d6","line":179,"in_reply_to":"1a6eadb0_5b037b42","updated":"2016-12-13 17:35:07.000000000","message":"That\u0027s default non-db object implementation; for db objects, we do use delete_objects function from db.api that does avoid object construction","commit_id":"e9566c13d8c8ea87e54514649c6c5a9e41729a03"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3bf245b8c0d6d66171b0213aafc64356dba4d4ff","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @classmethod"},{"line_number":179,"context_line":"    def delete_objects(cls, context, validate_filters\u003dTrue, **kwargs):"},{"line_number":180,"context_line":"        objs \u003d cls.get_objects(context, validate_filters, **kwargs)"},{"line_number":181,"context_line":"        for obj in objs:"},{"line_number":182,"context_line":"            obj.delete()"},{"line_number":183,"context_line":"        return len(objs)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def create(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_9b827393","line":182,"range":{"start_line":180,"start_character":7,"end_line":182,"end_character":24},"updated":"2016-12-13 17:30:09.000000000","message":"this looks to me like we\u0027re getting and then deleting, which seems contrary to what\u0027s implied by the commit message. Also, does this preserve atomicity in face of partial failures? Or are you explicitly leaving it to the caller?","commit_id":"e9566c13d8c8ea87e54514649c6c5a9e41729a03"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dcd40e69ed335a8a7f25e16c6b997ab3f9c9e036","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @classmethod"},{"line_number":179,"context_line":"    def delete_objects(cls, context, validate_filters\u003dTrue, **kwargs):"},{"line_number":180,"context_line":"        objs \u003d cls.get_objects(context, validate_filters, **kwargs)"},{"line_number":181,"context_line":"        for obj in objs:"},{"line_number":182,"context_line":"            obj.delete()"},{"line_number":183,"context_line":"        return len(objs)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def create(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_1e6f31c6","line":182,"range":{"start_line":180,"start_character":7,"end_line":182,"end_character":24},"in_reply_to":"1a6eadb0_9b827393","updated":"2016-12-13 17:35:07.000000000","message":"That\u0027s the default implementation for non-db objects. The db one is below.","commit_id":"e9566c13d8c8ea87e54514649c6c5a9e41729a03"}],"neutron/objects/db/api.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"ab520431620575b729bd3a9b997f445e3f784d39","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"        db_objs \u003d get_objects(context, model, **kwargs)"},{"line_number":101,"context_line":"        for db_obj in db_objs:"},{"line_number":102,"context_line":"            context.session.delete(db_obj)"},{"line_number":103,"context_line":"        return len(db_objs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_52f8dfe5","line":102,"range":{"start_line":101,"start_character":8,"end_line":102,"end_character":42},"updated":"2016-12-01 16:36:53.000000000","message":"Eventually, we should change this to make a single call to the db, isn\u0027t it?","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4d9b198768e4d8bd426a919e1997ebdd12c22aac","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"        db_objs \u003d get_objects(context, model, **kwargs)"},{"line_number":101,"context_line":"        for db_obj in db_objs:"},{"line_number":102,"context_line":"            context.session.delete(db_obj)"},{"line_number":103,"context_line":"        return len(db_objs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_d89331a2","line":102,"range":{"start_line":101,"start_character":8,"end_line":102,"end_character":42},"in_reply_to":"3a71b18c_52f8dfe5","updated":"2016-12-01 16:50:19.000000000","message":"Yeah.","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"1b079da1d978f49abbfbd4616bb93d25ad430f36","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"        db_objs \u003d get_objects(context, model, **kwargs)"},{"line_number":101,"context_line":"        for db_obj in db_objs:"},{"line_number":102,"context_line":"            context.session.delete(db_obj)"},{"line_number":103,"context_line":"        return len(db_objs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_28674826","line":102,"range":{"start_line":101,"start_character":8,"end_line":102,"end_character":42},"in_reply_to":"3a71b18c_d89331a2","updated":"2016-12-02 12:16:08.000000000","message":"I have changed it with:\nget_filter_query(context, model, **kwargs).\n                delete(synchronize_session\u003d\u0027fetch\u0027)\nBut it still doing the fetch and delete underneath.","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f792021042e3dc58521b2509ffe247f67a2130b2","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def delete_objects(context, model, **kwargs):"},{"line_number":91,"context_line":"    \u0027\u0027\u0027Delete matching objects, if any. Return number of deleted objects."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    This function does not raise exceptions if nothing matches."},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_fe29079c","line":91,"range":{"start_line":91,"start_character":47,"end_line":91,"end_character":53},"updated":"2016-12-06 14:16:48.000000000","message":"i do not see a return here","commit_id":"219e86e8ddce996895b51f4886be1273b8a9360b"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"f7196a8f4d7dcc46e141f55eb2c0a0b5f891ca81","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def delete_objects(context, model, **kwargs):"},{"line_number":91,"context_line":"    \u0027\u0027\u0027Delete matching objects, if any. Return number of deleted objects."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    This function does not raise exceptions if nothing matches."},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_51000834","line":91,"range":{"start_line":91,"start_character":47,"end_line":91,"end_character":53},"in_reply_to":"3a71b18c_fe29079c","updated":"2016-12-07 07:59:54.000000000","message":"Yes, my mistake. Fixed in PS10.","commit_id":"219e86e8ddce996895b51f4886be1273b8a9360b"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7b36e4679faa43c1474848fa7115ee06a31cce3c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    This function does not raise exceptions if nothing matches."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    :param model: SQL model"},{"line_number":96,"context_line":"    :param kwargs: multiple keys defined by key\u003dvalue pairs"},{"line_number":97,"context_line":"    :return: Number of entries deleted"},{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_1eb84ae5","line":96,"range":{"start_line":96,"start_character":28,"end_line":96,"end_character":32},"updated":"2016-12-07 15:29:02.000000000","message":"nit: s/keys/filters","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f4ecdddf99a37cf84439fc5f7ae438cd8b0b34bc","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    This function does not raise exceptions if nothing matches."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    :param model: SQL model"},{"line_number":96,"context_line":"    :param kwargs: multiple keys defined by key\u003dvalue pairs"},{"line_number":97,"context_line":"    :return: Number of entries deleted"},{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_6fd0a3f8","line":96,"range":{"start_line":96,"start_character":28,"end_line":96,"end_character":32},"in_reply_to":"3a71b18c_1eb84ae5","updated":"2016-12-07 17:52:24.000000000","message":"Done","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"c400e6c179b172d34278f433106cdf0395a4dc24","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    :return: Number of entries deleted"},{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"        # TODO(ihrachys): don\u0027t fetch all models, delete using query.delete()"},{"line_number":101,"context_line":"        db_objs \u003d get_objects(context, model, **kwargs)"},{"line_number":102,"context_line":"        for db_obj in db_objs:"},{"line_number":103,"context_line":"            context.session.delete(db_obj)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a71b18c_44080f92","line":100,"range":{"start_line":100,"start_character":7,"end_line":100,"end_character":77},"updated":"2016-12-08 09:23:46.000000000","message":"In PS8, I have added the query.delete(), which according to docs is doing the \u0027fetch\u0027 and delete underneath the code. I have reverted it, because tempest API tests were failing in bumping revision number for allowed address pairs deletion and Port revision number not being incremented.","commit_id":"27bc36aee102ebe058bee4f04418ad5db2d10f11"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"89e260481100a36e52da41c1ea0f5eb52d664c9e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    :return: Number of entries deleted"},{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"        # TODO(ihrachys): don\u0027t fetch all models, delete using query.delete()"},{"line_number":101,"context_line":"        db_objs \u003d get_objects(context, model, **kwargs)"},{"line_number":102,"context_line":"        for db_obj in db_objs:"},{"line_number":103,"context_line":"            context.session.delete(db_obj)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6eadb0_9ee26bd4","line":100,"range":{"start_line":100,"start_character":7,"end_line":100,"end_character":77},"in_reply_to":"1a6eadb0_a0739cb0","updated":"2016-12-13 14:43:08.000000000","message":"Done","commit_id":"27bc36aee102ebe058bee4f04418ad5db2d10f11"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"edf9eb40c7c9e0c29171b8e1a6fbed5d5cf67a53","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    :return: Number of entries deleted"},{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"        # TODO(ihrachys): don\u0027t fetch all models, delete using query.delete()"},{"line_number":101,"context_line":"        db_objs \u003d get_objects(context, model, **kwargs)"},{"line_number":102,"context_line":"        for db_obj in db_objs:"},{"line_number":103,"context_line":"            context.session.delete(db_obj)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a71b18c_4a2019f8","line":100,"range":{"start_line":100,"start_character":7,"end_line":100,"end_character":77},"in_reply_to":"3a71b18c_44080f92","updated":"2016-12-08 09:34:24.000000000","message":"Ack. We may still need to look at it later. It would be nice to avoid fetching complexity.","commit_id":"27bc36aee102ebe058bee4f04418ad5db2d10f11"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"aa10d3736383e9c0eb3df38a06b47221ba1d4718","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    :return: Number of entries deleted"},{"line_number":98,"context_line":"    \u0027\u0027\u0027"},{"line_number":99,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":100,"context_line":"        # TODO(ihrachys): don\u0027t fetch all models, delete using query.delete()"},{"line_number":101,"context_line":"        db_objs \u003d get_objects(context, model, **kwargs)"},{"line_number":102,"context_line":"        for db_obj in db_objs:"},{"line_number":103,"context_line":"            context.session.delete(db_obj)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6eadb0_a0739cb0","line":100,"range":{"start_line":100,"start_character":7,"end_line":100,"end_character":77},"in_reply_to":"3a71b18c_4a2019f8","updated":"2016-12-13 08:09:08.000000000","message":"OK, based on latest comments, seems like this TODO should not exist.","commit_id":"27bc36aee102ebe058bee4f04418ad5db2d10f11"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6c8fa28b8b5bcd2f531a4b378bcc792f5e938d59","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def delete_objects(context, model, **kwargs):"},{"line_number":91,"context_line":"    \u0027\u0027\u0027Delete matching objects, if any. Return number of deleted objects."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    This function does not raise exceptions if nothing matches."},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6eadb0_e5ec8691","line":91,"updated":"2016-12-14 10:09:50.000000000","message":"I can see the # of objects being deleted being handy, but nothing seems to give a damn about it currently. I wonder if this is something worth leaving it for later.","commit_id":"0ec47f9eb4347983606c81c41838fff1eb226346"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"cb3b4a10e2977b631d996492fb1896dd26d8e863","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def delete_objects(context, model, **kwargs):"},{"line_number":91,"context_line":"    \u0027\u0027\u0027Delete matching objects, if any. Return number of deleted objects."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    This function does not raise exceptions if nothing matches."},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6eadb0_7c61e438","line":91,"in_reply_to":"1a6eadb0_dc5cb8ef","updated":"2016-12-14 13:08:19.000000000","message":"One example:\nhttps://review.openstack.org/#/c/360799/37/neutron/ipam/drivers/neutrondb_ipam/db_api.py@67","commit_id":"0ec47f9eb4347983606c81c41838fff1eb226346"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7613d660735df29948953cfa9b7924458563622a","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def delete_objects(context, model, **kwargs):"},{"line_number":91,"context_line":"    \u0027\u0027\u0027Delete matching objects, if any. Return number of deleted objects."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    This function does not raise exceptions if nothing matches."},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6eadb0_dc5cb8ef","line":91,"in_reply_to":"1a6eadb0_e5ec8691","updated":"2016-12-14 12:59:05.000000000","message":"Artur said that we may need it in several places where we are going to integrate OVO. I haven\u0027t checked but I trust him. :)","commit_id":"0ec47f9eb4347983606c81c41838fff1eb226346"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4d9b198768e4d8bd426a919e1997ebdd12c22aac","unresolved":false,"context_lines":[{"line_number":764,"context_line":"        with mock.patch.object("},{"line_number":765,"context_line":"                obj_db_api, \u0027delete_objects\u0027, return_value\u003d0"},{"line_number":766,"context_line":"        ) as delete_objects_mock:"},{"line_number":767,"context_line":"            self.assertFalse(self._test_class.delete_objects(self.context))"},{"line_number":768,"context_line":"        delete_objects_mock.assert_any_call("},{"line_number":769,"context_line":"            self.context, self._test_class.db_model)"},{"line_number":770,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_78413d0b","line":767,"range":{"start_line":767,"start_character":17,"end_line":767,"end_character":28},"updated":"2016-12-01 16:50:19.000000000","message":"would it make a slight more sense to check assertEqual(0, ..)?","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"1b079da1d978f49abbfbd4616bb93d25ad430f36","unresolved":false,"context_lines":[{"line_number":764,"context_line":"        with mock.patch.object("},{"line_number":765,"context_line":"                obj_db_api, \u0027delete_objects\u0027, return_value\u003d0"},{"line_number":766,"context_line":"        ) as delete_objects_mock:"},{"line_number":767,"context_line":"            self.assertFalse(self._test_class.delete_objects(self.context))"},{"line_number":768,"context_line":"        delete_objects_mock.assert_any_call("},{"line_number":769,"context_line":"            self.context, self._test_class.db_model)"},{"line_number":770,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_687140e0","line":767,"range":{"start_line":767,"start_character":17,"end_line":767,"end_character":28},"in_reply_to":"3a71b18c_78413d0b","updated":"2016-12-02 12:16:08.000000000","message":"Done","commit_id":"7f945d7eaa20e6eceefabbaf5d2c9a21b67cec2c"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7b36e4679faa43c1474848fa7115ee06a31cce3c","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            for fields in self.obj_fields"},{"line_number":477,"context_line":"        ]"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        invalid_fields \u003d (set(self._test_class.synthetic_fields)."},{"line_number":480,"context_line":"                          union(set(TIMESTAMP_FIELDS)))"},{"line_number":481,"context_line":"        valid_field \u003d [f for f in self._test_class.fields"},{"line_number":482,"context_line":"                       if f not in invalid_fields][0]"},{"line_number":483,"context_line":"        self.valid_field_filter \u003d {valid_field:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_1e104aa8","line":480,"range":{"start_line":479,"start_character":8,"end_line":480,"end_character":55},"updated":"2016-12-07 15:29:02.000000000","message":"nit: \n        invalid_fields \u003d (set(self._test_class.synthetic_fields).union(\n            set(TIMESTAMP_FIELDS)))","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f4ecdddf99a37cf84439fc5f7ae438cd8b0b34bc","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            for fields in self.obj_fields"},{"line_number":477,"context_line":"        ]"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        invalid_fields \u003d (set(self._test_class.synthetic_fields)."},{"line_number":480,"context_line":"                          union(set(TIMESTAMP_FIELDS)))"},{"line_number":481,"context_line":"        valid_field \u003d [f for f in self._test_class.fields"},{"line_number":482,"context_line":"                       if f not in invalid_fields][0]"},{"line_number":483,"context_line":"        self.valid_field_filter \u003d {valid_field:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_4f1047a9","line":480,"range":{"start_line":479,"start_character":8,"end_line":480,"end_character":55},"in_reply_to":"3a71b18c_1e104aa8","updated":"2016-12-07 17:52:24.000000000","message":"Done","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7b36e4679faa43c1474848fa7115ee06a31cce3c","unresolved":false,"context_lines":[{"line_number":813,"context_line":"            self.assertEqual(expected, self._test_class.count(self.context,"},{"line_number":814,"context_line":"                validate_filters\u003dFalse, fake_field\u003d\u0027xxx\u0027))"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    # Adding delete_objects mock because some objects are using delete_objects"},{"line_number":817,"context_line":"    # while calling create(), Port for example"},{"line_number":818,"context_line":"    @mock.patch.object(obj_db_api, \u0027delete_objects\u0027)"},{"line_number":819,"context_line":"    def test_create(self, *mocks):"},{"line_number":820,"context_line":"        with mock.patch.object(obj_db_api, \u0027create_object\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_11803b46","line":817,"range":{"start_line":816,"start_character":4,"end_line":817,"end_character":46},"updated":"2016-12-07 15:29:02.000000000","message":"IMHO this comment should be more explicit, mentioning the _attach_qos_policy of the Port OVO which contains the call to delete_objects","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b2df4266ab855618838ec36a36bde29231e59e34","unresolved":false,"context_lines":[{"line_number":813,"context_line":"            self.assertEqual(expected, self._test_class.count(self.context,"},{"line_number":814,"context_line":"                validate_filters\u003dFalse, fake_field\u003d\u0027xxx\u0027))"},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    # Adding delete_objects mock because some objects are using delete_objects"},{"line_number":817,"context_line":"    # while calling create(), Port for example"},{"line_number":818,"context_line":"    @mock.patch.object(obj_db_api, \u0027delete_objects\u0027)"},{"line_number":819,"context_line":"    def test_create(self, *mocks):"},{"line_number":820,"context_line":"        with mock.patch.object(obj_db_api, \u0027create_object\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_2f1072a8","line":817,"range":{"start_line":816,"start_character":4,"end_line":817,"end_character":46},"in_reply_to":"3a71b18c_11803b46","updated":"2016-12-07 15:52:50.000000000","message":"Not sure.","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7b36e4679faa43c1474848fa7115ee06a31cce3c","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"        for fields in self.obj_fields:"},{"line_number":1565,"context_line":"            self._make_object(fields).create()"},{"line_number":1566,"context_line":""},{"line_number":1567,"context_line":"        objs \u003d self._test_class.get_objects("},{"line_number":1568,"context_line":"            self.context, **self.valid_field_filter)"},{"line_number":1569,"context_line":"        for k, v in self.valid_field_filter.items():"},{"line_number":1570,"context_line":"            self.assertEqual(v, objs[0][k])"},{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"        count \u003d self._test_class.delete_objects("},{"line_number":1573,"context_line":"            self.context, **self.valid_field_filter)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_91c0cb2c","line":1570,"range":{"start_line":1567,"start_character":8,"end_line":1570,"end_character":43},"updated":"2016-12-07 15:29:02.000000000","message":"These instructions seem to validate that filters which I consider it\u0027s cover by test_filtering_by_fields","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b2df4266ab855618838ec36a36bde29231e59e34","unresolved":false,"context_lines":[{"line_number":1564,"context_line":"        for fields in self.obj_fields:"},{"line_number":1565,"context_line":"            self._make_object(fields).create()"},{"line_number":1566,"context_line":""},{"line_number":1567,"context_line":"        objs \u003d self._test_class.get_objects("},{"line_number":1568,"context_line":"            self.context, **self.valid_field_filter)"},{"line_number":1569,"context_line":"        for k, v in self.valid_field_filter.items():"},{"line_number":1570,"context_line":"            self.assertEqual(v, objs[0][k])"},{"line_number":1571,"context_line":""},{"line_number":1572,"context_line":"        count \u003d self._test_class.delete_objects("},{"line_number":1573,"context_line":"            self.context, **self.valid_field_filter)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_8fa98627","line":1570,"range":{"start_line":1567,"start_character":8,"end_line":1570,"end_character":43},"in_reply_to":"3a71b18c_91c0cb2c","updated":"2016-12-07 15:52:50.000000000","message":"Well, delete_objects() could miss the validation, or error on a valid filter. That\u0027s why we need a separate coverage.","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7b36e4679faa43c1474848fa7115ee06a31cce3c","unresolved":false,"context_lines":[{"line_number":1579,"context_line":"        for obj in new_objs:"},{"line_number":1580,"context_line":"            for k, v in self.valid_field_filter.items():"},{"line_number":1581,"context_line":"                self.assertNotEqual(v, obj[k])"},{"line_number":1582,"context_line":""},{"line_number":1583,"context_line":"    def test_db_obj(self):"},{"line_number":1584,"context_line":"        obj \u003d self._make_object(self.obj_fields[0])"},{"line_number":1585,"context_line":"        self.assertIsNone(obj.db_obj)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_54d9c182","line":1582,"updated":"2016-12-07 15:29:02.000000000","message":"I\u0027m not sure if it should be valuable to consider that the scenario where nothing was deleted.\n\n        self.assertEqual(0, self._test_class.delete_objects(\n            self.context, **self.valid_field_filter))","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f4ecdddf99a37cf84439fc5f7ae438cd8b0b34bc","unresolved":false,"context_lines":[{"line_number":1579,"context_line":"        for obj in new_objs:"},{"line_number":1580,"context_line":"            for k, v in self.valid_field_filter.items():"},{"line_number":1581,"context_line":"                self.assertNotEqual(v, obj[k])"},{"line_number":1582,"context_line":""},{"line_number":1583,"context_line":"    def test_db_obj(self):"},{"line_number":1584,"context_line":"        obj \u003d self._make_object(self.obj_fields[0])"},{"line_number":1585,"context_line":"        self.assertIsNone(obj.db_obj)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_8f509f60","line":1582,"in_reply_to":"3a71b18c_54d9c182","updated":"2016-12-07 17:52:24.000000000","message":"Done","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b2df4266ab855618838ec36a36bde29231e59e34","unresolved":false,"context_lines":[{"line_number":1579,"context_line":"        for obj in new_objs:"},{"line_number":1580,"context_line":"            for k, v in self.valid_field_filter.items():"},{"line_number":1581,"context_line":"                self.assertNotEqual(v, obj[k])"},{"line_number":1582,"context_line":""},{"line_number":1583,"context_line":"    def test_db_obj(self):"},{"line_number":1584,"context_line":"        obj \u003d self._make_object(self.obj_fields[0])"},{"line_number":1585,"context_line":"        self.assertIsNone(obj.db_obj)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_6f850aac","line":1582,"in_reply_to":"3a71b18c_54d9c182","updated":"2016-12-07 15:52:50.000000000","message":"we could add it, yes","commit_id":"8a4acc1f233532688a703bda98748d28bf5c9f91"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6c8fa28b8b5bcd2f531a4b378bcc792f5e938d59","unresolved":false,"context_lines":[{"line_number":814,"context_line":"            self.assertEqual(expected, self._test_class.count(self.context,"},{"line_number":815,"context_line":"                validate_filters\u003dFalse, fake_field\u003d\u0027xxx\u0027))"},{"line_number":816,"context_line":""},{"line_number":817,"context_line":"    # Adding delete_objects mock because some objects are using delete_objects"},{"line_number":818,"context_line":"    # while calling create(), Port for example"},{"line_number":819,"context_line":"    @mock.patch.object(obj_db_api, \u0027delete_objects\u0027)"},{"line_number":820,"context_line":"    def test_create(self, *mocks):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6eadb0_a5644e49","line":817,"updated":"2016-12-14 10:09:50.000000000","message":"gee","commit_id":"0ec47f9eb4347983606c81c41838fff1eb226346"}]}
