)]}'
{"specs/queens/approved/post-allocations.rst":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"* unclaim resources on the source host by consumer uuid"},{"line_number":40,"context_line":"* claim resources on the target host by consumer uuid"},{"line_number":41,"context_line":"* claim resources on the source host by migration uuid"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"},{"line_number":44,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_8f58d130","line":41,"updated":"2017-08-30 20:05:05.000000000","message":"This is fine for theory I think. However, the way I think it\u0027ll actually go is that we\u0027ll swap the instance claim for a migration claim, then call to the scheduler which will pick and claim for the instance the way it does on a boot. Otherwise we have to indicate to the scheduler (or have it guess) that we want to do a move and that it should do the swap along with its operation.","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"* unclaim resources on the source host by consumer uuid"},{"line_number":40,"context_line":"* claim resources on the target host by consumer uuid"},{"line_number":41,"context_line":"* claim resources on the source host by migration uuid"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"},{"line_number":44,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_01c83571","line":41,"in_reply_to":"7f287b81_8f58d130","updated":"2017-08-30 20:58:53.000000000","message":"I\u0027ll tune it to something real in the next version.","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Use Cases"},{"line_number":44,"context_line":"---------"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"As an end user or an operator I want to have reliable move operations that make"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Proposed change"},{"line_number":49,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_8fa6910e","line":46,"updated":"2017-08-30 20:05:05.000000000","message":"..that make.... that make .... WHAT? The suspense is killing me!","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Use Cases"},{"line_number":44,"context_line":"---------"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"As an end user or an operator I want to have reliable move operations that make"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Proposed change"},{"line_number":49,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_e1708942","line":46,"in_reply_to":"7f287b81_8fa6910e","updated":"2017-08-30 20:58:53.000000000","message":"weird I can distinctly remember typing something incredibly anodyne here.\n\nI probably managed to erase it somehow.\n\nIt was something like \"efficient use of resources.\"","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":54,"context_line":"or fail all of them if resources are not available or the allocation requests"},{"line_number":55,"context_line":"are malformed."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Details of the various options for the request body are discussed in :ref:`Rest"},{"line_number":58,"context_line":"API impact` below."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_0fb2a149","line":57,"range":{"start_line":57,"start_character":75,"end_line":57,"end_character":79},"updated":"2017-08-30 20:05:05.000000000","message":"caps","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":54,"context_line":"or fail all of them if resources are not available or the allocation requests"},{"line_number":55,"context_line":"are malformed."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Details of the various options for the request body are discussed in :ref:`Rest"},{"line_number":58,"context_line":"API impact` below."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_e1a529a0","line":57,"in_reply_to":"7f287b81_0fb2a149","updated":"2017-08-30 20:58:53.000000000","message":"Done","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":67,"context_line":"  that all allocations provided in the ``POST`` before the same logical user?"},{"line_number":68,"context_line":"  At the moment an `AllocationList` is the object that has the user information,"},{"line_number":69,"context_line":"  not the individual Allocation objects. Ideally we would be able to use the"},{"line_number":70,"context_line":"  existing `AllocationList.create_all()` method for satisfying the ``POST``."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* There\u0027s a bug about `asymmetric PUT and GET`_ for"},{"line_number":73,"context_line":"  ``/allocations/{consumer_uuid}``. If were to fix the ``PUT`` representation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_2fe55d38","line":70,"updated":"2017-08-30 20:05:05.000000000","message":"That\u0027s pretty workaroundable -- getting the api right is more important I think.\n\nAre you going to comment here with your opinion? I feel like one project per request is fine, but also don\u0027t want to get bitten later and so it feels like one of those \"should just make it flexible from the start\" kind of moments. Honestly not sure which way to go.","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"  that all allocations provided in the ``POST`` before the same logical user?"},{"line_number":68,"context_line":"  At the moment an `AllocationList` is the object that has the user information,"},{"line_number":69,"context_line":"  not the individual Allocation objects. Ideally we would be able to use the"},{"line_number":70,"context_line":"  existing `AllocationList.create_all()` method for satisfying the ``POST``."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* There\u0027s a bug about `asymmetric PUT and GET`_ for"},{"line_number":73,"context_line":"  ``/allocations/{consumer_uuid}``. If were to fix the ``PUT`` representation"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_01d95520","line":70,"in_reply_to":"7f287b81_2fe55d38","updated":"2017-08-30 20:58:53.000000000","message":"I didn\u0027t want to preload this with my opinions, but I agree with you it feels like a \"should make it flexible\".","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":70,"context_line":"  existing `AllocationList.create_all()` method for satisfying the ``POST``."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* There\u0027s a bug about `asymmetric PUT and GET`_ for"},{"line_number":73,"context_line":"  ``/allocations/{consumer_uuid}``. If were to fix the ``PUT`` representation"},{"line_number":74,"context_line":"  (that is, switch from list to dict as the structuring representation) then"},{"line_number":75,"context_line":"  we should presumably follow something similar to that in the ``POST``"},{"line_number":76,"context_line":"  representation."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_8fcd71b8","line":73,"range":{"start_line":73,"start_character":39,"end_line":73,"end_character":43},"updated":"2017-08-30 20:05:05.000000000","message":"we were","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"  existing `AllocationList.create_all()` method for satisfying the ``POST``."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* There\u0027s a bug about `asymmetric PUT and GET`_ for"},{"line_number":73,"context_line":"  ``/allocations/{consumer_uuid}``. If were to fix the ``PUT`` representation"},{"line_number":74,"context_line":"  (that is, switch from list to dict as the structuring representation) then"},{"line_number":75,"context_line":"  we should presumably follow something similar to that in the ``POST``"},{"line_number":76,"context_line":"  representation."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_21f7b18d","line":73,"in_reply_to":"7f287b81_8fcd71b8","updated":"2017-08-30 20:58:53.000000000","message":"weird","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  we should presumably follow something similar to that in the ``POST``"},{"line_number":76,"context_line":"  representation."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"* Do wish to allow the ``POST`` to assert that an allocation for a particular"},{"line_number":79,"context_line":"  consumer uuid is to be cleared. That is, if the value is an empty set of"},{"line_number":80,"context_line":"  resource providers and resources, should that operate as a `clear`? If our"},{"line_number":81,"context_line":"  goal is atomicity then at the end of some kinds of successful actions it might"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_0fb98113","line":78,"range":{"start_line":78,"start_character":5,"end_line":78,"end_character":9},"updated":"2017-08-30 20:05:05.000000000","message":"we wish","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  we should presumably follow something similar to that in the ``POST``"},{"line_number":76,"context_line":"  representation."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"* Do wish to allow the ``POST`` to assert that an allocation for a particular"},{"line_number":79,"context_line":"  consumer uuid is to be cleared. That is, if the value is an empty set of"},{"line_number":80,"context_line":"  resource providers and resources, should that operate as a `clear`? If our"},{"line_number":81,"context_line":"  goal is atomicity then at the end of some kinds of successful actions it might"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_e1ec09bc","line":78,"in_reply_to":"7f287b81_0fb98113","updated":"2017-08-30 20:58:53.000000000","message":"that it is twice","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"* Do wish to allow the ``POST`` to assert that an allocation for a particular"},{"line_number":79,"context_line":"  consumer uuid is to be cleared. That is, if the value is an empty set of"},{"line_number":80,"context_line":"  resource providers and resources, should that operate as a `clear`? If our"},{"line_number":81,"context_line":"  goal is atomicity then at the end of some kinds of successful actions it might"},{"line_number":82,"context_line":"  be useful to be able to say \"keep these and clear these\" in one request."},{"line_number":83,"context_line":"  Currently we separate those by saying nothing about keeping (because the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_cf65b9b6","line":80,"updated":"2017-08-30 20:05:05.000000000","message":"Yes. On revert, we will want to be able to replace the migration allocation with one for the instance. That means we need to be able to effectively DELETE and PUT in a single transaction to avoid a race or a similar double requirement.","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"* Do wish to allow the ``POST`` to assert that an allocation for a particular"},{"line_number":79,"context_line":"  consumer uuid is to be cleared. That is, if the value is an empty set of"},{"line_number":80,"context_line":"  resource providers and resources, should that operate as a `clear`? If our"},{"line_number":81,"context_line":"  goal is atomicity then at the end of some kinds of successful actions it might"},{"line_number":82,"context_line":"  be useful to be able to say \"keep these and clear these\" in one request."},{"line_number":83,"context_line":"  Currently we separate those by saying nothing about keeping (because the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_21257109","line":80,"in_reply_to":"7f287b81_cf65b9b6","updated":"2017-08-30 20:58:53.000000000","message":"In that case the discussion on https://bugs.launchpad.net/nova/+bug/1714072 and https://review.openstack.org/#/c/499270/ may want your input as it seems we ought to be consistent between PUT and POST. There are two forms:\n\n* empty resource provider clears resources on just that rp for that consumer\n* empty allocations for consumer clears all resources on all rps for that consumer","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":124,"context_line":"..code-block:: javascript"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    {"},{"line_number":127,"context_line":"        \"consumer-uuid\": {"},{"line_number":128,"context_line":"            \"allocations\": ["},{"line_number":129,"context_line":"                {"},{"line_number":130,"context_line":"                    \"resource_provider\": {"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_8fde913b","line":127,"range":{"start_line":127,"start_character":9,"end_line":127,"end_character":17},"updated":"2017-08-30 20:05:05.000000000","message":"Maybe change this to instance-, just to make it clear that our use-case is instance/migration since you have migration below? Alternately, you could replace both with \"consumer-a/b\" to avoid tying this to just this specific case.\n\nJust nit thoughts of course.","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":124,"context_line":"..code-block:: javascript"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    {"},{"line_number":127,"context_line":"        \"consumer-uuid\": {"},{"line_number":128,"context_line":"            \"allocations\": ["},{"line_number":129,"context_line":"                {"},{"line_number":130,"context_line":"                    \"resource_provider\": {"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_c17b4df2","line":127,"in_reply_to":"7f287b81_8fde913b","updated":"2017-08-30 20:58:53.000000000","message":"good idea","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"If we choose to resolve the `asymmetric PUT and GET`_ bug, then a different"},{"line_number":170,"context_line":"option could be:"},{"line_number":171,"context_line":"    "},{"line_number":172,"context_line":"..code-block:: javascript"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    {"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_afb4adf2","line":171,"updated":"2017-08-30 20:05:05.000000000","message":"-1!","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"dd41427f70fd9222790dc009d5b7fbefff5bd9a7","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"If we choose to resolve the `asymmetric PUT and GET`_ bug, then a different"},{"line_number":170,"context_line":"option could be:"},{"line_number":171,"context_line":"    "},{"line_number":172,"context_line":"..code-block:: javascript"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    {"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_297f9dab","line":171,"updated":"2017-08-30 19:16:14.000000000","message":"I\u0027ll get this later","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"If we choose to resolve the `asymmetric PUT and GET`_ bug, then a different"},{"line_number":170,"context_line":"option could be:"},{"line_number":171,"context_line":"    "},{"line_number":172,"context_line":"..code-block:: javascript"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    {"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_216a1119","line":171,"in_reply_to":"7f287b81_afb4adf2","updated":"2017-08-30 20:58:53.000000000","message":"Done","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e6598f18a99523173ba3319c68e4ba0f74aef425","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            project_id: \"$PROJECT_ID\","},{"line_number":200,"context_line":"            user_id: \"$USER_ID\""},{"line_number":201,"context_line":"        }"},{"line_number":202,"context_line":"    }"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"The author of this spec finds dicts a lot easier to work with in situations"},{"line_number":205,"context_line":"where you have legitimately unique keys in the data structure. Here we do, but"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_efa3d5b0","line":202,"updated":"2017-08-30 20:05:05.000000000","message":"I don\u0027t remember which is the right one, but this surely seems more betterer than the above one with the list.","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e17b23d4f4492b0a7ad8e5ae40146d6f9c54b8d4","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            project_id: \"$PROJECT_ID\","},{"line_number":200,"context_line":"            user_id: \"$USER_ID\""},{"line_number":201,"context_line":"        }"},{"line_number":202,"context_line":"    }"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"The author of this spec finds dicts a lot easier to work with in situations"},{"line_number":205,"context_line":"where you have legitimately unique keys in the data structure. Here we do, but"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f287b81_41587d86","line":202,"in_reply_to":"7f287b81_efa3d5b0","updated":"2017-08-30 20:58:53.000000000","message":"The first one is the one that is modelled on the current structure at PUT.","commit_id":"03d2ecdcea11a2701e203c7c935931eb0481483b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f47a5930e7e989ea0ec14895ddfabb3efacda710","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"With `migration allocations`_ we plan to have the resources claimed by a"},{"line_number":14,"context_line":"move-like operation represented by two allocations to the placement service:"},{"line_number":15,"context_line":"one identified by the instance uuid, the other by a migration uuid. This can"},{"line_number":16,"context_line":"currently be done by making two separate ``PUT`` requests to"},{"line_number":17,"context_line":"``/allocations/{consumer_uuid}`` in the `Placement API`_. This can work, but"},{"line_number":18,"context_line":"has risks as a race condition and requires two steps where logically we want"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_7783dacd","line":15,"range":{"start_line":15,"start_character":4,"end_line":15,"end_character":14},"updated":"2017-09-25 20:42:01.000000000","message":"s/identified/consumed","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0cd4b5d932db6bbe068b1b678a4b1f124f92ccec","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"With `migration allocations`_ we plan to have the resources claimed by a"},{"line_number":14,"context_line":"move-like operation represented by two allocations to the placement service:"},{"line_number":15,"context_line":"one identified by the instance uuid, the other by a migration uuid. This can"},{"line_number":16,"context_line":"currently be done by making two separate ``PUT`` requests to"},{"line_number":17,"context_line":"``/allocations/{consumer_uuid}`` in the `Placement API`_. This can work, but"},{"line_number":18,"context_line":"has risks as a race condition and requires two steps where logically we want"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_05f9fec6","line":15,"range":{"start_line":15,"start_character":4,"end_line":15,"end_character":14},"in_reply_to":"7f515b1d_7783dacd","updated":"2017-09-25 21:43:29.000000000","message":"No, I meant identified. The identifier of the consumption is the instance uuid and the migration uuid. That is the {consumer_uuid} part of the URI (the part doing the I-ing) is an instance uuid and a migration uuid\n\nAnd yes, I\u0027m feeling pedantic. I had a long bath.","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f47a5930e7e989ea0ec14895ddfabb3efacda710","unresolved":false,"context_lines":[{"line_number":72,"context_line":"this use case. ``PUT`` to the same URI violates HTTP semantics. That would mean"},{"line_number":73,"context_line":"\"replace all the allocations on the system with what I\u0027ve provided\". Using a"},{"line_number":74,"context_line":"different URI is hard to contemplate: ``PUT"},{"line_number":75,"context_line":"/allocations/{consumer_uuid},{migration_uuid},{some_uuid}``. No thank you."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Data model impact"},{"line_number":78,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_ff943546","line":75,"updated":"2017-09-25 20:42:01.000000000","message":"yeah, and I had a thought exercise on possibly using PATCH (against either /allocations or /allocations/{instance_uuid}) and semantically it just didn\u0027t work. :(","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"67957db150fdd8ef905034bd44092d27e571e724","unresolved":false,"context_lines":[{"line_number":94,"context_line":"* 400 Bad Request: When the JSON body does not match schema"},{"line_number":95,"context_line":"* 400 Bad Request: When a resource provider or resource class named in the body"},{"line_number":96,"context_line":"                   does not exist."},{"line_number":97,"context_line":"* 409 Conflict: When the at least one of the allocation will violate Inventory"},{"line_number":98,"context_line":"                constraints or available capacity."},{"line_number":99,"context_line":"* 409 Conflict: When, during the allocation process there is a resource"},{"line_number":100,"context_line":"                provider generation mismatch (if this happens the client should"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_2a8009c0","line":97,"range":{"start_line":97,"start_character":21,"end_line":97,"end_character":27},"updated":"2017-09-27 14:08:16.000000000","message":"nit: at","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e7c7267bb90c19bae0c7c1b55cb8eff0aad3c3fe","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                   does not exist."},{"line_number":97,"context_line":"* 409 Conflict: When the at least one of the allocation will violate Inventory"},{"line_number":98,"context_line":"                constraints or available capacity."},{"line_number":99,"context_line":"* 409 Conflict: When, during the allocation process there is a resource"},{"line_number":100,"context_line":"                provider generation mismatch (if this happens the client should"},{"line_number":101,"context_line":"                retry)."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":".. highlight:: javascript"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_960a2acf","line":101,"range":{"start_line":99,"start_character":16,"end_line":101,"end_character":23},"updated":"2017-10-02 20:19:54.000000000","message":"How do we tell the difference between this and the previous 409?  (To know whether to retry.)","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"af00088b17d88ebbd09715423df3ed438d140f46","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                   does not exist."},{"line_number":97,"context_line":"* 409 Conflict: When the at least one of the allocation will violate Inventory"},{"line_number":98,"context_line":"                constraints or available capacity."},{"line_number":99,"context_line":"* 409 Conflict: When, during the allocation process there is a resource"},{"line_number":100,"context_line":"                provider generation mismatch (if this happens the client should"},{"line_number":101,"context_line":"                retry)."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":".. highlight:: javascript"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_99949d38","line":101,"range":{"start_line":99,"start_character":16,"end_line":101,"end_character":23},"in_reply_to":"7f515b1d_960a2acf","updated":"2017-10-02 20:53:07.000000000","message":"There\u0027s a different response body error message. I know, sucks not having actual fault codes, but is what it is.","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e7c7267bb90c19bae0c7c1b55cb8eff0aad3c3fe","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    {"},{"line_number":112,"context_line":"        \"instance-uuid\": {"},{"line_number":113,"context_line":"            \"allocations\": ["},{"line_number":114,"context_line":"                {"},{"line_number":115,"context_line":"                    \"resource_provider\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_d68b02bd","line":112,"range":{"start_line":112,"start_character":9,"end_line":112,"end_character":22},"updated":"2017-10-02 20:19:54.000000000","message":"Sorry, is this a UUID or the literal string \"instance-uuid\".  If the former, it should be represented here in the spec with a $ like the others below.","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8eb01e86bebafb94965e570806d972a03ab6a1d9","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    {"},{"line_number":112,"context_line":"        \"instance-uuid\": {"},{"line_number":113,"context_line":"            \"allocations\": ["},{"line_number":114,"context_line":"                {"},{"line_number":115,"context_line":"                    \"resource_provider\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_6636d105","line":112,"range":{"start_line":112,"start_character":9,"end_line":112,"end_character":22},"in_reply_to":"7f515b1d_d68b02bd","updated":"2017-10-03 10:18:13.000000000","message":"yeah that should have a $\n\nI\u0027ll submit a followup which has some of the corrections and clarifications, for the sake of future readers.","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e7c7267bb90c19bae0c7c1b55cb8eff0aad3c3fe","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            \"project_id\": \"$PROJECT_ID\","},{"line_number":133,"context_line":"            \"user_id\": \"$USER_ID\""},{"line_number":134,"context_line":"        },"},{"line_number":135,"context_line":"        \"migration-uuid\": {"},{"line_number":136,"context_line":"            \"allocations\": ["},{"line_number":137,"context_line":"                {"},{"line_number":138,"context_line":"                    \"resource_provider\": {"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_9668eaf4","line":135,"range":{"start_line":135,"start_character":9,"end_line":135,"end_character":24},"updated":"2017-10-02 20:19:54.000000000","message":"Ditto.","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e7c7267bb90c19bae0c7c1b55cb8eff0aad3c3fe","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            \"project_id\": \"$PROJECT_ID\","},{"line_number":148,"context_line":"            \"user_id\": \"$USER_ID\""},{"line_number":149,"context_line":"        }"},{"line_number":150,"context_line":"    }"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"This would allow us to reused existing schema to compose the new schema."},{"line_number":153,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_165d1a46","line":150,"updated":"2017-10-02 20:19:54.000000000","message":"What is the semantic for $INSTANCE_UUID and/or $MIGRATION_UUID existing beforehand?  That is, is it an error to submit this request when either/both either lacks or already has an allocation against it?\n\nBased on the semantic of PUT /allocations/{consumer_uuid}, I assume the answer is, \"no restrictions\".  If no allocation exists for either one, it is created; if an allocation exists for either one, it is modified (or deleted if its payload is empty, as noted below).","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8eb01e86bebafb94965e570806d972a03ab6a1d9","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            \"project_id\": \"$PROJECT_ID\","},{"line_number":148,"context_line":"            \"user_id\": \"$USER_ID\""},{"line_number":149,"context_line":"        }"},{"line_number":150,"context_line":"    }"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"This would allow us to reused existing schema to compose the new schema."},{"line_number":153,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_661ff16b","line":150,"in_reply_to":"7f515b1d_165d1a46","updated":"2017-10-03 10:18:13.000000000","message":"That\u0027s right. Another way to word it is to say that an allocation write is always a set_allocations, which means the same thing as you said.\n\nYou may have also noticed that there is no validation of a consumer uuid.","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f47a5930e7e989ea0ec14895ddfabb3efacda710","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"The author of this spec finds dicts a lot easier to work with in situations"},{"line_number":190,"context_line":"where you have legitimately unique keys in the data structure. Here we do, but"},{"line_number":191,"context_line":"changing things may be more than we want to do."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"In either case, an empty value for the ``allocations`` key will mean that the"},{"line_number":194,"context_line":"allocations for that consumer will be removed."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_7fdde512","line":191,"updated":"2017-09-25 20:42:01.000000000","message":"if we want to address the asymmetric put/get thing, we should do it *early* in Queens. i.e. now.","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0cd4b5d932db6bbe068b1b678a4b1f124f92ccec","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"The author of this spec finds dicts a lot easier to work with in situations"},{"line_number":190,"context_line":"where you have legitimately unique keys in the data structure. Here we do, but"},{"line_number":191,"context_line":"changing things may be more than we want to do."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"In either case, an empty value for the ``allocations`` key will mean that the"},{"line_number":194,"context_line":"allocations for that consumer will be removed."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_05221e53","line":191,"in_reply_to":"7f515b1d_7fdde512","updated":"2017-09-25 21:43:29.000000000","message":"aye","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f47a5930e7e989ea0ec14895ddfabb3efacda710","unresolved":false,"context_lines":[{"line_number":191,"context_line":"changing things may be more than we want to do."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"In either case, an empty value for the ``allocations`` key will mean that the"},{"line_number":194,"context_line":"allocations for that consumer will be removed."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"Security impact"},{"line_number":197,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_dfcbb947","line":194,"updated":"2017-09-25 20:42:01.000000000","message":"ack","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e7c7267bb90c19bae0c7c1b55cb8eff0aad3c3fe","unresolved":false,"context_lines":[{"line_number":279,"context_line":"History"},{"line_number":280,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"Optional section intended to be used each time the spec is updated to describe"},{"line_number":283,"context_line":"new design, API or any database schema updated. Useful to let reader understand"},{"line_number":284,"context_line":"what\u0027s happened along the time."},{"line_number":285,"context_line":""},{"line_number":286,"context_line":".. list-table:: Revisions"},{"line_number":287,"context_line":"   :header-rows: 1"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_3624965d","line":284,"range":{"start_line":282,"start_character":0,"end_line":284,"end_character":31},"updated":"2017-10-02 20:19:54.000000000","message":"remove boilerplate","commit_id":"64d8dca732de4c5464edf84e2ca0386f50ff6d55"}]}
