)]}'
{"ceilometer/energy/kwapi.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"749db71b476c61a49419633ef90b580c78c79245","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import datetime"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from keystoneclient.v2_0 import client as ksclient"},{"line_number":20,"context_line":"import requests"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from ceilometer import counter"},{"line_number":23,"context_line":"from ceilometer.central import plugin"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FqGE%3D","line":20,"updated":"2013-01-10 17:59:07.000000000","message":"This looks like a new requirement that would need to go in tools/pip-requires.","commit_id":"ae60b5b2bbda5e4720c9c2a3edb06dc67e420d4b"}],"ceilometer/kwapi/kwapi.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e00b42891d4e12026e0bf72c5b394508cb30a51e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- coding: utf-8 -*-"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"from keystoneclient.v2_0 import client as ksclient"},{"line_number":4,"context_line":"import requests"},{"line_number":5,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FwHo%3D","line":2,"updated":"2013-01-07 17:39:51.000000000","message":"Missing copyright notice","commit_id":"9a51858ba496093713cada6a9a89b2ab32414b41"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e00b42891d4e12026e0bf72c5b394508cb30a51e","unresolved":false,"context_lines":[{"line_number":18,"context_line":"        self.url \u003d url"},{"line_number":19,"context_line":"        self.token \u003d token"},{"line_number":20,"context_line":"    "},{"line_number":21,"context_line":"    def list_probes(self):"},{"line_number":22,"context_line":"        \"\"\"Returns a list of dicts describing all probes.\"\"\""},{"line_number":23,"context_line":"        probes_url \u003d self.url + \u0027/probes/\u0027"},{"line_number":24,"context_line":"        headers \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FwHE%3D","line":21,"updated":"2013-01-07 17:39:51.000000000","message":"You could rename this to iter probe and yield each probe, that\u0027d be better IMHO.","commit_id":"9a51858ba496093713cada6a9a89b2ab32414b41"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e00b42891d4e12026e0bf72c5b394508cb30a51e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        "},{"line_number":30,"context_line":"        probe_list \u003d []"},{"line_number":31,"context_line":"        "},{"line_number":32,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027metering_secret\u0027]):"},{"line_number":33,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":34,"context_line":"            for key, value in probes.iteritems():"},{"line_number":35,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FwHI%3D","line":32,"updated":"2013-01-07 17:39:51.000000000","message":"Does that mean that you sign the message from kwapi with the same secret used inside Ceilometer?\nThis looks really weird.","commit_id":"9a51858ba496093713cada6a9a89b2ab32414b41"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1ee2854719d1e2cf9f4f3ff79768b573adda1e65","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        "},{"line_number":30,"context_line":"        probe_list \u003d []"},{"line_number":31,"context_line":"        "},{"line_number":32,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027metering_secret\u0027]):"},{"line_number":33,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":34,"context_line":"            for key, value in probes.iteritems():"},{"line_number":35,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fvx4%3D","line":32,"in_reply_to":"AAAAM3%2F%2FwHI%3D","updated":"2013-01-07 20:35:58.000000000","message":"I see in https://github.com/frossigneux/kwapi/blob/master/kwapi/drivers/driver.py that the metering_secret option is redefined for use in the kwapi service. I think you\u0027ll want to use a different name for that option, and have it declared here, too, so when this pollster is enabled the user can access the current setting independently from the other secret value we use for message signing.","commit_id":"9a51858ba496093713cada6a9a89b2ab32414b41"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1ee2854719d1e2cf9f4f3ff79768b573adda1e65","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                            tenant_id\u003dcfg.CONF.os_tenant_id,"},{"line_number":50,"context_line":"                            tenant_name\u003dcfg.CONF.os_tenant_name,"},{"line_number":51,"context_line":"                            auth_url\u003dcfg.CONF.os_auth_url)"},{"line_number":52,"context_line":"        endpoint \u003d keystone.service_catalog.url_for(service_type\u003d\u0027metering\u0027, endpoint_type\u003d\u0027internalURL\u0027)"},{"line_number":53,"context_line":"        return KwapiClient(endpoint, keystone.auth_token)"},{"line_number":54,"context_line":"    "},{"line_number":55,"context_line":"    def iter_probes(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fvyk%3D","line":52,"updated":"2013-01-07 20:35:58.000000000","message":"This is going to give back the ceilometer API. Is that what the client wants to talk to? Is there also some sort of plugin for the ceilometer API server to respond to these requests?","commit_id":"9a51858ba496093713cada6a9a89b2ab32414b41"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"664397037df0fa9cdc436db40a2238dc97439456","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                            auth_url\u003dcfg.CONF.os_auth_url)"},{"line_number":77,"context_line":"        endpoint \u003d keystone.service_catalog.url_for(service_type\u003d\u0027metering\u0027,"},{"line_number":78,"context_line":"                                                    endpoint_type\u003d\u0027internalURL\u0027"},{"line_number":79,"context_line":"                                                    )"},{"line_number":80,"context_line":"        return KwapiClient(endpoint, keystone.auth_token)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def iter_probes(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fubk%3D","line":79,"updated":"2013-01-08 16:37:30.000000000","message":"It works but it shouldn\u0027t.\n\n$ keystone service-list\n+----------------------------------+------------+----------+---------------------------+\n|                id                |    name    |   type   |        description  |\n+----------------------------------+------------+----------+---------------------------+\n| b9521f8b1ac74e64b0c4278f498166c6 | ceilometer | metering |     Ceilometer Service    |\n| d0b5d7cdc4174640884733fd79b53459 |   kwapi    | metering |       Kwapi Service       |\n\nOK. Ceilometer and Kwapi are metering service.\nBut when I do : keystone.service_catalog.get_endpoints, Ceilometer endpoint doesn\u0027t appear.\n\nSo it works (because there is not conflict with Ceilometer endpoint), but I don\u0027t understand why Ceilometer endpoint doesn\u0027t appear?","commit_id":"dc863df903a2bd1b50bbdf0f6a293244fbe058e1"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"772629eac258cf764907fcae4031ef5756ffb877","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                            auth_url\u003dcfg.CONF.os_auth_url)"},{"line_number":77,"context_line":"        endpoint \u003d keystone.service_catalog.url_for(service_type\u003d\u0027metering\u0027,"},{"line_number":78,"context_line":"                                                    endpoint_type\u003d\u0027internalURL\u0027"},{"line_number":79,"context_line":"                                                    )"},{"line_number":80,"context_line":"        return KwapiClient(endpoint, keystone.auth_token)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def iter_probes(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FsOI%3D","line":79,"in_reply_to":"AAAAM3%2F%2FsQk%3D","updated":"2013-01-09 13:57:17.000000000","message":"It\u0027s likely a bug in keystoneclient. You could try to report a bug with a way to reproduce, or a unit test proving there\u0027s a bug with a fix, at your convenience :)","commit_id":"dc863df903a2bd1b50bbdf0f6a293244fbe058e1"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"84f099052ed10209e8b6687df53d76349e57d28e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                            auth_url\u003dcfg.CONF.os_auth_url)"},{"line_number":77,"context_line":"        endpoint \u003d keystone.service_catalog.url_for(service_type\u003d\u0027metering\u0027,"},{"line_number":78,"context_line":"                                                    endpoint_type\u003d\u0027internalURL\u0027"},{"line_number":79,"context_line":"                                                    )"},{"line_number":80,"context_line":"        return KwapiClient(endpoint, keystone.auth_token)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def iter_probes(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FsQk%3D","line":79,"in_reply_to":"AAAAM3%2F%2FuFQ%3D","updated":"2013-01-09 13:34:13.000000000","message":"Ok. I named it \"energy\" and it works.\n\nBut there is something strange: if I name two services with the same type (but different names), keystone.service_catalog.get_endpoints returns me only one.\nIs it a bug?\nAs mentioned above, when Ceilometer and Kwapi were \"metering\" services, keystone.service_catalog.get_endpoints was returning only Kwapi.\nAnd now that Kwapi service type is \"energy\", Ceilometer endpoint reappear...","commit_id":"dc863df903a2bd1b50bbdf0f6a293244fbe058e1"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"77f794104c68c84a2444c9421c7b55c279b0d730","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                            auth_url\u003dcfg.CONF.os_auth_url)"},{"line_number":77,"context_line":"        endpoint \u003d keystone.service_catalog.url_for(service_type\u003d\u0027metering\u0027,"},{"line_number":78,"context_line":"                                                    endpoint_type\u003d\u0027internalURL\u0027"},{"line_number":79,"context_line":"                                                    )"},{"line_number":80,"context_line":"        return KwapiClient(endpoint, keystone.auth_token)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def iter_probes(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FuFQ%3D","line":79,"in_reply_to":"AAAAM3%2F%2Fubk%3D","updated":"2013-01-08 19:15:58.000000000","message":"You\u0027re not supposed to register kwapi as metering. You should use another name, like power-usage, or something.","commit_id":"dc863df903a2bd1b50bbdf0f6a293244fbe058e1"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"664397037df0fa9cdc436db40a2238dc97439456","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        \"\"\"Returns all counters.\"\"\""},{"line_number":95,"context_line":"        for probe in self.iter_probes():"},{"line_number":96,"context_line":"            yield counter.Counter("},{"line_number":97,"context_line":"                name\u003d\u0027kwapi\u0027,"},{"line_number":98,"context_line":"                type\u003dcounter.TYPE_CUMULATIVE,"},{"line_number":99,"context_line":"                volume\u003dprobe[\u0027kwh\u0027],"},{"line_number":100,"context_line":"                user_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fubc%3D","line":97,"updated":"2013-01-08 16:37:30.000000000","message":"This counter represents kWh used. Is it a good idea to name it \"kwapi\"?","commit_id":"dc863df903a2bd1b50bbdf0f6a293244fbe058e1"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"77f794104c68c84a2444c9421c7b55c279b0d730","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        \"\"\"Returns all counters.\"\"\""},{"line_number":95,"context_line":"        for probe in self.iter_probes():"},{"line_number":96,"context_line":"            yield counter.Counter("},{"line_number":97,"context_line":"                name\u003d\u0027kwapi\u0027,"},{"line_number":98,"context_line":"                type\u003dcounter.TYPE_CUMULATIVE,"},{"line_number":99,"context_line":"                volume\u003dprobe[\u0027kwh\u0027],"},{"line_number":100,"context_line":"                user_id\u003dNone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FuFI%3D","line":97,"in_reply_to":"AAAAM3%2F%2Fubc%3D","updated":"2013-01-08 19:15:58.000000000","message":"No. I\u0027d suggest \u0027energy\u0027.","commit_id":"dc863df903a2bd1b50bbdf0f6a293244fbe058e1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a25a891c28388fa044f71998dfdeba35baf84d8c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        request \u003d requests.get(probes_url, headers\u003dheaders)"},{"line_number":57,"context_line":"        message \u003d request.json"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027kwapi_secret\u0027]):"},{"line_number":60,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":61,"context_line":"            for key, value in probes.iteritems():"},{"line_number":62,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsM0%3D","line":59,"updated":"2013-01-09 14:07:05.000000000","message":"This seems a little strange. We sign messages being sent into the ceilometer server because we can\u0027t trust the source. In this case, the pollster is talking to the kwapi server, which should be trusted, right? Shouldn\u0027t the message signature validation be performed by the server when it receives the data, instead of the client that is querying that data?","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"eb196fcfd59bbda97bb76cfe1f77596a135e8b30","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        request \u003d requests.get(probes_url, headers\u003dheaders)"},{"line_number":57,"context_line":"        message \u003d request.json"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027kwapi_secret\u0027]):"},{"line_number":60,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":61,"context_line":"            for key, value in probes.iteritems():"},{"line_number":62,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsAI%3D","line":59,"in_reply_to":"AAAAM3%2F%2FsCE%3D","updated":"2013-01-09 15:58:06.000000000","message":"Ok.\nSo I will remove kwapi message signing and kwapi_secret parameter.","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3a745c21be5265d79aecb6fcc38eecc7b633c4e2","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        request \u003d requests.get(probes_url, headers\u003dheaders)"},{"line_number":57,"context_line":"        message \u003d request.json"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027kwapi_secret\u0027]):"},{"line_number":60,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":61,"context_line":"            for key, value in probes.iteritems():"},{"line_number":62,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2Fr%2BQ%3D","line":59,"in_reply_to":"AAAAM3%2F%2FsCE%3D","updated":"2013-01-09 15:57:41.000000000","message":"You\u0027re certainly blocking MITM attacks, but not replay attack for example… HTTPS can buy you that for free. :)\n\nhttp://en.wikipedia.org/wiki/Replay_attack","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"8ccbdfc26c3e5d29210f55968488aff5cfaded0b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        request \u003d requests.get(probes_url, headers\u003dheaders)"},{"line_number":57,"context_line":"        message \u003d request.json"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027kwapi_secret\u0027]):"},{"line_number":60,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":61,"context_line":"            for key, value in probes.iteritems():"},{"line_number":62,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsBc%3D","line":59,"in_reply_to":"AAAAM3%2F%2FsCM%3D","updated":"2013-01-09 15:49:03.000000000","message":"I think that the pollster should verify the signature to prevent middle-man-attack between kwapi server and pollster...","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d163659adf562db89687b951c1c8229446374253","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        request \u003d requests.get(probes_url, headers\u003dheaders)"},{"line_number":57,"context_line":"        message \u003d request.json"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027kwapi_secret\u0027]):"},{"line_number":60,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":61,"context_line":"            for key, value in probes.iteritems():"},{"line_number":62,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsCM%3D","line":59,"in_reply_to":"AAAAM3%2F%2FsJ4%3D","updated":"2013-01-09 15:45:56.000000000","message":"Maybe I don\u0027t understand what this bit of code is doing. It looks like it is reading data from the kwapi server and verifying the signature. Is that correct? Why does ceilometer need to verify that signature? Doesn\u0027t the kwapi ensure that the data it is serving is correct?","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5c5c873956c2ad0ca601dfc7cb63c90bce55cd42","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        request \u003d requests.get(probes_url, headers\u003dheaders)"},{"line_number":57,"context_line":"        message \u003d request.json"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027kwapi_secret\u0027]):"},{"line_number":60,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":61,"context_line":"            for key, value in probes.iteritems():"},{"line_number":62,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsCE%3D","line":59,"in_reply_to":"AAAAM3%2F%2FsJ4%3D","updated":"2013-01-09 15:50:11.000000000","message":"Yeah. Doug\u0027s point is that everything in Ceilometer assumes that the service you\u0027re talking and you\u0027re polling (Swift, Glance…) are trusted. Therefore you don\u0027t have to sign the message. We do trust what we poll from Glance for example, we didn\u0027t add another security layer.\n\nThat was actually a point I raised discussing during our (François and I) meeting in October. Ultimately, if you really to build more trust between Ceilometer and Kwapi, letting the operator upgrading to HTTPS is likely a better option than coming with your own mechanism, IMHO.","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"dc3872bb8357d12bca9e9a9fc8ec425790e21514","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        request \u003d requests.get(probes_url, headers\u003dheaders)"},{"line_number":57,"context_line":"        message \u003d request.json"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if meter.verify_signature(message, cfg.CONF[\u0027kwapi_secret\u0027]):"},{"line_number":60,"context_line":"            probes \u003d message[\u0027probes\u0027]"},{"line_number":61,"context_line":"            for key, value in probes.iteritems():"},{"line_number":62,"context_line":"                probe_dict \u003d value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsJ4%3D","line":59,"in_reply_to":"AAAAM3%2F%2FsM0%3D","updated":"2013-01-09 14:53:01.000000000","message":"Hum... I\u0027m not sure I understand.\nThe counter is signed and ceilometer server verifies it, right?\nBut before the pollster builds this counter, it needs to verify the data it received.\nSo I don\u0027t see what is the problem here...\n\nFurthermore, the secret key shared between the kwapi server and the pollster isn\u0027t the same that the one shared between the pollster and ceilometer server.\nSo how could the ceilometer server perform signature validation if it doesn\u0027t know this first key?\n\nDo you understand what Doug said, Julien?","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c955eef3d602d05565ed27e30be86db47f4ae97b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"class KwapiPollster(_Base):"},{"line_number":90,"context_line":"    \"\"\"Kwapi pollster derived from the base class.\"\"\""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    LOG \u003d log.getLogger(__name__ + \u0027.kwapi\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def get_counters(self, manager, context):"},{"line_number":95,"context_line":"        \"\"\"Returns all counters.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsNw%3D","line":92,"updated":"2013-01-09 13:57:03.000000000","message":"You don\u0027t use LOG, so just remove this.","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"dc3872bb8357d12bca9e9a9fc8ec425790e21514","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                user_id\u003dNone,"},{"line_number":102,"context_line":"                project_id\u003dNone,"},{"line_number":103,"context_line":"                resource_id\u003dprobe[\u0027id\u0027],"},{"line_number":104,"context_line":"                timestamp\u003dtimeutils.utcnow().isoformat(),"},{"line_number":105,"context_line":"                resource_metadata\u003d{"},{"line_number":106,"context_line":"                    \u0027timestamp\u0027: probe[\u0027timestamp\u0027],"},{"line_number":107,"context_line":"                    \u0027w\u0027: probe[\u0027w\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsMQ%3D","line":104,"updated":"2013-01-09 14:53:01.000000000","message":"Would it be better to retrieve timestamp from kwapi messages (which contain a timestamp field), and remove timestamp from resource_metadata?\nIt depends if you consider that \"timestamp\" is the emitting date of the counter, or if it is the date where the wattmeter took the measure.","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d163659adf562db89687b951c1c8229446374253","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                user_id\u003dNone,"},{"line_number":102,"context_line":"                project_id\u003dNone,"},{"line_number":103,"context_line":"                resource_id\u003dprobe[\u0027id\u0027],"},{"line_number":104,"context_line":"                timestamp\u003dtimeutils.utcnow().isoformat(),"},{"line_number":105,"context_line":"                resource_metadata\u003d{"},{"line_number":106,"context_line":"                    \u0027timestamp\u0027: probe[\u0027timestamp\u0027],"},{"line_number":107,"context_line":"                    \u0027w\u0027: probe[\u0027w\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsCA%3D","line":104,"in_reply_to":"AAAAM3%2F%2FsMQ%3D","updated":"2013-01-09 15:45:56.000000000","message":"If you have a timestamp already, it seems like it makes sense to use that value.","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5c5c873956c2ad0ca601dfc7cb63c90bce55cd42","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                user_id\u003dNone,"},{"line_number":102,"context_line":"                project_id\u003dNone,"},{"line_number":103,"context_line":"                resource_id\u003dprobe[\u0027id\u0027],"},{"line_number":104,"context_line":"                timestamp\u003dtimeutils.utcnow().isoformat(),"},{"line_number":105,"context_line":"                resource_metadata\u003d{"},{"line_number":106,"context_line":"                    \u0027timestamp\u0027: probe[\u0027timestamp\u0027],"},{"line_number":107,"context_line":"                    \u0027w\u0027: probe[\u0027w\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsB0%3D","line":104,"in_reply_to":"AAAAM3%2F%2FsMQ%3D","updated":"2013-01-09 15:50:11.000000000","message":"Well, we do use the source timestamp in events for example. It\u0027s likely to be better, because imagine that Kwapi is lagging behind and provides you data from 3 days ago, it\u0027s better to know you missed data during 3 days (even if you keep storing them) rather than lying to the polling agent.","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c955eef3d602d05565ed27e30be86db47f4ae97b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                timestamp\u003dtimeutils.utcnow().isoformat(),"},{"line_number":105,"context_line":"                resource_metadata\u003d{"},{"line_number":106,"context_line":"                    \u0027timestamp\u0027: probe[\u0027timestamp\u0027],"},{"line_number":107,"context_line":"                    \u0027w\u0027: probe[\u0027w\u0027]"},{"line_number":108,"context_line":"                }"},{"line_number":109,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsNk%3D","line":107,"updated":"2013-01-09 13:57:03.000000000","message":"If this is watt, maybe you could emit a second a counter of TYPE_ABSOLUTE with that information?","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5c5c873956c2ad0ca601dfc7cb63c90bce55cd42","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                timestamp\u003dtimeutils.utcnow().isoformat(),"},{"line_number":105,"context_line":"                resource_metadata\u003d{"},{"line_number":106,"context_line":"                    \u0027timestamp\u0027: probe[\u0027timestamp\u0027],"},{"line_number":107,"context_line":"                    \u0027w\u0027: probe[\u0027w\u0027]"},{"line_number":108,"context_line":"                }"},{"line_number":109,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsBE%3D","line":107,"in_reply_to":"AAAAM3%2F%2FsLM%3D","updated":"2013-01-09 15:50:11.000000000","message":"You can use \u0027power\u0027. Watt is a power unit, whereas watt per hour is an energy unit (equivalent to Joules for examples), which are 2 different things.\n\nIt is totally pertinent to measure the power usage. If you poll the power usage regularly, you can build a graph of the average power usage of each device.\nAnd, from the timestamped power usage, you can actually derive the power used over time, which is the definition of your \u0027energy\u0027 counter above. So it makes more sense to count for power than for energy, actually. :)","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"dc3872bb8357d12bca9e9a9fc8ec425790e21514","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                timestamp\u003dtimeutils.utcnow().isoformat(),"},{"line_number":105,"context_line":"                resource_metadata\u003d{"},{"line_number":106,"context_line":"                    \u0027timestamp\u0027: probe[\u0027timestamp\u0027],"},{"line_number":107,"context_line":"                    \u0027w\u0027: probe[\u0027w\u0027]"},{"line_number":108,"context_line":"                }"},{"line_number":109,"context_line":"            )"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FsLM%3D","line":107,"in_reply_to":"AAAAM3%2F%2FsNk%3D","updated":"2013-01-09 14:53:01.000000000","message":"Ok. I will do this.\nBut I have to find a new counter name, given that the first one is named \"energy\"...\nI wonder also if this measure is pertinent: \"w\" is the last watt value sent by wattmeter, not the average power consumption since the last poll...","commit_id":"87fe7048365f5b1c2a5321c7a477dc676d651080"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"90d26c338887e65fdd17de0749963e8a2dbb3774","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from ceilometer import counter"},{"line_number":23,"context_line":"from ceilometer.central import plugin"},{"line_number":24,"context_line":"from ceilometer.openstack.common import cfg"},{"line_number":25,"context_line":"from ceilometer.openstack.common import log"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class KwapiClient():"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Fqo4%3D","line":25,"updated":"2013-01-10 09:14:19.000000000","message":"Useless","commit_id":"61edcaefe06a571b85c2aa07c7897b9e43a3e6e6"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"d5ec89c776d135a15e133d53b0a544b154898253","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from ceilometer.openstack.common import cfg"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class KwapiClient():"},{"line_number":28,"context_line":"    \"\"\"Kwapi API client.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, url, token\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Fqmc%3D","line":27,"updated":"2013-01-10 10:16:55.000000000","message":"I think common good practice is to inherits from object so it should be KwapiClient(object). I don\u0027t think it\u0027s implicit.","commit_id":"43b5c2390046651ca4956ffb8b0bcce376e5a718"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"f3798f048a9aee5685ec88b1201e7885923c6cc6","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def iter_probes(self):"},{"line_number":67,"context_line":"        \"\"\"Iterate over all probes.\"\"\""},{"line_number":68,"context_line":"        client \u003d self.get_kwapi_client()"},{"line_number":69,"context_line":"        return client.iter_probes()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Fqlw%3D","line":68,"updated":"2013-01-10 10:36:33.000000000","message":"So we need to create the client, and check keystone for each polling?","commit_id":"43b5c2390046651ca4956ffb8b0bcce376e5a718"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"45f1417a60fc0ec89cf80690ce78c97bc710d5b3","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def iter_probes(self):"},{"line_number":67,"context_line":"        \"\"\"Iterate over all probes.\"\"\""},{"line_number":68,"context_line":"        client \u003d self.get_kwapi_client()"},{"line_number":69,"context_line":"        return client.iter_probes()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FqkI%3D","line":68,"in_reply_to":"AAAAM3%2F%2FqlE%3D","updated":"2013-01-10 11:05:42.000000000","message":"Hmm, if we instantiate only once, not sure if we can handle situation that the kwapi changed the service link situation, or the kwapi pollster start before the kwapi service.\n\nIf we have no method to handle such situation, I\u0027m ok with the current solution.","commit_id":"43b5c2390046651ca4956ffb8b0bcce376e5a718"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"23d0d8a8321c16d8f148474786e1c17fb7113868","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def iter_probes(self):"},{"line_number":67,"context_line":"        \"\"\"Iterate over all probes.\"\"\""},{"line_number":68,"context_line":"        client \u003d self.get_kwapi_client()"},{"line_number":69,"context_line":"        return client.iter_probes()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FqlE%3D","line":68,"in_reply_to":"AAAAM3%2F%2Fqlw%3D","updated":"2013-01-10 10:53:39.000000000","message":"Yes.\nMy code is similar to ceilometer/image/glance.py.\nDo you think it is better to instantiate only once the client?","commit_id":"43b5c2390046651ca4956ffb8b0bcce376e5a718"},{"author":{"_account_id":882,"name":"shengjie min","email":"minshengjie@chinacloud.com.cn","username":"shengjie-min"},"change_message_id":"0038d48d8d2f4b1021a52dd760b3910dfc60f83d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from ceilometer.openstack.common import cfg"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class KwapiClient(object):"},{"line_number":28,"context_line":"    \"\"\"Kwapi API client.\"\"\""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, url, token\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2FqcM%3D","line":27,"updated":"2013-01-10 12:54:53.000000000","message":"Just a little question more than a comment here around the directory structure, does it make sense to have a higher level package like \"monitoring \", then we can start putting monitoring related modules/plugins under there? Because kwapi is not the only plugin for monitoring purpose? we might have synaps, ganglia stuff going forward too? or you prefer to have it separated from others?","commit_id":"5d02108403d55369f92556aa6243b1748eef2467"}],"doc/source/measurements.rst":[{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"b299ab6d90185a6111b099606397251b72505ec2","unresolved":false,"context_lines":[{"line_number":125,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d      \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":126,"context_line":"Name                            Type        Volume      Resource  Note"},{"line_number":127,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d      \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":128,"context_line":"energy                          Delta             kW·h  probe ID  Amount of energy"},{"line_number":129,"context_line":"power                           Gauge                W  probe ID  Power consumption"},{"line_number":130,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"AAAAM3%2F%2FjUs%3D","line":128,"updated":"2013-01-16 10:04:31.000000000","message":"I noticed the \"energy\" is CUMULATIVE in the code and Delta here.","commit_id":"c6edf30a7e6ad3583391b41673d284662065a198"}],"setup.py":[{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"f3798f048a9aee5685ec88b1201e7885923c6cc6","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    image \u003d ceilometer.image.glance:ImagePollster"},{"line_number":122,"context_line":"    image_size \u003d ceilometer.image.glance:ImageSizePollster"},{"line_number":123,"context_line":"    objectstore \u003d ceilometer.objectstore.swift:SwiftPollster"},{"line_number":124,"context_line":"    kwapi \u003d ceilometer.kwapi.kwapi:KwapiPollster"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    [ceilometer.storage]"},{"line_number":127,"context_line":"    log \u003d ceilometer.storage.impl_log:LogStorage"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Fqlo%3D","line":124,"updated":"2013-01-10 10:36:33.000000000","message":"I used to think the kwapi\u0027s data is per-compute information, but according to this, and also the pollster implementation, it\u0027s a global information.\n\nIs my understanding correct?","commit_id":"43b5c2390046651ca4956ffb8b0bcce376e5a718"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"45f1417a60fc0ec89cf80690ce78c97bc710d5b3","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    image \u003d ceilometer.image.glance:ImagePollster"},{"line_number":122,"context_line":"    image_size \u003d ceilometer.image.glance:ImageSizePollster"},{"line_number":123,"context_line":"    objectstore \u003d ceilometer.objectstore.swift:SwiftPollster"},{"line_number":124,"context_line":"    kwapi \u003d ceilometer.kwapi.kwapi:KwapiPollster"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    [ceilometer.storage]"},{"line_number":127,"context_line":"    log \u003d ceilometer.storage.impl_log:LogStorage"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FqkA%3D","line":124,"in_reply_to":"AAAAM3%2F%2Fqk8%3D","updated":"2013-01-10 11:05:42.000000000","message":"Thanks for clarification.","commit_id":"43b5c2390046651ca4956ffb8b0bcce376e5a718"},{"author":{"_account_id":6582,"name":"François Rossigneux","email":"francois.rossigneux@gmail.com","username":"frossigneux"},"change_message_id":"23d0d8a8321c16d8f148474786e1c17fb7113868","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    image \u003d ceilometer.image.glance:ImagePollster"},{"line_number":122,"context_line":"    image_size \u003d ceilometer.image.glance:ImageSizePollster"},{"line_number":123,"context_line":"    objectstore \u003d ceilometer.objectstore.swift:SwiftPollster"},{"line_number":124,"context_line":"    kwapi \u003d ceilometer.kwapi.kwapi:KwapiPollster"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    [ceilometer.storage]"},{"line_number":127,"context_line":"    log \u003d ceilometer.storage.impl_log:LogStorage"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Fqk8%3D","line":124,"in_reply_to":"AAAAM3%2F%2Fqlo%3D","updated":"2013-01-10 10:53:39.000000000","message":"Yes. We are monitoring machines where multiple virtual machines are running.\nSo power consumption is a global information, and not a per-compute information...","commit_id":"43b5c2390046651ca4956ffb8b0bcce376e5a718"}]}
