)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"772f083bbbb7cb393909a200d226783bfb0a51dc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add rule processing for mapping"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add a function to compare mapping reference rules to"},{"line_number":10,"context_line":"incoming assertion headers. Returns a set of identity"},{"line_number":11,"context_line":"values."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAUH%2F9%2BRE%3D","line":9,"updated":"2014-01-31 15:03:18.000000000","message":"How about making this one sentence, but replacing \u0027Add\u0027 with \u0027Adds\u0027 and \u0027. Returns\u0027 with \u0027and returns\u0027?","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"00f7fe158c6ec77a23705072ca2ca04976e9be77","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add rule processing for mapping"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add a function to compare mapping reference rules to"},{"line_number":10,"context_line":"incoming assertion headers. Returns a set of identity"},{"line_number":11,"context_line":"values."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAUH%2F9928%3D","line":9,"in_reply_to":"AAAAUH%2F9%2BRE%3D","updated":"2014-02-01 05:18:15.000000000","message":"Sure.","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"}],"keystone/contrib/federation/utils.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"6f44eed61f984d55f6ba26284ec8876f1e0cc61f","unresolved":false,"context_lines":[{"line_number":120,"context_line":"\"\"\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def process(assertion_headers, mapping_ref):"},{"line_number":123,"context_line":"    assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion_headers.items())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":126,"context_line":"    identity_values \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1ik%3D","line":123,"updated":"2014-01-21 15:46:39.000000000","message":"credit goes to dstanek on this one :)","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"42c4099b499e389e6a3771fe6d10390c53087168","unresolved":false,"context_lines":[{"line_number":120,"context_line":"\"\"\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def process(assertion_headers, mapping_ref):"},{"line_number":123,"context_line":"    assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion_headers.items())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":126,"context_line":"    identity_values \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B2%2FQ%3D","line":123,"updated":"2014-01-21 13:38:36.000000000","message":"nice, very Pythonic!","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"6d03fbf54498ecba944da67cfd956a2ac612b8be","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":146,"context_line":"                flat \u003d flat.replace(target, value)"},{"line_number":147,"context_line":"            ref \u003d jsonutils.loads(flat)"},{"line_number":148,"context_line":"            identity_values.append(ref)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    return identity_values"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FCBQ%3D","line":148,"updated":"2014-01-18 08:35:56.000000000","message":"i\u0027m wondering if there isn\u0027t a cleaner way to do this? i\u0027m very much abusing jsonutils here!","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"6f44eed61f984d55f6ba26284ec8876f1e0cc61f","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        any_one_values \u003d requirement.get(\u0027any_one_of\u0027)"},{"line_number":160,"context_line":"        if any_one_values:"},{"line_number":161,"context_line":"            if _any_one_of(any_one_values, rtype, assertion_data):"},{"line_number":162,"context_line":"                reqs_valid \u003d reqs_valid and True"},{"line_number":163,"context_line":"            else:"},{"line_number":164,"context_line":"                return (False, [])"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1iE%3D","line":162,"updated":"2014-01-21 15:46:39.000000000","message":"good point, i was using it to make sure all the requirements were valid, and evaluating it at the end; but then decided to just exit if any condition was false, which made keeping track of it pointless. I\u0027ll re-structure","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"42c4099b499e389e6a3771fe6d10390c53087168","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        any_one_values \u003d requirement.get(\u0027any_one_of\u0027)"},{"line_number":160,"context_line":"        if any_one_values:"},{"line_number":161,"context_line":"            if _any_one_of(any_one_values, rtype, assertion_data):"},{"line_number":162,"context_line":"                reqs_valid \u003d reqs_valid and True"},{"line_number":163,"context_line":"            else:"},{"line_number":164,"context_line":"                return (False, [])"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B3BA%3D","line":162,"updated":"2014-01-21 13:38:36.000000000","message":"what\u0027s the purpose of this operation?\nI don\u0027t see any way for reqs_valid to be anything other than True.","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"42c4099b499e389e6a3771fe6d10390c53087168","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        not_any_values \u003d requirement.get(\u0027not_any_of\u0027)"},{"line_number":167,"context_line":"        if not_any_values:"},{"line_number":168,"context_line":"            if _not_any_of(not_any_values, rtype, assertion_data):"},{"line_number":169,"context_line":"                reqs_valid \u003d reqs_valid and True"},{"line_number":170,"context_line":"            else:"},{"line_number":171,"context_line":"                return (False, [])"},{"line_number":172,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B3A8%3D","line":169,"updated":"2014-01-21 13:38:36.000000000","message":"what\u0027s the purpose of this operation?\nI don\u0027t see any way for reqs_valid to be anything other than True.","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"e5a687e53178f2d2ef3a2b0c27216845ca49a70a","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        if not not_any_values and not any_one_values:"},{"line_number":175,"context_line":"            direct_map_value \u003d assertion_data.get(rtype)"},{"line_number":176,"context_line":"            if direct_map_value:"},{"line_number":177,"context_line":"                direct_maps.append(direct_map_value)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    return (reqs_valid, direct_maps)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FCBg%3D","line":177,"updated":"2014-01-18 08:34:33.000000000","message":"currently this line makes things messy since i\u0027m appending an array to an array","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1313e837bc5abfb0703536b6c5d6297c2edad6d","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def process(assertion, mapping_ref):"},{"line_number":114,"context_line":"    \"\"\"A typical assertion looks like the following data:"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    \u0027ADFS_FIRSTNAME\u0027: \u0027Billy\u0027,"},{"line_number":117,"context_line":"    \u0027ADFS_GROUP\u0027: \u0027Domain Users;it;Direct-Employees;developer;\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BmKU%3D","line":114,"updated":"2014-01-24 01:15:21.000000000","message":"You probably want to drop this line down a few lines and replace it with a short description of what the method does.","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"738fd9e8375ed65a7d30b667343713ed5f60cd09","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def process(assertion, mapping_ref):"},{"line_number":114,"context_line":"    \"\"\"A typical assertion looks like the following data:"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    \u0027ADFS_FIRSTNAME\u0027: \u0027Billy\u0027,"},{"line_number":117,"context_line":"    \u0027ADFS_GROUP\u0027: \u0027Domain Users;it;Direct-Employees;developer;\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bl84%3D","line":114,"in_reply_to":"AAAAUH%2F%2BmKU%3D","updated":"2014-01-24 02:19:02.000000000","message":"cool, will do","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"2d489702c11fa622294e0ba5012aa227da53432a","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        # saved values."},{"line_number":142,"context_line":"        # However, if there is direct mapping, then we need to perform"},{"line_number":143,"context_line":"        # variable replacement."},{"line_number":144,"context_line":"        local \u003d rule.get(\u0027local\u0027)"},{"line_number":145,"context_line":"        if not direct_maps:"},{"line_number":146,"context_line":"            identity_values.append(local)"},{"line_number":147,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bie0%3D","line":144,"updated":"2014-01-24 16:16:19.000000000","message":"Info for the reviewers:\n\n  (Pdb) p local\n  [{\u0027group\u0027: {\u0027id\u0027: \u00270cd5e9\u0027}}]\n\nI should probably loop through local array (since it\u0027s always an array and add each one to identity_values, or just combine the two","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"738fd9e8375ed65a7d30b667343713ed5f60cd09","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if not direct_maps:"},{"line_number":146,"context_line":"            identity_values.append(local)"},{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            flat \u003d jsonutils.dumps(local)"},{"line_number":149,"context_line":"            for (counter, value) in enumerate(direct_maps):"},{"line_number":150,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":151,"context_line":"                flat \u003d flat.replace(target, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bl78%3D","line":148,"updated":"2014-01-24 02:19:02.000000000","message":"Hmm, why is that? Also, can you think of an easier way to replace the $0 ... $X values? This one seems like overkill.","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1313e837bc5abfb0703536b6c5d6297c2edad6d","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if not direct_maps:"},{"line_number":146,"context_line":"            identity_values.append(local)"},{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            flat \u003d jsonutils.dumps(local)"},{"line_number":149,"context_line":"            for (counter, value) in enumerate(direct_maps):"},{"line_number":150,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":151,"context_line":"                flat \u003d flat.replace(target, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BmIU%3D","line":148,"updated":"2014-01-24 01:15:21.000000000","message":"Is is possible that there would be more than 10 direct_maps?  If so we would have to do them in reverse.","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"2d489702c11fa622294e0ba5012aa227da53432a","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if not direct_maps:"},{"line_number":146,"context_line":"            identity_values.append(local)"},{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            flat \u003d jsonutils.dumps(local)"},{"line_number":149,"context_line":"            for (counter, value) in enumerate(direct_maps):"},{"line_number":150,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":151,"context_line":"                flat \u003d flat.replace(target, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bl0E%3D","line":148,"in_reply_to":"AAAAUH%2F%2Bl3c%3D","updated":"2014-01-24 16:16:19.000000000","message":"Right, good call.","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"413ab496b8397725c75f4f372b7251fe9c1cc148","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if not direct_maps:"},{"line_number":146,"context_line":"            identity_values.append(local)"},{"line_number":147,"context_line":"        else:"},{"line_number":148,"context_line":"            flat \u003d jsonutils.dumps(local)"},{"line_number":149,"context_line":"            for (counter, value) in enumerate(direct_maps):"},{"line_number":150,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":151,"context_line":"                flat \u003d flat.replace(target, value)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bl3c%3D","line":148,"in_reply_to":"AAAAUH%2F%2Bl78%3D","updated":"2014-01-24 02:35:16.000000000","message":"If you don\u0027t do something like: for (counter, value) in reversed(enumerate(direct_maps)) then a $10 would be be partially replaced by $1.","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"2d489702c11fa622294e0ba5012aa227da53432a","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        # neither case, so it\u0027s a direct mapping"},{"line_number":180,"context_line":"        if not not_any_values and not any_one_values:"},{"line_number":181,"context_line":"            direct_map_value \u003d assertion_data.get(rtype)"},{"line_number":182,"context_line":"            if direct_map_value:"},{"line_number":183,"context_line":"                direct_maps.append(direct_map_value[0])"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bih4%3D","line":181,"updated":"2014-01-24 16:16:19.000000000","message":"these comments are more of just FYIs..\n\n  (Pdb) p assertion_data\n  {\u0027UserName\u0027: [\u0027smithj\u0027], \u0027LastName\u0027:[\u0027Smith\u0027], \u0027orgPersonType\u0027:\n  [\u0027Contractor\u0027,\u0027SubContractor\u0027,\u0027Customer\u0027, \u0027\u0027, \u0027\u0027], \u0027Email\u0027:\n  [\u0027customer@customer.domain.com\u0027], \u0027FirstName\u0027: [\u0027Jill\u0027]}\n\nI want to grab the value that I plan on directly mapping, Smith or Jill in this case, I guess I can safely assume it\u0027s just 1 element, not sure if grabbing [0] is a good idea.","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"2d489702c11fa622294e0ba5012aa227da53432a","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    assertion_values \u003d assertion_data.get(rtype)"},{"line_number":190,"context_line":"    if assertion_values:"},{"line_number":191,"context_line":"        if regex:"},{"line_number":192,"context_line":"            if not re.search(values[0], assertion_values[0]):"},{"line_number":193,"context_line":"                return False"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        intersection \u003d set(values).intersection(set(assertion_values))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Biew%3D","line":192,"updated":"2014-01-24 16:16:19.000000000","message":"same thing here, another bit of info:\n\n  (Pdb) p assertion_values \n  [\u0027eviltester@evilcorp.com\u0027]\n  (Pdb) p values\n  [\u0027^@corp.com$\u0027]","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \"definitions\": {"},{"line_number":55,"context_line":"        \"empty\": {"},{"line_number":56,"context_line":"            \"type\": \"object\","},{"line_number":57,"context_line":"            \"required\": [\u0027type\u0027],"},{"line_number":58,"context_line":"            \"properties\": {"},{"line_number":59,"context_line":"                \"required\": [\u0027type\u0027],"},{"line_number":60,"context_line":"                \"type\": {"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI2w%3D","line":57,"updated":"2014-01-29 20:02:44.000000000","message":"is this fixing a bug? if so put it in a separate commit. Also, use \u0027 for strings consistently.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    \"definitions\": {"},{"line_number":55,"context_line":"        \"empty\": {"},{"line_number":56,"context_line":"            \"type\": \"object\","},{"line_number":57,"context_line":"            \"required\": [\u0027type\u0027],"},{"line_number":58,"context_line":"            \"properties\": {"},{"line_number":59,"context_line":"                \"required\": [\u0027type\u0027],"},{"line_number":60,"context_line":"                \"type\": {"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIqk%3D","line":57,"in_reply_to":"AAAAUH%2F%2BI2w%3D","updated":"2014-01-29 20:30:25.000000000","message":"yes it is, i\u0027ll do that in another patch.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def process(assertion, mapping_ref):"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    \"\"\"Transform assertion to a list of identity values based on a mapping:"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI00%3D","line":113,"updated":"2014-01-29 20:02:44.000000000","message":"suggest put these 3 new functions in a class -- AssertionProcessor or something. Then it will be obvious that they\u0027re all related.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def process(assertion, mapping_ref):"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    \"\"\"Transform assertion to a list of identity values based on a mapping:"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIRQ%3D","line":113,"in_reply_to":"AAAAUH%2F%2BI00%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def process(assertion, mapping_ref):"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    \"\"\"Transform assertion to a list of identity values based on a mapping:"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    This function will take as input, assertion headers, as well as a mapping"},{"line_number":118,"context_line":"    reference. The function will iterate through the mappings rules to find"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI2c%3D","line":115,"updated":"2014-01-29 20:02:44.000000000","message":"remove : at end of sentence","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"def process(assertion, mapping_ref):"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    \"\"\"Transform assertion to a list of identity values based on a mapping:"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    This function will take as input, assertion headers, as well as a mapping"},{"line_number":118,"context_line":"    reference. The function will iterate through the mappings rules to find"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIRI%3D","line":115,"in_reply_to":"AAAAUH%2F%2BI2c%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    \"\"\"Transform assertion to a list of identity values based on a mapping:"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    This function will take as input, assertion headers, as well as a mapping"},{"line_number":118,"context_line":"    reference. The function will iterate through the mappings rules to find"},{"line_number":119,"context_line":"    assertions that may be matched to a rule."},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI2Q%3D","line":117,"updated":"2014-01-29 20:02:44.000000000","message":"remove , s\n\nthis first sentence is obvious from the parameters to the function.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    \"\"\"Transform assertion to a list of identity values based on a mapping:"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    This function will take as input, assertion headers, as well as a mapping"},{"line_number":118,"context_line":"    reference. The function will iterate through the mappings rules to find"},{"line_number":119,"context_line":"    assertions that may be matched to a rule."},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIQ4%3D","line":117,"in_reply_to":"AAAAUH%2F%2BI2Q%3D","updated":"2014-01-30 06:46:35.000000000","message":"I removed the first sentence entirely","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    This function will take as input, assertion headers, as well as a mapping"},{"line_number":118,"context_line":"    reference. The function will iterate through the mappings rules to find"},{"line_number":119,"context_line":"    assertions that may be matched to a rule."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    \"\"\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI1M%3D","line":120,"updated":"2014-01-29 20:02:44.000000000","message":"should document the format of the returned data.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    This function will take as input, assertion headers, as well as a mapping"},{"line_number":118,"context_line":"    reference. The function will iterate through the mappings rules to find"},{"line_number":119,"context_line":"    assertions that may be matched to a rule."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    \"\"\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGXw%3D","line":120,"in_reply_to":"AAAAUH%2F%2BI1M%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    \"\"\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":126,"context_line":"    identity_values \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI14%3D","line":123,"updated":"2014-01-29 20:02:44.000000000","message":"would be nice to have in the docstring an explanation of what assertion is supposed to be.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    \"\"\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":126,"context_line":"    identity_values \u003d []"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGXs%3D","line":123,"in_reply_to":"AAAAUH%2F%2BI14%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":126,"context_line":"    identity_values \u003d []"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    for rule in rules:"},{"line_number":129,"context_line":"        # Go through the remote requirements and compare against the assertion"},{"line_number":130,"context_line":"        # _verify_all_requirements will return a tuple, of (Boolean, Array)"},{"line_number":131,"context_line":"        # The boolean will state whether the requirement is valid or not."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI1Y%3D","line":128,"updated":"2014-01-29 20:02:44.000000000","message":"\u0027rules\u0027 might be None here (see line 124), in which case this would fail.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":126,"context_line":"    identity_values \u003d []"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    for rule in rules:"},{"line_number":129,"context_line":"        # Go through the remote requirements and compare against the assertion"},{"line_number":130,"context_line":"        # _verify_all_requirements will return a tuple, of (Boolean, Array)"},{"line_number":131,"context_line":"        # The boolean will state whether the requirement is valid or not."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGXo%3D","line":128,"in_reply_to":"AAAAUH%2F%2BI1Y%3D","updated":"2014-01-30 06:46:35.000000000","message":"actually, i think the schema ensures that a rules object should exist.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # Go through the remote requirements and compare against the assertion"},{"line_number":130,"context_line":"        # _verify_all_requirements will return a tuple, of (Boolean, Array)"},{"line_number":131,"context_line":"        # The boolean will state whether the requirement is valid or not."},{"line_number":132,"context_line":"        # The array will store the value *in order* to be directly mapped"},{"line_number":133,"context_line":"        req_valid, direct_maps \u003d _verify_all_requirements(rule.get(\u0027remote\u0027),"},{"line_number":134,"context_line":"                                                          assertion_data)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI0c%3D","line":132,"updated":"2014-01-29 20:02:44.000000000","message":"this comment would make an excellent docstring for _verify_all_requirements.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # Go through the remote requirements and compare against the assertion"},{"line_number":130,"context_line":"        # _verify_all_requirements will return a tuple, of (Boolean, Array)"},{"line_number":131,"context_line":"        # The boolean will state whether the requirement is valid or not."},{"line_number":132,"context_line":"        # The array will store the value *in order* to be directly mapped"},{"line_number":133,"context_line":"        req_valid, direct_maps \u003d _verify_all_requirements(rule.get(\u0027remote\u0027),"},{"line_number":134,"context_line":"                                                          assertion_data)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGXI%3D","line":132,"in_reply_to":"AAAAUH%2F%2BI0c%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            identity_values +\u003d local"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            flat \u003d jsonutils.dumps(local)"},{"line_number":150,"context_line":"            for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":151,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":152,"context_line":"                flat \u003d flat.replace(target, value)"},{"line_number":153,"context_line":"            ref \u003d jsonutils.loads(flat)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIz8%3D","line":150,"updated":"2014-01-29 20:02:44.000000000","message":"why reversed?","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9cb2530e4d25dad8d868b9e74a8f86d82699f1a6","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            identity_values +\u003d local"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            flat \u003d jsonutils.dumps(local)"},{"line_number":150,"context_line":"            for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":151,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":152,"context_line":"                flat \u003d flat.replace(target, value)"},{"line_number":153,"context_line":"            ref \u003d jsonutils.loads(flat)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BImk%3D","line":150,"in_reply_to":"AAAAUH%2F%2BIpo%3D","updated":"2014-01-29 20:35:45.000000000","message":"add a comment to explain that.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            identity_values +\u003d local"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            flat \u003d jsonutils.dumps(local)"},{"line_number":150,"context_line":"            for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":151,"context_line":"                target \u003d \"$%s\" % counter"},{"line_number":152,"context_line":"                flat \u003d flat.replace(target, value)"},{"line_number":153,"context_line":"            ref \u003d jsonutils.loads(flat)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIpo%3D","line":150,"in_reply_to":"AAAAUH%2F%2BIz8%3D","updated":"2014-01-29 20:30:25.000000000","message":"to replace $0, $1, ... $10, $11, and so forth correctly,\notherwise I run the risk of replace $11 with the $1 value.\n\nif using string replacement","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        rtype \u003d requirement[\u0027type\u0027]"},{"line_number":164,"context_line":"        regex \u003d requirement.get(\u0027regex\u0027, False)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        # case where any_one_of is seen"},{"line_number":167,"context_line":"        any_one_values \u003d requirement.get(\u0027any_one_of\u0027)"},{"line_number":168,"context_line":"        if any_one_values:"},{"line_number":169,"context_line":"            if not _eval_req(any_one_values, rtype,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIzY%3D","line":166,"updated":"2014-01-29 20:02:44.000000000","message":"this is obvious, remove it.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        rtype \u003d requirement[\u0027type\u0027]"},{"line_number":164,"context_line":"        regex \u003d requirement.get(\u0027regex\u0027, False)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        # case where any_one_of is seen"},{"line_number":167,"context_line":"        any_one_values \u003d requirement.get(\u0027any_one_of\u0027)"},{"line_number":168,"context_line":"        if any_one_values:"},{"line_number":169,"context_line":"            if not _eval_req(any_one_values, rtype,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIpk%3D","line":166,"in_reply_to":"AAAAUH%2F%2BIzY%3D","updated":"2014-01-29 20:30:25.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        any_one_values \u003d requirement.get(\u0027any_one_of\u0027)"},{"line_number":168,"context_line":"        if any_one_values:"},{"line_number":169,"context_line":"            if not _eval_req(any_one_values, rtype,"},{"line_number":170,"context_line":"                             assertion_data, True, regex):"},{"line_number":171,"context_line":"                return (False, [])"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        # case where not_any_of is seen"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIyc%3D","line":170,"updated":"2014-01-29 20:02:44.000000000","message":"suggest use an enumeration here rather than True/False for readability.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9cb2530e4d25dad8d868b9e74a8f86d82699f1a6","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        any_one_values \u003d requirement.get(\u0027any_one_of\u0027)"},{"line_number":168,"context_line":"        if any_one_values:"},{"line_number":169,"context_line":"            if not _eval_req(any_one_values, rtype,"},{"line_number":170,"context_line":"                             assertion_data, True, regex):"},{"line_number":171,"context_line":"                return (False, [])"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        # case where not_any_of is seen"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BImQ%3D","line":170,"in_reply_to":"AAAAUH%2F%2BIng%3D","updated":"2014-01-29 20:35:45.000000000","message":"Reviewers looking at this function call have no idea that True means \"any_one_of\" -- so rather than pass True, pass something like EvalType.ANY_ONE_OF , and then at line 177 you\u0027d pass something like EvalType.NOT_ANY_OF\n\nEvalType.ANY_ONE_OF could be set to \u0027any_one_of\u0027, and then you could also use it at line 167.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        any_one_values \u003d requirement.get(\u0027any_one_of\u0027)"},{"line_number":168,"context_line":"        if any_one_values:"},{"line_number":169,"context_line":"            if not _eval_req(any_one_values, rtype,"},{"line_number":170,"context_line":"                             assertion_data, True, regex):"},{"line_number":171,"context_line":"                return (False, [])"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        # case where not_any_of is seen"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIng%3D","line":170,"in_reply_to":"AAAAUH%2F%2BIyc%3D","updated":"2014-01-29 20:30:25.000000000","message":"can i get more info here?","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                             assertion_data, True, regex):"},{"line_number":171,"context_line":"                return (False, [])"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        # case where not_any_of is seen"},{"line_number":174,"context_line":"        not_any_values \u003d requirement.get(\u0027not_any_of\u0027)"},{"line_number":175,"context_line":"        if not_any_values:"},{"line_number":176,"context_line":"            if not _eval_req(not_any_values, rtype,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIzM%3D","line":173,"updated":"2014-01-29 20:02:44.000000000","message":"this is obvious, remove it.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                             assertion_data, True, regex):"},{"line_number":171,"context_line":"                return (False, [])"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        # case where not_any_of is seen"},{"line_number":174,"context_line":"        not_any_values \u003d requirement.get(\u0027not_any_of\u0027)"},{"line_number":175,"context_line":"        if not_any_values:"},{"line_number":176,"context_line":"            if not _eval_req(not_any_values, rtype,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIpM%3D","line":173,"in_reply_to":"AAAAUH%2F%2BIzM%3D","updated":"2014-01-29 20:30:25.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        not_any_values \u003d requirement.get(\u0027not_any_of\u0027)"},{"line_number":175,"context_line":"        if not_any_values:"},{"line_number":176,"context_line":"            if not _eval_req(not_any_values, rtype,"},{"line_number":177,"context_line":"                             assertion_data, False, regex):"},{"line_number":178,"context_line":"                return (False, [])"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # neither case, so it\u0027s a direct mapping"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIyU%3D","line":177,"updated":"2014-01-29 20:02:44.000000000","message":"suggest use an enumeration here rather than True/False for readability.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        not_any_values \u003d requirement.get(\u0027not_any_of\u0027)"},{"line_number":175,"context_line":"        if not_any_values:"},{"line_number":176,"context_line":"            if not _eval_req(not_any_values, rtype,"},{"line_number":177,"context_line":"                             assertion_data, False, regex):"},{"line_number":178,"context_line":"                return (False, [])"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # neither case, so it\u0027s a direct mapping"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGTY%3D","line":177,"in_reply_to":"AAAAUH%2F%2BIyU%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            if direct_map_value:"},{"line_number":184,"context_line":"                direct_maps +\u003d direct_map_value"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    return (True, direct_maps)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def _eval_req(values, rtype, assertion_data, any_one_of, regex):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIxM%3D","line":186,"updated":"2014-01-29 20:02:44.000000000","message":"seems like the caller can tell if it\u0027s True/False by the direct_maps already... since it\u0027s always False if the second parameter is [] and otherwise True... so could simplify this and return None or a list rather than a tuple.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            if direct_map_value:"},{"line_number":184,"context_line":"                direct_maps +\u003d direct_map_value"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    return (True, direct_maps)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def _eval_req(values, rtype, assertion_data, any_one_of, regex):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGHg%3D","line":186,"in_reply_to":"AAAAUH%2F%2BIxM%3D","updated":"2014-01-30 06:46:35.000000000","message":"thank you very much, I was hoping someone could find a way to simplify that!","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":994,"name":"Arvind Tiwari","email":"arvindt7@gmail.com","username":"arvind-tiwari"},"change_message_id":"a2c6cd0bcd2af528b7f87b861031a113164a79e4","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    return (True, direct_maps)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def _eval_req(values, rtype, assertion_data, any_one_of, regex):"},{"line_number":190,"context_line":"    assertion_values \u003d assertion_data.get(rtype)"},{"line_number":191,"context_line":"    if assertion_values:"},{"line_number":192,"context_line":"        if regex:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BQek%3D","line":189,"updated":"2014-01-28 16:28:28.000000000","message":"Please use full name for method as you did in line # 159\n\n_eval_req Vs  _verify_all_requirements","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    return (True, direct_maps)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def _eval_req(values, rtype, assertion_data, any_one_of, regex):"},{"line_number":190,"context_line":"    assertion_values \u003d assertion_data.get(rtype)"},{"line_number":191,"context_line":"    if assertion_values:"},{"line_number":192,"context_line":"        if regex:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGTU%3D","line":189,"in_reply_to":"AAAAUH%2F%2BQek%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def _eval_req(values, rtype, assertion_data, any_one_of, regex):"},{"line_number":190,"context_line":"    assertion_values \u003d assertion_data.get(rtype)"},{"line_number":191,"context_line":"    if assertion_values:"},{"line_number":192,"context_line":"        if regex:"},{"line_number":193,"context_line":"            if re.search(values[0], assertion_values[0]):"},{"line_number":194,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIw4%3D","line":191,"updated":"2014-01-29 20:02:44.000000000","message":"suggest\n\n if not assertion_values:\n    return False\n\nthen can unindent several lines.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"def _eval_req(values, rtype, assertion_data, any_one_of, regex):"},{"line_number":190,"context_line":"    assertion_values \u003d assertion_data.get(rtype)"},{"line_number":191,"context_line":"    if assertion_values:"},{"line_number":192,"context_line":"        if regex:"},{"line_number":193,"context_line":"            if re.search(values[0], assertion_values[0]):"},{"line_number":194,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGTM%3D","line":191,"in_reply_to":"AAAAUH%2F%2BIw4%3D","updated":"2014-01-30 06:46:35.000000000","message":"Thanks, that looks MUCH cleaner now.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"297355590d71e6545b67751a68c1a885d006c4d7","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    assertion_values \u003d assertion_data.get(rtype)"},{"line_number":191,"context_line":"    if assertion_values:"},{"line_number":192,"context_line":"        if regex:"},{"line_number":193,"context_line":"            if re.search(values[0], assertion_values[0]):"},{"line_number":194,"context_line":"                return True"},{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BR68%3D","line":193,"updated":"2014-01-28 13:10:40.000000000","message":"Maybe it\u0027s worth watching for some exceptions here? What happens now if somebody puts invalid regex in his/her request? Will it be validated by the jsonschema?","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            if re.search(values[0], assertion_values[0]):"},{"line_number":194,"context_line":"                return True"},{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                return False"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        intersection \u003d set(values).intersection(set(assertion_values))"},{"line_number":199,"context_line":"        if intersection and any_one_of:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIwE%3D","line":196,"updated":"2014-01-29 20:02:44.000000000","message":"suggest change 193-196 to\n\n return re.search(values[0], assertion_values[0])","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            if re.search(values[0], assertion_values[0]):"},{"line_number":194,"context_line":"                return True"},{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                return False"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        intersection \u003d set(values).intersection(set(assertion_values))"},{"line_number":199,"context_line":"        if intersection and any_one_of:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIo8%3D","line":196,"in_reply_to":"AAAAUH%2F%2BIwE%3D","updated":"2014-01-29 20:30:25.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        intersection \u003d set(values).intersection(set(assertion_values))"},{"line_number":199,"context_line":"        if intersection and any_one_of:"},{"line_number":200,"context_line":"            return True"},{"line_number":201,"context_line":"        elif len(intersection) \u003d\u003d 0 and not any_one_of:"},{"line_number":202,"context_line":"            return True"},{"line_number":203,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIv8%3D","line":201,"updated":"2014-01-29 20:02:44.000000000","message":"change \"len(intersection) \u003d\u003d 0\" to \"(not intersection)\". it\u0027s more efficient to not calculate the length.\n\nalso change elif to if since just returned anyways.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        intersection \u003d set(values).intersection(set(assertion_values))"},{"line_number":199,"context_line":"        if intersection and any_one_of:"},{"line_number":200,"context_line":"            return True"},{"line_number":201,"context_line":"        elif len(intersection) \u003d\u003d 0 and not any_one_of:"},{"line_number":202,"context_line":"            return True"},{"line_number":203,"context_line":"    return False"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIo0%3D","line":201,"in_reply_to":"AAAAUH%2F%2BIv8%3D","updated":"2014-01-29 20:30:25.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class EvalType(object):"},{"line_number":113,"context_line":"    \"\"\"Store evaluation types used in mapping rules.\"\"\""},{"line_number":114,"context_line":"    ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":115,"context_line":"    NOT_ANY_OF \u003d \u0027not_any_of\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB9s%3D","line":112,"updated":"2014-01-30 20:58:58.000000000","message":"This isn\u0027t used outside of AssertionProcessor, so suggest move it in there. Also, prefix with _ since it\u0027s not public.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class EvalType(object):"},{"line_number":113,"context_line":"    \"\"\"Store evaluation types used in mapping rules.\"\"\""},{"line_number":114,"context_line":"    ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":115,"context_line":"    NOT_ANY_OF \u003d \u0027not_any_of\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBxM%3D","line":112,"in_reply_to":"AAAAUH%2F%2BB9s%3D","updated":"2014-01-30 21:26:38.000000000","message":"Done","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class EvalType(object):"},{"line_number":113,"context_line":"    \"\"\"Store evaluation types used in mapping rules.\"\"\""},{"line_number":114,"context_line":"    ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":115,"context_line":"    NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB9g%3D","line":113,"updated":"2014-01-30 20:58:58.000000000","message":"Is \"Store\" a verb here? This comment doesn\u0027t make sense. How about\n\n Mapping rule evaluation types\n\n?","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class EvalType(object):"},{"line_number":113,"context_line":"    \"\"\"Store evaluation types used in mapping rules.\"\"\""},{"line_number":114,"context_line":"    ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":115,"context_line":"    NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBxQ%3D","line":113,"in_reply_to":"AAAAUH%2F%2BB9g%3D","updated":"2014-01-30 21:26:38.000000000","message":"Done","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                \u0027orgPersonType\u0027: \u0027Tester;\u0027"},{"line_number":134,"context_line":"            }"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        The returned data would be an array of local objects from the"},{"line_number":137,"context_line":"        rules that were matched, for example:"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        [{\u0027group\u0027: {\u0027id\u0027: \u00270cd5e9\u0027}, \u0027user\u0027: {\u0027email\u0027: \u0027bob@example.com\u0027}}]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB8k%3D","line":136,"updated":"2014-01-30 20:58:58.000000000","message":"change \"would be\" to \"is\".","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                \u0027orgPersonType\u0027: \u0027Tester;\u0027"},{"line_number":134,"context_line":"            }"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        The returned data would be an array of local objects from the"},{"line_number":137,"context_line":"        rules that were matched, for example:"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        [{\u0027group\u0027: {\u0027id\u0027: \u00270cd5e9\u0027}, \u0027user\u0027: {\u0027email\u0027: \u0027bob@example.com\u0027}}]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBx0%3D","line":136,"in_reply_to":"AAAAUH%2F%2BB8k%3D","updated":"2014-01-30 21:26:38.000000000","message":"I think I use that wording in a few other spots, I\u0027ll fix it up","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":150,"context_line":"        identity_values \u003d []"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        for rule in rules:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB9A%3D","line":149,"updated":"2014-01-30 20:58:58.000000000","message":"if this \"rules\" is always going to be in mapping_ref, then use mapping_ref[\u0027rules\u0027], because if it\u0027s not there then it\u0027ll fail at 152 instead of here.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        assertion_data \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        rules \u003d mapping_ref.get(\u0027rules\u0027)"},{"line_number":150,"context_line":"        identity_values \u003d []"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        for rule in rules:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBxY%3D","line":149,"in_reply_to":"AAAAUH%2F%2BB9A%3D","updated":"2014-01-30 21:26:38.000000000","message":"Done","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            direct_maps \u003d self._verify_all_requirements(rule.get(\u0027remote\u0027),"},{"line_number":154,"context_line":"                                                        assertion_data)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            # If the compare comes back as None, go on to the next rule."},{"line_number":157,"context_line":"            if direct_maps is None:"},{"line_number":158,"context_line":"                continue"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB2Y%3D","line":156,"updated":"2014-01-30 20:58:58.000000000","message":"we know this already because we can read the code... what we need to know is why.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            direct_maps \u003d self._verify_all_requirements(rule.get(\u0027remote\u0027),"},{"line_number":154,"context_line":"                                                        assertion_data)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            # If the compare comes back as None, go on to the next rule."},{"line_number":157,"context_line":"            if direct_maps is None:"},{"line_number":158,"context_line":"                continue"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBw4%3D","line":156,"in_reply_to":"AAAAUH%2F%2BB2Y%3D","updated":"2014-01-30 21:26:38.000000000","message":"# If the compare comes back as None, then the rule did not apply to the assertion data, go on to the next rule \n\n?","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            # of saved values."},{"line_number":164,"context_line":"            if not direct_maps:"},{"line_number":165,"context_line":"                identity_values +\u003d local"},{"line_number":166,"context_line":"            # However, if there is direct mapping, then we need to perform"},{"line_number":167,"context_line":"            # variable replacement."},{"line_number":168,"context_line":"            else:"},{"line_number":169,"context_line":"                flat \u003d jsonutils.dumps(local)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB10%3D","line":166,"updated":"2014-01-30 20:58:58.000000000","message":"suggest have a function replace_variables.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            # of saved values."},{"line_number":164,"context_line":"            if not direct_maps:"},{"line_number":165,"context_line":"                identity_values +\u003d local"},{"line_number":166,"context_line":"            # However, if there is direct mapping, then we need to perform"},{"line_number":167,"context_line":"            # variable replacement."},{"line_number":168,"context_line":"            else:"},{"line_number":169,"context_line":"                flat \u003d jsonutils.dumps(local)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBww%3D","line":166,"in_reply_to":"AAAAUH%2F%2BB10%3D","updated":"2014-01-30 21:26:38.000000000","message":"good idea","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                # replace that with the value from $1."},{"line_number":173,"context_line":"                for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":174,"context_line":"                    target \u003d \"$%s\" % counter"},{"line_number":175,"context_line":"                    flat \u003d flat.replace(target, value)"},{"line_number":176,"context_line":"                ref \u003d jsonutils.loads(flat)"},{"line_number":177,"context_line":"                identity_values +\u003d ref"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB3c%3D","line":175,"updated":"2014-01-30 20:58:58.000000000","message":"seems like this would be a lot easier if we used a format string that python handles already... for example, http://docs.python.org/2/library/string.html#format-string-syntax ... is it too late to switch?","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                # replace that with the value from $1."},{"line_number":173,"context_line":"                for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":174,"context_line":"                    target \u003d \"$%s\" % counter"},{"line_number":175,"context_line":"                    flat \u003d flat.replace(target, value)"},{"line_number":176,"context_line":"                ref \u003d jsonutils.loads(flat)"},{"line_number":177,"context_line":"                identity_values +\u003d ref"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBvc%3D","line":175,"in_reply_to":"AAAAUH%2F%2BB3c%3D","updated":"2014-01-30 21:26:38.000000000","message":"I think that would be better, but we would need to change the API spec to be {0} instead of $0. \n\nI think doing this for now is OK, it should work fine. But we can kindly ask Dolph for permission to change the API spec, and the function in another patch.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        return identity_values"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _verify_all_requirements(self, requirements, assertion_data):"},{"line_number":182,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        The return value will be an array or None."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB9I%3D","line":181,"updated":"2014-01-30 20:58:58.000000000","message":"rather than pass assertion_data around to the different functions, how about make it a member variable?\n\nSince it\u0027s created right away in process, maybe pass in assertion to the constructor and build assertion_data there.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        return identity_values"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def _verify_all_requirements(self, requirements, assertion_data):"},{"line_number":182,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        The return value will be an array or None."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BBsc%3D","line":181,"in_reply_to":"AAAAUH%2F%2BB9I%3D","updated":"2014-01-30 21:26:38.000000000","message":"Done","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def _verify_all_requirements(self, requirements, assertion_data):"},{"line_number":182,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        The return value will be an array or None."},{"line_number":185,"context_line":"        If a value of None is returned, then go on to the next rule."},{"line_number":186,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":187,"context_line":"        mappings to be performed."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB4E%3D","line":184,"updated":"2014-01-30 20:58:58.000000000","message":"Since the docstring format has a format for this, suggest use it\n\n :returns: an array of xxx or None.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def _verify_all_requirements(self, requirements, assertion_data):"},{"line_number":182,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        The return value will be an array or None."},{"line_number":185,"context_line":"        If a value of None is returned, then go on to the next rule."},{"line_number":186,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":187,"context_line":"        mappings to be performed."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BByM%3D","line":184,"in_reply_to":"AAAAUH%2F%2BB4E%3D","updated":"2014-01-30 21:26:38.000000000","message":":returns: an array of local objects or None","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        return direct_maps"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def _evaluate_requirement(self, values, rtype, assertion_data,"},{"line_number":222,"context_line":"                              eval_type, regex):"},{"line_number":223,"context_line":"        \"\"\"Evaluate the incoming requirement and assertion."},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB74%3D","line":221,"updated":"2014-01-30 20:58:58.000000000","message":"suggest change \"rtype\" to \"requirement_type\", then it will be more obvious that this is the argument that the docstring is referring to.","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        return direct_maps"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def _evaluate_requirement(self, values, rtype, assertion_data,"},{"line_number":222,"context_line":"                              eval_type, regex):"},{"line_number":223,"context_line":"        \"\"\"Evaluate the incoming requirement and assertion."},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BByY%3D","line":221,"in_reply_to":"AAAAUH%2F%2BB74%3D","updated":"2014-01-30 21:26:38.000000000","message":"Done","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b746c874e715961d8a02dfc9c99fc249bbc035ab","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        if regex:"},{"line_number":237,"context_line":"            return re.search(values[0], assertion_values[0])"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        intersection \u003d set(values).intersection(set(assertion_values))"},{"line_number":240,"context_line":"        if intersection and eval_type \u003d\u003d EvalType.ANY_ONE_OF:"},{"line_number":241,"context_line":"            return True"},{"line_number":242,"context_line":"        if not intersection and eval_type \u003d\u003d EvalType.NOT_ANY_OF:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BB7c%3D","line":239,"updated":"2014-01-30 20:58:58.000000000","message":"suggest call this \"common_values\" or \"matched_values\" ?\n\nsince going to use this as a boolean, could do\n\n any_match \u003d bool(set(values).intersection(set(assertion_values)))","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f9f2430324b1e09692bb68558e6eba16f82c9087","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        if regex:"},{"line_number":237,"context_line":"            return re.search(values[0], assertion_values[0])"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        intersection \u003d set(values).intersection(set(assertion_values))"},{"line_number":240,"context_line":"        if intersection and eval_type \u003d\u003d EvalType.ANY_ONE_OF:"},{"line_number":241,"context_line":"            return True"},{"line_number":242,"context_line":"        if not intersection and eval_type \u003d\u003d EvalType.NOT_ANY_OF:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BByU%3D","line":239,"in_reply_to":"AAAAUH%2F%2BB7c%3D","updated":"2014-01-30 21:26:38.000000000","message":"Done","commit_id":"7f0a7ed7f1843b004856d2fee9f2cdb85aa22770"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"add12b68f7c3257346188e79c1795ca8ae9a6b3e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            or if there is more than one local property:"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        [{\u0027group\u0027: {\u0027id\u0027: \u0027123\u0027}}, {\u0027group\u0027: {\u0027id\u0027: \u0027xyz\u0027}}]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        rules \u003d mapping_ref[\u0027rules\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BBFA%3D","line":146,"updated":"2014-01-30 23:38:28.000000000","message":"(NIT): add docstrings here for mapping_ref and the return value/description of identity_values","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"93c133b765508bc5a1e6729ccf2fad84c173b676","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            or if there is more than one local property:"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        [{\u0027group\u0027: {\u0027id\u0027: \u0027123\u0027}}, {\u0027group\u0027: {\u0027id\u0027: \u0027xyz\u0027}}]"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        rules \u003d mapping_ref[\u0027rules\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BA7E%3D","line":146,"in_reply_to":"AAAAUH%2F%2BBFA%3D","updated":"2014-01-30 23:43:39.000000000","message":"oh right, thanks ldbragst!\n\nI should move the description of the assertion up a few lines to the __init__\n\nand yes, I\u0027ll see what I can do about describing a mapping_ref, might be easier to point to an example in the fixtures file.\n\ni\u0027ll add a return too","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"6c7bf9a4019af9053aca606143b02b8d4f70c9b8","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # the local values are greater than $10, then we will not"},{"line_number":185,"context_line":"        # replace that with the value from $1."},{"line_number":186,"context_line":"        for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":187,"context_line":"            target \u003d \"$%s\" % counter"},{"line_number":188,"context_line":"            flat \u003d flat.replace(target, value)"},{"line_number":189,"context_line":"        return jsonutils.loads(flat)"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BA70%3D","line":187,"updated":"2014-01-30 23:49:10.000000000","message":"(nit) use \u0027 for strings.","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"9f2bf9bbf6f50b3debe506434857734c71a4145a","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # the local values are greater than $10, then we will not"},{"line_number":185,"context_line":"        # replace that with the value from $1."},{"line_number":186,"context_line":"        for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":187,"context_line":"            target \u003d \"$%s\" % counter"},{"line_number":188,"context_line":"            flat \u003d flat.replace(target, value)"},{"line_number":189,"context_line":"        return jsonutils.loads(flat)"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BAkk%3D","line":187,"in_reply_to":"AAAAUH%2F%2BA70%3D","updated":"2014-01-31 01:25:32.000000000","message":"Done","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"6c7bf9a4019af9053aca606143b02b8d4f70c9b8","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":187,"context_line":"            target \u003d \"$%s\" % counter"},{"line_number":188,"context_line":"            flat \u003d flat.replace(target, value)"},{"line_number":189,"context_line":"        return jsonutils.loads(flat)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":192,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BA7Q%3D","line":189,"updated":"2014-01-30 23:49:10.000000000","message":"this needs to handle potentially invalid JSON.","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"9f2bf9bbf6f50b3debe506434857734c71a4145a","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        for (counter, value) in reversed(list(enumerate(direct_maps))):"},{"line_number":187,"context_line":"            target \u003d \"$%s\" % counter"},{"line_number":188,"context_line":"            flat \u003d flat.replace(target, value)"},{"line_number":189,"context_line":"        return jsonutils.loads(flat)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":192,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BAis%3D","line":189,"in_reply_to":"AAAAUH%2F%2BA7Q%3D","updated":"2014-01-31 01:25:32.000000000","message":"I can add a try/except block to catch a problem with json loads.\nBut what should happen in the except case?","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"6c7bf9a4019af9053aca606143b02b8d4f70c9b8","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":192,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        :returns: an array of local objects or None."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        \"\"\""},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BA68%3D","line":194,"updated":"2014-01-30 23:49:10.000000000","message":"what happened to the rest of the docs that explained what None meant (for example)","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"9f2bf9bbf6f50b3debe506434857734c71a4145a","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":192,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        :returns: an array of local objects or None."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        \"\"\""},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BAko%3D","line":194,"in_reply_to":"AAAAUH%2F%2BA68%3D","updated":"2014-01-31 01:25:32.000000000","message":"I\u0027ll add them back.","commit_id":"63f4c37a7889434c753a70ab1a2b9f79907b21c4"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"9f09f7ad0bfe7fb6453b0d61a7488e40e98f9269","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":118,"context_line":"        NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, assertion):"},{"line_number":121,"context_line":"        \"\"\"Initialize assertion data"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        An incoming assertion looks like:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9974%3D","line":120,"updated":"2014-01-31 15:31:20.000000000","message":"Any particular reason why now the assertion is passed to the __init__? \n1) I liked the process() method with both assertion and mapping_ref passed when the method was called. Thanks to that I could create an object in a controller and use it many times without constant creating/destroying the object.\n\n2) If you want to keep that structure I would switch the arguments. So you pass mapping_ref to __init__() and assertion to process(). Makes more sense to me - you are then creating object that will process some input (assertion in this case) basing on invariable rules.","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"00f7fe158c6ec77a23705072ca2ca04976e9be77","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":118,"context_line":"        NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self, assertion):"},{"line_number":121,"context_line":"        \"\"\"Initialize assertion data"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        An incoming assertion looks like:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9600%3D","line":120,"in_reply_to":"AAAAUH%2F9974%3D","updated":"2014-02-01 05:18:15.000000000","message":"As per the IRC convo, I think, we can keep it as-is for now? We can fix it up later depending on how you end up using it.","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"772f083bbbb7cb393909a200d226783bfb0a51dc","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        identity_values \u003d []"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        for rule in rules:"},{"line_number":163,"context_line":"            direct_maps \u003d self._verify_all_requirements(rule.get(\u0027remote\u0027))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"            # If the compare comes back as None, then the rule did not apply"},{"line_number":166,"context_line":"            # to the assertion data, go on to the next rule"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9%2BOk%3D","line":163,"updated":"2014-01-31 15:03:18.000000000","message":"If we are assuming that this has validated against the schema then should we use rule[\u0027remote] instead of .get?  To me the .get implies that it could return None and _verify_all_requirements can fail because it expects a list.","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"00f7fe158c6ec77a23705072ca2ca04976e9be77","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        identity_values \u003d []"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        for rule in rules:"},{"line_number":163,"context_line":"            direct_maps \u003d self._verify_all_requirements(rule.get(\u0027remote\u0027))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"            # If the compare comes back as None, then the rule did not apply"},{"line_number":166,"context_line":"            # to the assertion data, go on to the next rule"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9910%3D","line":163,"in_reply_to":"AAAAUH%2F9%2BOk%3D","updated":"2014-02-01 05:18:15.000000000","message":"agree, will use rule[\u0027remote\u0027]","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"772f083bbbb7cb393909a200d226783bfb0a51dc","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        try:"},{"line_number":201,"context_line":"            json_object \u003d jsonutils.loads(flat)"},{"line_number":202,"context_line":"        except ValueError:"},{"line_number":203,"context_line":"            return local"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            return json_object"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F9%2BP0%3D","line":202,"updated":"2014-01-31 15:03:18.000000000","message":"How can we have invalid JSON here?  We just dumped it from above and the substitutions won\u0027t make it invalid.  If this can be invalid can you add a test showing this behavior?","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9f024041d001f1d1b9644807348570801a005248","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        try:"},{"line_number":201,"context_line":"            json_object \u003d jsonutils.loads(flat)"},{"line_number":202,"context_line":"        except ValueError:"},{"line_number":203,"context_line":"            return local"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            return json_object"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F992o%3D","line":202,"in_reply_to":"AAAAUH%2F9%2BP0%3D","updated":"2014-01-31 15:38:16.000000000","message":"If the value that\u0027s substituted contains a \" then the JSON will be invalid.","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"00f7fe158c6ec77a23705072ca2ca04976e9be77","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        try:"},{"line_number":201,"context_line":"            json_object \u003d jsonutils.loads(flat)"},{"line_number":202,"context_line":"        except ValueError:"},{"line_number":203,"context_line":"            return local"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            return json_object"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F960w%3D","line":202,"in_reply_to":"AAAAUH%2F992o%3D","updated":"2014-02-01 05:18:15.000000000","message":"Replacing this with a mix of recursive calls and .format.","commit_id":"bb5f16d96107eda250b78df5fb0c07a8c34074e1"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"30a37d4c4c83925f32508a7df8c751071365874a","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":117,"context_line":"        NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def __init__(self, assertion):"},{"line_number":120,"context_line":"        \"\"\"Initialize assertion data"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        An incoming assertion looks like:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9va4%3D","line":119,"updated":"2014-02-04 14:05:40.000000000","message":"the API on this class is backwards. initialize the assertion processor with a mapping:\n\n def __init__(self, mapping_ref)\n\nand then hand it assertions to process:\n\n def process(assertion)\n\nor:\n\n def process(assertions)\n\nand the output of a single assertion processor should be user attributes (including a list of groups):\n\n print assertion_processor.user\n {\"name\": \"foobar\", groups: [{\"id\": \"abc123\"}, {\"id\": \"def456\"}]}\n\nthe semantics / approach of this last step i care a bit less about, but the above would make token generation much easier.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"fd0c960423eccd4d251121c7cc41695d77ddcf04","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":117,"context_line":"        NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def __init__(self, assertion):"},{"line_number":120,"context_line":"        \"\"\"Initialize assertion data"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        An incoming assertion looks like:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9vYQ%3D","line":119,"in_reply_to":"AAAAUH%2F9va4%3D","updated":"2014-02-04 14:10:25.000000000","message":"++","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f5bc854687f60baf8681c1a4ea792000e3fd7604","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        ANY_ONE_OF \u003d \u0027any_one_of\u0027"},{"line_number":117,"context_line":"        NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def __init__(self, assertion):"},{"line_number":120,"context_line":"        \"\"\"Initialize assertion data"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        An incoming assertion looks like:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9tbo%3D","line":119,"in_reply_to":"AAAAUH%2F9va4%3D","updated":"2014-02-04 19:13:28.000000000","message":"OK, I can swap the way it\u0027s initialized, but I think one assertion is best. \n\nI liked the way it was before, because it just kept track of all the \"local\" objects. \n\nNow, it seems like I need to prep for token consumption, too, which will greatly restrict things.\n\nAlso, if we are going to assume a user exists, then we need to enforce that. So, just users and groups?","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def __init__(self, assertion):"},{"line_number":120,"context_line":"        \"\"\"Initialize assertion data"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        An incoming assertion looks like:"},{"line_number":123,"context_line":"            {"},{"line_number":124,"context_line":"                \u0027Email\u0027: \u0027testacct@example.com\u0027,"},{"line_number":125,"context_line":"                \u0027UserName\u0027: \u0027testacct\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ygw%3D","line":122,"updated":"2014-02-03 23:25:59.000000000","message":"change : to ::\n\nand add a newline.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def __init__(self, assertion):"},{"line_number":120,"context_line":"        \"\"\"Initialize assertion data"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        An incoming assertion looks like:"},{"line_number":123,"context_line":"            {"},{"line_number":124,"context_line":"                \u0027Email\u0027: \u0027testacct@example.com\u0027,"},{"line_number":125,"context_line":"                \u0027UserName\u0027: \u0027testacct\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s30%3D","line":122,"in_reply_to":"AAAAUH%2F9ygw%3D","updated":"2014-02-04 20:53:06.000000000","message":"Done","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        The function will iterate through the mappings rules to find"},{"line_number":139,"context_line":"        assertions that may be matched to a rule."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        Example mappings can be found in tests/mapping_fixtures"},{"line_number":142,"context_line":"        :param mapping_ref: existing mapping ref"},{"line_number":143,"context_line":"        :type mapping_ref: dict"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yg0%3D","line":141,"updated":"2014-02-03 23:25:59.000000000","message":"I\u0027m guessing there needs to be a blank line between this and the parameters. Run tox -e docs.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        The function will iterate through the mappings rules to find"},{"line_number":139,"context_line":"        assertions that may be matched to a rule."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        Example mappings can be found in tests/mapping_fixtures"},{"line_number":142,"context_line":"        :param mapping_ref: existing mapping ref"},{"line_number":143,"context_line":"        :type mapping_ref: dict"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s3s%3D","line":141,"in_reply_to":"AAAAUH%2F9yg0%3D","updated":"2014-02-04 20:53:06.000000000","message":"Done","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        identity_values \u003d []"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        for rule in rules:"},{"line_number":162,"context_line":"            direct_maps \u003d self._verify_all_requirements(rule.get(\u0027remote\u0027))"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            # If the compare comes back as None, then the rule did not apply"},{"line_number":165,"context_line":"            # to the assertion data, go on to the next rule"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yT4%3D","line":162,"updated":"2014-02-03 23:25:59.000000000","message":"\"rule.get(\u0027remote\u0027)\" should be \"rule[\u0027remote\u0027]\" since _verify_all_requirements doesn\u0027t work with a None argument.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        identity_values \u003d []"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        for rule in rules:"},{"line_number":162,"context_line":"            direct_maps \u003d self._verify_all_requirements(rule.get(\u0027remote\u0027))"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            # If the compare comes back as None, then the rule did not apply"},{"line_number":165,"context_line":"            # to the assertion data, go on to the next rule"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s3c%3D","line":162,"in_reply_to":"AAAAUH%2F9yT4%3D","updated":"2014-02-04 20:53:06.000000000","message":"Done","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                continue"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"            # Otherwise, the compare is valid, get the local rule"},{"line_number":170,"context_line":"            local_array \u003d rule.get(\u0027local\u0027)"},{"line_number":171,"context_line":"            # If there is no direct mapping, then add it directly to the array"},{"line_number":172,"context_line":"            # of saved values."},{"line_number":173,"context_line":"            if not direct_maps:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yUQ%3D","line":170,"updated":"2014-02-03 23:25:59.000000000","message":"I\u0027m guessing this should be rule[\u0027local\u0027], since line 178 would fail if local_array was None.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cedf1cb2cb98ae3184427db9e0f373b098a11823","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return identity_values"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _replace_local_with_direct_maps(self, local, direct_maps):"},{"line_number":186,"context_line":"        \"\"\"Replace any $0, $1 ... values with data from the assertion."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        :returns: local type object with replaced values."},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F960k%3D","line":186,"updated":"2014-02-01 05:21:32.000000000","message":"gotta update $0, $1 to {0}, {1}","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        return identity_values"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _replace_local_with_direct_maps(self, local, direct_maps):"},{"line_number":186,"context_line":"        \"\"\"Replace any $0, $1 ... values with data from the assertion."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        :returns: local type object with replaced values."},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s3M%3D","line":186,"in_reply_to":"AAAAUH%2F960k%3D","updated":"2014-02-04 20:53:06.000000000","message":"Done","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def _replace_local_with_direct_maps(self, local, direct_maps):"},{"line_number":186,"context_line":"        \"\"\"Replace any $0, $1 ... values with data from the assertion."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        :returns: local type object with replaced values."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        \"\"\""},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yf4%3D","line":188,"updated":"2014-02-03 23:25:59.000000000","message":"what\u0027s a type object?","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def _replace_local_with_direct_maps(self, local, direct_maps):"},{"line_number":186,"context_line":"        \"\"\"Replace any $0, $1 ... values with data from the assertion."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        :returns: local type object with replaced values."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        \"\"\""},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s2w%3D","line":188,"in_reply_to":"AAAAUH%2F9yf4%3D","updated":"2014-02-04 20:53:06.000000000","message":":returns: local mapping reference with replaced values.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                v \u003d v.format(*direct_maps)"},{"line_number":197,"context_line":"            local[k] \u003d v"},{"line_number":198,"context_line":"        return local"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":201,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ygI%3D","line":198,"updated":"2014-02-03 23:25:59.000000000","message":"since this method is modifying `local` in-place there\u0027s no need to return it, and it\u0027s also confusing since a caller would typically not expect the input value to change.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            else:"},{"line_number":196,"context_line":"                v \u003d v.format(*direct_maps)"},{"line_number":197,"context_line":"            local[k] \u003d v"},{"line_number":198,"context_line":"        return local"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":201,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s08%3D","line":198,"in_reply_to":"AAAAUH%2F9ygI%3D","updated":"2014-02-04 20:53:06.000000000","message":"I changed it to make a new dict","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":200,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":201,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        If a value of None is returned, then go on to the next rule."},{"line_number":204,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":205,"context_line":"        mappings to be performed."},{"line_number":206,"context_line":"        If the array is positive value in length, then it will store the"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yfQ%3D","line":203,"updated":"2014-02-03 23:25:59.000000000","message":"Suggest change this to\n\n If a value of ``None`` is returned, this rule doesn\u0027t apply to the assertion data.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":200,"context_line":"    def _verify_all_requirements(self, requirements):"},{"line_number":201,"context_line":"        \"\"\"Go through the remote requirements and compare the assertion."},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        If a value of None is returned, then go on to the next rule."},{"line_number":204,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":205,"context_line":"        mappings to be performed."},{"line_number":206,"context_line":"        If the array is positive value in length, then it will store the"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s0c%3D","line":203,"in_reply_to":"AAAAUH%2F9yfQ%3D","updated":"2014-02-04 20:53:06.000000000","message":"Done","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        If a value of None is returned, then go on to the next rule."},{"line_number":204,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":205,"context_line":"        mappings to be performed."},{"line_number":206,"context_line":"        If the array is positive value in length, then it will store the"},{"line_number":207,"context_line":"        values *in order* to be directly mapped."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        :returns: array of local objects or None."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yVU%3D","line":206,"updated":"2014-02-03 23:25:59.000000000","message":"Suggest change \"If the array is positive value in length\" to \"Otherwise\", since the other 2 cases were already covered.","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        If a value of None is returned, then go on to the next rule."},{"line_number":204,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":205,"context_line":"        mappings to be performed."},{"line_number":206,"context_line":"        If the array is positive value in length, then it will store the"},{"line_number":207,"context_line":"        values *in order* to be directly mapped."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        :returns: array of local objects or None."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s0Y%3D","line":206,"in_reply_to":"AAAAUH%2F9yVU%3D","updated":"2014-02-04 20:53:06.000000000","message":"Done","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1b28bfaf690048ea8aab8e66c5626af46eb5f0a5","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        assertion values. Otherwise, grab the intersection of the values"},{"line_number":250,"context_line":"        and use that to compare against the evaluation type."},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        :returns: boolean, whether requirement if valid or not."},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        \"\"\""},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ySs%3D","line":252,"updated":"2014-02-03 23:25:59.000000000","message":"change \"if\" to \"is\"","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"74d440d8560347b4e22991f4beb3ce8b221337a7","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        assertion values. Otherwise, grab the intersection of the values"},{"line_number":250,"context_line":"        and use that to compare against the evaluation type."},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        :returns: boolean, whether requirement if valid or not."},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        \"\"\""},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9s0M%3D","line":252,"in_reply_to":"AAAAUH%2F9ySs%3D","updated":"2014-02-04 20:53:06.000000000","message":"Done","commit_id":"9dc51d879ec0e82395a9d9f52e817d13c9168f60"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"3a897c81891a61a3a87cbc58ffd082be28efa0ec","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                if not user_name:"},{"line_number":215,"context_line":"                    user_name \u003d x[\u0027user\u0027].get(\u0027email\u0027)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        return {\u0027name\u0027: user_name, \u0027groups\u0027: group_array}"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _update_local_mapping(self, local, direct_maps):"},{"line_number":220,"context_line":"        \"\"\"Replace any {0}, {1} ... values with data from the assertion."}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F9lhk%3D","line":217,"updated":"2014-02-05 20:57:09.000000000","message":"http://pasteraw.com/sykz4u7pkbnz7415csl63gzcmcswsrc","commit_id":"27c98093dcc4ec039c9a15dd467a7f199b93c076"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class AssertionProcessor(object):"},{"line_number":115,"context_line":"    \"\"\"A class to process assertions and mapping rules.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    class _EvalType(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jx0%3D","line":114,"updated":"2014-02-06 02:22:04.000000000","message":"wondering if this should be called RuleProcessor now that it\u0027s taking a rule as the argument.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4ee3255eb77c1f2dc7f3cfd40ce88cdeb99ad768","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class AssertionProcessor(object):"},{"line_number":115,"context_line":"    \"\"\"A class to process assertions and mapping rules.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    class _EvalType(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9fCQ%3D","line":114,"in_reply_to":"AAAAUH%2F9i%2FY%3D","updated":"2014-02-06 16:16:36.000000000","message":"I\u0027ll leave it up to you. MappingRuleProcessor sounds good.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5786fdfe4232b9c36c0e1c6f3ea3869fe94650d5","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class AssertionProcessor(object):"},{"line_number":115,"context_line":"    \"\"\"A class to process assertions and mapping rules.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    class _EvalType(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9i%2FY%3D","line":114,"in_reply_to":"AAAAUH%2F9jDY%3D","updated":"2014-02-06 05:44:46.000000000","message":"MappingRuleProcessor is my vote","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            raise exception.ValidationError(messages)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class AssertionProcessor(object):"},{"line_number":115,"context_line":"    \"\"\"A class to process assertions and mapping rules.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    class _EvalType(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jDY%3D","line":114,"in_reply_to":"AAAAUH%2F9jx0%3D","updated":"2014-02-06 05:23:15.000000000","message":"RuleProcessor if we\u0027re passing in mapping[\u0027rules\u0027]\nor\nMappingProcessor if we\u0027re passing in just the mapping\n\nI\u0027m okay with either, whatever the consensus is.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __init__(self, mapping_ref):"},{"line_number":123,"context_line":"        \"\"\"Initialize mapping reference"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Example mappings can be found in tests/mapping_fixtures."},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9j0E%3D","line":123,"updated":"2014-02-06 02:22:04.000000000","message":"Should be\n\n  Initialize AssertionProcessor\n\nalthough this is obvious since it\u0027s called __init__.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        NOT_ANY_OF \u003d \u0027not_any_of\u0027"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __init__(self, mapping_ref):"},{"line_number":123,"context_line":"        \"\"\"Initialize mapping reference"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Example mappings can be found in tests/mapping_fixtures."},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jFE%3D","line":123,"in_reply_to":"AAAAUH%2F9j0E%3D","updated":"2014-02-06 05:23:15.000000000","message":"Done","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    def __init__(self, mapping_ref):"},{"line_number":123,"context_line":"        \"\"\"Initialize mapping reference"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Example mappings can be found in tests/mapping_fixtures."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        :param mapping_ref: existing mapping ref"},{"line_number":128,"context_line":"        :type mapping_ref: dict"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9j0M%3D","line":125,"updated":"2014-02-06 02:22:04.000000000","message":"use :class:`keystone.tests.mapping_fixtures`","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    def __init__(self, mapping_ref):"},{"line_number":123,"context_line":"        \"\"\"Initialize mapping reference"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Example mappings can be found in tests/mapping_fixtures."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        :param mapping_ref: existing mapping ref"},{"line_number":128,"context_line":"        :type mapping_ref: dict"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jE8%3D","line":125,"in_reply_to":"AAAAUH%2F9j0M%3D","updated":"2014-02-06 05:23:15.000000000","message":"Example mappings can be found in:\n  :class:`keystone.tests.mapping_fixtures`","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        self.mapping \u003d mapping_ref"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def process(self, assertion):"},{"line_number":135,"context_line":"        \"\"\"Transform assertion to a list of identity values based on a mapping"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9j1M%3D","line":132,"updated":"2014-02-06 02:22:04.000000000","message":"since this class only cares about rules, how about do self.rules \u003d mapping_ref[\u0027rules\u0027] instead?\n\nAlternatively, could have the caller pass in the rules rather than the mapping_ref... does this class need to know about mapping_refs? Seems like it would make the tests more obvious to do this.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        self.mapping \u003d mapping_ref"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def process(self, assertion):"},{"line_number":135,"context_line":"        \"\"\"Transform assertion to a list of identity values based on a mapping"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jEA%3D","line":132,"in_reply_to":"AAAAUH%2F9j1M%3D","updated":"2014-02-06 05:23:15.000000000","message":"I\u0027m okay with the first one. \n\nFor the second, I think passing in the mapping is still OK.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"e5dafc8f5c7e121143e6a04df75e81e77b0a81e1","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        \"\"\""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        self.mapping \u003d mapping_ref"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def process(self, assertion):"},{"line_number":135,"context_line":"        \"\"\"Transform assertion to a list of identity values based on a mapping"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9eyE%3D","line":132,"in_reply_to":"AAAAUH%2F9j1M%3D","updated":"2014-02-06 16:19:56.000000000","message":"bknudson++\nI vote for passing dict with actual rules only. This class  does one thing - maps parameters and the only input it needs is the dictionary with the rules.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.mapping \u003d mapping_ref"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def process(self, assertion):"},{"line_number":135,"context_line":"        \"\"\"Transform assertion to a list of identity values based on a mapping"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        This function will iterate through the mappings rules to find"},{"line_number":138,"context_line":"        assertions that may be matched to a rule."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9j0A%3D","line":135,"updated":"2014-02-06 02:22:04.000000000","message":"end sentence with .","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        self.mapping \u003d mapping_ref"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def process(self, assertion):"},{"line_number":135,"context_line":"        \"\"\"Transform assertion to a list of identity values based on a mapping"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        This function will iterate through the mappings rules to find"},{"line_number":138,"context_line":"        assertions that may be matched to a rule."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jFo%3D","line":135,"in_reply_to":"AAAAUH%2F9j0A%3D","updated":"2014-02-06 05:23:15.000000000","message":"Done","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        \"\"\""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        self.assertion \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"},{"line_number":162,"context_line":"        rules \u003d self.mapping[\u0027rules\u0027]"},{"line_number":163,"context_line":"        identity_values \u003d []"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9j1o%3D","line":161,"updated":"2014-02-06 02:22:04.000000000","message":"I think it\u0027s a bad idea to assign a local variable on the call like this, from a multi-threading perspective. Assign to a local variable instead.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        \"\"\""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        self.assertion \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"},{"line_number":162,"context_line":"        rules \u003d self.mapping[\u0027rules\u0027]"},{"line_number":163,"context_line":"        identity_values \u003d []"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jFs%3D","line":161,"in_reply_to":"AAAAUH%2F9j1o%3D","updated":"2014-02-06 05:23:15.000000000","message":"OK, i can make it local, just didn\u0027t want to have to pass it around all the functions.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4ee3255eb77c1f2dc7f3cfd40ce88cdeb99ad768","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        \"\"\""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        self.assertion \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion.items())"},{"line_number":162,"context_line":"        rules \u003d self.mapping[\u0027rules\u0027]"},{"line_number":163,"context_line":"        identity_values \u003d []"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9e1I%3D","line":161,"in_reply_to":"AAAAUH%2F9jFs%3D","updated":"2014-02-06 16:16:36.000000000","message":"right, it\u0027s ugly passing it around... could create a new (perhaps internal) class that encapsulates the methods that need to share this variable to help with that and also be threadsafe.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"6e2dbc15a1928c36dbbf0fd9bdc8bd832973497f","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            # Otherwise, the compare is valid, get the local rule"},{"line_number":174,"context_line":"            local_array \u003d rule[\u0027local\u0027]"},{"line_number":175,"context_line":"            # If there is no direct mapping, then add it directly to the array"},{"line_number":176,"context_line":"            # of saved values."},{"line_number":177,"context_line":"            if not direct_maps:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9k9A%3D","line":174,"updated":"2014-02-05 22:30:30.000000000","message":"Is there any case there wouldn\u0027t be a local array?  Should this actually fail or just return a [] and circumvent the for loop on 182 since it has nothing to iterate over.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"543c76c72bd5143ed74a15db14ce4f235f40d9da","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            # Otherwise, the compare is valid, get the local rule"},{"line_number":174,"context_line":"            local_array \u003d rule[\u0027local\u0027]"},{"line_number":175,"context_line":"            # If there is no direct mapping, then add it directly to the array"},{"line_number":176,"context_line":"            # of saved values."},{"line_number":177,"context_line":"            if not direct_maps:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9kZ0%3D","line":174,"in_reply_to":"AAAAUH%2F9k9A%3D","updated":"2014-02-06 00:02:03.000000000","message":"@morgan, no, the schema used to validate rules upon creation/update, will raise an exception if no local exists. \n\nso we can assume it\u0027ll be there.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"454319906b276c51b4d52e8a5462b2d87931a636","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                continue"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            # Otherwise, the compare is valid, get the local rule"},{"line_number":174,"context_line":"            local_array \u003d rule[\u0027local\u0027]"},{"line_number":175,"context_line":"            # If there is no direct mapping, then add it directly to the array"},{"line_number":176,"context_line":"            # of saved values."},{"line_number":177,"context_line":"            if not direct_maps:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9kYw%3D","line":174,"in_reply_to":"AAAAUH%2F9kZ0%3D","updated":"2014-02-06 00:17:51.000000000","message":"Great!  That was the only thing that stood out from the previous commit.  Let me spend some time looking more in depth and comparing changes now.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        if some pre-processing is done at this level."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        :param identity_values: local mapping objects from valid rules"},{"line_number":198,"context_line":"        :type identity_values: array"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        Example identity_values::"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jys%3D","line":198,"updated":"2014-02-06 02:22:04.000000000","message":"suggest change \"array\" to \"array of dict\"","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        if some pre-processing is done at this level."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        :param identity_values: local mapping objects from valid rules"},{"line_number":198,"context_line":"        :type identity_values: array"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        Example identity_values::"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jFw%3D","line":198,"in_reply_to":"AAAAUH%2F9jys%3D","updated":"2014-02-06 05:23:15.000000000","message":"Done","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":208,"context_line":"        for x in identity_values:"},{"line_number":209,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":210,"context_line":"                # if a mapping outputs more than one user name, ignore the rest"},{"line_number":211,"context_line":"                d.setdefault(\u0027name\u0027, x[\u0027user\u0027][\u0027name\u0027])"},{"line_number":212,"context_line":"            if \u0027group\u0027 in x:"},{"line_number":213,"context_line":"                d[\u0027group_ids\u0027].add(x[\u0027group\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jzE%3D","line":210,"updated":"2014-02-06 02:22:04.000000000","message":"I think the code should log the fact that user names are being ignored.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5786fdfe4232b9c36c0e1c6f3ea3869fe94650d5","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":208,"context_line":"        for x in identity_values:"},{"line_number":209,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":210,"context_line":"                # if a mapping outputs more than one user name, ignore the rest"},{"line_number":211,"context_line":"                d.setdefault(\u0027name\u0027, x[\u0027user\u0027][\u0027name\u0027])"},{"line_number":212,"context_line":"            if \u0027group\u0027 in x:"},{"line_number":213,"context_line":"                d[\u0027group_ids\u0027].add(x[\u0027group\u0027][\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9i%2Fg%3D","line":210,"in_reply_to":"AAAAUH%2F9jzE%3D","updated":"2014-02-06 05:44:46.000000000","message":"Changed this block to:\n\n  if \u0027user\u0027 in x:\n    # if a mapping outputs more than one user name, log it\n    if d.get(\u0027name\u0027) is not None:\n      LOG.warning(_(\u0027Ignoring user name %s\u0027), x[\u0027user\u0027][\u0027name\u0027])\n    d.setdefault(\u0027name\u0027, x[\u0027user\u0027][\u0027name\u0027])","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":251,"context_line":"            regex \u003d requirement.get(\u0027regex\u0027, False)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"            any_one_values \u003d requirement.get(self._EvalType.ANY_ONE_OF)"},{"line_number":254,"context_line":"            if any_one_values:"},{"line_number":255,"context_line":"                if not self._evaluate_requirement(any_one_values,"},{"line_number":256,"context_line":"                                                  requirement_type,"},{"line_number":257,"context_line":"                                                  self._EvalType.ANY_ONE_OF,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jyM%3D","line":254,"updated":"2014-02-06 02:22:04.000000000","message":"should this be if any_one_values is not None? Is an empty list the same as not present?","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":251,"context_line":"            regex \u003d requirement.get(\u0027regex\u0027, False)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"            any_one_values \u003d requirement.get(self._EvalType.ANY_ONE_OF)"},{"line_number":254,"context_line":"            if any_one_values:"},{"line_number":255,"context_line":"                if not self._evaluate_requirement(any_one_values,"},{"line_number":256,"context_line":"                                                  requirement_type,"},{"line_number":257,"context_line":"                                                  self._EvalType.ANY_ONE_OF,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jIY%3D","line":254,"in_reply_to":"AAAAUH%2F9jyM%3D","updated":"2014-02-06 05:23:15.000000000","message":"Hmm, yes, I think that is better, or at least clearer.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"0c9a07797f362a66d56186c6c9d29777f5f35ca3","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                                  regex):"},{"line_number":267,"context_line":"                    return None"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            # neither case, so it\u0027s a direct mapping"},{"line_number":270,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":271,"context_line":"                direct_map_value \u003d self.assertion.get(requirement_type)"},{"line_number":272,"context_line":"                if direct_map_value:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jyE%3D","line":269,"updated":"2014-02-06 02:22:04.000000000","message":"what does neither case mean here? the logic above is more complicated than just 2 cases.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4ee3255eb77c1f2dc7f3cfd40ce88cdeb99ad768","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                                  regex):"},{"line_number":267,"context_line":"                    return None"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            # neither case, so it\u0027s a direct mapping"},{"line_number":270,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":271,"context_line":"                direct_map_value \u003d self.assertion.get(requirement_type)"},{"line_number":272,"context_line":"                if direct_map_value:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9e0E%3D","line":269,"in_reply_to":"AAAAUH%2F9jI0%3D","updated":"2014-02-06 16:16:36.000000000","message":"If it\u0027s not supposed to do anything else if \"any_one_of\", then it should be done and return if it\u0027s got \"any_one_of\"... the way it is now it\u0027s only done if it\u0027s got \"any_one_of\" and not evaluate.","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"40a53c6ace0b51ab4ba3f60864a3adb170614ca8","unresolved":false,"context_lines":[{"line_number":266,"context_line":"                                                  regex):"},{"line_number":267,"context_line":"                    return None"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            # neither case, so it\u0027s a direct mapping"},{"line_number":270,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":271,"context_line":"                direct_map_value \u003d self.assertion.get(requirement_type)"},{"line_number":272,"context_line":"                if direct_map_value:"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9jI0%3D","line":269,"in_reply_to":"AAAAUH%2F9jyE%3D","updated":"2014-02-06 05:23:15.000000000","message":"a \u0027remote\u0027 rule can only have one of three structures:\n\n  \u0027type\u0027: \u0027orgType\u0027\n  \u0027any_one_of\u0027: [\u0027abc\u0027, \u0027123\u0027]\n\nor \n\n  \u0027type\u0027: \u0027orgType\u0027\n  \u0027not_any_of\u0027: [\u0027xyz\u0027, \u0027456\u0027]\n\nor\n  \u0027type\u0027: \u0027UserName\u0027\n\nthat\u0027s what I meant by neither case.\n\n\nI changed the comment to:\n  # If \u0027any_one_of\u0027 or \u0027not_any_of\u0027 are not found, then the values are\n  # within \u0027type\u0027. Attempt to find that \u0027type\u0027 within the assertion","commit_id":"a1c31b88412271454a4d7b9516601b94459a5318"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a695f2da84085fda21f99762922468508f4bdc5e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\"Initialize RuleProcessor."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        Example rules can be found at:"},{"line_number":130,"context_line":"        :class: `keystone.tests.mapping_fixtures`"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param rules: existing rules from a mapping"},{"line_number":133,"context_line":"        :type rules: dict"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9bpk%3D","line":130,"updated":"2014-02-06 23:12:52.000000000","message":"remove the space after :class:\n\nAlso, run tox -e docs","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"85e43c06bca63fc1dd15e23a5bc3319363457297","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        \"\"\"Initialize RuleProcessor."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        Example rules can be found at:"},{"line_number":130,"context_line":"        :class: `keystone.tests.mapping_fixtures`"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param rules: existing rules from a mapping"},{"line_number":133,"context_line":"        :type rules: dict"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9ZrU%3D","line":130,"in_reply_to":"AAAAUH%2F9bpk%3D","updated":"2014-02-07 06:52:49.000000000","message":"Done","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a695f2da84085fda21f99762922468508f4bdc5e","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        if some pre-processing is done at this level."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        :param identity_values: local mapping objects from valid rules"},{"line_number":202,"context_line":"        :type identity_values: dict"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        Example identity_values::"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9bpA%3D","line":202,"updated":"2014-02-06 23:12:52.000000000","message":"suggest change \"dict\" to \"array of dict\"","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"85e43c06bca63fc1dd15e23a5bc3319363457297","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        if some pre-processing is done at this level."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        :param identity_values: local mapping objects from valid rules"},{"line_number":202,"context_line":"        :type identity_values: dict"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        Example identity_values::"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9ZrQ%3D","line":202,"in_reply_to":"AAAAUH%2F9bpA%3D","updated":"2014-02-07 06:52:49.000000000","message":"Done","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a695f2da84085fda21f99762922468508f4bdc5e","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                    return None"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"            # If \u0027any_one_of\u0027 or \u0027not_any_of\u0027 are not found, then the values are"},{"line_number":276,"context_line":"            # within \u0027type\u0027. Attempt to find that \u0027type\u0027 within the assertion"},{"line_number":277,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":278,"context_line":"                direct_map_value \u003d assertion.get(requirement_type)"},{"line_number":279,"context_line":"                if direct_map_value:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9bok%3D","line":276,"updated":"2014-02-06 23:12:52.000000000","message":"If it\u0027s not supposed to do anything else if \"any_one_of\" then should be returning at line 266 rather than continuing on.\n\nThe way the code is now if \u0027any_one_of\u0027 or \u0027not_any_of\u0027 are found it continues on and only stops if evaluate is False.","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"85e43c06bca63fc1dd15e23a5bc3319363457297","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                    return None"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"            # If \u0027any_one_of\u0027 or \u0027not_any_of\u0027 are not found, then the values are"},{"line_number":276,"context_line":"            # within \u0027type\u0027. Attempt to find that \u0027type\u0027 within the assertion"},{"line_number":277,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":278,"context_line":"                direct_map_value \u003d assertion.get(requirement_type)"},{"line_number":279,"context_line":"                if direct_map_value:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9ZkI%3D","line":276,"in_reply_to":"AAAAUH%2F9bok%3D","updated":"2014-02-07 06:52:49.000000000","message":"Right, I decided to return None only if a requirement fails because, if there are multiple requirements, they should be AND\u0027ed. \n\nIf I return right away when a single one is True, then it could be too early, so I have to go through all the requirements (remote mappings)\n\n  \"remote\": [\n                {\n                    \"type\": \"orgPersonType\",\n                    \"any_one_of\": [\n                        \"Tester\"\n                    ]\n                },\n                {\n                    \"type\": \"Email\",\n                    \"any_one_of\": [\n                        \".*@example.com$\"\n                    ],\n                    \"regex\": True\n                }\n            ]","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"85e43c06bca63fc1dd15e23a5bc3319363457297","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            # If \u0027any_one_of\u0027 or \u0027not_any_of\u0027 are not found, then the values are"},{"line_number":276,"context_line":"            # within \u0027type\u0027. Attempt to find that \u0027type\u0027 within the assertion"},{"line_number":277,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":278,"context_line":"                direct_map_value \u003d assertion.get(requirement_type)"},{"line_number":279,"context_line":"                if direct_map_value:"},{"line_number":280,"context_line":"                    direct_maps +\u003d direct_map_value"},{"line_number":281,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9Zfw%3D","line":278,"updated":"2014-02-07 06:52:49.000000000","message":"TL;DR: I\u0027m not sure how to optimize this.\n\nMore:\nContinuing from my previous comment, I do think there is a way to optimize this, and make it less complicated.\n\nI was thinking that maybe we could scrap the direct_maps, and leave this function to just evaluate the requirement. Replacing this line with:\n\n  return assertion.get(requirement_type)\n\nand the above conditionals to just continue on positive returns from _evaluate_requirement.\n\nMaking this function just return a boolean...\n\nIf it returned True, back in the process method, I could append \u0027local\u0027 on to the identity_values array.\n\nBut I ran into the issue with direct mapping since, i\u0027d have to go over all the requirements again to do that.","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3a1a3535d1a4b594b972fe6c62896a7927e4c4ef","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            if direct_maps is None:"},{"line_number":177,"context_line":"                continue"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"            # If there are no updated local array, then add it directly to the"},{"line_number":180,"context_line":"            # array of saved values. However, if there is direct mapping,"},{"line_number":181,"context_line":"            # then we need to perform variable replacement."},{"line_number":182,"context_line":"            if not direct_maps:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F9USo%3D","line":179,"updated":"2014-02-07 21:14:10.000000000","message":"change \"array\" to \"arrays\" for grammar... or change \"no updated local array\" to \"no direct mappings\" ?\n\nalso, define what \"it\" is in this sentence.","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"ddfc3126681c14b5bfebc8b22436412768318794","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            if direct_maps is None:"},{"line_number":177,"context_line":"                continue"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"            # If there are no updated local array, then add it directly to the"},{"line_number":180,"context_line":"            # array of saved values. However, if there is direct mapping,"},{"line_number":181,"context_line":"            # then we need to perform variable replacement."},{"line_number":182,"context_line":"            if not direct_maps:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FqE%3D","line":179,"in_reply_to":"AAAAUH%2F9USo%3D","updated":"2014-02-07 22:40:31.000000000","message":"Done","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3a1a3535d1a4b594b972fe6c62896a7927e4c4ef","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        If a value of ``None`` is returned, this rule doesn\u0027t apply to the"},{"line_number":240,"context_line":"        assertion data."},{"line_number":241,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":242,"context_line":"        mappings to be performed."},{"line_number":243,"context_line":"        Otherwise, then it will store the values *in order* to be directly"},{"line_number":244,"context_line":"        mapped."},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FwI%3D","line":242,"updated":"2014-02-07 21:14:10.000000000","message":"change \"store\" to \"return\"","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"ddfc3126681c14b5bfebc8b22436412768318794","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        If a value of ``None`` is returned, this rule doesn\u0027t apply to the"},{"line_number":240,"context_line":"        assertion data."},{"line_number":241,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":242,"context_line":"        mappings to be performed."},{"line_number":243,"context_line":"        Otherwise, then it will store the values *in order* to be directly"},{"line_number":244,"context_line":"        mapped."},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FqI%3D","line":242,"in_reply_to":"AAAAUX%2F%2F%2FwI%3D","updated":"2014-02-07 22:40:31.000000000","message":"Done","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3a1a3535d1a4b594b972fe6c62896a7927e4c4ef","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        mappings to be performed."},{"line_number":243,"context_line":"        Otherwise, then it will store the values *in order* to be directly"},{"line_number":244,"context_line":"        mapped."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        :returns: array of local mapping objects or None."},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FvY%3D","line":245,"updated":"2014-02-07 21:14:10.000000000","message":"change \"array\" to \"list\"","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"ddfc3126681c14b5bfebc8b22436412768318794","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        mappings to be performed."},{"line_number":243,"context_line":"        Otherwise, then it will store the values *in order* to be directly"},{"line_number":244,"context_line":"        mapped."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        :returns: array of local mapping objects or None."},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FqM%3D","line":245,"in_reply_to":"AAAAUX%2F%2F%2FvY%3D","updated":"2014-02-07 22:40:31.000000000","message":"Done","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3a1a3535d1a4b594b972fe6c62896a7927e4c4ef","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"            # If \u0027any_one_of\u0027 or \u0027not_any_of\u0027 are not found, then values are"},{"line_number":279,"context_line":"            # within \u0027type\u0027. Attempt to find that \u0027type\u0027 within the assertion."},{"line_number":280,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":281,"context_line":"                direct_map_values \u003d assertion.get(requirement_type)"},{"line_number":282,"context_line":"                if direct_map_values:"},{"line_number":283,"context_line":"                    direct_maps +\u003d direct_map_values"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FwY%3D","line":280,"updated":"2014-02-07 21:14:10.000000000","message":"no need to check this since would have returned or continued already.","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"ddfc3126681c14b5bfebc8b22436412768318794","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"            # If \u0027any_one_of\u0027 or \u0027not_any_of\u0027 are not found, then values are"},{"line_number":279,"context_line":"            # within \u0027type\u0027. Attempt to find that \u0027type\u0027 within the assertion."},{"line_number":280,"context_line":"            if not not_any_values and not any_one_values:"},{"line_number":281,"context_line":"                direct_map_values \u003d assertion.get(requirement_type)"},{"line_number":282,"context_line":"                if direct_map_values:"},{"line_number":283,"context_line":"                    direct_maps +\u003d direct_map_values"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FqQ%3D","line":280,"in_reply_to":"AAAAUX%2F%2F%2FwY%3D","updated":"2014-02-07 22:40:31.000000000","message":"Good call","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7db0c83ff6644335a3b14309294027bd8e1da793","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        If the requirement type does not exist in the assertion data, then"},{"line_number":292,"context_line":"        return False. If regex is specified, then compare the values and"},{"line_number":293,"context_line":"        assertion values. Otherwise, grab the intersection of the values"},{"line_number":294,"context_line":"        and use that to compare against the evaluation type."},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        :returns: boolean, whether requirement is valid or not."},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2Fpk%3D","line":294,"updated":"2014-02-07 21:23:54.000000000","message":"nit: I know this is a private method but since we have a really good description of what this method does it might be nice to add the doc strings for what the parameters are too","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"ddfc3126681c14b5bfebc8b22436412768318794","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        If the requirement type does not exist in the assertion data, then"},{"line_number":292,"context_line":"        return False. If regex is specified, then compare the values and"},{"line_number":293,"context_line":"        assertion values. Otherwise, grab the intersection of the values"},{"line_number":294,"context_line":"        and use that to compare against the evaluation type."},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        :returns: boolean, whether requirement is valid or not."},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2FLA%3D","line":294,"in_reply_to":"AAAAUX%2F%2F%2Fpk%3D","updated":"2014-02-07 22:40:31.000000000","message":"Done","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        Example rules can be found at:"},{"line_number":130,"context_line":"        :class:`keystone.tests.mapping_fixtures`"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param rules: existing rules from a mapping"},{"line_number":133,"context_line":"        :type rules: dict"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6GY%3D","line":132,"updated":"2014-02-10 02:37:48.000000000","message":"(nit) remove \"existing\"... how would anyone pass in nonexistant rules?","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        Example rules can be found at:"},{"line_number":130,"context_line":"        :class:`keystone.tests.mapping_fixtures`"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param rules: existing rules from a mapping"},{"line_number":133,"context_line":"        :type rules: dict"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5P0%3D","line":132,"in_reply_to":"AAAAUX%2F%2F6GY%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self.rules \u003d rules"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def process(self, assertion_data):"},{"line_number":140,"context_line":"        \"\"\"Transform assertion to a dictionary of identity values based"},{"line_number":141,"context_line":"        on a mapping."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        This function will iterate through the mappings rules to find"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6F0%3D","line":140,"updated":"2014-02-10 02:37:48.000000000","message":"suggest change \"identity values\" should be \"name and group ids\" ?","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self.rules \u003d rules"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def process(self, assertion_data):"},{"line_number":140,"context_line":"        \"\"\"Transform assertion to a dictionary of identity values based"},{"line_number":141,"context_line":"        on a mapping."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        This function will iterate through the mappings rules to find"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5Pw%3D","line":140,"in_reply_to":"AAAAUX%2F%2F6F0%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def process(self, assertion_data):"},{"line_number":140,"context_line":"        \"\"\"Transform assertion to a dictionary of identity values based"},{"line_number":141,"context_line":"        on a mapping."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        This function will iterate through the mappings rules to find"},{"line_number":144,"context_line":"        assertions that are valid."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6FU%3D","line":141,"updated":"2014-02-10 02:37:48.000000000","message":"suggest change \"mapping\" to \"mapping rules\" so that it\u0027s more obvious that this is referring to self.rules.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def process(self, assertion_data):"},{"line_number":140,"context_line":"        \"\"\"Transform assertion to a dictionary of identity values based"},{"line_number":141,"context_line":"        on a mapping."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        This function will iterate through the mappings rules to find"},{"line_number":144,"context_line":"        assertions that are valid."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5Ps%3D","line":141,"in_reply_to":"AAAAUX%2F%2F6FU%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        \"\"\"Transform assertion to a dictionary of identity values based"},{"line_number":141,"context_line":"        on a mapping."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        This function will iterate through the mappings rules to find"},{"line_number":144,"context_line":"        assertions that are valid."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        :param assertion_data: an assertion containing values from an IdP"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6Ew%3D","line":143,"updated":"2014-02-10 02:37:48.000000000","message":"change \"mappings\" to \"mapping\" ?","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        \"\"\"Transform assertion to a dictionary of identity values based"},{"line_number":141,"context_line":"        on a mapping."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        This function will iterate through the mappings rules to find"},{"line_number":144,"context_line":"        assertions that are valid."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        :param assertion_data: an assertion containing values from an IdP"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5P4%3D","line":143,"in_reply_to":"AAAAUX%2F%2F6Ew%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                \u0027UserName\u0027: \u0027testacct\u0027,"},{"line_number":154,"context_line":"                \u0027FirstName\u0027: \u0027Test\u0027,"},{"line_number":155,"context_line":"                \u0027LastName\u0027: \u0027Account\u0027,"},{"line_number":156,"context_line":"                \u0027orgPersonType\u0027: \u0027Tester;\u0027"},{"line_number":157,"context_line":"            }"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        :returns: dictionary with user and group_ids"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6EY%3D","line":156,"updated":"2014-02-10 02:37:48.000000000","message":"remove ; ?","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                \u0027UserName\u0027: \u0027testacct\u0027,"},{"line_number":154,"context_line":"                \u0027FirstName\u0027: \u0027Test\u0027,"},{"line_number":155,"context_line":"                \u0027LastName\u0027: \u0027Account\u0027,"},{"line_number":156,"context_line":"                \u0027orgPersonType\u0027: \u0027Tester;\u0027"},{"line_number":157,"context_line":"            }"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        :returns: dictionary with user and group_ids"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5Pc%3D","line":156,"in_reply_to":"AAAAUX%2F%2F6EY%3D","updated":"2014-02-10 17:46:40.000000000","message":"that\u0027s cool, it was actually there because the sample assertion Marek supplied had an extra ; at the end. But I can remove it here","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        assertion \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion_data.items())"},{"line_number":171,"context_line":"        identity_values \u003d []"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        for rule in self.rules:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6D4%3D","line":170,"updated":"2014-02-10 02:37:48.000000000","message":"add a comment what this is doing.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        assertion \u003d dict((n, v.split(\u0027;\u0027)) for n, v in assertion_data.items())"},{"line_number":171,"context_line":"        identity_values \u003d []"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        for rule in self.rules:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2FzwY%3D","line":170,"in_reply_to":"AAAAUX%2F%2F6D4%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        return self._format(identity_values)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _format(self, identity_values):"},{"line_number":195,"context_line":"        \"\"\"Refactor local mappings, to an easier to understand format."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        Refactor the incoming array to match the format needed in the"},{"line_number":198,"context_line":"        process function. Generating content for Keystone tokens will"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6Dc%3D","line":195,"updated":"2014-02-10 02:37:48.000000000","message":"\"Refactor\" doesn\u0027t make sense here... how about \"Transform\" or something? Refactoring is changing code.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        return self._format(identity_values)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _format(self, identity_values):"},{"line_number":195,"context_line":"        \"\"\"Refactor local mappings, to an easier to understand format."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        Refactor the incoming array to match the format needed in the"},{"line_number":198,"context_line":"        process function. Generating content for Keystone tokens will"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5PU%3D","line":195,"in_reply_to":"AAAAUX%2F%2F6Dc%3D","updated":"2014-02-10 17:46:40.000000000","message":"Transform works for me","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\"Refactor local mappings, to an easier to understand format."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        Refactor the incoming array to match the format needed in the"},{"line_number":198,"context_line":"        process function. Generating content for Keystone tokens will"},{"line_number":199,"context_line":"        be easier if some pre-processing is done at this level."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        :param identity_values: local mapping from valid evaluations"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6Cg%3D","line":198,"updated":"2014-02-10 02:37:48.000000000","message":"this doesn\u0027t make any sense... this method supposedly reformats the array for the process function, but it\u0027s actually generating the return value of the process function (see line 192). The process function doesn\u0027t use the results.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\"Refactor local mappings, to an easier to understand format."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        Refactor the incoming array to match the format needed in the"},{"line_number":198,"context_line":"        process function. Generating content for Keystone tokens will"},{"line_number":199,"context_line":"        be easier if some pre-processing is done at this level."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        :param identity_values: local mapping from valid evaluations"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzyw%3D","line":198,"in_reply_to":"AAAAUX%2F%2F6Cg%3D","updated":"2014-02-10 17:46:40.000000000","message":"OK, i\u0027ll change the wording to \u0027generates the return value for the process function\u0027.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"            [{\u0027group\u0027: {\u0027id\u0027: \u00270cd5e9\u0027}, \u0027user\u0027: {\u0027email\u0027: \u0027bob@example.com\u0027}}]"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        :returns: dictionary with user and group_ids."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6HE%3D","line":208,"updated":"2014-02-10 02:37:48.000000000","message":"should \"user\" be \"user name\"? since that\u0027s what\u0027s returned.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":205,"context_line":""},{"line_number":206,"context_line":"            [{\u0027group\u0027: {\u0027id\u0027: \u00270cd5e9\u0027}, \u0027user\u0027: {\u0027email\u0027: \u0027bob@example.com\u0027}}]"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        :returns: dictionary with user and group_ids."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzww%3D","line":208,"in_reply_to":"AAAAUX%2F%2F6HE%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # initialize the group_ids as a set to eliminate duplicates"},{"line_number":213,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":214,"context_line":"        for x in identity_values:"},{"line_number":215,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":216,"context_line":"                # if a mapping outputs more than one user name, log it"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6AU%3D","line":213,"updated":"2014-02-10 02:37:48.000000000","message":"suggest have user_name and group_ids variables and put them into a dict to return rather than have a dict here.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        \"\"\""},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # initialize the group_ids as a set to eliminate duplicates"},{"line_number":213,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":214,"context_line":"        for x in identity_values:"},{"line_number":215,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":216,"context_line":"                # if a mapping outputs more than one user name, log it"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2FzuQ%3D","line":213,"in_reply_to":"AAAAUX%2F%2F6AU%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # initialize the group_ids as a set to eliminate duplicates"},{"line_number":213,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":214,"context_line":"        for x in identity_values:"},{"line_number":215,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":216,"context_line":"                # if a mapping outputs more than one user name, log it"},{"line_number":217,"context_line":"                if d.get(\u0027name\u0027) is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6AE%3D","line":214,"updated":"2014-02-10 02:37:48.000000000","message":"suggest change x to identity_value","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # initialize the group_ids as a set to eliminate duplicates"},{"line_number":213,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":214,"context_line":"        for x in identity_values:"},{"line_number":215,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":216,"context_line":"                # if a mapping outputs more than one user name, log it"},{"line_number":217,"context_line":"                if d.get(\u0027name\u0027) is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzw0%3D","line":214,"in_reply_to":"AAAAUX%2F%2F6AE%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":214,"context_line":"        for x in identity_values:"},{"line_number":215,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":216,"context_line":"                # if a mapping outputs more than one user name, log it"},{"line_number":217,"context_line":"                if d.get(\u0027name\u0027) is not None:"},{"line_number":218,"context_line":"                    LOG.warning(_(\u0027Ignoring user name %s\u0027), x[\u0027user\u0027][\u0027name\u0027])"},{"line_number":219,"context_line":"                d.setdefault(\u0027name\u0027, x[\u0027user\u0027][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F6BQ%3D","line":216,"updated":"2014-02-10 02:37:48.000000000","message":"this seems unsafe... why not raise an exception? Seems like an invalid mapping.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        d \u003d dict(group_ids\u003dset())"},{"line_number":214,"context_line":"        for x in identity_values:"},{"line_number":215,"context_line":"            if \u0027user\u0027 in x:"},{"line_number":216,"context_line":"                # if a mapping outputs more than one user name, log it"},{"line_number":217,"context_line":"                if d.get(\u0027name\u0027) is not None:"},{"line_number":218,"context_line":"                    LOG.warning(_(\u0027Ignoring user name %s\u0027), x[\u0027user\u0027][\u0027name\u0027])"},{"line_number":219,"context_line":"                d.setdefault(\u0027name\u0027, x[\u0027user\u0027][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2FzpI%3D","line":216,"in_reply_to":"AAAAUX%2F%2F6BQ%3D","updated":"2014-02-10 17:46:40.000000000","message":"@brant, I\u0027m not sure what should happen if this is the case. Dolph suggest to just ignore them. Logging seems like a good minimum thing to do. \n\nI think we need more data on actual SAML assertions, as such, I don\u0027t think it\u0027s a show-stopper. But if you really want it changed, then I\u0027ll change it.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d2459fc1b6c4a46cd4aa42615a8069cc4e2565be","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            [\u0027Bob\u0027, \u0027Thompson\u0027, \u0027bob@example.com\u0027]"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        :returns: new local mapping reference with replaced values."},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        \"\"\""},{"line_number":244,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F2K4%3D","line":241,"updated":"2014-02-10 13:21:19.000000000","message":"Add an example of that var new returns to be consistent with the descriptions and examples of the parameters (and def process)?","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            [\u0027Bob\u0027, \u0027Thompson\u0027, \u0027bob@example.com\u0027]"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        :returns: new local mapping reference with replaced values."},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        \"\"\""},{"line_number":244,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzr8%3D","line":241,"in_reply_to":"AAAAUX%2F%2F2K4%3D","updated":"2014-02-10 17:46:40.000000000","message":"I didn\u0027t think it was necessary here as it\u0027s just an udpate/ search and replace. But I can add something.\n\n        The expected return structure is::\n\n            {\u0027user\u0027: {\u0027name\u0027: \u0027Bob Thompson\u0027, \u0027email\u0027: \u0027bob@example.org\u0027}}","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        \"\"\"Go through the remote requirements of a rule, and compare against"},{"line_number":256,"context_line":"        the assertion."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        If a value of ``None`` is returned, this rule doesn\u0027t apply."},{"line_number":259,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":260,"context_line":"        mappings to be performed, but the rule is valid."},{"line_number":261,"context_line":"        Otherwise, then it will return the values, in order, to be directly"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5%2Bo%3D","line":258,"updated":"2014-02-10 02:37:48.000000000","message":"change \"this rule\" to \"the rule with this assertion\" ?","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        \"\"\"Go through the remote requirements of a rule, and compare against"},{"line_number":256,"context_line":"        the assertion."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        If a value of ``None`` is returned, this rule doesn\u0027t apply."},{"line_number":259,"context_line":"        If an array of zero length is returned, then there are no direct"},{"line_number":260,"context_line":"        mappings to be performed, but the rule is valid."},{"line_number":261,"context_line":"        Otherwise, then it will return the values, in order, to be directly"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2FzsY%3D","line":258,"in_reply_to":"AAAAUX%2F%2F5%2Bo%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                \u0027FirstName\u0027: [\u0027Test\u0027]"},{"line_number":292,"context_line":"            }"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        :returns: list of identity values or None."},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        \"\"\""},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F5%2BQ%3D","line":294,"updated":"2014-02-10 02:37:48.000000000","message":"returns a list of direct mappings?","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                \u0027FirstName\u0027: [\u0027Test\u0027]"},{"line_number":292,"context_line":"            }"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        :returns: list of identity values or None."},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        \"\"\""},{"line_number":297,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzt0%3D","line":294,"in_reply_to":"AAAAUX%2F%2F5%2BQ%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d2459fc1b6c4a46cd4aa42615a8069cc4e2565be","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        direct_maps \u003d []"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        for requirement in requirements:"},{"line_number":301,"context_line":"            requirement_type \u003d requirement[\u0027type\u0027]"},{"line_number":302,"context_line":"            regex \u003d requirement.get(\u0027regex\u0027, False)"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F2Dw%3D","line":300,"updated":"2014-02-10 13:21:19.000000000","message":"Wondering if this for loop could be condensed down a little, lines 304 - 313 are the same as 314 - 324 with the exception of using any_one_values versus not_any_values.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        direct_maps \u003d []"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        for requirement in requirements:"},{"line_number":301,"context_line":"            requirement_type \u003d requirement[\u0027type\u0027]"},{"line_number":302,"context_line":"            regex \u003d requirement.get(\u0027regex\u0027, False)"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2FztI%3D","line":300,"in_reply_to":"AAAAUX%2F%2F2Dw%3D","updated":"2014-02-10 17:46:40.000000000","message":"@lance, I also need to supply _EvalType.ANY_ONE_OF too. I already condensed this down from it\u0027s original structure. I\u0027m all for condensing it more, but nothing is coming to mind.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"6509b809509369e095fb08a2836f547ec6ea1bfe","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        d[\u0027name\u0027] \u003d user_name"},{"line_number":233,"context_line":"        d[\u0027group_ids\u0027] \u003d list(group_ids)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        return d"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def _update_local_mapping(self, local, direct_maps):"},{"line_number":238,"context_line":"        \"\"\"Replace any {0}, {1} ... values with data from the assertion."}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAAUX%2F%2FxvA%3D","line":235,"updated":"2014-02-10 21:29:50.000000000","message":"suggest change 231-235 to\n\n return {\u0027name\u0027: user_name, \u0027group_ids\u0027: list(group_ids)}\n\nno need to use 5 lines where 1 would do.","commit_id":"a817cec7d15231b8c4319b8e4bf41fd4be3921b6"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a080a8e19173c6a9b4503bbbed6938fb6d6d6fa8","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            if \u0027user\u0027 in identity_value:"},{"line_number":222,"context_line":"                # if a mapping outputs more than one user name, log it"},{"line_number":223,"context_line":"                if user_name is not None:"},{"line_number":224,"context_line":"                    LOG.warning(_(\u0027Ignoring user name %s\u0027),"},{"line_number":225,"context_line":"                                identity_value[\u0027user\u0027][\u0027name\u0027])"},{"line_number":226,"context_line":"                else:"},{"line_number":227,"context_line":"                    user_name \u003d identity_value[\u0027user\u0027][\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Fwhc%3D","line":224,"updated":"2014-02-11 01:01:23.000000000","message":"Is it possible that a user name won\u0027t exist?  For example, it\u0027s not in the example of the docstring.","commit_id":"dd91803e77e0c228a7b0da0765644aaeed295dad"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a080a8e19173c6a9b4503bbbed6938fb6d6d6fa8","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        \"\"\""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        new \u003d {}"},{"line_number":258,"context_line":"        for k, v in local.iteritems():"},{"line_number":259,"context_line":"            if isinstance(v, dict):"},{"line_number":260,"context_line":"                new_value \u003d self._update_local_mapping(v, direct_maps)"},{"line_number":261,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2Fwgk%3D","line":258,"updated":"2014-02-11 01:01:23.000000000","message":"six.iteritems() for Python 3 compat?","commit_id":"dd91803e77e0c228a7b0da0765644aaeed295dad"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"0d615de7ce5c3a2f38135666f7044fef279421ad","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        \"\"\""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        new \u003d {}"},{"line_number":258,"context_line":"        for k, v in local.iteritems():"},{"line_number":259,"context_line":"            if isinstance(v, dict):"},{"line_number":260,"context_line":"                new_value \u003d self._update_local_mapping(v, direct_maps)"},{"line_number":261,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FwV8%3D","line":258,"in_reply_to":"AAAAUX%2F%2Fwgk%3D","updated":"2014-02-11 01:49:17.000000000","message":"Done","commit_id":"dd91803e77e0c228a7b0da0765644aaeed295dad"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a080a8e19173c6a9b4503bbbed6938fb6d6d6fa8","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        assertion values. Otherwise, grab the intersection of the values"},{"line_number":354,"context_line":"        and use that to compare against the evaluation type."},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        :param requirement_type: key to look for in the assertion"},{"line_number":357,"context_line":"        :type requirement_type: string"},{"line_number":358,"context_line":"        :param values: list of allowed values, defined in the requirement"},{"line_number":359,"context_line":"        :type values: list"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FwdU%3D","line":356,"updated":"2014-02-11 01:01:23.000000000","message":"These should probably be reordered to match the sig.","commit_id":"dd91803e77e0c228a7b0da0765644aaeed295dad"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"0d615de7ce5c3a2f38135666f7044fef279421ad","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        assertion values. Otherwise, grab the intersection of the values"},{"line_number":354,"context_line":"        and use that to compare against the evaluation type."},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        :param requirement_type: key to look for in the assertion"},{"line_number":357,"context_line":"        :type requirement_type: string"},{"line_number":358,"context_line":"        :param values: list of allowed values, defined in the requirement"},{"line_number":359,"context_line":"        :type values: list"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAUX%2F%2FwWA%3D","line":356,"in_reply_to":"AAAAUX%2F%2FwdU%3D","updated":"2014-02-11 01:49:17.000000000","message":"Done","commit_id":"dd91803e77e0c228a7b0da0765644aaeed295dad"}],"keystone/tests/mapping_fixtures.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"e5a687e53178f2d2ef3a2b0c27216845ca49a70a","unresolved":false,"context_lines":[{"line_number":243,"context_line":"    \u0027FirstName\u0027: \u0027Jill\u0027,"},{"line_number":244,"context_line":"    \u0027LastName\u0027: \u0027Smith\u0027,"},{"line_number":245,"context_line":"    \u0027orgPersonType\u0027: \u0027Contractor;SubContractor;Customer;;\u0027"},{"line_number":246,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FCBo%3D","line":246,"updated":"2014-01-18 08:34:33.000000000","message":"need to add more assertions","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1313e837bc5abfb0703536b6c5d6297c2edad6d","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Fixtures for Federation Mapping.\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\"\"\" Mapping summary:"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"LastName Smith \u0026 Not Contractor or SubContractor -\u003e group 0cd5e9"},{"line_number":21,"context_line":"FirstName Jill \u0026 Contractor or SubContractor -\u003e to group 85a868"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BmO8%3D","line":18,"updated":"2014-01-24 01:15:21.000000000","message":"Is there any reason that this is a Python string instead of a comment?","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"738fd9e8375ed65a7d30b667343713ed5f60cd09","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Fixtures for Federation Mapping.\"\"\""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\"\"\" Mapping summary:"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"LastName Smith \u0026 Not Contractor or SubContractor -\u003e group 0cd5e9"},{"line_number":21,"context_line":"FirstName Jill \u0026 Contractor or SubContractor -\u003e to group 85a868"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bl8g%3D","line":18,"in_reply_to":"AAAAUH%2F%2BmO8%3D","updated":"2014-01-24 02:19:02.000000000","message":"Nope, I can make them comments","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1313e837bc5abfb0703536b6c5d6297c2edad6d","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    ]"},{"line_number":75,"context_line":"}"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"\"\"\" Mapping summary:"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"orgPersonType Admin or Big Cheese -\u003e user name $0 $1 email $2 and group 0cd5e9"},{"line_number":80,"context_line":"orgPersonType Customer -\u003e user name $0 email $1"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BmO0%3D","line":77,"updated":"2014-01-24 01:15:21.000000000","message":"Or this one?","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"}],"keystone/tests/test_v3_federation.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"e5a687e53178f2d2ef3a2b0c27216845ca49a70a","unresolved":false,"context_lines":[{"line_number":534,"context_line":""},{"line_number":535,"context_line":"    def test_rule_engine_2(self):"},{"line_number":536,"context_line":"        mapping_utils.process(mapping_fixtures.ASSERTION_CUSTOMER,"},{"line_number":537,"context_line":"                              mapping_fixtures.MAPPING_LARGE)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FCBk%3D","line":537,"updated":"2014-01-18 08:34:33.000000000","message":"more tests for more assertion / mappings combinations","commit_id":"b22d72d9141e638afd671c69cd6b1c0cdca66aad"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1313e837bc5abfb0703536b6c5d6297c2edad6d","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        \"\"\"Should return user\u0027s name, email and group 0cd5e9.\"\"\""},{"line_number":561,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.ADMIN_ASSERTION,"},{"line_number":562,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":563,"context_line":"        self.assertIsNotNone(values)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def test_rule_engine_bad_tester(self):"},{"line_number":566,"context_line":"        \"\"\"Should return group 123 and 123.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BmME%3D","line":563,"updated":"2014-01-24 01:15:21.000000000","message":"I think you might what to do a deeper inspection on values instead of just checking that it has a value.\n\nSame goes for most of these tests.","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"738fd9e8375ed65a7d30b667343713ed5f60cd09","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        \"\"\"Should return user\u0027s name, email and group 0cd5e9.\"\"\""},{"line_number":561,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.ADMIN_ASSERTION,"},{"line_number":562,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":563,"context_line":"        self.assertIsNotNone(values)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def test_rule_engine_bad_tester(self):"},{"line_number":566,"context_line":"        \"\"\"Should return group 123 and 123.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bl8M%3D","line":563,"in_reply_to":"AAAAUH%2F%2BmME%3D","updated":"2014-01-24 02:19:02.000000000","message":"Yesh, the trouble is traversing the values, theyre a bit too nested atm. I think I need to change the way I\u0027m saving them in the utils section","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1313e837bc5abfb0703536b6c5d6297c2edad6d","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        self.assertIsNotNone(values)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def test_rule_engine_bad_tester(self):"},{"line_number":566,"context_line":"        \"\"\"Should return group 123 and 123.\"\"\""},{"line_number":567,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.BAD_TESTER_ASSERTION,"},{"line_number":568,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":569,"context_line":"        self.assertIs(len(values), 0)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BmL0%3D","line":566,"updated":"2014-01-24 01:15:21.000000000","message":"Does this comment match the test?","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"738fd9e8375ed65a7d30b667343713ed5f60cd09","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        self.assertIsNotNone(values)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def test_rule_engine_bad_tester(self):"},{"line_number":566,"context_line":"        \"\"\"Should return group 123 and 123.\"\"\""},{"line_number":567,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.BAD_TESTER_ASSERTION,"},{"line_number":568,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":569,"context_line":"        self.assertIs(len(values), 0)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Bl8Y%3D","line":566,"in_reply_to":"AAAAUH%2F%2BmL0%3D","updated":"2014-01-24 02:19:02.000000000","message":"thanks for that find!","commit_id":"4937f33bc4d444a0db83efa62745e4235db9f4a1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":438,"context_line":"        self.get(url, expected_status\u003d404)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"class MappingCRUDTests(FederationTests):"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"    MAPPING_URL \u003d \u0027/OS-FEDERATION/mappings/\u0027"},{"line_number":444,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI4w%3D","line":441,"updated":"2014-01-29 20:02:44.000000000","message":"why change this? Could be done as a separate commit.\n\nIf changing the name, maybe should also add a docstring so we know what goes in here, and a docstring for the new class too.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":438,"context_line":"        self.get(url, expected_status\u003d404)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"class MappingCRUDTests(FederationTests):"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"    MAPPING_URL \u003d \u0027/OS-FEDERATION/mappings/\u0027"},{"line_number":444,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIQU%3D","line":441,"in_reply_to":"AAAAUH%2F%2BI4w%3D","updated":"2014-01-30 06:46:35.000000000","message":"it\u0027s in a new commit now","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":557,"context_line":"class MappingRuleEngineTests(FederationTests):"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"    def test_rule_engine_admin(self):"},{"line_number":560,"context_line":"        \"\"\"Should return user\u0027s name, email and group 0cd5e9.\"\"\""},{"line_number":561,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.ADMIN_ASSERTION,"},{"line_number":562,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":563,"context_line":"        email \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027Email\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI4g%3D","line":560,"updated":"2014-01-29 20:02:44.000000000","message":"add to the docstring here the reason why it should return that.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"c6ac6ee3788cc66cb8d5cb67d0cc741350aaef80","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        email \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027Email\u0027)"},{"line_number":564,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"},{"line_number":565,"context_line":"        ln \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027LastName\u0027)"},{"line_number":566,"context_line":"        group_id \u003d \"0cd5e9\""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":569,"context_line":"        user_value \u003d values[0][\u0027user\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BUBU%3D","line":566,"updated":"2014-01-28 03:26:37.000000000","message":"Keystone hacking commandment: avoid using double quotes when you can reasonably use single quotes.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        email \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027Email\u0027)"},{"line_number":564,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"},{"line_number":565,"context_line":"        ln \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027LastName\u0027)"},{"line_number":566,"context_line":"        group_id \u003d \"0cd5e9\""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":569,"context_line":"        user_value \u003d values[0][\u0027user\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI4I%3D","line":566,"updated":"2014-01-29 20:02:44.000000000","message":"where does this come from? This applies to all these magic numbers.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        email \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027Email\u0027)"},{"line_number":564,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"},{"line_number":565,"context_line":"        ln \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027LastName\u0027)"},{"line_number":566,"context_line":"        group_id \u003d \"0cd5e9\""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":569,"context_line":"        user_value \u003d values[0][\u0027user\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIno%3D","line":566,"in_reply_to":"AAAAUH%2F%2BI4I%3D","updated":"2014-01-29 20:30:25.000000000","message":"They comes from content in: https://review.openstack.org/#/c/67645/6/keystone/tests/mapping_fixtures.py\n\nIt\u0027s what would be expected when processing a specific assertion with a set of rules. \nAside from going into the rules[0][\u0027local\u0027][0][\u0027group\u0027][\u0027id\u0027]... is there an easier way?","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        email \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027Email\u0027)"},{"line_number":564,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"},{"line_number":565,"context_line":"        ln \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027LastName\u0027)"},{"line_number":566,"context_line":"        group_id \u003d \"0cd5e9\""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":569,"context_line":"        user_value \u003d values[0][\u0027user\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGFo%3D","line":566,"in_reply_to":"AAAAUH%2F%2BImA%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9cb2530e4d25dad8d868b9e74a8f86d82699f1a6","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        email \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027Email\u0027)"},{"line_number":564,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"},{"line_number":565,"context_line":"        ln \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027LastName\u0027)"},{"line_number":566,"context_line":"        group_id \u003d \"0cd5e9\""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":569,"context_line":"        user_value \u003d values[0][\u0027user\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BImA%3D","line":566,"in_reply_to":"AAAAUH%2F%2BIno%3D","updated":"2014-01-29 20:35:45.000000000","message":"pull the value out into a new variable in mapping_fixtures and use that in both places.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"},{"line_number":572,"context_line":"        self.assertEqual(user_value[\u0027email\u0027], email)"},{"line_number":573,"context_line":"        self.assertEqual(user_value[\u0027name\u0027], fn + \" \" + ln)"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    def test_rule_engine_bad_tester(self):"},{"line_number":576,"context_line":"        \"\"\"Should return 0 values, the email of the tester won\u0027t match.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI3w%3D","line":573,"updated":"2014-01-29 20:02:44.000000000","message":"use \u0027 for strings consistently. Also, suggest \u0027%s %s\u0027 % (fn, ln) it\u0027s a little more obvious what\u0027s going on.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"cceea1011ebb6d7c0bfd7445c21153ff0f707850","unresolved":false,"context_lines":[{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"},{"line_number":572,"context_line":"        self.assertEqual(user_value[\u0027email\u0027], email)"},{"line_number":573,"context_line":"        self.assertEqual(user_value[\u0027name\u0027], fn + \" \" + ln)"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    def test_rule_engine_bad_tester(self):"},{"line_number":576,"context_line":"        \"\"\"Should return 0 values, the email of the tester won\u0027t match.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BIoE%3D","line":573,"in_reply_to":"AAAAUH%2F%2BI3w%3D","updated":"2014-01-29 20:30:25.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        \"\"\"Should return 0 values, the email of the tester won\u0027t match.\"\"\""},{"line_number":577,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.BAD_TESTER_ASSERTION,"},{"line_number":578,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":579,"context_line":"        self.assertIs(len(values), 0)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def test_rule_engine_contractor(self):"},{"line_number":582,"context_line":"        \"\"\"Should return group 85a868.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI3c%3D","line":579,"updated":"2014-01-29 20:02:44.000000000","message":"Suggest\n\n self.assertEqual([], values)","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":576,"context_line":"        \"\"\"Should return 0 values, the email of the tester won\u0027t match.\"\"\""},{"line_number":577,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.BAD_TESTER_ASSERTION,"},{"line_number":578,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":579,"context_line":"        self.assertIs(len(values), 0)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def test_rule_engine_contractor(self):"},{"line_number":582,"context_line":"        \"\"\"Should return group 85a868.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGSY%3D","line":579,"in_reply_to":"AAAAUH%2F%2BI3c%3D","updated":"2014-01-30 06:46:35.000000000","message":"Done","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":579,"context_line":"        self.assertIs(len(values), 0)"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def test_rule_engine_contractor(self):"},{"line_number":582,"context_line":"        \"\"\"Should return group 85a868.\"\"\""},{"line_number":583,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.CONTRACTOR_ASSERTION,"},{"line_number":584,"context_line":"                                       mapping_fixtures.MAPPING_SMALL)"},{"line_number":585,"context_line":"        group_id \u003d \"85a868\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI3M%3D","line":582,"updated":"2014-01-29 20:02:44.000000000","message":"explain why. this comment applies to all these test functions.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"c6ac6ee3788cc66cb8d5cb67d0cc741350aaef80","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        \"\"\"Should return group 85a868.\"\"\""},{"line_number":583,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.CONTRACTOR_ASSERTION,"},{"line_number":584,"context_line":"                                       mapping_fixtures.MAPPING_SMALL)"},{"line_number":585,"context_line":"        group_id \u003d \"85a868\""},{"line_number":586,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":587,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BUBQ%3D","line":585,"updated":"2014-01-28 03:26:37.000000000","message":"Keystone hacking commandment: avoid using double quotes when you can reasonably use single quotes.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"210d2e90522bb2b7729e275a7e8cbc1ddc1b5c89","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        \"\"\"Should return group 85a868.\"\"\""},{"line_number":583,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.CONTRACTOR_ASSERTION,"},{"line_number":584,"context_line":"                                       mapping_fixtures.MAPPING_SMALL)"},{"line_number":585,"context_line":"        group_id \u003d \"85a868\""},{"line_number":586,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":587,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BI3Y%3D","line":585,"updated":"2014-01-29 20:02:44.000000000","message":"again, where does this come from?","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"5784e3e400a04fd7c96929aee26302628ec530f2","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        \"\"\"Should return group 85a868.\"\"\""},{"line_number":583,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.CONTRACTOR_ASSERTION,"},{"line_number":584,"context_line":"                                       mapping_fixtures.MAPPING_SMALL)"},{"line_number":585,"context_line":"        group_id \u003d \"85a868\""},{"line_number":586,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":587,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BGFw%3D","line":585,"in_reply_to":"AAAAUH%2F%2BI3Y%3D","updated":"2014-01-30 06:46:35.000000000","message":"I now reference a value in fixtures","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"c6ac6ee3788cc66cb8d5cb67d0cc741350aaef80","unresolved":false,"context_lines":[{"line_number":609,"context_line":"        \"\"\"Should return group 123 and xyz.\"\"\""},{"line_number":610,"context_line":"        values \u003d mapping_utils.process(mapping_fixtures.TESTER_ASSERTION,"},{"line_number":611,"context_line":"                                       mapping_fixtures.MAPPING_LARGE)"},{"line_number":612,"context_line":"        group_id \u003d \"123\""},{"line_number":613,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":614,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"},{"line_number":615,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BUBI%3D","line":612,"updated":"2014-01-28 03:26:37.000000000","message":"Keystone hacking commandment: avoid using double quotes when you can reasonably use single quotes.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"c6ac6ee3788cc66cb8d5cb67d0cc741350aaef80","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        group_value \u003d values[0][\u0027group\u0027]"},{"line_number":614,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"        group_id \u003d \"xyz\""},{"line_number":617,"context_line":"        group_value \u003d values[1][\u0027group\u0027]"},{"line_number":618,"context_line":"        self.assertEqual(group_value[\u0027id\u0027], group_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2BUBE%3D","line":616,"updated":"2014-01-28 03:26:37.000000000","message":"Keystone hacking commandment: avoid using double quotes when you can reasonably use single quotes.","commit_id":"b90492a7c1fdd6e67f541676f08a88305d238698"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a695f2da84085fda21f99762922468508f4bdc5e","unresolved":false,"context_lines":[{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        mapping \u003d mapping_fixtures.MAPPING_LARGE"},{"line_number":604,"context_line":"        assertion \u003d mapping_fixtures.ADMIN_ASSERTION"},{"line_number":605,"context_line":"        rp \u003d mapping_utils.RuleProcessor(mapping[\u0027rules\u0027])"},{"line_number":606,"context_line":"        values \u003d rp.process(assertion)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9bn4%3D","line":605,"updated":"2014-02-06 23:12:52.000000000","message":"how about change the fixtures to RULES_LARGE instead of MAPPING_LARGE?","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"85e43c06bca63fc1dd15e23a5bc3319363457297","unresolved":false,"context_lines":[{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        mapping \u003d mapping_fixtures.MAPPING_LARGE"},{"line_number":604,"context_line":"        assertion \u003d mapping_fixtures.ADMIN_ASSERTION"},{"line_number":605,"context_line":"        rp \u003d mapping_utils.RuleProcessor(mapping[\u0027rules\u0027])"},{"line_number":606,"context_line":"        values \u003d rp.process(assertion)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9ZrE%3D","line":605,"in_reply_to":"AAAAUH%2F9bn4%3D","updated":"2014-02-07 06:52:49.000000000","message":"Done, I ended up changing all the MAPPING_xyz to RULES_xyz, this caused quite a few changes all over this file, so if you want it split out, let me know.","commit_id":"f72cf8c90001370dedbba6e4b73dc918aa8c8a29"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"3a1a3535d1a4b594b972fe6c62896a7927e4c4ef","unresolved":false,"context_lines":[{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        mapping \u003d mapping_fixtures.RULES_LARGE"},{"line_number":604,"context_line":"        assertion \u003d mapping_fixtures.ADMIN_ASSERTION"},{"line_number":605,"context_line":"        rp \u003d mapping_utils.RuleProcessor(mapping[\u0027rules\u0027])"},{"line_number":606,"context_line":"        values \u003d rp.process(assertion)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2Ftk%3D","line":605,"updated":"2014-02-07 21:14:10.000000000","message":"I actually thought you\u0027d want to change this to \n\n rp \u003d mapping_utils.RuleProcessor(mapping_fixtures.RULES_LARGE)\n\ni.e., mapping_fixtures.RULES_LARGE would just be the rules that would get passed in to RuleProcessor.\n\nI\u0027m not sure I see the point of changing the name from mapping to rules if it\u0027s actually a mapping.","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"ddfc3126681c14b5bfebc8b22436412768318794","unresolved":false,"context_lines":[{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        mapping \u003d mapping_fixtures.RULES_LARGE"},{"line_number":604,"context_line":"        assertion \u003d mapping_fixtures.ADMIN_ASSERTION"},{"line_number":605,"context_line":"        rp \u003d mapping_utils.RuleProcessor(mapping[\u0027rules\u0027])"},{"line_number":606,"context_line":"        values \u003d rp.process(assertion)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"        fn \u003d mapping_fixtures.ADMIN_ASSERTION.get(\u0027FirstName\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUX%2F%2F%2Fi0%3D","line":605,"in_reply_to":"AAAAUX%2F%2F%2Ftk%3D","updated":"2014-02-07 22:40:31.000000000","message":"Reverting back to calling them MAPPING_, and leaving them as mappings, with a rules dict. \nReason for this is, the MappingCRUDTests also use the fixtures, and I\u0027d have to perform additional changes there, too.","commit_id":"0961e9fc145ac68633bd143a4dfb1dbb5ed16a8f"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":591,"context_line":"    \"\"\"A class for testing the mapping rule engine.\"\"\""},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"    def test_rule_engine_any_one_of_and_direct_mapping(self):"},{"line_number":594,"context_line":"        \"\"\"Should return user\u0027s name and group id 0cd5e9."},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"        The ADMIN_ASSERTION should successfully have a match in MAPPING_LARGE."},{"line_number":597,"context_line":"        The will test the case where `any_one_of` is valid, and there is"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F58g%3D","line":594,"updated":"2014-02-10 02:37:48.000000000","message":"change \"0cd5e9\" to \"EMPLOYEE_GROUP_ID\"","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":591,"context_line":"    \"\"\"A class for testing the mapping rule engine.\"\"\""},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"    def test_rule_engine_any_one_of_and_direct_mapping(self):"},{"line_number":594,"context_line":"        \"\"\"Should return user\u0027s name and group id 0cd5e9."},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"        The ADMIN_ASSERTION should successfully have a match in MAPPING_LARGE."},{"line_number":597,"context_line":"        The will test the case where `any_one_of` is valid, and there is"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzoo%3D","line":594,"in_reply_to":"AAAAUX%2F%2F58g%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        self.assertEqual(group_ids, [])"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"    def test_rule_engine_any_one_of_many_rules(self):"},{"line_number":638,"context_line":"        \"\"\"Should return group 85a868."},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"        The CONTRACTOR_ASSERTION should successfully have a match in"},{"line_number":641,"context_line":"        MAPPING_SMALL. This will test the case where many rules"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F58Q%3D","line":638,"updated":"2014-02-10 02:37:48.000000000","message":"change \"85a868\" to \"CONTRACTOR_GROUP_ID\"","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        self.assertEqual(group_ids, [])"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"    def test_rule_engine_any_one_of_many_rules(self):"},{"line_number":638,"context_line":"        \"\"\"Should return group 85a868."},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"        The CONTRACTOR_ASSERTION should successfully have a match in"},{"line_number":641,"context_line":"        MAPPING_SMALL. This will test the case where many rules"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzog%3D","line":638,"in_reply_to":"AAAAUX%2F%2F58Q%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        self.assertEqual(group_ids, [])"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"    def test_rule_engine_not_any_of_many_rules(self):"},{"line_number":680,"context_line":"        \"\"\"Should return group 0cd5e9."},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"        The EMPLOYEE_ASSERTION should successfully have a match in"},{"line_number":683,"context_line":"        MAPPING_SMALL. This will test the case where many remote"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F58E%3D","line":680,"updated":"2014-02-10 02:37:48.000000000","message":"change \"0cd5e9\" to \"EMPLOYEE_GROUP_ID\"","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        self.assertEqual(group_ids, [])"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"    def test_rule_engine_not_any_of_many_rules(self):"},{"line_number":680,"context_line":"        \"\"\"Should return group 0cd5e9."},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"        The EMPLOYEE_ASSERTION should successfully have a match in"},{"line_number":683,"context_line":"        MAPPING_SMALL. This will test the case where many remote"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzoc%3D","line":680,"in_reply_to":"AAAAUX%2F%2F58E%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"048a2f4729d38d0bd1cd13d3e7d8f2255b835c08","unresolved":false,"context_lines":[{"line_number":697,"context_line":"        self.assertIn(mapping_fixtures.EMPLOYEE_GROUP_ID, group_ids)"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def test_rule_engine_regex_match_and_many_groups(self):"},{"line_number":700,"context_line":"        \"\"\"Should return group 123 and xyz."},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        The TESTER_ASSERTION should successfully have a match in"},{"line_number":703,"context_line":"        MAPPING_LARGE. This will test a successful regex match"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2F578%3D","line":700,"updated":"2014-02-10 02:37:48.000000000","message":"change \"123 and xyz\" to the actual groups.","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"22a7942687759eddba2993095f87b1af9e33fe3d","unresolved":false,"context_lines":[{"line_number":697,"context_line":"        self.assertIn(mapping_fixtures.EMPLOYEE_GROUP_ID, group_ids)"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"    def test_rule_engine_regex_match_and_many_groups(self):"},{"line_number":700,"context_line":"        \"\"\"Should return group 123 and xyz."},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        The TESTER_ASSERTION should successfully have a match in"},{"line_number":703,"context_line":"        MAPPING_LARGE. This will test a successful regex match"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAUX%2F%2Fzow%3D","line":700,"in_reply_to":"AAAAUX%2F%2F578%3D","updated":"2014-02-10 17:46:40.000000000","message":"Done","commit_id":"d6d3e518a16d2343131ef313a33b5d22a14b96c1"}]}
