)]}'
{"nova/api/openstack/compute/contrib/server_groups.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"07fb644c7519329a94d96037e88cf33c34bc1eb3","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            if field \u003d\u003d \u0027name\u0027:"},{"line_number":174,"context_line":"                utils.check_string_length(value, field,"},{"line_number":175,"context_line":"                                          min_length\u003d1, max_length\u003d255)"},{"line_number":176,"context_line":"                if not VALID_NAME_REGEX.search(value):"},{"line_number":177,"context_line":"                    msg \u003d _(\"Invalid format for name: \u0027%s\u0027\") % value"},{"line_number":178,"context_line":"                    raise nova.exception.InvalidInput(reason\u003dmsg)"},{"line_number":179,"context_line":"            elif field \u003d\u003d \u0027policies\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2B4Yo%3D","line":176,"updated":"2014-03-11 15:18:29.000000000","message":"I\u0027d really like name validation to be something not localized to this one API extension.  Where else is this regex used?  If not anywhere else, why add it here?  Also, we allow unicode in names almost everywhere else.  It seems bad to prevent it here.\n\nWhat can we do that sets us up on a path for consistent name validation?","commit_id":"98301d6e4dabfd1bd6c062ea3761da50664c0523"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"1850453f6e93aeb735a8decbe24ee6d4b79a4377","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            if field \u003d\u003d \u0027name\u0027:"},{"line_number":174,"context_line":"                utils.check_string_length(value, field,"},{"line_number":175,"context_line":"                                          min_length\u003d1, max_length\u003d255)"},{"line_number":176,"context_line":"                if not VALID_NAME_REGEX.search(value):"},{"line_number":177,"context_line":"                    msg \u003d _(\"Invalid format for name: \u0027%s\u0027\") % value"},{"line_number":178,"context_line":"                    raise nova.exception.InvalidInput(reason\u003dmsg)"},{"line_number":179,"context_line":"            elif field \u003d\u003d \u0027policies\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2BzWc%3D","line":176,"in_reply_to":"AAAAVn%2F%2B4Yo%3D","updated":"2014-03-12 02:54:40.000000000","message":"This regexp comes from the validation json schema we are using for all the names for the V3 API\n\nhttps://github.com/openstack/nova/blob/master/nova/api/validation/parameter_types.py#L52\n\nI agree we need to handle unicode, so that will need to be updated. I\u0027m adding Kenichi to the review list to see if he has any suggestions on how we can share the regexp, and I\u0027m not sure how the json schema declaration for supporting unicode would work.\n\nCurrently with the V2 API and across openstack we\u0027re all over the place (there is a bug report asking for all the openstack APIs to come to a common agreement here). And they tend to be enforced in the nova internals rather than at the API layer. Eg\n\nflavor names use:\n\nVALID_NAME_REGEX \u003d re.compile(\"^[\\w\\.\\- ]*$\", re.UNICODE)\n\nflavor ids use:\nVALID_ID_REGEX \u003d re.compile(\"^[\\w\\.\\- ]*$\")\n\nkeypairs has some hand crafted code that allows _-, digits, and ascii letters.\n\nSo how about I put the regexp (which supports unicode letters) in nova/api/openstack/common.py and we\u0027ll see how much we can share it with the validation framework. Any new extensions can re-use this regexp so at least from now on we\u0027re consistent\n\nI definitely want to lean on being conservative in what we expect as loosening the constraints later is much easier than tightening them.","commit_id":"98301d6e4dabfd1bd6c062ea3761da50664c0523"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"07fb644c7519329a94d96037e88cf33c34bc1eb3","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                    msg \u003d _(\"Invalid format for name: \u0027%s\u0027\") % value"},{"line_number":178,"context_line":"                    raise nova.exception.InvalidInput(reason\u003dmsg)"},{"line_number":179,"context_line":"            elif field \u003d\u003d \u0027policies\u0027:"},{"line_number":180,"context_line":"                if isinstance(value, list):"},{"line_number":181,"context_line":"                    [utils.check_string_length(v, field,"},{"line_number":182,"context_line":"                        min_length\u003d1, max_length\u003d255) for v in value]"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2B4Zc%3D","line":180,"updated":"2014-03-11 15:18:29.000000000","message":"and what if it\u0027s not a list?","commit_id":"98301d6e4dabfd1bd6c062ea3761da50664c0523"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"64a3dbd923d1d938fd607a6458cf302f8174d156","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                    msg \u003d _(\"Invalid format for name: \u0027%s\u0027\") % value"},{"line_number":178,"context_line":"                    raise nova.exception.InvalidInput(reason\u003dmsg)"},{"line_number":179,"context_line":"            elif field \u003d\u003d \u0027policies\u0027:"},{"line_number":180,"context_line":"                if isinstance(value, list):"},{"line_number":181,"context_line":"                    [utils.check_string_length(v, field,"},{"line_number":182,"context_line":"                        min_length\u003d1, max_length\u003d255) for v in value]"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2Fyvc%3D","line":180,"in_reply_to":"AAAAVn%2F%2B4SQ%3D","updated":"2014-03-13 19:23:03.000000000","message":"OK, probably more appropriate to fix in this patch, though","commit_id":"98301d6e4dabfd1bd6c062ea3761da50664c0523"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6d05b9472b069ae8dd20aed3c8541a313b38d3c5","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                    msg \u003d _(\"Invalid format for name: \u0027%s\u0027\") % value"},{"line_number":178,"context_line":"                    raise nova.exception.InvalidInput(reason\u003dmsg)"},{"line_number":179,"context_line":"            elif field \u003d\u003d \u0027policies\u0027:"},{"line_number":180,"context_line":"                if isinstance(value, list):"},{"line_number":181,"context_line":"                    [utils.check_string_length(v, field,"},{"line_number":182,"context_line":"                        min_length\u003d1, max_length\u003d255) for v in value]"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVn%2F%2B4SQ%3D","line":180,"in_reply_to":"AAAAVn%2F%2B4Zc%3D","updated":"2014-03-11 15:27:14.000000000","message":"that is addressed in the patch above - https://review.openstack.org/#/c/79312/","commit_id":"98301d6e4dabfd1bd6c062ea3761da50664c0523"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"375fce9357d01c9d668d23b8506f28302ca1e8c7","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            elif field \u003d\u003d \u0027policies\u0027:"},{"line_number":203,"context_line":"                if isinstance(value, list):"},{"line_number":204,"context_line":"                    [utils.check_string_length(v, field,"},{"line_number":205,"context_line":"                        min_length\u003d1, max_length\u003d255) for v in value]"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        if subbody:"},{"line_number":208,"context_line":"            msg \u003d _(\"unsupported fields: %s\") % subbody.keys()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Fyu4%3D","line":205,"updated":"2014-03-13 19:24:09.000000000","message":"I think not having an else clase is a bug in this patch and should be fixed here","commit_id":"7e1ffb7c3a8419b6e9959e80255d0132030f7928"}],"nova/tests/api/openstack/compute/contrib/test_server_groups.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"3a4b07567f8bf39da75e6919ab77782889a06132","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                                       policies\u003d[\u0027test_policy\u0027])"},{"line_number":136,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-server-groups\u0027)"},{"line_number":137,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"},{"line_number":138,"context_line":"                          req, {\u0027server_group\u0027: sgroup})"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def test_create_server_group_conflicting_policies(self):"},{"line_number":141,"context_line":"        sgroup \u003d server_group_template()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2Byqo%3D","line":138,"updated":"2014-03-12 05:51:12.000000000","message":"better to add a test for the name of all spaces like \u0027   \u0027 because flavor-id also is validated with the similar pattern and the flavor-id validation code has been added for blocking the id of all spaces.","commit_id":"7e13a0c3ac691f5f0c1d0f6f5f1a325044d9d398"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"944df587e9b1f0a1cc2b2396bfad0619532bb59f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                                       policies\u003d[\u0027test_policy\u0027])"},{"line_number":136,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/os-server-groups\u0027)"},{"line_number":137,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"},{"line_number":138,"context_line":"                          req, {\u0027server_group\u0027: sgroup})"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def test_create_server_group_conflicting_policies(self):"},{"line_number":141,"context_line":"        sgroup \u003d server_group_template()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2ByZ0%3D","line":138,"in_reply_to":"AAAAVn%2F%2Byqo%3D","updated":"2014-03-12 06:13:55.000000000","message":"Good point. I\u0027ll add a test.","commit_id":"7e13a0c3ac691f5f0c1d0f6f5f1a325044d9d398"}]}
