)]}'
{"doc/api_samples/os-cells/cells-capacities-resp.xml":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"350b5d3614ea90eafacef9cca9a4d65151b783ff","unresolved":false,"context_lines":[{"line_number":2,"context_line":"\u003ccell xmlns\u003d\"http://docs.rackspacecloud.com/servers/api/v1.0\"\u003e"},{"line_number":3,"context_line":"    \u003ccapacities\u003e"},{"line_number":4,"context_line":"        \u003cram_free\u003e"},{"line_number":5,"context_line":"            \u003cunits_by_mb\u003e{\"8192\": 0, \"512\": 13, \"4096\": 1, \"2048\": 3, \"16384\": 0}\u003c/units_by_mb\u003e"},{"line_number":6,"context_line":"            \u003ctotal_mb\u003e7680\u003c/total_mb\u003e"},{"line_number":7,"context_line":"        \u003c/ram_free\u003e"},{"line_number":8,"context_line":"        \u003cdisk_free\u003e"}],"source_content_type":"application/xml","patch_set":8,"id":"AAAAOn%2F%2FtoU%3D","line":5,"updated":"2013-04-26 15:52:11.000000000","message":"This is what I object to.  Until this is fixed, I will always -1 this patch.  You need to figure out what format this should have in the XML…","commit_id":"470f595d3b04cb3250b5d7a1751b1fd476d35db5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d1b8e516cf31313762e73c826205932afa0e236d","unresolved":false,"context_lines":[{"line_number":2,"context_line":"\u003ccell xmlns\u003d\"http://docs.rackspacecloud.com/servers/api/v1.0\"\u003e"},{"line_number":3,"context_line":"    \u003ccapacities\u003e"},{"line_number":4,"context_line":"        \u003cram_free\u003e"},{"line_number":5,"context_line":"            \u003cunits_by_mb\u003e{\"8192\": 0, \"512\": 13, \"4096\": 1, \"2048\": 3, \"16384\": 0}\u003c/units_by_mb\u003e"},{"line_number":6,"context_line":"            \u003ctotal_mb\u003e7680\u003c/total_mb\u003e"},{"line_number":7,"context_line":"        \u003c/ram_free\u003e"},{"line_number":8,"context_line":"        \u003cdisk_free\u003e"}],"source_content_type":"application/xml","patch_set":8,"id":"AAAAOn%2F%2FoBc%3D","line":5,"in_reply_to":"AAAAOn%2F%2FtoU%3D","updated":"2013-05-01 14:13:07.000000000","message":"+1 to Kevin\u0027s point. It should by represented in XML, not mixed.","commit_id":"470f595d3b04cb3250b5d7a1751b1fd476d35db5"}],"nova/api/openstack/compute/contrib/cells.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"7e33b0649c0a27cb679b5592f5d3280625909bb1","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                \u0027detail\u0027: \u0027GET\u0027,"},{"line_number":308,"context_line":"                \u0027info\u0027: \u0027GET\u0027,"},{"line_number":309,"context_line":"                \u0027sync_instances\u0027: \u0027POST\u0027,"},{"line_number":310,"context_line":"                \u0027free_ram_capacity\u0027: \u0027GET\u0027"},{"line_number":311,"context_line":"        }"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        res \u003d extensions.ResourceExtension(\u0027os-cells\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F6wk%3D","line":310,"updated":"2013-04-11 17:00:31.000000000","message":"This is an action so \"show_free_ram\" or something like that might be better.","commit_id":"93052a70fa72b6aad6ccb317361db69c436c6766"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5e25d90761934f822685799e089e82eb9a1de390","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    free_ram \u003d xmlutil.SubTemplateElement(free_ram_info,"},{"line_number":57,"context_line":"            xmlutil.Selector(0), selector\u003dxmlutil.get_items)"},{"line_number":58,"context_line":"    capability.text \u003d 1"},{"line_number":59,"context_line":"    free_ram.text \u003d 1"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"cell_nsmap \u003d {None: wsgi.XMLNS_V10}"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2F1SY%3D","line":59,"updated":"2013-04-19 15:57:32.000000000","message":"I suggest using xmlutil.make_flat_dict() instead of hand-coding this…","commit_id":"0478e70fc7c1d9cd973cef8ad92b51191f424538"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"54b839d19b0ec8eb612cae2bcfb314a6e9be96e2","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        return dict(cell\u003dcell)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":175,"context_line":"    def show_free_ram(self, req, name\u003dNone):"},{"line_number":176,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":177,"context_line":"        if not context.is_admin:"},{"line_number":178,"context_line":"            msg \u003d _(\"Free Ram Capacity is an admin only functionality\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2F2cw%3D","line":175,"updated":"2013-04-17 19:21:09.000000000","message":"Can we just name this \"show_capacity\" type method?  \n\nRight now free ram is the only real measured resource, but I can foresee requests to add more information other than just free ram","commit_id":"0478e70fc7c1d9cd973cef8ad92b51191f424538"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d5a6ca3a078ce956c0e897d2f00e8fe8a42479f8","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":175,"context_line":"    def show_free_ram(self, req, name\u003dNone):"},{"line_number":176,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":177,"context_line":"        if not context.is_admin:"},{"line_number":178,"context_line":"            msg \u003d _(\"Free Ram Capacity is an admin only functionality\")"},{"line_number":179,"context_line":"            raise exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":180,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2F1RE%3D","line":177,"updated":"2013-04-19 16:50:52.000000000","message":"This should be left to policy.json and the authorize call.\nThere is a policy file used in testing, that will help when you unit test this.","commit_id":"0478e70fc7c1d9cd973cef8ad92b51191f424538"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"54b839d19b0ec8eb612cae2bcfb314a6e9be96e2","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        return [res]"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":319,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_free_ram\","},{"line_number":320,"context_line":"                    action\u003d\"show_free_ram\","},{"line_number":321,"context_line":"                    controller\u003dwsgi_resource,"},{"line_number":322,"context_line":"                    conditions\u003d{\"method\": [\u0027GET\u0027]})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2F2cc%3D","line":319,"updated":"2013-04-17 19:21:09.000000000","message":"Same comment, URL could be more generic:\n\n..../capacity or\n../show_capacity","commit_id":"0478e70fc7c1d9cd973cef8ad92b51191f424538"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5e25d90761934f822685799e089e82eb9a1de390","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        return [res]"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":319,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_free_ram\","},{"line_number":320,"context_line":"                    action\u003d\"show_free_ram\","},{"line_number":321,"context_line":"                    controller\u003dwsgi_resource,"},{"line_number":322,"context_line":"                    conditions\u003d{\"method\": [\u0027GET\u0027]})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2F1SA%3D","line":319,"in_reply_to":"AAAAOn%2F%2F2cc%3D","updated":"2013-04-19 15:57:32.000000000","message":"I\u0027m not certain I understand the need for this custom route mapper, either; you appear to be declaring show_free_ram() as a collection action and then using the custom route mapper to turn it into a member action.  Why not just use member_actions\u003d{} instead?  That would turn get_resources() into:\n\n    def get_resources(self):\n        coll_actions \u003d {\n                \u0027detail\u0027: \u0027GET\u0027,\n                \u0027info\u0027: \u0027GET\u0027,\n                \u0027sync_instances\u0027: \u0027POST\u0027,\n        }\n        memb_actions \u003d {\n                \u0027capacity\u0027: \u0027GET\u0027,\n        }\n\n        res \u003d extensions.ResourceExtension(\u0027os-cells\u0027,\n                Controller(), collection_actions\u003dcoll_actions,\n                member_actions\u003dmemb_actions)\n        return [res]","commit_id":"0478e70fc7c1d9cd973cef8ad92b51191f424538"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"90241aa3c767d3365e8c9bb1a8bb8c6af30bb6ef","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            selector\u003d\u0027capabilities\u0027)"},{"line_number":52,"context_line":"    cap \u003d xmlutil.SubTemplateElement(caps, xmlutil.Selector(0),"},{"line_number":53,"context_line":"            selector\u003dxmlutil.get_items)"},{"line_number":54,"context_line":"    cap.text \u003d 1"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"cell_nsmap \u003d {None: wsgi.XMLNS_V10}"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FyEU%3D","line":54,"updated":"2013-04-23 15:49:09.000000000","message":"You have an error in this somewhere; the output now becomes the string version of a dictionary, which I\u0027m certain is not what you meant.  Again, I strongly recommend using xmlutil.make_flat_dict(), which does all this for you.","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ee806aa412e86ae1177ced05a0acc844fbc386ba","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            selector\u003d\u0027capabilities\u0027)"},{"line_number":52,"context_line":"    cap \u003d xmlutil.SubTemplateElement(caps, xmlutil.Selector(0),"},{"line_number":53,"context_line":"            selector\u003dxmlutil.get_items)"},{"line_number":54,"context_line":"    cap.text \u003d 1"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"cell_nsmap \u003d {None: wsgi.XMLNS_V10}"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2Fwho%3D","line":54,"in_reply_to":"AAAAOn%2F%2FwjQ%3D","updated":"2013-04-24 15:46:46.000000000","message":"Ah, yes, I was looking at the inter-patch differences.  I\u0027m still not happy with embedding a string representation of a dict into the XML, so I think this needs to be altered in some fashion…","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"4b6f6bbb86c26bba6f4c71b2adea362fcabdff7c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            selector\u003d\u0027capabilities\u0027)"},{"line_number":52,"context_line":"    cap \u003d xmlutil.SubTemplateElement(caps, xmlutil.Selector(0),"},{"line_number":53,"context_line":"            selector\u003dxmlutil.get_items)"},{"line_number":54,"context_line":"    cap.text \u003d 1"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"cell_nsmap \u003d {None: wsgi.XMLNS_V10}"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FwjQ%3D","line":54,"in_reply_to":"AAAAOn%2F%2FyEU%3D","updated":"2013-04-24 15:39:19.000000000","message":"I\u0027m not pushing any changes here.. Leaving the xml template for cells show as is..","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"90241aa3c767d3365e8c9bb1a8bb8c6af30bb6ef","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        return [res]"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":311,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":312,"context_line":"                    action\u003d\"show_capacities\","},{"line_number":313,"context_line":"                    controller\u003dwsgi_resource,"},{"line_number":314,"context_line":"                    conditions\u003d{\"method\": [\u0027GET\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FyEE%3D","line":311,"updated":"2013-04-23 15:49:09.000000000","message":"Again, why are you using a custom route mapper?  Just use member_actions.","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ee806aa412e86ae1177ced05a0acc844fbc386ba","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        return [res]"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":311,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":312,"context_line":"                    action\u003d\"show_capacities\","},{"line_number":313,"context_line":"                    controller\u003dwsgi_resource,"},{"line_number":314,"context_line":"                    conditions\u003d{\"method\": [\u0027GET\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FwhY%3D","line":311,"in_reply_to":"AAAAOn%2F%2Fwig%3D","updated":"2013-04-24 15:46:46.000000000","message":"Ah, I see now.  No, you don\u0027t need to change this, as far as I\u0027m concerned, but please include a comment or docstring explaining what you\u0027re doing and why…","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"4b6f6bbb86c26bba6f4c71b2adea362fcabdff7c","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        return [res]"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":311,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":312,"context_line":"                    action\u003d\"show_capacities\","},{"line_number":313,"context_line":"                    controller\u003dwsgi_resource,"},{"line_number":314,"context_line":"                    conditions\u003d{\"method\": [\u0027GET\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2Fwig%3D","line":311,"in_reply_to":"AAAAOn%2F%2FyEE%3D","updated":"2013-04-24 15:39:19.000000000","message":"the custom route mapper is to use the show_capacities method as both, collection and member actions.\n\n/os-cells/show_capacities  will give capacities for all cells\n/os-cells/cell-one/show_capacities will give the capacity of cell-one\n\nWe can create two separate actions and use one as a collection action and other as a member action. But thought adding a route was easier. Let me know if you really want this to be changed.","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d1b8e516cf31313762e73c826205932afa0e236d","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        return dict(cell\u003dcell)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":171,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":172,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":173,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":174,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAOn%2F%2FoBo%3D","line":171,"updated":"2013-05-01 14:13:07.000000000","message":"Because of how extensions are versioned, generally this kind of change has involved add a brand new extension, with its only separate policy","commit_id":"470f595d3b04cb3250b5d7a1751b1fd476d35db5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c7c03204c4972fb5bb4f7e3519450aab3edba540","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                \u0027detail\u0027: \u0027GET\u0027,"},{"line_number":327,"context_line":"                \u0027info\u0027: \u0027GET\u0027,"},{"line_number":328,"context_line":"                \u0027sync_instances\u0027: \u0027POST\u0027,"},{"line_number":329,"context_line":"                \u0027show_capacities\u0027: \u0027GET\u0027"},{"line_number":330,"context_line":"        }"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        res \u003d extensions.ResourceExtension(\u0027os-cells\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2FcrI%3D","line":329,"updated":"2013-05-09 09:43:28.000000000","message":"I thought this kind of change required a new extension, so the client can discover the extra capability?","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"194477511bfa330f8fe7e81f8076fd137206d8fa","unresolved":false,"context_lines":[{"line_number":325,"context_line":"    name \u003d \"Cells\""},{"line_number":326,"context_line":"    alias \u003d \"os-cells\""},{"line_number":327,"context_line":"    namespace \u003d \"http://docs.openstack.org/compute/ext/cells/api/v1.1\""},{"line_number":328,"context_line":"    updated \u003d \"2011-09-21T00:00:00+00:00\""},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def get_resources(self):"},{"line_number":331,"context_line":"        coll_actions \u003d {"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAOn%2F%2FXu8%3D","line":328,"updated":"2013-05-13 11:28:40.000000000","message":"Maybe we should change updated to tell people things have change. However, the current policy seems to be that we need to add a new extension.","commit_id":"2825b63e14ad3e91bf448f5e7bf514b68315324c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"40084756d17280ee4510acd05ab41d9b847182dc","unresolved":false,"context_lines":[{"line_number":325,"context_line":"    name \u003d \"Cells\""},{"line_number":326,"context_line":"    alias \u003d \"os-cells\""},{"line_number":327,"context_line":"    namespace \u003d \"http://docs.openstack.org/compute/ext/cells/api/v1.1\""},{"line_number":328,"context_line":"    updated \u003d \"2011-09-21T00:00:00+00:00\""},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def get_resources(self):"},{"line_number":331,"context_line":"        coll_actions \u003d {"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAOn%2F%2FXSw%3D","line":328,"in_reply_to":"AAAAOn%2F%2FXnI%3D","updated":"2013-05-13 15:31:36.000000000","message":"Worth a try, see what people think.","commit_id":"2825b63e14ad3e91bf448f5e7bf514b68315324c"},{"author":{"_account_id":7490,"name":"Navneet Kumar","email":"navneetk@thoughtworks.com","username":"navneetk"},"change_message_id":"2b75a3031763decefd3c0225962f07ba55c93983","unresolved":false,"context_lines":[{"line_number":325,"context_line":"    name \u003d \"Cells\""},{"line_number":326,"context_line":"    alias \u003d \"os-cells\""},{"line_number":327,"context_line":"    namespace \u003d \"http://docs.openstack.org/compute/ext/cells/api/v1.1\""},{"line_number":328,"context_line":"    updated \u003d \"2011-09-21T00:00:00+00:00\""},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def get_resources(self):"},{"line_number":331,"context_line":"        coll_actions \u003d {"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAOn%2F%2FXnI%3D","line":328,"in_reply_to":"AAAAOn%2F%2FXu8%3D","updated":"2013-05-13 12:57:11.000000000","message":"Should I just change the Date and submit a new patch-set?","commit_id":"2825b63e14ad3e91bf448f5e7bf514b68315324c"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1982639cf68162b4143d080337803343599bd7d4","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    unit_by_mb \u003d xmlutil.SubTemplateElement(units_by_mb, \u0027unit_by_mb\u0027,"},{"line_number":69,"context_line":"                                            selector\u003dxmlutil.get_items)"},{"line_number":70,"context_line":"    unit_by_mb.set(\u0027mb\u0027, 0)"},{"line_number":71,"context_line":"    unit_by_mb.set(\u0027unit\u0027, 1)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    disk_free \u003d xmlutil.SubTemplateElement(capacity, \u0027disk_free\u0027,"},{"line_number":74,"context_line":"                                           selector\u003d\u0027disk_free\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAO3%2F%2F%2Bko%3D","line":71,"updated":"2013-05-15 18:46:38.000000000","message":"I\u0027m a little lost on the meanings here; I\u0027d appreciate it if you could help me understand the structure.  So, the XML resulting from this would be:\n\n    \u003ccapacity\u003e\n        \u003cram_free total_mb\u003d\"total ram free in megabytes\"\u003e\n            \u003cunits_by_mb\u003e\n                \u003cunit_by_mb mb\u003d\"some key\" unit\u003d\"some value\" /\u003e\n                …\n            \u003c/units_by_mb\u003e\n        \u003c/ram_free\u003e\n        \u003cdisk_free total_mb\u003d\"total disk free in megabytes (?)\"\u003e\n            \u003csomething similar to the above/\u003e\n        \u003c/disk_free\u003e\n    \u003c/capacity\u003e\n\nSo, the first thing I want to try to understand is the values in this units_by_mb dictionary; what are the keys and values in the dictionary really supposed to represent?  The second thing I want to understand is why you have \u003cunits_by_mb\u003e at all; selectors are callables, so you could write a simple function that combined the \u0027units_by_mb\u0027 and xmlutil.get_items selectors, letting you omit that extra level of XML elements.  Finally, the third thing I want to understand is why the \u003cdisk_free\u003e appears to be reported in megabytes, when most of the rest of nova reports it in gigabytes?","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"850d212e7b2375cd10d4e034eb895bdb359f0194","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    unit_by_mb \u003d xmlutil.SubTemplateElement(units_by_mb, \u0027unit_by_mb\u0027,"},{"line_number":69,"context_line":"                                            selector\u003dxmlutil.get_items)"},{"line_number":70,"context_line":"    unit_by_mb.set(\u0027mb\u0027, 0)"},{"line_number":71,"context_line":"    unit_by_mb.set(\u0027unit\u0027, 1)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    disk_free \u003d xmlutil.SubTemplateElement(capacity, \u0027disk_free\u0027,"},{"line_number":74,"context_line":"                                           selector\u003d\u0027disk_free\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F%2FBM%3D","line":71,"in_reply_to":"AAAAO3%2F%2F%2Bko%3D","updated":"2013-05-17 05:00:58.000000000","message":"units_by_mb is a dictionary that indicates the number of instances that can be built.\nFor example,\n\n\u003cunits_by_mb\u003e\n\t\u003cunit_by_mb unit\u003d\"0\"  mb\u003d\"8192\"/\u003e\n\t\u003cunit_by_mb unit\u003d\"13\" mb\u003d\"512\"/\u003e\n\t \u003cunit_by_mb unit\u003d\"1\"  mb\u003d\"4096\"/\u003e\n\t \u003cunit_by_mb unit\u003d\"3\"  mb\u003d\"2048\"/\u003e\n\u003c/units_by_mb\u003e\n\nmeans we can build 13 instances of 512mb ram OR\n1 instance of 4GB OR\n3 units of 2GB.\n\nIt\u0027s similar dor disk_used.\n\nWe have \u003cunits_by_mb\u003e and \u003ctotal_ram\u003e in xml.\nLet us know if you want to change the element names/ xml structure. A sample xml would be helpful.","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9ad50a49d3764f68628586f93c98ba407c777c12","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    unit_by_mb \u003d xmlutil.SubTemplateElement(units_by_mb, \u0027unit_by_mb\u0027,"},{"line_number":69,"context_line":"                                            selector\u003dxmlutil.get_items)"},{"line_number":70,"context_line":"    unit_by_mb.set(\u0027mb\u0027, 0)"},{"line_number":71,"context_line":"    unit_by_mb.set(\u0027unit\u0027, 1)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    disk_free \u003d xmlutil.SubTemplateElement(capacity, \u0027disk_free\u0027,"},{"line_number":74,"context_line":"                                           selector\u003d\u0027disk_free\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F9%2FM%3D","line":71,"in_reply_to":"AAAAPH%2F%2F%2FBM%3D","updated":"2013-05-17 15:27:02.000000000","message":"OK.  I figured this could be simplified to:\n\n    \u003cram_free total_mb\u003d\"total ram free in megabytes\"\u003e\n        \u003cunit_by_mb mb\u003d\"8192\" unit\u003d\"0\" /\u003e\n        \u003cunit_by_mb mb\u003d\"512\" unit\u003d\"13\" /\u003e\n        …\n    \u003c/ram_free\u003e\n\nNote that this isn\u0027t critical to me, but it seems like that would be a little easier to parse…","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"9b131000ec725542cdf5d3c34c8d256b742a5216","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    unit_by_mb \u003d xmlutil.SubTemplateElement(units_by_mb, \u0027unit_by_mb\u0027,"},{"line_number":69,"context_line":"                                            selector\u003dxmlutil.get_items)"},{"line_number":70,"context_line":"    unit_by_mb.set(\u0027mb\u0027, 0)"},{"line_number":71,"context_line":"    unit_by_mb.set(\u0027unit\u0027, 1)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    disk_free \u003d xmlutil.SubTemplateElement(capacity, \u0027disk_free\u0027,"},{"line_number":74,"context_line":"                                           selector\u003d\u0027disk_free\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F6ig%3D","line":71,"in_reply_to":"AAAAPH%2F%2F9%2FM%3D","updated":"2013-05-20 13:22:18.000000000","message":"Done","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1982639cf68162b4143d080337803343599bd7d4","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        return dict(cell\u003dcell)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":197,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":198,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAO3%2F%2F%2BkQ%3D","line":197,"updated":"2013-05-15 18:46:38.000000000","message":"I\u0027ve been seeing more and more reviewers demanding that additions like this have their own extensions, so that clients can determine whether the functionality is present or not.  For an example of how this might be done, check out extended_floating_ips.py, which extends floating_ips.py.","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"850d212e7b2375cd10d4e034eb895bdb359f0194","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        return dict(cell\u003dcell)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":197,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":198,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F%2FAc%3D","line":197,"in_reply_to":"AAAAO3%2F%2F%2BkQ%3D","updated":"2013-05-17 05:00:58.000000000","message":"Going by this convention, any change that we make, however small it may be, we need to add an extension. We have already started adding extensions to extensions.\n\nWe can still move it to a separate extension if it\u0027s absolutely necessary. We changed the updated_at of cells extension. Would that solve the discoverability problem?","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9ad50a49d3764f68628586f93c98ba407c777c12","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        return dict(cell\u003dcell)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":197,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":198,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F9%2Bw%3D","line":197,"in_reply_to":"AAAAPH%2F%2F%2FAc%3D","updated":"2013-05-17 15:27:02.000000000","message":"You are correct about the implications of this policy, and it\u0027s something they\u0027re aiming to fix in the v3 API.  I personally think changing updated_at should be sufficient, but the consensus I\u0027m seeing from other reviewers is that a new extension is necessary for this.  Sorry :/","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"9b131000ec725542cdf5d3c34c8d256b742a5216","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        return dict(cell\u003dcell)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":197,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":198,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F6h4%3D","line":197,"in_reply_to":"AAAAPH%2F%2F9%2Bw%3D","updated":"2013-05-20 13:22:18.000000000","message":"Not creating an extension as of now.. Waiting to see if we can go with the updated_at change for now.","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1982639cf68162b4143d080337803343599bd7d4","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        return [res]"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":344,"context_line":"        \"\"\"\"Route for passsing the cell-name to show_capacities, so that it"},{"line_number":345,"context_line":"        returns capacities for a given cell.\"\"\""},{"line_number":346,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":347,"context_line":"                    action\u003d\"show_capacities\","}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAO3%2F%2F%2Bm4%3D","line":344,"updated":"2013-05-15 18:46:38.000000000","message":"s/passsing/passing/","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"850d212e7b2375cd10d4e034eb895bdb359f0194","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        return [res]"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":344,"context_line":"        \"\"\"\"Route for passsing the cell-name to show_capacities, so that it"},{"line_number":345,"context_line":"        returns capacities for a given cell.\"\"\""},{"line_number":346,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":347,"context_line":"                    action\u003d\"show_capacities\","}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F%2FAU%3D","line":344,"in_reply_to":"AAAAO3%2F%2F%2Bm4%3D","updated":"2013-05-17 05:00:58.000000000","message":"Will change this","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"9b131000ec725542cdf5d3c34c8d256b742a5216","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        return [res]"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":344,"context_line":"        \"\"\"\"Route for passsing the cell-name to show_capacities, so that it"},{"line_number":345,"context_line":"        returns capacities for a given cell.\"\"\""},{"line_number":346,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":347,"context_line":"                    action\u003d\"show_capacities\","}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F6ic%3D","line":344,"in_reply_to":"AAAAPH%2F%2F%2FAU%3D","updated":"2013-05-20 13:22:18.000000000","message":"Done","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1982639cf68162b4143d080337803343599bd7d4","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":344,"context_line":"        \"\"\"\"Route for passsing the cell-name to show_capacities, so that it"},{"line_number":345,"context_line":"        returns capacities for a given cell.\"\"\""},{"line_number":346,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":347,"context_line":"                    action\u003d\"show_capacities\","},{"line_number":348,"context_line":"                    controller\u003dwsgi_resource,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAO3%2F%2F%2Bm0%3D","line":345,"updated":"2013-05-15 18:46:38.000000000","message":"I would prefer the closing triple-quote to be on a line by itself.","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"850d212e7b2375cd10d4e034eb895bdb359f0194","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":344,"context_line":"        \"\"\"\"Route for passsing the cell-name to show_capacities, so that it"},{"line_number":345,"context_line":"        returns capacities for a given cell.\"\"\""},{"line_number":346,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":347,"context_line":"                    action\u003d\"show_capacities\","},{"line_number":348,"context_line":"                    controller\u003dwsgi_resource,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F%2FAQ%3D","line":345,"in_reply_to":"AAAAO3%2F%2F%2Bm0%3D","updated":"2013-05-17 05:00:58.000000000","message":"Will change this","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"9b131000ec725542cdf5d3c34c8d256b742a5216","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":344,"context_line":"        \"\"\"\"Route for passsing the cell-name to show_capacities, so that it"},{"line_number":345,"context_line":"        returns capacities for a given cell.\"\"\""},{"line_number":346,"context_line":"        mapper.connect(None, \"/{project_id}/os-cells/{name}/show_capacities\","},{"line_number":347,"context_line":"                    action\u003d\"show_capacities\","},{"line_number":348,"context_line":"                    controller\u003dwsgi_resource,"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F6iY%3D","line":345,"in_reply_to":"AAAAPH%2F%2F%2FAQ%3D","updated":"2013-05-20 13:22:18.000000000","message":"Done","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"523203f18a3cce8115de14e4f5fc86f6a94442d7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"def make_capacity(cell):"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def get_units_by_mb(capacity_info):"},{"line_number":61,"context_line":"        return list(capacity_info[\u0027units_by_mb\u0027].items())"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    capacity \u003d xmlutil.SubTemplateElement(cell, \u0027capacities\u0027,"},{"line_number":64,"context_line":"                                          selector\u003d\u0027capacities\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2F28Y%3D","line":61,"updated":"2013-05-21 15:20:53.000000000","message":"It shouldn\u0027t be necessary to throw list() around this, but it won\u0027t hurt anything either; this is more of an FYI…","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"ed42b0642b644db8ebd9a823120be837df46c9fc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"def make_capacity(cell):"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def get_units_by_mb(capacity_info):"},{"line_number":61,"context_line":"        return list(capacity_info[\u0027units_by_mb\u0027].items())"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    capacity \u003d xmlutil.SubTemplateElement(cell, \u0027capacities\u0027,"},{"line_number":64,"context_line":"                                          selector\u003d\u0027capacities\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2FzI8%3D","line":61,"in_reply_to":"AAAAPH%2F%2F28Y%3D","updated":"2013-05-22 19:24:13.000000000","message":"Done","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0da47b65b3df05d89cf1eca877f1b927a37ddeff","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":198,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":199,"context_line":"        authorize(context)"},{"line_number":200,"context_line":"        if \"name\" in req.params:"},{"line_number":201,"context_line":"            name \u003d req.params[\u0027name\u0027]"},{"line_number":202,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2F0Eg%3D","line":199,"updated":"2013-05-22 13:57:56.000000000","message":"I can\u0027t see any tests for this, or any changes to the default policy.json?","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"232fb0c89e50d1a7e94b5fa738fe6ac3282a025b","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":198,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":199,"context_line":"        authorize(context)"},{"line_number":200,"context_line":"        if \"name\" in req.params:"},{"line_number":201,"context_line":"            name \u003d req.params[\u0027name\u0027]"},{"line_number":202,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2FzwI%3D","line":199,"in_reply_to":"AAAAPH%2F%2F0Eg%3D","updated":"2013-05-22 15:44:00.000000000","message":"You can find the tests in these files,\n\nnova/tests/api/openstack/compute/contrib/test_cells.py\nnova/tests/integrated/api_tests/test_cells_capacity_api.py\n\nThe policy.json says any action on cells requires an admin role. There are no specific tests for all the actions in the Cells controller.","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"ed42b0642b644db8ebd9a823120be837df46c9fc","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":198,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":199,"context_line":"        authorize(context)"},{"line_number":200,"context_line":"        if \"name\" in req.params:"},{"line_number":201,"context_line":"            name \u003d req.params[\u0027name\u0027]"},{"line_number":202,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2FzI0%3D","line":199,"in_reply_to":"AAAAPH%2F%2Fzt8%3D","updated":"2013-05-22 19:24:13.000000000","message":"Done","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9754e6c1a591a6774914b1070dd09c115b3cd018","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def show_capacities(self, req, name\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":198,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":199,"context_line":"        authorize(context)"},{"line_number":200,"context_line":"        if \"name\" in req.params:"},{"line_number":201,"context_line":"            name \u003d req.params[\u0027name\u0027]"},{"line_number":202,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2Fzt8%3D","line":199,"in_reply_to":"AAAAPH%2F%2FzwI%3D","updated":"2013-05-22 15:57:22.000000000","message":"OK, that seems a reasonable default.\n\nMy bad, I wasn\u0027t clear. I can\u0027t see a test to ensure show_capacities returns 401 in the case where a non admin calls this api. Sorry if I just missed it.","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"523203f18a3cce8115de14e4f5fc86f6a94442d7","unresolved":false,"context_lines":[{"line_number":324,"context_line":"    name \u003d \"Cells\""},{"line_number":325,"context_line":"    alias \u003d \"os-cells\""},{"line_number":326,"context_line":"    namespace \u003d \"http://docs.openstack.org/compute/ext/cells/api/v1.1\""},{"line_number":327,"context_line":"    updated \u003d \"2013-05-14T00:00:00+00:00\""},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def get_resources(self):"},{"line_number":330,"context_line":"        coll_actions \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2F274%3D","line":327,"updated":"2013-05-21 15:20:53.000000000","message":"Unfortunately, I think changing updated is not going to be sufficient.  I\u0027ll +2 with this here, but I\u0027m afraid other reviewers are liable to insist on having a separate extension to advertise the presence of the new URL.","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"523203f18a3cce8115de14e4f5fc86f6a94442d7","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                custom_routes_fn\u003dself.custom_routes_mapper)"},{"line_number":340,"context_line":"        return [res]"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":343,"context_line":"        \"\"\"\"Route for passing the cell-name to show_capacities, so that it"},{"line_number":344,"context_line":"        returns capacities for a given cell."},{"line_number":345,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2F26Q%3D","line":342,"updated":"2013-05-21 15:20:53.000000000","message":"I know we\u0027ve already discussed why you\u0027re using a custom routes manager, but have you tried using member_actions in get_resources(), i.e.:\n\n    def get_resources(self):\n        coll_actions \u003d {\n            \u0027detail\u0027: \u0027GET\u0027,\n            \u0027info\u0027: \u0027GET\u0027,\n            \u0027sync_instances\u0027: \u0027GET\u0027,\n            \u0027show_capacities\u0027: \u0027GET\u0027,\n        }\n        memb_actions \u003d {\n            \u0027show_capacities\u0027: \u0027GET\u0027,\n        }\n\n        res \u003d extensions.ResourceExtension(\u0027os-cells\u0027,\n                Controller(), collection_actions\u003dcoll_actions,\n                member_actions\u003dmemb_actions)\n        return [res]\n\nI don\u0027t know for certain that the above would do what you need to do (call show_capacities() in both the collection GET and member GET configurations), but I think member_actions and collection_actions are orthogonal enough that it should work…","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"595eb0a7f004efa38787b9df9cae57d492ec26d3","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                custom_routes_fn\u003dself.custom_routes_mapper)"},{"line_number":340,"context_line":"        return [res]"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":343,"context_line":"        \"\"\"\"Route for passing the cell-name to show_capacities, so that it"},{"line_number":344,"context_line":"        returns capacities for a given cell."},{"line_number":345,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2Fziw%3D","line":342,"in_reply_to":"AAAAPH%2F%2F26Q%3D","updated":"2013-05-22 16:40:29.000000000","message":"Tried this, it didn\u0027t work\nhttp://pastebin.com/WFdTXDWk","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"ed42b0642b644db8ebd9a823120be837df46c9fc","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                custom_routes_fn\u003dself.custom_routes_mapper)"},{"line_number":340,"context_line":"        return [res]"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":343,"context_line":"        \"\"\"\"Route for passing the cell-name to show_capacities, so that it"},{"line_number":344,"context_line":"        returns capacities for a given cell."},{"line_number":345,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2FzIw%3D","line":342,"in_reply_to":"AAAAPH%2F%2Fzg4%3D","updated":"2013-05-22 19:24:13.000000000","message":"Done","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"38d4faa9e705f803d96aa87d83c58c507128f310","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                custom_routes_fn\u003dself.custom_routes_mapper)"},{"line_number":340,"context_line":"        return [res]"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def custom_routes_mapper(self, mapper, wsgi_resource):"},{"line_number":343,"context_line":"        \"\"\"\"Route for passing the cell-name to show_capacities, so that it"},{"line_number":344,"context_line":"        returns capacities for a given cell."},{"line_number":345,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAPH%2F%2Fzg4%3D","line":342,"in_reply_to":"AAAAPH%2F%2Fziw%3D","updated":"2013-05-22 16:51:22.000000000","message":"Well, of course; you\u0027ve named the argument \"name\" instead of \"id\".  Arguments derived from the route are passed as keyword arguments.  And actually, your paste shows me that what I suggest is definitely possible…","commit_id":"822e6d5f27e8bcb9eaf88052327085ff1eb8efca"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ace2fb92566657b552c466447203c45008295b96","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    cap \u003d xmlutil.SubTemplateElement(caps, xmlutil.Selector(0),"},{"line_number":53,"context_line":"            selector\u003dxmlutil.get_items)"},{"line_number":54,"context_line":"    cap.text \u003d 1"},{"line_number":55,"context_line":"    make_capacity(elem)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def make_capacity(cell):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrlQ%3D","line":55,"updated":"2013-05-27 14:13:39.000000000","message":"you added the make_capacity to this template maker, so every time someone calls for show (only show, not show capacities) it will get the capacities too.\nI don\u0027t think we want this (you\u0027re supposed to call /show_capacities right?), you should create a different template which can, maybe, use this same make cell to complete it with cell info","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"87722e428bd27d6d42b3bcfd85acf0001b1f9d5b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    cap \u003d xmlutil.SubTemplateElement(caps, xmlutil.Selector(0),"},{"line_number":53,"context_line":"            selector\u003dxmlutil.get_items)"},{"line_number":54,"context_line":"    cap.text \u003d 1"},{"line_number":55,"context_line":"    make_capacity(elem)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def make_capacity(cell):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrXg%3D","line":55,"in_reply_to":"AAAAPH%2F%2FrlQ%3D","updated":"2013-05-27 17:20:36.000000000","message":"We won\u0027t get the capacities everytime we do a show. This is only a template. Only if the cells object has capacities in it, the xml would have it.","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ace2fb92566657b552c466447203c45008295b96","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        return dict(cell\u003dcell)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":196,"context_line":"    def show_capacities(self, req, id\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":198,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":199,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrlI%3D","line":196,"updated":"2013-05-27 14:13:39.000000000","message":"I know that sync instances is already here to make this not much restful, but it\u0027s already here and what is done is done. but here \u0027force\u0027 the user to call for \u003cproject_id\u003e/cells/show_capacities turns to be a really bad design on the url... \nAnything other than the index, show, create, delete and update should go as an action (take this as example https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/floating_ips.py#L272 ).","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"87722e428bd27d6d42b3bcfd85acf0001b1f9d5b","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        return dict(cell\u003dcell)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":196,"context_line":"    def show_capacities(self, req, id\u003dNone):"},{"line_number":197,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":198,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":199,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrXU%3D","line":196,"in_reply_to":"AAAAPH%2F%2FrlI%3D","updated":"2013-05-27 17:20:36.000000000","message":"changed it to /capacities to make it more restful.","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ace2fb92566657b552c466447203c45008295b96","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        coll_actions \u003d {"},{"line_number":329,"context_line":"                \u0027detail\u0027: \u0027GET\u0027,"},{"line_number":330,"context_line":"                \u0027info\u0027: \u0027GET\u0027,"},{"line_number":331,"context_line":"                \u0027sync_instances\u0027: \u0027GET\u0027,"},{"line_number":332,"context_line":"                \u0027show_capacities\u0027: \u0027GET\u0027,"},{"line_number":333,"context_line":"                }"},{"line_number":334,"context_line":"        memb_actions \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2Frlw%3D","line":331,"updated":"2013-05-27 14:13:39.000000000","message":"Why did you change this to get?","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"87722e428bd27d6d42b3bcfd85acf0001b1f9d5b","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        coll_actions \u003d {"},{"line_number":329,"context_line":"                \u0027detail\u0027: \u0027GET\u0027,"},{"line_number":330,"context_line":"                \u0027info\u0027: \u0027GET\u0027,"},{"line_number":331,"context_line":"                \u0027sync_instances\u0027: \u0027GET\u0027,"},{"line_number":332,"context_line":"                \u0027show_capacities\u0027: \u0027GET\u0027,"},{"line_number":333,"context_line":"                }"},{"line_number":334,"context_line":"        memb_actions \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrXQ%3D","line":331,"in_reply_to":"AAAAPH%2F%2Frlw%3D","updated":"2013-05-27 17:20:36.000000000","message":"Done","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7cb03448d3e7b4ddaf225122abcc51a3599bff9c","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    def capacities(self, req, id\u003dNone):"},{"line_number":200,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":201,"context_line":"        if not self.ext_mgr.is_loaded(\u0027os-cell-capacities\u0027):"},{"line_number":202,"context_line":"            raise webob.exc.HTTPNotFound()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":205,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnVU%3D","line":202,"updated":"2013-05-29 10:29:30.000000000","message":"exc.HTTPNotFound() would be more consistent with the code further down in this file, and stops the need to import webob I guess. Unless, there is some reason for doing this I have missed?","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"efdd73c0fd1735870fe11498e09a67c5b5083afc","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    def capacities(self, req, id\u003dNone):"},{"line_number":200,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":201,"context_line":"        if not self.ext_mgr.is_loaded(\u0027os-cell-capacities\u0027):"},{"line_number":202,"context_line":"            raise webob.exc.HTTPNotFound()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":205,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnSg%3D","line":202,"in_reply_to":"AAAAPH%2F%2FnVU%3D","updated":"2013-05-29 10:57:18.000000000","message":"yes..","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7cb03448d3e7b4ddaf225122abcc51a3599bff9c","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":205,"context_line":"        authorize(context)"},{"line_number":206,"context_line":"        try:"},{"line_number":207,"context_line":"            capacities \u003d self.cells_rpcapi.get_capacities(context,"},{"line_number":208,"context_line":"                                                          cell_name\u003did)"},{"line_number":209,"context_line":"        except exception.CellNotFound:"},{"line_number":210,"context_line":"            msg \u003d _(\"Cell %(name)s not found.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnUo%3D","line":207,"updated":"2013-05-29 10:29:30.000000000","message":"Not sure, but it might be good to do a similar scrubbing of the keys as done in the other API calls, in case the cells rpcapi changes and accidentally changes the external API.","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"efdd73c0fd1735870fe11498e09a67c5b5083afc","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":205,"context_line":"        authorize(context)"},{"line_number":206,"context_line":"        try:"},{"line_number":207,"context_line":"            capacities \u003d self.cells_rpcapi.get_capacities(context,"},{"line_number":208,"context_line":"                                                          cell_name\u003did)"},{"line_number":209,"context_line":"        except exception.CellNotFound:"},{"line_number":210,"context_line":"            msg \u003d _(\"Cell %(name)s not found.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnQA%3D","line":207,"in_reply_to":"AAAAPH%2F%2FnUo%3D","updated":"2013-05-29 10:57:18.000000000","message":"The changes in cell_rpcapi would make the integration tests fail for capacities. So i think we are good.","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7cb03448d3e7b4ddaf225122abcc51a3599bff9c","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                          cell_name\u003did)"},{"line_number":209,"context_line":"        except exception.CellNotFound:"},{"line_number":210,"context_line":"            msg \u003d _(\"Cell %(name)s not found.\")"},{"line_number":211,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return dict(cell\u003d{\"capacities\": capacities})"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnVA%3D","line":211,"updated":"2013-05-29 10:29:30.000000000","message":"Don\u0027t you still need to substitute the name in your string?","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"efdd73c0fd1735870fe11498e09a67c5b5083afc","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                          cell_name\u003did)"},{"line_number":209,"context_line":"        except exception.CellNotFound:"},{"line_number":210,"context_line":"            msg \u003d _(\"Cell %(name)s not found.\")"},{"line_number":211,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return dict(cell\u003d{\"capacities\": capacities})"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnRs%3D","line":211,"in_reply_to":"AAAAPH%2F%2FnVA%3D","updated":"2013-05-29 10:57:18.000000000","message":"Done","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7cb03448d3e7b4ddaf225122abcc51a3599bff9c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":219,"context_line":"        authorize(context)"},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            cell \u003d db.cell_get(context, id)"},{"line_number":222,"context_line":"        except exception.CellNotFound:"},{"line_number":223,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":224,"context_line":"        return dict(cell\u003d_scrub_cell(cell))"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnVg%3D","line":221,"updated":"2013-05-29 10:29:30.000000000","message":"Chris makes a good point, maybe the better api is to add the details into the show method, and the details method, when the extension is enabled.\n\nYours is better for backwards compatibility with XML parsers though. Maybe just add a TODO on the capacities call for this to be consolidated when we move this to v3?","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"efdd73c0fd1735870fe11498e09a67c5b5083afc","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":219,"context_line":"        authorize(context)"},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            cell \u003d db.cell_get(context, id)"},{"line_number":222,"context_line":"        except exception.CellNotFound:"},{"line_number":223,"context_line":"            raise exc.HTTPNotFound()"},{"line_number":224,"context_line":"        return dict(cell\u003d_scrub_cell(cell))"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAPH%2F%2FnRw%3D","line":221,"in_reply_to":"AAAAPH%2F%2FnVg%3D","updated":"2013-05-29 10:57:18.000000000","message":"Done","commit_id":"6c352805c95c89cd81c6f06ac7d45755183ff1eb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e43ae14468d708c4cfff557d3484411df7f89491","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                          cell_name\u003did)"},{"line_number":209,"context_line":"        except exception.CellNotFound:"},{"line_number":210,"context_line":"            msg \u003d _(\"Cell %(id)s not found.\")"},{"line_number":211,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return dict(cell\u003d{\"capacities\": capacities})"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAPH%2F%2FnMc%3D","line":211,"updated":"2013-05-29 11:13:38.000000000","message":"I might be missing something, but the id is still not filled in by anyone?","commit_id":"7f17894537f952938914e66ab55b20ebe94de45d"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"5ad6532d51a593a14aba0850c88a635e160ef648","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                                          cell_name\u003did)"},{"line_number":209,"context_line":"        except exception.CellNotFound:"},{"line_number":210,"context_line":"            msg \u003d _(\"Cell %(id)s not found.\")"},{"line_number":211,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return dict(cell\u003d{\"capacities\": capacities})"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAPH%2F%2Fm1M%3D","line":211,"in_reply_to":"AAAAPH%2F%2FnMc%3D","updated":"2013-05-29 13:59:13.000000000","message":"sorry, i\u0027ve fixed it now","commit_id":"7f17894537f952938914e66ab55b20ebe94de45d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f065fb201f42e28bc00bfa5cec2ca7eede33d36c","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":197,"context_line":"    def capacities(self, req, id\u003dNone):"},{"line_number":198,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":199,"context_line":"        # TODO(kaushikc): return capacities as a part of cell info and"},{"line_number":200,"context_line":"        # cells detail calls in v3, along with capabilities"},{"line_number":201,"context_line":"        if not self.ext_mgr.is_loaded(\u0027os-cell-capacities\u0027):"},{"line_number":202,"context_line":"            raise exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAPH%2F%2FkgY%3D","line":199,"updated":"2013-05-30 10:31:00.000000000","message":"Maybe we could do this now? Just extend what is returned if your new extension is enabled?","commit_id":"95ecd5b2473babf5886856bbb7f7ea8e4fee96b6"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"383c34f35d128fee66c089f4167ec9c90fef58a7","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    @wsgi.serializers(xml\u003dCellTemplate)"},{"line_number":197,"context_line":"    def capacities(self, req, id\u003dNone):"},{"line_number":198,"context_line":"        \"\"\"Return capacities for a given cell or all cells.\"\"\""},{"line_number":199,"context_line":"        # TODO(kaushikc): return capacities as a part of cell info and"},{"line_number":200,"context_line":"        # cells detail calls in v3, along with capabilities"},{"line_number":201,"context_line":"        if not self.ext_mgr.is_loaded(\u0027os-cell-capacities\u0027):"},{"line_number":202,"context_line":"            raise exc.HTTPNotFound()"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAPH%2F%2Fh9Y%3D","line":199,"in_reply_to":"AAAAPH%2F%2FkgY%3D","updated":"2013-05-31 05:34:39.000000000","message":"I suspect this won\u0027t please people, because someone potentially relying on old code would never be checking for existence of the new extension or not...","commit_id":"95ecd5b2473babf5886856bbb7f7ea8e4fee96b6"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"07fee07265a1dd51178d800ab0be96dd776b75e5","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            capacities \u003d self.cells_rpcapi.get_capacities(context,"},{"line_number":208,"context_line":"                                                          cell_name\u003did)"},{"line_number":209,"context_line":"        except exception.CellNotFound:"},{"line_number":210,"context_line":"            msg \u003d (_(\"Cell %(id)s not found.\") % {\u0027id\u0027: id})"},{"line_number":211,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        return dict(cell\u003d{\"capacities\": capacities})"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAPX%2F%2F7yc%3D","line":210,"updated":"2013-06-05 19:04:50.000000000","message":"The outer parentheses are not necessary, since everything here fits on a single line.\n\n(femtonit)","commit_id":"b27a6cb39968ebd7a1d55322779dc862682d1364"}],"nova/cells/manager.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"7e33b0649c0a27cb679b5592f5d3280625909bb1","unresolved":false,"context_lines":[{"line_number":363,"context_line":"                console_type)"},{"line_number":364,"context_line":"        return response.value_or_raise()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def get_capacity(self, ctxt, cell_name):"},{"line_number":367,"context_line":"        return self.state_manager.get_capacity(cell_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F6wU%3D","line":366,"updated":"2013-04-11 17:00:31.000000000","message":"Again, might not be necessary.","commit_id":"93052a70fa72b6aad6ccb317361db69c436c6766"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"fe81041234682879ae4680ff9fe4d4263b20a13e","unresolved":false,"context_lines":[{"line_number":363,"context_line":"                console_type)"},{"line_number":364,"context_line":"        return response.value_or_raise()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def get_capacity(self, ctxt, cell_name):"},{"line_number":367,"context_line":"        return self.state_manager.get_capacity(cell_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F4PA%3D","line":366,"in_reply_to":"AAAAOn%2F%2F6wU%3D","updated":"2013-04-15 05:54:35.000000000","message":"Please refer to the other comment","commit_id":"93052a70fa72b6aad6ccb317361db69c436c6766"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c7c03204c4972fb5bb4f7e3519450aab3edba540","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    messages."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    Scheduling requests get passed to the scheduler class."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    RPC_API_VERSION \u003d \u00271.7\u0027"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcrc%3D","line":66,"updated":"2013-05-09 09:43:28.000000000","message":"1.8 here I think.","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"}],"nova/cells/rpcapi.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"7e33b0649c0a27cb679b5592f5d3280625909bb1","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                              console_type\u003dconsole_type),"},{"line_number":266,"context_line":"                version\u003d\u00271.6\u0027)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def get_free_ram(self, ctxt, cell_name\u003dNone):"},{"line_number":269,"context_line":"        return self.call(ctxt,"},{"line_number":270,"context_line":"                         self.make_msg(\u0027get_capacity\u0027, cell_name\u003dcell_name),"},{"line_number":271,"context_line":"                         version\u003d\u00271.6\u0027)[\u0027ram_free\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F6wc%3D","line":268,"updated":"2013-04-11 17:00:31.000000000","message":"There is already a method to get cell info from neighbors.  I think you can use that.  You just need to add the capacity info to its return value.","commit_id":"93052a70fa72b6aad6ccb317361db69c436c6766"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"fe81041234682879ae4680ff9fe4d4263b20a13e","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                              console_type\u003dconsole_type),"},{"line_number":266,"context_line":"                version\u003d\u00271.6\u0027)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def get_free_ram(self, ctxt, cell_name\u003dNone):"},{"line_number":269,"context_line":"        return self.call(ctxt,"},{"line_number":270,"context_line":"                         self.make_msg(\u0027get_capacity\u0027, cell_name\u003dcell_name),"},{"line_number":271,"context_line":"                         version\u003d\u00271.6\u0027)[\u0027ram_free\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAOn%2F%2F4PI%3D","line":268,"in_reply_to":"AAAAOn%2F%2F6wc%3D","updated":"2013-04-15 05:54:35.000000000","message":"The get_cell_info_for_neighbors call gets the information about all it\u0027s neighboring cells and not itself.\n\nget_free_ram call get\u0027s the capacity of the same cell or one of it\u0027s children. So it\u0027s a separate call now. Don\u0027t think it\u0027s a good idea to change  get_cell_info_for_neighbors to return it\u0027s own cell_info.","commit_id":"93052a70fa72b6aad6ccb317361db69c436c6766"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"54b839d19b0ec8eb612cae2bcfb314a6e9be96e2","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                              console_type\u003dconsole_type),"},{"line_number":266,"context_line":"                version\u003d\u00271.6\u0027)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def get_free_ram(self, ctxt, cell_name\u003dNone):"},{"line_number":269,"context_line":"        return self.call(ctxt,"},{"line_number":270,"context_line":"                         self.make_msg(\u0027get_capacity\u0027, cell_name\u003dcell_name),"},{"line_number":271,"context_line":"                         version\u003d\u00271.6\u0027)[\u0027ram_free\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2F2dA%3D","line":268,"updated":"2013-04-17 19:21:09.000000000","message":"I would just call this \"get_capacity\", fetch, and return all the summarized capacity information for the cell.","commit_id":"0478e70fc7c1d9cd973cef8ad92b51191f424538"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c7c03204c4972fb5bb4f7e3519450aab3edba540","unresolved":false,"context_lines":[{"line_number":48,"context_line":"              compute_node_stats()"},{"line_number":49,"context_line":"        1.5 - Adds actions_get(), action_get_by_request_id(), and"},{"line_number":50,"context_line":"              action_events_get()"},{"line_number":51,"context_line":"        1.6 - Adds consoleauth_delete_tokens() and validate_console_port()"},{"line_number":52,"context_line":"        1.7 - Adds service_update()"},{"line_number":53,"context_line":"    \u0027\u0027\u0027"},{"line_number":54,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcrg%3D","line":51,"updated":"2013-05-09 09:43:28.000000000","message":"1.8 here I think","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c7c03204c4972fb5bb4f7e3519450aab3edba540","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    def get_capacities(self, ctxt, cell_name\u003dNone):"},{"line_number":283,"context_line":"        return self.call(ctxt,"},{"line_number":284,"context_line":"                         self.make_msg(\u0027get_capacities\u0027, cell_name\u003dcell_name),"},{"line_number":285,"context_line":"                         version\u003d\u00271.6\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcrk%3D","line":285,"updated":"2013-05-09 09:43:28.000000000","message":"Need to bump the RPC version. This should be 1.8, with the other appropriate changes.","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"}],"nova/cells/state.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"476d222b7d676443de8512de32c3fabe41d0c4b7","unresolved":false,"context_lines":[{"line_number":364,"context_line":"    def get_capacities(self, cell_name\u003dNone):"},{"line_number":365,"context_line":"        if not cell_name or (cell_name \u003d\u003d self.my_cell_state.name):"},{"line_number":366,"context_line":"            return self.get_our_capacities()"},{"line_number":367,"context_line":"        child_cell \u003d self.child_cells[cell_name]"},{"line_number":368,"context_line":"        if child_cell:"},{"line_number":369,"context_line":"            return child_cell.capacities"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcy8%3D","line":367,"updated":"2013-05-09 07:37:09.000000000","message":"This can raise a KeyError. \n\nself.child_cells.get(cell_name)","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":7490,"name":"Navneet Kumar","email":"navneetk@thoughtworks.com","username":"navneetk"},"change_message_id":"1c682f25a7217449209de5d4e2646381a9e2c015","unresolved":false,"context_lines":[{"line_number":364,"context_line":"    def get_capacities(self, cell_name\u003dNone):"},{"line_number":365,"context_line":"        if not cell_name or (cell_name \u003d\u003d self.my_cell_state.name):"},{"line_number":366,"context_line":"            return self.get_our_capacities()"},{"line_number":367,"context_line":"        child_cell \u003d self.child_cells[cell_name]"},{"line_number":368,"context_line":"        if child_cell:"},{"line_number":369,"context_line":"            return child_cell.capacities"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2FcqI%3D","line":367,"in_reply_to":"AAAAOn%2F%2Fcy8%3D","updated":"2013-05-09 10:04:31.000000000","message":"We will handle the key error. But I wanted to know what should be the expected API response if invalid cell_name is given. I can think of these options:\n1 - None\n2 - {}\n3 - Error Response (cell not found)","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"1982639cf68162b4143d080337803343599bd7d4","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    @sync_from_db"},{"line_number":365,"context_line":"    def get_capacities(self, cell_name\u003dNone):"},{"line_number":366,"context_line":"        if not cell_name or (cell_name \u003d\u003d self.my_cell_state.name):"},{"line_number":367,"context_line":"            return self.get_our_capacities()"},{"line_number":368,"context_line":"        if cell_name in self.child_cells:"},{"line_number":369,"context_line":"            return self.child_cells[cell_name].capacities"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAO3%2F%2F%2Bj4%3D","line":366,"updated":"2013-05-15 18:46:38.000000000","message":"Note: The parentheses are not necessary here, though I will admit they help readability a little…","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"850d212e7b2375cd10d4e034eb895bdb359f0194","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    @sync_from_db"},{"line_number":365,"context_line":"    def get_capacities(self, cell_name\u003dNone):"},{"line_number":366,"context_line":"        if not cell_name or (cell_name \u003d\u003d self.my_cell_state.name):"},{"line_number":367,"context_line":"            return self.get_our_capacities()"},{"line_number":368,"context_line":"        if cell_name in self.child_cells:"},{"line_number":369,"context_line":"            return self.child_cells[cell_name].capacities"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F%2FAE%3D","line":366,"in_reply_to":"AAAAO3%2F%2F%2Bj4%3D","updated":"2013-05-17 05:00:58.000000000","message":"We\u0027ll remove the parentheses","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"9b131000ec725542cdf5d3c34c8d256b742a5216","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    @sync_from_db"},{"line_number":365,"context_line":"    def get_capacities(self, cell_name\u003dNone):"},{"line_number":366,"context_line":"        if not cell_name or (cell_name \u003d\u003d self.my_cell_state.name):"},{"line_number":367,"context_line":"            return self.get_our_capacities()"},{"line_number":368,"context_line":"        if cell_name in self.child_cells:"},{"line_number":369,"context_line":"            return self.child_cells[cell_name].capacities"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAPH%2F%2F6iE%3D","line":366,"in_reply_to":"AAAAPH%2F%2F%2FAE%3D","updated":"2013-05-20 13:22:18.000000000","message":"Done","commit_id":"de7a8d4162a26a0d24b3b0020c0e95c0486da4a1"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"cd25bc162f73a18dac10390225b596d2d8b4e361","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from nova import context"},{"line_number":27,"context_line":"from nova.db import base"},{"line_number":28,"context_line":"from nova import exception"},{"line_number":29,"context_line":"from nova.openstack.common import lockutils"},{"line_number":30,"context_line":"from nova.openstack.common import log as logging"},{"line_number":31,"context_line":"from nova.openstack.common import timeutils"},{"line_number":32,"context_line":"from nova import utils"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAPH%2F%2Fnmo%3D","line":29,"updated":"2013-05-29 06:59:58.000000000","message":"not used?","commit_id":"fd8c2775f59fe7d250cf6b1169cdd1093955f1c1"}],"nova/tests/cells/test_cells_rpcapi.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"476d222b7d676443de8512de32c3fabe41d0c4b7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        call_info \u003d self._stub_rpc_method(\u0027call\u0027,"},{"line_number":120,"context_line":"                    result\u003dcapacity_info)"},{"line_number":121,"context_line":"        result \u003d self.cells_rpcapi.get_capacities(self.fake_context,"},{"line_number":122,"context_line":"                                                cell_name\u003d\"name\")"},{"line_number":123,"context_line":"        self._check_result(call_info, \u0027get_capacities\u0027,"},{"line_number":124,"context_line":"                            {\u0027cell_name\u0027: \u0027name\u0027}, version\u003d\u00271.6\u0027)"},{"line_number":125,"context_line":"        self.assertEqual(capacity_info, result)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcy4%3D","line":122,"updated":"2013-05-09 07:37:09.000000000","message":"nit: it would be nice if the params aligned here.","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"476d222b7d676443de8512de32c3fabe41d0c4b7","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        result \u003d self.cells_rpcapi.get_capacities(self.fake_context,"},{"line_number":122,"context_line":"                                                cell_name\u003d\"name\")"},{"line_number":123,"context_line":"        self._check_result(call_info, \u0027get_capacities\u0027,"},{"line_number":124,"context_line":"                            {\u0027cell_name\u0027: \u0027name\u0027}, version\u003d\u00271.6\u0027)"},{"line_number":125,"context_line":"        self.assertEqual(capacity_info, result)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def test_instance_update_at_top(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcy0%3D","line":124,"updated":"2013-05-09 07:37:09.000000000","message":"ditto","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"}],"nova/tests/cells/test_cells_state_manager.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"476d222b7d676443de8512de32c3fabe41d0c4b7","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        other_cell \u003d models.Cell(name\u003d\"other_cell_name\")"},{"line_number":141,"context_line":"        cell.capacities \u003d self.capacities"},{"line_number":142,"context_line":"        other_cell.capacities \u003d self.capacities"},{"line_number":143,"context_line":"        self.stubs.Set(self.state_manager, \u0027child_cells\u0027,"},{"line_number":144,"context_line":"                        {\"cell_name\": cell,"},{"line_number":145,"context_line":"                        \"other_cell_name\": other_cell})"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcyw%3D","line":143,"updated":"2013-05-09 07:37:09.000000000","message":"same nit comment about alignment through out this file..","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"98f88ecca45644189465c1358741a6d76ee8eef2","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def test_get_cell_capacity_for_the_parent_cell(self):"},{"line_number":155,"context_line":"        self.stubs.Set(self.state_manager.my_cell_state, \u0027capacities\u0027,"},{"line_number":156,"context_line":"                                                        self.capacities)"},{"line_number":157,"context_line":"        self.assertEqual({\"ram_free\": 3702},"},{"line_number":158,"context_line":"        self.state_manager.get_capacities("},{"line_number":159,"context_line":"                                self.state_manager.my_cell_state.name))"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAPX%2F%2F8kc%3D","line":157,"updated":"2013-06-05 14:58:56.000000000","message":"I am confused by this test.  You assert first and then run a method.","commit_id":"95ecd5b2473babf5886856bbb7f7ea8e4fee96b6"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"73b2024ccdf11b2e2ad8c26a5f757b58c0cfacf4","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def test_get_cell_capacity_for_the_parent_cell(self):"},{"line_number":155,"context_line":"        self.stubs.Set(self.state_manager.my_cell_state, \u0027capacities\u0027,"},{"line_number":156,"context_line":"                                                        self.capacities)"},{"line_number":157,"context_line":"        self.assertEqual({\"ram_free\": 3702},"},{"line_number":158,"context_line":"        self.state_manager.get_capacities("},{"line_number":159,"context_line":"                                self.state_manager.my_cell_state.name))"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAPX%2F%2F8PE%3D","line":157,"in_reply_to":"AAAAPX%2F%2F8Rw%3D","updated":"2013-06-05 17:04:43.000000000","message":"Can you fix this to be more readable please?","commit_id":"95ecd5b2473babf5886856bbb7f7ea8e4fee96b6"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"58fb30417e29f4d609cbdf1c77f40f3434d63f1e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def test_get_cell_capacity_for_the_parent_cell(self):"},{"line_number":155,"context_line":"        self.stubs.Set(self.state_manager.my_cell_state, \u0027capacities\u0027,"},{"line_number":156,"context_line":"                                                        self.capacities)"},{"line_number":157,"context_line":"        self.assertEqual({\"ram_free\": 3702},"},{"line_number":158,"context_line":"        self.state_manager.get_capacities("},{"line_number":159,"context_line":"                                self.state_manager.my_cell_state.name))"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAPX%2F%2F8Rw%3D","line":157,"in_reply_to":"AAAAPX%2F%2F8kc%3D","updated":"2013-06-05 16:50:01.000000000","message":"Read this as,\n\n\nresult \u003d  self.state_manager.get_capacities(self.state_manager.my_cell_state.name)\n\nself.assertEqual({\"ram_free\": 3702}, result)\n\nIt\u0027s just inlined","commit_id":"95ecd5b2473babf5886856bbb7f7ea8e4fee96b6"}],"nova/tests/integrated/api_samples/os-cells/cells-free-ram-resp.json.tpl":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"350b5d3614ea90eafacef9cca9a4d65151b783ff","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"cell\": {"},{"line_number":3,"context_line":"        \"capacities\": {"},{"line_number":4,"context_line":"            \"disk_free\": {"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"AAAAOn%2F%2FtoI%3D","line":1,"updated":"2013-04-26 15:52:11.000000000","message":"Left-over file?  Or is this being generated somewhere that I missed?","commit_id":"470f595d3b04cb3250b5d7a1751b1fd476d35db5"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ace2fb92566657b552c466447203c45008295b96","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"cell\": {"},{"line_number":3,"context_line":"        \"capacities\": {"},{"line_number":4,"context_line":"            \"disk_free\": {"}],"source_content_type":"text/x-smarty","patch_set":18,"id":"AAAAPH%2F%2FrgM%3D","line":1,"updated":"2013-05-27 14:13:39.000000000","message":"this file seems kind of unique... not used on api samples, does not have its .json and .xml files in docs/\n\nI think you forgot this here","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"87722e428bd27d6d42b3bcfd85acf0001b1f9d5b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"cell\": {"},{"line_number":3,"context_line":"        \"capacities\": {"},{"line_number":4,"context_line":"            \"disk_free\": {"}],"source_content_type":"text/x-smarty","patch_set":18,"id":"AAAAPH%2F%2FrXM%3D","line":1,"in_reply_to":"AAAAPH%2F%2FrgM%3D","updated":"2013-05-27 17:20:36.000000000","message":"Done","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"}],"nova/tests/integrated/api_tests/test_cells_capacity_api.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"476d222b7d676443de8512de32c3fabe41d0c4b7","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Copyright 2011 Justin Santa Barbara"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcyg%3D","line":1,"updated":"2013-05-09 07:37:09.000000000","message":"whoops extra \\n","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":7490,"name":"Navneet Kumar","email":"navneetk@thoughtworks.com","username":"navneetk"},"change_message_id":"b1ada723fa836484b9f3b7b721c23c402af8bd36","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Copyright 2011 Justin Santa Barbara"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAOn%2F%2Fcs4%3D","line":1,"in_reply_to":"AAAAOn%2F%2Fcyg%3D","updated":"2013-05-09 09:14:09.000000000","message":"Copyright is of year 2011.Should I change it?\nIs the copyright message correct?","commit_id":"130012f3fe0bfc37e4c59e0f30f685e10498faaf"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ace2fb92566657b552c466447203c45008295b96","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Copyright 2011 Justin Santa Barbara"},{"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":18,"id":"AAAAPH%2F%2Frl8%3D","line":4,"updated":"2013-05-27 14:13:39.000000000","message":"nit: ^ copyright here...","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"87722e428bd27d6d42b3bcfd85acf0001b1f9d5b","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Copyright 2011 Justin Santa Barbara"},{"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":18,"id":"AAAAPH%2F%2FrXA%3D","line":4,"in_reply_to":"AAAAPH%2F%2Frl8%3D","updated":"2013-05-27 17:20:36.000000000","message":"Done","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ace2fb92566657b552c466447203c45008295b96","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class CellsCapacitySampleJsonTest(test_api_samples.ApiSampleTestBase):"},{"line_number":27,"context_line":"    extension_name \u003d \"nova.api.openstack.compute.contrib.cells.Cells\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2Frk4%3D","line":26,"updated":"2013-05-27 14:13:39.000000000","message":"Why don\u0027t you append this to the general api_samples.py (like already done for the current cells api in https://github.com/openstack/nova/blob/master/nova/tests/integrated/test_api_samples.py#L2711 )?\nIf you apply this please also remove the __init__.py and the directory","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"87722e428bd27d6d42b3bcfd85acf0001b1f9d5b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class CellsCapacitySampleJsonTest(test_api_samples.ApiSampleTestBase):"},{"line_number":27,"context_line":"    extension_name \u003d \"nova.api.openstack.compute.contrib.cells.Cells\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrW0%3D","line":26,"in_reply_to":"AAAAPH%2F%2Frk4%3D","updated":"2013-05-27 17:20:36.000000000","message":"We have a concern that the test_api_samples file os growing too large. \nSubsequently, we\u0027ll be moving tests to api_tests directory.","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"ace2fb92566657b552c466447203c45008295b96","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def test_show_capacities(self):"},{"line_number":46,"context_line":"        response \u003d self._do_get(\u0027os-cells/show_capacities\u0027)"},{"line_number":47,"context_line":"        subs \u003d self._get_regexes()"},{"line_number":48,"context_line":"        return self._verify_response(\u0027cells-capacities-resp\u0027,"},{"line_number":49,"context_line":"                                        subs, response, 200)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _mock_cell_capacity(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrgQ%3D","line":48,"updated":"2013-05-27 14:13:39.000000000","message":"both of your samples are saving on cells-capacities-resp file, so the information is overwritten. So you have 2 tests and 1 response.\n\nI would call this test_get_all_cells_capacities and the first test test_get_cell_capacity (cause in that we specify which cell)","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"87722e428bd27d6d42b3bcfd85acf0001b1f9d5b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def test_show_capacities(self):"},{"line_number":46,"context_line":"        response \u003d self._do_get(\u0027os-cells/show_capacities\u0027)"},{"line_number":47,"context_line":"        subs \u003d self._get_regexes()"},{"line_number":48,"context_line":"        return self._verify_response(\u0027cells-capacities-resp\u0027,"},{"line_number":49,"context_line":"                                        subs, response, 200)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _mock_cell_capacity(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAPH%2F%2FrWg%3D","line":48,"in_reply_to":"AAAAPH%2F%2FrgQ%3D","updated":"2013-05-27 17:20:36.000000000","message":"Done","commit_id":"8c556708ec43aff76626a569b3476f7d4a7e05a5"}],"nova/tests/integrated/test_cells_api.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"5e25d90761934f822685799e089e82eb9a1de390","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class CellsTest(test_api_samples.ApiSampleTestBase):"},{"line_number":27,"context_line":"    extension_name \u003d \"nova.api.openstack.compute.contrib.cells.Cells\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAOn%2F%2F1R0%3D","line":26,"updated":"2013-04-19 15:57:32.000000000","message":"Why are you declaring this in a separate file?  It may be the way to go, but right now all the api samples tests are occurring in test_api_samples.py.  (Note that I\u0027m just asking why, not asking you to change this…)","commit_id":"0478e70fc7c1d9cd973cef8ad92b51191f424538"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"90241aa3c767d3365e8c9bb1a8bb8c6af30bb6ef","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class CellsTest(test_api_samples.ApiSampleTestBase):"},{"line_number":27,"context_line":"    extension_name \u003d \"nova.api.openstack.compute.contrib.cells.Cells\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FyDQ%3D","line":26,"updated":"2013-04-23 15:49:09.000000000","message":"I\u0027m still waiting for an answer to my question.  I\u0027m not going to hold up the patch over it, but I really like being answered when I ask questions…","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ee806aa412e86ae1177ced05a0acc844fbc386ba","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class CellsTest(test_api_samples.ApiSampleTestBase):"},{"line_number":27,"context_line":"    extension_name \u003d \"nova.api.openstack.compute.contrib.cells.Cells\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FwhA%3D","line":26,"in_reply_to":"AAAAOn%2F%2FwiQ%3D","updated":"2013-04-24 15:46:46.000000000","message":"That\u0027s sort of what I figured.  I\u0027d like to recommend that we put these into a separate subdirectory rooted here, instead of cluttering up the \"integrated\" directory…","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"},{"author":{"_account_id":6992,"name":"Kaushik Chandrashekar","email":"kaushik.chandrashekar@rackspace.com","username":"kaushikc"},"change_message_id":"4b6f6bbb86c26bba6f4c71b2adea362fcabdff7c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class CellsTest(test_api_samples.ApiSampleTestBase):"},{"line_number":27,"context_line":"    extension_name \u003d \"nova.api.openstack.compute.contrib.cells.Cells\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAOn%2F%2FwiQ%3D","line":26,"in_reply_to":"AAAAOn%2F%2FyDQ%3D","updated":"2013-04-24 15:39:19.000000000","message":"Sorry I didn\u0027t know how to reply to questions here.. But the answer is,\n\nThe test_api_samples.py file was growing too big. Going forward, we\u0027ll put these tests in smaller classes. We didn\u0027t want to refactor the whole class for this feature. We\u0027ll keep refactoring in subsequent commits.","commit_id":"0adcf4c92c8b2b26f5e4b4da36e31c56b3fb4423"}]}
