)]}'
{"nova/compute/api.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"bd6bebac15104dafab6394a7e21ac141c704d6e2","unresolved":false,"context_lines":[{"line_number":1341,"context_line":"            project_id \u003d instance[\u0027project_id\u0027]"},{"line_number":1342,"context_line":"        else:"},{"line_number":1343,"context_line":"            project_id \u003d context.project_id"},{"line_number":1344,"context_line":"        user_id \u003d instance[\u0027user_id\u0027]"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"        try:"},{"line_number":1347,"context_line":"            # NOTE(maoy): no expected_task_state needs to be set"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2F76c%3D","line":1344,"updated":"2014-01-06 15:14:47.000000000","message":"So will quotas get screwed up if it\u0027s an admin user deleting a tenant\u0027s instance?","commit_id":"36d0ea634bd8c7db041c95c61442f49c9fbfc451"},{"author":{"_account_id":7602,"name":"Claxton Correya","email":"claxton@gmail.com","username":"claxton"},"change_message_id":"5732c4a7ab9f4f1d42aa7c0be426c6f59d71a148","unresolved":false,"context_lines":[{"line_number":1341,"context_line":"            project_id \u003d instance[\u0027project_id\u0027]"},{"line_number":1342,"context_line":"        else:"},{"line_number":1343,"context_line":"            project_id \u003d context.project_id"},{"line_number":1344,"context_line":"        user_id \u003d instance[\u0027user_id\u0027]"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"        try:"},{"line_number":1347,"context_line":"            # NOTE(maoy): no expected_task_state needs to be set"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2FtiA%3D","line":1344,"in_reply_to":"AAAAUH%2F%2F76c%3D","updated":"2014-02-25 05:45:17.000000000","message":"I have just simplified the current logic where the instance user id is used if it doesn\u0027t match with the context user id. Else it doesn\u0027t matter if we assign the instance user id or the context user id. \nI\u0027m not sure how will quota\u0027s get screwed up because of this. Are we looking at introducing an admin check too? If so, then the code change will not be valid. We will however have to introduce a check for admin context in the if condition.","commit_id":"36d0ea634bd8c7db041c95c61442f49c9fbfc451"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"e8b0d95a72499652c65eca6700995bc75d322f9a","unresolved":false,"context_lines":[{"line_number":1341,"context_line":"            project_id \u003d instance[\u0027project_id\u0027]"},{"line_number":1342,"context_line":"        else:"},{"line_number":1343,"context_line":"            project_id \u003d context.project_id"},{"line_number":1344,"context_line":"        user_id \u003d instance[\u0027user_id\u0027]"},{"line_number":1345,"context_line":""},{"line_number":1346,"context_line":"        try:"},{"line_number":1347,"context_line":"            # NOTE(maoy): no expected_task_state needs to be set"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2F6bs%3D","line":1344,"in_reply_to":"AAAAUH%2F%2F76c%3D","updated":"2014-01-06 21:18:18.000000000","message":"Kind of seems like it would, we regress the quota system a lot with things like this.","commit_id":"36d0ea634bd8c7db041c95c61442f49c9fbfc451"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"ac916b208e545b51123b7dc95e5560c73fbb3825","unresolved":false,"context_lines":[{"line_number":1360,"context_line":"                    context, instance.uuid))"},{"line_number":1361,"context_line":"        reservations \u003d None"},{"line_number":1362,"context_line":""},{"line_number":1363,"context_line":"        if context.is_admin and context.project_id !\u003d instance.project_id:"},{"line_number":1364,"context_line":"            project_id \u003d instance.project_id"},{"line_number":1365,"context_line":"        else:"},{"line_number":1366,"context_line":"            project_id \u003d context.project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2FkRc%3D","line":1363,"updated":"2014-03-05 10:58:50.000000000","message":"By the same logic, the second clause of the above if statement can be removed as well.","commit_id":"6862f6aa855aa2a7cf5999106428c7e4dfb9daaf"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"46c4473c6906f55390b38cee75af65910515e4c6","unresolved":false,"context_lines":[{"line_number":1360,"context_line":"                    context, instance.uuid))"},{"line_number":1361,"context_line":"        reservations \u003d None"},{"line_number":1362,"context_line":""},{"line_number":1363,"context_line":"        if context.is_admin and context.project_id !\u003d instance.project_id:"},{"line_number":1364,"context_line":"            project_id \u003d instance.project_id"},{"line_number":1365,"context_line":"        else:"},{"line_number":1366,"context_line":"            project_id \u003d context.project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAVn%2F%2FkDw%3D","line":1363,"in_reply_to":"AAAAVn%2F%2FkRc%3D","updated":"2014-03-05 11:20:17.000000000","message":"In fact I am starting to question if any of this makes sense at all. From a quota perspective, why not always set both project_id and user_id from the instance? Am I missing something?","commit_id":"6862f6aa855aa2a7cf5999106428c7e4dfb9daaf"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"75f577ab5102f3a4ef165722f7bd04d0ae084128","unresolved":false,"context_lines":[{"line_number":1360,"context_line":"                    context, instance.uuid))"},{"line_number":1361,"context_line":"        reservations \u003d None"},{"line_number":1362,"context_line":""},{"line_number":1363,"context_line":"        if context.is_admin and context.project_id !\u003d instance.project_id:"},{"line_number":1364,"context_line":"            project_id \u003d instance.project_id"},{"line_number":1365,"context_line":"        else:"},{"line_number":1366,"context_line":"            project_id \u003d context.project_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAWH%2F%2F7hc%3D","line":1363,"in_reply_to":"AAAAVn%2F%2FkRc%3D","updated":"2014-03-12 21:20:13.000000000","message":"Not quite since the second clause is activated, also, if context.is_admin \u003d\u003d False. So it may be that context.project_id !\u003d instance.project_id but project_id \u003d context.project_id is executed.\n\nNo idea, if this is the correct behavior, though.","commit_id":"6862f6aa855aa2a7cf5999106428c7e4dfb9daaf"}]}
