)]}'
{"doc/api_samples/os-flavor-access/flavor-access-create-req.json":[{"author":{"_account_id":2976,"name":"Adalberto Medeiros","email":"adalbas@gmail.com","username":"adalbas"},"change_message_id":"66d18f3cbd37212f8e03e7a9341a5e0113d9c484","unresolved":false,"context_lines":[{"line_number":5,"context_line":"        \"vcpus\": 2,"},{"line_number":6,"context_line":"        \"disk\": 10,"},{"line_number":7,"context_line":"        \"id\": \"10\","},{"line_number":8,"context_line":"        \"os-flavor-access:is_public\": false "},{"line_number":9,"context_line":"    }"},{"line_number":10,"context_line":"}"}],"source_content_type":"application/json","patch_set":3,"id":"AAAAM3%2F%2FDvo%3D","line":8,"updated":"2013-02-08 16:36:59.000000000","message":"whitespace (as in tpl file)","commit_id":"757a445e787a832afe239b14af44ee6dfb57eb0d"}],"doc/api_samples/os-flavor-access/flavor-access-list-resp.json":[{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"4e0351995e100214c4331164dfce9215803b5e68","unresolved":false,"context_lines":[{"line_number":3,"context_line":"        {"},{"line_number":4,"context_line":"            \"flavor_id\": \"10\","},{"line_number":5,"context_line":"            \"tenant_id\": \"fake_tenant\""},{"line_number":6,"context_line":"        },"},{"line_number":7,"context_line":"        {"},{"line_number":8,"context_line":"            \"flavor_id\": \"10\","},{"line_number":9,"context_line":"            \"tenant_id\": \"fake_tenant2\""}],"source_content_type":"application/json","patch_set":5,"id":"AAAAM3%2F%2B6bE%3D","line":6,"updated":"2013-02-14 17:39:17.000000000","message":"the whole point on test_flavor_access_list was to show here that two flavors with same id under different tenants can coexist right? If so, pretty good to include this kind of sample!","commit_id":"8d15f7240716a4ee246a1a4fd2c04468281e9f83"},{"author":{"_account_id":4598,"name":"Giampaolo Lauria","email":"lauria@us.ibm.com","username":"lauria"},"change_message_id":"1bf0c619ae4339cec49a8c54beff68f7f5f2566a","unresolved":false,"context_lines":[{"line_number":3,"context_line":"        {"},{"line_number":4,"context_line":"            \"flavor_id\": \"10\","},{"line_number":5,"context_line":"            \"tenant_id\": \"fake_tenant\""},{"line_number":6,"context_line":"        },"},{"line_number":7,"context_line":"        {"},{"line_number":8,"context_line":"            \"flavor_id\": \"10\","},{"line_number":9,"context_line":"            \"tenant_id\": \"fake_tenant2\""}],"source_content_type":"application/json","patch_set":5,"id":"AAAAM3%2F%2B6X4%3D","line":6,"in_reply_to":"AAAAM3%2F%2B6bE%3D","updated":"2013-02-14 17:50:37.000000000","message":"Mauro: yes, that and also wanted to show a sample having a list made out of more than just 1 element.","commit_id":"8d15f7240716a4ee246a1a4fd2c04468281e9f83"}],"nova/tests/integrated/api_samples/os-flavor-access/flavor-access-create-req.json.tpl":[{"author":{"_account_id":2976,"name":"Adalberto Medeiros","email":"adalbas@gmail.com","username":"adalbas"},"change_message_id":"66d18f3cbd37212f8e03e7a9341a5e0113d9c484","unresolved":false,"context_lines":[{"line_number":5,"context_line":"        \"vcpus\": 2,"},{"line_number":6,"context_line":"        \"disk\": 10,"},{"line_number":7,"context_line":"        \"id\": \"%(flavor_id)s\","},{"line_number":8,"context_line":"        \"os-flavor-access:is_public\": false "},{"line_number":9,"context_line":"    }"},{"line_number":10,"context_line":"}"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"AAAAM3%2F%2FDv8%3D","line":8,"updated":"2013-02-08 16:36:59.000000000","message":"whitespace here","commit_id":"757a445e787a832afe239b14af44ee6dfb57eb0d"}],"nova/tests/integrated/api_samples/os-flavor-access/flavor-access-show-resp.xml.tpl":[{"author":{"_account_id":2976,"name":"Adalberto Medeiros","email":"adalbas@gmail.com","username":"adalbas"},"change_message_id":"66d18f3cbd37212f8e03e7a9341a5e0113d9c484","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003c?xml version\u003d\u00271.0\u0027 encoding\u003d\u0027UTF-8\u0027?\u003e"},{"line_number":2,"context_line":"\u003cflavor xmlns:os-flavor-access\u003d\"http://docs.openstack.org/compute/ext/flavor_access/api/v2\" xmlns:atom\u003d\"http://www.w3.org/2005/Atom\" xmlns\u003d\"http://docs.openstack.org/compute/api/v1.1\" disk\u003d\"0\" vcpus\u003d\"1\" ram\u003d\"512\" name\u003d\"m1.tiny\" id\u003d\"1\" os-flavor-access:is_public\u003d\"True\"\u003e"},{"line_number":3,"context_line":"  \u003catom:link href\u003d\"%(host)s/v2/openstack/flavors/1\" rel\u003d\"self\"/\u003e"},{"line_number":4,"context_line":"  \u003catom:link href\u003d\"%(host)s/openstack/flavors/1\" rel\u003d\"bookmark\"/\u003e"},{"line_number":5,"context_line":"\u003c/flavor\u003e"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"AAAAM3%2F%2FDwc%3D","line":3,"updated":"2013-02-08 16:36:59.000000000","message":"This should be the %(flavor_id)s as defined in the json version","commit_id":"757a445e787a832afe239b14af44ee6dfb57eb0d"}],"nova/tests/integrated/test_api_samples.py":[{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"6d88bbe5818ece9388dfdeaa72ee9197f50f0039","unresolved":false,"context_lines":[{"line_number":2964,"context_line":"        return self._verify_response(\u0027flavor-access-detail-resp\u0027,"},{"line_number":2965,"context_line":"                                     subs, response)"},{"line_number":2966,"context_line":""},{"line_number":2967,"context_line":"    def test_flavor_access_list(self):"},{"line_number":2968,"context_line":"        self._create_flavor()"},{"line_number":2969,"context_line":"        self._add_tenant()"},{"line_number":2970,"context_line":"        self._add_tenant(\"flavor-access-add-tenant-req2\","}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6Tc%3D","line":2967,"updated":"2013-02-14 18:14:28.000000000","message":"also I think it worths a comment of what are you doing here about the coexistence of two flavors with same id, under different tenants","commit_id":"8d15f7240716a4ee246a1a4fd2c04468281e9f83"},{"author":{"_account_id":5174,"name":"Mauro Sergio Martins Rodrigues","email":"maurosr@linux.vnet.ibm.com","username":"maurosr"},"change_message_id":"4e0351995e100214c4331164dfce9215803b5e68","unresolved":false,"context_lines":[{"line_number":2968,"context_line":"        self._create_flavor()"},{"line_number":2969,"context_line":"        self._add_tenant()"},{"line_number":2970,"context_line":"        self._add_tenant(\"flavor-access-add-tenant-req2\","},{"line_number":2971,"context_line":"                         \"flavor-access-add-tenant-resp2\")"},{"line_number":2972,"context_line":"        flavor_id \u003d 10"},{"line_number":2973,"context_line":"        response \u003d self._do_get(\u0027flavors/%s/os-flavor-access\u0027 % flavor_id)"},{"line_number":2974,"context_line":"        self.assertEqual(response.status, 200)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6aA%3D","line":2971,"updated":"2013-02-14 17:39:17.000000000","message":"So instead of create flavor-access-add-tenant-req and flavor-access-add-tenant-req2 we should keep just one of the and in the templates they would come with replacements strings %(tenant_id)s.\n\nSo to do this we should change _add_tenant method to receive tenant and flavor id, which would be stored in the subs dict and sent into the _do_post to differentiate between different tenants. something like:\n\ndef _add_tenant(self, flavor_id\u003d10, tenant_id):\n    subs \u003d {}\n    subs[\u0027flavor_id\u0027] \u003d flavor_id\n    subs[\u0027tenant_id\u0027] \u003d tenant_id\n    response \u003d self._do_post(\u0027flavors/%s/action\u0027 % flavor_id, \n                                            \u0027flavor-access-add-tenant-req\u0027,\n                                            subs)\n    self.assertEqual(response.status, 200)\n    subs.update(self._get_regexes())\n    return self._verify_response(flavor-access-add-tenant-resp, subs, response)\n\nthat would avoid two samples with the same purpose (create a tenant).","commit_id":"8d15f7240716a4ee246a1a4fd2c04468281e9f83"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2d8831b9d31e6562f91ea0063b197f614d1e5d13","unresolved":false,"context_lines":[{"line_number":3195,"context_line":"                                 \u0027flavor-access-add-tenant-req\u0027,"},{"line_number":3196,"context_line":"                                 subs)"},{"line_number":3197,"context_line":"        self.assertEqual(response.status, 200)"},{"line_number":3198,"context_line":"        return self._verify_response(\u0027flavor-access-add-tenant-resp\u0027,"},{"line_number":3199,"context_line":"                                     subs, response)"},{"line_number":3200,"context_line":""},{"line_number":3201,"context_line":"    def _create_flavor(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2B374%3D","line":3198,"updated":"2013-02-15 20:33:26.000000000","message":"I would rather see this check outside of the helper method, since it gets called multiple times in this class.  Same for _create_flavor.","commit_id":"de56abd4b1ed1c797d20c486eeee8d2a5eba5482"}]}
