)]}'
{"quantum/db/securitygroups_db.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a58f61b593798d62280c2baa59cc27ea08813ed0","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def get_security_group(self, context, id, fields\u003dNone, tenant_id\u003dNone):"},{"line_number":151,"context_line":"        \"\"\"Tenant id is given to handle the case when we"},{"line_number":152,"context_line":"        are creating a security group or security group rule on behalf of"},{"line_number":153,"context_line":"        another user."},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa9I%3D","line":152,"updated":"2013-01-23 05:30:21.000000000","message":"\"or security group rule\" is unnecessary. This method is get_security_group :-)","commit_id":"96b57bef8a885d8f3673817cc6e3627337e56c3d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"29c23cf5d8a39c89fcfa07877f18c928d0103609","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def get_security_group(self, context, id, fields\u003dNone, tenant_id\u003dNone):"},{"line_number":151,"context_line":"        \"\"\"Tenant id is given to handle the case when we"},{"line_number":152,"context_line":"        are creating a security group or security group rule on behalf of"},{"line_number":153,"context_line":"        another user."},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa3M%3D","line":152,"in_reply_to":"AAAAM3%2F%2Fa9I%3D","updated":"2013-01-23 06:05:44.000000000","message":"Done","commit_id":"96b57bef8a885d8f3673817cc6e3627337e56c3d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b039cfad011fdbb9d9354dd869d66d77b4fef387","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            tmp_context_tenant_id \u003d context.tenant_id"},{"line_number":158,"context_line":"            context.tenant_id \u003d tenant_id"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            ret \u003d self._make_security_group_dict(self._get_security_group("},{"line_number":162,"context_line":"                                                 context, id), fields)"},{"line_number":163,"context_line":"            ret[\u0027security_group_rules\u0027] \u003d self.get_security_group_rules("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa4s%3D","line":160,"updated":"2013-01-23 06:03:34.000000000","message":"Do we want to do this in a database transaction? That is the get group and get rules should be done in the same transaction?","commit_id":"96b57bef8a885d8f3673817cc6e3627337e56c3d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"29c23cf5d8a39c89fcfa07877f18c928d0103609","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            tmp_context_tenant_id \u003d context.tenant_id"},{"line_number":158,"context_line":"            context.tenant_id \u003d tenant_id"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            ret \u003d self._make_security_group_dict(self._get_security_group("},{"line_number":162,"context_line":"                                                 context, id), fields)"},{"line_number":163,"context_line":"            ret[\u0027security_group_rules\u0027] \u003d self.get_security_group_rules("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa3Q%3D","line":160,"in_reply_to":"AAAAM3%2F%2Fa4s%3D","updated":"2013-01-23 06:05:44.000000000","message":"Woops! Thanks","commit_id":"96b57bef8a885d8f3673817cc6e3627337e56c3d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"29c23cf5d8a39c89fcfa07877f18c928d0103609","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def get_security_group(self, context, id, fields\u003dNone, tenant_id\u003dNone):"},{"line_number":151,"context_line":"        \"\"\"Tenant id is given to handle the case when we"},{"line_number":152,"context_line":"        are creating a security group rule on behalf of another use."},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FaGw%3D","line":152,"updated":"2013-01-23 17:57:50.000000000","message":"If one is creating a security group rule for another tenant they will pass in a tenant_id. In order to create this security group rule for that tenant we need to first confirm that, that tenant has access the the security group. Since all the get methods  use context.tenant_id as for who owns it, this won\u0027t be correct in the case of an admin creating a security group rule for another tenant since that tenant might not own that security group.  I agree this is confusing :)","commit_id":"29835c0ffb3562a56fe823862e00406efcaa7356"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def get_security_group(self, context, id, fields\u003dNone, tenant_id\u003dNone):"},{"line_number":151,"context_line":"        \"\"\"Tenant id is given to handle the case when we"},{"line_number":152,"context_line":"        are creating a security group rule on behalf of another use."},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Faw8%3D","line":152,"updated":"2013-01-23 10:38:03.000000000","message":"creating? This is a get... now I\u0027m confused and sad ;)","commit_id":"29835c0ffb3562a56fe823862e00406efcaa7356"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"29c23cf5d8a39c89fcfa07877f18c928d0103609","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def get_security_group(self, context, id, fields\u003dNone, tenant_id\u003dNone):"},{"line_number":151,"context_line":"        \"\"\"Tenant id is given to handle the case when we"},{"line_number":152,"context_line":"        are creating a security group rule on behalf of another use."},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FZI8%3D","line":152,"in_reply_to":"AAAAM3%2F%2FZJ8%3D","updated":"2013-01-24 09:32:00.000000000","message":"I think this will make more sense. If you are the admin tenant and is creating a security group rule for another tenant you need to first check to see if that tenant has access to that security group. Since all the get methods in quantum access the tenant id via context.tenant_id this won\u0027t be correct since that is the admin\u0027s tenant id (and not the tenant\u0027s). \n\nSo, this function solves this problem by passing in tenant_id in the create_security_group_rule() method.","commit_id":"29835c0ffb3562a56fe823862e00406efcaa7356"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def get_security_group(self, context, id, fields\u003dNone, tenant_id\u003dNone):"},{"line_number":151,"context_line":"        \"\"\"Tenant id is given to handle the case when we"},{"line_number":152,"context_line":"        are creating a security group rule on behalf of another use."},{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        if tenant_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FZJ8%3D","line":152,"in_reply_to":"AAAAM3%2F%2FaGw%3D","updated":"2013-01-24 09:19:31.000000000","message":"Now I\u0027m even more confused, but this has nothing to do with this patch. So let\u0027s put my dumbness aside and just ignore this.","commit_id":"29835c0ffb3562a56fe823862e00406efcaa7356"}],"quantum/extensions/securitygroup.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":178,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":179,"context_line":"                      \u0027required_by_policy\u0027: True,"},{"line_number":180,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":181,"context_line":"        \u0027security_group_rules\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":182,"context_line":"                                 \u0027is_visible\u0027: True},"},{"line_number":183,"context_line":"    },"},{"line_number":184,"context_line":"    \u0027security_group_rules\u0027: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Faws%3D","line":181,"updated":"2013-01-23 10:38:03.000000000","message":"\u0027rules\u0027 might be good enough as a attribute name (you\u0027re already in a \u0027security_group\u0027 resource).\nrepetita iuvant, but sometimes it\u0027s boring!","commit_id":"29835c0ffb3562a56fe823862e00406efcaa7356"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"29c23cf5d8a39c89fcfa07877f18c928d0103609","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":179,"context_line":"                      \u0027required_by_policy\u0027: True,"},{"line_number":180,"context_line":"                      \u0027is_visible\u0027: True},"},{"line_number":181,"context_line":"        \u0027security_group_rules\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":182,"context_line":"                                 \u0027is_visible\u0027: True},"},{"line_number":183,"context_line":"    },"},{"line_number":184,"context_line":"    \u0027security_group_rules\u0027: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2FaGc%3D","line":181,"in_reply_to":"AAAAM3%2F%2Faws%3D","updated":"2013-01-23 17:57:50.000000000","message":"I think security_group_rules should be used since that is the name for the resources that are held here.","commit_id":"29835c0ffb3562a56fe823862e00406efcaa7356"}],"quantum/tests/unit/test_extension_security_group.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a58f61b593798d62280c2baa59cc27ea08813ed0","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                group \u003d self.deserialize("},{"line_number":310,"context_line":"                    \u0027json\u0027, res.get_response(self.ext_api))"},{"line_number":311,"context_line":"                self.assertEqual(group[\u0027security_group\u0027][\u0027id\u0027],"},{"line_number":312,"context_line":"                                 source_group_id)"},{"line_number":313,"context_line":"                self.assertEqual("},{"line_number":314,"context_line":"                    len(group[\u0027security_group\u0027][\u0027security_group_rules\u0027]), 1)"},{"line_number":315,"context_line":"                for k, v, in keys:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa9A%3D","line":312,"updated":"2013-01-23 05:30:21.000000000","message":"How about adding the following line here.\nIt makes L.313-318 more readable.\n\nsg_rule \u003d group[\u0027security_group\u0027][\u0027security_group_rules\u0027]","commit_id":"96b57bef8a885d8f3673817cc6e3627337e56c3d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"29c23cf5d8a39c89fcfa07877f18c928d0103609","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                group \u003d self.deserialize("},{"line_number":310,"context_line":"                    \u0027json\u0027, res.get_response(self.ext_api))"},{"line_number":311,"context_line":"                self.assertEqual(group[\u0027security_group\u0027][\u0027id\u0027],"},{"line_number":312,"context_line":"                                 source_group_id)"},{"line_number":313,"context_line":"                self.assertEqual("},{"line_number":314,"context_line":"                    len(group[\u0027security_group\u0027][\u0027security_group_rules\u0027]), 1)"},{"line_number":315,"context_line":"                for k, v, in keys:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2Fa3I%3D","line":312,"in_reply_to":"AAAAM3%2F%2Fa9A%3D","updated":"2013-01-23 06:05:44.000000000","message":"Done","commit_id":"96b57bef8a885d8f3673817cc6e3627337e56c3d"}]}
