)]}'
{"tempest/common/dynamic_creds.py":[{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"d9559d22677e2423139a638ddd837770b7a9c53a","unresolved":false,"context_lines":[{"line_number":387,"context_line":"                LOG.warning(\"user with name: %s not found for delete\" %"},{"line_number":388,"context_line":"                            creds.username)"},{"line_number":389,"context_line":"            try:"},{"line_number":390,"context_line":"                if CONF.service_available.neutron:"},{"line_number":391,"context_line":"                    self._cleanup_default_secgroup(creds.tenant_id)"},{"line_number":392,"context_line":"            except lib_exc.NotFound:"},{"line_number":393,"context_line":"                LOG.warning(\"failed to cleanup tenant %s\u0027s secgroup\" %"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_e41e3b62","line":390,"updated":"2016-05-30 08:24:08.000000000","message":"What about:\nif CONF.service_available.neutron and test.is_extension_enabled(\u0027security-group\u0027, \u0027network\u0027):\n\n?\nBecause try/except everywhere with generic exception (such as NotFound) is hard to maintain.","commit_id":"6d9a20489eab98f11f78dd4f967fd37e70052c44"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6bf1a0d7564c27fecec6fd45abceb212c68b8dc0","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                            creds.username)"},{"line_number":389,"context_line":"            try:"},{"line_number":390,"context_line":"                api_extension \u003d CONF.network_feature_enabled.api_extensions"},{"line_number":391,"context_line":"                if (CONF.service_available.neutron and"},{"line_number":392,"context_line":"                    api_extension and"},{"line_number":393,"context_line":"                    (api_extension[0] \u003d\u003d \u0027all\u0027 or"},{"line_number":394,"context_line":"                     \u0027security-group\u0027 in api_extension)):"},{"line_number":395,"context_line":"                    self._cleanup_default_secgroup(creds.tenant_id)"},{"line_number":396,"context_line":"                self.creds_client.delete_project(creds.tenant_id)"},{"line_number":397,"context_line":"            except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9abb7d3a_1730a19d","line":394,"range":{"start_line":391,"start_character":0,"end_line":394,"end_character":57},"updated":"2016-05-31 08:00:51.000000000","message":"This is same what is_extension_enabled function does.\nI understand we cannot use that function here due to circular dependency.\n\nI would like to first move that common function to different appropriate file and then use that instead of adding duplicate code.","commit_id":"762b137fca11976e455115afbe19ad836ec62210"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"df15df2444e66de0d45f49ba49979e592552c99e","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                LOG.warning(\"user with name: %s not found for delete\" %"},{"line_number":391,"context_line":"                            creds.username)"},{"line_number":392,"context_line":"            try:"},{"line_number":393,"context_line":"                if CONF.service_available.neutron:"},{"line_number":394,"context_line":"                    self._cleanup_default_secgroup(creds.tenant_id)"},{"line_number":395,"context_line":"            except lib_exc.NotFound:"},{"line_number":396,"context_line":"                LOG.warning(\"failed to cleanup tenant %s\u0027s secgroup\" %"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_05225601","line":393,"range":{"start_line":393,"start_character":16,"end_line":393,"end_character":50},"updated":"2016-06-22 21:23:05.000000000","message":"Oh, I see the point. but current fix is not good for the readability of the code. That seems redundant and it is difficult to understand the purpose as I misunderstood.\n\nHere should be\n\n - if CONF.service_available.neutron:\n + if CONF.service_available.neutron and test.is_extension_enabled(\u0027security-group\u0027, \u0027network\u0027):\n\ninstead for clear purpose.","commit_id":"c1659ccf4cf5326c5b7a978ef75066c865f56264"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"cbc2040fe3651b47316d7ac3673941b160c9cb89","unresolved":false,"context_lines":[{"line_number":390,"context_line":"                LOG.warning(\"user with name: %s not found for delete\" %"},{"line_number":391,"context_line":"                            creds.username)"},{"line_number":392,"context_line":"            try:"},{"line_number":393,"context_line":"                if CONF.service_available.neutron:"},{"line_number":394,"context_line":"                    self._cleanup_default_secgroup(creds.tenant_id)"},{"line_number":395,"context_line":"            except lib_exc.NotFound:"},{"line_number":396,"context_line":"                LOG.warning(\"failed to cleanup tenant %s\u0027s secgroup\" %"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_d105a9c2","line":393,"range":{"start_line":393,"start_character":16,"end_line":393,"end_character":50},"in_reply_to":"3aaa91ec_05225601","updated":"2016-06-23 01:21:25.000000000","message":"Yes I was thinking of using test.is_extension_enabled at first, but it caused \"circular dependency\". And it is hard to find an appropriate file other than test.py to host \"is_extension_enabled\", further more here is just a clearing action, so I just used a simple way to avoid big changes.\n\nAny better solution? or should I add some code comments?","commit_id":"c1659ccf4cf5326c5b7a978ef75066c865f56264"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ede728f389c9b7728bde407ba7227221453cfd88","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            try:"},{"line_number":393,"context_line":"                if CONF.service_available.neutron:"},{"line_number":394,"context_line":"                    self._cleanup_default_secgroup(creds.tenant_id)"},{"line_number":395,"context_line":"            except lib_exc.NotFound:"},{"line_number":396,"context_line":"                LOG.warning(\"failed to cleanup tenant %s\u0027s secgroup\" %"},{"line_number":397,"context_line":"                            creds.tenant_name)"},{"line_number":398,"context_line":"            try:"},{"line_number":399,"context_line":"                self.creds_client.delete_project(creds.tenant_id)"},{"line_number":400,"context_line":"            except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_00c0a87b","line":397,"range":{"start_line":395,"start_character":0,"end_line":397,"end_character":46},"updated":"2016-06-15 22:51:53.000000000","message":"This case is covered in _cleanup_default_secgroup().\nSo this try-except block seems unnecessary.\n\nhttps://github.com/openstack/tempest/blob/master/tempest/common/dynamic_creds.py#L357","commit_id":"c1659ccf4cf5326c5b7a978ef75066c865f56264"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"1a1c1f4fa30ee2f1f2c91b7a5623c3460208ff31","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            try:"},{"line_number":393,"context_line":"                if CONF.service_available.neutron:"},{"line_number":394,"context_line":"                    self._cleanup_default_secgroup(creds.tenant_id)"},{"line_number":395,"context_line":"            except lib_exc.NotFound:"},{"line_number":396,"context_line":"                LOG.warning(\"failed to cleanup tenant %s\u0027s secgroup\" %"},{"line_number":397,"context_line":"                            creds.tenant_name)"},{"line_number":398,"context_line":"            try:"},{"line_number":399,"context_line":"                self.creds_client.delete_project(creds.tenant_id)"},{"line_number":400,"context_line":"            except lib_exc.NotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_acb89f2b","line":397,"range":{"start_line":395,"start_character":0,"end_line":397,"end_character":46},"in_reply_to":"7aa08908_00c0a87b","updated":"2016-06-20 01:40:41.000000000","message":"Thank you.\nBut if security_group extenstion is not enabled, \n_cleanup_default_secgroup will raise an exception when \nit tries to \"list_security_groups\"\n\n    def _cleanup_default_secgroup(self, tenant):\n        nsg_client \u003d self.security_groups_admin_client\n        resp_body \u003d nsg_client.list_security_groups(tenant_id\u003dtenant,\n                                                    name\u003d\"default\")\n\nSo _cleanup_default_secgroup cannot cover the case when Neutron\u0027s security_group extenstion is not enabled.","commit_id":"c1659ccf4cf5326c5b7a978ef75066c865f56264"}],"tempest/lib/base.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"3eac690942634a2efc8c471b802cdc4346bd7f67","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    \"\"\""},{"line_number":33,"context_line":"    config_dict \u003d {"},{"line_number":34,"context_line":"        \u0027compute\u0027: CONF.compute_feature_enabled.api_extensions,"},{"line_number":35,"context_line":"        \u0027volume\u0027: CONF.volume_feature_enabled.api_extensions,"},{"line_number":36,"context_line":"        \u0027network\u0027: CONF.network_feature_enabled.api_extensions,"},{"line_number":37,"context_line":"        \u0027object\u0027: CONF.object_storage_feature_enabled.discoverable_apis,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_9c8bdbc2","line":34,"updated":"2016-06-01 03:28:26.000000000","message":"This violates the rules for something living in tempest/lib. config is not allowed to be used in tempest/lib:\n\nhttp://docs.openstack.org/developer/tempest/library.html#adding-interfaces","commit_id":"d8fb4faa1890689a02d7580307c982ae2eee9a83"}]}
