)]}'
{"ceilometer/api/controllers/v2/root.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"4e2592d89ae6301100a2dd4e9d2f2c206d54663e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    @pecan.expose()"},{"line_number":48,"context_line":"    def _lookup(self, *remainder):"},{"line_number":49,"context_line":"        # NOTE(sileht): we use 307 and not 301 or 302 to allow"},{"line_number":50,"context_line":"        # client to redirect POST/PUT/DELETE/..."},{"line_number":51,"context_line":"        pecan.redirect(location\u003dself._url + pecan.request.path_qs,"},{"line_number":52,"context_line":"                       code\u003d307)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_e79fa4b2","line":50,"updated":"2015-07-17 12:34:37.000000000","message":"307 is correct (according to rfc 7231) but it is a bit of a bummer because is a temporary redirect which is not what we really want to be saying.\n\nIt\u0027ll be interesting to see which clients are willing and able to obey that 307 is not supposed to change the request method.","commit_id":"765c011874922bc64ad4077365ec57cae20d3bef"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"04d479cec1225c908369b5cbe9d52a3f104c87e5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    @pecan.expose()"},{"line_number":48,"context_line":"    def _lookup(self, *remainder):"},{"line_number":49,"context_line":"        # NOTE(sileht): we use 307 and not 301 or 302 to allow"},{"line_number":50,"context_line":"        # client to redirect POST/PUT/DELETE/..."},{"line_number":51,"context_line":"        pecan.redirect(location\u003dself._url + pecan.request.path_qs,"},{"line_number":52,"context_line":"                       code\u003d307)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_36961b95","line":50,"in_reply_to":"9a41bdd9_e79fa4b2","updated":"2015-07-17 15:11:18.000000000","message":"Yes, 307 because no permanant redirection exists for POST/DELETE/PATCH/PUT, so\n\npython-requests work well :p, I have tested with ceilometer client and this is transparent.","commit_id":"765c011874922bc64ad4077365ec57cae20d3bef"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"4e2592d89ae6301100a2dd4e9d2f2c206d54663e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if alarm_enabled:"},{"line_number":72,"context_line":"            self.alarms \u003d query.QueryAlarmsController()"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            self.alarms \u003d AodhRedirectController()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class V2Controller(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_671dd40e","line":74,"updated":"2015-07-17 12:34:37.000000000","message":"This reads backwards to me too (same as the gnocchi patch). Down below alarm_enabled is set to true when there is an alarming endpoint. So if that\u0027s the case, then we want to set the redirect controller when alarm_enabled is true.","commit_id":"765c011874922bc64ad4077365ec57cae20d3bef"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"bf1a1405e2cbb6d1641cf8132efc00179e286e66","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if alarm_enabled:"},{"line_number":72,"context_line":"            self.alarms \u003d query.QueryAlarmsController()"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            self.alarms \u003d AodhRedirectController()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class V2Controller(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_4692044d","line":74,"in_reply_to":"9a41bdd9_36ddbb70","updated":"2015-07-17 16:37:17.000000000","message":"I finally used 308 that same as 307 but permanent. And should works with python-requests too, I will test that on Monday.","commit_id":"765c011874922bc64ad4077365ec57cae20d3bef"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"04d479cec1225c908369b5cbe9d52a3f104c87e5","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if alarm_enabled:"},{"line_number":72,"context_line":"            self.alarms \u003d query.QueryAlarmsController()"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            self.alarms \u003d AodhRedirectController()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class V2Controller(object):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_36ddbb70","line":74,"in_reply_to":"9a41bdd9_671dd40e","updated":"2015-07-17 15:11:18.000000000","message":"Done, I have changed that to _lookup and write a test case for each.","commit_id":"765c011874922bc64ad4077365ec57cae20d3bef"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"4e2592d89ae6301100a2dd4e9d2f2c206d54663e","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        alarm_enabled \u003d \"alarming\" in service_types"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if alarm_enabled:"},{"line_number":93,"context_line":"            LOG.warn(_LW(\"ceilometer-api start with aodh enabled. Alarms url \""},{"line_number":94,"context_line":"                         \"will be redirected to aodh endpoint.\"))"},{"line_number":95,"context_line":"            url \u003d ks.service_catalog.url_for(service_type\u003d\u0027alarming\u0027)"},{"line_number":96,"context_line":"            self.alarms \u003d AodhRedirectController(url)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_47e77012","line":93,"updated":"2015-07-17 12:34:37.000000000","message":"s/start/started/ \n\ns/url/URLs/","commit_id":"765c011874922bc64ad4077365ec57cae20d3bef"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"04d479cec1225c908369b5cbe9d52a3f104c87e5","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        alarm_enabled \u003d \"alarming\" in service_types"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if alarm_enabled:"},{"line_number":93,"context_line":"            LOG.warn(_LW(\"ceilometer-api start with aodh enabled. Alarms url \""},{"line_number":94,"context_line":"                         \"will be redirected to aodh endpoint.\"))"},{"line_number":95,"context_line":"            url \u003d ks.service_catalog.url_for(service_type\u003d\u0027alarming\u0027)"},{"line_number":96,"context_line":"            self.alarms \u003d AodhRedirectController(url)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_56dabf79","line":93,"in_reply_to":"9a41bdd9_47e77012","updated":"2015-07-17 15:11:18.000000000","message":"Done","commit_id":"765c011874922bc64ad4077365ec57cae20d3bef"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"dc12183cb83e1591897512a197da86f24a0c59d6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                self._get_keystone_data()"},{"line_number":150,"context_line":"            except exceptions.ClientException:"},{"line_number":151,"context_line":"                LOG.warn(_LW(\"Can\u0027t connect to keystone, \""},{"line_number":152,"context_line":"                             \"assume gnocchi is disabled and retry later.\"))"},{"line_number":153,"context_line":"                return False"},{"line_number":154,"context_line":"        return self._gnocchi_enabled"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_a9e2e89d","line":152,"updated":"2015-07-20 10:31:16.000000000","message":"fix the previous patch.\n\nalso \"assuming\"","commit_id":"7473ac900620099e5219ff5c4ddf8b5248c64840"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"afe5534ba7d5f0c651b40ca120d5b54bf8fa0b26","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                self._get_keystone_data()"},{"line_number":150,"context_line":"            except exceptions.ClientException:"},{"line_number":151,"context_line":"                LOG.warn(_LW(\"Can\u0027t connect to keystone, \""},{"line_number":152,"context_line":"                             \"assume gnocchi is disabled and retry later.\"))"},{"line_number":153,"context_line":"                return False"},{"line_number":154,"context_line":"        return self._gnocchi_enabled"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a50d1a3_84e7d13f","line":152,"in_reply_to":"3a50d1a3_a9e2e89d","updated":"2015-07-20 10:39:08.000000000","message":"Done","commit_id":"7473ac900620099e5219ff5c4ddf8b5248c64840"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"4f8c08532fc27896f7297146da2a53ea54dca5e9","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            aodh_enabled \u003d self.aodh_is_enabled()"},{"line_number":103,"context_line":"            return QueryController("},{"line_number":104,"context_line":"                gnocchi_enabled\u003dself.gnocchi_is_enabled(),"},{"line_number":105,"context_line":"                aodh_enabled\u003daodh_enabled,"},{"line_number":106,"context_line":"                aodh_url\u003dself._aodh_url,"},{"line_number":107,"context_line":"            ), remainder"},{"line_number":108,"context_line":"        elif kind \u003d\u003d \u0027alarms\u0027 and self.aodh_is_enabled():"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_52973690","line":105,"updated":"2015-07-20 16:22:43.000000000","message":"either gnocchi_enabled var should be assigned above, aodh_enabled should not be and self.aodh_is_enabled() should be called here. The difference is jarring.\n\nI\u0027d be inclined to assign both once at the top of _lookup.\n\nIn general the variety of things that say _is_enabled, some variables, some methods, throughout this module is confusing.","commit_id":"7336a14c18bdd19a11ee40babd48d5da00541d43"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"349c5dca03a4354de6f06cad30e81a5a93e8ffe3","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            aodh_enabled \u003d self.aodh_is_enabled()"},{"line_number":103,"context_line":"            return QueryController("},{"line_number":104,"context_line":"                gnocchi_enabled\u003dself.gnocchi_is_enabled(),"},{"line_number":105,"context_line":"                aodh_enabled\u003daodh_enabled,"},{"line_number":106,"context_line":"                aodh_url\u003dself._aodh_url,"},{"line_number":107,"context_line":"            ), remainder"},{"line_number":108,"context_line":"        elif kind \u003d\u003d \u0027alarms\u0027 and self.aodh_is_enabled():"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a50d1a3_26f330a0","line":105,"in_reply_to":"3a50d1a3_52973690","updated":"2015-07-21 08:29:05.000000000","message":"I have tried to improve the readable of this by changing theses methods into \"property\".  And always use term \u0027XX_is_enabled\u0027, not sometimes \u0027XX_enabled\u0027 and \u0027XX_is_enabled\u0027","commit_id":"7336a14c18bdd19a11ee40babd48d5da00541d43"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"eb77b78ef63aff04385498a01319442421c4b7fe","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            return cfg.CONF.api.aodh_is_enabled"},{"line_number":125,"context_line":"        if self._aodh_is_enabled is None:"},{"line_number":126,"context_line":"            try:"},{"line_number":127,"context_line":"                self._ask_keystone_for_enabled_services()"},{"line_number":128,"context_line":"            except exceptions.ClientException:"},{"line_number":129,"context_line":"                LOG.warn(_LW(\"Can\u0027t connect to keystone, \""},{"line_number":130,"context_line":"                             \"assuming aodh is disabled and retry later.\"))"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_c309132e","line":127,"updated":"2015-07-21 10:15:34.000000000","message":"Can i have self._aodh_is_enabled \u003d\n\nI\u0027m still functional.","commit_id":"bb9ba3f0bd6f6e55cfbaf310dc4d9e9de17c1eb7"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"146c7669a152ff0b776a35293d596fad5fb1d927","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            return cfg.CONF.api.aodh_is_enabled"},{"line_number":125,"context_line":"        if self._aodh_is_enabled is None:"},{"line_number":126,"context_line":"            try:"},{"line_number":127,"context_line":"                self._ask_keystone_for_enabled_services()"},{"line_number":128,"context_line":"            except exceptions.ClientException:"},{"line_number":129,"context_line":"                LOG.warn(_LW(\"Can\u0027t connect to keystone, \""},{"line_number":130,"context_line":"                             \"assuming aodh is disabled and retry later.\"))"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_87867ed9","line":127,"in_reply_to":"3a50d1a3_c309132e","updated":"2015-07-22 07:58:40.000000000","message":"Done","commit_id":"bb9ba3f0bd6f6e55cfbaf310dc4d9e9de17c1eb7"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"eb77b78ef63aff04385498a01319442421c4b7fe","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            LOG.warn(_LW(\"ceilometer-api started with gnocchi enabled. \""},{"line_number":189,"context_line":"                         \"The resources/meters/samples URLs are disabled.\"))"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _normalize_aodh_url(self, url):"},{"line_number":192,"context_line":"        if url.endswith(\"/\"):"},{"line_number":193,"context_line":"            return url[:-1]"},{"line_number":194,"context_line":"        return url"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_900d8f40","line":191,"updated":"2015-07-21 10:15:34.000000000","message":"@staticmethod","commit_id":"bb9ba3f0bd6f6e55cfbaf310dc4d9e9de17c1eb7"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"146c7669a152ff0b776a35293d596fad5fb1d927","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            LOG.warn(_LW(\"ceilometer-api started with gnocchi enabled. \""},{"line_number":189,"context_line":"                         \"The resources/meters/samples URLs are disabled.\"))"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _normalize_aodh_url(self, url):"},{"line_number":192,"context_line":"        if url.endswith(\"/\"):"},{"line_number":193,"context_line":"            return url[:-1]"},{"line_number":194,"context_line":"        return url"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_a77b7af4","line":191,"in_reply_to":"3a50d1a3_900d8f40","updated":"2015-07-22 07:58:40.000000000","message":"Done","commit_id":"bb9ba3f0bd6f6e55cfbaf310dc4d9e9de17c1eb7"}]}
