)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c8abe59934dbaa6e1cbbf8612187bad3dfc23539","unresolved":false,"context_lines":[{"line_number":10,"context_line":"types - don\u0027t provide any notification events when certain operations"},{"line_number":11,"context_line":"are fired on them. This patch includes following events that will be"},{"line_number":12,"context_line":"triggered when necessary:"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"* meta_namespace.create - namespace has been created"},{"line_number":15,"context_line":"* meta_namespace.update - namespace has been updated"},{"line_number":16,"context_line":"* meta_namespace.delete - namespace has been deleted"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a930d6b_703b6ad1","line":13,"updated":"2015-01-23 05:37:58.000000000","message":"Should be metadef_ instead of meta_.  metadef is the term agreed to in juno and is used throughout the existing code base.  meta can be confused with the actual meta instances.  Similar changes throughout code.","commit_id":"ab130fd384b4d964c135e954270ffe16b69bce28"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"bef395222f5160878ffd6417ffeec17ee96ea780","unresolved":false,"context_lines":[{"line_number":10,"context_line":"types - don\u0027t provide any notification events when certain operations"},{"line_number":11,"context_line":"are fired on them. This patch includes following events that will be"},{"line_number":12,"context_line":"triggered when necessary:"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"* meta_namespace.create - namespace has been created"},{"line_number":15,"context_line":"* meta_namespace.update - namespace has been updated"},{"line_number":16,"context_line":"* meta_namespace.delete - namespace has been deleted"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a930d6b_051493f3","line":13,"in_reply_to":"1a930d6b_703b6ad1","updated":"2015-01-23 15:59:29.000000000","message":"Done","commit_id":"ab130fd384b4d964c135e954270ffe16b69bce28"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c8abe59934dbaa6e1cbbf8612187bad3dfc23539","unresolved":false,"context_lines":[{"line_number":28,"context_line":"namespace"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Change-Id: Ie1635793d80188f8f7a07aea91b9f0842900ffa6"},{"line_number":31,"context_line":"Implements: blueprint catalog-index-service"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a930d6b_b035d2db","line":31,"updated":"2015-01-23 05:37:58.000000000","message":"change to blueprint metadefs-notifications\n\nSee: https://blueprints.launchpad.net/glance/+spec/metadefs-notifications","commit_id":"ab130fd384b4d964c135e954270ffe16b69bce28"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"bef395222f5160878ffd6417ffeec17ee96ea780","unresolved":false,"context_lines":[{"line_number":28,"context_line":"namespace"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Change-Id: Ie1635793d80188f8f7a07aea91b9f0842900ffa6"},{"line_number":31,"context_line":"Implements: blueprint catalog-index-service"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a930d6b_25fa6fbd","line":31,"in_reply_to":"1a930d6b_b035d2db","updated":"2015-01-23 15:59:29.000000000","message":"Done","commit_id":"ab130fd384b4d964c135e954270ffe16b69bce28"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1b24c342d718987aec172fb82a8cb6842b64a96c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"namespace"},{"line_number":38,"context_line":"* metadef_resource_type.delete - resource type has been removed from"},{"line_number":39,"context_line":"namespace"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Additionally new configuration option has been added to allow for"},{"line_number":42,"context_line":"disabling either individual or group of notifications."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"9a80dd14_1d200c9a","line":40,"updated":"2015-03-09 20:13:51.000000000","message":"Please add the dependency Change ID ( Iaa771ead0114e3941667b1e07ff32472d2f77afd ) that addresses the bug 1413861 mentioned in the spec https://review.openstack.org/#/c/149500/3/specs/kilo/metadefs-notifications.rst.\n\nhttps://review.openstack.org/#q,Iaa771ead0114e3941667b1e07ff32472d2f77afd,n,z","commit_id":"29a45876071d1f09d771aea2660287e71cfd2870"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"753f9674d188d0761b9fb85b1fb3b8f8284a9275","unresolved":false,"context_lines":[{"line_number":37,"context_line":"namespace"},{"line_number":38,"context_line":"* metadef_resource_type.delete - resource type has been removed from"},{"line_number":39,"context_line":"namespace"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Additionally new configuration option has been added to allow for"},{"line_number":42,"context_line":"disabling either individual or group of notifications."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"9a80dd14_42f17394","line":40,"in_reply_to":"9a80dd14_1d200c9a","updated":"2015-03-11 10:14:21.000000000","message":"Done","commit_id":"29a45876071d1f09d771aea2660287e71cfd2870"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1b24c342d718987aec172fb82a8cb6842b64a96c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"namespace"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Additionally new configuration option has been added to allow for"},{"line_number":42,"context_line":"disabling either individual or group of notifications."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Change-Id: Ie1635793d80188f8f7a07aea91b9f0842900ffa6"},{"line_number":45,"context_line":"Implements: blueprint metadefs-notifications"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"9a80dd14_9a57a225","line":42,"updated":"2015-03-09 20:13:51.000000000","message":"DocImpact\nUpgradeImpact\n\nthese flags seem necessary.\n\nhttp://docs.openstack.org/infra/manual/developers.html#peer-review","commit_id":"29a45876071d1f09d771aea2660287e71cfd2870"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"753f9674d188d0761b9fb85b1fb3b8f8284a9275","unresolved":false,"context_lines":[{"line_number":39,"context_line":"namespace"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Additionally new configuration option has been added to allow for"},{"line_number":42,"context_line":"disabling either individual or group of notifications."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Change-Id: Ie1635793d80188f8f7a07aea91b9f0842900ffa6"},{"line_number":45,"context_line":"Implements: blueprint metadefs-notifications"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"9a80dd14_62ee77b6","line":42,"in_reply_to":"9a80dd14_9a57a225","updated":"2015-03-11 10:14:21.000000000","message":"Done","commit_id":"29a45876071d1f09d771aea2660287e71cfd2870"}],"doc/source/configuring.rst":[{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"74677f99968879727cf94ade8ce86fad56aea0d4","unresolved":false,"context_lines":[{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"List of disabled notifications. Notification can be given either as"},{"line_number":1288,"context_line":"notification type to disable single event or notification group prefix"},{"line_number":1289,"context_line":"to disable all events within group."},{"line_number":1290,"context_line":""},{"line_number":1291,"context_line":"Example: if this config option is set to [\"image.create\", \"metadef_namespace\"],"},{"line_number":1292,"context_line":"then \"image.create\" notification will not be sent after image is created and"}],"source_content_type":"text/x-rst","patch_set":14,"id":"da86d52c_a51e900b","line":1289,"updated":"2015-02-16 16:52:13.000000000","message":"A couple minor changes might make this more clear:\n\nList of disabled notifications.  A notification can be given either as a notification type to disable a single event, or as a notification group prefix to disable all events within a group.","commit_id":"9941dc93739bf10e6efd97a609ee85e0e09da094"}],"glance/api/v2/metadef_tags.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d175b905bb43b2c467bd6d7b628b2f64c6d6eadb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.notifier \u003d notifier or glance.notifier.Notifier()"},{"line_number":48,"context_line":"        self.gateway \u003d glance.gateway.Gateway(db_api\u003dself.db_api,"},{"line_number":49,"context_line":"                                              policy_enforcer\u003dself.policy,"},{"line_number":50,"context_line":"                                              notifier\u003dself.notifier)"},{"line_number":51,"context_line":"        self.tag_schema_link \u003d \u0027/v2/schemas/metadefs/tag\u0027"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def create(self, req, metadata_tag, namespace):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_1008fd90","line":50,"updated":"2015-01-27 05:54:10.000000000","message":"Can you move this param to be ahead of policy_enforcer, as the order of Gateway.__init__() defined.\n\nSame idea for other changed Controllers in this patch.","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"24279ee5f8b9f87c7b55cfd919acf282395c89bc","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.notifier \u003d notifier or glance.notifier.Notifier()"},{"line_number":48,"context_line":"        self.gateway \u003d glance.gateway.Gateway(db_api\u003dself.db_api,"},{"line_number":49,"context_line":"                                              policy_enforcer\u003dself.policy,"},{"line_number":50,"context_line":"                                              notifier\u003dself.notifier)"},{"line_number":51,"context_line":"        self.tag_schema_link \u003d \u0027/v2/schemas/metadefs/tag\u0027"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def create(self, req, metadata_tag, namespace):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_8e8a0962","line":50,"in_reply_to":"1a930d6b_1008fd90","updated":"2015-01-27 15:01:25.000000000","message":"Done","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"}],"glance/db/simple/api.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"67f35a134c4bb1f5ccefd5796f7001e27a772d12","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"    return object"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"def metadef_object_delete_namespace_content(context, namespace_name,"},{"line_number":1378,"context_line":"                                            session\u003dNone):"},{"line_number":1379,"context_line":"    \"\"\"Delete an object or raise if namespace or object doesn\u0027t exist.\"\"\""},{"line_number":1380,"context_line":"    global DATA"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba7be1f8_5c4fe133","line":1377,"updated":"2015-02-26 07:00:11.000000000","message":"I think we missed some test cases to cover these three db api in original code, so would you mind add them in this patch as well due to you added them at here. I\u0027m OK to use a separated patch to do this if function within this change works fine.","commit_id":"b604180f13d030e512feb3bbc7f59da98867080f"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"53d82b104801d7aaae0c5184196282c6cfd4d90e","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"    return object"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"def metadef_object_delete_namespace_content(context, namespace_name,"},{"line_number":1378,"context_line":"                                            session\u003dNone):"},{"line_number":1379,"context_line":"    \"\"\"Delete an object or raise if namespace or object doesn\u0027t exist.\"\"\""},{"line_number":1380,"context_line":"    global DATA"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba7be1f8_b688f471","line":1377,"in_reply_to":"ba7be1f8_5c4fe133","updated":"2015-02-26 09:54:39.000000000","message":"I\u0027ve needed those three methods to be able to test notifications for deleting all properties/objects/tags from namespace. It looks like you are right and we should provide some wider range of unittests for it. I will handle it in the next patchset.","commit_id":"b604180f13d030e512feb3bbc7f59da98867080f"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"1751b8f56a245d308160cc8bdb659154f40dd220","unresolved":false,"context_lines":[{"line_number":1374,"context_line":"    return object"},{"line_number":1375,"context_line":""},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"def metadef_object_delete_namespace_content(context, namespace_name,"},{"line_number":1378,"context_line":"                                            session\u003dNone):"},{"line_number":1379,"context_line":"    \"\"\"Delete an object or raise if namespace or object doesn\u0027t exist.\"\"\""},{"line_number":1380,"context_line":"    global DATA"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba7be1f8_43c29953","line":1377,"in_reply_to":"ba7be1f8_b688f471","updated":"2015-02-26 10:46:55.000000000","message":"Done","commit_id":"b604180f13d030e512feb3bbc7f59da98867080f"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"dd7324a84253713de5e0f452025a54556a4b08fc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"9a80dd14_34c27034","updated":"2015-03-08 17:01:31.000000000","message":"These three functions seem like they could be abstracted into something like\n\n    def _metadef_delete_namespace_content(get_func, key,\n                    context, namespace_name, session):\n        global DATA\n\n        metadefs \u003d get_func(context, namespace_name)\n        data \u003d DATA[key]\n        for def in metadefs:\n            data.remove(def)\n\n        return metadefs\n\n    def metadef_object_delete_namespace_content(context,\n                   namespace_name, session\u003dNone):\n         return _metadef_delete_namespace_content(\n            metadef_object_get_all, \u0027metadef_objects\u0027,\n            context, namespace_name, session\n         )\n\n    # etc.","commit_id":"59245a47bf4cf002738db4179c69c5e5c2897753"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"e63d91ce3b17858654e9954b95f7ef06d71aab92","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"9a80dd14_7c859805","in_reply_to":"9a80dd14_34c27034","updated":"2015-03-09 16:13:46.000000000","message":"Good one, done.","commit_id":"59245a47bf4cf002738db4179c69c5e5c2897753"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"b4bb1772d281d0851ed063efdc71979291bc5265","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"    return task_info"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"def _metadef_delete_namespace_content(get_func, key, context, namespace_name):"},{"line_number":1064,"context_line":"    global DATA"},{"line_number":1065,"context_line":"    metadefs \u003d get_func(context, namespace_name)"},{"line_number":1066,"context_line":"    data \u003d DATA[key]"}],"source_content_type":"text/x-python","patch_set":26,"id":"9a80dd14_d717d152","line":1063,"updated":"2015-03-11 15:08:07.000000000","message":"I didn\u0027t say it earlier, but thanks for doing this.","commit_id":"fd547e3717dc4a3a92c1cb2104c18608a4f4872a"}],"glance/notifier.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"42adef441abb68a65e0d5fe4bde0da426105b859","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        super(TaskStubProxy, self).__init__(task)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"class MetadefNamespaceRepoProxy(domain_proxy.MetadefNamespaceRepo):"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def __init__(self, meta_namespace_repo, context, notifier):"},{"line_number":403,"context_line":"        self.meta_namespace_repo \u003d meta_namespace_repo"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_ca765d3e","line":400,"updated":"2015-01-22 02:11:05.000000000","message":"(Nit): Seems these proxy classes have many duplicated code, so is it possible to work out a base proxy class?","commit_id":"746c0228baa951d0e0cc3eb23ac142662547eec1"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"4c304a3b479d75a93b1a4ad81398ca508761585b","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        super(TaskStubProxy, self).__init__(task)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"class MetadefNamespaceRepoProxy(domain_proxy.MetadefNamespaceRepo):"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def __init__(self, meta_namespace_repo, context, notifier):"},{"line_number":403,"context_line":"        self.meta_namespace_repo \u003d meta_namespace_repo"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_8c353ef9","line":400,"in_reply_to":"1a930d6b_ca765d3e","updated":"2015-01-22 14:50:36.000000000","message":"Tricky one. All of these classes extends different base class and the most common thing that I can think of right now is the __init__ method, which makes the same operation in Proxy, RepoProxy and FactoryProxy classes. I\u0027ve prepared some solution to decrease code duplication, but not sure about it and would like to get some feedback. Will land in separate patchset, so could be easily reverted to previous state with refactored unit tests.","commit_id":"746c0228baa951d0e0cc3eb23ac142662547eec1"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"8560504debdfb39075f04a1c7119b065c6de5de7","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def format_meta_namespace_notification(meta_namespace):"},{"line_number":118,"context_line":"    return {"},{"line_number":119,"context_line":"        \u0027id\u0027: meta_namespace.namespace_id,"},{"line_number":120,"context_line":"        \u0027display_name\u0027: meta_namespace.display_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_4a25bb07","line":117,"updated":"2015-01-23 21:49:06.000000000","message":"I wonder if, to avoid confusion, we should rename these (similar to the commit message), e.g., \n\n    def format_metadef_namespace_notification(metadef_namespace):\n        # etc.","commit_id":"29c3741bb695ec3c7474c345f60032f93f69df1b"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"fd92dd79a711d4dc3674062bae11c5330f25ed37","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def format_meta_namespace_notification(meta_namespace):"},{"line_number":118,"context_line":"    return {"},{"line_number":119,"context_line":"        \u0027id\u0027: meta_namespace.namespace_id,"},{"line_number":120,"context_line":"        \u0027display_name\u0027: meta_namespace.display_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_2e5dc315","line":117,"in_reply_to":"1a930d6b_4a25bb07","updated":"2015-01-26 11:22:13.000000000","message":"Agree, we should be consistent and stick to one naming pattern here. Done.","commit_id":"29c3741bb695ec3c7474c345f60032f93f69df1b"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"2605f71e03696779c432a600df3e32e2bb59420c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def format_meta_namespace_notification(meta_namespace):"},{"line_number":118,"context_line":"    return {"},{"line_number":119,"context_line":"        \u0027id\u0027: meta_namespace.namespace_id,"},{"line_number":120,"context_line":"        \u0027display_name\u0027: meta_namespace.display_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_64246bc5","line":117,"in_reply_to":"1a930d6b_4a25bb07","updated":"2015-01-23 23:31:59.000000000","message":"I agree with Ian.  if you look at the other code, metadef is used. I know the pep8 line length is a pain and can make the code less readable, so if that becomes a problem, using \"md\" also could work.","commit_id":"29c3741bb695ec3c7474c345f60032f93f69df1b"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"fd92dd79a711d4dc3674062bae11c5330f25ed37","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def format_meta_namespace_notification(meta_namespace):"},{"line_number":118,"context_line":"    return {"},{"line_number":119,"context_line":"        \u0027id\u0027: meta_namespace.namespace_id,"},{"line_number":120,"context_line":"        \u0027display_name\u0027: meta_namespace.display_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a930d6b_4e9dafbb","line":117,"in_reply_to":"1a930d6b_64246bc5","updated":"2015-01-26 11:22:13.000000000","message":"Done","commit_id":"29c3741bb695ec3c7474c345f60032f93f69df1b"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d175b905bb43b2c467bd6d7b628b2f64c6d6eadb","unresolved":false,"context_lines":[{"line_number":32,"context_line":"notifier_opts \u003d ["},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027default_publisher_id\u0027, default\u003d\"image.localhost\","},{"line_number":34,"context_line":"               help\u003d\u0027Default publisher_id for outgoing notifications.\u0027),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027disabled_notifications\u0027, default\u003d\"\","},{"line_number":36,"context_line":"               help\u003d\u0027Comma separated list of disabled notifications. \u0027"},{"line_number":37,"context_line":"                    \u0027Notification can be given either as notification type \u0027"},{"line_number":38,"context_line":"                    \u0027or notification group prefix.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_eb454443","line":35,"updated":"2015-01-27 05:54:10.000000000","message":"I prefer to use cfg.ListOpt instead of comma separated string.","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"24279ee5f8b9f87c7b55cfd919acf282395c89bc","unresolved":false,"context_lines":[{"line_number":32,"context_line":"notifier_opts \u003d ["},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027default_publisher_id\u0027, default\u003d\"image.localhost\","},{"line_number":34,"context_line":"               help\u003d\u0027Default publisher_id for outgoing notifications.\u0027),"},{"line_number":35,"context_line":"    cfg.StrOpt(\u0027disabled_notifications\u0027, default\u003d\"\","},{"line_number":36,"context_line":"               help\u003d\u0027Comma separated list of disabled notifications. \u0027"},{"line_number":37,"context_line":"                    \u0027Notification can be given either as notification type \u0027"},{"line_number":38,"context_line":"                    \u0027or notification group prefix.\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_ba1e1b6e","line":35,"in_reply_to":"1a930d6b_eb454443","updated":"2015-01-27 15:01:25.000000000","message":"Done","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d175b905bb43b2c467bd6d7b628b2f64c6d6eadb","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        self.context \u003d context"},{"line_number":194,"context_line":"        self.notifier \u003d notifier"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        self.proxy_class.__init__(self, repo)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class NotificationRepoProxy(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_b00ac923","line":196,"updated":"2015-01-27 05:54:10.000000000","message":"so what about rename \u0027proxy_class\u0027 to \u0027super_class\u0027? I\u0027m really confused by this due to same property means different meaning in different class, NotificationProxy .vs. NotificationRepoProxy .vs. NotificationFactoryProxy .","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"24279ee5f8b9f87c7b55cfd919acf282395c89bc","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        self.context \u003d context"},{"line_number":194,"context_line":"        self.notifier \u003d notifier"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        self.proxy_class.__init__(self, repo)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class NotificationRepoProxy(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_d9569905","line":196,"in_reply_to":"1a930d6b_b00ac923","updated":"2015-01-27 15:01:25.000000000","message":"Agree. That\u0027s for sure better name as it can be the same across different proxy classes and is more meaningful when reading the code.","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d175b905bb43b2c467bd6d7b628b2f64c6d6eadb","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class NotificationRepoProxy(object):"},{"line_number":200,"context_line":"    repo_class \u003d None"},{"line_number":201,"context_line":"    proxy_class \u003d None"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def __init__(self, repo, context, notifier):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_f000d103","line":200,"updated":"2015-01-27 05:54:10.000000000","message":"ditto, prefer to rename \u0027repo_class\u0027 to \u0027super_class\u0027.","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"24279ee5f8b9f87c7b55cfd919acf282395c89bc","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"class NotificationRepoProxy(object):"},{"line_number":200,"context_line":"    repo_class \u003d None"},{"line_number":201,"context_line":"    proxy_class \u003d None"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def __init__(self, repo, context, notifier):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_99025108","line":200,"in_reply_to":"1a930d6b_f000d103","updated":"2015-01-27 15:01:25.000000000","message":"Done","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d175b905bb43b2c467bd6d7b628b2f64c6d6eadb","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def is_notification_enabled(self, notification):"},{"line_number":219,"context_line":"        notification_group \u003d self.get_notification_group(notification)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        disabled_notifications \u003d ["},{"line_number":222,"context_line":"            n.strip() for n in CONF.disabled_notifications.split(\",\")]"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        for disabled_notification in disabled_notifications:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_2b54acfd","line":221,"updated":"2015-01-27 05:54:10.000000000","message":"As my idea at L35, we needn\u0027t to split string manually when we use list option type.","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"24279ee5f8b9f87c7b55cfd919acf282395c89bc","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def is_notification_enabled(self, notification):"},{"line_number":219,"context_line":"        notification_group \u003d self.get_notification_group(notification)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        disabled_notifications \u003d ["},{"line_number":222,"context_line":"            n.strip() for n in CONF.disabled_notifications.split(\",\")]"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        for disabled_notification in disabled_notifications:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_8e004903","line":221,"in_reply_to":"1a930d6b_2b54acfd","updated":"2015-01-27 15:01:25.000000000","message":"Done","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d175b905bb43b2c467bd6d7b628b2f64c6d6eadb","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        return True"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def send_notification(self, notification_type, payload):"},{"line_number":231,"context_line":"        if self.is_notification_enabled(notification_type):"},{"line_number":232,"context_line":"            self.notifier.info(notification_type, payload)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_6b5b14f6","line":231,"updated":"2015-01-27 05:54:10.000000000","message":"So as a global option/filter logic, have you planned to change other existing Proxy, RepoProxy (and FactoryProxy if needed) classes here for other resource, e.g. ImageProxy and ImageRepoProxy to enable it really? Otherwise, IMO operator will confused on the availability of disabled_notifications option and see it as a defect..","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"24279ee5f8b9f87c7b55cfd919acf282395c89bc","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        return True"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def send_notification(self, notification_type, payload):"},{"line_number":231,"context_line":"        if self.is_notification_enabled(notification_type):"},{"line_number":232,"context_line":"            self.notifier.info(notification_type, payload)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_da0bdd21","line":231,"in_reply_to":"1a930d6b_6b5b14f6","updated":"2015-01-27 15:01:25.000000000","message":"Good point. We should handle disabled notifications list for images/tasks as well as for metadefinition objects. I\u0027ve updated rest of the classes to meet the requirement.","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d175b905bb43b2c467bd6d7b628b2f64c6d6eadb","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"class NotificationFactoryProxy(object):"},{"line_number":236,"context_line":"    factory_class \u003d None"},{"line_number":237,"context_line":"    proxy_class \u003d None"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def __init__(self, factory, context, notifier):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_ab117c53","line":236,"updated":"2015-01-27 05:54:10.000000000","message":"ditto to L200, s/factory_class/super_class","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"24279ee5f8b9f87c7b55cfd919acf282395c89bc","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"class NotificationFactoryProxy(object):"},{"line_number":236,"context_line":"    factory_class \u003d None"},{"line_number":237,"context_line":"    proxy_class \u003d None"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def __init__(self, factory, context, notifier):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a930d6b_6e05dd12","line":236,"in_reply_to":"1a930d6b_ab117c53","updated":"2015-01-27 15:01:25.000000000","message":"Done","commit_id":"1f99964c4ca58b0f7c5c76b43ceda749690c0427"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"4a71a9e844163e7101d035b67e435ed666edc2a7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"notifier_opts \u003d ["},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027default_publisher_id\u0027, default\u003d\"image.localhost\","},{"line_number":34,"context_line":"               help\u003d\u0027Default publisher_id for outgoing notifications.\u0027),"},{"line_number":35,"context_line":"    cfg.ListOpt(\u0027disabled_notifications\u0027, default\u003d[],"},{"line_number":36,"context_line":"                help\u003d\u0027List of disabled notifications. Notification can be \u0027"},{"line_number":37,"context_line":"                     \u0027given either as notification type or notification group \u0027"},{"line_number":38,"context_line":"                     \u0027prefix.\u0027),"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_4a3194eb","line":35,"updated":"2015-02-02 01:31:04.000000000","message":"Cloud you pls add a doc for this config?","commit_id":"45c8c3366ce51b777d4c4b1a9141cb8f7710f2bb"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"3744304034bf2049655113fdc4a68912fb3b6199","unresolved":false,"context_lines":[{"line_number":32,"context_line":"notifier_opts \u003d ["},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027default_publisher_id\u0027, default\u003d\"image.localhost\","},{"line_number":34,"context_line":"               help\u003d\u0027Default publisher_id for outgoing notifications.\u0027),"},{"line_number":35,"context_line":"    cfg.ListOpt(\u0027disabled_notifications\u0027, default\u003d[],"},{"line_number":36,"context_line":"                help\u003d\u0027List of disabled notifications. Notification can be \u0027"},{"line_number":37,"context_line":"                     \u0027given either as notification type or notification group \u0027"},{"line_number":38,"context_line":"                     \u0027prefix.\u0027),"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_42796f2e","line":35,"in_reply_to":"da86d52c_4a3194eb","updated":"2015-02-02 12:21:02.000000000","message":"Done","commit_id":"45c8c3366ce51b777d4c4b1a9141cb8f7710f2bb"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6cedd7779c3d8e9031433044ad10ecf6ed2b946b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"notifier_opts \u003d ["},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027default_publisher_id\u0027, default\u003d\"image.localhost\","},{"line_number":34,"context_line":"               help\u003d\u0027Default publisher_id for outgoing notifications.\u0027),"},{"line_number":35,"context_line":"    cfg.ListOpt(\u0027disabled_notifications\u0027, default\u003d[],"},{"line_number":36,"context_line":"                help\u003d\u0027List of disabled notifications. Notification can be \u0027"},{"line_number":37,"context_line":"                     \u0027given either as notification type or notification group \u0027"},{"line_number":38,"context_line":"                     \u0027prefix.\u0027),"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_e5127a61","line":35,"in_reply_to":"da86d52c_4a3194eb","updated":"2015-02-02 05:38:58.000000000","message":"Worth to have.","commit_id":"45c8c3366ce51b777d4c4b1a9141cb8f7710f2bb"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"3744304034bf2049655113fdc4a68912fb3b6199","unresolved":false,"context_lines":[{"line_number":32,"context_line":"notifier_opts \u003d ["},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027default_publisher_id\u0027, default\u003d\"image.localhost\","},{"line_number":34,"context_line":"               help\u003d\u0027Default publisher_id for outgoing notifications.\u0027),"},{"line_number":35,"context_line":"    cfg.ListOpt(\u0027disabled_notifications\u0027, default\u003d[],"},{"line_number":36,"context_line":"                help\u003d\u0027List of disabled notifications. Notification can be \u0027"},{"line_number":37,"context_line":"                     \u0027given either as notification type or notification group \u0027"},{"line_number":38,"context_line":"                     \u0027prefix.\u0027),"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_62067322","line":35,"in_reply_to":"da86d52c_e5127a61","updated":"2015-02-02 12:21:02.000000000","message":"Done","commit_id":"45c8c3366ce51b777d4c4b1a9141cb8f7710f2bb"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6cedd7779c3d8e9031433044ad10ecf6ed2b946b","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    def get_payload(self, obj):"},{"line_number":234,"context_line":"        return {}"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def send_notification(self, notification_type, payload):"},{"line_number":237,"context_line":"        send_notification(self.notifier.info, notification_type, payload)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_652f6aa2","line":236,"updated":"2015-02-02 05:38:58.000000000","message":"IMO, It would be better if we make a consistent way for *RepoProxy and *Proxy on \u0027send_notification()\u0027 and \u0027get_payload()\u0027. So we can add these two methods to above NotificationProxy (and overwrite get_payload() in follow sub-classes) or just remove this two simple wrapper functions, and calls global format_*() and send_notification() directly in sub-classes like *Proxy. I trend to go latter way, due to these two wrapper is too simple, just one line pass-call on global one. Thoughts?","commit_id":"45c8c3366ce51b777d4c4b1a9141cb8f7710f2bb"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"3744304034bf2049655113fdc4a68912fb3b6199","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    def get_payload(self, obj):"},{"line_number":234,"context_line":"        return {}"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def send_notification(self, notification_type, payload):"},{"line_number":237,"context_line":"        send_notification(self.notifier.info, notification_type, payload)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_42096f30","line":236,"in_reply_to":"da86d52c_652f6aa2","updated":"2015-02-02 12:21:02.000000000","message":"I had same concerns when modifying existing *RepoProxy, *Proxy classes, especially for images. At first I wanted to copy-paste the get_payload and send_notification method to both *RepoProxy and *Proxy, but no one likes duplicated code, huh? Agree that these wrappers are simple enough, so we can get rid off them and replace with global format_ methods as you mentioned.","commit_id":"45c8c3366ce51b777d4c4b1a9141cb8f7710f2bb"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f0a9831ce1057be6457b8833ffdfb72d73205a0e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                help\u003d\u0027List of disabled notifications. Notification can be \u0027"},{"line_number":37,"context_line":"                     \u0027given either as notification type to disable single \u0027"},{"line_number":38,"context_line":"                     \u0027event or notification group prefix to disable all \u0027"},{"line_number":39,"context_line":"                     \u0027events within group.\u0027)"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_b9ccf962","line":39,"updated":"2015-02-03 04:53:59.000000000","message":"It will be better to keep here help string be consistent with the one in glance-api.conf, thinking about auto-gen case of template configure files.","commit_id":"61614ca047e51e60f84f460bbc1a33aa3e09ea2b"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"c5c23aa632df7d286a5e90f9b2dea27387b38763","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                help\u003d\u0027List of disabled notifications. Notification can be \u0027"},{"line_number":37,"context_line":"                     \u0027given either as notification type to disable single \u0027"},{"line_number":38,"context_line":"                     \u0027event or notification group prefix to disable all \u0027"},{"line_number":39,"context_line":"                     \u0027events within group.\u0027)"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_bce78211","line":39,"in_reply_to":"da86d52c_b9ccf962","updated":"2015-02-03 09:02:59.000000000","message":"Done. What do you mean by \"auto-gen case of template configure files\"?","commit_id":"61614ca047e51e60f84f460bbc1a33aa3e09ea2b"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"b1d2a7144ec5b6642b8d6210a7f3118dce717ff9","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def get_notification_group(notification):"},{"line_number":82,"context_line":"    notification_group \u003d notification.split(\u0027.\u0027)[0]"},{"line_number":83,"context_line":"    return notification_group"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"def is_notification_enabled(notification):"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_133e94da","line":83,"updated":"2015-02-10 23:21:36.000000000","message":"It\u0027s unclear to me why you aren\u0027t just doing\n\n    return notification.split(\u0027.\u0027)[0]\n\nAnd since you only care about the first part, why not do\n\n    return notification.split(\u0027.\u0027, 1)[0]","commit_id":"40599edfd9b2055e9aac24c52743037e1847680a"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"72f8cecd291eadf1f5c03eef0a38596a104094af","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def get_notification_group(notification):"},{"line_number":82,"context_line":"    notification_group \u003d notification.split(\u0027.\u0027)[0]"},{"line_number":83,"context_line":"    return notification_group"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"def is_notification_enabled(notification):"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_2acd9631","line":83,"in_reply_to":"da86d52c_133e94da","updated":"2015-02-12 10:53:50.000000000","message":"Good change, I\u0027ve missed that split can take second optional argument.","commit_id":"40599edfd9b2055e9aac24c52743037e1847680a"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"b1d2a7144ec5b6642b8d6210a7f3118dce717ff9","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    disabled_notifications \u003d CONF.disabled_notifications"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    for disabled_notification in disabled_notifications:"},{"line_number":92,"context_line":"        if disabled_notification in [notification, notification_group]:"},{"line_number":93,"context_line":"            return False"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_ae271bb5","line":92,"updated":"2015-02-10 23:21:36.000000000","message":"Since notification and notification_group are known ahead of time, why not create the list once instead of N times? For example, why not change this to\n\n    notifications \u003d {notification, notification_group}\n\n    for disabled_notification in disabled_notifications:\n        if disabled_notification in notifications:\n            return False\n\nIt\u0027ll be slightly faster and create far fewer objects.","commit_id":"40599edfd9b2055e9aac24c52743037e1847680a"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"72f8cecd291eadf1f5c03eef0a38596a104094af","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    disabled_notifications \u003d CONF.disabled_notifications"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    for disabled_notification in disabled_notifications:"},{"line_number":92,"context_line":"        if disabled_notification in [notification, notification_group]:"},{"line_number":93,"context_line":"            return False"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_cad95a23","line":92,"in_reply_to":"da86d52c_ae271bb5","updated":"2015-02-12 10:53:50.000000000","message":"Nice catch!","commit_id":"40599edfd9b2055e9aac24c52743037e1847680a"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"b1d2a7144ec5b6642b8d6210a7f3118dce717ff9","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"def format_metadef_namespace_notification(metadef_namespace):"},{"line_number":149,"context_line":"    return {"},{"line_number":150,"context_line":"        \u0027id\u0027: metadef_namespace.namespace_id,"},{"line_number":151,"context_line":"        \u0027display_name\u0027: metadef_namespace.display_name,"},{"line_number":152,"context_line":"        \u0027namespace\u0027: metadef_namespace.namespace,"},{"line_number":153,"context_line":"        \u0027protected\u0027: metadef_namespace.protected,"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_2e3b2bd2","line":150,"updated":"2015-02-10 23:21:36.000000000","message":"Is this what Lakshmi is referencing in their code-review?","commit_id":"40599edfd9b2055e9aac24c52743037e1847680a"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"72f8cecd291eadf1f5c03eef0a38596a104094af","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"def format_metadef_namespace_notification(metadef_namespace):"},{"line_number":149,"context_line":"    return {"},{"line_number":150,"context_line":"        \u0027id\u0027: metadef_namespace.namespace_id,"},{"line_number":151,"context_line":"        \u0027display_name\u0027: metadef_namespace.display_name,"},{"line_number":152,"context_line":"        \u0027namespace\u0027: metadef_namespace.namespace,"},{"line_number":153,"context_line":"        \u0027protected\u0027: metadef_namespace.protected,"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_4a0e4ae6","line":150,"in_reply_to":"da86d52c_2e3b2bd2","updated":"2015-02-12 10:53:50.000000000","message":"Exactly. I\u0027ve just checked the API results for metadef namespaces and there are no id field in it, so we should skip it here also (same for objects, properties and tags).","commit_id":"40599edfd9b2055e9aac24c52743037e1847680a"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"74677f99968879727cf94ade8ce86fad56aea0d4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                     \u0027set to [\"image.create\", \"metadef_namespace\"], then \u0027"},{"line_number":41,"context_line":"                     \u0027\"image.create\" notification will not be sent after \u0027"},{"line_number":42,"context_line":"                     \u0027image is created and none of the notifications for \u0027"},{"line_number":43,"context_line":"                     \u0027metadefinition namespaces will be sent.\u0027),"},{"line_number":44,"context_line":"]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_2578e0f7","line":43,"updated":"2015-02-16 16:52:13.000000000","message":"If configuring.rst is updated, this should be updated too.","commit_id":"9941dc93739bf10e6efd97a609ee85e0e09da094"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"617ab5ae2258f2943a482846c00021e7c3ec595a","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        self.context \u003d context"},{"line_number":230,"context_line":"        self.notifier \u003d notifier"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.super_class.__init__(self, repo)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"class NotificationRepoProxy(NotificationBase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba7be1f8_d6c51e5c","line":232,"updated":"2015-02-24 01:26:35.000000000","message":"Is it worth checking for super_class to not be None here? Or perhaps have it raise an exception if it is None?","commit_id":"8ef4a91807897370dfa7759205e49d2ab57a9a5e"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"68bdbb96116b565caa6e25040ebd3c086cda6f26","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        self.context \u003d context"},{"line_number":230,"context_line":"        self.notifier \u003d notifier"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.super_class.__init__(self, repo)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"class NotificationRepoProxy(NotificationBase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba7be1f8_85a21149","line":232,"in_reply_to":"ba7be1f8_d6c51e5c","updated":"2015-02-25 09:18:00.000000000","message":"Done","commit_id":"8ef4a91807897370dfa7759205e49d2ab57a9a5e"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1b24c342d718987aec172fb82a8cb6842b64a96c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"def send_notification(notify, notification_type, payload):"},{"line_number":101,"context_line":"    if is_notification_enabled(notification_type):"},{"line_number":102,"context_line":"        notify(notification_type, payload)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def format_image_notification(image):"},{"line_number":106,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_3d123009","line":103,"updated":"2015-03-09 20:13:51.000000000","message":"Can we please make these private with prefix \"_\"? \n\nfor example:\ndef _get_notification_group","commit_id":"29a45876071d1f09d771aea2660287e71cfd2870"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"753f9674d188d0761b9fb85b1fb3b8f8284a9275","unresolved":false,"context_lines":[{"line_number":100,"context_line":"def send_notification(notify, notification_type, payload):"},{"line_number":101,"context_line":"    if is_notification_enabled(notification_type):"},{"line_number":102,"context_line":"        notify(notification_type, payload)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def format_image_notification(image):"},{"line_number":106,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a80dd14_c2fd6370","line":103,"in_reply_to":"9a80dd14_3d123009","updated":"2015-03-11 10:14:21.000000000","message":"Seems reasonable, done.","commit_id":"29a45876071d1f09d771aea2660287e71cfd2870"}],"glance/tests/unit/v2/test_metadef_resources.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"2efc1e844a391f7519ff870c9e4282393aed8fa4","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.namespace_controller.delete(request, NAMESPACE2)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        output_logs \u003d self.notifier.get_logs()"},{"line_number":354,"context_line":"        self.assertEqual(1, len(output_logs))"},{"line_number":355,"context_line":"        output_log \u003d output_logs[0]"},{"line_number":356,"context_line":"        self.assertEqual(\u0027INFO\u0027, output_log[\u0027notification_type\u0027])"},{"line_number":357,"context_line":"        self.assertEqual(\"meta_namespace.delete\", output_log[\u0027event_type\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_8c555a1f","line":354,"updated":"2015-01-21 21:48:50.000000000","message":"This block is repeated several times below. Have you considered adding a private method to handle most of this for you? Perhaps something like:\n\n    def _output_log_assertions(self, expected_event_type, expected_payload, actual_payload):\n        output_logs \u003d self.notifier.get_logs()\n        self.assertEqual(1, len(output_logs))\n        output_log \u003d output_logs[0]\n        self.assertEqual(\u0027INFO\u0027, output_log[\u0027notification_type\u0027])\n        self.assertEqual(expected_event_type, output_log[\u0027event_type\u0027])\n        self.assertEqual(expected_payload, actual_payload)","commit_id":"746c0228baa951d0e0cc3eb23ac142662547eec1"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"4c304a3b479d75a93b1a4ad81398ca508761585b","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.namespace_controller.delete(request, NAMESPACE2)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        output_logs \u003d self.notifier.get_logs()"},{"line_number":354,"context_line":"        self.assertEqual(1, len(output_logs))"},{"line_number":355,"context_line":"        output_log \u003d output_logs[0]"},{"line_number":356,"context_line":"        self.assertEqual(\u0027INFO\u0027, output_log[\u0027notification_type\u0027])"},{"line_number":357,"context_line":"        self.assertEqual(\"meta_namespace.delete\", output_log[\u0027event_type\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_d23a82cc","line":354,"in_reply_to":"1a930d6b_0a906542","updated":"2015-01-22 14:50:36.000000000","message":"Done","commit_id":"746c0228baa951d0e0cc3eb23ac142662547eec1"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"42adef441abb68a65e0d5fe4bde0da426105b859","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.namespace_controller.delete(request, NAMESPACE2)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        output_logs \u003d self.notifier.get_logs()"},{"line_number":354,"context_line":"        self.assertEqual(1, len(output_logs))"},{"line_number":355,"context_line":"        output_log \u003d output_logs[0]"},{"line_number":356,"context_line":"        self.assertEqual(\u0027INFO\u0027, output_log[\u0027notification_type\u0027])"},{"line_number":357,"context_line":"        self.assertEqual(\"meta_namespace.delete\", output_log[\u0027event_type\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_0a906542","line":354,"in_reply_to":"1a930d6b_8c555a1f","updated":"2015-01-22 02:11:05.000000000","message":"+1","commit_id":"746c0228baa951d0e0cc3eb23ac142662547eec1"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"4c304a3b479d75a93b1a4ad81398ca508761585b","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.namespace_controller.delete(request, NAMESPACE2)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        output_logs \u003d self.notifier.get_logs()"},{"line_number":354,"context_line":"        self.assertEqual(1, len(output_logs))"},{"line_number":355,"context_line":"        output_log \u003d output_logs[0]"},{"line_number":356,"context_line":"        self.assertEqual(\u0027INFO\u0027, output_log[\u0027notification_type\u0027])"},{"line_number":357,"context_line":"        self.assertEqual(\"meta_namespace.delete\", output_log[\u0027event_type\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_f235bedb","line":354,"in_reply_to":"1a930d6b_8c555a1f","updated":"2015-01-22 14:50:36.000000000","message":"Done","commit_id":"746c0228baa951d0e0cc3eb23ac142662547eec1"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9202c647d5d78f4812bcaf0466b695ada55f9827","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        property.name \u003d PROPERTY2"},{"line_number":334,"context_line":"        property.type \u003d \u0027string\u0027"},{"line_number":335,"context_line":"        property.title \u003d \u0027title\u0027"},{"line_number":336,"context_line":"        object.properties \u003d {\u0027prop1\u0027: property}"},{"line_number":337,"context_line":"        object \u003d self.object_controller.create(request, object, NAMESPACE3)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        filters \u003d {\u0027resource_type\u0027: RESOURCE_TYPE2}"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_e293914c","line":336,"updated":"2015-02-19 16:51:56.000000000","message":"What about notification there?","commit_id":"a4b71dc7b792e8dbeeee5162f039ea9304f0572a"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"7c8c19437579ecaaecbd0112c8d2b33a19aa6b98","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        property.name \u003d PROPERTY2"},{"line_number":334,"context_line":"        property.type \u003d \u0027string\u0027"},{"line_number":335,"context_line":"        property.title \u003d \u0027title\u0027"},{"line_number":336,"context_line":"        object.properties \u003d {\u0027prop1\u0027: property}"},{"line_number":337,"context_line":"        object \u003d self.object_controller.create(request, object, NAMESPACE3)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        filters \u003d {\u0027resource_type\u0027: RESOURCE_TYPE2}"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba7be1f8_37904d95","line":336,"in_reply_to":"da86d52c_e293914c","updated":"2015-02-20 14:04:05.000000000","message":"Done","commit_id":"a4b71dc7b792e8dbeeee5162f039ea9304f0572a"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9202c647d5d78f4812bcaf0466b695ada55f9827","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        namespace \u003d self.namespace_controller.show(request, NAMESPACE4)"},{"line_number":470,"context_line":"        self.assertEqual(NAMESPACE4, namespace.namespace)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def test_namespace_create_with_related_resources(self):"},{"line_number":473,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        namespace \u003d glance.api.v2.model.metadef_namespace.Namespace()"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_42cffd7e","line":472,"updated":"2015-02-19 16:51:56.000000000","message":"This method should also test notifications.","commit_id":"a4b71dc7b792e8dbeeee5162f039ea9304f0572a"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"7c8c19437579ecaaecbd0112c8d2b33a19aa6b98","unresolved":false,"context_lines":[{"line_number":469,"context_line":"        namespace \u003d self.namespace_controller.show(request, NAMESPACE4)"},{"line_number":470,"context_line":"        self.assertEqual(NAMESPACE4, namespace.namespace)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def test_namespace_create_with_related_resources(self):"},{"line_number":473,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        namespace \u003d glance.api.v2.model.metadef_namespace.Namespace()"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba7be1f8_97d57945","line":472,"in_reply_to":"da86d52c_42cffd7e","updated":"2015-02-20 14:04:05.000000000","message":"This one was a bit tricky, because custom assertion method for notifications couldn\u0027t handle scenario where multiple notifications have to be checked. I\u0027ve updated it, so it\u0027s fixed now. Thanks for the catch!","commit_id":"a4b71dc7b792e8dbeeee5162f039ea9304f0572a"}]}
