)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2c1fad15d316420f27d0ff105f15d7500250d558","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Federico Ceratto \u003cfederico.ceratto@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-13 17:13:39 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement deleted zone purging. Work in progress"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I69e1be7e49dc4ee44f1f2b454ae5c758f4389245"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_4ca5909f","line":7,"updated":"2015-08-13 15:40:16.000000000","message":"Probably time to remove WIP :)","commit_id":"1e7cd79a63f30ddc6aeaab1313008a955672ac4e"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"7e49fbfbadbf02c1cf0442abe20fd62ed5450ae8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Federico Ceratto \u003cfederico.ceratto@hp.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-13 17:13:39 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement deleted zone purging. Work in progress"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I69e1be7e49dc4ee44f1f2b454ae5c758f4389245"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_0c1ea8ba","line":7,"in_reply_to":"1a4dcd0f_4ca5909f","updated":"2015-08-13 15:59:46.000000000","message":"Done","commit_id":"1e7cd79a63f30ddc6aeaab1313008a955672ac4e"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2bbf5f7da93d86e96906ad083541839c18393dfc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement deleted zone purging"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I69e1be7e49dc4ee44f1f2b454ae5c758f4389245"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"fa1b9901_692c7c02","line":9,"updated":"2015-08-19 13:31:55.000000000","message":"There should be a trailer line of:\n\n   Implements-Blueprint: deleted-domains-purging \n\nin order to link to the LP blueprint correctly.","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"}],"designate/central/rpcapi.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        5.0 - Remove dead server code"},{"line_number":50,"context_line":"        5.1 - Add xfr_domain"},{"line_number":51,"context_line":"        5.2 - Add Zone Import methods"},{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":"    RPC_API_VERSION \u003d \u00275.2\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __init__(self, topic\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_6ba236b0","line":52,"updated":"2015-08-05 12:27:04.000000000","message":"When adding a new method, we must increase the version # here - this would 5.3 as it\u0027s a non-breaking change.","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        5.0 - Remove dead server code"},{"line_number":50,"context_line":"        5.1 - Add xfr_domain"},{"line_number":51,"context_line":"        5.2 - Add Zone Import methods"},{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":"    RPC_API_VERSION \u003d \u00275.2\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __init__(self, topic\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_a23ad8cb","line":52,"in_reply_to":"1a4dcd0f_6ba236b0","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        LOG.info(_LI(\"delete_domain: Calling central\u0027s delete_domain.\"))"},{"line_number":176,"context_line":"        return self.client.call(context, \u0027delete_domain\u0027, domain_id\u003ddomain_id)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def purge_deleted_zones(self, context, criterion\u003dNone, limit\u003dNone,"},{"line_number":179,"context_line":"                            time_threshold\u003dNone):"},{"line_number":180,"context_line":"        LOG.info(_LI("},{"line_number":181,"context_line":"            \"purge_deleted_zones: Calling central\u0027s purge_deleted_zones.\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_ebe886e4","line":178,"updated":"2015-08-05 12:27:04.000000000","message":"I\u0027d prefer to try and match the existing naming conventions - e.g. just \"purge_zones\" - the criterion can then be supplied as `{\"deleted\": \"!0\", \"shard\": \"BETWEEN x y\"}` to match only deleted zones in the shards we\u0027re responsible for etc. \n\nThis also leaves this method open for future use where we need to purge a non-deleted domain or similar.","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        ))"},{"line_number":183,"context_line":"        return self.client.call(context, \u0027purge_deleted_zones\u0027,"},{"line_number":184,"context_line":"                                criterion\u003dcriterion, limit\u003dlimit,"},{"line_number":185,"context_line":"                                time_threshold\u003dtime_threshold)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def count_domains(self, context, criterion\u003dNone):"},{"line_number":188,"context_line":"        LOG.info(_LI(\"count_domains: Calling central\u0027s count_domains.\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_6bb796d8","line":185,"updated":"2015-08-05 12:27:04.000000000","message":"We\u0027ll want to swap this for:\n\n    cctxt \u003d self.client.prepare(version\u003d\u00275.3\u0027)\n    return cctxt.call(context, \u0027purge_deleted_zones\u0027,\n                      criterion\u003dcriterion, limit\u003dlimit,\n                      time_threshold\u003dtime_threshold)\n\nThis ensures the call is tagged with a requirement for 5.3+ RPC server side of the call.. These \"tags\" all get removed every major version - so for v6, we would remove them all. Hence there is only 1 method with the tag right now - xfr_domain :)","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        ))"},{"line_number":183,"context_line":"        return self.client.call(context, \u0027purge_deleted_zones\u0027,"},{"line_number":184,"context_line":"                                criterion\u003dcriterion, limit\u003dlimit,"},{"line_number":185,"context_line":"                                time_threshold\u003dtime_threshold)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    def count_domains(self, context, criterion\u003dNone):"},{"line_number":188,"context_line":"        LOG.info(_LI(\"count_domains: Calling central\u0027s count_domains.\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_8ce52a0a","line":185,"in_reply_to":"1a4dcd0f_6bb796d8","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"d37fd29369d27ee16c712ef741204b92bcf04410","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def xfr_domain(self, context, domain_id):"},{"line_number":511,"context_line":"        LOG.info(_LI(\"xfr_domain: Calling central\u0027s xfr_domain\"))"},{"line_number":512,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00275.4\u0027)"},{"line_number":513,"context_line":"        return cctxt.call(context, \u0027xfr_domain\u0027, domain_id\u003ddomain_id)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    # Zone Import Methods"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_4d19f978","line":512,"updated":"2015-09-01 15:03:04.000000000","message":"this should not change -  the method signature is the same as 5.3","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"956868d558f909129f74de5a3c94726f0172b411","unresolved":false,"context_lines":[{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    def xfr_domain(self, context, domain_id):"},{"line_number":511,"context_line":"        LOG.info(_LI(\"xfr_domain: Calling central\u0027s xfr_domain\"))"},{"line_number":512,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00275.4\u0027)"},{"line_number":513,"context_line":"        return cctxt.call(context, \u0027xfr_domain\u0027, domain_id\u003ddomain_id)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    # Zone Import Methods"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_b8fc9073","line":512,"in_reply_to":"da20952f_4d19f978","updated":"2015-09-01 16:38:55.000000000","message":"Done","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"}],"designate/central/service.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    return outer"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"class Service(service.RPCService, service.Service):"},{"line_number":255,"context_line":"    RPC_API_VERSION \u003d \u00275.2\u0027"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_abc59e3c","line":254,"updated":"2015-08-05 12:27:04.000000000","message":"This should bump to 5.3, same reasons as the rpcclient comments.","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    return outer"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"class Service(service.RPCService, service.Service):"},{"line_number":255,"context_line":"    RPC_API_VERSION \u003d \u00275.2\u0027"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_abe2ac2d","line":254,"in_reply_to":"1a4dcd0f_abc59e3c","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"        return domain"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"    def purge_deleted_zones(self, context, criterion\u003dNone, limit\u003dNone,"},{"line_number":1041,"context_line":"                            time_threshold\u003dNone):"},{"line_number":1042,"context_line":"        \"\"\"Purge deleted zones."},{"line_number":1043,"context_line":"        Reparent orphan childrens, if any."}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_8be1c2d2","line":1040,"updated":"2015-08-05 12:27:04.000000000","message":"As talked about in the client, I would prefer to see this as `purge_domains`","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"        return domain"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"    def purge_deleted_zones(self, context, criterion\u003dNone, limit\u003dNone,"},{"line_number":1041,"context_line":"                            time_threshold\u003dNone):"},{"line_number":1042,"context_line":"        \"\"\"Purge deleted zones."},{"line_number":1043,"context_line":"        Reparent orphan childrens, if any."}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_ab1b8cc9","line":1040,"in_reply_to":"1a4dcd0f_8be1c2d2","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"        return domain"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"    def purge_deleted_zones(self, context, criterion\u003dNone, limit\u003dNone,"},{"line_number":1041,"context_line":"                            time_threshold\u003dNone):"},{"line_number":1042,"context_line":"        \"\"\"Purge deleted zones."},{"line_number":1043,"context_line":"        Reparent orphan childrens, if any."},{"line_number":1044,"context_line":"        Transactions/locks are not needed."}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_cb458ab3","line":1041,"updated":"2015-08-05 12:27:04.000000000","message":"time_threshold should IMO just be passed in as part of the criterion, keeping this method open for other uses. e.g. - maybe I just want to manually purge a single zone by it\u0027s id","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"        return domain"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"    def purge_deleted_zones(self, context, criterion\u003dNone, limit\u003dNone,"},{"line_number":1041,"context_line":"                            time_threshold\u003dNone):"},{"line_number":1042,"context_line":"        \"\"\"Purge deleted zones."},{"line_number":1043,"context_line":"        Reparent orphan childrens, if any."},{"line_number":1044,"context_line":"        Transactions/locks are not needed."}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_c48a26bf","line":1041,"in_reply_to":"1a4dcd0f_cb458ab3","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":1082,"context_line":"                        elevated_context,"},{"line_number":1083,"context_line":"                        cz,"},{"line_number":1084,"context_line":"                        True,"},{"line_number":1085,"context_line":"                    )"},{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"            self.storage.purge_zone(context, zone)"},{"line_number":1088,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_0b5b7255","line":1085,"updated":"2015-08-05 12:27:04.000000000","message":"I suspect this re-parenting code should move into the Storage layer, and, can likely be done with 1 (well, 2) queries and no iteration.\n\nAssuming we\u0027re deleting a zone \"ZZZ\", fetch the zone to find it\u0027s parent_domain_id, then:\n\n    UPDATE domains SET parent_domain_id \u003d ZZZ.parent_domain_id WHERE parent_domain_id \u003d ZZZ.id;\n\nif \"ZZZ\"\u0027s parent_domain_id has a value, or is NULL, this should work correctly for hierarchies of zones etc. From within the storage layer, we can construct a query like this easily enough.","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"43f008f97a7a19ac0511bb8f8686e9ae6058cc5f","unresolved":false,"context_lines":[{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"        return domain"},{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"    def purge_domains(self, context, criterion\u003dNone, limit\u003dNone):"},{"line_number":1050,"context_line":"        \"\"\"Purge deleted zones."},{"line_number":1051,"context_line":"        Reparent orphan childrens, if any."},{"line_number":1052,"context_line":"        Transactions/locks are not needed."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_aa8d61d4","line":1049,"updated":"2015-08-12 11:54:55.000000000","message":"criterion should IMO always be required for this call, we\u0027ll likely never want a \"delete everything in the database\" call :)","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"43f008f97a7a19ac0511bb8f8686e9ae6058cc5f","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"    def purge_domains(self, context, criterion\u003dNone, limit\u003dNone):"},{"line_number":1050,"context_line":"        \"\"\"Purge deleted zones."},{"line_number":1051,"context_line":"        Reparent orphan childrens, if any."},{"line_number":1052,"context_line":"        Transactions/locks are not needed."},{"line_number":1053,"context_line":"        \"\"\""},{"line_number":1054,"context_line":"        try:"},{"line_number":1055,"context_line":"            time_threshold \u003d criterion.pop(\u0027time_threshold\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_75b65a3f","line":1052,"updated":"2015-08-12 11:54:55.000000000","message":"Somewhere here in the method, we\u0027ll want to add a new policy check for purge domains, the policy.json should be updated to set purge_domains as admin only.","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"43f008f97a7a19ac0511bb8f8686e9ae6058cc5f","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"        try:"},{"line_number":1055,"context_line":"            time_threshold \u003d criterion.pop(\u0027time_threshold\u0027)"},{"line_number":1056,"context_line":"        except KeyError:"},{"line_number":1057,"context_line":"            raise exceptions.ValueError(\"time_threshold is required\")"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        elevated_context \u003d context.elevated()"},{"line_number":1060,"context_line":"        elevated_context.all_tenants \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_8ae2e59e","line":1057,"updated":"2015-08-12 11:54:55.000000000","message":"So, I probably should have been clearer on my last comment :) I think this method should be usable to purge zones regardless of if they meet a time_threshold, the time_threshold piece is part of the ZM Task, so this + the criterion handling below should IMO move to there.. i.e. This method should just purge whatever zones match the supplied criterion.","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"d8c3f85db282321283bd09423c96e952ed9aea6f","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"        try:"},{"line_number":1055,"context_line":"            time_threshold \u003d criterion.pop(\u0027time_threshold\u0027)"},{"line_number":1056,"context_line":"        except KeyError:"},{"line_number":1057,"context_line":"            raise exceptions.ValueError(\"time_threshold is required\")"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        elevated_context \u003d context.elevated()"},{"line_number":1060,"context_line":"        elevated_context.all_tenants \u003d True"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_d20172b0","line":1057,"in_reply_to":"1a4dcd0f_8ae2e59e","updated":"2015-08-13 16:00:10.000000000","message":"Done","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"43f008f97a7a19ac0511bb8f8686e9ae6058cc5f","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"            raise exceptions.ValueError(\"time_threshold is required\")"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        elevated_context \u003d context.elevated()"},{"line_number":1060,"context_line":"        elevated_context.all_tenants \u003d True"},{"line_number":1061,"context_line":"        if limit is None:"},{"line_number":1062,"context_line":"            LOG.info(_LI(\"Performing purge with no limit\"))"},{"line_number":1063,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_4a329d11","line":1060,"updated":"2015-08-12 11:54:55.000000000","message":"This should also, IMO, move to the ZM task. It\u0027s needed due to the fact that the ZM Task is acting on behalf of all tenants/projects..","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"d8c3f85db282321283bd09423c96e952ed9aea6f","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"            raise exceptions.ValueError(\"time_threshold is required\")"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        elevated_context \u003d context.elevated()"},{"line_number":1060,"context_line":"        elevated_context.all_tenants \u003d True"},{"line_number":1061,"context_line":"        if limit is None:"},{"line_number":1062,"context_line":"            LOG.info(_LI(\"Performing purge with no limit\"))"},{"line_number":1063,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_72273e63","line":1060,"in_reply_to":"1a4dcd0f_4a329d11","updated":"2015-08-13 16:00:10.000000000","message":"Done","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"d37fd29369d27ee16c712ef741204b92bcf04410","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        \"\"\""},{"line_number":1060,"context_line":"        policy.check(\u0027purge_domains\u0027, context, criterion)"},{"line_number":1061,"context_line":"        if not criterion:"},{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit\"))"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_cd44291d","line":1062,"updated":"2015-09-01 15:03:04.000000000","message":"not sure if we should be doing this check - we do not do it anywhere else","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"956868d558f909129f74de5a3c94726f0172b411","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        \"\"\""},{"line_number":1060,"context_line":"        policy.check(\u0027purge_domains\u0027, context, criterion)"},{"line_number":1061,"context_line":"        if not criterion:"},{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit\"))"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_f8d1a830","line":1062,"in_reply_to":"da20952f_cd44291d","updated":"2015-09-01 16:38:55.000000000","message":"Purging is more risky than other operations - it deletes stuff - and it\u0027s used infrequently enough that the performance impact of a condition check is negligible.","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"d37fd29369d27ee16c712ef741204b92bcf04410","unresolved":false,"context_lines":[{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit\"))"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"        return self.storage.purge_domains(context, criterion, limit)"},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_ada3f5ff","line":1065,"updated":"2015-09-01 15:03:04.000000000","message":"this should be a log debug of \"Performing purge with limit of blah\" in all cases.","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"956868d558f909129f74de5a3c94726f0172b411","unresolved":false,"context_lines":[{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit\"))"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"        return self.storage.purge_domains(context, criterion, limit)"},{"line_number":1068,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_d885c407","line":1065,"in_reply_to":"da20952f_ada3f5ff","updated":"2015-09-01 16:38:55.000000000","message":"Done","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"02b600764cf734454748e63556532ea872b9dd64","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        \"\"\""},{"line_number":1060,"context_line":"        policy.check(\u0027purge_domains\u0027, context, criterion)"},{"line_number":1061,"context_line":"        if not criterion:"},{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit of %r\") % criterion)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_c1903a51","line":1062,"updated":"2015-09-02 15:16:36.000000000","message":"Its not a problem with the performance impact - we dont require it anywhere else like this.\n\nIf it is required, do not make it a kwarg","commit_id":"f507d397052bd6dcf4b4e86078b69bf8413ae428"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"99daab0628d8d6832ec7d6e8410effaabc7992f4","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        \"\"\""},{"line_number":1060,"context_line":"        policy.check(\u0027purge_domains\u0027, context, criterion)"},{"line_number":1061,"context_line":"        if not criterion:"},{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit of %r\") % criterion)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_4708bad9","line":1062,"in_reply_to":"da20952f_c1903a51","updated":"2015-09-02 15:50:58.000000000","message":"I agree with G here - the standard API is criterion is optional, we should keep that the same here IMO","commit_id":"f507d397052bd6dcf4b4e86078b69bf8413ae428"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"02b600764cf734454748e63556532ea872b9dd64","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"        if not criterion:"},{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit of %r\") % criterion)"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"        return self.storage.purge_domains(context, criterion, limit)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_c1f35a9e","line":1064,"updated":"2015-09-02 15:16:36.000000000","message":"we should log in debug regardless of the limit.\n\nie these 2 lines should be replaced with:\n\n  LOG.debug(\"Performing purge with limit of %r and criterion of %r\" % limit, criterion)","commit_id":"f507d397052bd6dcf4b4e86078b69bf8413ae428"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"99daab0628d8d6832ec7d6e8410effaabc7992f4","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"        if not criterion:"},{"line_number":1062,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"        if limit is None:"},{"line_number":1065,"context_line":"            LOG.info(_LI(\"Performing purge with no limit of %r\") % criterion)"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"        return self.storage.purge_domains(context, criterion, limit)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_0712c209","line":1064,"in_reply_to":"da20952f_c1f35a9e","updated":"2015-09-02 15:50:58.000000000","message":"++","commit_id":"f507d397052bd6dcf4b4e86078b69bf8413ae428"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b1c1f64bc509aa2808bce7407e65bd2646e65c53","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"        \"\"\""},{"line_number":1065,"context_line":"        policy.check(\u0027purge_domains\u0027, context, criterion)"},{"line_number":1066,"context_line":"        if not criterion:"},{"line_number":1067,"context_line":"            raise exceptions.BadRequest(\"A criterion is required\")"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"        LOG.debug(\"Performing purge with limit of %r and criterion of %r\""},{"line_number":1070,"context_line":"                  % (limit, criterion))"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_ae6bebb8","line":1067,"updated":"2015-09-08 11:40:47.000000000","message":"I still don\u0027t like this ;\u0027) But, if we need to change it later, that\u0027s fine.. we can do that easily..","commit_id":"d0595c5a908f7cbedab91b7998d10d4dbe1bdc47"}],"designate/sqlalchemy/base.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        return _set_object_from_model(obj, resultproxy.fetchone())"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def _delete(self, context, table, obj, exc_notfound):"},{"line_number":491,"context_line":"        \"\"\"Perform domain soft-delete"},{"line_number":492,"context_line":"        \"\"\""},{"line_number":493,"context_line":"        if hasattr(table.c, \u0027deleted\u0027):"},{"line_number":494,"context_line":"            # Perform a Soft Delete"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_26ac659f","line":491,"updated":"2015-08-05 12:27:04.000000000","message":"This is generic soft delete, rather than domain specific.","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        return _set_object_from_model(obj, resultproxy.fetchone())"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def _delete(self, context, table, obj, exc_notfound):"},{"line_number":491,"context_line":"        \"\"\"Perform domain soft-delete"},{"line_number":492,"context_line":"        \"\"\""},{"line_number":493,"context_line":"        if hasattr(table.c, \u0027deleted\u0027):"},{"line_number":494,"context_line":"            # Perform a Soft Delete"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_9ce29c2e","line":491,"in_reply_to":"1a4dcd0f_26ac659f","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"43f008f97a7a19ac0511bb8f8686e9ae6058cc5f","unresolved":false,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def _delete(self, context, table, obj, exc_notfound):"},{"line_number":495,"context_line":"        \"\"\"Perform item soft-delete. Set the \"status\" column to \"DELETED\""},{"line_number":496,"context_line":"        and populate the \"deleted_at\" column"},{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        if hasattr(table.c, \u0027deleted\u0027):"},{"line_number":499,"context_line":"            # Perform a Soft Delete"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_3589b226","line":496,"updated":"2015-08-12 11:54:55.000000000","message":"This isn\u0027t (always) accurate.. Only if the table has a \"deleted\" column do we perform a soft delete :)","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"d8c3f85db282321283bd09423c96e952ed9aea6f","unresolved":false,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def _delete(self, context, table, obj, exc_notfound):"},{"line_number":495,"context_line":"        \"\"\"Perform item soft-delete. Set the \"status\" column to \"DELETED\""},{"line_number":496,"context_line":"        and populate the \"deleted_at\" column"},{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        if hasattr(table.c, \u0027deleted\u0027):"},{"line_number":499,"context_line":"            # Perform a Soft Delete"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_feb562ec","line":496,"in_reply_to":"1a4dcd0f_3589b226","updated":"2015-08-13 16:00:10.000000000","message":"Done","commit_id":"7d9dbd1296cd0c2d653fe5f8a07a8acaa03babdf"}],"designate/storage/base.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @abc.abstractmethod"},{"line_number":291,"context_line":"    def purge_zone(self, context, zone):"},{"line_number":292,"context_line":"        \"\"\""},{"line_number":293,"context_line":"        Purge a Domain"},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_66902d44","line":291,"updated":"2015-08-05 12:27:04.000000000","message":"Can we call this purge_domain? Internally, most everything is still called domain. We\u0027ll do a refactor at the beginning of the next cycle to change it all at once!","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    @abc.abstractmethod"},{"line_number":291,"context_line":"    def purge_zone(self, context, zone):"},{"line_number":292,"context_line":"        \"\"\""},{"line_number":293,"context_line":"        Purge a Domain"},{"line_number":294,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_c6ca8f4f","line":291,"in_reply_to":"1a4dcd0f_66902d44","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        :param marker: Resource ID from which after the requested page will"},{"line_number":417,"context_line":"        start after"},{"line_number":418,"context_line":"        :param limit: Integer limit of objects of the page size after the"},{"line_number":419,"context_line":"        marker"},{"line_number":420,"context_line":"        :param sort_key: Key from which to sort after."},{"line_number":421,"context_line":"        :param sort_dir: Direction to sort after using sort_key."},{"line_number":422,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_a6c5d53c","line":419,"updated":"2015-08-05 12:27:04.000000000","message":"Any reason for these changes? They make the comments harder to read  :)","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        :param marker: Resource ID from which after the requested page will"},{"line_number":417,"context_line":"        start after"},{"line_number":418,"context_line":"        :param limit: Integer limit of objects of the page size after the"},{"line_number":419,"context_line":"        marker"},{"line_number":420,"context_line":"        :param sort_key: Key from which to sort after."},{"line_number":421,"context_line":"        :param sort_dir: Direction to sort after using sort_key."},{"line_number":422,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_015aa183","line":419,"in_reply_to":"1a4dcd0f_a6c5d53c","updated":"2015-08-12 10:50:27.000000000","message":"Flake8 was complaining - fixed.","commit_id":"119788379cfbe3085305544faf1a700da4be2238"}],"designate/storage/impl_sqlalchemy/__init__.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        \"\"\"Effectively remove a zone database record."},{"line_number":382,"context_line":"        \"\"\""},{"line_number":383,"context_line":"        return self._delete(context, tables.domains, zone,"},{"line_number":384,"context_line":"                            exceptions.DomainNotFound)"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def count_domains(self, context, criterion\u003dNone):"},{"line_number":387,"context_line":"        query \u003d select([func.count(tables.domains.c.id)])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_265b0589","line":384,"updated":"2015-08-05 12:27:04.000000000","message":"I\u0027m guessing this is a stub? We should implement a _purge all the way down into the sqlalchemy/base.py module, possibly refactoring the _delete method to use it if the table doesn\u0027t have a \"deleted\" column","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2c1fad15d316420f27d0ff105f15d7500250d558","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        \"\"\"Effectively remove a zone database record."},{"line_number":383,"context_line":"        \"\"\""},{"line_number":384,"context_line":"        return self._delete(context, tables.domains, zone,"},{"line_number":385,"context_line":"                            exceptions.DomainNotFound, force_delete\u003dTrue)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def purge_domains(self, context, criterion, limit):"},{"line_number":388,"context_line":"        \"\"\"Purge deleted zones."}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_718625ba","line":385,"updated":"2015-08-13 15:40:16.000000000","message":"I think I\u0027d prefer to see `force_delete` called `hard_delete`, so as to give some indication that it\u0027s preventing a \"soft delete\"","commit_id":"1e7cd79a63f30ddc6aeaab1313008a955672ac4e"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"7e49fbfbadbf02c1cf0442abe20fd62ed5450ae8","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        \"\"\"Effectively remove a zone database record."},{"line_number":383,"context_line":"        \"\"\""},{"line_number":384,"context_line":"        return self._delete(context, tables.domains, zone,"},{"line_number":385,"context_line":"                            exceptions.DomainNotFound, force_delete\u003dTrue)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def purge_domains(self, context, criterion, limit):"},{"line_number":388,"context_line":"        \"\"\"Purge deleted zones."}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_6c23ac05","line":385,"in_reply_to":"1a4dcd0f_718625ba","updated":"2015-08-13 15:59:46.000000000","message":"Done","commit_id":"1e7cd79a63f30ddc6aeaab1313008a955672ac4e"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2c1fad15d316420f27d0ff105f15d7500250d558","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            # Reparent child zones"},{"line_number":409,"context_line":"            query \u003d tables.domains.update().\\"},{"line_number":410,"context_line":"                where(tables.domains.c.parent_domain_id \u003d\u003d zone.id).\\"},{"line_number":411,"context_line":"                values(parent_domain_id\u003dNone)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"            resultproxy \u003d self.session.execute(query)"},{"line_number":414,"context_line":"            LOG.debug(_LI(\"%d child zones updated\"), resultproxy.rowcount)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_8c6b98b8","line":411,"updated":"2015-08-13 15:40:16.000000000","message":"This should be:\n\n    values(parent_domain_id\u003dzone.parent_domain_id)\n\nto account for cases where there is a chain of 3 zones, and the middle one is being deleted.","commit_id":"1e7cd79a63f30ddc6aeaab1313008a955672ac4e"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"d37fd29369d27ee16c712ef741204b92bcf04410","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        that does not belong to \"zones_by_id\""},{"line_number":390,"context_line":"        :returns: parent zone ID or None"},{"line_number":391,"context_line":"        \"\"\""},{"line_number":392,"context_line":"        max_steps \u003d 64"},{"line_number":393,"context_line":"        while current.parent_domain_id in zones_by_id:"},{"line_number":394,"context_line":"            current \u003d zones_by_id[current.parent_domain_id]"},{"line_number":395,"context_line":"            max_steps -\u003d 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_0d30e19d","line":392,"updated":"2015-09-01 15:03:04.000000000","message":"this should probably be a constant","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"956868d558f909129f74de5a3c94726f0172b411","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        that does not belong to \"zones_by_id\""},{"line_number":390,"context_line":"        :returns: parent zone ID or None"},{"line_number":391,"context_line":"        \"\"\""},{"line_number":392,"context_line":"        max_steps \u003d 64"},{"line_number":393,"context_line":"        while current.parent_domain_id in zones_by_id:"},{"line_number":394,"context_line":"            current \u003d zones_by_id[current.parent_domain_id]"},{"line_number":395,"context_line":"            max_steps -\u003d 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_f82a082f","line":392,"in_reply_to":"da20952f_0d30e19d","updated":"2015-09-01 16:38:55.000000000","message":"Done","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"}],"designate/tests/__init__.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2fa229547c54c940605ef31ec422b504007d34cb","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        _values \u003d copy.copy(self.domain_fixtures[domain_type][fixture])"},{"line_number":438,"context_line":"        if values:"},{"line_number":439,"context_line":"            _values.update(values)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        return _values"},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_6696edf1","line":439,"updated":"2015-08-05 12:27:04.000000000","message":"Any reason for the change here? Even if it\u0027s more efficient, it\u0027s best to keep them all the same - and refactor this as it\u0027s own change later.","commit_id":"119788379cfbe3085305544faf1a700da4be2238"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"c8eb031cf331e6c586902af165cfae19b28f154c","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        _values \u003d copy.copy(self.domain_fixtures[domain_type][fixture])"},{"line_number":438,"context_line":"        if values:"},{"line_number":439,"context_line":"            _values.update(values)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        return _values"},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_902fdda0","line":439,"in_reply_to":"1a4dcd0f_6696edf1","updated":"2015-08-12 10:50:27.000000000","message":"Done","commit_id":"119788379cfbe3085305544faf1a700da4be2238"}],"designate/tests/test_central/test_service.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"2c1fad15d316420f27d0ff105f15d7500250d558","unresolved":false,"context_lines":[{"line_number":980,"context_line":"    def _count_all_domains(self):"},{"line_number":981,"context_line":"        \"\"\"Count ALL domains including deleted ones"},{"line_number":982,"context_line":"        \"\"\""},{"line_number":983,"context_line":"        query \u003d \"SELECT count(domains.id) FROM domains\""},{"line_number":984,"context_line":"        result \u003d self.central_service.storage.session.execute(query).fetchone()"},{"line_number":985,"context_line":"        return result[0] if result else 0"},{"line_number":986,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_ccd44021","line":983,"updated":"2015-08-13 15:40:16.000000000","message":"I\u0027m not sure about the raw SQL in the tests, in theory, we should be able to execute against MySQL/Postgres/SQLite etc.. But we\u0027ll ignore it for now :)","commit_id":"1e7cd79a63f30ddc6aeaab1313008a955672ac4e"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"7e49fbfbadbf02c1cf0442abe20fd62ed5450ae8","unresolved":false,"context_lines":[{"line_number":980,"context_line":"    def _count_all_domains(self):"},{"line_number":981,"context_line":"        \"\"\"Count ALL domains including deleted ones"},{"line_number":982,"context_line":"        \"\"\""},{"line_number":983,"context_line":"        query \u003d \"SELECT count(domains.id) FROM domains\""},{"line_number":984,"context_line":"        result \u003d self.central_service.storage.session.execute(query).fetchone()"},{"line_number":985,"context_line":"        return result[0] if result else 0"},{"line_number":986,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_e77d97e7","line":983,"in_reply_to":"1a4dcd0f_ccd44021","updated":"2015-08-13 15:59:46.000000000","message":"Done","commit_id":"1e7cd79a63f30ddc6aeaab1313008a955672ac4e"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"e19e8b564cdd12b32cacc665cf8ddb871cabbef6","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import mock"},{"line_number":24,"context_line":"import testtools"},{"line_number":25,"context_line":"from testtools.matchers import GreaterThan"},{"line_number":26,"context_line":"from testtools import ExpectedException as raises  # with raises(...): ..."},{"line_number":27,"context_line":"from oslo_config import cfg"},{"line_number":28,"context_line":"from oslo_log import log as logging"},{"line_number":29,"context_line":"from oslo_db import exception as db_exception"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_5f71a376","line":26,"updated":"2015-09-01 14:33:21.000000000","message":"We use this elsewhere in the tests as:\n\n    with testtools.ExpectedException(..):\n\nIdeally, we should keep the usage consistent. I took a double take on the usage of this code and had to go digging, rather than instantly knowing what was being done...","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"},{"author":{"_account_id":16962,"name":"Federico Ceratto","email":"federico.ceratto@gmail.com","username":"ceratto"},"change_message_id":"956868d558f909129f74de5a3c94726f0172b411","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import mock"},{"line_number":24,"context_line":"import testtools"},{"line_number":25,"context_line":"from testtools.matchers import GreaterThan"},{"line_number":26,"context_line":"from testtools import ExpectedException as raises  # with raises(...): ..."},{"line_number":27,"context_line":"from oslo_config import cfg"},{"line_number":28,"context_line":"from oslo_log import log as logging"},{"line_number":29,"context_line":"from oslo_db import exception as db_exception"}],"source_content_type":"text/x-python","patch_set":8,"id":"da20952f_289273f7","line":26,"in_reply_to":"da20952f_5f71a376","updated":"2015-09-01 16:38:55.000000000","message":"Done","commit_id":"1a77ba1bc4a8f60022203af9379d0d2a806513e7"}]}
