)]}'
{".bzrignore":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":9,"context_line":"*.pid"},{"line_number":10,"context_line":"*.log"},{"line_number":11,"context_line":"quantum/vcsversion.py"},{"line_number":12,"context_line":".ropeproject"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAD3%2F%2F8uk%3D","line":12,"updated":"2012-01-19 08:55:29.000000000","message":"we should probably just get rid of this file now, right?  I don\u0027t think anyone uses bzr anymore (can definitely be a separate commit)","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"}],"quantum/api/networks.py":[{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # on the request query string."},{"line_number":77,"context_line":"        # However, plugins are not required to support filtering."},{"line_number":78,"context_line":"        # In this case, this function will filter the complete list"},{"line_number":79,"context_line":"        # of networks returned by the plugin"},{"line_number":80,"context_line":"        filter_opts \u003d {}"},{"line_number":81,"context_line":"        filter_opts.update(request.str_GET)"},{"line_number":82,"context_line":"        networks \u003d self._plugin.get_all_networks(tenant_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BJE%3D","line":79,"updated":"2012-01-13 23:26:47.000000000","message":"I think this is important enough to put in the docstring.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # on the request query string."},{"line_number":77,"context_line":"        # However, plugins are not required to support filtering."},{"line_number":78,"context_line":"        # In this case, this function will filter the complete list"},{"line_number":79,"context_line":"        # of networks returned by the plugin"},{"line_number":80,"context_line":"        filter_opts \u003d {}"},{"line_number":81,"context_line":"        filter_opts.update(request.str_GET)"},{"line_number":82,"context_line":"        networks \u003d self._plugin.get_all_networks(tenant_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9n4%3D","line":79,"in_reply_to":"AAAAD3%2F%2F%2BJE%3D","updated":"2012-01-16 23:04:57.000000000","message":"Done","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            networks \u003d filters.filter_networks(networks,"},{"line_number":88,"context_line":"                                               self._plugin,"},{"line_number":89,"context_line":"                                               tenant_id,"},{"line_number":90,"context_line":"                                               filter_opts)"},{"line_number":91,"context_line":"        builder \u003d networks_view.get_view_builder(request, self.version)"},{"line_number":92,"context_line":"        result \u003d [builder.build(network, net_details)[\u0027network\u0027]"},{"line_number":93,"context_line":"                  for network in networks]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BIc%3D","line":90,"updated":"2012-01-13 23:26:47.000000000","message":"In general, maybe this would be better handled in the view_builder. This would make this api a little simpler.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":87,"context_line":"            networks \u003d filters.filter_networks(networks,"},{"line_number":88,"context_line":"                                               self._plugin,"},{"line_number":89,"context_line":"                                               tenant_id,"},{"line_number":90,"context_line":"                                               filter_opts)"},{"line_number":91,"context_line":"        builder \u003d networks_view.get_view_builder(request, self.version)"},{"line_number":92,"context_line":"        result \u003d [builder.build(network, net_details)[\u0027network\u0027]"},{"line_number":93,"context_line":"                  for network in networks]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9ns%3D","line":90,"in_reply_to":"AAAAD3%2F%2F%2BIc%3D","updated":"2012-01-16 23:04:57.000000000","message":"I\u0027m not sure that would be better.\nThe view builders in the Quantum API (as well as the other Openstack APIs) are plugin-independent classes which are meant to transform raw data into a format-independent representation which reflect the response the API will return. \nAccording to this definition filtering, but also other tasks as pagination, would fit quite well into the view builder; however since ideally the filtering should be performed by the plugin, and we do it in the API layer only if the plugin does not support it, moving the code in view builder would mean more changes to the view builders to make them aware of plugins. \n\nSo the approach I\u0027m following here, which more or less is the same as the Openstack API, is to provide the view builders with a raw representation of the actual data the API will have to return in the response.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":87,"context_line":"            networks \u003d filters.filter_networks(networks,"},{"line_number":88,"context_line":"                                               self._plugin,"},{"line_number":89,"context_line":"                                               tenant_id,"},{"line_number":90,"context_line":"                                               filter_opts)"},{"line_number":91,"context_line":"        builder \u003d networks_view.get_view_builder(request, self.version)"},{"line_number":92,"context_line":"        result \u003d [builder.build(network, net_details)[\u0027network\u0027]"},{"line_number":93,"context_line":"                  for network in networks]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9ag%3D","line":90,"in_reply_to":"AAAAD3%2F%2F9k4%3D","updated":"2012-01-17 11:06:50.000000000","message":"Making filters support a requirement for the plugin is definitely the final destination we\u0027re aiming to.\nTo get there, we however need a \"transition\" phase. For the Essex release it might have sense to let the API do these \u0027inefficient\u0027 filtering if the plugin does not support it. \nFor the F release, the plan would be to take the filtering logic currently in api/views/filters.py and make it part of of the \u0027abstract db model\u0027 we provide with the Quantum source tree, so that it could be leveraged by plugin implementors (note that using that db framework is however not required, for instance the Cisco plugin has its own db APIs). This update of the DB framework could be achieved also for the Essex release, but it has not be seen so far a high-priority task.\n\nSo summarizing, the current plan is:\n- Essex: either plugin supports filtering or API does it\n- Fxxxx: plugin must support filtering, DB framework provides means for doing it\n\nI agree the condtional code for doing filtering can be moved out of the API controller, thus improving readability and keeping all filtering-related code in one place.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            networks \u003d filters.filter_networks(networks,"},{"line_number":88,"context_line":"                                               self._plugin,"},{"line_number":89,"context_line":"                                               tenant_id,"},{"line_number":90,"context_line":"                                               filter_opts)"},{"line_number":91,"context_line":"        builder \u003d networks_view.get_view_builder(request, self.version)"},{"line_number":92,"context_line":"        result \u003d [builder.build(network, net_details)[\u0027network\u0027]"},{"line_number":93,"context_line":"                  for network in networks]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9k4%3D","line":90,"in_reply_to":"AAAAD3%2F%2F9ns%3D","updated":"2012-01-16 23:53:04.000000000","message":"Now that you mention that I\u0027m also not a fan of the filtering logic being in the view builder. On the other hand I\u0027m not a huge fan of it being in the API. What do you think about just requiring plugins to return filtered data. If they don\u0027t then using those plugins will just be slow. You have provided them with the tools to filter the data if the plugin writer doesn\u0027t want to do it within their DB.\n\nIf that\u0027s not feasible it might be cleaner to move the conditional about actually running the filter into filters.filter_networks. This would get that conditional out of the API, and all of the information necessary to make that call is available in the method call.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011 Citrix Systems."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8sI%3D","line":1,"updated":"2012-01-19 08:55:29.000000000","message":"could update copyright, but this isn\u0027t that important.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":"                               ports_data, port_details)[\u0027network\u0027]"},{"line_number":65,"context_line":"        return dict(network\u003dresult)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _items(self, request, tenant_id, net_details\u003dFalse):"},{"line_number":68,"context_line":"        \"\"\" Returns a list of networks."},{"line_number":69,"context_line":"        Ideally, the plugin would perform filtering,"},{"line_number":70,"context_line":"        returning only the items matching filters specified"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8uI%3D","line":67,"updated":"2012-01-19 08:55:29.000000000","message":"I don\u0027t see any logic limiting the implementation of filters to v1.1 requests.  It would seem a bit odd for them to be supported for v1.0 requests, as it may cause someone to not understand that filters are technically only supported in v1.1, though I don\u0027t think its a huge practical concern.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":64,"context_line":"                               ports_data, port_details)[\u0027network\u0027]"},{"line_number":65,"context_line":"        return dict(network\u003dresult)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _items(self, request, tenant_id, net_details\u003dFalse):"},{"line_number":68,"context_line":"        \"\"\" Returns a list of networks."},{"line_number":69,"context_line":"        Ideally, the plugin would perform filtering,"},{"line_number":70,"context_line":"        returning only the items matching filters specified"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8qM%3D","line":67,"in_reply_to":"AAAAD3%2F%2F8uI%3D","updated":"2012-01-19 09:58:51.000000000","message":"Agreed. Anyway, should we desire full compliance with the API spec, I can alway override _items in the v1.1 controller.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"}],"quantum/api/views/filters.py":[{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if not plugin or not tenant_id:"},{"line_number":46,"context_line":"        return False  # This should never happen"},{"line_number":47,"context_line":"    #load network details if required"},{"line_number":48,"context_line":"    _load_network_ports_details(network, plugin, tenant_id)"},{"line_number":49,"context_line":"    return any([port[\u0027port-op-status\u0027] \u003d\u003d port_op_status"},{"line_number":50,"context_line":"                for port in network[\u0027net-ports\u0027]])"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BIU%3D","line":48,"updated":"2012-01-13 23:26:47.000000000","message":"The previous six lines are in most of the methods here. It would be easier to understand if this was abstracted.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if not plugin or not tenant_id:"},{"line_number":46,"context_line":"        return False  # This should never happen"},{"line_number":47,"context_line":"    #load network details if required"},{"line_number":48,"context_line":"    _load_network_ports_details(network, plugin, tenant_id)"},{"line_number":49,"context_line":"    return any([port[\u0027port-op-status\u0027] \u003d\u003d port_op_status"},{"line_number":50,"context_line":"                for port in network[\u0027net-ports\u0027]])"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9n8%3D","line":48,"in_reply_to":"AAAAD3%2F%2F%2BIU%3D","updated":"2012-01-16 23:04:57.000000000","message":"That would not be a problem at all!","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2012 Citrix Systems"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rE%3D","line":1,"updated":"2012-01-19 08:55:29.000000000","message":"btw, I reviewed this file from bottom to top, so reading comments will probably make more sense in that direction as well.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"    #an \"InternalQuantumError\". We should probably wait for work"},{"line_number":31,"context_line":"    #around API error codes to settle and then add a raise here."},{"line_number":32,"context_line":"    if not plugin or not tenant_id:"},{"line_number":33,"context_line":"        return  # This should never happen"},{"line_number":34,"context_line":"    #load network details only if required"},{"line_number":35,"context_line":"    if not \u0027net-ports\u0027 in network:"},{"line_number":36,"context_line":"        port_list \u003d plugin.get_all_ports(tenant_id, network[\u0027net-id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rI%3D","line":33,"updated":"2012-01-19 08:55:29.000000000","message":"Yeah, I like your suggestion or raising an error.  It seems like returning here will just lead to a less obvious key error in the calling function with they try to access network[\u0027net-ports\u0027] and it is not there.\n\nThat said, I\u0027m not sure how we would every reach this spot if plugin + tenant_id where null, so perhaps just remove the check?","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"    #an \"InternalQuantumError\". We should probably wait for work"},{"line_number":31,"context_line":"    #around API error codes to settle and then add a raise here."},{"line_number":32,"context_line":"    if not plugin or not tenant_id:"},{"line_number":33,"context_line":"        return  # This should never happen"},{"line_number":34,"context_line":"    #load network details only if required"},{"line_number":35,"context_line":"    if not \u0027net-ports\u0027 in network:"},{"line_number":36,"context_line":"        port_list \u003d plugin.get_all_ports(tenant_id, network[\u0027net-id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2Bfo%3D","line":33,"in_reply_to":"AAAAD3%2F%2F8qk%3D","updated":"2012-01-25 01:18:17.000000000","message":"Done","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"    #an \"InternalQuantumError\". We should probably wait for work"},{"line_number":31,"context_line":"    #around API error codes to settle and then add a raise here."},{"line_number":32,"context_line":"    if not plugin or not tenant_id:"},{"line_number":33,"context_line":"        return  # This should never happen"},{"line_number":34,"context_line":"    #load network details only if required"},{"line_number":35,"context_line":"    if not \u0027net-ports\u0027 in network:"},{"line_number":36,"context_line":"        port_list \u003d plugin.get_all_ports(tenant_id, network[\u0027net-id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8qk%3D","line":33,"in_reply_to":"AAAAD3%2F%2F8rI%3D","updated":"2012-01-19 09:58:51.000000000","message":"That is true. Sometime I become really pedant with null value checking.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"def _filter_network_by_name(network, name, **kwargs):"},{"line_number":45,"context_line":"    if not \u0027net-name\u0027 in network:"},{"line_number":46,"context_line":"        return False"},{"line_number":47,"context_line":"    return network[\u0027net-name\u0027] \u003d\u003d name"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def _filter_network_with_operational_port(network, port_op_status,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rM%3D","line":47,"updated":"2012-01-19 08:55:29.000000000","message":"could be a one-liner with network.get(), if you prefer","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":"def _filter_network_by_name(network, name, **kwargs):"},{"line_number":45,"context_line":"    if not \u0027net-name\u0027 in network:"},{"line_number":46,"context_line":"        return False"},{"line_number":47,"context_line":"    return network[\u0027net-name\u0027] \u003d\u003d name"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def _filter_network_with_operational_port(network, port_op_status,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2Bfk%3D","line":47,"in_reply_to":"AAAAD3%2F%2F8rM%3D","updated":"2012-01-25 01:18:17.000000000","message":"Done","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":60,"context_line":"                for port in network[\u0027net-ports\u0027]])"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def _filter_network_has_interface(network, has_interface, **kwargs):"},{"line_number":64,"context_line":"    _load_network_ports_details(network, **kwargs)"},{"line_number":65,"context_line":"    # convert to bool"},{"line_number":66,"context_line":"    if has_interface.lower() \u003d\u003d \u0027true\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rU%3D","line":63,"updated":"2012-01-19 08:55:29.000000000","message":"similar to port_has_interfaces, I think the boolean logic of this function could be condensed to have no if-blocks.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"def _filter_network_has_interface(network, has_interface, **kwargs):"},{"line_number":64,"context_line":"    _load_network_ports_details(network, **kwargs)"},{"line_number":65,"context_line":"    # convert to bool"},{"line_number":66,"context_line":"    if has_interface.lower() \u003d\u003d \u0027true\u0027:"},{"line_number":67,"context_line":"        has_interface \u003d True"},{"line_number":68,"context_line":"    else:"},{"line_number":69,"context_line":"        has_interface \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rc%3D","line":66,"updated":"2012-01-19 08:55:29.000000000","message":"same canonicalization concern as below (I reviewed this file bottom up)","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":72,"context_line":"                      for port in network[\u0027net-ports\u0027]])"},{"line_number":73,"context_line":"    else:"},{"line_number":74,"context_line":"        result \u003d all([port[\u0027attachment\u0027] is None"},{"line_number":75,"context_line":"                      for port in network[\u0027net-ports\u0027]])"},{"line_number":76,"context_line":"    return result"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rY%3D","line":75,"updated":"2012-01-19 08:55:29.000000000","message":"same as below, I\u0027m guessing we somehow know that \u0027attachment\u0027 is always populated?  then some of the checks below are probably unneeded.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":72,"context_line":"                      for port in network[\u0027net-ports\u0027]])"},{"line_number":73,"context_line":"    else:"},{"line_number":74,"context_line":"        result \u003d all([port[\u0027attachment\u0027] is None"},{"line_number":75,"context_line":"                      for port in network[\u0027net-ports\u0027]])"},{"line_number":76,"context_line":"    return result"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2Bfc%3D","line":75,"in_reply_to":"AAAAD3%2F%2F8rY%3D","updated":"2012-01-25 01:18:17.000000000","message":"Done","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _filter_network_by_interface(network, interface_id, **kwargs):"},{"line_number":86,"context_line":"    _load_network_ports_details(network, **kwargs)"},{"line_number":87,"context_line":"    return any([port[\u0027attachment\u0027] \u003d\u003d interface_id"},{"line_number":88,"context_line":"                for port in network[\u0027net-ports\u0027]])"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rg%3D","line":87,"updated":"2012-01-19 08:55:29.000000000","message":"below we check if \u0027attachment\u0027 is in port before indexing, is that necessary here?  I guess we could also just use get() with a default that will never match.  Or do we know that port[\u0027attachment\u0027] will always be populated here?","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _filter_network_by_interface(network, interface_id, **kwargs):"},{"line_number":86,"context_line":"    _load_network_ports_details(network, **kwargs)"},{"line_number":87,"context_line":"    return any([port[\u0027attachment\u0027] \u003d\u003d interface_id"},{"line_number":88,"context_line":"                for port in network[\u0027net-ports\u0027]])"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2BfE%3D","line":87,"in_reply_to":"AAAAD3%2F%2F8rg%3D","updated":"2012-01-25 01:18:17.000000000","message":"Done","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":100,"context_line":"    return network[\u0027net-op-status\u0027] \u003d\u003d op_status"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def _filter_port_by_op_status(port, op_status, **kwargs):"},{"line_number":104,"context_line":"    if not \u0027port-op-status\u0027 in port:"},{"line_number":105,"context_line":"        return False"},{"line_number":106,"context_line":"    return port[\u0027port-op-status\u0027] \u003d\u003d op_status"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rk%3D","line":103,"updated":"2012-01-19 08:55:29.000000000","message":"Do we want to be case-insensitive here?  This is another case where I could imagine a plugin doing things slightly differently if we don\u0027t canonicalize first.\n\nSame could probably be said of a few other functions of this type","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":100,"context_line":"    return network[\u0027net-op-status\u0027] \u003d\u003d op_status"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def _filter_port_by_op_status(port, op_status, **kwargs):"},{"line_number":104,"context_line":"    if not \u0027port-op-status\u0027 in port:"},{"line_number":105,"context_line":"        return False"},{"line_number":106,"context_line":"    return port[\u0027port-op-status\u0027] \u003d\u003d op_status"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2BfU%3D","line":103,"in_reply_to":"AAAAD3%2F%2F8rk%3D","updated":"2012-01-25 01:18:17.000000000","message":"port-op-status is the attribute name for the operational status. Even the api layer expects it to be lowercase.\nIf we want to canonicalize this, I\u0027m ok with it, but I suggest doing it in a different patch.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":117,"context_line":"    if has_interface.lower() \u003d\u003d \u0027true\u0027:"},{"line_number":118,"context_line":"        has_interface \u003d True"},{"line_number":119,"context_line":"    else:"},{"line_number":120,"context_line":"        has_interface \u003d False"},{"line_number":121,"context_line":"    if not \u0027attachment\u0027 in port or port[\u0027attachment\u0027] \u003d\u003d None:"},{"line_number":122,"context_line":"        return not has_interface"},{"line_number":123,"context_line":"    return has_interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8rw%3D","line":120,"updated":"2012-01-19 08:55:29.000000000","message":"I\u0027m a bit worried that a plugin choosing to implement filtering like this might choose subtly different behavior (like requiring the string to actually be \u0027true\u0027 or \u0027false\u0027, otherwise erring.  I wonder if we could do more of the canonicalization logic in the API before handing the query off to the plugin, or your default logic.  For example, any boolean field would be converted from a string to a python boolean before a query is handed off.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":117,"context_line":"    if has_interface.lower() \u003d\u003d \u0027true\u0027:"},{"line_number":118,"context_line":"        has_interface \u003d True"},{"line_number":119,"context_line":"    else:"},{"line_number":120,"context_line":"        has_interface \u003d False"},{"line_number":121,"context_line":"    if not \u0027attachment\u0027 in port or port[\u0027attachment\u0027] \u003d\u003d None:"},{"line_number":122,"context_line":"        return not has_interface"},{"line_number":123,"context_line":"    return has_interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8qg%3D","line":120,"in_reply_to":"AAAAD3%2F%2F8rw%3D","updated":"2012-01-19 09:58:51.000000000","message":"I share your concern. \nHowever, we need to find a place where this canonicalization should be performed. I think we might have a preprocess_filter_options method which return typed filters taking the querystring as input.\nWhat do you reckon?","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":120,"context_line":"        has_interface \u003d False"},{"line_number":121,"context_line":"    if not \u0027attachment\u0027 in port or port[\u0027attachment\u0027] \u003d\u003d None:"},{"line_number":122,"context_line":"        return not has_interface"},{"line_number":123,"context_line":"    return has_interface"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _plugin_can_filter(plugin, resource):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8ro%3D","line":123,"updated":"2012-01-19 08:55:29.000000000","message":"I found this logic confusing, for a couple of reasons.  First, I think the if usage is somewhat more verbose than it needs to be.  Also, has_interface is used both as a string and a boolean.  \n\nTo me it would make sense to do something like: \n\nmatch_if_has_interface \u003d has_interface_str.lower() \u003d\u003d \u0027true\u0027\nreally_has_interface \u003d \u0027attachment\u0027 in port and port[\u0027attachment\u0027] is not None\nreturn match_if_has_interface \u003d\u003d really_has_interface","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":120,"context_line":"        has_interface \u003d False"},{"line_number":121,"context_line":"    if not \u0027attachment\u0027 in port or port[\u0027attachment\u0027] \u003d\u003d None:"},{"line_number":122,"context_line":"        return not has_interface"},{"line_number":123,"context_line":"    return has_interface"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _plugin_can_filter(plugin, resource):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEH%2F%2F%2Bfs%3D","line":123,"in_reply_to":"AAAAD3%2F%2F8ro%3D","updated":"2012-01-25 01:18:17.000000000","message":"Done","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":120,"context_line":"        has_interface \u003d False"},{"line_number":121,"context_line":"    if not \u0027attachment\u0027 in port or port[\u0027attachment\u0027] \u003d\u003d None:"},{"line_number":122,"context_line":"        return not has_interface"},{"line_number":123,"context_line":"    return has_interface"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _plugin_can_filter(plugin, resource):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8qc%3D","line":123,"in_reply_to":"AAAAD3%2F%2F8ro%3D","updated":"2012-01-19 09:58:51.000000000","message":"I\u0027ll try and improve it.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _plugin_can_filter(plugin, resource):"},{"line_number":127,"context_line":"    try:"},{"line_number":128,"context_line":"        func \u003d getattr(plugin, \"can_filter_%s\" % resource)"},{"line_number":129,"context_line":"    except AttributeError:"},{"line_number":130,"context_line":"        return False"},{"line_number":131,"context_line":"    return func"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8r0%3D","line":128,"updated":"2012-01-19 08:55:29.000000000","message":"I wonder if plugins may be able to do some network fields and not others, or some port fields, and not others.  What about passing in the set of fields in the current, in addition to \u0027port\u0027 or \u0027network\u0027 to this call?  A plugin could just ignore the data, in which case it would work as today, or it could make a more intelligent decision based on the exact query.  Given that you\u0027ve already done all of the work to implement a fall-back filtering mechanism, I think it would be cool to let the plugin this kind of control.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def _plugin_can_filter(plugin, resource):"},{"line_number":127,"context_line":"    try:"},{"line_number":128,"context_line":"        func \u003d getattr(plugin, \"can_filter_%s\" % resource)"},{"line_number":129,"context_line":"    except AttributeError:"},{"line_number":130,"context_line":"        return False"},{"line_number":131,"context_line":"    return func"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8qY%3D","line":128,"in_reply_to":"AAAAD3%2F%2F8r0%3D","updated":"2012-01-19 09:58:51.000000000","message":"Do you mean allowing a plugin to support only a subset of the filters specified in the Quantum API? That sounds feasible.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":147,"context_line":"        \u0027has-attachment\u0027: _filter_network_has_interface,"},{"line_number":148,"context_line":"        \u0027attachment\u0027: _filter_network_by_interface,"},{"line_number":149,"context_line":"        \u0027port\u0027: _filter_network_by_port}"},{"line_number":150,"context_line":"    # iterate over networks"},{"line_number":151,"context_line":"    for network in networks:"},{"line_number":152,"context_line":"        result \u003d False"},{"line_number":153,"context_line":"        for flt in filters:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8r4%3D","line":150,"updated":"2012-01-19 08:55:29.000000000","message":"the logic below seems identical between the filter_networks and filter_ports functions.  Perhaps we could code share?","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":147,"context_line":"        \u0027has-attachment\u0027: _filter_network_has_interface,"},{"line_number":148,"context_line":"        \u0027attachment\u0027: _filter_network_by_interface,"},{"line_number":149,"context_line":"        \u0027port\u0027: _filter_network_by_port}"},{"line_number":150,"context_line":"    # iterate over networks"},{"line_number":151,"context_line":"    for network in networks:"},{"line_number":152,"context_line":"        result \u003d False"},{"line_number":153,"context_line":"        for flt in filters:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8qQ%3D","line":150,"in_reply_to":"AAAAD3%2F%2F8r4%3D","updated":"2012-01-19 09:58:51.000000000","message":"Good idea,","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":183,"context_line":"            if flt in filter_opts:"},{"line_number":184,"context_line":"                # Pass plugin, network_id, and tenant_id to filters anyway"},{"line_number":185,"context_line":"                # even though the ones currently defined do not use them"},{"line_number":186,"context_line":"                result \u003d filters[flt](port, filter_opts[flt],"},{"line_number":187,"context_line":"                                      plugin\u003dplugin,"},{"line_number":188,"context_line":"                                      network_id\u003dnetwork_id,"},{"line_number":189,"context_line":"                                      tenant_id\u003dtenant_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8r8%3D","line":186,"updated":"2012-01-19 08:55:29.000000000","message":"minor, but might be more clear what is going on if \u0027result\u0027 had a clearly boolean name like \u0027is_filter_match\u0027","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"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 flt in filter_opts:"},{"line_number":184,"context_line":"                # Pass plugin, network_id, and tenant_id to filters anyway"},{"line_number":185,"context_line":"                # even though the ones currently defined do not use them"},{"line_number":186,"context_line":"                result \u003d filters[flt](port, filter_opts[flt],"},{"line_number":187,"context_line":"                                      plugin\u003dplugin,"},{"line_number":188,"context_line":"                                      network_id\u003dnetwork_id,"},{"line_number":189,"context_line":"                                      tenant_id\u003dtenant_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8qU%3D","line":186,"in_reply_to":"AAAAD3%2F%2F8r8%3D","updated":"2012-01-19 09:58:51.000000000","message":"Done","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"                for port in network[\u0027net-ports\u0027]])"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def _filter_port_by_state(port, state, **kwargs):"},{"line_number":81,"context_line":"    if not \u0027port-state\u0027 in port:"},{"line_number":82,"context_line":"        return False"},{"line_number":83,"context_line":"    return port[\u0027port-state\u0027] \u003d\u003d state"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAEH%2F%2F%2BX0%3D","line":80,"updated":"2012-01-25 04:47:01.000000000","message":"These filter_x_by_y functions could be a little more generic but I think they\u0027re fine by now","commit_id":"10d45aab7c0feb7e5e6172f7ac5486698dd4fd18"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"                for port in network[\u0027net-ports\u0027]])"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def _filter_port_by_state(port, state, **kwargs):"},{"line_number":81,"context_line":"    if not \u0027port-state\u0027 in port:"},{"line_number":82,"context_line":"        return False"},{"line_number":83,"context_line":"    return port[\u0027port-state\u0027] \u003d\u003d state"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAEH%2F%2F%2BTA%3D","line":80,"in_reply_to":"AAAAEH%2F%2F%2BX0%3D","updated":"2012-01-25 08:32:55.000000000","message":"Yeah they should be a one-liner.","commit_id":"10d45aab7c0feb7e5e6172f7ac5486698dd4fd18"}],"quantum/plugins/sample/SamplePlugin.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":165,"context_line":"                                          att_id\u003dport[\u0027interface_id\u0027],"},{"line_number":166,"context_line":"                                          att_port_id\u003dport[\u0027uuid\u0027])"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def get_all_networks(self, tenant_id, **kwargs):"},{"line_number":169,"context_line":"        \"\"\""},{"line_number":170,"context_line":"        Returns a dictionary containing all"},{"line_number":171,"context_line":"        \u003cnetwork_uuid, network_name\u003e for"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8q8%3D","line":168,"updated":"2012-01-19 08:55:29.000000000","message":"I think all plugins will need to have a change like this, otherwise  passing the extra arg to them will fail.  Seems like we have that problem with OVS plugin.  Unit tests are broken: \n\nPLUGIN_DIR\u003dquantum/plugins/openvswitch/ ./run_tests.sh -N","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"unresolved":false,"context_lines":[{"line_number":245,"context_line":"        filter_opts \u003d kwargs.get(\u0027filter_opts\u0027, None)"},{"line_number":246,"context_line":"        if not filter_opts is None and len(filter_opts) \u003e 0:"},{"line_number":247,"context_line":"            LOG.debug(\"filtering options were passed to the plugin\""},{"line_number":248,"context_line":"                      \"but the Fake plugin does not support them\")"},{"line_number":249,"context_line":"        port_ids \u003d []"},{"line_number":250,"context_line":"        ports \u003d db.port_list(net_id)"},{"line_number":251,"context_line":"        for x in ports:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAEH%2F%2F%2BVI%3D","line":248,"updated":"2012-01-25 06:26:23.000000000","message":"Nice detail! maybe we should add the same to all plugins not supporting filters yet!","commit_id":"10d45aab7c0feb7e5e6172f7ac5486698dd4fd18"}],"quantum/quantum_plugin_base.py":[{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    __metaclass__ \u003d ABCMeta"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @abstractmethod"},{"line_number":34,"context_line":"    def get_all_networks(self, tenant_id, **kwargs):"},{"line_number":35,"context_line":"        \"\"\""},{"line_number":36,"context_line":"        Returns a dictionary containing all"},{"line_number":37,"context_line":"        \u003cnetwork_uuid, network_name\u003e for"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BH0%3D","line":34,"updated":"2012-01-13 23:26:47.000000000","message":"If I were designing this instead of the ambiguous kwargs I would use a separate get_networks that takes explicit filtering args. A \u0027get_all\u0027 that is not returning all is not really a \u0027get_all\u0027.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":31,"context_line":"    __metaclass__ \u003d ABCMeta"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @abstractmethod"},{"line_number":34,"context_line":"    def get_all_networks(self, tenant_id, **kwargs):"},{"line_number":35,"context_line":"        \"\"\""},{"line_number":36,"context_line":"        Returns a dictionary containing all"},{"line_number":37,"context_line":"        \u003cnetwork_uuid, network_name\u003e for"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9nk%3D","line":34,"in_reply_to":"AAAAD3%2F%2F%2BH0%3D","updated":"2012-01-16 23:04:57.000000000","message":"That is a good point, and I will raise it up to the mailing list, as it involves the plugin_interface.\nThe goal I am following here is to add the filtering facility without requiring any change to the plugin interface. The blueprint spec has more detail on this point.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"}],"quantum/tests/unit/test_api.py":[{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        self.port22_id \u003d self._create_port(self.net2_id, \"ACTIVE\", self.fmt)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def test_network_name_filter(self):"},{"line_number":155,"context_line":"        LOG.debug(\"test_network_name_filter - START\")"},{"line_number":156,"context_line":"        flt \u003d \"name\u003dtest-1\""},{"line_number":157,"context_line":"        network_data \u003d self._do_filtered_network_list_request(flt)"},{"line_number":158,"context_line":"        # Check network count: should return 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2BH8%3D","line":155,"updated":"2012-01-13 23:26:47.000000000","message":"This explicit logging clutters the tests, is there a reason we are using this instead of nose\u0027s logging?","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":152,"context_line":"        self.port22_id \u003d self._create_port(self.net2_id, \"ACTIVE\", self.fmt)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def test_network_name_filter(self):"},{"line_number":155,"context_line":"        LOG.debug(\"test_network_name_filter - START\")"},{"line_number":156,"context_line":"        flt \u003d \"name\u003dtest-1\""},{"line_number":157,"context_line":"        network_data \u003d self._do_filtered_network_list_request(flt)"},{"line_number":158,"context_line":"        # Check network count: should return 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F9ng%3D","line":155,"in_reply_to":"AAAAD3%2F%2F%2BH8%3D","updated":"2012-01-16 23:04:57.000000000","message":"Just to quickly find bits in the log file created by the test run.\nThese lines can be removed with a cleanup task before release.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":99,"context_line":"             {test_api.NETS: nets.ControllerV11._serialization_metadata,"},{"line_number":100,"context_line":"              test_api.PORTS: ports.ControllerV11._serialization_metadata,"},{"line_number":101,"context_line":"              test_api.ATTS: atts.ControllerV11._serialization_metadata})"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"class APIFiltersTest(test_api.AbstractAPITest):"},{"line_number":105,"context_line":"    \"\"\" Test case for API filters."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAD3%2F%2F8q4%3D","line":102,"updated":"2012-01-19 08:55:29.000000000","message":"very nice tests.","commit_id":"315f4430d2ba518f061224bf3f71cdf00ae39709"}],"run_tests.sh":[{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  esac"},{"line_number":35,"context_line":"}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"venv\u003d.quantum-venv"},{"line_number":38,"context_line":"with_venv\u003dtools/with_venv.sh"},{"line_number":39,"context_line":"always_venv\u003d0"},{"line_number":40,"context_line":"never_venv\u003d0"}],"source_content_type":"text/x-sh","patch_set":2,"id":"AAAAD3%2F%2F%2BJQ%3D","line":37,"updated":"2012-01-13 23:26:47.000000000","message":"I think this would usually be a separate commit.","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":34,"context_line":"  esac"},{"line_number":35,"context_line":"}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"venv\u003d.quantum-venv"},{"line_number":38,"context_line":"with_venv\u003dtools/with_venv.sh"},{"line_number":39,"context_line":"always_venv\u003d0"},{"line_number":40,"context_line":"never_venv\u003d0"}],"source_content_type":"text/x-sh","patch_set":2,"id":"AAAAD3%2F%2F9nc%3D","line":37,"in_reply_to":"AAAAD3%2F%2F%2BJQ%3D","updated":"2012-01-16 23:04:57.000000000","message":"Sorry about this!\nThis is the result of a git mess-up that caused a rebase to be only partially applied to this branch (see comment in the main review page)","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"},{"author":{"_account_id":1456,"name":"Aaron Lee","email":"aaron.lee@rackspace.com","username":"aaron-lee"},"change_message_id":"69c0ee0ed8dcff98711ea1bb35314690aa6f7cc3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"  esac"},{"line_number":35,"context_line":"}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"venv\u003d.quantum-venv"},{"line_number":38,"context_line":"with_venv\u003dtools/with_venv.sh"},{"line_number":39,"context_line":"always_venv\u003d0"},{"line_number":40,"context_line":"never_venv\u003d0"}],"source_content_type":"text/x-sh","patch_set":2,"id":"AAAAD3%2F%2F9kw%3D","line":37,"in_reply_to":"AAAAD3%2F%2F9nc%3D","updated":"2012-01-16 23:53:04.000000000","message":"Sorry, I didn\u0027t see that!","commit_id":"b3bebbcb07691fa9b9c51da3862f5c48d8e117e0"}],"setup_common.py":[{"author":{"_account_id":233,"name":"Brad Hall","email":"brad@nicira.com","username":"bgh"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"exclude \u003d [\u0027quantum.client\u0027, \u0027quantum.client.*\u0027, \u0027quantum.server\u0027,"},{"line_number":46,"context_line":"    \u0027quantum.server.*\u0027, \u0027quantum.tests\u0027, \u0027quantum.tests.*\u0027,"},{"line_number":47,"context_line":"    \u0027quantum.plugins.*\u0027, \u0027quantum.plugins\u0027]"},{"line_number":48,"context_line":"pkgs \u003d find_packages(\u0027.\u0027, exclude\u003dexclude)"},{"line_number":49,"context_line":"pkgs \u003d filter(lambda x: x.startswith(\"quantum\"), pkgs)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAEH%2F%2F%2BXw%3D","line":47,"updated":"2012-01-25 04:47:01.000000000","message":"I think if we do this it doesn\u0027t pick up the __init__.py and breaks some of the installation.. but I could be mis-remembering.  Do you remember why you did this?","commit_id":"10d45aab7c0feb7e5e6172f7ac5486698dd4fd18"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"exclude \u003d [\u0027quantum.client\u0027, \u0027quantum.client.*\u0027, \u0027quantum.server\u0027,"},{"line_number":46,"context_line":"    \u0027quantum.server.*\u0027, \u0027quantum.tests\u0027, \u0027quantum.tests.*\u0027,"},{"line_number":47,"context_line":"    \u0027quantum.plugins.*\u0027, \u0027quantum.plugins\u0027]"},{"line_number":48,"context_line":"pkgs \u003d find_packages(\u0027.\u0027, exclude\u003dexclude)"},{"line_number":49,"context_line":"pkgs \u003d filter(lambda x: x.startswith(\"quantum\"), pkgs)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAEH%2F%2F%2BTE%3D","line":47,"in_reply_to":"AAAAEH%2F%2F%2BXw%3D","updated":"2012-01-25 08:32:55.000000000","message":"I didn\u0027t do this. This is coming from a messed up rebase I did a while ago. Thanks for catching it.","commit_id":"10d45aab7c0feb7e5e6172f7ac5486698dd4fd18"}]}
