)]}'
{"nova/api/openstack/compute/flavors_extraspecs.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"efc0feb5b15ab10a9925de3d7506f18a2fdcf339","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _check_extra_specs_value(self, specs):"},{"line_number":40,"context_line":"        for key, value in six.iteritems(specs):"},{"line_number":41,"context_line":"            if (key \u003d\u003d \u0027hw:cpu_policy\u0027 and"},{"line_number":42,"context_line":"                    value not in obj_fields.CPUAllocationPolicy.ALL):"},{"line_number":43,"context_line":"                msg \u003d _(\"The value of \u0027hw:cpu_policy\u0027 should be \""},{"line_number":44,"context_line":"                        \"in %s\") % six.text_type("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_19a5f245","line":41,"range":{"start_line":41,"start_character":27,"end_line":41,"end_character":37},"updated":"2016-12-06 18:09:36.000000000","message":"I tend to think we should go this way \nhttps://review.openstack.org/#/c/404565/5/nova/virt/hardware.py\n\nbecause it\u0027s used https://github.com/openstack/nova/blob/master/nova/compute/api.py#L874 and this is a function to validate all incorrect input (valid value from db schema check but not acceptable from logic check)","commit_id":"9855e5ed3490952d2e51a7b6897722f9ecc5e45d"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"d62af993b3604eb6d182faca96fd44c754531055","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _check_extra_specs_value(self, specs):"},{"line_number":40,"context_line":"        for key, value in six.iteritems(specs):"},{"line_number":41,"context_line":"            if (key \u003d\u003d \u0027hw:cpu_policy\u0027 and"},{"line_number":42,"context_line":"                    value not in obj_fields.CPUAllocationPolicy.ALL):"},{"line_number":43,"context_line":"                msg \u003d _(\"The value of \u0027hw:cpu_policy\u0027 should be \""},{"line_number":44,"context_line":"                        \"in %s\") % six.text_type("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_853d0cc6","line":41,"range":{"start_line":41,"start_character":27,"end_line":41,"end_character":37},"in_reply_to":"3a71b18c_19a5f245","updated":"2016-12-06 22:28:06.000000000","message":"jichenjc,\n\nDid you see my comment on https://review.openstack.org/#/c/404565 ?\n\nThe above patch way is too late to validate the input and return an error response to different users.","commit_id":"9855e5ed3490952d2e51a7b6897722f9ecc5e45d"}],"nova/tests/unit/api/openstack/compute/test_flavors_extra_specs.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ddd551410f8c662b70e043b6cd7267a444c0a398","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                              req, 1, body\u003dbody)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_create_invalid_spec_cpu_policy_value(self):"},{"line_number":245,"context_line":"        # NOTE: In this case, the value should be enum which is corresponding"},{"line_number":246,"context_line":"        # to \u0027dedicated\u0027. \u0027dedicated\u0027 itself is invalid value."},{"line_number":247,"context_line":"        key \u003d \u0027hw:cpu_policy\u0027"},{"line_number":248,"context_line":"        value \u003d \u0027invalid_policy\u0027"},{"line_number":249,"context_line":"        req \u003d self._get_request(\u00271/os-extra_specs\u0027, use_admin_context\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_c8e67caf","line":246,"range":{"start_line":245,"start_character":16,"end_line":246,"end_character":62},"updated":"2017-01-23 03:36:16.000000000","message":"did not get this NOTE, \u0027dedicated\u0027 is valid value right?","commit_id":"e56122035813a065dc04b9ca3d2a762c1c08e239"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"3e84cc86e38173ff0459bf53fc87be662a6942d8","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                              req, 1, body\u003dbody)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_create_invalid_spec_cpu_policy_value(self):"},{"line_number":245,"context_line":"        # NOTE: In this case, the value should be enum which is corresponding"},{"line_number":246,"context_line":"        # to \u0027dedicated\u0027. \u0027dedicated\u0027 itself is invalid value."},{"line_number":247,"context_line":"        key \u003d \u0027hw:cpu_policy\u0027"},{"line_number":248,"context_line":"        value \u003d \u0027invalid_policy\u0027"},{"line_number":249,"context_line":"        req \u003d self._get_request(\u00271/os-extra_specs\u0027, use_admin_context\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_d505307a","line":246,"range":{"start_line":245,"start_character":16,"end_line":246,"end_character":62},"in_reply_to":"5a3905b3_c8e67caf","updated":"2017-01-23 08:21:25.000000000","message":"good point, seems this is wrong comment","commit_id":"e56122035813a065dc04b9ca3d2a762c1c08e239"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"0917b86ec258f4dfd2d8744c5dca5a72ff6f24a8","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                              req, 1, body\u003dbody)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_create_invalid_spec_cpu_policy_value(self):"},{"line_number":245,"context_line":"        # NOTE: In this case, the value should be enum which is corresponding"},{"line_number":246,"context_line":"        # to \u0027dedicated\u0027. \u0027dedicated\u0027 itself is invalid value."},{"line_number":247,"context_line":"        key \u003d \u0027hw:cpu_policy\u0027"},{"line_number":248,"context_line":"        value \u003d \u0027invalid_policy\u0027"},{"line_number":249,"context_line":"        req \u003d self._get_request(\u00271/os-extra_specs\u0027, use_admin_context\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_1ed094f5","line":246,"range":{"start_line":245,"start_character":16,"end_line":246,"end_character":62},"in_reply_to":"5a3905b3_d505307a","updated":"2017-01-23 19:25:07.000000000","message":"Oh, I am not sure where this NOTE comes from..\nIt is better to just remove it because the test value shows it is invalid value clearly.","commit_id":"e56122035813a065dc04b9ca3d2a762c1c08e239"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ddd551410f8c662b70e043b6cd7267a444c0a398","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                          req, 1, body\u003d{\"extra_specs\": {key: value}})"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def test_create_invalid_spec_cpu_thread_policy_value(self):"},{"line_number":254,"context_line":"        # NOTE: In this case, the value should be enum which is corresponding"},{"line_number":255,"context_line":"        # to \u0027shared\u0027. \u0027shared\u0027 itself is invalid value."},{"line_number":256,"context_line":"        key \u003d \u0027hw:cpu_thread_policy\u0027"},{"line_number":257,"context_line":"        value \u003d \u0027invalid_policy\u0027"},{"line_number":258,"context_line":"        req \u003d self._get_request(\u00271/os-extra_specs\u0027, use_admin_context\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_8301b707","line":255,"range":{"start_line":254,"start_character":0,"end_line":255,"end_character":56},"updated":"2017-01-23 03:36:16.000000000","message":"ditto,\n\n\u0027hw:cpu_thread_policy\u0027 is only valid if hw:cpu_policy is set to \u0027dedicated\u0027\n\ncan we add \u0027hw:cpu_policy\u0027 as \u0027dedicated\u0027 in this test for clear view. Actually that is being checked way below at virt level and current tests also does not affect due to that. \n\nhttps://github.com/openstack/nova/blob/master/nova/virt/hardware.py#L1287","commit_id":"e56122035813a065dc04b9ca3d2a762c1c08e239"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"0917b86ec258f4dfd2d8744c5dca5a72ff6f24a8","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                          req, 1, body\u003d{\"extra_specs\": {key: value}})"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def test_create_invalid_spec_cpu_thread_policy_value(self):"},{"line_number":254,"context_line":"        # NOTE: In this case, the value should be enum which is corresponding"},{"line_number":255,"context_line":"        # to \u0027shared\u0027. \u0027shared\u0027 itself is invalid value."},{"line_number":256,"context_line":"        key \u003d \u0027hw:cpu_thread_policy\u0027"},{"line_number":257,"context_line":"        value \u003d \u0027invalid_policy\u0027"},{"line_number":258,"context_line":"        req \u003d self._get_request(\u00271/os-extra_specs\u0027, use_admin_context\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_5ed69cf1","line":255,"range":{"start_line":254,"start_character":0,"end_line":255,"end_character":56},"in_reply_to":"5a3905b3_8301b707","updated":"2017-01-23 19:25:07.000000000","message":"ditto","commit_id":"e56122035813a065dc04b9ca3d2a762c1c08e239"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"0617dc20fdec567c59e359d5a10554a181391d91","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            req \u003d self._get_request(\u00271/os-extra_specs\u0027, use_admin_context\u003dTrue)"},{"line_number":241,"context_line":"            self.assertRaises(self.bad_request, self.controller.create,"},{"line_number":242,"context_line":"                              req, 1, body\u003dbody)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_create_invalid_spec_cpu_policy_value(self):"},{"line_number":245,"context_line":"        key \u003d \u0027hw:cpu_policy\u0027"},{"line_number":246,"context_line":"        value \u003d \u0027invalid_policy\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_b254c621","line":243,"updated":"2017-02-01 21:08:38.000000000","message":"I would prefer also have tests that verify that valid values passed as these extra_specs succeed.","commit_id":"a6d1a2c26d152fdd99c0bf1d8dc8c474fb96d594"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"9ca1fa6c93639e89abf1e926c8f420e1a20be249","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            req \u003d self._get_request(\u00271/os-extra_specs\u0027, use_admin_context\u003dTrue)"},{"line_number":241,"context_line":"            self.assertRaises(self.bad_request, self.controller.create,"},{"line_number":242,"context_line":"                              req, 1, body\u003dbody)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def test_create_invalid_spec_cpu_policy_value(self):"},{"line_number":245,"context_line":"        key \u003d \u0027hw:cpu_policy\u0027"},{"line_number":246,"context_line":"        value \u003d \u0027invalid_policy\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a430d35_815e80e7","line":243,"in_reply_to":"3a461143_b254c621","updated":"2017-02-04 00:05:29.000000000","message":"I got it, nice to add them","commit_id":"a6d1a2c26d152fdd99c0bf1d8dc8c474fb96d594"}]}
