)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"ff5d955de8434f1e948bcbbb22843e1811f53eec","unresolved":false,"context_lines":[{"line_number":15,"context_line":"following reason: Schemata in entry_points.txt are used by alarm-notifier,"},{"line_number":16,"context_line":"whereas schema check needs to be done in API."},{"line_number":17,"context_line":"Since alarm-notifier and API may running on different host, the file might"},{"line_number":18,"context_line":"differ as well."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I3b28cfe36c460daead2945ba3577fbc1274f9d91"},{"line_number":21,"context_line":"Closes-bug: #1342673"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"baada198_d11a626e","line":18,"updated":"2014-07-31 08:49:20.000000000","message":"why the entry_point file of alarm-notifier and ceilometer-api would differ? I don\u0027t see any reason a distributor would do that.\n\nI think it would be better to extra those information from entry_point to avoid the inconsistency between the config option and actual supported alarm notifiers","commit_id":"36b4179698c40b4180d270499a049ce27437ba10"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"98240563eff0a66f5d1ba4559d5c4dd5a0edd52b","unresolved":false,"context_lines":[{"line_number":15,"context_line":"following reason: Schemata in entry_points.txt are used by alarm-notifier,"},{"line_number":16,"context_line":"whereas schema check needs to be done in API."},{"line_number":17,"context_line":"Since alarm-notifier and API may running on different host, the file might"},{"line_number":18,"context_line":"differ as well."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I3b28cfe36c460daead2945ba3577fbc1274f9d91"},{"line_number":21,"context_line":"Closes-bug: #1342673"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"baada198_647c4572","line":18,"in_reply_to":"baada198_d11a626e","updated":"2014-08-01 11:38:02.000000000","message":"It is better for a distributor to synchronize entry_points.txt between nodes, but there\u0027s a chance that missing to do that, especially after some specific config change on a node.  Previously I have received a comment from Eoghan on another patch[1], that \"Note that the agent and collector may well be running on different hosts, hence have different ceilometer.conf files.\"  This can be also applied to this patch, IMO.\n\n\nFurthermore, entry_points.txt is for definitions of entry points (classes), whereas whether the defined class is used might be defined in configuration file (for example, [2]).\n\nTherefore, I think supported schemata are better to be defined in config.\n\nI will add above descriptions in Commit Message.\n\n[1]:https://review.openstack.org/#/c/94155/2/ceilometer/publisher/rpc.py\n\n[2]:http://docs.openstack.org/developer/ceilometer/install/manual.html#using-multiple-dispatchers","commit_id":"36b4179698c40b4180d270499a049ce27437ba10"}],"ceilometer/alarm/service.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"6c2656c72636bbe023476704e966953839413a8e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            transport, cfg.CONF.alarm.notifier_rpc_topic, self)"},{"line_number":197,"context_line":"        self.notifiers \u003d extension.ExtensionManager(self.EXTENSIONS_NAMESPACE,"},{"line_number":198,"context_line":"                                                    invoke_on_load\u003dTrue)"},{"line_number":199,"context_line":"        self.notifiers_schemas \u003d self.notifiers.map(lambda x: x.name)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def start(self):"},{"line_number":202,"context_line":"        super(AlarmNotifierService, self).start()"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa98f980_1034b691","line":199,"updated":"2014-09-03 09:43:44.000000000","message":"how about put the notifiers and notifiers_schemas as class attribute instead of instance attribute? In that case, we don\u0027t need to instantiate the AlarmNotifierService in ceilometer-api, which would result in allocating extra resources like rpc server, etc.","commit_id":"1f2448fd47df467d8f19ddfbcc8557a7688e8646"}],"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"cfc3dd06e12cca3a5e78ff4a1749bc6b06b319cb","unresolved":false,"context_lines":[{"line_number":76,"context_line":"               ),"},{"line_number":77,"context_line":"    cfg.MultiStrOpt(\u0027actions_schema\u0027,"},{"line_number":78,"context_line":"                    default\u003d[\u0027log\u0027, \u0027test\u0027, \u0027http\u0027, \u0027https\u0027,"},{"line_number":79,"context_line":"                             \u0027trust+http\u0027, \u0027trust+https\u0027],"},{"line_number":80,"context_line":"                    help\u003d\u0027Schema of alarm actions that is supported.\u0027"},{"line_number":81,"context_line":"                    ),"},{"line_number":82,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_6f66dfee","line":79,"updated":"2014-08-28 07:06:46.000000000","message":"how about change the default value to all the available notifier registered in setuptools entrypoints.\n\nfrom stevedore import extension\n\nnamespace \u003d \u0027ceilometer.alarm.notifier\u0027\n\nmgr \u003d extension.ExtensionManager(namespace )\n\nnames \u003d mgr.map(lambda x: x.name)\n\nprint names\n\n[\u0027http\u0027, \u0027log\u0027, \u0027trust+http\u0027, \u0027https\u0027, \u0027test\u0027, \u0027trust+https\u0027]","commit_id":"7e3745fc114544349058a0bf4e7b6aa4d023fd7c"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"dc2001bc6efea240d7fbcea19ac400b634ca6b18","unresolved":false,"context_lines":[{"line_number":76,"context_line":"               ),"},{"line_number":77,"context_line":"    cfg.MultiStrOpt(\u0027actions_schema\u0027,"},{"line_number":78,"context_line":"                    default\u003d[\u0027log\u0027, \u0027test\u0027, \u0027http\u0027, \u0027https\u0027,"},{"line_number":79,"context_line":"                             \u0027trust+http\u0027, \u0027trust+https\u0027],"},{"line_number":80,"context_line":"                    help\u003d\u0027Schema of alarm actions that is supported.\u0027"},{"line_number":81,"context_line":"                    ),"},{"line_number":82,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_cc176a50","line":79,"in_reply_to":"1abeadc6_4d1e8171","updated":"2014-09-01 10:23:10.000000000","message":"Hi Lianhao,\n\nThank you for your comments.\n\nI responded to you at https://review.openstack.org/#/c/107330/4//COMMIT_MSG, what do you think?","commit_id":"7e3745fc114544349058a0bf4e7b6aa4d023fd7c"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"988197aa2b7c87ff65b35b60e3033fa997dfeb49","unresolved":false,"context_lines":[{"line_number":76,"context_line":"               ),"},{"line_number":77,"context_line":"    cfg.MultiStrOpt(\u0027actions_schema\u0027,"},{"line_number":78,"context_line":"                    default\u003d[\u0027log\u0027, \u0027test\u0027, \u0027http\u0027, \u0027https\u0027,"},{"line_number":79,"context_line":"                             \u0027trust+http\u0027, \u0027trust+https\u0027],"},{"line_number":80,"context_line":"                    help\u003d\u0027Schema of alarm actions that is supported.\u0027"},{"line_number":81,"context_line":"                    ),"},{"line_number":82,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1abeadc6_4d1e8171","line":79,"in_reply_to":"1abeadc6_6f66dfee","updated":"2014-08-28 13:27:13.000000000","message":"Agree with Lianhao Lu.","commit_id":"7e3745fc114544349058a0bf4e7b6aa4d023fd7c"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"b03c124f01961b2875169f81a5ef0d2a1d5c6882","unresolved":false,"context_lines":[{"line_number":76,"context_line":"               ),"},{"line_number":77,"context_line":"    cfg.MultiStrOpt(\u0027actions_schema\u0027,"},{"line_number":78,"context_line":"                    default\u003d[\u0027log\u0027, \u0027test\u0027, \u0027http\u0027, \u0027https\u0027,"},{"line_number":79,"context_line":"                             \u0027trust+http\u0027, \u0027trust+https\u0027],"},{"line_number":80,"context_line":"                    help\u003d\u0027Schema of alarm actions that is supported.\u0027"},{"line_number":81,"context_line":"                    ),"},{"line_number":82,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_68ff4335","line":79,"in_reply_to":"fa98f980_cc176a50","updated":"2014-09-01 13:18:03.000000000","message":"What I mean hear is to change the config option\u0027s default value to all the available entry points defined in the name space of \u0027ceilometer.alarm.notifier\u0027. It\u0027s ok for the admin to config what notifiers are enabled, but I think the default value should be extracted from entry points so in the future, if we add more notifier implementations, we don\u0027t need to change this default value.","commit_id":"7e3745fc114544349058a0bf4e7b6aa4d023fd7c"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"6c084771724ebccb0469da781fc8339892fb07e2","unresolved":false,"context_lines":[{"line_number":1851,"context_line":"    @staticmethod"},{"line_number":1852,"context_line":"    def check_alarm_actions(alarm):"},{"line_number":1853,"context_line":"        notifiers \u003d extension.ExtensionManager(\"ceilometer.alarm.notifier\")"},{"line_number":1854,"context_line":"        actions_schema \u003d notifiers.map(lambda x: x.name)"},{"line_number":1855,"context_line":"        for state in state_kind:"},{"line_number":1856,"context_line":"            actions_name \u003d state.replace(\" \", \"_\") + \u0027_actions\u0027"},{"line_number":1857,"context_line":"            actions \u003d getattr(alarm, actions_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_9587edd6","line":1854,"updated":"2014-09-02 07:21:01.000000000","message":"I don\u0027t think we need to do the above every time when check_alarm_actions is called. Maybe use above code to define an variable in ceilometer.alarm.notifier?","commit_id":"852883fa04f4e73bf790a0be5c62206d8a692b55"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"847f83b238855b0ac573862f31d4379419948430","unresolved":false,"context_lines":[{"line_number":1851,"context_line":"    @staticmethod"},{"line_number":1852,"context_line":"    def check_alarm_actions(alarm):"},{"line_number":1853,"context_line":"        notifiers \u003d extension.ExtensionManager(\"ceilometer.alarm.notifier\")"},{"line_number":1854,"context_line":"        actions_schema \u003d notifiers.map(lambda x: x.name)"},{"line_number":1855,"context_line":"        for state in state_kind:"},{"line_number":1856,"context_line":"            actions_name \u003d state.replace(\" \", \"_\") + \u0027_actions\u0027"},{"line_number":1857,"context_line":"            actions \u003d getattr(alarm, actions_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_acabc31b","line":1854,"in_reply_to":"fa98f980_9587edd6","updated":"2014-09-02 10:09:45.000000000","message":"Sorry, I don\u0027t have good idea to realize your suggestion.\n\nWhich file is \"ceilometer.alarm.notifier\"?","commit_id":"852883fa04f4e73bf790a0be5c62206d8a692b55"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"552c2f49965ca5b39ea1cdc35616269994763e56","unresolved":false,"context_lines":[{"line_number":1851,"context_line":"    @staticmethod"},{"line_number":1852,"context_line":"    def check_alarm_actions(alarm):"},{"line_number":1853,"context_line":"        notifiers \u003d extension.ExtensionManager(\"ceilometer.alarm.notifier\")"},{"line_number":1854,"context_line":"        actions_schema \u003d notifiers.map(lambda x: x.name)"},{"line_number":1855,"context_line":"        for state in state_kind:"},{"line_number":1856,"context_line":"            actions_name \u003d state.replace(\" \", \"_\") + \u0027_actions\u0027"},{"line_number":1857,"context_line":"            actions \u003d getattr(alarm, actions_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa98f980_ef83fd53","line":1854,"in_reply_to":"fa98f980_acabc31b","updated":"2014-09-02 10:12:46.000000000","message":"ceilometer/alarm/notifier/__init__.py","commit_id":"852883fa04f4e73bf790a0be5c62206d8a692b55"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d888bdb0f1c9035d9f89134586945e1c8bc89156","unresolved":false,"context_lines":[{"line_number":1852,"context_line":"    @staticmethod"},{"line_number":1853,"context_line":"    def check_alarm_actions(alarm):"},{"line_number":1854,"context_line":"        notifiers \u003d alarm_notifier_servevice.notifiers"},{"line_number":1855,"context_line":"        actions_schema \u003d notifiers.map(lambda x: x.name)"},{"line_number":1856,"context_line":"        for state in state_kind:"},{"line_number":1857,"context_line":"            actions_name \u003d state.replace(\" \", \"_\") + \u0027_actions\u0027"},{"line_number":1858,"context_line":"            actions \u003d getattr(alarm, actions_name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_f7073216","line":1855,"updated":"2014-09-03 02:55:11.000000000","message":"Don\u0027t blame me for the nitpicking. I\u0027m thinking of moving the actions_schema as a class attribute of AlarmNotifierService.\n\nHow about we modify the AlarmNotifierService as follows:\n\nclass AlarmNotifierService(os_service.Service):\n\n    EXTENSIONS_NAMESPACE \u003d \"ceilometer.alarm.notifier\" \n\n    notifiers\u003d extension.ExtensionManager(self.EXTENSIONS_NAMESPACE,\n                                              invoke_on_load\u003dTrue)\n\n    notifiers_schemas \u003d AlarmNotifierService.notifiers.map(lambda x: x.name)\n\nAnd use that class attribute here instead of instantiate that class and do duplicated mapping every time we validate the action?","commit_id":"9ca600a7a10a968a2d2a3501065b8a72ffa9d543"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"816c41c32c4ac8f7357bf76b364f20ed8939c547","unresolved":false,"context_lines":[{"line_number":1855,"context_line":"            actions_name \u003d state.replace(\" \", \"_\") + \u0027_actions\u0027"},{"line_number":1856,"context_line":"            actions \u003d getattr(alarm, actions_name)"},{"line_number":1857,"context_line":"            if not actions:"},{"line_number":1858,"context_line":"                continue"},{"line_number":1859,"context_line":""},{"line_number":1860,"context_line":"            for action in actions:"},{"line_number":1861,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_b7eed5b2","line":1858,"updated":"2014-09-09 05:53:32.000000000","message":"You may use getattr(alarm, actions_name, []) to dismiss the if statement check here.\n\nHowever, this doesn\u0027t bother to block this patch due to the time for rc1 window.","commit_id":"3e8f8e988fde82713461740058ba8e12c7d8820f"}]}
