)]}'
{"quantum/api/api_common.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        super(QuantumController, self).__init__()"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def _plugin_can_paginate_lists(self):"},{"line_number":197,"context_line":"        if not hasattr(self._plugin, \u0027can_paginate_lists\u0027):"},{"line_number":198,"context_line":"            return False"},{"line_number":199,"context_line":"        return self._plugin.can_paginate_lists()"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2BU%3D","line":197,"updated":"2012-01-22 23:17:17.000000000","message":"since you added this to the plugin base class, is this hasattr check needed?","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":194,"context_line":"        super(QuantumController, self).__init__()"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def _plugin_can_paginate_lists(self):"},{"line_number":197,"context_line":"        if not hasattr(self._plugin, \u0027can_paginate_lists\u0027):"},{"line_number":198,"context_line":"            return False"},{"line_number":199,"context_line":"        return self._plugin.can_paginate_lists()"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F30%3D","line":197,"in_reply_to":"AAAAEH%2F%2F%2F%2BU%3D","updated":"2012-01-23 15:59:54.000000000","message":"I think this check should be performed, because the plugin is actually not required to inherit from the abstract base class. \nA plugin which just implements the same methods as the ones exposed by quantum_plugin_base will pass all the checks.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"}],"quantum/api/networks.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            This method is specific to Quantum API v1.1"},{"line_number":181,"context_line":"            Adds response pagination capability"},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        networks \u003d self._plugin.get_all_networks(tenant_id)"},{"line_number":184,"context_line":"        # If the plugin does not support list limiting, then we should"},{"line_number":185,"context_line":"        # perform it here."},{"line_number":186,"context_line":"        if not self._plugin_can_paginate_lists():"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2Bk%3D","line":183,"updated":"2012-01-22 23:17:17.000000000","message":"I\u0027m a bit confused here.  Is the marker and limit passed to the plugin?","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":180,"context_line":"            This method is specific to Quantum API v1.1"},{"line_number":181,"context_line":"            Adds response pagination capability"},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        networks \u003d self._plugin.get_all_networks(tenant_id)"},{"line_number":184,"context_line":"        # If the plugin does not support list limiting, then we should"},{"line_number":185,"context_line":"        # perform it here."},{"line_number":186,"context_line":"        if not self._plugin_can_paginate_lists():"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F3w%3D","line":183,"in_reply_to":"AAAAEH%2F%2F%2F%2Bk%3D","updated":"2012-01-23 15:59:54.000000000","message":"They should. But I didn\u0027t. \nAnd this an error that I need to fix. \nThe code, as it is, basically does pagination in the API layer only.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"}],"quantum/api/ports.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            This method is specific to Quantum API v1.1"},{"line_number":172,"context_line":"            Adds response pagination capability"},{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        ports \u003d self._plugin.get_all_ports(tenant_id, network_id)"},{"line_number":175,"context_line":"        # Load extra data for ports if required."},{"line_number":176,"context_line":"        if port_details:"},{"line_number":177,"context_line":"            port_list_detail \u003d \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2Bc%3D","line":174,"updated":"2012-01-22 23:17:17.000000000","message":"same as networks, I\u0027m missing how plugin gets marker + limit.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":171,"context_line":"            This method is specific to Quantum API v1.1"},{"line_number":172,"context_line":"            Adds response pagination capability"},{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        ports \u003d self._plugin.get_all_ports(tenant_id, network_id)"},{"line_number":175,"context_line":"        # Load extra data for ports if required."},{"line_number":176,"context_line":"        if port_details:"},{"line_number":177,"context_line":"            port_list_detail \u003d \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F3s%3D","line":174,"in_reply_to":"AAAAEH%2F%2F%2F%2Bc%3D","updated":"2012-01-23 15:59:54.000000000","message":"My fault.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                [self._plugin.get_port_details("},{"line_number":179,"context_line":"                            tenant_id, network_id, port[\u0027port-id\u0027])"},{"line_number":180,"context_line":"                  for port in ports]"},{"line_number":181,"context_line":"            ports \u003d port_list_detail"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        # If the plugin does not support list limiting, then we should"},{"line_number":184,"context_line":"        # perform it here."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2Bg%3D","line":181,"updated":"2012-01-22 23:17:17.000000000","message":"This makes me wonder if we shouldn\u0027t have a plugin call to do this more efficiently (i.e., one query that returns a list of port details, rather than querying individual for each port detail).  Not needed for this patch, but might be a good thing to file a bug on.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":178,"context_line":"                [self._plugin.get_port_details("},{"line_number":179,"context_line":"                            tenant_id, network_id, port[\u0027port-id\u0027])"},{"line_number":180,"context_line":"                  for port in ports]"},{"line_number":181,"context_line":"            ports \u003d port_list_detail"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        # If the plugin does not support list limiting, then we should"},{"line_number":184,"context_line":"        # perform it here."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F3o%3D","line":181,"in_reply_to":"AAAAEH%2F%2F%2F%2Bg%3D","updated":"2012-01-23 15:59:54.000000000","message":"We already have one outstanding - I think it is \"get_network_detail is inefficient\"","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # If the plugin does not support list limiting, then we should"},{"line_number":184,"context_line":"        # perform it here."},{"line_number":185,"context_line":"        if not self._plugin_can_paginate_lists():"},{"line_number":186,"context_line":"            default_limit \u003d int(self.options[\u0027default_list_limit\u0027])"},{"line_number":187,"context_line":"            ports \u003d common.limited_by_marker(ports,"},{"line_number":188,"context_line":"                                             request,"},{"line_number":189,"context_line":"                                             \u0027port-id\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2BY%3D","line":186,"updated":"2012-01-22 23:17:17.000000000","message":"what about when the tenant passes in their own limit?  Seems like we are only limiting using the default.  I think I\u0027m misunderstanding something about this patch :)","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # If the plugin does not support list limiting, then we should"},{"line_number":184,"context_line":"        # perform it here."},{"line_number":185,"context_line":"        if not self._plugin_can_paginate_lists():"},{"line_number":186,"context_line":"            default_limit \u003d int(self.options[\u0027default_list_limit\u0027])"},{"line_number":187,"context_line":"            ports \u003d common.limited_by_marker(ports,"},{"line_number":188,"context_line":"                                             request,"},{"line_number":189,"context_line":"                                             \u0027port-id\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F3k%3D","line":186,"in_reply_to":"AAAAEH%2F%2F%2F%2BY%3D","updated":"2012-01-23 15:59:54.000000000","message":"limited_by_marker first looks for a limit in the request, and if the limit parameter is not found, it uses the default value.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"}],"quantum/service.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(\u0027quantum.service\u0027)"},{"line_number":25,"context_line":"# Default limit for elements in list responses for Quantum API"},{"line_number":26,"context_line":"DEFAULT_LIMIT \u003d 100"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class WsgiService(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2BQ%3D","line":26,"updated":"2012-01-22 23:17:17.000000000","message":"seems odd that we have the default here and in the conf file, and also that this default is different than the default in the conf file.  one option would be to say that if someone removed the default limit from the conf file, there is no limit.  \n\nAlso, both 100 and 20 strike me as fairly small for a default limit, but I don\u0027t have a lot of context here. What is the goal of setting a default limit on requests?  To prevent the client from accidentally fetching an amount of data that overloads the server?  client?  I\u0027m a bit confused about this patch still though, as I haven\u0027t seen how the limit is actually optionally handled by the plugin itself.  Perhaps it will be more clear from viewing later files.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(\u0027quantum.service\u0027)"},{"line_number":25,"context_line":"# Default limit for elements in list responses for Quantum API"},{"line_number":26,"context_line":"DEFAULT_LIMIT \u003d 100"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class WsgiService(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F3U%3D","line":26,"in_reply_to":"AAAAEH%2F%2F%2F%2BQ%3D","updated":"2012-01-23 15:59:54.000000000","message":"On the double definition of the default limit: this is me being paranoid. I used the constant value in this file to make sure there\u0027s a default value even if no value has been specified in the conf file. Human me says specifying the default limit in the configuration file might be enough.\n\nOn the number of items to fetch by default: I have no idea of what can be an ideal value. I think 100 is also the default limit in Openstack. So we can probably go for that.\n\nAs concern the limit and the plugin, the idea is to pass both \u0027marker\u0027 and \u0027limit\u0027 parameters to the plugin, and let the plugin handle them. The approach is similar to api-filters. You won\u0027t see this behavior in this changeset thought. I forgot to pass them as parameters to the get_all_xxx plugin methods.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"}],"quantum/tests/unit/test_api.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        expected_first_id \u003d self._create_network(fmt, \"net_2\")"},{"line_number":114,"context_line":"        self._create_network(fmt, \"net_3\")"},{"line_number":115,"context_line":"        query_string \u003d \u0027limit\u003d2\u0026marker\u003d%s\u0027 % marker_id"},{"line_number":116,"context_line":"        list_network_req \u003d testlib.network_list_request(self.tenant_id,"},{"line_number":117,"context_line":"                                                        fmt,"},{"line_number":118,"context_line":"                                                        query_string)"},{"line_number":119,"context_line":"        list_network_res \u003d list_network_req.get_response(self.api)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2BM%3D","line":116,"updated":"2012-01-22 23:17:17.000000000","message":"is it valid to use a marker that was not returned from a previous query?  Does this test make an assumption about the order the networks will be returned by the plugin?  if \"net_1\" ended up being at the end of the plugins list of returned items, would we still get two results?  Or maybe I am misunderstanding the meaning of \u0027marker\u0027.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":113,"context_line":"        expected_first_id \u003d self._create_network(fmt, \"net_2\")"},{"line_number":114,"context_line":"        self._create_network(fmt, \"net_3\")"},{"line_number":115,"context_line":"        query_string \u003d \u0027limit\u003d2\u0026marker\u003d%s\u0027 % marker_id"},{"line_number":116,"context_line":"        list_network_req \u003d testlib.network_list_request(self.tenant_id,"},{"line_number":117,"context_line":"                                                        fmt,"},{"line_number":118,"context_line":"                                                        query_string)"},{"line_number":119,"context_line":"        list_network_res \u003d list_network_req.get_response(self.api)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F3M%3D","line":116,"in_reply_to":"AAAAEH%2F%2F%2F%2BM%3D","updated":"2012-01-23 15:59:54.000000000","message":"It is not legal to use a marker which is not a valid resource identifier. A 400 error will be returned in this case.\n\nI agree this test must be changed as the assumption about order cannot be deemed true for all plugins.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"}],"quantum/tests/unit/test_cli.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            db.network_create(self.tenant_id, self.network_name_2)"},{"line_number":218,"context_line":"            LOG.debug(\"CIAO-4\")"},{"line_number":219,"context_line":"            cli.list_nets(self.client, self.tenant_id)"},{"line_number":220,"context_line":"            LOG.debug(\"CIAO-5\")"},{"line_number":221,"context_line":"        except:"},{"line_number":222,"context_line":"            LOG.exception(\"Exception caught: %s\", sys.exc_info())"},{"line_number":223,"context_line":"            self.fail(\"test_list_networks failed due to an exception\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F%2BI%3D","line":220,"updated":"2012-01-22 23:17:17.000000000","message":"i\u0027m guessing this was not intended to be committed.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":217,"context_line":"            db.network_create(self.tenant_id, self.network_name_2)"},{"line_number":218,"context_line":"            LOG.debug(\"CIAO-4\")"},{"line_number":219,"context_line":"            cli.list_nets(self.client, self.tenant_id)"},{"line_number":220,"context_line":"            LOG.debug(\"CIAO-5\")"},{"line_number":221,"context_line":"        except:"},{"line_number":222,"context_line":"            LOG.exception(\"Exception caught: %s\", sys.exc_info())"},{"line_number":223,"context_line":"            self.fail(\"test_list_networks failed due to an exception\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F3E%3D","line":220,"in_reply_to":"AAAAEH%2F%2F%2F%2BI%3D","updated":"2012-01-23 15:59:54.000000000","message":"Why not... I just to say hello 5 times to every body :)","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"}],"quantum/wsgi.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"5d72bc3a52e09b53176ad737cbf873d6bfc7fdbe","unresolved":false,"context_lines":[{"line_number":179,"context_line":"class JSONDictSerializer(DictSerializer):"},{"line_number":180,"context_line":"    \"\"\"Default JSON request body serialization\"\"\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def __init__(self, metadata\u003dNone):"},{"line_number":183,"context_line":"        self._metadata \u003d metadata"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _create_links(self, links_metadata):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F98%3D","line":182,"updated":"2012-01-22 23:17:17.000000000","message":"I don\u0027t really follow a lot of this code here.   Is this code borrowed from another openstack project that already has the links?  If so, we can have pretty high confidence in it.  \n\nI\u0027m hoping most of the content of this file can eventually be replaced with a generic function from openstack-common.  Does that match with your thinking?","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":179,"context_line":"class JSONDictSerializer(DictSerializer):"},{"line_number":180,"context_line":"    \"\"\"Default JSON request body serialization\"\"\""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def __init__(self, metadata\u003dNone):"},{"line_number":183,"context_line":"        self._metadata \u003d metadata"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _create_links(self, links_metadata):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F%2F24%3D","line":182,"in_reply_to":"AAAAEH%2F%2F%2F98%3D","updated":"2012-01-23 15:59:54.000000000","message":"I agree that I\u0027d love to move to Openstack-common as soon as possible, as this will allow us to get rid of the burden for maintaining this code.\n\nThis is actually not borrowed from Openstack code, which has a very plain JSON serializer, which just dumps everything.\nI took it was worth following a better convention for pagination links. The link to the next page is rendered into a \"nextLink\" element; several restFul APIs, including Google\u0027s use this approach. This is something that, in the future, can probably end in openstack-common as well.\n\nHowever, I don\u0027t feel this thing as really important for this branch, and I will therefore be happy to revert the JSON serializer to its basic form.","commit_id":"9dd0ef26b7b127a04ef62ceab3131ba5bbeaa708"}]}
