)]}'
{"etc/ceilometer/gnocchi_archive_policy_map.yaml":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2b19d12529d1bca54151332ce96fdfbc528c3c63","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# This file is used to map a metric name to corresponding archive policy"},{"line_number":3,"context_line":"# and precisely used by the ceilometer dispatcher."},{"line_number":4,"context_line":"# Format: \u003cmetric_name\u003e: \u003cpolicy\u003e"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"#cpu_utils: \"high\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"9a80dd14_d9c6f215","line":3,"updated":"2015-03-18 15:57:08.000000000","message":"precision?","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"}],"etc/gnocchi/archive_policy.yaml":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"04a32957746d5a575cc2a54e5f177c27eb1545b5","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# This file is used to map a metric name to corresponding archive policy"},{"line_number":3,"context_line":"# Format is: \u003cmetric_name\u003e: \u003cpolicy\u003e"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"#cpu_utils: \"high\""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ba7be1f8_1bda124c","line":2,"updated":"2015-03-03 10:40:28.000000000","message":"Please precise this only used by the Ceilometer dispatcher.\n\nThis file should be named to ceilometer_archive_policy.yaml at least too.","commit_id":"c42fdfbb1d851098d716321ef7980fe3dd343762"}],"etc/gnocchi/ceilometer_archive_policy.yaml":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b8870ba5053cf24a2e468b0f1e642d2b801118ef","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# This file is used to map a metric name to corresponding archive policy"},{"line_number":3,"context_line":"# and precisely used by the ceilometer dispatcher."},{"line_number":4,"context_line":"# Format: \u003cmetric_name\u003e: \u003cpolicy\u003e"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9a80dd14_99f7fe58","line":1,"updated":"2015-03-06 14:15:49.000000000","message":"This file should be etc/ceilometer/gnocchi_archive_policy_map.yaml\nI think. At least it\u0027s not in etc/gnocchi.","commit_id":"ec8903ceb7e195f072c91f726ff54e9e89c38dc1"}],"gnocchi/ceilometer/dispatcher.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8f0642adf687ccdfddc8a6891f6f74e6d7f743ec","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            with open(policy_config_file) \\"},{"line_number":127,"context_line":"                    as data_file:"},{"line_number":128,"context_line":"                try:"},{"line_number":129,"context_line":"                    data \u003d yaml.load(data_file)"},{"line_number":130,"context_line":"                except ValueError:"},{"line_number":131,"context_line":"                    data \u003d {}"},{"line_number":132,"context_line":"        return data"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_95a1dfab","line":129,"updated":"2015-02-20 21:52:49.000000000","message":"Generally in ceilometer we skew conservative and use safe_load as opposed to load.","commit_id":"492fe2d29a03eeed8eddd35e6418ad44abc6ddb5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"8f0642adf687ccdfddc8a6891f6f74e6d7f743ec","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            else:"},{"line_number":142,"context_line":"                archive_policy[\u0027archive_policy_name\u0027] \u003d \\"},{"line_number":143,"context_line":"                    self.gnocchi_archive_policy_default"},{"line_number":144,"context_line":"        else:"},{"line_number":145,"context_line":"            LOG.debug(_(\"No Archive policy file found!\""},{"line_number":146,"context_line":"                      \" Using default config.\"))"},{"line_number":147,"context_line":"            archive_policy[\u0027archive_policy_name\u0027] \u003d \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_157c0f20","line":144,"updated":"2015-02-20 21:52:49.000000000","message":"How about:\n\n  archive_policy[\u0027archive_policy_name\u0027] \u003d policy_match or self.gnocchi_archive_policy_default","commit_id":"492fe2d29a03eeed8eddd35e6418ad44abc6ddb5"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"04a32957746d5a575cc2a54e5f177c27eb1545b5","unresolved":false,"context_lines":[{"line_number":53,"context_line":"               help\u003d\u0027The archive policy to use when the dispatcher \u0027"},{"line_number":54,"context_line":"               \u0027create a new metric.\u0027),"},{"line_number":55,"context_line":"    cfg.StrOpt(\u0027archive_policy_file\u0027,"},{"line_number":56,"context_line":"               default\u003d\u0027archive_policy.yaml\u0027,"},{"line_number":57,"context_line":"               help\u003d_(\u0027The Yaml file that defines per metric archive \u0027"},{"line_number":58,"context_line":"                      \u0027policies.\u0027)),"},{"line_number":59,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_bbee66eb","line":56,"updated":"2015-03-03 10:40:28.000000000","message":"This code is going to be run from Ceilometer, not Gnocchi, the file is going to be looked up into /etc/ceilometer not in /etc/gnocchi","commit_id":"c42fdfbb1d851098d716321ef7980fe3dd343762"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"04a32957746d5a575cc2a54e5f177c27eb1545b5","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            archive_policy[\u0027archive_policy_name\u0027] \u003d \\"},{"line_number":140,"context_line":"                policy_match or self.gnocchi_archive_policy_default"},{"line_number":141,"context_line":"        else:"},{"line_number":142,"context_line":"            LOG.debug(_(\"No Archive policy file found!\""},{"line_number":143,"context_line":"                      \" Using default config.\"))"},{"line_number":144,"context_line":"            archive_policy[\u0027archive_policy_name\u0027] \u003d \\"},{"line_number":145,"context_line":"                self.gnocchi_archive_policy_default"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_fba29eac","line":142,"updated":"2015-03-03 10:40:28.000000000","message":"s/Archive/archive/","commit_id":"c42fdfbb1d851098d716321ef7980fe3dd343762"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"b982122ea24573fa11e93487077569690df696d4","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    cfg.StrOpt(\u0027url\u0027,"},{"line_number":49,"context_line":"               default\u003d\"http://localhost:8041\","},{"line_number":50,"context_line":"               help\u003d\u0027URL to Gnocchi.\u0027),"},{"line_number":51,"context_line":"    cfg.StrOpt(\u0027archive_policy\u0027,"},{"line_number":52,"context_line":"               default\u003d\"low\","},{"line_number":53,"context_line":"               help\u003d\u0027The archive policy to use when the dispatcher \u0027"},{"line_number":54,"context_line":"               \u0027create a new metric.\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_91bd85da","line":51,"updated":"2015-03-17 06:35:17.000000000","message":"I think we should delete this configuration option and instead provide a default archive_policy_map file with :\n\n  *: low\n\nWDYT ?","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2b19d12529d1bca54151332ce96fdfbc528c3c63","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    cfg.StrOpt(\u0027url\u0027,"},{"line_number":49,"context_line":"               default\u003d\"http://localhost:8041\","},{"line_number":50,"context_line":"               help\u003d\u0027URL to Gnocchi.\u0027),"},{"line_number":51,"context_line":"    cfg.StrOpt(\u0027archive_policy\u0027,"},{"line_number":52,"context_line":"               default\u003d\"low\","},{"line_number":53,"context_line":"               help\u003d\u0027The archive policy to use when the dispatcher \u0027"},{"line_number":54,"context_line":"               \u0027create a new metric.\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_199faa04","line":51,"in_reply_to":"9a80dd14_91bd85da","updated":"2015-03-18 15:57:08.000000000","message":"I think having a configured default is nice. Then you don\u0027t _have_ to have a file if you don\u0027t want one.","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"9e9c1d47979e24e51c1f4329107d99e451e7bd3f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                raise"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        self.gnocchi_url \u003d conf.dispatcher_gnocchi.url"},{"line_number":109,"context_line":"        self.gnocchi_archive_policy_default \u003d \\"},{"line_number":110,"context_line":"            conf.dispatcher_gnocchi.archive_policy"},{"line_number":111,"context_line":"        self.gnocchi_archive_policy_data \u003d self._load_archive_policy(conf)"},{"line_number":112,"context_line":"        self.mgmr \u003d stevedore.dispatch.DispatchExtensionManager("}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_b97bfebc","line":109,"updated":"2015-03-18 15:57:40.000000000","message":"please use parentheses instead backslash","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"9e9c1d47979e24e51c1f4329107d99e451e7bd3f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        policy_config_file \u003d self._get_config_file(conf)"},{"line_number":124,"context_line":"        data \u003d {}"},{"line_number":125,"context_line":"        if policy_config_file is not None:"},{"line_number":126,"context_line":"            with open(policy_config_file) \\"},{"line_number":127,"context_line":"                    as data_file:"},{"line_number":128,"context_line":"                try:"},{"line_number":129,"context_line":"                    data \u003d yaml.safe_load(data_file)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_19440a73","line":126,"updated":"2015-03-18 15:57:40.000000000","message":"ditto","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"9e9c1d47979e24e51c1f4329107d99e451e7bd3f","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        archive_policy \u003d {}"},{"line_number":137,"context_line":"        if self.gnocchi_archive_policy_data is not None:"},{"line_number":138,"context_line":"            policy_match \u003d self._match_metric(metric_name)"},{"line_number":139,"context_line":"            archive_policy[\u0027archive_policy_name\u0027] \u003d \\"},{"line_number":140,"context_line":"                policy_match or self.gnocchi_archive_policy_default"},{"line_number":141,"context_line":"        else:"},{"line_number":142,"context_line":"            LOG.debug(_(\"No archive policy file found!\""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_595da247","line":139,"updated":"2015-03-18 15:57:40.000000000","message":"ditto","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"9e9c1d47979e24e51c1f4329107d99e451e7bd3f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        else:"},{"line_number":142,"context_line":"            LOG.debug(_(\"No archive policy file found!\""},{"line_number":143,"context_line":"                      \" Using default config.\"))"},{"line_number":144,"context_line":"            archive_policy[\u0027archive_policy_name\u0027] \u003d \\"},{"line_number":145,"context_line":"                self.gnocchi_archive_policy_default"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        return archive_policy"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_b9521e33","line":144,"updated":"2015-03-18 15:57:40.000000000","message":"ditto","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"}],"gnocchi/tests/test_ceilometer_dispatcher.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"04a32957746d5a575cc2a54e5f177c27eb1545b5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import testscenarios"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from gnocchi.ceilometer import dispatcher"},{"line_number":29,"context_line":"from gnocchi import service"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba7be1f8_dba79aa5","line":29,"updated":"2015-03-03 10:40:28.000000000","message":"This is wrong as the code is not run from gnocchi but from Ceilometer. You should Ceilometer\u0027s prepare_service.","commit_id":"c42fdfbb1d851098d716321ef7980fe3dd343762"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b8870ba5053cf24a2e468b0f1e642d2b801118ef","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def setUp(self):"},{"line_number":48,"context_line":"        super(DispatcherTest, self).setUp()"},{"line_number":49,"context_line":"        self.conf \u003d self.useFixture(config_fixture.Config())"},{"line_number":50,"context_line":"        service.prepare_service([])"},{"line_number":51,"context_line":"        self.resource_id \u003d str(uuid.uuid4())"},{"line_number":52,"context_line":"        self.samples \u003d [{"},{"line_number":53,"context_line":"            \u0027counter_name\u0027: \u0027disk.root.size\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_b9be8263","line":50,"updated":"2015-03-06 14:15:49.000000000","message":"You need to pass a conf object that is not the global cfg.CONF I think but your self.conf. This does not seem possible yet in Ceilometer, so either patch Ceilometer or call self.conf(project\u003d\u0027ceilometer\u0027) yourself.","commit_id":"ec8903ceb7e195f072c91f726ff54e9e89c38dc1"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2b19d12529d1bca54151332ce96fdfbc528c3c63","unresolved":false,"context_lines":[{"line_number":25,"context_line":"import requests"},{"line_number":26,"context_line":"import testscenarios"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from ceilometer import service"},{"line_number":29,"context_line":"from gnocchi.ceilometer import dispatcher"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"load_tests \u003d testscenarios.load_tests_apply_scenarios"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_b9005e03","line":28,"updated":"2015-03-18 15:57:08.000000000","message":"Perhaps import service as ceilometer_service so it is explict whose service we are talking about below?","commit_id":"2aff28817e42d620aa5c87df00c6e0efc38bf2a2"}]}
