)]}'
{"patrole_tempest_plugin/tests/api/compute/test_server_actions_rbac.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"9c41b2b4317e4f48260bf3bd3ceb2747728ec009","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def setup_clients(cls):"},{"line_number":39,"context_line":"        super(ServerActionsRbacTest, cls).setup_clients()"},{"line_number":40,"context_line":"        cls.client \u003d cls.servers_client"},{"line_number":41,"context_line":"        cls.hosts_client \u003d cls.os_adm.hosts_client"},{"line_number":42,"context_line":"        cls.services_client \u003d cls.os_adm.services_client"},{"line_number":43,"context_line":"        cls.snapshots_client \u003d cls.snapshots_extensions_client"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_73df310d","line":42,"range":{"start_line":41,"start_character":0,"end_line":42,"end_character":56},"updated":"2017-03-21 17:43:42.000000000","message":"Strictly speaking, these don\u0027t have to be admin clients. I\u0027m concerned whether other tests may be added to this file, and others will incorrectly use these admin clients.","commit_id":"7ad374c9b642aeef6feb03bccc096f4363a74e1f"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"cbf4cc6bf6518e177096f73771afffe7b81cb219","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def setup_clients(cls):"},{"line_number":39,"context_line":"        super(ServerActionsRbacTest, cls).setup_clients()"},{"line_number":40,"context_line":"        cls.client \u003d cls.servers_client"},{"line_number":41,"context_line":"        cls.hosts_client \u003d cls.os_adm.hosts_client"},{"line_number":42,"context_line":"        cls.services_client \u003d cls.os_adm.services_client"},{"line_number":43,"context_line":"        cls.snapshots_client \u003d cls.snapshots_extensions_client"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_f7386cf0","line":42,"range":{"start_line":41,"start_character":0,"end_line":42,"end_character":56},"in_reply_to":"1a1ced50_73df310d","updated":"2017-03-21 18:21:17.000000000","message":"Yes, Felipe I know this point.\nI had intentionally added this point because I was thinking other guys will not agree without admin.\nAnyways I will remove it.","commit_id":"7ad374c9b642aeef6feb03bccc096f4363a74e1f"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"9c41b2b4317e4f48260bf3bd3ceb2747728ec009","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                        host\u003dactual_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class ServerActionsV216RbacTest(rbac_base.BaseV2ComputeRbacTest):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_53d795ec","line":346,"range":{"start_line":344,"start_character":0,"end_line":346,"end_character":58},"updated":"2017-03-21 17:43:42.000000000","message":"Is a cleanup required after this to migrate the server back to its original host?","commit_id":"7ad374c9b642aeef6feb03bccc096f4363a74e1f"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"cbf4cc6bf6518e177096f73771afffe7b81cb219","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                        host\u003dactual_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class ServerActionsV216RbacTest(rbac_base.BaseV2ComputeRbacTest):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_9a5d9d17","line":346,"range":{"start_line":344,"start_character":0,"end_line":346,"end_character":58},"in_reply_to":"1a1ced50_53d795ec","updated":"2017-03-21 18:21:17.000000000","message":"In this particular case, I don\u0027t think so.\nBecause we are not strictly bothering tightly coupling of host Vs servers.\nOnly concern is that host must in UP after these tests which is taken care of. Once host is up further instances will be placed according to scheduler.","commit_id":"7ad374c9b642aeef6feb03bccc096f4363a74e1f"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"5e6984b79afa3f85e19331f7d81142bc778b9391","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        target_host \u003d self._get_host_other_than(actual_host)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        # disable nova-compute service on source host to mark it as \u0027failed\u0027"},{"line_number":338,"context_line":"        self.services_client.disable_service(host\u003dactual_host,"},{"line_number":339,"context_line":"                                             binary\u003d\u0027nova-compute\u0027)"},{"line_number":340,"context_line":"        self.addCleanup(self.services_client.enable_service,"},{"line_number":341,"context_line":"                        host\u003dactual_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_1781184b","line":340,"range":{"start_line":338,"start_character":0,"end_line":340,"end_character":60},"updated":"2017-03-27 03:56:01.000000000","message":"this is dangerous actually do in testing and we should not do.\n\nAs this only need to verify the policy bits cannot we just call API and if it is other error (than policy authorization ) then pass the tests.\n\nI mean doing actual evacuate or forcing it to fail it something overhead for RBAC testing.","commit_id":"a3d4f510d7503186723eaaad03cb3fe7a6e2a164"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c6f3f8f61d6823f5106d7db32a7756cf183ff126","unresolved":false,"context_lines":[{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    @rbac_rule_validation.action("},{"line_number":324,"context_line":"        service\u003d\"nova\","},{"line_number":325,"context_line":"        rule\u003d\"os_compute_api:os-evacuate\")"},{"line_number":326,"context_line":"    @decorators.idempotent_id(\u002778ecef3c-faff-412a-83be-47651963eb21\u0027)"},{"line_number":327,"context_line":"    def test_evacuate_server(self):"},{"line_number":328,"context_line":"        if CONF.compute.min_compute_nodes \u003c 2:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_93b96716","line":325,"range":{"start_line":325,"start_character":41,"end_line":325,"end_character":42},"updated":"2017-04-10 20:18:20.000000000","message":"You could add expected_error_code \u003d 400 here to expect a BadRequest. You\u0027d have to update _get_exception_type in rbac_rule_validation though.","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"b11a7fc159e7d5ef8af868a0ee70d8455b807cc6","unresolved":false,"context_lines":[{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    @rbac_rule_validation.action("},{"line_number":324,"context_line":"        service\u003d\"nova\","},{"line_number":325,"context_line":"        rule\u003d\"os_compute_api:os-evacuate\")"},{"line_number":326,"context_line":"    @decorators.idempotent_id(\u002778ecef3c-faff-412a-83be-47651963eb21\u0027)"},{"line_number":327,"context_line":"    def test_evacuate_server(self):"},{"line_number":328,"context_line":"        if CONF.compute.min_compute_nodes \u003c 2:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_64426611","line":325,"range":{"start_line":325,"start_character":41,"end_line":325,"end_character":42},"in_reply_to":"bff0334d_93b96716","updated":"2017-04-12 08:11:31.000000000","message":"Sure Felipe. I will start looking into this.\nActually, last week I was on leave so could not look into it.","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c6f3f8f61d6823f5106d7db32a7756cf183ff126","unresolved":false,"context_lines":[{"line_number":334,"context_line":"        actual_host \u003d self._get_host_for_server(server_id)"},{"line_number":335,"context_line":"        target_host \u003d self._get_host_other_than(actual_host)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        # disable nova-compute service on source host to mark it as \u0027failed\u0027"},{"line_number":338,"context_line":"        self.services_client.disable_service(host\u003dactual_host,"},{"line_number":339,"context_line":"                                             binary\u003d\u0027nova-compute\u0027)"},{"line_number":340,"context_line":"        self.addCleanup(self.services_client.enable_service,"},{"line_number":341,"context_line":"                        host\u003dactual_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_b3510bdc","line":341,"range":{"start_line":337,"start_character":0,"end_line":341,"end_character":64},"updated":"2017-04-10 20:18:20.000000000","message":"This should be removed.","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c6f3f8f61d6823f5106d7db32a7756cf183ff126","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        self.addCleanup(self.services_client.enable_service,"},{"line_number":341,"context_line":"                        host\u003dactual_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_33573bcd","line":343,"range":{"start_line":343,"start_character":42,"end_line":343,"end_character":58},"updated":"2017-04-10 20:18:20.000000000","message":"toggle_rbac_role (changed in recent patch)","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c6f3f8f61d6823f5106d7db32a7756cf183ff126","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class ServerActionsV216RbacTest(rbac_base.BaseV2ComputeRbacTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_33da9b4a","line":346,"range":{"start_line":346,"start_character":36,"end_line":346,"end_character":57},"updated":"2017-04-10 20:18:20.000000000","message":"According to Nova API documentation, this param was \"Deprecated in version 2.14\", so this whole test should be placed in ServerActionsV214RbacTest (if it\u0027s a required param and must be passed).","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"b11a7fc159e7d5ef8af868a0ee70d8455b807cc6","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class ServerActionsV216RbacTest(rbac_base.BaseV2ComputeRbacTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_64d266d3","line":346,"range":{"start_line":346,"start_character":36,"end_line":346,"end_character":57},"in_reply_to":"bff0334d_33da9b4a","updated":"2017-04-12 08:11:31.000000000","message":"Sure I will move it to new class.","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"6e60f8e3e31a64a65ee1e034a3b91132732dd644","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class ServerActionsV216RbacTest(rbac_base.BaseV2ComputeRbacTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_d58aef61","line":346,"range":{"start_line":346,"start_character":36,"end_line":346,"end_character":57},"in_reply_to":"bff0334d_3a434a44","updated":"2017-04-12 13:45:53.000000000","message":"spell error --\n**we should not remove onSharedStorage paramete","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"44183609972db8dfef73b57d285e253522ef11bf","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class ServerActionsV216RbacTest(rbac_base.BaseV2ComputeRbacTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_3a434a44","line":346,"range":{"start_line":346,"start_character":36,"end_line":346,"end_character":57},"in_reply_to":"bff0334d_64d266d3","updated":"2017-04-12 13:19:34.000000000","message":"If we are going to make tests based on false host, it does not really matter who many correct optional parameters we have passed. So keeping this in mind, we should remove onSharedStorage parameter. And we should not move this whole test to specific class.","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"08448d00fe6a882311d6182231017673b636ca08","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        self.rbac_utils.switch_role(self, switchToRbacRole\u003dTrue)"},{"line_number":344,"context_line":"        self.client.evacuate_server(server_id,"},{"line_number":345,"context_line":"                                    host\u003dtarget_host,"},{"line_number":346,"context_line":"                                    onSharedStorage\u003dFalse)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"class ServerActionsV216RbacTest(rbac_base.BaseV2ComputeRbacTest):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_567b7b8a","line":346,"range":{"start_line":346,"start_character":36,"end_line":346,"end_character":57},"in_reply_to":"bff0334d_d58aef61","updated":"2017-04-12 19:53:50.000000000","message":"I don\u0027t understand why we wouldn\u0027t want to move it into a separate class, called ServerActionsV214RbacTest. \n\nExpecting a BadRequest is dangerous enough. Plus it\u0027s about being consistent: if the onSharedStorage param requires a specific microversion, then that should be respected.","commit_id":"8c48d3ccfbf927e20d088791296f854296112abd"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"11c7041a4987949ccb56c63611854f593b9017b2","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        cls.server_id \u003d cls.create_test_server(wait_until\u003d\u0027ACTIVE\u0027,"},{"line_number":371,"context_line":"                                               validatable\u003dTrue)[\u0027id\u0027]"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def setUp(self):"},{"line_number":374,"context_line":"        super(ServerActionsV214RbacTest, self).setUp()"},{"line_number":375,"context_line":"        try:"},{"line_number":376,"context_line":"            waiters.wait_for_server_status(self.client,"},{"line_number":377,"context_line":"                                           self.server_id, \u0027ACTIVE\u0027)"},{"line_number":378,"context_line":"        except lib_exc.NotFound:"},{"line_number":379,"context_line":"            # if the server was found to be deleted by a previous test,"},{"line_number":380,"context_line":"            # a new one is built"},{"line_number":381,"context_line":"            server \u003d self.create_test_server("},{"line_number":382,"context_line":"                validatable\u003dTrue,"},{"line_number":383,"context_line":"                wait_until\u003d\u0027ACTIVE\u0027)"},{"line_number":384,"context_line":"            self.__class__.server_id \u003d server[\u0027id\u0027]"},{"line_number":385,"context_line":"        except Exception:"},{"line_number":386,"context_line":"            # Rebuilding the server in case something happened during a test"},{"line_number":387,"context_line":"            self.__class__.server_id \u003d self.rebuild_server("},{"line_number":388,"context_line":"                self.server_id, validatable\u003dTrue)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    @rbac_rule_validation.action("},{"line_number":391,"context_line":"        service\u003d\"nova\","}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_0f2691b8","line":388,"range":{"start_line":373,"start_character":0,"end_line":388,"end_character":49},"updated":"2017-04-18 21:02:38.000000000","message":"This isn\u0027t needed because you only have 1 test. I see an argument for including it in the future if another test is added to this class, but right now it just isn\u0027t needed.","commit_id":"64139f0315a3a5f39570cab049958a36182212e9"},{"author":{"_account_id":23185,"name":"Samantha Blanco","email":"samantha.blanco@att.com","username":"sblanco"},"change_message_id":"472b2e0840f49f0f3b206d273dcd9bf88ca78459","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    @decorators.idempotent_id(\u002778ecef3c-faff-412a-83be-47651963eb21\u0027)"},{"line_number":394,"context_line":"    def test_evacuate_server(self):"},{"line_number":395,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":396,"context_line":"        with rbac_rule_validation.ignored(lib_exc.NotFound):"},{"line_number":397,"context_line":"            self.client.evacuate_server(self.server_id, host\u003d\u0027fake-host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_207f2268","line":396,"updated":"2017-04-18 17:27:31.000000000","message":"This seems to serve the same purpose as call_and_ignore_notfound_exc","commit_id":"64139f0315a3a5f39570cab049958a36182212e9"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"2885d0e32b35165c09141bb3e83d8f068a630b1a","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    @decorators.idempotent_id(\u002778ecef3c-faff-412a-83be-47651963eb21\u0027)"},{"line_number":394,"context_line":"    def test_evacuate_server(self):"},{"line_number":395,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":396,"context_line":"        with rbac_rule_validation.ignored(lib_exc.NotFound):"},{"line_number":397,"context_line":"            self.client.evacuate_server(self.server_id, host\u003d\u0027fake-host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_80a71650","line":396,"in_reply_to":"7ffa3b31_207f2268","updated":"2017-04-18 17:55:48.000000000","message":"Samantha, \"call_and_ignore_notfound_exc\" under - https://github.com/openstack/tempest/blob/master/tempest/lib/common/utils/test_utils.py#L81 serves only no found exceptions.\nBut here I have added explicitly \"ignored\" which is ignore exception on demand. This is going to make us benefited much in future.\nOnce this patch is merged, I am planning to submit a new commit where \"expect_error_code\" parameters in decorator will be eliminated completely.\n\nSo keeping future customisation in mind we can consider this approach.","commit_id":"64139f0315a3a5f39570cab049958a36182212e9"},{"author":{"_account_id":23185,"name":"Samantha Blanco","email":"samantha.blanco@att.com","username":"sblanco"},"change_message_id":"4b75ae914df5e7553a26f16fd479b34a86431d7a","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    @decorators.idempotent_id(\u002778ecef3c-faff-412a-83be-47651963eb21\u0027)"},{"line_number":394,"context_line":"    def test_evacuate_server(self):"},{"line_number":395,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":396,"context_line":"        with rbac_rule_validation.ignored(lib_exc.NotFound):"},{"line_number":397,"context_line":"            self.client.evacuate_server(self.server_id, host\u003d\u0027fake-host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_cecb0f70","line":396,"in_reply_to":"7ffa3b31_80a71650","updated":"2017-04-18 18:53:47.000000000","message":"I\u0027m not necessarily opposed to this approach, but I will say that if this is intended to replace expect_error_code, I think I would prefer it moved to the decorator.","commit_id":"64139f0315a3a5f39570cab049958a36182212e9"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"11c7041a4987949ccb56c63611854f593b9017b2","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    @decorators.idempotent_id(\u002778ecef3c-faff-412a-83be-47651963eb21\u0027)"},{"line_number":394,"context_line":"    def test_evacuate_server(self):"},{"line_number":395,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":396,"context_line":"        with rbac_rule_validation.ignored(lib_exc.NotFound):"},{"line_number":397,"context_line":"            self.client.evacuate_server(self.server_id, host\u003d\u0027fake-host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_cf6549e3","line":396,"in_reply_to":"7ffa3b31_cecb0f70","updated":"2017-04-18 21:02:38.000000000","message":"I personally prefer:\n\nwith self.assertRaisesRegexp(lib_exc.NotFound, expected_error_message):\n    ...\n\nAnd then the expected_error_message just says something about the host being bad.\n\nI also think that adding expected_error_code\u003d400 here is a little disconcerting, because our internal logic in rbac_rule_validation rejects any error code that isn\u0027t a 403 or 404. Allowing 400s is probably a bad idea, because it opens a can of worms, but rare cases like this are fine IMO, because policy enforcement is nevertheless still carried out.","commit_id":"64139f0315a3a5f39570cab049958a36182212e9"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a48340d9d051459eb51c673a6de73925837c839d","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    @decorators.idempotent_id(\u002778ecef3c-faff-412a-83be-47651963eb21\u0027)"},{"line_number":394,"context_line":"    def test_evacuate_server(self):"},{"line_number":395,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":396,"context_line":"        with rbac_rule_validation.ignored(lib_exc.NotFound):"},{"line_number":397,"context_line":"            self.client.evacuate_server(self.server_id, host\u003d\u0027fake-host\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_61a88976","line":396,"in_reply_to":"7ffa3b31_cf6549e3","updated":"2017-04-18 22:06:03.000000000","message":"Ignore comments about 400. It\u0027s a 404, looked at it incorrectly.","commit_id":"64139f0315a3a5f39570cab049958a36182212e9"}]}
