)]}'
{"patrole_tempest_plugin/rbac_exceptions.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"4322deb762425f66de1cb2d86ce6600a6ac050d0","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from tempest.lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class RbacActionFailed(exceptions.ClientRestClientException):"},{"line_number":20,"context_line":"    message \u003d \"Rbac action failed\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class RbacMissingAttribute(exceptions.ClientRestClientException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_15df3e69","line":20,"range":{"start_line":19,"start_character":0,"end_line":20,"end_character":34},"updated":"2017-07-19 18:32:04.000000000","message":"Also this isn\u0027t being used anymore, right?","commit_id":"07470c4b7d76ac1c29e5ce27a4610ed87dd3f6a4"},{"author":{"_account_id":23185,"name":"Samantha Blanco","email":"samantha.blanco@att.com","username":"sblanco"},"change_message_id":"dd1540ed88ba49ec771efc5a92468e6241f83064","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from tempest.lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class RbacActionFailed(exceptions.ClientRestClientException):"},{"line_number":20,"context_line":"    message \u003d \"Rbac action failed\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class RbacMissingAttribute(exceptions.ClientRestClientException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_15a5fea1","line":20,"range":{"start_line":19,"start_character":0,"end_line":20,"end_character":34},"in_reply_to":"1f1a1f67_15df3e69","updated":"2017-07-19 18:39:39.000000000","message":"It\u0027s used when there\u0027s a server fault because of conflicting policies. We could probably classify that as a resource setup failure though.","commit_id":"07470c4b7d76ac1c29e5ce27a4610ed87dd3f6a4"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"b88996c3e0edf8b9aa81a2861b8485e31231b962","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class RbacMissingAttribute(exceptions.ClientRestClientException):"},{"line_number":24,"context_line":"    message \u003d \"Missing expected attribute from response\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class RbacResourceSetupFailed(exceptions.TempestException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_0aaf1d2a","line":24,"range":{"start_line":24,"start_character":14,"end_line":24,"end_character":56},"updated":"2017-07-19 18:24:22.000000000","message":"This generic exception doesn\u0027t really go with the detailed explanation of: \"No network body returned\".\n\nTo ensure standardization of exception messages, as well as simplicity of use, the following pattern might be better:\n\nclass MalformedResponseBody(TempestException):\n    message \u003d (\"The response body is missing the expected %(attributes) due \"\n               \"to policy enforcement failure.\")\n    def __init__(self, empty\u003dFalse, **kwargs):\n        if empty:\n            self.message \u003d (\"The response body is empty due to policy \"\n                            \"enforcement failure.\")\n        super(MalformedResponseBody, self, **kwargs)\n\nThen it can be used like:\n\n    raise MalformedResponseBody(attribute\u003d\u0027foobar\u0027)\n\nOr:\n\n    raise MalformedResponseBody(empty\u003dTrue)\n\nI think it\u0027d be better to name this exception RbacMalformedResponse or RbacIncompleteResponse -- something that captures both an attribute missing or a missing response body altogether.\n\nFinally, I\u0027m not really a fan of putting \"Rbac\" into absolutely everything: file names, class names, exception names, and so forth. It adds no value and only needs to naming bloat. That being said, it\u0027s not within the scope of the current commit and we can discuss whether we want to prefix all of our exceptions with \"Rbac\" or not -- personally, I think it\u0027s silly and should be dropped.","commit_id":"07470c4b7d76ac1c29e5ce27a4610ed87dd3f6a4"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"bba388612d4fe6020a2e4ddd214dedc9ed62ff75","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class RbacMissingAttribute(exceptions.ClientRestClientException):"},{"line_number":24,"context_line":"    message \u003d \"Missing expected attribute from response\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class RbacResourceSetupFailed(exceptions.TempestException):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_35235aa9","line":24,"range":{"start_line":24,"start_character":14,"end_line":24,"end_character":56},"in_reply_to":"1f1a1f67_0aaf1d2a","updated":"2017-07-19 18:27:16.000000000","message":"kwargs \u003d {} would have to be probably set if empty is True.","commit_id":"07470c4b7d76ac1c29e5ce27a4610ed87dd3f6a4"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"cdedc9178908666b0a770cbe3d1aaae22913b1ff","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    def __init__(self, empty\u003dFalse, **kwargs):"},{"line_number":27,"context_line":"        if empty:"},{"line_number":28,"context_line":"            self.message \u003d (\"The response body is empty due to policy \""},{"line_number":29,"context_line":"                            \"enforcement failure.\")"},{"line_number":30,"context_line":"        else:"},{"line_number":31,"context_line":"            self.message \u003d (\"The response body is missing the expected %(attribute)s due \""},{"line_number":32,"context_line":"               \"to policy enforcement failure.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_5b828501","line":29,"updated":"2017-07-19 19:41:48.000000000","message":"I think we should add kwargs \u003d {} on L30 (if empty is True) so that way we don\u0027t allow something like:\n\n    raise RbacMalformedResponse(True, junk\u003d\u0027this isn\u0027t defined anywhere and might cause an issue inside TempestException\u0027)","commit_id":"99db240824eb5654da52d35e2af5a7d399db284a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"cdedc9178908666b0a770cbe3d1aaae22913b1ff","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        if empty:"},{"line_number":28,"context_line":"            self.message \u003d (\"The response body is empty due to policy \""},{"line_number":29,"context_line":"                            \"enforcement failure.\")"},{"line_number":30,"context_line":"        else:"},{"line_number":31,"context_line":"            self.message \u003d (\"The response body is missing the expected %(attribute)s due \""},{"line_number":32,"context_line":"               \"to policy enforcement failure.\")"},{"line_number":33,"context_line":"        super(MalformedResponseBody, self, **kwargs)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_1bd2cd28","line":32,"range":{"start_line":30,"start_character":8,"end_line":32,"end_character":48},"updated":"2017-07-19 19:41:48.000000000","message":"self.message is already set to this by default due to L24.\n\nSee: https://docs.python.org/2/tutorial/classes.html#class-and-instance-variables","commit_id":"99db240824eb5654da52d35e2af5a7d399db284a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"66dd8133242e0e0a8ea8774349ccf0048d16b3b4","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    message \u003d \"Rbac action failed\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class RbacMalformedResponse(exceptions.TempestException):"},{"line_number":24,"context_line":"    message \u003d (\"The response body is missing the expected %(attribute)s due \""},{"line_number":25,"context_line":"               \"to policy enforcement failure.\")"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1f1a1f67_316c699b","line":23,"updated":"2017-07-20 16:24:11.000000000","message":"http://logs.openstack.org/34/484534/8/check/gate-tempest-dsvm-patrole-member-ubuntu-xenial/d243f39/console.html#_2017-07-20_15_49_33_885762\n\nGetting: \"TypeError: super does not take keyword arguments\".\n\nBut it does: https://github.com/openstack/tempest/blob/d3fa46495a78160989120ba39793f7ba2e22d81c/tempest/lib/exceptions.py#L28","commit_id":"9e6a0ccf6c38ae60e64e33f515e956e2c78771a7"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"66dd8133242e0e0a8ea8774349ccf0048d16b3b4","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    message \u003d (\"The response body is missing the expected %(attribute)s due \""},{"line_number":25,"context_line":"               \"to policy enforcement failure.\")"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, empty\u003dFalse, **kwargs):"},{"line_number":28,"context_line":"        if empty:"},{"line_number":29,"context_line":"            self.message \u003d (\"The response body is empty due to policy \""},{"line_number":30,"context_line":"                            \"enforcement failure.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f1a1f67_b13f5986","line":27,"range":{"start_line":27,"start_character":36,"end_line":27,"end_character":44},"updated":"2017-07-20 16:24:11.000000000","message":"This might have to be *args, **kwargs","commit_id":"9e6a0ccf6c38ae60e64e33f515e956e2c78771a7"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"66dd8133242e0e0a8ea8774349ccf0048d16b3b4","unresolved":false,"context_lines":[{"line_number":29,"context_line":"            self.message \u003d (\"The response body is empty due to policy \""},{"line_number":30,"context_line":"                            \"enforcement failure.\")"},{"line_number":31,"context_line":"            kwargs \u003d {}"},{"line_number":32,"context_line":"        super(RbacMalformedResponse, self, **kwargs)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class RbacResourceSetupFailed(exceptions.TempestException):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f1a1f67_d13ad596","line":32,"range":{"start_line":32,"start_character":43,"end_line":32,"end_character":51},"updated":"2017-07-20 16:24:11.000000000","message":"This might have to be *args, **kwargs","commit_id":"9e6a0ccf6c38ae60e64e33f515e956e2c78771a7"}],"patrole_tempest_plugin/tests/api/network/test_networks_multiprovider_rbac.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"e8f1058e5021912726ee16a059ebbf8ec74c2cfc","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            LOG.info(\"NotFound or Forbidden exception are not thrown when \""},{"line_number":97,"context_line":"                     \"role doesn\u0027t have access to the endpoint. Instead, \""},{"line_number":98,"context_line":"                     \"the response will have an empty network body. \""},{"line_number":99,"context_line":"                     \"This is irregular and should be fixed.\")"},{"line_number":100,"context_line":"            raise rbac_exceptions.RbacActionFailed"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_2cd10c24","side":"PARENT","line":99,"range":{"start_line":99,"start_character":22,"end_line":99,"end_character":60},"updated":"2017-07-18 14:08:20.000000000","message":"Good catch. This message is completely wrong.","commit_id":"aa48f3af0260b54d8fba9e5ea68ccd1426f576b9"}],"patrole_tempest_plugin/tests/unit/test_rbac_rule_validation.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"2c71e72f76e7da760a511d8610ebf75af0663bf7","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @mock.patch.object(rbac_rv, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":110,"context_line":"    @mock.patch.object(rbac_rv, \u0027rbac_policy_parser\u0027, autospec\u003dTrue)"},{"line_number":111,"context_line":"    def test_rule_validation_rbac_action_failed_positive(self, mock_policy,"},{"line_number":112,"context_line":"                                                         mock_log):"},{"line_number":113,"context_line":"        \"\"\"Test RbacMalformedResponse error is thrown without permission passes."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_ed07091c","line":111,"range":{"start_line":111,"start_character":29,"end_line":111,"end_character":47},"updated":"2017-08-09 23:26:16.000000000","message":"This will have to be renamed in follow-up patch.","commit_id":"14e120de2554760e1adf884029b4e9515a40fc99"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"2c71e72f76e7da760a511d8610ebf75af0663bf7","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self.assertIsNone(result)"},{"line_number":128,"context_line":"        mock_log.error.assert_not_called()"},{"line_number":129,"context_line":"        mock_log.warning.assert_not_called()"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @mock.patch.object(rbac_rv, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":132,"context_line":"    @mock.patch.object(rbac_rv, \u0027rbac_policy_parser\u0027, autospec\u003dTrue)"},{"line_number":133,"context_line":"    def test_rule_validation_rbac_action_failed_negative(self, mock_policy,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_500c6a3a","line":130,"updated":"2017-08-09 23:26:16.000000000","message":"Will also need tests for the other exception, RbacConflictingPolicies.","commit_id":"14e120de2554760e1adf884029b4e9515a40fc99"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"2c71e72f76e7da760a511d8610ebf75af0663bf7","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @mock.patch.object(rbac_rv, \u0027LOG\u0027, autospec\u003dTrue)"},{"line_number":132,"context_line":"    @mock.patch.object(rbac_rv, \u0027rbac_policy_parser\u0027, autospec\u003dTrue)"},{"line_number":133,"context_line":"    def test_rule_validation_rbac_action_failed_negative(self, mock_policy,"},{"line_number":134,"context_line":"                                                         mock_log):"},{"line_number":135,"context_line":"        \"\"\"Test RbacMalformedResponse error is thrown with permission fails."},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_b0ff1600","line":133,"range":{"start_line":133,"start_character":28,"end_line":133,"end_character":47},"updated":"2017-08-09 23:26:16.000000000","message":"This will have to be renamed in follow-up patch.","commit_id":"14e120de2554760e1adf884029b4e9515a40fc99"}]}
