)]}'
{"doc/api_samples/os-shelve/os-shelve.json":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"de53c895e62a3f682caf51f0f0fe671649b9e342","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"shelve\": null"},{"line_number":3,"context_line":"}"}],"source_content_type":"application/json","patch_set":4,"id":"AAAAPn%2F%2FTx0%3D","line":2,"updated":"2013-07-04 11:01:14.000000000","message":"Do we not need the unshelf and shelveOffload examples, somehow?","commit_id":"9c3e2157c01f4f86b677945eec2c97eb6727fe0e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"446a020af3debb2672bc14864429879dfc9f6a4a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"shelve\": null"},{"line_number":3,"context_line":"}"}],"source_content_type":"application/json","patch_set":4,"id":"AAAAP3%2F%2Fs44%3D","line":2,"in_reply_to":"AAAAPn%2F%2FTx0%3D","updated":"2013-07-12 19:03:21.000000000","message":"They should be here.  There are tests for each of them so I\u0027m not sure why they\u0027re not generated.  Will need to investigate.","commit_id":"9c3e2157c01f4f86b677945eec2c97eb6727fe0e"}],"etc/nova/policy.json":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"8ef951ca8c8742e2c5e88fd88646e8370e0eef22","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    \"compute_extension:shelve\": \"\","},{"line_number":164,"context_line":"    \"compute_extension:shelveOffload\": \"rule:admin_api\","},{"line_number":165,"context_line":"    \"compute_extension:v3:os-shelve:shelve\": \"\","},{"line_number":166,"context_line":"    \"compute_extension:v3:os-shelve:shelveOffload\": \"rule:admin_api\","},{"line_number":167,"context_line":"    \"compute_extension:simple_tenant_usage:show\": \"rule:admin_or_owner\","},{"line_number":168,"context_line":"    \"compute_extension:v3:os-simple-tenant-usage:show\": \"rule:admin_or_owner\","},{"line_number":169,"context_line":"    \"compute_extension:simple_tenant_usage:list\": \"rule:admin_api\","}],"source_content_type":"application/json","patch_set":15,"id":"AAAAP3%2F%2Fin8%3D","line":166,"updated":"2013-07-16 19:54:27.000000000","message":"missed a spot","commit_id":"375fe8012a301a99db2d425100046398f35ea1db"}],"nova/api/openstack/compute/contrib/shelve.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"de53c895e62a3f682caf51f0f0fe671649b9e342","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova import exception"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"auth_shelve \u003d exts.extension_authorizer(\u0027compute\u0027, \u0027shelve\u0027)"},{"line_number":28,"context_line":"auth_shelve_offload \u003d exts.extension_authorizer(\u0027compute\u0027, \u0027shelveOffload\u0027)"},{"line_number":29,"context_line":"auth_unshelve \u003d exts.extension_authorizer(\u0027compute\u0027, \u0027unshelve\u0027)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FTxY%3D","line":27,"updated":"2013-07-04 11:01:14.000000000","message":"would be cool to see tests for these, using the fake_policy and admin contexts.","commit_id":"9c3e2157c01f4f86b677945eec2c97eb6727fe0e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"446a020af3debb2672bc14864429879dfc9f6a4a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova import exception"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"auth_shelve \u003d exts.extension_authorizer(\u0027compute\u0027, \u0027shelve\u0027)"},{"line_number":28,"context_line":"auth_shelve_offload \u003d exts.extension_authorizer(\u0027compute\u0027, \u0027shelveOffload\u0027)"},{"line_number":29,"context_line":"auth_unshelve \u003d exts.extension_authorizer(\u0027compute\u0027, \u0027unshelve\u0027)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2Fs5I%3D","line":27,"in_reply_to":"AAAAPn%2F%2FTxY%3D","updated":"2013-07-12 19:03:21.000000000","message":"Will do.","commit_id":"9c3e2157c01f4f86b677945eec2c97eb6727fe0e"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"6edb7926b871e7d8463f22e8d1992d27f3141912","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def _shelve(self, req, id, body):"},{"line_number":47,"context_line":"        \"\"\"Move an instance into shelved mode.\"\"\""},{"line_number":48,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":49,"context_line":"        auth_shelve(context)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":52,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAP3%2F%2FkqY%3D","line":49,"updated":"2013-07-16 12:44:00.000000000","message":"Shouldn\u0027t the authorisation also take the instance so that only the owner or admin can do the action ?","commit_id":"0c50359c03f08d542569983292032689787068ae"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"789183187663b8ec9a2c6ab5e8b772cd76a215b0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def _shelve(self, req, id, body):"},{"line_number":47,"context_line":"        \"\"\"Move an instance into shelved mode.\"\"\""},{"line_number":48,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":49,"context_line":"        auth_shelve(context)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":52,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAP3%2F%2FkcY%3D","line":49,"in_reply_to":"AAAAP3%2F%2FkqY%3D","updated":"2013-07-16 13:31:52.000000000","message":"It\u0027s not the most intuitive thing, but this is the standard paradigm for auth in Nova.  Basic role checking is handled here, and further checking is handled in compute/api.py.  The wrap_check_policy decorator takes the context and instance as arguments for policy checking.  By doing it this way we ensure that other extensions or processes that might want to shelve later are bound by the policy check at the compute/api level.","commit_id":"0c50359c03f08d542569983292032689787068ae"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"6edb7926b871e7d8463f22e8d1992d27f3141912","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def _unshelve(self, req, id, body):"},{"line_number":77,"context_line":"        \"\"\"Restore an instance from shelved mode.\"\"\""},{"line_number":78,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":79,"context_line":"        auth_unshelve(context)"},{"line_number":80,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self.compute_api.unshelve(context, instance)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAP3%2F%2FkqU%3D","line":79,"updated":"2013-07-16 12:44:00.000000000","message":"Shouldn\u0027t the authorisation also take the instance so that only the owner or admin can do the action ?","commit_id":"0c50359c03f08d542569983292032689787068ae"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"789183187663b8ec9a2c6ab5e8b772cd76a215b0","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def _unshelve(self, req, id, body):"},{"line_number":77,"context_line":"        \"\"\"Restore an instance from shelved mode.\"\"\""},{"line_number":78,"context_line":"        context \u003d req.environ[\"nova.context\"]"},{"line_number":79,"context_line":"        auth_unshelve(context)"},{"line_number":80,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            self.compute_api.unshelve(context, instance)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAP3%2F%2FkcU%3D","line":79,"in_reply_to":"AAAAP3%2F%2FkqU%3D","updated":"2013-07-16 13:31:52.000000000","message":"Same as above.","commit_id":"0c50359c03f08d542569983292032689787068ae"}],"nova/tests/fake_policy.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"de53c895e62a3f682caf51f0f0fe671649b9e342","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    \"compute:shelve\": \"\","},{"line_number":88,"context_line":"    \"compute:shelve_offload\": \"\","},{"line_number":89,"context_line":"    \"compute:unshelve\": \"\","},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    \"compute:security_groups:add_to_instance\": \"\","},{"line_number":92,"context_line":"    \"compute:security_groups:remove_from_instance\": \"\","}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2FTyA%3D","line":89,"updated":"2013-07-04 11:01:14.000000000","message":"do we need these?","commit_id":"9c3e2157c01f4f86b677945eec2c97eb6727fe0e"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"446a020af3debb2672bc14864429879dfc9f6a4a","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    \"compute:shelve\": \"\","},{"line_number":88,"context_line":"    \"compute:shelve_offload\": \"\","},{"line_number":89,"context_line":"    \"compute:unshelve\": \"\","},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    \"compute:security_groups:add_to_instance\": \"\","},{"line_number":92,"context_line":"    \"compute:security_groups:remove_from_instance\": \"\","}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2Fs5Q%3D","line":89,"in_reply_to":"AAAAPn%2F%2FTyA%3D","updated":"2013-07-12 19:03:21.000000000","message":"These are from an earlier patch, where they\u0027re appropriate.  But I moved shelve_offload up to the proper patch.","commit_id":"9c3e2157c01f4f86b677945eec2c97eb6727fe0e"}]}
