)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c9fae95dd37e1d8c6e5a6f7d66665c63667e1cd5","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    {\u0027allocations\u0027:"},{"line_number":30,"context_line":"      {"},{"line_number":31,"context_line":"        \u0027$resource_provider_uuid1\u0027: {"},{"line_number":32,"context_line":"           \u0027VCPU\u0027: 4,"},{"line_number":33,"context_line":"           \u0027DISK_GB\u0027: 20"},{"line_number":34,"context_line":"        }"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a89bdaa_cfee3721","line":31,"updated":"2016-09-08 16:31:32.000000000","message":"We should return the provider generations, so I think it might be better to structure this response like so:\n\n {\n   \u0027resource_providers\u0027: {\n     \u0027$provider_uuid1\u0027: {\n       \u0027generation\u0027: \u003cNUMBER\u003e,\n       \u0027allocations\u0027: {\n         \u0027VCPU\u0027: 4,\n         \u0027DISK_GB\u0027: 20\n       }\n     },\n     \u0027$provider_uuid2\u0027: {\n       \u0027generation\u0027: \u003cNUMBER\u003e,\n       \u0027allocations\u0027: {\n         \u0027IPV4_ADDRESS\u0027: 10\n       }\n     }\n   }\n }","commit_id":"7fa83138232c70b104b0cdf709c9e3df7bac65ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"71e12119b95a9e32d4543ad8f1539973f00964e7","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    {\u0027allocations\u0027:"},{"line_number":30,"context_line":"      {"},{"line_number":31,"context_line":"        \u0027$resource_provider_uuid1\u0027: {"},{"line_number":32,"context_line":"           \u0027VCPU\u0027: 4,"},{"line_number":33,"context_line":"           \u0027DISK_GB\u0027: 20"},{"line_number":34,"context_line":"        }"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a89bdaa_2116d74b","line":31,"in_reply_to":"9a89bdaa_afc9f327","updated":"2016-09-08 17:30:40.000000000","message":"Agree with Dan on not adding the RP as another level. If the RP generation is truly needed, I think it would be best to simply add it as follows:\n\n {\n   \u0027allocations\u0027: {\n     \u0027$provider_uuid1\u0027: {\n       \u0027generation\u0027: \u003cNUMBER\u003e,\n       \u0027VCPU\u0027: 4,\n       \u0027DISK_GB\u0027: 20\n     },\n     \u0027$provider_uuid2\u0027: {\n       \u0027generation\u0027: \u003cNUMBER\u003e,\n       \u0027IPV4_ADDRESS\u0027: 10\n     }\n   }\n }","commit_id":"7fa83138232c70b104b0cdf709c9e3df7bac65ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e4f06612be4e9a926682cb9c0a53bc8172e0af6f","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    {\u0027allocations\u0027:"},{"line_number":30,"context_line":"      {"},{"line_number":31,"context_line":"        \u0027$resource_provider_uuid1\u0027: {"},{"line_number":32,"context_line":"           \u0027VCPU\u0027: 4,"},{"line_number":33,"context_line":"           \u0027DISK_GB\u0027: 20"},{"line_number":34,"context_line":"        }"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a89bdaa_ef805bf9","line":31,"in_reply_to":"9a89bdaa_cfee3721","updated":"2016-09-08 16:36:28.000000000","message":"I don\u0027t see why we need to have \u0027resource_providers\u0027 as another level in the hierarchy, but that\u0027s not a huge deal. Having the generation doesn\u0027t give me anything I need from the client side (as of yet, can\u0027t see why I need it there). But, it doesn\u0027t hurt anything and it\u0027s more info, so ... sure.","commit_id":"7fa83138232c70b104b0cdf709c9e3df7bac65ed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d117b97ac3fe1f45ed4eb4961868afabd0e5dda3","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    {\u0027allocations\u0027:"},{"line_number":30,"context_line":"      {"},{"line_number":31,"context_line":"        \u0027$resource_provider_uuid1\u0027: {"},{"line_number":32,"context_line":"           \u0027VCPU\u0027: 4,"},{"line_number":33,"context_line":"           \u0027DISK_GB\u0027: 20"},{"line_number":34,"context_line":"        }"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a89bdaa_afc9f327","line":31,"in_reply_to":"9a89bdaa_ef805bf9","updated":"2016-09-08 16:40:44.000000000","message":"prefer the top level to just be allocations like you have it.","commit_id":"7fa83138232c70b104b0cdf709c9e3df7bac65ed"}],"nova/api/openstack/placement/handlers/allocation.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"fd42daddd243db2ef0d366eedb9de45cb3590ff7","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    allocation_data \u003d collections.defaultdict(dict)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    for allocation in allocations:"},{"line_number":72,"context_line":"        key \u003d key_fetcher(allocation)"},{"line_number":73,"context_line":"        if \u0027resources\u0027 not in allocation_data[key]:"},{"line_number":74,"context_line":"            allocation_data[key][\u0027resources\u0027] \u003d {}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a89bdaa_c85548fa","line":72,"range":{"start_line":72,"start_character":14,"end_line":72,"end_character":37},"updated":"2016-09-08 19:22:30.000000000","message":"If key_fetcher is None (the default), this will cause an error to be raised. I know your code always supplied a value, but either the param should be made non-optional, or it should have a default assigned if it is None. My preference would to make it non-optional.","commit_id":"8644412934f39ee9459f2fee18651b2bdeea18d1"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8bb6f44e1b3504fbbdc485c07426843101d3cf2e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    allocation_data \u003d collections.defaultdict(dict)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    for allocation in allocations:"},{"line_number":72,"context_line":"        key \u003d key_fetcher(allocation)"},{"line_number":73,"context_line":"        if \u0027resources\u0027 not in allocation_data[key]:"},{"line_number":74,"context_line":"            allocation_data[key][\u0027resources\u0027] \u003d {}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a89bdaa_285cf449","line":72,"in_reply_to":"9a89bdaa_c85548fa","updated":"2016-09-08 19:43:48.000000000","message":"Yeah, excellent point. It\u0027s too late in the day to be writing this kind of code.","commit_id":"8644412934f39ee9459f2fee18651b2bdeea18d1"}],"nova/tests/functional/api/openstack/placement/gabbits/allocations.yaml":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5c86bdc64a92751190c9c044babb8dbe3e53ad4a","unresolved":false,"context_lines":[{"line_number":219,"context_line":"- name: check allocations by consumer id"},{"line_number":220,"context_line":"  GET: /allocations/833f0885-f78c-4788-bb2b-3607b0656be7"},{"line_number":221,"context_line":"  response_json_paths:"},{"line_number":222,"context_line":"      # TODO(cdent): Can\u0027t currently do substituion on left hand"},{"line_number":223,"context_line":"      # side of json path in gabbi, a bug has been made. In the"},{"line_number":224,"context_line":"      # meantime we have to jump over it. This works because we only"},{"line_number":225,"context_line":"      # have one resource provider in this output."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9a89bdaa_c2e7aeaa","line":222,"updated":"2016-09-09 16:28:43.000000000","message":"s/substituion/substitution/","commit_id":"eab8100b429a0b781b7a5322cecffeffa43d20d2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5c86bdc64a92751190c9c044babb8dbe3e53ad4a","unresolved":false,"context_lines":[{"line_number":230,"context_line":"- name: check allocations by diferent consumer id"},{"line_number":231,"context_line":"  GET: /allocations/599ffd2d-526a-4b2e-8683-f13ad25f9958"},{"line_number":232,"context_line":"  response_json_paths:"},{"line_number":233,"context_line":"      # TODO(cdent): Can\u0027t currently do substituion on left hand"},{"line_number":234,"context_line":"      # side of json path in gabbi, a bug has been made. In the"},{"line_number":235,"context_line":"      # meantime we have to jump over the resource provider (which"},{"line_number":236,"context_line":"      # we don\u0027t know as a static value). This works because we only"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9a89bdaa_42fc7e3e","line":233,"updated":"2016-09-09 16:28:43.000000000","message":"ditto","commit_id":"eab8100b429a0b781b7a5322cecffeffa43d20d2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5c86bdc64a92751190c9c044babb8dbe3e53ad4a","unresolved":false,"context_lines":[{"line_number":238,"context_line":"      $.allocations..generation: 7"},{"line_number":239,"context_line":"      $.allocations..DISK_GB: 10"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"# - name: create another two resource providers"},{"line_number":242,"context_line":"- name: create resource provider 1"},{"line_number":243,"context_line":"  POST: /resource_providers"},{"line_number":244,"context_line":"  request_headers:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9a89bdaa_22869ab9","line":241,"updated":"2016-09-09 16:28:43.000000000","message":"leftover from something?","commit_id":"eab8100b429a0b781b7a5322cecffeffa43d20d2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"980bc3bc1d852d122aff161008672f6fefc4dd91","unresolved":false,"context_lines":[{"line_number":238,"context_line":"      $.allocations..generation: 7"},{"line_number":239,"context_line":"      $.allocations..DISK_GB: 10"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"# - name: create another two resource providers"},{"line_number":242,"context_line":"- name: create resource provider 1"},{"line_number":243,"context_line":"  POST: /resource_providers"},{"line_number":244,"context_line":"  request_headers:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"9a89bdaa_8f306aa0","line":241,"in_reply_to":"9a89bdaa_22869ab9","updated":"2016-09-09 17:46:47.000000000","message":"Yeah, I\u0027ll start a clean up on these.","commit_id":"eab8100b429a0b781b7a5322cecffeffa43d20d2"}]}
