)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"change_message_id":"8a809e3227bc417adcd50e524e4d8290fb99ce5c","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2013-01-25 18:03:58 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The change adds support of advanced validation of dictionary values in the API."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows to specify constraints for individual keys in"},{"line_number":10,"context_line":"dictionaries in the specification of the API resources."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAM3%2F%2FV8I%3D","line":8,"updated":"2013-01-28 07:54:19.000000000","message":"Git commit messages should start with a short 50 character or less summary in a single paragraph","commit_id":"c0a5dfa6cc042e25a7735831d84cb9cfbc5a186e"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2013-01-25 18:03:58 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The change adds support of advanced validation of dictionary values in the API."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows to specify constraints for individual keys in"},{"line_number":10,"context_line":"dictionaries in the specification of the API resources."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAM3%2F%2FVY0%3D","line":8,"in_reply_to":"AAAAM3%2F%2FV8I%3D","updated":"2013-01-28 16:42:15.000000000","message":"Reduced the size to 55 characters. Cannot make it shorter without using abbreviations.","commit_id":"c0a5dfa6cc042e25a7735831d84cb9cfbc5a186e"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":15,"context_line":"Adds constraints for session persistance parameters to the API."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I62068deed449967949eaba9259028c88dd6974f8"},{"line_number":18,"context_line":"Fixes: bug #1104110"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAM3%2F%2FHYQ%3D","line":18,"updated":"2013-02-06 18:46:41.000000000","message":"This line should be on 16","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"}],"quantum/api/v2/attributes.py":[{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"change_message_id":"8a809e3227bc417adcd50e524e4d8290fb99ce5c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        return msg"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    predicate \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    if strict:"},{"line_number":41,"context_line":"        predicate \u003d lambda exp_set, prov_set: exp_set !\u003d prov_set"},{"line_number":42,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FV6o%3D","line":39,"updated":"2013-01-28 07:54:19.000000000","message":"Do you really need this initialization?","commit_id":"c0a5dfa6cc042e25a7735831d84cb9cfbc5a186e"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        return msg"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    predicate \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    if strict:"},{"line_number":41,"context_line":"        predicate \u003d lambda exp_set, prov_set: exp_set !\u003d prov_set"},{"line_number":42,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FVzY%3D","line":39,"in_reply_to":"AAAAM3%2F%2FV6o%3D","updated":"2013-01-28 16:42:15.000000000","message":"Done","commit_id":"c0a5dfa6cc042e25a7735831d84cb9cfbc5a186e"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"aa21301c19808e8cf825eb313bfe997f2724f30f","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    provided_keys \u003d target_dict.keys()"},{"line_number":46,"context_line":"    if predicate(set(expected_keys), set(provided_keys)):"},{"line_number":47,"context_line":"        msg \u003d (_(\"Expected keys not found. Expected: %(expected_keys)s \""},{"line_number":48,"context_line":"                 \"Provided: %(provided_keys)s\") % locals())"},{"line_number":49,"context_line":"        return msg"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FV1M%3D","line":47,"updated":"2013-01-28 09:59:06.000000000","message":"Message may be misleading if strict \u003d\u003d True and prov_set contains any additional elements","commit_id":"c0a5dfa6cc042e25a7735831d84cb9cfbc5a186e"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    provided_keys \u003d target_dict.keys()"},{"line_number":46,"context_line":"    if predicate(set(expected_keys), set(provided_keys)):"},{"line_number":47,"context_line":"        msg \u003d (_(\"Expected keys not found. Expected: %(expected_keys)s \""},{"line_number":48,"context_line":"                 \"Provided: %(provided_keys)s\") % locals())"},{"line_number":49,"context_line":"        return msg"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FVlQ%3D","line":47,"in_reply_to":"AAAAM3%2F%2FV1M%3D","updated":"2013-01-28 16:42:15.000000000","message":"Done","commit_id":"c0a5dfa6cc042e25a7735831d84cb9cfbc5a186e"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":41,"context_line":"        msg \u003d _(\"Invalid input. %s must be a dictionary.\") % target_dict"},{"line_number":42,"context_line":"        return msg"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    if strict:"},{"line_number":45,"context_line":"        predicate \u003d lambda exp_set, prov_set: exp_set !\u003d prov_set"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        predicate \u003d lambda exp_set, prov_set: not exp_set.issubset(prov_set)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FUxM%3D","line":44,"updated":"2013-01-28 23:49:05.000000000","message":"Consider replacing 44-50:\n\npredicate \u003d \u0027__eq__\u0027 if strict else \u0027issubset\u0027\n\nprovided_keys \u003d set(target_dict.keys())\n\nif not getattr(set(expected_keys), predicate)(provided_keys):","commit_id":"87c1239e0bdb52321155f2b0eb7862ee8e9ae791"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        msg \u003d _(\"Invalid input. %s must be a dictionary.\") % target_dict"},{"line_number":42,"context_line":"        return msg"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    if strict:"},{"line_number":45,"context_line":"        predicate \u003d lambda exp_set, prov_set: exp_set !\u003d prov_set"},{"line_number":46,"context_line":"    else:"},{"line_number":47,"context_line":"        predicate \u003d lambda exp_set, prov_set: not exp_set.issubset(prov_set)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FUFY%3D","line":44,"in_reply_to":"AAAAM3%2F%2FUxM%3D","updated":"2013-01-29 13:03:50.000000000","message":"Done","commit_id":"87c1239e0bdb52321155f2b0eb7862ee8e9ae791"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":287,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":288,"context_line":"    for key, validator_spec in key_specs.iteritems():"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        if not key in required_keys and not key in data:"},{"line_number":291,"context_line":"            continue"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FS88%3D","line":290,"updated":"2013-01-29 22:03:16.000000000","message":"We\u0027ve got a pending change to make code a little more uniform.  Consider the equivalent:\n\nif key not in required_keys and key not in data:","commit_id":"6f52bfa43c971874a91ae96b70d2db9abd2e5d31"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":288,"context_line":"    for key, validator_spec in key_specs.iteritems():"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        if not key in required_keys and not key in data:"},{"line_number":291,"context_line":"            continue"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FS3s%3D","line":290,"in_reply_to":"AAAAM3%2F%2FS88%3D","updated":"2013-01-29 22:59:51.000000000","message":"Will be done in the next change set tomorrow.","commit_id":"6f52bfa43c971874a91ae96b70d2db9abd2e5d31"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if not key in required_keys and not key in data:"},{"line_number":291,"context_line":"            continue"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"},{"line_number":294,"context_line":"                                 validator_spec.iterkeys())"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Check whether any type specification is defined."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FS7c%3D","line":293,"updated":"2013-01-29 22:03:16.000000000","message":"Consider replacing 293- 308 with:\n\nfor spec_key, spec_value in validator_spec.iteritems():\n    if spec_key.startswith(\u0027type:\u0027):\n         msg \u003d validators[spec_key](data.get(key), spec_value)\n         if msg:\n             LOG.debug(msg)\n             return msg","commit_id":"6f52bfa43c971874a91ae96b70d2db9abd2e5d31"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if not key in required_keys and not key in data:"},{"line_number":291,"context_line":"            continue"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"},{"line_number":294,"context_line":"                                 validator_spec.iterkeys())"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Check whether any type specification is defined."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FSdI%3D","line":293,"in_reply_to":"AAAAM3%2F%2FS1I%3D","updated":"2013-01-30 04:17:14.000000000","message":"Both forms are equivalent, but I don\u0027t think it is worth adding the complexity of a lambda function call to save 1 level source indention. \n\nThe ifilter version also requires that the python interpreter execute more bytecode instructions to achieve the same result.","commit_id":"6f52bfa43c971874a91ae96b70d2db9abd2e5d31"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if not key in required_keys and not key in data:"},{"line_number":291,"context_line":"            continue"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"},{"line_number":294,"context_line":"                                 validator_spec.iterkeys())"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Check whether any type specification is defined."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FS1I%3D","line":293,"in_reply_to":"AAAAM3%2F%2FS7c%3D","updated":"2013-01-29 22:59:51.000000000","message":"What can you say about this?\n\nfor spec_key in ifilter(lambda k: k.startswith(\u0027type:\u0027), validator_spec):\n    msg \u003d validators[spec_key](data.get(key), validator_spec[spec_key])\n    if msg:\n        LOG.debug(msg)\n        return msg\n\nAlthough this code requires using itertools it has less nested blocks and seems to be easier to read.","commit_id":"6f52bfa43c971874a91ae96b70d2db9abd2e5d31"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if not key in required_keys and not key in data:"},{"line_number":291,"context_line":"            continue"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"},{"line_number":294,"context_line":"                                 validator_spec.iterkeys())"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Check whether any type specification is defined."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FSI8%3D","line":293,"in_reply_to":"AAAAM3%2F%2FSdI%3D","updated":"2013-01-30 10:51:26.000000000","message":"I\u0027m afraid I cannot agree with you about over-complexity of lambda functions, especially in this case. Maybe for some one who\u0027s a newbie in python they might be complex to read and understand.\n\nIf we refuse to use lambdas because they are \"complex\" and \"unusual\", why not refuse using for loops or list comprehensions because they are quite unusual for guys who just switched from C to Python?\n\nIn my opinion we should use tools and features Python offers us. If we don\u0027t, we\u0027ll get the code that looks like api.v2.base. There\u0027s no many \"complex\" and \"unusual\" things there. However, that code looks like a bloody nightmare. It\u0027s very hard to understand what\u0027s happening there because of a lot of nested code (and of course because of lack of comments).\n\nIn this case I do not propose using a brain-cracking one-liner. I just propose using a primitive lambda function (if this one is hard to understand for some one, we should let him go back to school and learn Python) instead of nesting the code with a C-style filtering. I\u0027m not trying to say that C-style is bad. What I\u0027m trying to say is that C-style is bad for Python code.","commit_id":"6f52bfa43c971874a91ae96b70d2db9abd2e5d31"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"unresolved":false,"context_lines":[{"line_number":289,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":290,"context_line":"    for key, validator_spec in key_specs.iteritems():"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if key not in required_keys and key not in data:"},{"line_number":293,"context_line":"            continue"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FRsM%3D","line":292,"updated":"2013-01-30 16:20:44.000000000","message":"This condition can be merged into the loop structure using a generator expression:\n\n  for key, validator_spec in ((k, v) for k, v in key_specs.iteritems() if k not in required_keys and k not in data):\n\nThe body of the loop will then process only the values you actually want.","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":289,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":290,"context_line":"    for key, validator_spec in key_specs.iteritems():"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if key not in required_keys and key not in data:"},{"line_number":293,"context_line":"            continue"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FO9Y%3D","line":292,"in_reply_to":"AAAAM3%2F%2FPR0%3D","updated":"2013-01-31 23:42:05.000000000","message":"OK I got it. Thanks","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":289,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":290,"context_line":"    for key, validator_spec in key_specs.iteritems():"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if key not in required_keys and key not in data:"},{"line_number":293,"context_line":"            continue"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FPR0%3D","line":292,"in_reply_to":"AAAAM3%2F%2FPZc%3D","updated":"2013-01-31 20:55:16.000000000","message":"Yes generator expressions are supported in py26.","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":289,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":290,"context_line":"    for key, validator_spec in key_specs.iteritems():"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if key not in required_keys and key not in data:"},{"line_number":293,"context_line":"            continue"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FPZc%3D","line":292,"in_reply_to":"AAAAM3%2F%2FRsM%3D","updated":"2013-01-31 19:54:26.000000000","message":"Is the way supported in python2.6?","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"unresolved":false,"context_lines":[{"line_number":293,"context_line":"            continue"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        validator_names \u003d filter(lambda x: x.startswith(\u0027type:\u0027),"},{"line_number":296,"context_line":"                                 validator_spec.iterkeys())"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        # Check whether any type specification is defined."},{"line_number":299,"context_line":"        if not validator_names:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FRss%3D","line":296,"updated":"2013-01-30 16:20:44.000000000","message":"This call to filter would be more efficient and readable as a list comprehension:\n\n  validator_names \u003d [n for n in validator_spec.iterkeys() if n.startswith(\u0027type:\u0027)]","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not validator_names:"},{"line_number":300,"context_line":"            continue"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        validator_name \u003d validator_names[0]"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        validator_func \u003d validators[validator_name]"},{"line_number":305,"context_line":"        validator_params \u003d validator_spec[validator_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FRr8%3D","line":302,"updated":"2013-01-30 16:20:44.000000000","message":"If you\u0027re only using the first name, why process all of the keys in validator_spec to get a list of names?\n\nIf validator_spec is a dictionary, the order you encounter the keys won\u0027t be consistent across different instances or runs. Does the order matter for choosing the name to use here? Should the names be sorted or are you expecting 0 or 1 results?","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        if not validator_names:"},{"line_number":300,"context_line":"            continue"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        validator_name \u003d validator_names[0]"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        validator_func \u003d validators[validator_name]"},{"line_number":305,"context_line":"        validator_params \u003d validator_spec[validator_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FOTo%3D","line":302,"in_reply_to":"AAAAM3%2F%2FRr8%3D","updated":"2013-02-01 13:59:55.000000000","message":"I have redone this part of the code in the next patch set.","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":280,"context_line":"    # TODO (Roman Prykhodchenko): Implement a mechanism for specifying whether"},{"line_number":281,"context_line":"    # the dictionary is allowed to be None or empty."},{"line_number":282,"context_line":"    if not key_specs or not data:"},{"line_number":283,"context_line":"        return"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    # Check whether all required keys are present"},{"line_number":286,"context_line":"    required_keys \u003d [key for key, spec in key_specs.iteritems()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FOSk%3D","line":283,"updated":"2013-02-01 14:19:45.000000000","message":"We need to find a way for specifying whether dictionary can be empty. This might be required when in the cases like resetting session persistence with an empty dictionary.\n\nWhat I can think about is adding some special keys to the dictionary specification, i.e.:\n\n\u0027type:dict\u0027: {\n    \u0027key1\u0027: {\u0027type:string\u0027: None},\n    \u0027__allowed_empty__\u0027: True\n}","commit_id":"f64a4b75e5eb22330dedce0ff413f92c17229fa2"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":280,"context_line":"    # TODO (Roman Prykhodchenko): Implement a mechanism for specifying whether"},{"line_number":281,"context_line":"    # the dictionary is allowed to be None or empty."},{"line_number":282,"context_line":"    if not key_specs or not data:"},{"line_number":283,"context_line":"        return"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    # Check whether all required keys are present"},{"line_number":286,"context_line":"    required_keys \u003d [key for key, spec in key_specs.iteritems()"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FOLU%3D","line":283,"in_reply_to":"AAAAM3%2F%2FOSk%3D","updated":"2013-02-01 15:59:30.000000000","message":"I\u0027ve used other projects that have take similar approaches and keys like this tend to cause more problems than they solve.  This is similar to the other discussions that we\u0027ve been having about how to clear values.  Maybe add a type:dict_or_none?  Salvatore your thoughts?","commit_id":"f64a4b75e5eb22330dedce0ff413f92c17229fa2"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":293,"context_line":"            return msg"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":296,"context_line":"    for key in ifilter(lambda k: k in required_keys and k in data, key_specs):"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        validator \u003d key_specs[key]"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FOKw%3D","line":296,"updated":"2013-02-01 15:59:30.000000000","message":"You\u0027ve been asked to changed the construct of this code multiple times.  The most recent list comprehension suggestion made by another reviewer struck a good balance of readability and performance.","commit_id":"f64a4b75e5eb22330dedce0ff413f92c17229fa2"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            return msg"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":296,"context_line":"    for key in ifilter(lambda k: k in required_keys and k in data, key_specs):"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        validator \u003d key_specs[key]"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FOIU%3D","line":296,"in_reply_to":"AAAAM3%2F%2FOKw%3D","updated":"2013-02-01 16:15:44.000000000","message":"Replaced lambdas with list comprehensions in the next change set","commit_id":"f64a4b75e5eb22330dedce0ff413f92c17229fa2"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import netaddr"},{"line_number":19,"context_line":"import re"},{"line_number":20,"context_line":"from itertools import ifilter"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from quantum.common import exceptions as q_exc"},{"line_number":23,"context_line":"from quantum.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2FIWE%3D","line":20,"updated":"2013-02-06 04:58:27.000000000","message":"unused import","commit_id":"8704852b7c49ea3e37e5a3ba0edda8ef437f5638"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import netaddr"},{"line_number":19,"context_line":"import re"},{"line_number":20,"context_line":"from itertools import ifilter"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from quantum.common import exceptions as q_exc"},{"line_number":23,"context_line":"from quantum.openstack.common import log as logging"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2FILY%3D","line":20,"in_reply_to":"AAAAM3%2F%2FIWE%3D","updated":"2013-02-06 09:16:16.000000000","message":"Done","commit_id":"8704852b7c49ea3e37e5a3ba0edda8ef437f5638"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    # Check whether all required keys are present"},{"line_number":282,"context_line":"    required_keys \u003d [key for key, spec in key_specs.iteritems()"},{"line_number":283,"context_line":"                     if spec.get(\u0027required\u0027)]"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    if required_keys:"},{"line_number":286,"context_line":"        msg \u003d _verify_dict_keys(required_keys, data, False)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FIEQ%3D","line":283,"updated":"2013-02-06 11:10:46.000000000","message":"Provide default value for required is better, spec.get(\u0027required\u0027, False)","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    # Check whether all required keys are present"},{"line_number":282,"context_line":"    required_keys \u003d [key for key, spec in key_specs.iteritems()"},{"line_number":283,"context_line":"                     if spec.get(\u0027required\u0027)]"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    if required_keys:"},{"line_number":286,"context_line":"        msg \u003d _verify_dict_keys(required_keys, data, False)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FGrk%3D","line":283,"in_reply_to":"AAAAM3%2F%2FIBg%3D","updated":"2013-02-07 00:43:14.000000000","message":"you are right, None is ok at here. I missed that.","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    # Check whether all required keys are present"},{"line_number":282,"context_line":"    required_keys \u003d [key for key, spec in key_specs.iteritems()"},{"line_number":283,"context_line":"                     if spec.get(\u0027required\u0027)]"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    if required_keys:"},{"line_number":286,"context_line":"        msg \u003d _verify_dict_keys(required_keys, data, False)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FIBg%3D","line":283,"in_reply_to":"AAAAM3%2F%2FIEQ%3D","updated":"2013-02-06 11:43:04.000000000","message":"Why is it better? None seems to do the same job here?","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":292,"context_line":"    for key, validator in [(k, v) for k, v in key_specs.iteritems()"},{"line_number":293,"context_line":"                           if k in required_keys and k in data]:"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        for val_name in [n for n in validator.iterkeys()"},{"line_number":296,"context_line":"                         if n.startswith(\u0027type:\u0027)]:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FIEo%3D","line":293,"updated":"2013-02-06 11:06:58.000000000","message":"Why we only check required_key? so line 99 in https://review.openstack.org/#/c/20487/11/quantum/extensions/loadbalancer.py is useless","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    # Perform validation of all values according to the specifications."},{"line_number":292,"context_line":"    for key, validator in [(k, v) for k, v in key_specs.iteritems()"},{"line_number":293,"context_line":"                           if k in required_keys and k in data]:"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        for val_name in [n for n in validator.iterkeys()"},{"line_number":296,"context_line":"                         if n.startswith(\u0027type:\u0027)]:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FIBk%3D","line":293,"in_reply_to":"AAAAM3%2F%2FIEo%3D","updated":"2013-02-06 11:43:04.000000000","message":"Thanks for pointing to this. There\u0027s definitely an error. It should skip keys that are not required and are not present.","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"unresolved":false,"context_lines":[{"line_number":296,"context_line":"                         if n.startswith(\u0027type:\u0027)]:"},{"line_number":297,"context_line":"            # Check whether specified validator exists."},{"line_number":298,"context_line":"            if val_name not in validators:"},{"line_number":299,"context_line":"                msg \u003d _(\"Validator \u0027%s\u0027 does not exist.\" % val_name)"},{"line_number":300,"context_line":"                LOG.debug(msg)"},{"line_number":301,"context_line":"                return msg"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FIGc%3D","line":299,"updated":"2013-02-06 11:06:58.000000000","message":"This should be _(\"Validator \u0027%s\u0027 does not exist.\") % val_name.","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                         if n.startswith(\u0027type:\u0027)]:"},{"line_number":297,"context_line":"            # Check whether specified validator exists."},{"line_number":298,"context_line":"            if val_name not in validators:"},{"line_number":299,"context_line":"                msg \u003d _(\"Validator \u0027%s\u0027 does not exist.\" % val_name)"},{"line_number":300,"context_line":"                LOG.debug(msg)"},{"line_number":301,"context_line":"                return msg"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FICU%3D","line":299,"in_reply_to":"AAAAM3%2F%2FIGc%3D","updated":"2013-02-06 11:43:04.000000000","message":"Done","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":301,"context_line":"                return msg"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"            val_func \u003d validators[val_name]"},{"line_number":304,"context_line":"            val_params \u003d validator[val_name]"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"            msg \u003d val_func(data.get(key), val_params)"},{"line_number":307,"context_line":"            if msg:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FEA4%3D","line":304,"updated":"2013-02-08 12:34:18.000000000","message":"Ultra nit: for maintainability, consider changing variable names so that \u0027validators\u0027 and \u0027validator\u0027 might not be mixed up.\n\nvalidator might be replace with key_validator if that\u0027s ok for you.","commit_id":"1c278cd6c382feee9d30b7f9d0441e90cc068b54"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                return msg"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"            val_func \u003d validators[val_name]"},{"line_number":304,"context_line":"            val_params \u003d validator[val_name]"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"            msg \u003d val_func(data.get(key), val_params)"},{"line_number":307,"context_line":"            if msg:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FD%2FA%3D","line":304,"in_reply_to":"AAAAM3%2F%2FEA4%3D","updated":"2013-02-08 13:16:37.000000000","message":"Done","commit_id":"1c278cd6c382feee9d30b7f9d0441e90cc068b54"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"unresolved":false,"context_lines":[{"line_number":52,"context_line":"    if not predicate(provided_keys):"},{"line_number":53,"context_line":"        msg \u003d (_(\"Validation of dictionary\u0027s keys failed.\""},{"line_number":54,"context_line":"                 \"Expected keys: %(expected_keys)s \""},{"line_number":55,"context_line":"                 \"Provided keys: %(provided_keys)s\") % locals())"},{"line_number":56,"context_line":"        return msg"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAM3%2F%2B8kk%3D","line":55,"updated":"2013-02-13 17:20:45.000000000","message":"i thought that we should not use locals()?","commit_id":"a5c101da4bd6371fdc116690ef0c354868a571b0"}],"quantum/db/loadbalancer/loadbalancer_db.py":[{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":312,"context_line":"            if session_info:"},{"line_number":313,"context_line":"                sesspersist_db \u003d SessionPersistence("},{"line_number":314,"context_line":"                    type\u003dsession_info[\u0027type\u0027],"},{"line_number":315,"context_line":"                    cookie_name\u003dsession_info[\u0027cookie_name\u0027],"},{"line_number":316,"context_line":"                    vip_id\u003dvip_id)"},{"line_number":317,"context_line":"                vip_db.session_persistence \u003d sesspersist_db"},{"line_number":318,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FHt0%3D","line":315,"updated":"2013-02-06 16:19:27.000000000","message":"There\u0027s definitely a bug here. cookie_name will only be present, if type of persistence is APP_COOKIE.","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":312,"context_line":"            if session_info:"},{"line_number":313,"context_line":"                sesspersist_db \u003d SessionPersistence("},{"line_number":314,"context_line":"                    type\u003dsession_info[\u0027type\u0027],"},{"line_number":315,"context_line":"                    cookie_name\u003dsession_info[\u0027cookie_name\u0027],"},{"line_number":316,"context_line":"                    vip_id\u003dvip_id)"},{"line_number":317,"context_line":"                vip_db.session_persistence \u003d sesspersist_db"},{"line_number":318,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2FHX8%3D","line":315,"in_reply_to":"AAAAM3%2F%2FHt0%3D","updated":"2013-02-06 18:46:41.000000000","message":"cookie_name should be constraint","commit_id":"1559c57043edfd4beedad7a9a831f45a55c34488"}],"quantum/extensions/loadbalancer.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \u0027session_persistence\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":91,"context_line":"                                \u0027default\u0027: {},"},{"line_number":92,"context_line":"                                \u0027validate\u0027: {\u0027type:dict\u0027: ["},{"line_number":93,"context_line":"                                    {\u0027type\u0027: {"},{"line_number":94,"context_line":"                                        \u0027type:values\u0027: [\u0027APP_COOKIE\u0027,"},{"line_number":95,"context_line":"                                                        \u0027HTTP_COOKIE\u0027,"},{"line_number":96,"context_line":"                                                        \u0027SOURCE_IP\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2FUuY%3D","line":93,"updated":"2013-01-28 23:49:05.000000000","message":"Why are these single item dicts?  Seems like you should pass constraint dict() to the validating function.","commit_id":"87c1239e0bdb52321155f2b0eb7862ee8e9ae791"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \u0027session_persistence\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":91,"context_line":"                                \u0027convert_to\u0027: attr.convert_none_to_empty_dict,"},{"line_number":92,"context_line":"                                \u0027default\u0027: {},"},{"line_number":93,"context_line":"                                \u0027validate\u0027: {\u0027type:dict_or_none\u0027: {"},{"line_number":94,"context_line":"                                    \u0027type\u0027: {\u0027type:values\u0027: [\u0027APP_COOKIE\u0027,"},{"line_number":95,"context_line":"                                                             \u0027HTTP_COOKIE\u0027,"},{"line_number":96,"context_line":"                                                             \u0027SOURCE_IP\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FLeo%3D","line":93,"updated":"2013-02-04 18:37:58.000000000","message":"Consider setting the type:dict:or_none on it\u0027s own line to make the nested dictionaries stand out better.\n\n \u0027validate\u0027: {\n    \u0027type:dict_or_none\u0027: {\n        \u0027type\u0027: {\u0027type:values\u0027:","commit_id":"7194079a8c70500160cb389de70562cffc74a577"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \u0027session_persistence\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":91,"context_line":"                                \u0027convert_to\u0027: attr.convert_none_to_empty_dict,"},{"line_number":92,"context_line":"                                \u0027default\u0027: {},"},{"line_number":93,"context_line":"                                \u0027validate\u0027: {\u0027type:dict_or_none\u0027: {"},{"line_number":94,"context_line":"                                    \u0027type\u0027: {\u0027type:values\u0027: [\u0027APP_COOKIE\u0027,"},{"line_number":95,"context_line":"                                                             \u0027HTTP_COOKIE\u0027,"},{"line_number":96,"context_line":"                                                             \u0027SOURCE_IP\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FLZk%3D","line":93,"in_reply_to":"AAAAM3%2F%2FLeo%3D","updated":"2013-02-04 18:48:05.000000000","message":"Done","commit_id":"7194079a8c70500160cb389de70562cffc74a577"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":94,"context_line":"                                    \u0027type:dict_or_none\u0027: {"},{"line_number":95,"context_line":"                                        \u0027type\u0027: {\u0027type:values\u0027: [\u0027APP_COOKIE\u0027,"},{"line_number":96,"context_line":"                                                                 \u0027HTTP_COOKIE\u0027,"},{"line_number":97,"context_line":"                                                                 \u0027SOURCE_IP\u0027],"},{"line_number":98,"context_line":"                                                 \u0027required\u0027: True},"},{"line_number":99,"context_line":"                                        \u0027cookie_name\u0027: {\u0027type:string\u0027: None,"},{"line_number":100,"context_line":"                                                        \u0027required\u0027: False}}},"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FEAw%3D","line":97,"updated":"2013-02-08 12:34:18.000000000","message":"I guess this will become part of the official LBaaS API. Spec should be updated accordingly (is it still at: http://wiki.openstack.org/Quantum/LBaaS/API_1.0)","commit_id":"1c278cd6c382feee9d30b7f9d0441e90cc068b54"}],"quantum/tests/unit/db/loadbalancer/test_db_loadbalancer.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":432,"context_line":"                (\u0027admin_state_up\u0027, True),"},{"line_number":433,"context_line":"                (\u0027status\u0027, \u0027PENDING_CREATE\u0027)]"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        vip \u003d self.vip(name\u003dname, session_persistence\u003d{\u0027type\u0027: \"UNSUPPORTED\"})"},{"line_number":436,"context_line":"        self.assertRaises(webob.exc.HTTPClientError, vip.__enter__)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        with self.vip(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FLd0%3D","line":435,"updated":"2013-02-04 18:37:58.000000000","message":"This failing test should be in its own test method and not intermingled with a test that checks for success.  Maybe test_create_vip_with_session_persistence_unsupported_type()?","commit_id":"7194079a8c70500160cb389de70562cffc74a577"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":432,"context_line":"                (\u0027admin_state_up\u0027, True),"},{"line_number":433,"context_line":"                (\u0027status\u0027, \u0027PENDING_CREATE\u0027)]"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        vip \u003d self.vip(name\u003dname, session_persistence\u003d{\u0027type\u0027: \"UNSUPPORTED\"})"},{"line_number":436,"context_line":"        self.assertRaises(webob.exc.HTTPClientError, vip.__enter__)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        with self.vip(name\u003dname,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FLag%3D","line":435,"in_reply_to":"AAAAM3%2F%2FLd0%3D","updated":"2013-02-04 18:48:05.000000000","message":"Done","commit_id":"7194079a8c70500160cb389de70562cffc74a577"}],"quantum/tests/unit/test_attributes.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"unresolved":false,"context_lines":[{"line_number":457,"context_line":"        self.assertIn(\u0027Expected keys:\u0027, msg, \u0027The error was not detected.\u0027)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        # Check validation of wrong values."},{"line_number":460,"context_line":"        dict_to_validate[\u0027key\u0027] \u003d \u0027UNSUPPORTED\u0027"},{"line_number":461,"context_line":"        msg \u003d attributes._validate_dict(dict_to_validate, constraints)"},{"line_number":462,"context_line":"        self.assertIsNotNone(msg)"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FSDI%3D","line":460,"updated":"2013-01-30 11:43:04.000000000","message":"I guess there should be dict_to_validate[\u0027key1\u0027] \u003d \u0027UNSUPPORTED\u0027","commit_id":"82dacf3d3effcebcaa3310065d992748a4cc0c56"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":457,"context_line":"        self.assertIn(\u0027Expected keys:\u0027, msg, \u0027The error was not detected.\u0027)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        # Check validation of wrong values."},{"line_number":460,"context_line":"        dict_to_validate[\u0027key\u0027] \u003d \u0027UNSUPPORTED\u0027"},{"line_number":461,"context_line":"        msg \u003d attributes._validate_dict(dict_to_validate, constraints)"},{"line_number":462,"context_line":"        self.assertIsNotNone(msg)"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FR%2Bc%3D","line":460,"in_reply_to":"AAAAM3%2F%2FSDI%3D","updated":"2013-01-30 12:34:25.000000000","message":"Thanks for this notice. Fixed in the next patch set.","commit_id":"82dacf3d3effcebcaa3310065d992748a4cc0c56"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":414,"context_line":"            msg \u003d attributes._validate_uuid_list(uuid_list)"},{"line_number":415,"context_line":"            self.assertEquals(msg, None)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def test_validate_dict(self):"},{"line_number":418,"context_line":"        for value in (None, True, \u00271\u0027, []):"},{"line_number":419,"context_line":"            self.assertEquals(attributes._validate_dict(value),"},{"line_number":420,"context_line":"                              \"\u0027%s\u0027 is not a dictionary\" % value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FPY0%3D","line":417,"updated":"2013-01-31 19:54:26.000000000","message":"Could you consider split this test case with some test cases?\nIt makes clear which kind of test is performed","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":414,"context_line":"            msg \u003d attributes._validate_uuid_list(uuid_list)"},{"line_number":415,"context_line":"            self.assertEquals(msg, None)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def test_validate_dict(self):"},{"line_number":418,"context_line":"        for value in (None, True, \u00271\u0027, []):"},{"line_number":419,"context_line":"            self.assertEquals(attributes._validate_dict(value),"},{"line_number":420,"context_line":"                              \"\u0027%s\u0027 is not a dictionary\" % value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FL%2FY%3D","line":417,"in_reply_to":"AAAAM3%2F%2FN6w%3D","updated":"2013-02-04 14:38:02.000000000","message":"Done","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":2031,"name":"Nachi Ueno","email":"nati.ueno@gmail.com","username":"nati-ueno"},"unresolved":false,"context_lines":[{"line_number":414,"context_line":"            msg \u003d attributes._validate_uuid_list(uuid_list)"},{"line_number":415,"context_line":"            self.assertEquals(msg, None)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def test_validate_dict(self):"},{"line_number":418,"context_line":"        for value in (None, True, \u00271\u0027, []):"},{"line_number":419,"context_line":"            self.assertEquals(attributes._validate_dict(value),"},{"line_number":420,"context_line":"                              \"\u0027%s\u0027 is not a dictionary\" % value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FN6w%3D","line":417,"in_reply_to":"AAAAM3%2F%2FOTs%3D","updated":"2013-02-01 19:17:18.000000000","message":"If we create helper function, total length of code may not increase. IMO, This is unittest so changes of time of test can\u0027t be recognized by human.","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"f7bc471c8d6882b6119d4609d0cf1eea271b6aaf","unresolved":false,"context_lines":[{"line_number":414,"context_line":"            msg \u003d attributes._validate_uuid_list(uuid_list)"},{"line_number":415,"context_line":"            self.assertEquals(msg, None)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def test_validate_dict(self):"},{"line_number":418,"context_line":"        for value in (None, True, \u00271\u0027, []):"},{"line_number":419,"context_line":"            self.assertEquals(attributes._validate_dict(value),"},{"line_number":420,"context_line":"                              \"\u0027%s\u0027 is not a dictionary\" % value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FOTs%3D","line":417,"in_reply_to":"AAAAM3%2F%2FPY0%3D","updated":"2013-02-01 13:59:55.000000000","message":"Do you really think this won\u0027t just increase the time of testing and the total length of the code?","commit_id":"29874e3a18afe811fbb20a0c8ade2335232801d2"}]}
