)]}'
{"quantum/extensions/_portstats_view.py":[{"author":{"_account_id":2170,"name":"Dave Lapsley","email":"david.lapsley@metacloud.com","username":"dlapsley"},"change_message_id":"9f8a5ee1fcbf3630aa939a24e8eb1ccfe021f12e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    rx_errors\u003dportstat_data[\u0027rx_errors\u0027],"},{"line_number":54,"context_line":"                    tx_errors\u003dportstat_data[\u0027tx_errors\u0027],"},{"line_number":55,"context_line":"                    tx_bytes\u003dportstat_data[\u0027tx_bytes\u0027],"},{"line_number":56,"context_line":"                    tx_packets\u003dportstat_data[\u0027tx_packets\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9l0%3D","line":56,"updated":"2012-01-16 23:23:10.000000000","message":"Assuming the returned dict from _build is a subset of portstat_data (as Dan mentioned), one minor change would be to factor out the list of keys (rx_packets, rx_bytes, ...) into a class variable: PORTSTAT_KEYS and then use a generator on these to create the return dictionary:\n\nreturn dict([(x, portstat_data[x]) for x in ViewBuilder.PORTSTAT_KEYS])\n\nWould make it easier to modify the set of desired keys in the future..","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"19ce8d31c346901d7475085f371f35b48caa8803","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    rx_errors\u003dportstat_data[\u0027rx_errors\u0027],"},{"line_number":54,"context_line":"                    tx_errors\u003dportstat_data[\u0027tx_errors\u0027],"},{"line_number":55,"context_line":"                    tx_bytes\u003dportstat_data[\u0027tx_bytes\u0027],"},{"line_number":56,"context_line":"                    tx_packets\u003dportstat_data[\u0027tx_packets\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9o8%3D","line":56,"updated":"2012-01-16 22:32:23.000000000","message":"i\u0027m curious why we don\u0027t just return portstat_data... seems to be a one-to-one mapping.  Or is there additional data in there they we don\u0027t want to return from _build?","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    rx_errors\u003dportstat_data[\u0027rx_errors\u0027],"},{"line_number":54,"context_line":"                    tx_errors\u003dportstat_data[\u0027tx_errors\u0027],"},{"line_number":55,"context_line":"                    tx_bytes\u003dportstat_data[\u0027tx_bytes\u0027],"},{"line_number":56,"context_line":"                    tx_packets\u003dportstat_data[\u0027tx_packets\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FTs%3D","line":56,"in_reply_to":"AAAAD3%2F%2F9o8%3D","updated":"2012-01-24 05:11:58.000000000","message":"Done","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"}],"quantum/extensions/portstats.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"19ce8d31c346901d7475085f371f35b48caa8803","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @classmethod"},{"line_number":45,"context_line":"    def get_alias(cls):"},{"line_number":46,"context_line":"        return \"ovs_portstats\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def get_description(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9pA%3D","line":46,"updated":"2012-01-16 22:32:23.000000000","message":"why does this say \"ovs\" when nothing else does?  Was this supposed to be changed?","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @classmethod"},{"line_number":45,"context_line":"    def get_alias(cls):"},{"line_number":46,"context_line":"        return \"ovs_portstats\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def get_description(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FTo%3D","line":46,"in_reply_to":"AAAAD3%2F%2F9pA%3D","updated":"2012-01-24 05:11:58.000000000","message":"Done","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @classmethod"},{"line_number":45,"context_line":"    def get_alias(cls):"},{"line_number":46,"context_line":"        return \"ovs_portstats\""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @classmethod"},{"line_number":49,"context_line":"    def get_description(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9kQ%3D","line":46,"in_reply_to":"AAAAD3%2F%2F9pA%3D","updated":"2012-01-17 00:09:28.000000000","message":"The rest of the extensions seem to be labeled \"Cisco this\" and \"Cisco that,\" we might want to have a broader naming convention.","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"19ce8d31c346901d7475085f371f35b48caa8803","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def get_namespace(cls):"},{"line_number":54,"context_line":"        return \"http://docs.openstack.org/ext/portstats/api/v1.1\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @classmethod"},{"line_number":57,"context_line":"    def get_updated(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9pE%3D","line":54,"updated":"2012-01-16 22:32:23.000000000","message":"why is this v1.1?","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def get_namespace(cls):"},{"line_number":54,"context_line":"        return \"http://docs.openstack.org/ext/portstats/api/v1.1\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @classmethod"},{"line_number":57,"context_line":"    def get_updated(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FTk%3D","line":54,"in_reply_to":"AAAAD3%2F%2F9pE%3D","updated":"2012-01-24 05:11:58.000000000","message":"Done","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def get_namespace(cls):"},{"line_number":54,"context_line":"        return \"http://docs.openstack.org/ext/portstats/api/v1.1\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @classmethod"},{"line_number":57,"context_line":"    def get_updated(cls):"},{"line_number":58,"context_line":"        return \"2011-12-20T10:00:00-00:00\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9bo%3D","line":55,"updated":"2012-01-17 08:35:50.000000000","message":"I have exactly the same question..","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"19ce8d31c346901d7475085f371f35b48caa8803","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def _show(self, request, tenant_id, network_id, port_id):"},{"line_number":86,"context_line":"        \"\"\"Returns port statistics for a given port\"\"\""},{"line_number":87,"context_line":"        stats \u003d self._plugin.get_port_stats(tenant_id, network_id,"},{"line_number":88,"context_line":"                                            port_id)"},{"line_number":89,"context_line":"        builder \u003d portstats_view.get_view_builder(request)"},{"line_number":90,"context_line":"        result \u003d builder.build(stats, True)"},{"line_number":91,"context_line":"        return dict(stats\u003dresult)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9pM%3D","line":88,"updated":"2012-01-16 22:32:23.000000000","message":"Should this have some kind of a check to make sure the plugin supports this method?  Especially if its still the case that all extensions are loaded for all plugin (is that still the case?)","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def _show(self, request, tenant_id, network_id, port_id):"},{"line_number":86,"context_line":"        \"\"\"Returns port statistics for a given port\"\"\""},{"line_number":87,"context_line":"        stats \u003d self._plugin.get_port_stats(tenant_id, network_id,"},{"line_number":88,"context_line":"                                            port_id)"},{"line_number":89,"context_line":"        builder \u003d portstats_view.get_view_builder(request)"},{"line_number":90,"context_line":"        result \u003d builder.build(stats, True)"},{"line_number":91,"context_line":"        return dict(stats\u003dresult)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9kI%3D","line":88,"in_reply_to":"AAAAD3%2F%2F9pM%3D","updated":"2012-01-17 00:09:28.000000000","message":"Could we also have the QuantumPluginBase pass on this method? It would keep the controller cleaner to not have plugin analysis code here.","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def _show(self, request, tenant_id, network_id, port_id):"},{"line_number":86,"context_line":"        \"\"\"Returns port statistics for a given port\"\"\""},{"line_number":87,"context_line":"        stats \u003d self._plugin.get_port_stats(tenant_id, network_id,"},{"line_number":88,"context_line":"                                            port_id)"},{"line_number":89,"context_line":"        builder \u003d portstats_view.get_view_builder(request)"},{"line_number":90,"context_line":"        result \u003d builder.build(stats, True)"},{"line_number":91,"context_line":"        return dict(stats\u003dresult)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FTg%3D","line":88,"in_reply_to":"AAAAD3%2F%2F9pM%3D","updated":"2012-01-24 05:11:58.000000000","message":"Done","commit_id":"c37f5b730f0321195b6e9ac4586357f32663a47c"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"    def _show(self, request, tenant_id, network_id, port_id):"},{"line_number":87,"context_line":"        \"\"\"Returns port statistics for a given port\"\"\""},{"line_number":88,"context_line":"        if not hasattr(self._plugin, \"get_port_stats\"):"},{"line_number":89,"context_line":"            return dict()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        stats \u003d self._plugin.get_port_stats(tenant_id, network_id,"},{"line_number":92,"context_line":"                                            port_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2FS8%3D","line":89,"updated":"2012-01-24 05:46:20.000000000","message":"What about returning a 501 \"Not Implemented\" here?  It seems like you want to give the API caller a pretty good indication that the request did not succeed.","commit_id":"73f21577ecc5b8f96ca3f1faeb95406613a39482"}]}
