)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"083cfabb3e1329144ed29e7b8ab32ff6274c9d3c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"It should be possible to edit the name and description of security groups"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I7003c47e054f032572adbb901be4dbc61839b695"},{"line_number":12,"context_line":"Fixes: bug #918393"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOn%2F%2FWBo%3D","line":12,"updated":"2013-05-14 03:44:16.000000000","message":"nit should be above 11","commit_id":"7e9145bdd0f3e89595920b82eac5212b758a373c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":9,"context_line":"It should be possible to edit the name and description of security groups"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I7003c47e054f032572adbb901be4dbc61839b695"},{"line_number":12,"context_line":"Fixes: bug #918393"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAOn%2F%2FV%2Bg%3D","line":12,"in_reply_to":"AAAAOn%2F%2FWBo%3D","updated":"2013-05-14 04:45:50.000000000","message":"Done","commit_id":"7e9145bdd0f3e89595920b82eac5212b758a373c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":11,"context_line":"security group."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I7003c47e054f032572adbb901be4dbc61839b695"},{"line_number":14,"context_line":"Fixes: bug #918393"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAOn%2F%2FVms%3D","line":14,"updated":"2013-05-14 08:42:25.000000000","message":"Could you move it above the change-id? Same comment from Aaron at patch set 1.","commit_id":"301df4d56cb4c7cfb2a21fb65e1fb4753ac2d18b"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":11,"context_line":"security group."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I7003c47e054f032572adbb901be4dbc61839b695"},{"line_number":14,"context_line":"Fixes: bug #918393"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAAOn%2F%2FVko%3D","line":14,"in_reply_to":"AAAAOn%2F%2FVms%3D","updated":"2013-05-14 09:01:56.000000000","message":"Done","commit_id":"301df4d56cb4c7cfb2a21fb65e1fb4753ac2d18b"}],"quantum/db/securitygroups_db.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FVm4%3D","line":201,"updated":"2013-05-14 08:42:25.000000000","message":"IMHO, it is no problem if we allow to change the description of the default group, though the name must not be changed. It can be done by changing it to \"if  sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:\".","commit_id":"301df4d56cb4c7cfb2a21fb65e1fb4753ac2d18b"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FVk8%3D","line":201,"in_reply_to":"AAAAOn%2F%2FVm4%3D","updated":"2013-05-14 09:01:56.000000000","message":"I\u0027ll apply in the next patch.","commit_id":"301df4d56cb4c7cfb2a21fb65e1fb4753ac2d18b"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":197,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAO3%2F%2F95Q%3D","line":200,"updated":"2013-05-15 22:37:16.000000000","message":"I don\u0027t think we need this check here as we do it here: https://github.com/openstack/quantum/blob/master/quantum/extensions/securitygroup.py#L154  I just wanted a test that tested that .","commit_id":"f5cc6f54a8a1b6e0adfdb64d8eb57b922e53498c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAO3%2F%2F9kg%3D","line":200,"in_reply_to":"AAAAO3%2F%2F95Q%3D","updated":"2013-05-16 00:59:44.000000000","message":"Agree, thanks. I\u0027ll apply in the next patch.","commit_id":"f5cc6f54a8a1b6e0adfdb64d8eb57b922e53498c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAO3%2F%2F9iU%3D","line":200,"in_reply_to":"AAAAO3%2F%2F95Q%3D","updated":"2013-05-16 01:21:46.000000000","message":"IMO, it\u0027s not the same chek.","commit_id":"f5cc6f54a8a1b6e0adfdb64d8eb57b922e53498c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAO3%2F%2F9Kg%3D","line":200,"in_reply_to":"AAAAO3%2F%2F9Ns%3D","updated":"2013-05-16 07:00:26.000000000","message":"Done","commit_id":"f5cc6f54a8a1b6e0adfdb64d8eb57b922e53498c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":197,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAO3%2F%2F9Ns%3D","line":200,"in_reply_to":"AAAAO3%2F%2F9RQ%3D","updated":"2013-05-16 06:05:58.000000000","message":"and a test for that.","commit_id":"f5cc6f54a8a1b6e0adfdb64d8eb57b922e53498c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"unresolved":false,"context_lines":[{"line_number":197,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAO3%2F%2F9RQ%3D","line":200,"in_reply_to":"AAAAO3%2F%2F9iU%3D","updated":"2013-05-16 06:05:16.000000000","message":"DOH you are right. Good catch!\n\nWe are also missing a check that we are not update the security groups name to be default though as well.","commit_id":"f5cc6f54a8a1b6e0adfdb64d8eb57b922e53498c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        s \u003d security_group[\u0027security_group\u0027]"},{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAO3%2F%2F9jA%3D","line":200,"in_reply_to":"AAAAO3%2F%2F9kg%3D","updated":"2013-05-16 01:13:24.000000000","message":"Not really that. the check you said is just a validation of the \u0027name\u0027 update to. but this check is the name of the security group which will be updated.","commit_id":"f5cc6f54a8a1b6e0adfdb64d8eb57b922e53498c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F9hc%3D","line":201,"updated":"2013-05-17 17:37:44.000000000","message":"This check is probably unnecessary as there is already a validator which does this: https://github.com/openstack/quantum/blob/master/quantum/extensions/securitygroup.py#L135\n\nRemoving it indeed the following happens when updating a security group with name \u0027default\u0027:\n\n curl -i http://192.168.36.202:9696/v2.0/security-groups/af40cb75-f898-4e05-99a3-b35ffb68c54f -X PUT -H \"X-Auth-Token: 600e28a5d9c94a76bcaaa574ec34c3a6\" -H \"Content-Type: application/json\" -H \"Accept: application/json\" -H \"User-Agent: python-quantumclient\" -d \u0027{\"security_group\": {\"name\": \"default\"}}\u0027\nHTTP/1.1 409 Conflict\nContent-Type: application/json; charset\u003dUTF-8\nContent-Length: 58\nDate: Fri, 17 May 2013 17:24:56 GMT\n\n{\"QuantumError\": \"Default security group already exists.\"}\n\nThe error message can be improved, but I do not see a problem with the error message as a reason for adding an additional check (and related exception).","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F8xk%3D","line":201,"in_reply_to":"AAAAPH%2F%2F80g%3D","updated":"2013-05-17 23:16:27.000000000","message":"Good point. I did not consider the case of somebody trying to rename the default security group.\n\nI might dare to say I would like to use the policy engine rather then enforcing this in the plugin, but I am happy either way.","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F8vQ%3D","line":201,"in_reply_to":"AAAAPH%2F%2F8xk%3D","updated":"2013-05-17 23:36:35.000000000","message":"check default group name here is just like create_security_group and delete_security_group. maybe should be changed to use the policy engine\n in the future.","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":199,"context_line":"            sg \u003d self._get_security_group(context, id)"},{"line_number":200,"context_line":"            if sg[\u0027name\u0027] \u003d\u003d \u0027default\u0027 and \u0027name\u0027 in s:"},{"line_number":201,"context_line":"                raise ext_sg.SecurityGroupCannotUpdateDefault()"},{"line_number":202,"context_line":"            sg.update(s)"},{"line_number":203,"context_line":"        return self._make_security_group_dict(sg)"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F80g%3D","line":201,"in_reply_to":"AAAAPH%2F%2F9hc%3D","updated":"2013-05-17 23:13:21.000000000","message":"see comments on path set 3. we have already discussed that.\nthe check you said is just a validation of the \u0027name\u0027 update to. but this check is the name of the security group which will be updated.","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"}],"quantum/tests/unit/test_extension_security_group.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"083cfabb3e1329144ed29e7b8ab32ff6274c9d3c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                    \u0027port_range_min\u0027: None}"},{"line_number":278,"context_line":"        self._assert_sg_rule_has_kvs(v6_rule, expected)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def test_update_security_group(self):"},{"line_number":281,"context_line":"        with self.security_group() as sg:"},{"line_number":282,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027name\u0027: \u0027new_name\u0027,"},{"line_number":283,"context_line":"                                       \u0027description\u0027: \u0027new_desc\u0027}}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FWDM%3D","line":280,"updated":"2013-05-14 03:09:27.000000000","message":"could we also add a test to ensure that we can not rename the default security group? It looks like the api won\u0027t let you but still good to have that test imo.","commit_id":"7e9145bdd0f3e89595920b82eac5212b758a373c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                    \u0027port_range_min\u0027: None}"},{"line_number":278,"context_line":"        self._assert_sg_rule_has_kvs(v6_rule, expected)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def test_update_security_group(self):"},{"line_number":281,"context_line":"        with self.security_group() as sg:"},{"line_number":282,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027name\u0027: \u0027new_name\u0027,"},{"line_number":283,"context_line":"                                       \u0027description\u0027: \u0027new_desc\u0027}}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FV9o%3D","line":280,"in_reply_to":"AAAAOn%2F%2FWDM%3D","updated":"2013-05-14 04:45:50.000000000","message":"Done","commit_id":"7e9145bdd0f3e89595920b82eac5212b758a373c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":290,"context_line":"            self.assertEqual(res[\u0027security_group\u0027][\u0027description\u0027],"},{"line_number":291,"context_line":"                             data[\u0027security_group\u0027][\u0027description\u0027])"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def test_update_security_group_to_default_fail(self):"},{"line_number":294,"context_line":"        with self.security_group() as sg:"},{"line_number":295,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027name\u0027: \u0027default\u0027,"},{"line_number":296,"context_line":"                                       \u0027description\u0027: \u0027new_desc\u0027}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BOU%3D","line":293,"updated":"2013-05-17 14:08:15.000000000","message":"I think test_update_security_group_name_to_default_fail is a better method name.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            self.assertEqual(res[\u0027security_group\u0027][\u0027description\u0027],"},{"line_number":291,"context_line":"                             data[\u0027security_group\u0027][\u0027description\u0027])"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def test_update_security_group_to_default_fail(self):"},{"line_number":294,"context_line":"        with self.security_group() as sg:"},{"line_number":295,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027name\u0027: \u0027default\u0027,"},{"line_number":296,"context_line":"                                       \u0027description\u0027: \u0027new_desc\u0027}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BGE%3D","line":293,"in_reply_to":"AAAAPH%2F%2F%2BOU%3D","updated":"2013-05-17 16:25:13.000000000","message":"Done","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                          sg[\u0027security_group\u0027][\u0027id\u0027])"},{"line_number":300,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":301,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BiQ%3D","line":302,"updated":"2013-05-17 11:57:09.000000000","message":"Is this test correct?\nI suspect not. We were expect an exception returning 409 Conflict (as inherits from InUse).\nInstead we have a 404. which might be reaised because you are retrieving a security group created in admin context with another tenant\u0027s credentials.\n\nTo me it looks like this is testing something different from what it should have been tested.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                          sg[\u0027security_group\u0027][\u0027id\u0027])"},{"line_number":300,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":301,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F9w0%3D","line":302,"in_reply_to":"AAAAPH%2F%2F%2BiQ%3D","updated":"2013-05-17 16:25:13.000000000","message":"from the check result, 404 returned here is correct.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"},{"line_number":306,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"},{"line_number":307,"context_line":"            sg \u003d self.deserialize(self.fmt, res.get_response(self.ext_api))"},{"line_number":308,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027description\u0027: \u0027new_desc\u0027}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BiI%3D","line":305,"updated":"2013-05-17 11:57:09.000000000","message":"Why the network?","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"},{"line_number":306,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"},{"line_number":307,"context_line":"            sg \u003d self.deserialize(self.fmt, res.get_response(self.ext_api))"},{"line_number":308,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027description\u0027: \u0027new_desc\u0027}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BF8%3D","line":305,"in_reply_to":"AAAAPH%2F%2F%2BPg%3D","updated":"2013-05-17 16:25:13.000000000","message":"Yes, network here is to ensure the default security group exists.\ndefault group is created when list security groups?  from my test results, it\u0027s not as your said.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"},{"line_number":306,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"},{"line_number":307,"context_line":"            sg \u003d self.deserialize(self.fmt, res.get_response(self.ext_api))"},{"line_number":308,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027description\u0027: \u0027new_desc\u0027}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BPg%3D","line":305,"in_reply_to":"AAAAPH%2F%2F%2BiI%3D","updated":"2013-05-17 14:08:15.000000000","message":"I think this tries to ensure the default security group exists. The default security group does not exist at the beginning.\nBut now the default group is created when list security groups, so it must be no longer needed.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":313,"context_line":"            self.assertEqual(res[\u0027security_group\u0027][\u0027description\u0027],"},{"line_number":314,"context_line":"                             data[\u0027security_group\u0027][\u0027description\u0027])"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def test_update_default_security_group(self):"},{"line_number":317,"context_line":"        with self.network():"},{"line_number":318,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"},{"line_number":319,"context_line":"            sg \u003d self.deserialize(self.fmt, res.get_response(self.ext_api))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2Bh0%3D","line":316,"updated":"2013-05-17 11:57:09.000000000","message":"dumb question: is this test aiming at validating something different from test_update_security_group_to_default_fail?","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            self.assertEqual(res[\u0027security_group\u0027][\u0027description\u0027],"},{"line_number":314,"context_line":"                             data[\u0027security_group\u0027][\u0027description\u0027])"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def test_update_default_security_group(self):"},{"line_number":317,"context_line":"        with self.network():"},{"line_number":318,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"},{"line_number":319,"context_line":"            sg \u003d self.deserialize(self.fmt, res.get_response(self.ext_api))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F9v4%3D","line":316,"in_reply_to":"AAAAPH%2F%2F%2BO4%3D","updated":"2013-05-17 16:25:13.000000000","message":"Done","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":313,"context_line":"            self.assertEqual(res[\u0027security_group\u0027][\u0027description\u0027],"},{"line_number":314,"context_line":"                             data[\u0027security_group\u0027][\u0027description\u0027])"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def test_update_default_security_group(self):"},{"line_number":317,"context_line":"        with self.network():"},{"line_number":318,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"},{"line_number":319,"context_line":"            sg \u003d self.deserialize(self.fmt, res.get_response(self.ext_api))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BO4%3D","line":316,"in_reply_to":"AAAAPH%2F%2F%2Bh0%3D","updated":"2013-05-17 14:08:15.000000000","message":"This test checks changing the name of the default group is rejected or not. test_update_secuirty_group_to_default_fail checks changing a name of a security group other than the default to \"default\" is rejected.\n\nThe method name should be more descriptive: test_update_default_security_group_name_fail.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":314,"context_line":"                             data[\u0027security_group\u0027][\u0027description\u0027])"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def test_update_default_security_group(self):"},{"line_number":317,"context_line":"        with self.network():"},{"line_number":318,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"},{"line_number":319,"context_line":"            sg \u003d self.deserialize(self.fmt, res.get_response(self.ext_api))"},{"line_number":320,"context_line":"            data \u003d {\u0027security_group\u0027: {\u0027name\u0027: \u0027new_name\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BiM%3D","line":317,"updated":"2013-05-17 11:57:09.000000000","message":"Why this network?","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":324,"context_line":"                                          sg[\u0027security_groups\u0027][0][\u0027id\u0027])"},{"line_number":325,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":326,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":327,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_default_security_group(self):"},{"line_number":330,"context_line":"        with self.network():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BiE%3D","line":327,"updated":"2013-05-17 11:57:09.000000000","message":"Again, this should expect a 409.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":325,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":326,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":327,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_default_security_group(self):"},{"line_number":330,"context_line":"        with self.network():"},{"line_number":331,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BOc%3D","line":328,"updated":"2013-05-17 14:08:15.000000000","message":"it is allowed to change the description of the default group. It is better to add a test for this case.","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":325,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":326,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":327,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def test_default_security_group(self):"},{"line_number":330,"context_line":"        with self.network():"},{"line_number":331,"context_line":"            res \u003d self.new_list_request(\u0027security-groups\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2BA8%3D","line":328,"in_reply_to":"AAAAPH%2F%2F%2BOc%3D","updated":"2013-05-17 16:25:13.000000000","message":"already included in above \u0027test_update_default_security_group_with_description\u0027","commit_id":"495778d9e2010197abcc9dea852260f01a8ab124"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                          sg[\u0027security_group\u0027][\u0027id\u0027])"},{"line_number":300,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":301,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F9hA%3D","line":302,"updated":"2013-05-17 17:37:44.000000000","message":"I reiterate my comment.\nYou correctly stated that 404 is error code returned, but my question is that 404 SHOULD NOT be the error code returned.\n\nWe are expecting a 409 here.\nIndeed what is happening is that you\u0027re sending the request to self.api, which is the main api router, whereas you should send it to self.ext_api (see all the other tests, including the ones you wrote).\n\nThe core api router does not have a route for the uri path starting with security-group, hence the 404.","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                          sg[\u0027security_group\u0027][\u0027id\u0027])"},{"line_number":300,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":301,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F8wY%3D","line":302,"in_reply_to":"AAAAPH%2F%2F8xU%3D","updated":"2013-05-17 23:21:50.000000000","message":"yes. 409 should be returned.","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                          sg[\u0027security_group\u0027][\u0027id\u0027])"},{"line_number":300,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":301,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F8xU%3D","line":302,"in_reply_to":"AAAAPH%2F%2F8yE%3D","updated":"2013-05-17 23:16:27.000000000","message":"You mean 409?","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"16627c836f11948829e175eecaebd629ee2d7164","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                                          sg[\u0027security_group\u0027][\u0027id\u0027])"},{"line_number":300,"context_line":"            req.environ[\u0027quantum.context\u0027] \u003d context.Context(\u0027\u0027, \u0027somebody\u0027)"},{"line_number":301,"context_line":"            res \u003d req.get_response(self.api)"},{"line_number":302,"context_line":"            self.assertEqual(res.status_int, 404)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_default_security_group_with_description(self):"},{"line_number":305,"context_line":"        with self.network():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F8yE%3D","line":302,"in_reply_to":"AAAAPH%2F%2F9hA%3D","updated":"2013-05-17 23:13:21.000000000","message":"DOH you are right. 404 should be returned here.","commit_id":"2b1bb3b73e8bc405975519f666531d9dcc5af9ab"}]}
