)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9565,"name":"Shree Duth Awasthi","email":"shreeduth.awasthi@tcs.com","username":"shreeduth-awasthi"},"change_message_id":"4a8bb2e7cca9e59bc39879aabf4ee278a252692a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Leandro I. Costantino \u003cleandro.i.costantino@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-11 13:02:56 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enforce FlavorExtraSpecs Key\u0027s format."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When creating a key name with characters like \u0027/\u0027 that are not"},{"line_number":10,"context_line":"being encoded or cannot be handled as expected by routes when"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F9Xa0%3D","line":7,"updated":"2013-12-12 07:51:46.000000000","message":"As being a title (not a sentence in a paragraph) I think, it should not end in a full stop.","commit_id":"ceae9056564d5eaa9e8230050befa1ec6913a0b4"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"b84e4717437e4b1c733bcdc913c7da5e0560c086","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Leandro I. Costantino \u003cleandro.i.costantino@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-11 13:02:56 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enforce FlavorExtraSpecs Key\u0027s format."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When creating a key name with characters like \u0027/\u0027 that are not"},{"line_number":10,"context_line":"being encoded or cannot be handled as expected by routes when"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F9WnU%3D","line":7,"in_reply_to":"AAAATn%2F9Xa0%3D","updated":"2013-12-12 12:02:08.000000000","message":"Done","commit_id":"ceae9056564d5eaa9e8230050befa1ec6913a0b4"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"707357e9404739150745735b6b396bc0521df457","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When creating a key name with characters like \u0027/\u0027 that are not"},{"line_number":10,"context_line":"being encoded or cannot be handled as expected by routes when"},{"line_number":11,"context_line":"matching the url, then it\u0027s not possible to remove them anymore."},{"line_number":12,"context_line":"The new format apply the same restriction as flavor id. \"^[\\w\\.\\- ]*$\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change will fix the bug without API change."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F9SFQ%3D","line":12,"updated":"2013-12-13 03:07:30.000000000","message":"The extra specs key format should support colon for namespace purpose.","commit_id":"c7b01eb2078f10db1c9aff2989fdb2fd250d00c3"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"d9b9893a33ca5f7c00f034e9d64da030f2635eff","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When creating a key name with characters like \u0027/\u0027 that are not"},{"line_number":10,"context_line":"being encoded or cannot be handled as expected by routes when"},{"line_number":11,"context_line":"matching the url, then it\u0027s not possible to remove them anymore."},{"line_number":12,"context_line":"The new format apply the same restriction as flavor id. \"^[\\w\\.\\- ]*$\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change will fix the bug without API change."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAATn%2F9QoI%3D","line":12,"in_reply_to":"AAAATn%2F9SFQ%3D","updated":"2013-12-13 11:54:28.000000000","message":"Done","commit_id":"c7b01eb2078f10db1c9aff2989fdb2fd250d00c3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c4158cbc484e9a9221d32c0ec1cbf9d12f2cd22","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When creating a key name with characters like \u0027/\u0027 that are not"},{"line_number":10,"context_line":"being encoded or cannot be handled as expected by routes when"},{"line_number":11,"context_line":"matching the url, then it\u0027s not possible to remove them anymore."},{"line_number":12,"context_line":"The new format apply the restriction: \"^[\\w\\.\\- :]*$\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change will fix the bug without API change."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F959U%3D","line":12,"updated":"2014-02-01 21:15:02.000000000","message":"The regex you have here is not what\u0027s in the code, which is \"[\\w\\.\\- :]+$\"","commit_id":"03c9bde7b3142c17096deac5406186e4631a1322"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"83335293e248d9275eec0bc95555e4ca76ebf12d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When creating a key name with characters like \u0027/\u0027 that are not"},{"line_number":10,"context_line":"being encoded or cannot be handled as expected by routes when"},{"line_number":11,"context_line":"matching the url, then it\u0027s not possible to remove them anymore."},{"line_number":12,"context_line":"The new format apply the restriction: \"^[\\w\\.\\- :]*$\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change will fix the bug without API change."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAAUH%2F9124%3D","line":12,"in_reply_to":"AAAAUH%2F959U%3D","updated":"2014-02-03 12:35:14.000000000","message":"Good catch. I was using .scan before . thanks","commit_id":"03c9bde7b3142c17096deac5406186e4631a1322"}],"nova/api/openstack/compute/contrib/flavorextraspecs.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ee1422a3d44ca6da0c3f245b39d67baab00040e","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _check_key_names(self, keys):"},{"line_number":62,"context_line":"        if not validator.validate_key_names(keys):"},{"line_number":63,"context_line":"            expl \u003d _(\u0027Key Names can only contain alphanumeric characters, \u0027"},{"line_number":64,"context_line":"                     \u0027periods, dashes, underscores, colons and spaces.\u0027)"},{"line_number":65,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BECU%3D","line":63,"updated":"2014-01-30 15:05:31.000000000","message":"Move the exception raising into the validation method, otherwise if the regex changes, the message also needs to change and you would be out of sync on that here - so just raise an exception from the validation method, catch it here and process with the 400 error.\n\nSee how the python-novaclient patch is doing it for an example.","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"ecc59a58b75aadd976ee75488edcc23290dbd08f","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _check_key_names(self, keys):"},{"line_number":62,"context_line":"        if not validator.validate_key_names(keys):"},{"line_number":63,"context_line":"            expl \u003d _(\u0027Key Names can only contain alphanumeric characters, \u0027"},{"line_number":64,"context_line":"                     \u0027periods, dashes, underscores, colons and spaces.\u0027)"},{"line_number":65,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BCrQ%3D","line":63,"in_reply_to":"AAAAUH%2F%2BECU%3D","updated":"2014-01-30 18:43:52.000000000","message":"Done","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"}],"nova/api/openstack/compute/plugins/v3/flavors_extraspecs.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ee1422a3d44ca6da0c3f245b39d67baab00040e","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _check_key_names(self, keys):"},{"line_number":64,"context_line":"        if not validator.validate_key_names(keys):"},{"line_number":65,"context_line":"            expl \u003d _(\u0027Key Names can only contain alphanumeric characters, \u0027"},{"line_number":66,"context_line":"                     \u0027periods, dashes, underscores, colons and spaces.\u0027)"},{"line_number":67,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BECM%3D","line":65,"updated":"2014-01-30 15:05:31.000000000","message":"Same comment as the v2 change, move this into the validation method.","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"ecc59a58b75aadd976ee75488edcc23290dbd08f","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _check_key_names(self, keys):"},{"line_number":64,"context_line":"        if not validator.validate_key_names(keys):"},{"line_number":65,"context_line":"            expl \u003d _(\u0027Key Names can only contain alphanumeric characters, \u0027"},{"line_number":66,"context_line":"                     \u0027periods, dashes, underscores, colons and spaces.\u0027)"},{"line_number":67,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dexpl)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BCq4%3D","line":65,"in_reply_to":"AAAAUH%2F%2BECM%3D","updated":"2014-01-30 18:43:52.000000000","message":"Done","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"}],"nova/api/validator.py":[{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"33a349a55743754dbe4d6fd66342b0eac44d4783","unresolved":false,"context_lines":[{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"^[\\w\\.\\- ]*$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"},{"line_number":112,"context_line":"    \"\"\"Validate each item of the list to match key name regex.\"\"\""},{"line_number":113,"context_line":"    for key_name in key_names_list:"},{"line_number":114,"context_line":"        if not VALID_KEY_NAME_REGEX.search(key_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9XQY%3D","line":111,"updated":"2013-12-12 08:30:35.000000000","message":"I think this method should return \u0027True\u0027 or \u0027False\u0027 instead of raising an exception.","commit_id":"ceae9056564d5eaa9e8230050befa1ec6913a0b4"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"b84e4717437e4b1c733bcdc913c7da5e0560c086","unresolved":false,"context_lines":[{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"^[\\w\\.\\- ]*$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"},{"line_number":112,"context_line":"    \"\"\"Validate each item of the list to match key name regex.\"\"\""},{"line_number":113,"context_line":"    for key_name in key_names_list:"},{"line_number":114,"context_line":"        if not VALID_KEY_NAME_REGEX.search(key_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WjI%3D","line":111,"in_reply_to":"AAAATn%2F9XQY%3D","updated":"2013-12-12 12:02:08.000000000","message":"Done. It was mostly to keep track of the key in case of multiples one, but should not being here. thanks","commit_id":"ceae9056564d5eaa9e8230050befa1ec6913a0b4"},{"author":{"_account_id":9565,"name":"Shree Duth Awasthi","email":"shreeduth.awasthi@tcs.com","username":"shreeduth-awasthi"},"change_message_id":"9f66c9314f3ae9f3568d0fffa5a95794004e9c3f","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                      \"Name can only contain alphanumeric characters, \""},{"line_number":117,"context_line":"                      \"periods, dashes, underscores and spaces.\") % key_name"},{"line_number":118,"context_line":"            raise exception.InvalidInput(reason\u003derror)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def validate(args, validator):"},{"line_number":122,"context_line":"    \"\"\"Validate values of args against validators in validator."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9W9k%3D","line":119,"updated":"2013-12-12 09:42:01.000000000","message":"Agree with wanghong. Simply \"return True\" may work good.\n\nThanks!","commit_id":"ceae9056564d5eaa9e8230050befa1ec6913a0b4"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"b84e4717437e4b1c733bcdc913c7da5e0560c086","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                      \"Name can only contain alphanumeric characters, \""},{"line_number":117,"context_line":"                      \"periods, dashes, underscores and spaces.\") % key_name"},{"line_number":118,"context_line":"            raise exception.InvalidInput(reason\u003derror)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def validate(args, validator):"},{"line_number":122,"context_line":"    \"\"\"Validate values of args against validators in validator."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WjE%3D","line":119,"in_reply_to":"AAAATn%2F9W9k%3D","updated":"2013-12-12 12:02:08.000000000","message":"Done","commit_id":"ceae9056564d5eaa9e8230050befa1ec6913a0b4"},{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"101b45a8d2299af959e1dd302e9cc8e62abd3fc0","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":25,"context_line":"from nova.openstack.common import log as logging"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def _get_path_validator_regex():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F8lZ0%3D","line":27,"updated":"2013-12-25 02:40:54.000000000","message":"Maybe you should not remove the line 27? \nAccording to the hacking of openstack:\nhttps://github.com/openstack-dev/hacking/blob/master/doc/source/index.rst\nYou should put two newlines between top-level code (funcs, classes, etc)","commit_id":"38c9bc7ec46c5f089daafe49b2e9f55974f24d2e"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"25de88ea482e539cfeffade20c62ce680d70650e","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    return True"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"^[\\w\\.\\- :]*$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fk1E%3D","line":108,"updated":"2014-01-10 21:11:44.000000000","message":"Shouldn\u0027t we use \u0027+\u0027 here instead of \u0027*\u0027?  This regular expression would allow empty key names through, which is probably something we don\u0027t want.","commit_id":"708d805b45c695bbf15c1b5449fa45c060985ca8"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"44b29a73ea2386b08f2bc09cd88f7b481ecffe41","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    return True"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"^[\\w\\.\\- :]*$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FkfM%3D","line":108,"in_reply_to":"AAAAUH%2F%2Fk1E%3D","updated":"2014-01-10 23:01:28.000000000","message":"Done","commit_id":"708d805b45c695bbf15c1b5449fa45c060985ca8"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"25de88ea482e539cfeffade20c62ce680d70650e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"def validate_key_names(key_names_list):"},{"line_number":112,"context_line":"    \"\"\"Validate each item of the list to match key name regex.\"\"\""},{"line_number":113,"context_line":"    for key_name in key_names_list:"},{"line_number":114,"context_line":"        if not VALID_KEY_NAME_REGEX.search(key_name):"},{"line_number":115,"context_line":"            return False"},{"line_number":116,"context_line":"    return True"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fk1A%3D","line":114,"updated":"2014-01-10 21:11:44.000000000","message":"You could use .match() here; then you wouldn\u0027t need the leading \u0027^\u0027 in the regular expression.","commit_id":"708d805b45c695bbf15c1b5449fa45c060985ca8"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"44b29a73ea2386b08f2bc09cd88f7b481ecffe41","unresolved":false,"context_lines":[{"line_number":111,"context_line":"def validate_key_names(key_names_list):"},{"line_number":112,"context_line":"    \"\"\"Validate each item of the list to match key name regex.\"\"\""},{"line_number":113,"context_line":"    for key_name in key_names_list:"},{"line_number":114,"context_line":"        if not VALID_KEY_NAME_REGEX.search(key_name):"},{"line_number":115,"context_line":"            return False"},{"line_number":116,"context_line":"    return True"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fkes%3D","line":114,"in_reply_to":"AAAAUH%2F%2Fk1A%3D","updated":"2014-01-10 23:01:28.000000000","message":"Yes Mitchell. Originally i followed \nnova/nova/compute/flavors.py:99\n...\nvalid_name \u003d VALID_NAME_REGEX.search(name)\n    if not valid_name:\n...\n\nThat basically do the same thing, but i will change it to match to avoid searching all the string.","commit_id":"708d805b45c695bbf15c1b5449fa45c060985ca8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"eb83b7d0d4fd3cf2798da9d3a480ff85fed35423","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    return True"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"[\\w\\.\\- :]+$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BEFM%3D","line":108,"updated":"2014-01-30 14:59:37.000000000","message":"The regex in the python-novaclient patch doesn\u0027t match this one, so which is correct?\n\nhttps://review.openstack.org/#/c/68695/","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"ecc59a58b75aadd976ee75488edcc23290dbd08f","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    return True"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"[\\w\\.\\- :]+$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BCqk%3D","line":108,"in_reply_to":"AAAAUH%2F%2BEFM%3D","updated":"2014-01-30 18:43:52.000000000","message":"This one check that the key is not empty too, so seems better.","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8ee1422a3d44ca6da0c3f245b39d67baab00040e","unresolved":false,"context_lines":[{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"[\\w\\.\\- :]+$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"},{"line_number":112,"context_line":"    \"\"\"Validate each item of the list to match key name regex.\"\"\""},{"line_number":113,"context_line":"    for key_name in key_names_list:"},{"line_number":114,"context_line":"        if not VALID_KEY_NAME_REGEX.match(key_name):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BEDE%3D","line":111,"updated":"2014-01-30 15:05:31.000000000","message":"This is a pretty ambiguous name, I would actually think this should live in nova.compute.flavors with the flavor id/name validation/regex for better context.\n\nUltimately I think this would probably live in nova.objects.flavor but the flavor extra specs APIs haven\u0027t been converted to flavor objects yet.","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"ecc59a58b75aadd976ee75488edcc23290dbd08f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"VALID_KEY_NAME_REGEX \u003d re.compile(\"[\\w\\.\\- :]+$\", re.UNICODE)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"def validate_key_names(key_names_list):"},{"line_number":112,"context_line":"    \"\"\"Validate each item of the list to match key name regex.\"\"\""},{"line_number":113,"context_line":"    for key_name in key_names_list:"},{"line_number":114,"context_line":"        if not VALID_KEY_NAME_REGEX.match(key_name):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BCqY%3D","line":111,"in_reply_to":"AAAAUH%2F%2BEDE%3D","updated":"2014-01-30 18:43:52.000000000","message":"It make sense, since now the function throw exceptions while validation.py only return False/True.\n\nThanks","commit_id":"ba516ab5b877198c5d207bad5443e6629471566c"}],"nova/tests/api/openstack/compute/contrib/test_flavors_extra_specs.py":[{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"d1b9a427add63e27b1c438c7edf4f5ee1eb81e52","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                                       use_admin_context\u003dTrue)"},{"line_number":135,"context_line":"            res_dict \u003d self.controller.create(req, 1, body)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            self.assertEqual(\u0027value1\u0027, res_dict[\u0027extra_specs\u0027][key])"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def test_create_no_admin(self):"},{"line_number":140,"context_line":"        self.stubs.Set(nova.db,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9SN0%3D","line":137,"updated":"2013-12-13 02:10:29.000000000","message":"I think you should not change this test case to check the valid keys.You should add a new test case named test_create_valid_specs_key instead.","commit_id":"c7b01eb2078f10db1c9aff2989fdb2fd250d00c3"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"d9b9893a33ca5f7c00f034e9d64da030f2635eff","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                                       use_admin_context\u003dTrue)"},{"line_number":135,"context_line":"            res_dict \u003d self.controller.create(req, 1, body)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            self.assertEqual(\u0027value1\u0027, res_dict[\u0027extra_specs\u0027][key])"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def test_create_no_admin(self):"},{"line_number":140,"context_line":"        self.stubs.Set(nova.db,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9Qn4%3D","line":137,"in_reply_to":"AAAATn%2F9SN0%3D","updated":"2013-12-13 11:54:28.000000000","message":"Done","commit_id":"c7b01eb2078f10db1c9aff2989fdb2fd250d00c3"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"25de88ea482e539cfeffade20c62ce680d70650e","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def test_create_invalid_specs_key(self):"},{"line_number":157,"context_line":"        invalid_keys \u003d (\"key1/\", \"\u003ckey\u003e\", \"$$akey$\", \"!akey\")"},{"line_number":158,"context_line":"        self.stubs.Set(nova.db,"},{"line_number":159,"context_line":"                       \u0027flavor_extra_specs_update_or_create\u0027,"},{"line_number":160,"context_line":"                       return_create_flavor_extra_specs)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fk14%3D","line":158,"updated":"2014-01-10 21:11:44.000000000","message":"I would encourage you to use mock for new tests.","commit_id":"708d805b45c695bbf15c1b5449fa45c060985ca8"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"44b29a73ea2386b08f2bc09cd88f7b481ecffe41","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def test_create_invalid_specs_key(self):"},{"line_number":157,"context_line":"        invalid_keys \u003d (\"key1/\", \"\u003ckey\u003e\", \"$$akey$\", \"!akey\")"},{"line_number":158,"context_line":"        self.stubs.Set(nova.db,"},{"line_number":159,"context_line":"                       \u0027flavor_extra_specs_update_or_create\u0027,"},{"line_number":160,"context_line":"                       return_create_flavor_extra_specs)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fkek%3D","line":158,"in_reply_to":"AAAAUH%2F%2Fk14%3D","updated":"2014-01-10 23:01:28.000000000","message":"Done","commit_id":"708d805b45c695bbf15c1b5449fa45c060985ca8"}],"nova/tests/api/openstack/compute/plugins/v3/test_flavors_extra_specs.py":[{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"d1b9a427add63e27b1c438c7edf4f5ee1eb81e52","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                                       use_admin_context\u003dTrue)"},{"line_number":205,"context_line":"            self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"},{"line_number":206,"context_line":"                          req, 1, body)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def test_update_item(self):"},{"line_number":209,"context_line":"        self.stubs.Set(nova.db,"},{"line_number":210,"context_line":"                       \u0027flavor_extra_specs_update_or_create\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9SNo%3D","line":207,"updated":"2013-12-13 02:10:29.000000000","message":"V3 will have a test case named test_create_valid_specs_keys too.","commit_id":"c7b01eb2078f10db1c9aff2989fdb2fd250d00c3"},{"author":{"_account_id":9275,"name":"Leandro Ignacio Costantino","email":"leandro.i.costantino@intel.com","username":"lcostantino"},"change_message_id":"d9b9893a33ca5f7c00f034e9d64da030f2635eff","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                                       use_admin_context\u003dTrue)"},{"line_number":205,"context_line":"            self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"},{"line_number":206,"context_line":"                          req, 1, body)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def test_update_item(self):"},{"line_number":209,"context_line":"        self.stubs.Set(nova.db,"},{"line_number":210,"context_line":"                       \u0027flavor_extra_specs_update_or_create\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9Qno%3D","line":207,"in_reply_to":"AAAATn%2F9SNo%3D","updated":"2013-12-13 11:54:28.000000000","message":"Done","commit_id":"c7b01eb2078f10db1c9aff2989fdb2fd250d00c3"}]}
