)]}'
{"rally/benchmark/context/secgroup.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"b2b5ccb1a302fe8cd3e85a58fee7431ce8dca041","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                                                      secgroup_name)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @utils.log_task_wrapper(LOG.info, _(\"Exit context: `allow_ssh`\"))"},{"line_number":116,"context_line":"    def cleanup(self):"},{"line_number":117,"context_line":"        admin \u003d self.context.get(\"admin\")"},{"line_number":118,"context_line":"        adminclients \u003d osclients.Clients(admin[\"endpoint\"])"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_3557e6cf","line":116,"updated":"2015-05-04 02:06:29.000000000","message":"Cleanup here only work for scenarios using context \u0027allow_ssh\u0027, so you should cleanup the default security group elsewhere for all cases.","commit_id":"449ec54c014be55900f6ea1d2e2205e11a83abdc"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"65f4fe53527ba53c95f2b8e6a6e8f3d5bad41cfd","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                                                      secgroup_name)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @utils.log_task_wrapper(LOG.info, _(\"Exit context: `allow_ssh`\"))"},{"line_number":116,"context_line":"    def cleanup(self):"},{"line_number":117,"context_line":"        admin \u003d self.context.get(\"admin\")"},{"line_number":118,"context_line":"        adminclients \u003d osclients.Clients(admin[\"endpoint\"])"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3acd31a7_1a619205","line":116,"in_reply_to":"3acd31a7_3557e6cf","updated":"2015-05-05 07:19:59.000000000","message":"Yes, you are right, I moved the code to the tenant deletion block.","commit_id":"449ec54c014be55900f6ea1d2e2205e11a83abdc"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"183e39827f877f4f393eefad8d33908a67ac2803","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @utils.log_task_wrapper(LOG.info, _(\"Exit context: `allow_ssh`\"))"},{"line_number":116,"context_line":"    def cleanup(self):"},{"line_number":117,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"3acd31a7_5c9131f0","line":117,"updated":"2015-05-05 18:50:42.000000000","message":"Maybe\n\n    pass\n\ninstead?","commit_id":"031cb15d38f8c5d189de76830708e6c316fd6f7a"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"adecc914b78a84b45b1c6664e8db80d774650dfa","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @utils.log_task_wrapper(LOG.info, _(\"Exit context: `allow_ssh`\"))"},{"line_number":116,"context_line":"    def cleanup(self):"},{"line_number":117,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_79afffe3","line":117,"in_reply_to":"3acd31a7_5c9131f0","updated":"2015-05-06 02:16:13.000000000","message":"Seems pretty much the same to me in this case, but done.","commit_id":"031cb15d38f8c5d189de76830708e6c316fd6f7a"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"1069d6892dd5171260a9a729fe24297602341875","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @utils.log_task_wrapper(LOG.info, _(\"Exit context: `allow_ssh`\"))"},{"line_number":116,"context_line":"    def cleanup(self):"},{"line_number":117,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aca2d91_5156cfce","line":117,"updated":"2015-05-09 12:59:48.000000000","message":"You just can\u0027t remove this block, because it will add billions of sec groups and won\u0027t remove them. \n\nNote that you can use this context with scenarios that doesn\u0027t touch sec groups.","commit_id":"424816c4045fd0971d34b41b1727fdc9fb61ccba"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"5f5f4b78398b6e7dda521e70d88ba74fb453bfdf","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @utils.log_task_wrapper(LOG.info, _(\"Exit context: `allow_ssh`\"))"},{"line_number":116,"context_line":"    def cleanup(self):"},{"line_number":117,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aca2d91_95bd72b9","line":117,"in_reply_to":"1aca2d91_5156cfce","updated":"2015-05-09 15:53:33.000000000","message":"Do you have an example of a task where this will happen? For me, all security groups !\u003d default get already removed in rally.benchmark.context.cleanup.manager, as I noted in 2. in https://bugs.launchpad.net/rally/+bug/1355629/comments/8, so this change just avoids trying to delete them a second time, leading to lots of errors.","commit_id":"424816c4045fd0971d34b41b1727fdc9fb61ccba"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"4b7aafc659db903fad65aca477e0ea77976551f5","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @utils.log_task_wrapper(LOG.info, _(\"Exit context: `allow_ssh`\"))"},{"line_number":116,"context_line":"    def cleanup(self):"},{"line_number":117,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"9af37de9_6dc74213","line":117,"in_reply_to":"1aca2d91_95bd72b9","updated":"2015-05-11 13:13:04.000000000","message":"As discussed in IRC, I removed this change, will try to have a separate patch for this with better handling.","commit_id":"424816c4045fd0971d34b41b1727fdc9fb61ccba"}],"rally/benchmark/context/users.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"183e39827f877f4f393eefad8d33908a67ac2803","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":116,"context_line":"            return"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("},{"line_number":119,"context_line":"                 self.context[\"users\"]):"},{"line_number":120,"context_line":"             with logging.ExceptionLogger("}],"source_content_type":"text/x-python","patch_set":3,"id":"3acd31a7_fc50fd33","line":117,"updated":"2015-05-05 18:50:42.000000000","message":"AllowSSH.setup() checks net_wrapper.supports_security_group() before creating a secgroup; do we need to check that here as well before trying to find and delete the default security group?","commit_id":"031cb15d38f8c5d189de76830708e6c316fd6f7a"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"adecc914b78a84b45b1c6664e8db80d774650dfa","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":116,"context_line":"            return"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("},{"line_number":119,"context_line":"                 self.context[\"users\"]):"},{"line_number":120,"context_line":"             with logging.ExceptionLogger("}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_39906795","line":117,"in_reply_to":"3acd31a7_fc50fd33","updated":"2015-05-06 02:16:13.000000000","message":"I guess you are right, so I copied that part from secgroup.py over.\n\nThough I admit that I do not understand why the check uses the network wrapper, when all dealing with the security groups later on is happening with the nova client.","commit_id":"031cb15d38f8c5d189de76830708e6c316fd6f7a"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"c564ce086745e2249422ef521669fd63cc13d205","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_83a125ac","line":122,"updated":"2015-05-06 19:31:38.000000000","message":"This line seems either wrong or unnecessary. I know I still want to clean up security groups when using nova-network. I didn\u0027t want to remove it without checking with you, though.","commit_id":"ff8d42642c676c9cb7300f7cdf2e2d6160320bd3"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"647e308d7412e35440da89cd7b89795a3165bbea","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_b226a066","line":122,"in_reply_to":"1aca2d91_83a125ac","updated":"2015-05-07 00:58:49.000000000","message":"when using nova-network, it doesn\u0027t support to delete `default` security group [1], so no problem checking here.\n\n[1]: http://git.openstack.org/cgit/openstack/nova/tree/nova/compute/api.py#n3920","commit_id":"ff8d42642c676c9cb7300f7cdf2e2d6160320bd3"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"82d93fdafb56877be0ef8bdce0e6c59e29d34379","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_7e2b2f31","line":122,"in_reply_to":"1aca2d91_b226a066","updated":"2015-05-07 05:08:17.000000000","message":"The other security groups are deleted here [1], so we only have to deal with the default security group here. With neutron, this can happen only after all the networking items (router etc.) have been deleted,  otherwise you get an error that the security group is still in use. For nova-network I assumed that the default security group would not be created at all, but I admit that I did not explicitly check that.\n\n[1]: http://git.openstack.org/cgit/openstack/rally/tree/rally/benchmark/context/cleanup/resources.py#n77","commit_id":"ff8d42642c676c9cb7300f7cdf2e2d6160320bd3"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"ecd634c62024174ee6d96cc320d5997ef2bbc6c3","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_5db746d8","line":122,"in_reply_to":"1aca2d91_b226a066","updated":"2015-05-07 14:04:06.000000000","message":"Well that\u0027s a giant PITA. I\u0027ve got hundreds of abandoned \u0027default\u0027 security groups sitting around on my test clusters. :(\n\nBut, as this is a nova problem and not a rally problem, this code can stand as-is.","commit_id":"ff8d42642c676c9cb7300f7cdf2e2d6160320bd3"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"79ac5ddd2e8370acd707dd334a0137d117d49e96","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        #                 and change a bit logic of populating lists of users"},{"line_number":106,"context_line":"        #                 and tenants"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _remove_default_security_group(self):"},{"line_number":109,"context_line":"        \"\"\"Delete default security group for tenants.\"\"\""},{"line_number":110,"context_line":"        clients \u003d osclients.Clients(self.endpoint)"},{"line_number":111,"context_line":"        if consts.Service.NOVA not in clients.services().values():"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ad8896b_b70eaae3","line":108,"updated":"2015-05-11 17:17:18.000000000","message":"Actually I dislike such kinds of hacks. Why we can\u0027t cleanup security groups during the security group cleanup?","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2afd375b3c5ca55b2de7b9c6712df746ed4c82b7","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        #                 and change a bit logic of populating lists of users"},{"line_number":106,"context_line":"        #                 and tenants"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _remove_default_security_group(self):"},{"line_number":109,"context_line":"        \"\"\"Delete default security group for tenants.\"\"\""},{"line_number":110,"context_line":"        clients \u003d osclients.Clients(self.endpoint)"},{"line_number":111,"context_line":"        if consts.Service.NOVA not in clients.services().values():"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad58531_21aa7671","line":108,"in_reply_to":"7ad8896b_28f9374e","updated":"2015-05-11 21:16:04.000000000","message":"okay..\u003d(","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"c57870d0406403245971f8f304e2009d0d0ae104","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        #                 and change a bit logic of populating lists of users"},{"line_number":106,"context_line":"        #                 and tenants"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _remove_default_security_group(self):"},{"line_number":109,"context_line":"        \"\"\"Delete default security group for tenants.\"\"\""},{"line_number":110,"context_line":"        clients \u003d osclients.Clients(self.endpoint)"},{"line_number":111,"context_line":"        if consts.Service.NOVA not in clients.services().values():"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ad8896b_28f9374e","line":108,"in_reply_to":"7ad8896b_b70eaae3","updated":"2015-05-11 19:10:34.000000000","message":"The filter in https://github.com/openstack/rally/blob/8cac3199084ab1223e82e9cf8da01f24d544d87f/rally/benchmark/context/cleanup/resources.py#L80 is there for a reason, if you try to delete the default security group at that stage, you get an error because the security group is still in use. The deletion has to happen after the network cleanup it seems and that only takes place after the cleanup context has finished.","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2afd375b3c5ca55b2de7b9c6712df746ed4c82b7","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        net_wrapper \u003d network.wrap(clients, self.config)"},{"line_number":115,"context_line":"        use_sg, msg \u003d net_wrapper.supports_security_group()"},{"line_number":116,"context_line":"        if not use_sg:"},{"line_number":117,"context_line":"            LOG.info(_(\"Security group context is disabled: %(message)s\")"},{"line_number":118,"context_line":"                     % {\"message\": msg})"},{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad58531_a1b426d1","line":117,"updated":"2015-05-11 21:16:04.000000000","message":"LOG.debug() I believe is enough here.","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"d0802136691a47309f370ae3bf772d170f997261","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        net_wrapper \u003d network.wrap(clients, self.config)"},{"line_number":115,"context_line":"        use_sg, msg \u003d net_wrapper.supports_security_group()"},{"line_number":116,"context_line":"        if not use_sg:"},{"line_number":117,"context_line":"            LOG.info(_(\"Security group context is disabled: %(message)s\")"},{"line_number":118,"context_line":"                     % {\"message\": msg})"},{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a0c5dc1_df7251ad","line":117,"in_reply_to":"5ad58531_a1b426d1","updated":"2015-05-12 12:06:28.000000000","message":"Done","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2afd375b3c5ca55b2de7b9c6712df746ed4c82b7","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                     % {\"message\": msg})"},{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad58531_a102e66d","line":121,"updated":"2015-05-11 21:16:04.000000000","message":"It\u0027s better to use explicitly: \n\n  clients.nova() \n\n(it actually caches instnace of client so there won\u0027t be overhead)","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"d0802136691a47309f370ae3bf772d170f997261","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                     % {\"message\": msg})"},{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a0c5dc1_9facd9ee","line":121,"in_reply_to":"5ad58531_a102e66d","updated":"2015-05-12 12:06:28.000000000","message":"Done","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2afd375b3c5ca55b2de7b9c6712df746ed4c82b7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad58531_41db421c","line":122,"updated":"2015-05-11 21:16:04.000000000","message":"I would put this on top line 113","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"d0802136691a47309f370ae3bf772d170f997261","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        nova_admin \u003d clients.nova()"},{"line_number":122,"context_line":"        if utils.check_service_status(nova_admin, \"nova-network\"):"},{"line_number":123,"context_line":"            return"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        for user, tenant_id in rutils.iterate_per_tenants("}],"source_content_type":"text/x-python","patch_set":8,"id":"9a0c5dc1_5fb6613e","line":122,"in_reply_to":"5ad58531_41db421c","updated":"2015-05-12 12:06:28.000000000","message":"Done","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"28a4f3bf20b6614faece75acd58371704cdd2c0f","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _remove_default_security_group(self):"},{"line_number":109,"context_line":"        \"\"\"Delete default security group for tenants.\"\"\""},{"line_number":110,"context_line":"        clients \u003d osclients.Clients(self.endpoint)"},{"line_number":111,"context_line":"        if consts.Service.NOVA not in clients.services().values():"},{"line_number":112,"context_line":"            return"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_f15bd3f4","line":110,"updated":"2015-05-13 13:57:03.000000000","message":"I suggest using `net_wrapper.client\u0027 and `net_wrapper.SERVICE_IMPL\u0027 instead of `clients.nova()\u0027 and checking for `neutron-network\u0027:\n\n\n        net_wrapper \u003d network.wrap(clients, self.config)\n        if net_wrapper.SERVICE_IMPL !\u003d consts.Service.NOVA:\n            return\n\n        use_sg, msg \u003d net_wrapper.supports_security_group()\n        if not use_sg:\n            LOG.debug(\"Security group context is disabled: %(message)s\" %\n                      {\"message\": msg})\n            return\n\n        for user, tenant_id in rutils.iterate_per_tenants(\n                self.context[\"users\"]):\n            with logging.ExceptionLogger(\n                    LOG, _(\"Unable to delete default security group\")):\n                user_client \u003d osclients.Clients(user[\"endpoint\"]).nova()\n                sg \u003d user_client.security_groups.find(name\u003d\"default\")\n                net_wrapper.client.security_groups.delete(sg.id)","commit_id":"4b401aa1dc5d466575ff635f16f1590b0b4773d8"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"06745a7aa925e46cdbbf7ec8ae6c7f291c99ed67","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def _remove_default_security_group(self):"},{"line_number":109,"context_line":"        \"\"\"Delete default security group for tenants.\"\"\""},{"line_number":110,"context_line":"        clients \u003d osclients.Clients(self.endpoint)"},{"line_number":111,"context_line":"        if consts.Service.NOVA not in clients.services().values():"},{"line_number":112,"context_line":"            return"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a0c5dc1_2096a9f0","line":110,"in_reply_to":"9a0c5dc1_f15bd3f4","updated":"2015-05-13 18:54:58.000000000","message":"Imho I would prefer to use\n\n  clients.neutron().security_groups.delete(sg.id) \n\nit\u0027s simpler for understanding...","commit_id":"4b401aa1dc5d466575ff635f16f1590b0b4773d8"}],"tests/unit/benchmark/context/test_users.py":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"82d93fdafb56877be0ef8bdce0e6c59e29d34379","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                    mock.call(ctxt_users[\"u2\"][\"endpoint\"])]"},{"line_number":90,"context_line":"        expected \u003d [required + [mock.call(ctxt_users[\"u1\"][\"endpoint\"])],"},{"line_number":91,"context_line":"                    required + [mock.call(ctxt_users[\"u3\"][\"endpoint\"])]]"},{"line_number":92,"context_line":"        actual \u003d sorted(self.osclients.Clients.call_args_list)"},{"line_number":93,"context_line":"        try:"},{"line_number":94,"context_line":"            self.assertSequenceEqual(actual, sorted(expected[0]))"},{"line_number":95,"context_line":"        except AssertionError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aca2d91_9e828bff","line":92,"updated":"2015-05-07 05:08:17.000000000","message":"This is failing with python3.4, also I\u0027m not sure whether you would need this whole block at all here, since it is checking the behaviour of iterate_per_tenants, which should be tested elsewhere.","commit_id":"ff8d42642c676c9cb7300f7cdf2e2d6160320bd3"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"2afd375b3c5ca55b2de7b9c6712df746ed4c82b7","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            (mock.MagicMock(), \"t1\"),"},{"line_number":76,"context_line":"            (mock.MagicMock(), \"t2\")]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        user_generator._remove_default_security_group()"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        admin_clients.services.assert_called_with()"},{"line_number":81,"context_line":"        mock_netwrap.wrap.assert_called_once_with(admin_clients,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ad58531_81548a54","line":78,"updated":"2015-05-11 21:16:04.000000000","message":"It will be nice to have few tests that tests various cases:\n\n  - no nova\n  - nova network is used\n  - security groups in neutron are disabled","commit_id":"8cd9d08f96bcae8b1c874fb71f2a1a12823a4e70"}]}
