)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3704e27aa92c0e1b9d1c40a92456c7839a9947e8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add support for member_of/aggregate-uuid when listing allocation"},{"line_number":10,"context_line":"candidates. The choice of arguments intentionally mirrors those"},{"line_number":11,"context_line":"used when listing resource providers, which means that the term"},{"line_number":12,"context_line":"\u0027member of\u0027 is not used."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Note that microversion 1.24 [1] is going to make argument parsing"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fce034c_bae12a01","line":11,"updated":"2019-04-12 16:17:22.000000000","message":"I had initially used --aggregate when testing this and then realized that the option is --aggregate-uuid and surprisingly enough it works:\n\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.21 allocation candidate list --resource VCPU\u003d1 --aggregate 118bc9aa-387e-4bad-bc41-e9b11f2c1a6e\n+---+------------+--------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| # | allocation | resource provider                    | inventory used/capacity | traits                                                                                                                                                                                                                                                        |\n+---+------------+--------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| 1 | VCPU\u003d1     | 9a153de3-8e14-4d85-acba-6ea669fb9057 | VCPU\u003d0/128              | HW_CPU_X86_SSE2,COMPUTE_DEVICE_TAGGING,HW_CPU_X86_SSE,HW_CPU_X86_MMX,COMPUTE_TRUSTED_CERTS,HW_CPU_X86_SVM,COMPUTE_VOLUME_EXTEND,COMPUTE_NET_ATTACH_INTERFACE_WITH_TAG,COMPUTE_NET_ATTACH_INTERFACE,COMPUTE_VOLUME_ATTACH_WITH_TAG,COMPUTE_VOLUME_MULTI_ATTACH |\n+---+------------+--------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n\nOSC must have some option name completion going on or something.","commit_id":"d7c1f33d06e210e718830bef1d2cd3a9377c02ea"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c931f80adf9709e300db09a32c2c432e0f91ca3f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"in this area considerably more complex. Not for the computer, but"},{"line_number":16,"context_line":"the humans using the tool. For now we probably want to do what\u0027s"},{"line_number":17,"context_line":"here, to do the aforementioned mirroring, but when we get to 1.24"},{"line_number":18,"context_line":"we\u0027ll need some brains."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] https://docs.openstack.org/placement/latest/placement-api-microversion-history.html#support-multiple-member-of-queryparams"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_cb53d638","line":18,"updated":"2019-03-22 13:37:31.000000000","message":"In 1.24 we could expose the \u0027in:\u0027 syntax on the CLI to help the human parsing.\n\n--aggregate in:uuid1,uuid2 --aggregate in:uuid1,uuid3","commit_id":"d7c1f33d06e210e718830bef1d2cd3a9377c02ea"}],"osc_placement/resources/allocation_candidate.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3704e27aa92c0e1b9d1c40a92456c7839a9947e8","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            metavar\u003d\u0027\u003caggregate_uuid\u003e\u0027,"},{"line_number":94,"context_line":"            help\u003d\u0027UUID of the resource provider aggregate of which the \u0027"},{"line_number":95,"context_line":"                 \u0027returned allocation candidates are a member. The returned \u0027"},{"line_number":96,"context_line":"                 \u0027allocation candidates must be associated with at least one \u0027"},{"line_number":97,"context_line":"                 \u0027of the aggregates identified by uuid. \u0027"},{"line_number":98,"context_line":"                 \u0027May be repeated.\\n\\n\u0027"},{"line_number":99,"context_line":"                 \u0027This param requires at least \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_fa8ed22c","line":96,"range":{"start_line":96,"start_character":59,"end_line":96,"end_character":76},"updated":"2019-04-12 16:17:22.000000000","message":"Yeah that makes sense with the IN I guess, at first I thought this was all and was confused why this was working:\n\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.1 resource provider aggregate list 9a153de3-8e14-4d85-acba-6ea669fb9057\n+--------------------------------------+\n| uuid                                 |\n+--------------------------------------+\n| 118bc9aa-387e-4bad-bc41-e9b11f2c1a6e |\n+--------------------------------------+\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.21 allocation candidate list --resource VCPU\u003d1 --aggregate-uuid 118bc9aa-387e-4bad-bc41-e9b11f2c1a6e --aggregate-uuid 118bc9aa-387e-4bad-bc41-e9b11f2c1a6f\n+---+------------+--------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| # | allocation | resource provider                    | inventory used/capacity | traits                                                                                                                                                                                                                                                        |\n+---+------------+--------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| 1 | VCPU\u003d1     | 9a153de3-8e14-4d85-acba-6ea669fb9057 | VCPU\u003d0/128              | HW_CPU_X86_SSE2,COMPUTE_DEVICE_TAGGING,HW_CPU_X86_SSE,HW_CPU_X86_MMX,COMPUTE_TRUSTED_CERTS,HW_CPU_X86_SVM,COMPUTE_VOLUME_EXTEND,COMPUTE_NET_ATTACH_INTERFACE_WITH_TAG,COMPUTE_NET_ATTACH_INTERFACE,COMPUTE_VOLUME_ATTACH_WITH_TAG,COMPUTE_VOLUME_MULTI_ATTACH |\n+---+------------+--------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.21 allocation candidate list --resource VCPU\u003d1 --aggregate-uuid 118bc9aa-387e-4bad-bc41-e9b11f2c1a6f\n\nstack@train:~/osc-placement$","commit_id":"d7c1f33d06e210e718830bef1d2cd3a9377c02ea"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3704e27aa92c0e1b9d1c40a92456c7839a9947e8","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            params[\u0027required\u0027] \u003d \u0027,\u0027.join(parsed_args.required)"},{"line_number":129,"context_line":"        if \u0027aggregate_uuid\u0027 in parsed_args and parsed_args.aggregate_uuid:"},{"line_number":130,"context_line":"            # Fail if --aggregate_uuid but not high enough microversion."},{"line_number":131,"context_line":"            self.check_version(version.ge(\u00271.21\u0027))"},{"line_number":132,"context_line":"            params[\u0027member_of\u0027] \u003d \u0027in:\u0027 + \u0027,\u0027.join(parsed_args.aggregate_uuid)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        resp \u003d http.request(\u0027GET\u0027, BASE_URL, params\u003dparams).json()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_fa93324e","line":131,"updated":"2019-04-12 16:17:22.000000000","message":"Yup: stack@train:~/osc-placement$ openstack --os-placement-api-version 1.20 allocation candidate list --resource VCPU\u003d1 --aggregate-uuid 118bc9aa-387e-4bad-bc41-e9b11f2c1a6e\nOperation or argument is not supported with version 1.20\n\n\nWe could definitely make that more useful a la:\n\nhttps://review.openstack.org/#/c/652100/\n\nAnd ^ could also be improved to pass the option name as well.\n\nBut that\u0027s a follow up thing.","commit_id":"d7c1f33d06e210e718830bef1d2cd3a9377c02ea"}]}
