)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"302be65380d2e99cb212c4ee1e6daefff02bc8fc","unresolved":false,"context_lines":[{"line_number":11,"context_line":"through the collector. This is useful for some testing scenarios"},{"line_number":12,"context_line":"where we want to limit the number of required running services."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I996cda43609695b7645b9fcf9554d3e928cb92a3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_32d5b6e5","line":14,"updated":"2015-01-10 14:10:34.000000000","message":"you are adding a new feature, since this is needed by bp/declarative-http-tests, is it part of it? if yes, I think maybe we should link it here as well, if no, a new spec?","commit_id":"93503464a64484d8e64ec3884ccf3450cbc5792f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2d81051f3ad6f2fed33a8ea90043ced40c0fd8a4","unresolved":false,"context_lines":[{"line_number":11,"context_line":"through the collector. This is useful for some testing scenarios"},{"line_number":12,"context_line":"where we want to limit the number of required running services."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I996cda43609695b7645b9fcf9554d3e928cb92a3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_0a1eb35f","line":14,"in_reply_to":"3a961159_32d5b6e5","updated":"2015-01-12 11:19:14.000000000","message":"Will do.","commit_id":"93503464a64484d8e64ec3884ccf3450cbc5792f"}],"ceilometer/publisher/direct.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"302be65380d2e99cb212c4ee1e6daefff02bc8fc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            if meter.get(\u0027timestamp\u0027):"},{"line_number":54,"context_line":"                ts \u003d timeutils.parse_isotime(meter[\u0027timestamp\u0027])"},{"line_number":55,"context_line":"                meter[\u0027timestamp\u0027] \u003d timeutils.normalize_time(ts)"},{"line_number":56,"context_line":"                self.meter_conn.record_metering_data(meter)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b200c667","line":56,"updated":"2015-01-10 14:10:34.000000000","message":"soft -1: if a meter has timestamp field, then it will be saved to database, otherwise, it will be directly dropped even without any log, is this intended? I think that may not be a good idea.","commit_id":"93503464a64484d8e64ec3884ccf3450cbc5792f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2d81051f3ad6f2fed33a8ea90043ced40c0fd8a4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            if meter.get(\u0027timestamp\u0027):"},{"line_number":54,"context_line":"                ts \u003d timeutils.parse_isotime(meter[\u0027timestamp\u0027])"},{"line_number":55,"context_line":"                meter[\u0027timestamp\u0027] \u003d timeutils.normalize_time(ts)"},{"line_number":56,"context_line":"                self.meter_conn.record_metering_data(meter)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_ca982bcf","line":56,"in_reply_to":"3a961159_b200c667","updated":"2015-01-12 11:19:14.000000000","message":"Good catch, that\u0027s actually an indentation error at line 56, will fix.","commit_id":"93503464a64484d8e64ec3884ccf3450cbc5792f"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"dd70f958936d0c8763f9bf946f5912f2cdf45007","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class DirectPublisher(publisher.PublisherBase):"},{"line_number":28,"context_line":"    \"\"\"A hack to allow publishing directly from the pipeline."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    Samples are saved to the currently configured database"},{"line_number":31,"context_line":"    by hitching a ride on the DatabaseDispatcher. This is useful in"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e638bbf0","line":28,"updated":"2015-01-12 14:52:10.000000000","message":"i\u0027m planning to reuse this for events (i\u0027ll add a publish_events method). it will be a valid path -- as it\u0027s something we currently do -- so maybe we should rewrite this to not say it\u0027s a hack... maybe just mention it\u0027s a way to bypass using collector?","commit_id":"1619c85b7c53740cc25053e605c9561c758570b0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7a9a07e274c564271c496181b387fbd9ca83aaea","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class DirectPublisher(publisher.PublisherBase):"},{"line_number":28,"context_line":"    \"\"\"A hack to allow publishing directly from the pipeline."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    Samples are saved to the currently configured database"},{"line_number":31,"context_line":"    by hitching a ride on the DatabaseDispatcher. This is useful in"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_c1c9e926","line":28,"in_reply_to":"3a961159_e638bbf0","updated":"2015-01-12 15:15:11.000000000","message":"Roger that.","commit_id":"1619c85b7c53740cc25053e605c9561c758570b0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"dd70f958936d0c8763f9bf946f5912f2cdf45007","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def __init__(self, parsed_url):"},{"line_number":37,"context_line":"        super(DirectPublisher, self).__init__(parsed_url)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.meter_conn \u003d database.DatabaseDispatcher(cfg.CONF).meter_conn"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def publish_samples(self, context, samples):"},{"line_number":42,"context_line":"        if not isinstance(samples, list):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_060f8789","line":39,"updated":"2015-01-12 14:52:10.000000000","message":"i think we should just make similar underlying calls as dispatcher[1] rather than use dispatcher code directly. although as i type this message i\u0027m becoming more indifferent to my suggestion.\n\n[1]https://github.com/openstack/ceilometer/blob/master/ceilometer/storage/__init__.py#L93-L102","commit_id":"1619c85b7c53740cc25053e605c9561c758570b0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7a9a07e274c564271c496181b387fbd9ca83aaea","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def __init__(self, parsed_url):"},{"line_number":37,"context_line":"        super(DirectPublisher, self).__init__(parsed_url)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.meter_conn \u003d database.DatabaseDispatcher(cfg.CONF).meter_conn"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def publish_samples(self, context, samples):"},{"line_number":42,"context_line":"        if not isinstance(samples, list):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_614bd5b1","line":39,"in_reply_to":"3a961159_060f8789","updated":"2015-01-12 15:15:11.000000000","message":"I wondered about that too, and then got all \"this is one line of code, I like one line of code\" and yeah something akin to indifference set in...","commit_id":"1619c85b7c53740cc25053e605c9561c758570b0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"dd70f958936d0c8763f9bf946f5912f2cdf45007","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            utils.meter_message_from_counter("},{"line_number":47,"context_line":"                sample,"},{"line_number":48,"context_line":"                cfg.CONF.publisher.metering_secret)"},{"line_number":49,"context_line":"            for sample in samples"},{"line_number":50,"context_line":"        ]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        for meter in meters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_a69233fa","line":49,"updated":"2015-01-12 14:52:10.000000000","message":"not sure we need to compute a signature if we\u0027re writing directly to db as we\u0027ll never validate the signature in this path","commit_id":"1619c85b7c53740cc25053e605c9561c758570b0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6353bb9dc1ee74fa8b4550397bfa0044a1543356","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            utils.meter_message_from_counter("},{"line_number":47,"context_line":"                sample,"},{"line_number":48,"context_line":"                cfg.CONF.publisher.metering_secret)"},{"line_number":49,"context_line":"            for sample in samples"},{"line_number":50,"context_line":"        ]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        for meter in meters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3133d463","line":49,"in_reply_to":"3a961159_6174b5fe","updated":"2015-01-12 17:39:27.000000000","message":"Turns out this is required to get the data into the form that recording_metering_data expects. Sample.as_dict() doesn\u0027t quite cut it (id is different, for one thing).","commit_id":"1619c85b7c53740cc25053e605c9561c758570b0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7a9a07e274c564271c496181b387fbd9ca83aaea","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            utils.meter_message_from_counter("},{"line_number":47,"context_line":"                sample,"},{"line_number":48,"context_line":"                cfg.CONF.publisher.metering_secret)"},{"line_number":49,"context_line":"            for sample in samples"},{"line_number":50,"context_line":"        ]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        for meter in meters:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_6174b5fe","line":49,"in_reply_to":"3a961159_a69233fa","updated":"2015-01-12 15:15:11.000000000","message":"Good point.I was basically cargo culting with this bit. If the signature isn\u0027t needed, then yeah. How do we confirm that nobody cares about the sig?","commit_id":"1619c85b7c53740cc25053e605c9561c758570b0"}],"ceilometer/tests/publisher/test_direct.py":[{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"b178a0894266b46e79540b5f588e433aac416158","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from ceilometer.tests import db as tests_db"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"@tests_db.run_with(\u0027mongodb\u0027)"},{"line_number":32,"context_line":"class TestDirectPublisher(tests_db.TestBase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    db_url \u003d os.environ.get(\u0027CEILOMETER_TEST_MONGODB_URL\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b228c634","line":31,"updated":"2015-01-10 13:06:01.000000000","message":"why we test only mongodb here? What complexities avoid from using other backends?","commit_id":"93503464a64484d8e64ec3884ccf3450cbc5792f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2d81051f3ad6f2fed33a8ea90043ced40c0fd8a4","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from ceilometer.tests import db as tests_db"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"@tests_db.run_with(\u0027mongodb\u0027)"},{"line_number":32,"context_line":"class TestDirectPublisher(tests_db.TestBase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    db_url \u003d os.environ.get(\u0027CEILOMETER_TEST_MONGODB_URL\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_8a1aa36d","line":31,"in_reply_to":"3a961159_b228c634","updated":"2015-01-12 11:19:14.000000000","message":"I wanted to make the storage side of the test as simple as possible because what\u0027s been tested here are not the databases, just the publisher. In my understanding/experience of testing, it would be an error to test all the databases because that\u0027s redundant _for this test_.\n\nThat said, the complexities are probably minor, given the available scenario handling code, if redundant tests are desired.","commit_id":"93503464a64484d8e64ec3884ccf3450cbc5792f"},{"author":{"_account_id":7052,"name":"Fabio Giannetti","email":"fgiannet@cisco.com","username":"fabgia"},"change_message_id":"c3ca785f254767c5528023337810de39cf427772","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from ceilometer.tests import db as tests_db"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"@tests_db.run_with(\u0027mongodb\u0027)"},{"line_number":32,"context_line":"class TestDirectPublisher(tests_db.TestBase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    db_url \u003d os.environ.get(\u0027CEILOMETER_TEST_MONGODB_URL\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_9db6563d","line":31,"updated":"2015-01-12 21:09:20.000000000","message":"Chris, could you please also add @tests_db.run_with(\u0027sqlite\u0027 to the list since this is the default db for tempest?\nThanks","commit_id":"9bc8ecda30a57a275c7df6546a26c807b38839c2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"93e23e9fc19d32c595cf8d6d0b9805354047c82c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from ceilometer.tests import db as tests_db"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"@tests_db.run_with(\u0027mongodb\u0027)"},{"line_number":32,"context_line":"class TestDirectPublisher(tests_db.TestBase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    db_url \u003d os.environ.get(\u0027CEILOMETER_TEST_MONGODB_URL\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_73671952","line":31,"in_reply_to":"3a961159_1dc8a6a7","updated":"2015-01-12 22:36:42.000000000","message":"I\u0027ve made it use the database scenario mixin, so will do anything are running.","commit_id":"9bc8ecda30a57a275c7df6546a26c807b38839c2"},{"author":{"_account_id":7052,"name":"Fabio Giannetti","email":"fgiannet@cisco.com","username":"fabgia"},"change_message_id":"d9d81a3fae5171a1772d4c9f08364580818f04bc","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from ceilometer.tests import db as tests_db"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"@tests_db.run_with(\u0027mongodb\u0027)"},{"line_number":32,"context_line":"class TestDirectPublisher(tests_db.TestBase):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    db_url \u003d os.environ.get(\u0027CEILOMETER_TEST_MONGODB_URL\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_1dc8a6a7","line":31,"in_reply_to":"3a961159_9db6563d","updated":"2015-01-12 21:11:05.000000000","message":"Actually thinking this again. If you remove the decorator shouldn\u0027t work with all the dbs? That should be the intent.","commit_id":"9bc8ecda30a57a275c7df6546a26c807b38839c2"}]}
