)]}'
{"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8e6a1f3dfdef1ad2b6688cc09fea241800ee004c","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":1067,"context_line":"        context.can(server_policies.SERVERS % \u0027start\u0027,"},{"line_number":1068,"context_line":"                    target\u003d{\u0027user_id\u0027: instance.user_id,"},{"line_number":1069,"context_line":"                            \u0027project_id\u0027: instance.project_id})"},{"line_number":1070,"context_line":"        LOG.debug(\u0027start instance\u0027, instance\u003dinstance)"},{"line_number":1071,"context_line":"        try:"},{"line_number":1072,"context_line":"            self.compute_api.start(context, instance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_a6d956f5","line":1069,"updated":"2016-08-11 16:11:04.000000000","message":"Hmm, I wasn\u0027t sure we were adding start?\nhttps://review.openstack.org/#/c/324068/5/specs/newton/approved/user_id_based_policy_enforcement.rst@77","commit_id":"564df02cb5b09e48af007e0831378ea737df45ff"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bcbb842b4874fe32df955e8b420ead3038c3a9b","unresolved":false,"context_lines":[{"line_number":502,"context_line":"        target \u003d {"},{"line_number":503,"context_line":"            \u0027project_id\u0027: context.project_id,"},{"line_number":504,"context_line":"            \u0027user_id\u0027: context.user_id,"},{"line_number":505,"context_line":"            \u0027availability_zone\u0027: availability_zone}"},{"line_number":506,"context_line":"        context.can(server_policies.SERVERS % \u0027create\u0027, target)"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        # TODO(Shao He, Feng) move this policy check to os-availability-zone"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_d094fb8b","line":505,"updated":"2016-08-11 16:45:17.000000000","message":"hmm, thats interesting...","commit_id":"00e5934d2572a775dd1149e8b40215b4bbf1b2af"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bcbb842b4874fe32df955e8b420ead3038c3a9b","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"        \"\"\"Start an instance.\"\"\""},{"line_number":1065,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":1066,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":1067,"context_line":"        context.can(server_policies.SERVERS % \u0027start\u0027, instance)"},{"line_number":1068,"context_line":"        LOG.debug(\u0027start instance\u0027, instance\u003dinstance)"},{"line_number":1069,"context_line":"        try:"},{"line_number":1070,"context_line":"            self.compute_api.start(context, instance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_1015f3e3","line":1067,"range":{"start_line":1067,"start_character":55,"end_line":1067,"end_character":63},"updated":"2016-08-11 16:45:17.000000000","message":"Oh, I missed this used to be instance. Hmm... oh dear, maybe the previous was good.","commit_id":"00e5934d2572a775dd1149e8b40215b4bbf1b2af"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5bcbb842b4874fe32df955e8b420ead3038c3a9b","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"        \"\"\"Trigger crash dump in an instance\"\"\""},{"line_number":1107,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":1108,"context_line":"        instance \u003d self._get_instance(context, id)"},{"line_number":1109,"context_line":"        context.can(server_policies.SERVERS % \u0027trigger_crash_dump\u0027, instance)"},{"line_number":1110,"context_line":"        try:"},{"line_number":1111,"context_line":"            self.compute_api.trigger_crash_dump(context, instance)"},{"line_number":1112,"context_line":"        except exception.InstanceInvalidState as state_error:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_bd3a00e5","line":1109,"updated":"2016-08-11 16:45:17.000000000","message":"hmm, I wonder about this one now... although thats really a separate change.","commit_id":"00e5934d2572a775dd1149e8b40215b4bbf1b2af"}],"nova/tests/unit/api/openstack/compute/test_server_start_stop.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"04710cda72c641ae1808d0b7f182ca7bb0300911","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self.controller._start_server(self.req, uuids.instance, body)"},{"line_number":52,"context_line":"        start_mock.assert_called_once_with(mock.ANY, mock.ANY)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def test_start_policy_failed(self):"},{"line_number":55,"context_line":"        rules \u003d {"},{"line_number":56,"context_line":"            self.start_policy: \"project_id:non_fake\""},{"line_number":57,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_fd9918c5","side":"PARENT","line":54,"updated":"2016-08-11 16:27:46.000000000","message":"Should we not keep this one for now?","commit_id":"2e530e7ebdad39caa4d6f6cb46ad13b2b51a5cf5"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"3f1135e8b8391953a16e76a9c7e1b6470e9a5fcf","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self.controller._start_server(self.req, uuids.instance, body)"},{"line_number":52,"context_line":"        start_mock.assert_called_once_with(mock.ANY, mock.ANY)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def test_start_policy_failed(self):"},{"line_number":55,"context_line":"        rules \u003d {"},{"line_number":56,"context_line":"            self.start_policy: \"project_id:non_fake\""},{"line_number":57,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_fd4e3839","side":"PARENT","line":54,"in_reply_to":"9ad45d7e_fd9918c5","updated":"2016-08-11 16:29:32.000000000","message":"covered by L140 in the new class","commit_id":"2e530e7ebdad39caa4d6f6cb46ad13b2b51a5cf5"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"06365269df44ebee961256815ceac396bca4934f","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                                self.req, uuids.instance, body)"},{"line_number":149,"context_line":"        self.assertIn(self.start_policy, exc.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def test_start_overridden_policy_failed_with_other_user_in_same_project("},{"line_number":152,"context_line":"        self):"},{"line_number":153,"context_line":"        rules \u003d {"},{"line_number":154,"context_line":"            self.start_policy: \"user_id:%(user_id)s\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_40fc99b7","line":151,"range":{"start_line":151,"start_character":7,"end_line":151,"end_character":76},"updated":"2016-08-12 07:56:06.000000000","message":"Not sure we need this test, due to we didn\u0027t want to support user_id based enforcement.","commit_id":"feb84af5875838ab6e38ef07426098e5b8fa2f48"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9306246a7060272f23cbb03fedb3eeb3978e0431","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                                self.req, uuids.instance, body)"},{"line_number":149,"context_line":"        self.assertIn(self.start_policy, exc.format_message())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def test_start_overridden_policy_failed_with_other_user_in_same_project("},{"line_number":152,"context_line":"        self):"},{"line_number":153,"context_line":"        rules \u003d {"},{"line_number":154,"context_line":"            self.start_policy: \"user_id:%(user_id)s\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_bb0784c8","line":151,"range":{"start_line":151,"start_character":7,"end_line":151,"end_character":76},"in_reply_to":"9ad45d7e_40fc99b7","updated":"2016-08-12 08:16:16.000000000","message":"+1, but it does work with the current code.\n\nLets drop this in a follow up thing.","commit_id":"feb84af5875838ab6e38ef07426098e5b8fa2f48"}],"nova/tests/unit/api/openstack/compute/test_serversV21.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ba668aeb3724af7756b4efa717d7d143554fc4f4","unresolved":false,"context_lines":[{"line_number":4207,"context_line":"        _get_instance_mock.return_value \u003d ("},{"line_number":4208,"context_line":"            fake_instance.fake_instance_obj(self.req.environ[\u0027nova.context\u0027]))"},{"line_number":4209,"context_line":"        rule_name \u003d \"os_compute_api:servers:stop\""},{"line_number":4210,"context_line":"        rule \u003d {rule_name: \"project:fake\"}"},{"line_number":4211,"context_line":"        self._common_policy_check("},{"line_number":4212,"context_line":"            rule, rule_name, self.controller._stop_server,"},{"line_number":4213,"context_line":"            self.req, FAKE_UUID, body\u003d{})"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_90a70ca6","line":4210,"range":{"start_line":4210,"start_character":15,"end_line":4210,"end_character":42},"updated":"2016-08-12 00:53:09.000000000","message":"Not sure we want to tests different \u0027project_id\u0027 or different \u0027string\u0027 in policy rule.\n\nIf first then this is duplicate tests with what we have in test_server_start_stop.py. Anyways I am checking this with Alex and cleaned up later if needed.\n\nCurrently passing a good instance to prepare the policy target. None was working when complete instance was being passed to policy.","commit_id":"61fff9fb4fde0344b471adb31c6b1e81435ee8c4"}]}
