)]}'
{"ceilometer/central/manager.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0fc21496470bf2c6a7aa3ef1125da72da9f4a12c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.ext_manager.map(self.publish_counters_from_one_pollster,"},{"line_number":55,"context_line":"                             manager\u003dself,"},{"line_number":56,"context_line":"                             context\u003dcontext,"},{"line_number":57,"context_line":"                             ksclient\u003dkeystone,"},{"line_number":58,"context_line":"                             )"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FXTM%3D","line":57,"updated":"2013-01-25 13:33:24.000000000","message":"We are already passing the manager instance as a way to pass global state into the pollsters. Instead of adding more arguments to the plugin API, I would prefer that we add ksclient as an attribute of the manager, maybe using a property so the client is not instantiated until needed. We should also consider whether we can reuse the client manager code in the unified cli project to avoid building something similar.","commit_id":"acb5dec34a443fff7d30c13245ad440ea0840fd0"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"4bffd595f87c464ccc59960d02895bef8dd9f76a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.ext_manager.map(self.publish_counters_from_one_pollster,"},{"line_number":55,"context_line":"                             manager\u003dself,"},{"line_number":56,"context_line":"                             context\u003dcontext,"},{"line_number":57,"context_line":"                             ksclient\u003dkeystone,"},{"line_number":58,"context_line":"                             )"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FXFM%3D","line":57,"in_reply_to":"AAAAM3%2F%2FXGE%3D","updated":"2013-01-25 16:31:22.000000000","message":"No, not done yet, this complicates a lot the test to do that, I\u0027ll do that Monday…","commit_id":"acb5dec34a443fff7d30c13245ad440ea0840fd0"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"2f2e624c9a1864c50e63e2c311b0e66a6c28761c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.ext_manager.map(self.publish_counters_from_one_pollster,"},{"line_number":55,"context_line":"                             manager\u003dself,"},{"line_number":56,"context_line":"                             context\u003dcontext,"},{"line_number":57,"context_line":"                             ksclient\u003dkeystone,"},{"line_number":58,"context_line":"                             )"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FXGE%3D","line":57,"in_reply_to":"AAAAM3%2F%2FXTM%3D","updated":"2013-01-25 16:25:54.000000000","message":"Done","commit_id":"acb5dec34a443fff7d30c13245ad440ea0840fd0"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"152dc0a234985c0a2ac431aa0a2b371ea3d22b12","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.ext_manager.map(self.publish_counters_from_one_pollster,"},{"line_number":55,"context_line":"                             manager\u003dself,"},{"line_number":56,"context_line":"                             context\u003dcontext,"},{"line_number":57,"context_line":"                             ksclient\u003dkeystone,"},{"line_number":58,"context_line":"                             )"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FXGc%3D","line":57,"updated":"2013-01-25 16:39:16.000000000","message":"\u003dkeystone)","commit_id":"e9386dbc3163ea7cac45f93c34944485b1d19892"}],"ceilometer/network/floatingip.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e7fcb15901658104407f5f2e1022aeba909c251e","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    LOG \u003d log.getLogger(__name__ + \u0027.floatingip\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_counters(self, manager, context, ksclient):"},{"line_number":32,"context_line":"        nv \u003d nova_client.Client()"},{"line_number":33,"context_line":"        for ip in nv.floating_ip_get_all():"},{"line_number":34,"context_line":"            self.LOG.info(\"FLOATING IP USAGE: %s\" % ip.address)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FTHI%3D","line":31,"updated":"2013-01-29 20:32:37.000000000","message":"I think you want to remove that ksclient arg now, right?","commit_id":"935e9395d9b42130266b54e142e2145e69addd5b"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0e885421e03f3fdd5c67df6b34c922d2a1ad44d8","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    LOG \u003d log.getLogger(__name__ + \u0027.floatingip\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def get_counters(self, manager, context, ksclient):"},{"line_number":32,"context_line":"        nv \u003d nova_client.Client()"},{"line_number":33,"context_line":"        for ip in nv.floating_ip_get_all():"},{"line_number":34,"context_line":"            self.LOG.info(\"FLOATING IP USAGE: %s\" % ip.address)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSNM%3D","line":31,"in_reply_to":"AAAAM3%2F%2FTHI%3D","updated":"2013-01-30 10:16:57.000000000","message":"Good catch thanks.","commit_id":"935e9395d9b42130266b54e142e2145e69addd5b"}],"ceilometer/objectstore/swift.py":[{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"152dc0a234985c0a2ac431aa0a2b371ea3d22b12","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\"Iterate over all accounts, yielding (tenant_id, stats) tuples.\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def get_counters(self, manager, context, ksclient):"},{"line_number":55,"context_line":"        for tenant, account in self.iter_accounts(ksclient):"},{"line_number":56,"context_line":"            yield counter.Counter("},{"line_number":57,"context_line":"                name\u003d\u0027storage.objects\u0027,"},{"line_number":58,"context_line":"                type\u003dcounter.TYPE_GAUGE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FXFE%3D","line":55,"updated":"2013-01-25 16:39:16.000000000","message":"perhaps the abstraction should be get_counter(tenant, account) instead of passing ksclient into each pollster and, potentially, having the keystone call done every time?","commit_id":"e9386dbc3163ea7cac45f93c34944485b1d19892"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d6466bff60fabef9e47970b0f55ada4612d832d7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\"Iterate over all accounts, yielding (tenant_id, stats) tuples.\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def get_counters(self, manager, context, ksclient):"},{"line_number":55,"context_line":"        for tenant, account in self.iter_accounts(ksclient):"},{"line_number":56,"context_line":"            yield counter.Counter("},{"line_number":57,"context_line":"                name\u003d\u0027storage.objects\u0027,"},{"line_number":58,"context_line":"                type\u003dcounter.TYPE_GAUGE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FT9w%3D","line":55,"in_reply_to":"AAAAM3%2F%2FUJg%3D","updated":"2013-01-29 14:10:55.000000000","message":"That\u0027s an interesting idea, and would let us have the pollster API be consistent again. On the other hand, in the case of the compute agent, we know all of the pollsters are going to be asking for details about instances so there\u0027s no real need to have the pollster call back into the manager to get the list. The central agent pollsters are different because they don\u0027t all work on the same sorts of resources.","commit_id":"e9386dbc3163ea7cac45f93c34944485b1d19892"},{"author":{"_account_id":4573,"name":"yunhong-jiang","email":"yunhong.jiang@intel.com","username":"yunhong-jiang"},"change_message_id":"66ab022b3deb11257959a189f4e6f0f3cc358465","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\"Iterate over all accounts, yielding (tenant_id, stats) tuples.\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def get_counters(self, manager, context, ksclient):"},{"line_number":55,"context_line":"        for tenant, account in self.iter_accounts(ksclient):"},{"line_number":56,"context_line":"            yield counter.Counter("},{"line_number":57,"context_line":"                name\u003d\u0027storage.objects\u0027,"},{"line_number":58,"context_line":"                type\u003dcounter.TYPE_GAUGE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FUJg%3D","line":55,"in_reply_to":"AAAAM3%2F%2FW9I%3D","updated":"2013-01-29 10:21:13.000000000","message":"In fact, I was wondering why should we passing the \"instance\" to get_counter() for the compute node pollster. I checked the history and seems it\u0027s because the nova_notifier may want to passing only one instance to counter.\n\nBut would it be better to have the pollster to check the manager for the instances that want to be polled, just like the ksclient discussed here? One potential benefit is we can fetch the instances counters from hypervisor in batch mode (no idea of any hypervisor support such mode so just  \"potential\" benifit :$). In the nova_notifier situation, we can simply over-write the instances variable in agent_manager.\n\nAny idea?","commit_id":"e9386dbc3163ea7cac45f93c34944485b1d19892"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"89d6a7b61d3c3891b55c78b1d7037e0527c77c72","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\"Iterate over all accounts, yielding (tenant_id, stats) tuples.\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def get_counters(self, manager, context, ksclient):"},{"line_number":55,"context_line":"        for tenant, account in self.iter_accounts(ksclient):"},{"line_number":56,"context_line":"            yield counter.Counter("},{"line_number":57,"context_line":"                name\u003d\u0027storage.objects\u0027,"},{"line_number":58,"context_line":"                type\u003dcounter.TYPE_GAUGE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FW9I%3D","line":55,"in_reply_to":"AAAAM3%2F%2FXFE%3D","updated":"2013-01-25 17:52:10.000000000","message":"We have been trying to keep the get_counters() API agnostic about the values that are used to find the resources the pollster is collecting data about. We do have a separate API for getting counters for instances, which is used by the compute agent. You raise a good point about asking for the tenants and accounts, though. Maybe those should be accessible from an object provided to the pollster by the manager (see my comment on patch 3 about not adding the ksclient argument to get_counters). That object could cache the values, so the first pollster that wants them causes the query and subsequent pollsters reuse the same data. We would need to flush that cache every time we start the task that invokes the pollsters, since the account list can change, but it\u0027s better than having every pollster potentially asking for the same information.","commit_id":"e9386dbc3163ea7cac45f93c34944485b1d19892"}],"tests/network/test_floatingip.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e7fcb15901658104407f5f2e1022aeba909c251e","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_get_counters_not_empty(self):"},{"line_number":62,"context_line":"        counters \u003d list(self.pollster.get_counters(self.manager,"},{"line_number":63,"context_line":"                                                   self.context, None))"},{"line_number":64,"context_line":"        self.assertEqual(len(counters), 3)"},{"line_number":65,"context_line":"        addresses \u003d [c.resource_metadata[\u0027address\u0027]"},{"line_number":66,"context_line":"                     for c in counters"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FTGo%3D","line":63,"updated":"2013-01-29 20:32:37.000000000","message":"You shouldn\u0027t need that third argument.","commit_id":"935e9395d9b42130266b54e142e2145e69addd5b"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0e885421e03f3fdd5c67df6b34c922d2a1ad44d8","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_get_counters_not_empty(self):"},{"line_number":62,"context_line":"        counters \u003d list(self.pollster.get_counters(self.manager,"},{"line_number":63,"context_line":"                                                   self.context, None))"},{"line_number":64,"context_line":"        self.assertEqual(len(counters), 3)"},{"line_number":65,"context_line":"        addresses \u003d [c.resource_metadata[\u0027address\u0027]"},{"line_number":66,"context_line":"                     for c in counters"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSNE%3D","line":63,"in_reply_to":"AAAAM3%2F%2FTGo%3D","updated":"2013-01-30 10:16:57.000000000","message":"Done","commit_id":"935e9395d9b42130266b54e142e2145e69addd5b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"62f1798e3487b8bc32fafa4d64a606a623f43c76","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.stubs.Set(nova_client.Client, \u0027floating_ip_get_all\u0027,"},{"line_number":37,"context_line":"                       self.faux_get_ips)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @staticmethod"},{"line_number":40,"context_line":"    def faux_get_ips(self):"},{"line_number":41,"context_line":"        ips \u003d []"},{"line_number":42,"context_line":"        for i in range(1, 4):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FMJ0%3D","line":39,"updated":"2013-02-04 10:42:58.000000000","message":"I\u0027m confused by this change, specifically why the function signature continues to include an unused self parameter.","commit_id":"427eb19c3e458651f74089bf37b8fc09aa53d609"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"94bb6e43b25cd233de38cf68dd9675efecfc8cbb","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.stubs.Set(nova_client.Client, \u0027floating_ip_get_all\u0027,"},{"line_number":37,"context_line":"                       self.faux_get_ips)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @staticmethod"},{"line_number":40,"context_line":"    def faux_get_ips(self):"},{"line_number":41,"context_line":"        ips \u003d []"},{"line_number":42,"context_line":"        for i in range(1, 4):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FJiY%3D","line":39,"in_reply_to":"AAAAM3%2F%2FJt0%3D","updated":"2013-02-05 16:20:20.000000000","message":"Well it\u0027s a pattern that\u0027s used pretty widely in nova tests, e.g.:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/compute/test_compute.py#L131\n\nCombined with the naming of the first parameter as something other than self, seems clearer than a static method on the test class.","commit_id":"427eb19c3e458651f74089bf37b8fc09aa53d609"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c2c2e5f94d49296530e26d1ce07140fb873a0228","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.stubs.Set(nova_client.Client, \u0027floating_ip_get_all\u0027,"},{"line_number":37,"context_line":"                       self.faux_get_ips)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @staticmethod"},{"line_number":40,"context_line":"    def faux_get_ips(self):"},{"line_number":41,"context_line":"        ips \u003d []"},{"line_number":42,"context_line":"        for i in range(1, 4):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FJt0%3D","line":39,"in_reply_to":"AAAAM3%2F%2FJwU%3D","updated":"2013-02-05 15:05:52.000000000","message":"Bah there\u0027s no reason, and AFAIK nested function are evaluated each time the function is run, which is useless here. :)","commit_id":"427eb19c3e458651f74089bf37b8fc09aa53d609"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"ac6c0ec0d45e2bbf79db4463878942369fb650e7","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.stubs.Set(nova_client.Client, \u0027floating_ip_get_all\u0027,"},{"line_number":37,"context_line":"                       self.faux_get_ips)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @staticmethod"},{"line_number":40,"context_line":"    def faux_get_ips(self):"},{"line_number":41,"context_line":"        ips \u003d []"},{"line_number":42,"context_line":"        for i in range(1, 4):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FMJY%3D","line":39,"in_reply_to":"AAAAM3%2F%2FMJ0%3D","updated":"2013-02-04 11:17:52.000000000","message":"This change is just for correctness indeed.\n\"floating_ip_get_all\" in novaclient.Client is an object method using self.\n\nHere we stub it so self shouldn\u0027t be a TestFloatingIPPollster instance and faux_get_ips shouldn\u0027t be a bound method. We make it static so the \u0027self\u0027 that will be passed when using novaclient.Client will be an instance of novaclient.Client.\n\nI hope I\u0027ve been clear. :)","commit_id":"427eb19c3e458651f74089bf37b8fc09aa53d609"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"9b4cc8b39494f13c70072eae30d20a95394df5cb","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.stubs.Set(nova_client.Client, \u0027floating_ip_get_all\u0027,"},{"line_number":37,"context_line":"                       self.faux_get_ips)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @staticmethod"},{"line_number":40,"context_line":"    def faux_get_ips(self):"},{"line_number":41,"context_line":"        ips \u003d []"},{"line_number":42,"context_line":"        for i in range(1, 4):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FJwU%3D","line":39,"in_reply_to":"AAAAM3%2F%2FMJY%3D","updated":"2013-02-05 14:45:37.000000000","message":"OK, I see ... thanks for the detailed explanation.\n\nMight it be clearer to move faux_get_ips() to be a nested method within setUp()?","commit_id":"427eb19c3e458651f74089bf37b8fc09aa53d609"}]}
