)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add support for extended attributes for extension resources"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Idc360f5b3b35fb1d40237e1bbce39684508175cf"},{"line_number":10,"context_line":"Fixes: bug #1116664"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAM3%2F%2FGak%3D","line":10,"updated":"2013-02-07 02:54:19.000000000","message":"This line should be above 9","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add support for extended attributes for extension resources"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Idc360f5b3b35fb1d40237e1bbce39684508175cf"},{"line_number":10,"context_line":"Fixes: bug #1116664"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAM3%2F%2FGSc%3D","line":10,"in_reply_to":"AAAAM3%2F%2FGak%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"}],"quantum/api/extensions.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"change_message_id":"58b88b6a6917ca9d28ac411f2447e1d30d177e0d","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIpY%3D","line":394,"updated":"2013-02-06 00:12:19.000000000","message":"when we talked about this in the past, we had assumed that we would need to add some mechanism to make sure extensions were loaded in an order determined by dependencies, since the extension extending another extension must be loaded later.  I don\u0027t see anything related to that here, so were we incorrect in our original thinking?","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHS4%3D","line":394,"in_reply_to":"AAAAM3%2F%2FHTs%3D","updated":"2013-02-06 19:21:26.000000000","message":"I can raise an exception but that would be a different behavior as extending core resources. How about just do a LOG.warning here?","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHTs%3D","line":394,"in_reply_to":"AAAAM3%2F%2FHU8%3D","updated":"2013-02-06 19:15:15.000000000","message":"It depends on which spec we choose.\nIf we don\u0027t allow overwriting, we should error handling the case","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHU8%3D","line":394,"in_reply_to":"AAAAM3%2F%2FHXc%3D","updated":"2013-02-06 19:09:23.000000000","message":"Is it a valid use case? I believe currently the framework doesn\u0027t expect this kind of behavior, even for the extending core resources. If this is desired, we need to investigate bug #1065319 as suggested by Salvatore to have the framework support ordered plugin loading.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHaU%3D","line":394,"in_reply_to":"AAAAM3%2F%2FHbE%3D","updated":"2013-02-06 18:30:14.000000000","message":"If an extension doesn\u0027t want it attributes to be extended, just don\u0027t implement \"get_attribute_map\" method.\n\nAs the order of loading extensions, it\u0027s being explained by my other responses.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHXc%3D","line":394,"in_reply_to":"AAAAM3%2F%2FHds%3D","updated":"2013-02-06 18:52:18.000000000","message":"so my question is what\u0027s if two extension trying to update same attribute?","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHds%3D","line":394,"in_reply_to":"AAAAM3%2F%2FIKM%3D","updated":"2013-02-06 18:27:29.000000000","message":"Correct. The extensions\u0027 attribute are not loaded into RESOURCE_ATTRIBUTE_MAP, only extended attributes are. And according to the trace I did, there is not dependency issue because the framework will load extensions\u0027 extended attributes to RESOURCE_ATTRIBUTE_MAP from all extensions first, then load the extensions\u0027 own attribute.\n\nI\u0027ll add get_attribute_map to ExtensionDescriptor and put a docstring there.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHbE%3D","line":394,"in_reply_to":"AAAAM3%2F%2FIKM%3D","updated":"2013-02-06 18:25:45.000000000","message":"Question: we should allow overwrite attribute on an extension by another extension? For instance, can we update external_gateway_info on router by another etension.\nIf we allow this, IMO, the order of loading extension matters.\nIf we don\u0027t allow this, we should check this.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIKM%3D","line":394,"in_reply_to":"AAAAM3%2F%2FIn8%3D","updated":"2013-02-06 10:48:59.000000000","message":"I did similar a code change for a patch that was never pushed (because in the end we did not need  the extension on the extension). We solved that by loading extensions in an order such that it ensure that extensions extending other extensions would be loaded after their parent extensions. So I understand where Dan is coming from. Unfortunately, that approach is not working anymore. I recently found out that extensions are actually not being loaded into ATTRIBUTES_MAP (they used to I think) - this kind of solves the issue, even if there\u0027s still a dependency on the loading order, I believe, but cannot confirm that now.\n\nThis approach relies on the fact that an extension exposed the actual attribute map object. The implementation of get_attribute_map however might return a copy of the object, or just a literal; so in that the case the approach won\u0027t work. This needs to be documented with a docstring.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":392,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":393,"context_line":"                        attr_map.update("},{"line_number":394,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":395,"context_line":"            except AttributeError:"},{"line_number":396,"context_line":"                pass"},{"line_number":397,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIn8%3D","line":394,"in_reply_to":"AAAAM3%2F%2FIpY%3D","updated":"2013-02-06 00:29:34.000000000","message":"The order of extensions being loaded does not matter in this case. The framework loads all extensions and extend attributes.RESOURCE_ATTRIBUTE_MAP first during extend_resources(). So by the time the framework invoke get_resources() to add extension resources, the attributes.RESOURCE_ATTRIBUTE_MAP already contains all attributes (including extended attributes) for core resources, and extended attributes for extension resources.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":33,"context_line":"from quantum.openstack.common import cfg"},{"line_number":34,"context_line":"from quantum.openstack.common import log as logging"},{"line_number":35,"context_line":"from quantum import wsgi"},{"line_number":36,"context_line":"from quantum.api.v2 import attributes"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"LOG \u003d logging.getLogger(\u0027quantum.api.extensions\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGgA%3D","line":36,"updated":"2013-02-07 02:54:19.000000000","message":"nit: this is already done on line 28.","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from quantum.openstack.common import cfg"},{"line_number":34,"context_line":"from quantum.openstack.common import log as logging"},{"line_number":35,"context_line":"from quantum import wsgi"},{"line_number":36,"context_line":"from quantum.api.v2 import attributes"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"LOG \u003d logging.getLogger(\u0027quantum.api.extensions\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGUU%3D","line":36,"in_reply_to":"AAAAM3%2F%2FGgA%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":165,"context_line":"        Returns the attribute map for the extension. This method must return"},{"line_number":166,"context_line":"        the attribute map itself, not a copy of it, as the framework will need"},{"line_number":167,"context_line":"        to update the attribute map in case other extensions need to extend"},{"line_number":168,"context_line":"        this extension\u0027s attributes"},{"line_number":169,"context_line":"        \"\"\""},{"line_number":170,"context_line":"        return {}"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGfw%3D","line":168,"updated":"2013-02-07 02:54:19.000000000","message":"nit: attributes.","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        Returns the attribute map for the extension. This method must return"},{"line_number":166,"context_line":"        the attribute map itself, not a copy of it, as the framework will need"},{"line_number":167,"context_line":"        to update the attribute map in case other extensions need to extend"},{"line_number":168,"context_line":"        this extension\u0027s attributes"},{"line_number":169,"context_line":"        \"\"\""},{"line_number":170,"context_line":"        return {}"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGUM%3D","line":168,"in_reply_to":"AAAAM3%2F%2FGfw%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":403,"context_line":"                        attr_map.update("},{"line_number":404,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":405,"context_line":"            except AttributeError:"},{"line_number":406,"context_line":"                pass"},{"line_number":407,"context_line":"            try:"},{"line_number":408,"context_line":"                resources.extend(ext.get_resources())"},{"line_number":409,"context_line":"            except AttributeError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGfc%3D","line":406,"updated":"2013-02-07 02:54:19.000000000","message":"nit: can you add a comment why we AttributeError would be raised and why we are passing?","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                        attr_map.update("},{"line_number":404,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":405,"context_line":"            except AttributeError:"},{"line_number":406,"context_line":"                pass"},{"line_number":407,"context_line":"            try:"},{"line_number":408,"context_line":"                resources.extend(ext.get_resources())"},{"line_number":409,"context_line":"            except AttributeError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FFmE%3D","line":406,"in_reply_to":"AAAAM3%2F%2FGTg%3D","updated":"2013-02-07 14:55:01.000000000","message":"It turned out some existing extensions do not inherit from ExtensionDescriptor and can still cause AttributeError exception. Add try/except back and comments","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                        attr_map.update("},{"line_number":404,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":405,"context_line":"            except AttributeError:"},{"line_number":406,"context_line":"                pass"},{"line_number":407,"context_line":"            try:"},{"line_number":408,"context_line":"                resources.extend(ext.get_resources())"},{"line_number":409,"context_line":"            except AttributeError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGTg%3D","line":406,"in_reply_to":"AAAAM3%2F%2FGfc%3D","updated":"2013-02-07 04:42:59.000000000","message":"No get_attributes_map is added to ExtensionDescriptor so AttributeError shouldn\u0027t happen anymore. Removed try/except.","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":397,"context_line":"        for ext in self.extensions.itervalues():"},{"line_number":398,"context_line":"            # extending extension resources\u0027 attributes"},{"line_number":399,"context_line":"            try:"},{"line_number":400,"context_line":"                attr_maps \u003d ext.get_attributes_map()"},{"line_number":401,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":402,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":403,"context_line":"                        attr_map.update("}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8sY%3D","line":400,"updated":"2013-02-13 16:27:52.000000000","message":"Your implementing a get with the caveat the it does not have to return a copy of the value, because you want to update it.\n\nTo me it sounds like you want an update method.","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        for ext in self.extensions.itervalues():"},{"line_number":398,"context_line":"            # extending extension resources\u0027 attributes"},{"line_number":399,"context_line":"            try:"},{"line_number":400,"context_line":"                attr_maps \u003d ext.get_attributes_map()"},{"line_number":401,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":402,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":403,"context_line":"                        attr_map.update("}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8Zg%3D","line":400,"in_reply_to":"AAAAM3%2F%2B8sY%3D","updated":"2013-02-13 18:37:09.000000000","message":"Done","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":401,"context_line":"                for collection_name, attr_map in attr_maps.iteritems():"},{"line_number":402,"context_line":"                    if collection_name in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":403,"context_line":"                        attr_map.update("},{"line_number":404,"context_line":"                            attributes.RESOURCE_ATTRIBUTE_MAP[collection_name])"},{"line_number":405,"context_line":"            except AttributeError:"},{"line_number":406,"context_line":"                \"\"\""},{"line_number":407,"context_line":"                Some existing extensions do not inherit ExtensionDescriptor"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8ss%3D","line":404,"updated":"2013-02-13 16:27:52.000000000","message":"This method, at runtime, is invoked by the extension middleware.\n\nIt is working because - the API router runs extend_resources, which ends up adding the \u0027extended\u0027 attribute (and not the extension!) into RESOURCE_ATTRIBUTE_MAP.\n\nWhen the extension middleware then runs get_resources to generate the extension controllers, this will extend the extension with the extended attribute.\n\nThis is probably a bit clunky - especially as the WSGI framework loads the main API app and the extensions as two distinct application, it might also happen in the future that the order is inverted!","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def update_attributes_map(self, resource, attributes):"},{"line_number":163,"context_line":"        \"\"\"Update attributes map for this extension\"\"\""},{"line_number":164,"context_line":"        return {}"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"class ActionExtensionController(wsgi.Controller):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B6%2FE%3D","line":164,"updated":"2013-02-14 12:00:14.000000000","message":"This will give every extension inheriting from this class this method.\n\nNot harmful, but probably unnecessary (as the getattr we do below will return the method even if empty)","commit_id":"f8d291850fd06f64a045645f97dc738b855fbd3f"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def update_attributes_map(self, resource, attributes):"},{"line_number":163,"context_line":"        \"\"\"Update attributes map for this extension\"\"\""},{"line_number":164,"context_line":"        return {}"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"class ActionExtensionController(wsgi.Controller):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B6zI%3D","line":164,"in_reply_to":"AAAAM3%2F%2B6%2FE%3D","updated":"2013-02-14 16:00:48.000000000","message":"As stated by the docstring in ExtensionDescriptor, this class defines the contract for extensions, I think we should have this empty method declared here. And it\u0027s not required for an extension to derive from this class, so getattr below can still return None.\n\nAlso I found one problem for this patch. As we do not require every extension to put all their attributes map in RESOURCE_ATTRIBUTE_MAP, i.e., not all extensions will return their resources from get_extended_resources. Instead of getting resources from get_extended_resources, now I passed in entire RESOURCE_ATTRIBUTE_MAP to update_attributes_map and let the extension itself decide what to be extended (but it can just invoke ExtensionDescriptor.update_attributes_map providing its resource attributes map for default behavior).","commit_id":"f8d291850fd06f64a045645f97dc738b855fbd3f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        After this function, we will extend the attr_map if an extension"},{"line_number":432,"context_line":"        wants to extend this map."},{"line_number":433,"context_line":"        \"\"\""},{"line_number":434,"context_line":"        for ext in self.extensions.itervalues():"},{"line_number":435,"context_line":"            if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":436,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B6%2FQ%3D","line":433,"updated":"2013-02-14 12:00:14.000000000","message":"A little optimization could consist in storing here all the extensions whose attribute map needs to be updated, and which resources they are exposing.\n\nAt the end of this loop attr_map will contain up-to-date information for all resources.\n\nSo in the next iteration you might just loop over those extension, use a dict for retrieving the resources which are part of their attribute map, and just call update_attribute_map.\n\nI have not tested this code so it might not work.","commit_id":"f8d291850fd06f64a045645f97dc738b855fbd3f"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        After this function, we will extend the attr_map if an extension"},{"line_number":432,"context_line":"        wants to extend this map."},{"line_number":433,"context_line":"        \"\"\""},{"line_number":434,"context_line":"        for ext in self.extensions.itervalues():"},{"line_number":435,"context_line":"            if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":436,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B6sE%3D","line":433,"in_reply_to":"AAAAM3%2F%2B6%2FQ%3D","updated":"2013-02-14 16:00:48.000000000","message":"Done","commit_id":"f8d291850fd06f64a045645f97dc738b855fbd3f"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":447,"context_line":"                LOG.exception(_(\"Error fetching extended attributes for \""},{"line_number":448,"context_line":"                                \"extension \u0027%s\u0027\"), ext.get_name())"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        for ext in self.extensions.itervalues():"},{"line_number":451,"context_line":"            if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":452,"context_line":"                continue"},{"line_number":453,"context_line":"            update_attributes_map \u003d getattr(ext, \u0027update_attributes_map\u0027, None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B6%2FY%3D","line":450,"updated":"2013-02-14 12:00:14.000000000","message":"Please add a comment before line 450 to explain why we have this second iteration","commit_id":"f8d291850fd06f64a045645f97dc738b855fbd3f"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                LOG.exception(_(\"Error fetching extended attributes for \""},{"line_number":448,"context_line":"                                \"extension \u0027%s\u0027\"), ext.get_name())"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        for ext in self.extensions.itervalues():"},{"line_number":451,"context_line":"            if not hasattr(ext, \u0027get_extended_resources\u0027):"},{"line_number":452,"context_line":"                continue"},{"line_number":453,"context_line":"            update_attributes_map \u003d getattr(ext, \u0027update_attributes_map\u0027, None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B6y8%3D","line":450,"in_reply_to":"AAAAM3%2F%2B6%2FY%3D","updated":"2013-02-14 16:00:48.000000000","message":"Done","commit_id":"f8d291850fd06f64a045645f97dc738b855fbd3f"}],"quantum/tests/unit/extensions/extended_attribute.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":28,"context_line":"}"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Extended_attribute(extensions.ExtensionDescriptor):"},{"line_number":32,"context_line":"    \"\"\"Extension class supporting extended attribute for router"},{"line_number":33,"context_line":"    \"\"\""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8t0%3D","line":31,"updated":"2013-02-13 16:27:52.000000000","message":"Consider camel case for class names: ExtendedAttribute\n\n(even if you\u0027ll then have to change the module name because of the loading mechanism)","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":28,"context_line":"}"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Extended_attribute(extensions.ExtensionDescriptor):"},{"line_number":32,"context_line":"    \"\"\"Extension class supporting extended attribute for router"},{"line_number":33,"context_line":"    \"\"\""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8lI%3D","line":31,"in_reply_to":"AAAAM3%2F%2B8t0%3D","updated":"2013-02-13 18:37:09.000000000","message":"It cannot be camel case because the extension framework loads an extension class as\next_name \u003d mod_name[0].upper() + mod_name[1:]\n\nI was using Extendedattribute but one reviewer asked to change the module name to extended_attribute so....\n\nI\u0027ll revert back to use Extendedattribute as that\u0027s what other extensions use.","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"}],"quantum/tests/unit/extensions/extendedattribute.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from quantum.api.v2 import attributes"},{"line_number":21,"context_line":"from quantum.common import exceptions as qexception"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"EXTENDED_ATTRIBUTE \u003d \u0027extended_attribute\u0027"},{"line_number":24,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIJI%3D","line":21,"updated":"2013-02-06 10:48:59.000000000","message":"Both imports are unused.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from quantum.api.v2 import attributes"},{"line_number":21,"context_line":"from quantum.common import exceptions as qexception"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"EXTENDED_ATTRIBUTE \u003d \u0027extended_attribute\u0027"},{"line_number":24,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHdM%3D","line":21,"in_reply_to":"AAAAM3%2F%2FIJI%3D","updated":"2013-02-06 18:27:29.000000000","message":"Done","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"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 2013 VMware, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGfE%3D","line":1,"updated":"2013-02-07 02:54:19.000000000","message":"nit: can you rename this file to: extened_attribute.py","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","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 2013 VMware, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGTA%3D","line":1,"in_reply_to":"AAAAM3%2F%2FGfE%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"EXTENDED_ATTRIBUTE \u003d \u0027extended_attribute\u0027"},{"line_number":21,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":22,"context_line":"    \u0027extobjtests\u0027: {"},{"line_number":23,"context_line":"        EXTENDED_ATTRIBUTE: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":24,"context_line":"                             \u0027validate\u0027: {\u0027type:uuid_or_none\u0027: None},"},{"line_number":25,"context_line":"                             \u0027default\u0027: None, \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGes%3D","line":22,"updated":"2013-02-07 02:54:19.000000000","message":"How about  extobjtests -\u003e test_attributes or ext_obj_tests something more readable with \u0027_\u0027 .","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"EXTENDED_ATTRIBUTE \u003d \u0027extended_attribute\u0027"},{"line_number":21,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":22,"context_line":"    \u0027extobjtests\u0027: {"},{"line_number":23,"context_line":"        EXTENDED_ATTRIBUTE: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":24,"context_line":"                             \u0027validate\u0027: {\u0027type:uuid_or_none\u0027: None},"},{"line_number":25,"context_line":"                             \u0027default\u0027: None, \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGTM%3D","line":22,"in_reply_to":"AAAAM3%2F%2FGes%3D","updated":"2013-02-07 04:42:59.000000000","message":"rename to ext_test_resources","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"}],"quantum/tests/unit/extensions/extension_attribute.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class Extension_attribute(extensions.ExtensionDescriptor):"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"},{"line_number":48,"context_line":"    def get_name(cls):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8t4%3D","line":45,"updated":"2013-02-13 16:27:52.000000000","message":"Consider camelcase for classnames: ExtensionAttribute","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class Extension_attribute(extensions.ExtensionDescriptor):"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"},{"line_number":48,"context_line":"    def get_name(cls):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8lA%3D","line":45,"in_reply_to":"AAAAM3%2F%2B8t4%3D","updated":"2013-02-13 18:37:09.000000000","message":"I\u0027ll revert it back to Extensionattribute as this is what other extensions use.","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"}],"quantum/tests/unit/extensions/extensionattribute.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"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 Nicira Networks, Inc."},{"line_number":4,"context_line":"# All rights reserved."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIJ4%3D","line":1,"updated":"2013-02-06 10:48:59.000000000","message":"Is there a chance to reuse v2Attributes instead of adding another module here?\n\nI\u0027m asking just for the sake of reducing the size of this patch as well as the number of \u0027fake\u0027 extension modules.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","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 Nicira Networks, Inc."},{"line_number":4,"context_line":"# All rights reserved."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHdA%3D","line":1,"in_reply_to":"AAAAM3%2F%2FIJ4%3D","updated":"2013-02-06 18:27:29.000000000","message":"v2ttributes extends core resource \"networks\" so we cannot use it.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"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 Nicira Networks, Inc."},{"line_number":4,"context_line":"# All rights reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIJw%3D","line":3,"updated":"2013-02-06 10:48:59.000000000","message":"Pedant Nits: 2013 on line 3 and different companies on lines 3 and 18","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":21,"context_line":"from abc import abstractmethod"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from quantum.api import extensions"},{"line_number":24,"context_line":"from quantum.api.v2 import attributes as attr"},{"line_number":25,"context_line":"from quantum.api.v2 import base"},{"line_number":26,"context_line":"from quantum.common import exceptions as qexception"},{"line_number":27,"context_line":"from quantum import manager"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIIs%3D","line":24,"updated":"2013-02-06 10:48:59.000000000","message":"Unused import (same at line 26 and 28)","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from abc import abstractmethod"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from quantum.api import extensions"},{"line_number":24,"context_line":"from quantum.api.v2 import attributes as attr"},{"line_number":25,"context_line":"from quantum.api.v2 import base"},{"line_number":26,"context_line":"from quantum.common import exceptions as qexception"},{"line_number":27,"context_line":"from quantum import manager"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHc0%3D","line":24,"in_reply_to":"AAAAM3%2F%2FIIs%3D","updated":"2013-02-06 18:27:29.000000000","message":"Done","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"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 2013 VMware, Inc."},{"line_number":4,"context_line":"# All rights reserved."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGcM%3D","line":1,"updated":"2013-02-07 02:54:19.000000000","message":"nit: can we rename this to extension_attribute.py","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","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 2013 VMware, Inc."},{"line_number":4,"context_line":"# All rights reserved."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGS8%3D","line":1,"in_reply_to":"AAAAM3%2F%2FGcM%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Attribute Map"},{"line_number":30,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":31,"context_line":"    \u0027extobjtests\u0027: {"},{"line_number":32,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":33,"context_line":"               \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":34,"context_line":"               \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGec%3D","line":31,"updated":"2013-02-07 02:54:19.000000000","message":"ditto previous comment about name.","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# Attribute Map"},{"line_number":30,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":31,"context_line":"    \u0027extobjtests\u0027: {"},{"line_number":32,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":33,"context_line":"               \u0027validate\u0027: {\u0027type:uuid\u0027: None},"},{"line_number":34,"context_line":"               \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGS4%3D","line":31,"in_reply_to":"AAAAM3%2F%2FGec%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"}],"quantum/tests/unit/test_extension_extended_attribute.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def tearDown(self):"},{"line_number":102,"context_line":"        self.ext_api \u003d None"},{"line_number":103,"context_line":"        cfg.CONF.reset()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _api(self, path):"},{"line_number":106,"context_line":"            return self.ext_api"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FIGU%3D","line":103,"updated":"2013-02-06 10:48:59.000000000","message":"bear in mind that in order to appropriately perform these tests you should clear the RESOURCE ATTRIBUTE MAP in teardown, as you\u0027re adding a new element to it in setup.\n\nWe do something similar in test_db_plugin.py, I think.","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def tearDown(self):"},{"line_number":102,"context_line":"        self.ext_api \u003d None"},{"line_number":103,"context_line":"        cfg.CONF.reset()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _api(self, path):"},{"line_number":106,"context_line":"            return self.ext_api"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FHbk%3D","line":103,"in_reply_to":"AAAAM3%2F%2FIGU%3D","updated":"2013-02-06 18:27:29.000000000","message":"Done","commit_id":"304550a7a5376bd18da8e1f913d4359f7a88a95b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":21,"context_line":"\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import quantum"},{"line_number":24,"context_line":"import copy"},{"line_number":25,"context_line":"import webob.exc as webexc"},{"line_number":26,"context_line":"import unittest2 as unittest"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGbk%3D","line":24,"updated":"2013-02-07 02:54:19.000000000","message":"nit: unused","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import quantum"},{"line_number":24,"context_line":"import copy"},{"line_number":25,"context_line":"import webob.exc as webexc"},{"line_number":26,"context_line":"import unittest2 as unittest"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGS0%3D","line":24,"in_reply_to":"AAAAM3%2F%2FGbk%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":30,"context_line":"from quantum.plugins.common import constants"},{"line_number":31,"context_line":"from quantum.api.extensions import ExtensionMiddleware"},{"line_number":32,"context_line":"from quantum.api.extensions import PluginAwareExtensionManager"},{"line_number":33,"context_line":"from quantum.extensions import l3"},{"line_number":34,"context_line":"from quantum.plugins.openvswitch import ovs_quantum_plugin"},{"line_number":35,"context_line":"from quantum.api.v2.router import APIRouter"},{"line_number":36,"context_line":"from quantum.api.v2 import attributes"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGbY%3D","line":33,"updated":"2013-02-07 02:54:19.000000000","message":"nit: unsed","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from quantum.plugins.common import constants"},{"line_number":31,"context_line":"from quantum.api.extensions import ExtensionMiddleware"},{"line_number":32,"context_line":"from quantum.api.extensions import PluginAwareExtensionManager"},{"line_number":33,"context_line":"from quantum.extensions import l3"},{"line_number":34,"context_line":"from quantum.plugins.openvswitch import ovs_quantum_plugin"},{"line_number":35,"context_line":"from quantum.api.v2.router import APIRouter"},{"line_number":36,"context_line":"from quantum.api.v2 import attributes"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGSw%3D","line":33,"in_reply_to":"AAAAM3%2F%2FGbY%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":37,"context_line":"from quantum.wsgi import Serializer"},{"line_number":38,"context_line":"from quantum.tests.unit import test_api_v2"},{"line_number":39,"context_line":"from quantum.tests.unit.testlib_api import create_request"},{"line_number":40,"context_line":"from quantum.tests.unit.extensions import extensionattribute as extattr"},{"line_number":41,"context_line":"from quantum.tests.unit.extensions import extendedattribute as extattr2"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"_uuid \u003d test_api_v2._uuid"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGbQ%3D","line":40,"updated":"2013-02-07 02:54:19.000000000","message":"nit: unused.","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from quantum.wsgi import Serializer"},{"line_number":38,"context_line":"from quantum.tests.unit import test_api_v2"},{"line_number":39,"context_line":"from quantum.tests.unit.testlib_api import create_request"},{"line_number":40,"context_line":"from quantum.tests.unit.extensions import extensionattribute as extattr"},{"line_number":41,"context_line":"from quantum.tests.unit.extensions import extendedattribute as extattr2"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"_uuid \u003d test_api_v2._uuid"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGSo%3D","line":40,"in_reply_to":"AAAAM3%2F%2FGbQ%3D","updated":"2013-02-07 04:42:59.000000000","message":"Done","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":99,"context_line":"            {constants.CORE: ExtensionExtendedAttributeTestPlugin}"},{"line_number":100,"context_line":"        )"},{"line_number":101,"context_line":"        PluginAwareExtensionManager._instance \u003d ext_mgr"},{"line_number":102,"context_line":"        api \u003d APIRouter()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        app \u003d config.load_paste_app(\u0027extensions_test_app\u0027)"},{"line_number":105,"context_line":"        self.ext_api \u003d ExtensionMiddleware(app, ext_mgr\u003dext_mgr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGbA%3D","line":102,"updated":"2013-02-07 02:54:19.000000000","message":"unused.","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            {constants.CORE: ExtensionExtendedAttributeTestPlugin}"},{"line_number":100,"context_line":"        )"},{"line_number":101,"context_line":"        PluginAwareExtensionManager._instance \u003d ext_mgr"},{"line_number":102,"context_line":"        api \u003d APIRouter()"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        app \u003d config.load_paste_app(\u0027extensions_test_app\u0027)"},{"line_number":105,"context_line":"        self.ext_api \u003d ExtensionMiddleware(app, ext_mgr\u003dext_mgr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FGSk%3D","line":102,"in_reply_to":"AAAAM3%2F%2FGbA%3D","updated":"2013-02-07 04:42:59.000000000","message":"removed api but APIRouter() still needs to be invoked.","commit_id":"79d3de72b3f9ab71cd2a84c962d9f9d111715f15"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"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 2013 Cloudbase Solutions SRL"},{"line_number":4,"context_line":"# Copyright 2013 Pedro Navarro Perez"},{"line_number":5,"context_line":"# All Rights Reserved."},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FGNM%3D","line":4,"updated":"2013-02-07 07:18:50.000000000","message":"nit: copy right :)","commit_id":"c446b9445f05ac44bdc6ab8d90ca807a73eb4182"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":19,"context_line":"Unit tests for extension extended attribute"},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import quantum"},{"line_number":23,"context_line":"import webob.exc as webexc"},{"line_number":24,"context_line":"import unittest2 as unittest"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FEbk%3D","line":22,"updated":"2013-02-08 03:38:10.000000000","message":"import ordering wrong.  Please take a look at Quantum\u0027s HACKING.rst file on how to order imports.","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Unit tests for extension extended attribute"},{"line_number":20,"context_line":"\"\"\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import quantum"},{"line_number":23,"context_line":"import webob.exc as webexc"},{"line_number":24,"context_line":"import unittest2 as unittest"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FETI%3D","line":22,"in_reply_to":"AAAAM3%2F%2FEbk%3D","updated":"2013-02-08 05:40:45.000000000","message":"Done","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":26,"context_line":"from quantum.common import config"},{"line_number":27,"context_line":"from quantum.openstack.common import cfg"},{"line_number":28,"context_line":"from quantum.plugins.common import constants"},{"line_number":29,"context_line":"from quantum.api.extensions import ExtensionMiddleware"},{"line_number":30,"context_line":"from quantum.api.extensions import PluginAwareExtensionManager"},{"line_number":31,"context_line":"from quantum.plugins.openvswitch import ovs_quantum_plugin"},{"line_number":32,"context_line":"from quantum.api.v2.router import APIRouter"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FEbs%3D","line":29,"updated":"2013-02-08 03:38:10.000000000","message":"most of the Quantum codebase does not import Classes directly and only imports the modules.\n\nfrom quantum.api import extensions","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from quantum.common import config"},{"line_number":27,"context_line":"from quantum.openstack.common import cfg"},{"line_number":28,"context_line":"from quantum.plugins.common import constants"},{"line_number":29,"context_line":"from quantum.api.extensions import ExtensionMiddleware"},{"line_number":30,"context_line":"from quantum.api.extensions import PluginAwareExtensionManager"},{"line_number":31,"context_line":"from quantum.plugins.openvswitch import ovs_quantum_plugin"},{"line_number":32,"context_line":"from quantum.api.v2.router import APIRouter"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FETA%3D","line":29,"in_reply_to":"AAAAM3%2F%2FEbs%3D","updated":"2013-02-08 05:40:45.000000000","message":"Done","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":39,"context_line":"_uuid \u003d test_api_v2._uuid"},{"line_number":40,"context_line":"_get_path \u003d test_api_v2._get_path"},{"line_number":41,"context_line":"extpath \u003d []"},{"line_number":42,"context_line":"extpath.extend(quantum.tests.unit.extensions.__path__)"},{"line_number":43,"context_line":"extensions_path \u003d \u0027:\u0027.join(extpath)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FEco%3D","line":42,"updated":"2013-02-08 03:38:10.000000000","message":"Why is this extension necessary?\n\nextensions_path \u003d \u0027:\u0027.join(quantum.tests.unit.extensions.__path__)","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":39,"context_line":"_uuid \u003d test_api_v2._uuid"},{"line_number":40,"context_line":"_get_path \u003d test_api_v2._get_path"},{"line_number":41,"context_line":"extpath \u003d []"},{"line_number":42,"context_line":"extpath.extend(quantum.tests.unit.extensions.__path__)"},{"line_number":43,"context_line":"extensions_path \u003d \u0027:\u0027.join(extpath)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FES8%3D","line":42,"in_reply_to":"AAAAM3%2F%2FEco%3D","updated":"2013-02-08 05:40:45.000000000","message":"Done","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \u0027ext-obj-test\u0027, \"extended-ext-attr\""},{"line_number":51,"context_line":"    ]"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    objs \u003d []"},{"line_number":54,"context_line":"    objh \u003d {}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def create_ext_test_resource(self, context, ext_test_resource):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FEb4%3D","line":53,"updated":"2013-02-08 03:38:10.000000000","message":"Did you intended to class vars?  This can cause tests to accumulate if more than one instance of a class is instantiated.","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \u0027ext-obj-test\u0027, \"extended-ext-attr\""},{"line_number":51,"context_line":"    ]"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    objs \u003d []"},{"line_number":54,"context_line":"    objh \u003d {}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def create_ext_test_resource(self, context, ext_test_resource):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FES4%3D","line":53,"in_reply_to":"AAAAM3%2F%2FEb4%3D","updated":"2013-02-08 05:40:45.000000000","message":"Done","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":109,"context_line":"        # restore original resource attribute map before"},{"line_number":110,"context_line":"        attributes.RESOURCE_ATTRIBUTE_MAP \u003d self._attribute_map_bk"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _api(self, path):"},{"line_number":113,"context_line":"            return self.ext_api"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def _do_request(self, method, path, data\u003dNone, params\u003dNone, action\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FEcE%3D","line":112,"updated":"2013-02-08 03:38:10.000000000","message":"This method takes an arg an then ignores it.  why?","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        # restore original resource attribute map before"},{"line_number":110,"context_line":"        attributes.RESOURCE_ATTRIBUTE_MAP \u003d self._attribute_map_bk"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def _api(self, path):"},{"line_number":113,"context_line":"            return self.ext_api"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def _do_request(self, method, path, data\u003dNone, params\u003dNone, action\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FES0%3D","line":112,"in_reply_to":"AAAAM3%2F%2FEcE%3D","updated":"2013-02-08 05:40:45.000000000","message":"Done","commit_id":"8e8b62551c1d28670bac0cc7925760257ec169fc"},{"author":{"_account_id":490,"name":"Sumit Naiksatam","email":"sumitnaiksatam@gmail.com","username":"snaiksat"},"unresolved":false,"context_lines":[{"line_number":23,"context_line":"import webob.exc as webexc"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"import quantum"},{"line_number":26,"context_line":"from quantum import manager, wsgi"},{"line_number":27,"context_line":"from quantum.api import extensions"},{"line_number":28,"context_line":"from quantum.api.v2 import attributes, router"},{"line_number":29,"context_line":"from quantum.common import config"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8Xo%3D","line":26,"updated":"2013-02-13 19:06:09.000000000","message":"Nit: L26 should go after L29 and consider splitting imports on separate lines","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":86,"context_line":"        for item in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":87,"context_line":"            self._attribute_map_bk[item] \u003d (attributes."},{"line_number":88,"context_line":"                                            RESOURCE_ATTRIBUTE_MAP[item]."},{"line_number":89,"context_line":"                                            copy())"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        ext_mgr \u003d extensions.PluginAwareExtensionManager("},{"line_number":92,"context_line":"            extensions_path,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8r8%3D","line":89,"updated":"2013-02-13 16:27:52.000000000","message":"If we do not load the API router we\u0027re free to run just the extension middleware - and execute extend_resources starting with an empty dict. This will free us of this code and the correspondent cleanup code.","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        for item in attributes.RESOURCE_ATTRIBUTE_MAP:"},{"line_number":87,"context_line":"            self._attribute_map_bk[item] \u003d (attributes."},{"line_number":88,"context_line":"                                            RESOURCE_ATTRIBUTE_MAP[item]."},{"line_number":89,"context_line":"                                            copy())"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        ext_mgr \u003d extensions.PluginAwareExtensionManager("},{"line_number":92,"context_line":"            extensions_path,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8Zo%3D","line":89,"in_reply_to":"AAAAM3%2F%2B8r8%3D","updated":"2013-02-13 18:37:09.000000000","message":"Done","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":93,"context_line":"            {constants.CORE: ExtensionExtendedAttributeTestPlugin}"},{"line_number":94,"context_line":"        )"},{"line_number":95,"context_line":"        extensions.PluginAwareExtensionManager._instance \u003d ext_mgr"},{"line_number":96,"context_line":"        router.APIRouter()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        app \u003d config.load_paste_app(\u0027extensions_test_app\u0027)"},{"line_number":99,"context_line":"        self._api \u003d extensions.ExtensionMiddleware(app, ext_mgr\u003dext_mgr)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8sI%3D","line":96,"updated":"2013-02-13 16:27:52.000000000","message":"I found out this is actually unnecessary. All you want to do here is to ensure extend_resources is invoked. You do not actually need to load controllers for core resources at all.\n\nIt\u0027s a shame we apparently need to load the plugin.","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            {constants.CORE: ExtensionExtendedAttributeTestPlugin}"},{"line_number":94,"context_line":"        )"},{"line_number":95,"context_line":"        extensions.PluginAwareExtensionManager._instance \u003d ext_mgr"},{"line_number":96,"context_line":"        router.APIRouter()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        app \u003d config.load_paste_app(\u0027extensions_test_app\u0027)"},{"line_number":99,"context_line":"        self._api \u003d extensions.ExtensionMiddleware(app, ext_mgr\u003dext_mgr)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8jA%3D","line":96,"in_reply_to":"AAAAM3%2F%2B8sI%3D","updated":"2013-02-13 18:37:09.000000000","message":"Done","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"    def test_ext_test_resource_get(self):"},{"line_number":144,"context_line":"        attr \u003d _uuid()"},{"line_number":145,"context_line":"        obj \u003d self._ext_test_resource_create(attr)"},{"line_number":146,"context_line":"        id \u003d obj[\u0027id\u0027]"},{"line_number":147,"context_line":"        res \u003d self._do_request(\u0027GET\u0027, _get_path("},{"line_number":148,"context_line":"            \u0027ext_test_resources/{0}\u0027.format(id)))"},{"line_number":149,"context_line":"        obj2 \u003d res[\u0027ext_test_resource\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8r4%3D","line":146,"updated":"2013-02-13 16:27:52.000000000","message":"If you can, avoid using id as a variable","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"},{"author":{"_account_id":6461,"name":"Kaiwei Fan","email":"fank@vmware.com","username":"kaiwei-fan"},"change_message_id":"967a96af292a85bf3e00587f7e5ab4e63a4fd043","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    def test_ext_test_resource_get(self):"},{"line_number":144,"context_line":"        attr \u003d _uuid()"},{"line_number":145,"context_line":"        obj \u003d self._ext_test_resource_create(attr)"},{"line_number":146,"context_line":"        id \u003d obj[\u0027id\u0027]"},{"line_number":147,"context_line":"        res \u003d self._do_request(\u0027GET\u0027, _get_path("},{"line_number":148,"context_line":"            \u0027ext_test_resources/{0}\u0027.format(id)))"},{"line_number":149,"context_line":"        obj2 \u003d res[\u0027ext_test_resource\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8aw%3D","line":146,"in_reply_to":"AAAAM3%2F%2B8r4%3D","updated":"2013-02-13 18:37:09.000000000","message":"Done","commit_id":"881949ce282e8ed7cc795b2f47f7feafd612b526"}]}
