)]}'
{"heat/engine/stack_user.py":[{"author":{"_account_id":7135,"name":"Liang Chen","email":"liangchen.linux@gmail.com","username":"Liang"},"change_message_id":"8e9c1e407d017f0a0a3658d0ad955e3e5394f03e","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            self.keystone().delete_stack_domain_user_keypair("},{"line_number":141,"context_line":"                user_id\u003duser_id, project_id\u003dself.stack.stack_user_project_id,"},{"line_number":142,"context_line":"                credential_id\u003dcredential_id)"},{"line_number":143,"context_line":"        except ValueError:"},{"line_number":144,"context_line":"            self.keystone().delete_ec2_keypair("},{"line_number":145,"context_line":"                user_id\u003duser_id, credential_id\u003dcredential_id)"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FYyE%3D","line":143,"updated":"2014-03-06 13:25:44.000000000","message":"It looks like delete_stack_domain_user_keypair already handles the legacy fallback.","commit_id":"cb44322bfc04f5c942e586417cb140fdc14295ec"},{"author":{"_account_id":7135,"name":"Liang Chen","email":"liangchen.linux@gmail.com","username":"Liang"},"change_message_id":"c06903fcdbb59e8a3b7c6396adf66d1470db9ab3","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            self.keystone().delete_stack_domain_user_keypair("},{"line_number":141,"context_line":"                user_id\u003duser_id, project_id\u003dself.stack.stack_user_project_id,"},{"line_number":142,"context_line":"                credential_id\u003dcredential_id)"},{"line_number":143,"context_line":"        except ValueError:"},{"line_number":144,"context_line":"            self.keystone().delete_ec2_keypair("},{"line_number":145,"context_line":"                user_id\u003duser_id, credential_id\u003dcredential_id)"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FSJA%3D","line":143,"in_reply_to":"AAAAVn%2F%2FXJc%3D","updated":"2014-03-07 02:50:49.000000000","message":"Thank you very much for the detailed explanation!  +2 then ;)","commit_id":"cb44322bfc04f5c942e586417cb140fdc14295ec"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"1e2055350781ad57aeeabda891ad47155d611e37","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            self.keystone().delete_stack_domain_user_keypair("},{"line_number":141,"context_line":"                user_id\u003duser_id, project_id\u003dself.stack.stack_user_project_id,"},{"line_number":142,"context_line":"                credential_id\u003dcredential_id)"},{"line_number":143,"context_line":"        except ValueError:"},{"line_number":144,"context_line":"            self.keystone().delete_ec2_keypair("},{"line_number":145,"context_line":"                user_id\u003duser_id, credential_id\u003dcredential_id)"},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FXJc%3D","line":143,"in_reply_to":"AAAAVn%2F%2FYyE%3D","updated":"2014-03-06 16:22:23.000000000","message":"No, there are two legacy fallback requirements - the first is if the deployer hasn\u0027t setup the domain stuff in their heat.conf (then we switch immediately to using the old code path, which is what you\u0027re referring to)\n\nThe second is the case where the heat.conf stuff is configured, but an existing keypair exists in the DB after upgrade, and on delete we have to not leak it, so we attempt to delete via the new path, and fall back to the old method if _check_stack_domain_user raises ValueError.\n\nThe scenario which will result in this happening is:\n- Stack created with AccessKey resource in it\n- Heat upgraded, Havana-\u003eIcehouse\n- Stack updated adding some resource which is a StackUser subclass (hence sets stack.stack_user_project_id in the DB)\n- Stack is deleted, post-update resources use the \"new\" domain-users delete path, \"old\" resources from before the heat upgrade fall back via ValueError to the old path.\n\nThat\u0027s the theory anyway, hope that clarifies! :)","commit_id":"cb44322bfc04f5c942e586417cb140fdc14295ec"}],"heat/tests/test_stack_user.py":[{"author":{"_account_id":7135,"name":"Liang Chen","email":"liangchen.linux@gmail.com","username":"Liang"},"change_message_id":"8e9c1e407d017f0a0a3658d0ad955e3e5394f03e","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                               \u0027delete_stack_domain_user_keypair\u0027)"},{"line_number":314,"context_line":"        fakes.FakeKeystoneClient.delete_stack_domain_user_keypair("},{"line_number":315,"context_line":"            user_id\u003d\u0027auserdel\u0027, project_id\u003d\u0027aprojectdel\u0027,"},{"line_number":316,"context_line":"            credential_id\u003d\u0027acredential\u0027).AndRaise(ValueError())"},{"line_number":317,"context_line":"        self.m.StubOutWithMock(fakes.FakeKeystoneClient,"},{"line_number":318,"context_line":"                               \u0027delete_ec2_keypair\u0027)"},{"line_number":319,"context_line":"        fakes.FakeKeystoneClient.delete_ec2_keypair("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FYqE%3D","line":316,"updated":"2014-03-06 13:25:44.000000000","message":"The test does fake a scenario that ValueError is raised inside delete_stack_domain_user_keypair, so that the exception handling code is exercised . But delete_ec2_keypair will raise error only if neither credential_id or access is specified, and in this case credential_id will always be provided.","commit_id":"cb44322bfc04f5c942e586417cb140fdc14295ec"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"8f97aa7a1fc875096719707f4e3bc05dcfdbe830","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                               \u0027delete_stack_domain_user_keypair\u0027)"},{"line_number":314,"context_line":"        fakes.FakeKeystoneClient.delete_stack_domain_user_keypair("},{"line_number":315,"context_line":"            user_id\u003d\u0027auserdel\u0027, project_id\u003d\u0027aprojectdel\u0027,"},{"line_number":316,"context_line":"            credential_id\u003d\u0027acredential\u0027).AndRaise(ValueError())"},{"line_number":317,"context_line":"        self.m.StubOutWithMock(fakes.FakeKeystoneClient,"},{"line_number":318,"context_line":"                               \u0027delete_ec2_keypair\u0027)"},{"line_number":319,"context_line":"        fakes.FakeKeystoneClient.delete_ec2_keypair("}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2FXE8%3D","line":316,"in_reply_to":"AAAAVn%2F%2FYqE%3D","updated":"2014-03-06 16:27:27.000000000","message":"That\u0027s OK - this is simulating the situation where delete_stack_domain_user_keypair raises ValueError via:\n\n  self._check_stack_domain_user(user_id, project_id, \u0027delete_keypair\u0027)\n\nIn this case, we want the StackUser code to fall back to the legacy, non-domain path.","commit_id":"cb44322bfc04f5c942e586417cb140fdc14295ec"}]}
