)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f26632ab38ad3b55ba62b7f33cde13b0314f2baa","unresolved":false,"context_lines":[{"line_number":16,"context_line":"With [1] we added the ability to amend/append inventories with a new"},{"line_number":17,"context_line":"``--amend`` option. This follows a similar principle for amending the"},{"line_number":18,"context_line":"trait list in place: you can now specify ``--amend`` and any"},{"line_number":19,"context_line":"``--trait``s are appended to the existing trait list. A new"},{"line_number":20,"context_line":"``--no-trait`` option, which may similarly be repeated, allows you to"},{"line_number":21,"context_line":"remove traits from the existing trait list."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":" openstack resource provider trait set --amend \\"},{"line_number":24,"context_line":"    --trait CUSTOM_ADD_THIS_ONE --trait CUSTOM_AND_THIS_ONE \\"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_727ccbb5","line":21,"range":{"start_line":19,"start_character":54,"end_line":21,"end_character":43},"updated":"2019-10-28 21:10:42.000000000","message":"Stack this on top of the --amend patch.","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6707e77a20a86e91cb50dd238bc96fab78a1550b","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":" openstack resource provider trait set --amend \\"},{"line_number":24,"context_line":"    --trait CUSTOM_ADD_THIS_ONE --trait CUSTOM_AND_THIS_ONE \\"},{"line_number":25,"context_line":"    --no-trait CUSTOM_REMOVE_THIS_ONE --no-trait CUSTOM_ALSO_THIS"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Other semantics of note:"},{"line_number":28,"context_line":"- Works with standard and custom traits."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_9e6d46ce","line":25,"updated":"2019-10-21 15:44:14.000000000","message":"Do we like this syntax? Other options:\n\n- Break compat and make `set` append and add `unset` to remove. Both would work with --trait (repeatable). Cons: breaks compat; can\u0027t add \u0026 remove in a single operation (which is probably fine).\n- New `add` and `remove` commands.\n- Some form of ... trait set --append $NAME and --remove $NAME (both repeatable). --add-trait/--remove-trait? These would have to be mutually exclusive with --trait, which is a bit ick.","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f26632ab38ad3b55ba62b7f33cde13b0314f2baa","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":" openstack resource provider trait set --amend \\"},{"line_number":24,"context_line":"    --trait CUSTOM_ADD_THIS_ONE --trait CUSTOM_AND_THIS_ONE \\"},{"line_number":25,"context_line":"    --no-trait CUSTOM_REMOVE_THIS_ONE --no-trait CUSTOM_ALSO_THIS"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Other semantics of note:"},{"line_number":28,"context_line":"- Works with standard and custom traits."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_922707c8","line":25,"in_reply_to":"3fa7e38b_9e6d46ce","updated":"2019-10-28 21:10:42.000000000","message":"Compared to some other OSC commands like server set with --property:\n\nhttps://docs.openstack.org/python-openstackclient/latest/cli/command-objects/server.html#server-set\n\nThe --amend thing is different since with server set --property you don\u0027t have to specify --amend (nor is server set a full replacement of the metadata).\n\nTo remove server metadata, you have to use server unset --property:\n\nhttps://docs.openstack.org/python-openstackclient/latest/cli/command-objects/server.html#server-unset\n\nThat\u0027s different from how port tags are done:\n\nhttps://docs.openstack.org/python-openstackclient/latest/cli/command-objects/port.html#port-set\n\nFor that one, you can add tags using --tag, --no-tag to remove all tags, and combine them to replace all tags. And you can use port unset --tag to remove a single tag:\n\nhttps://docs.openstack.org/python-openstackclient/latest/cli/command-objects/port.html#port-unset\n\nOr port unset --all-tag to remove all tags.\n\nSo if you did just --no-trait to remove a single trait rather than all, it would not jive with the port set command. Consistency with this stuff is hard, especially since we don\u0027t have a resource provider trait unset command (but we could add one).\n\nWhat would happen if I did resource provider trait set --no-trait without --amend? I\u0027m assuming it would just remove all traits right? Similar to port set --no-tag.","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6707e77a20a86e91cb50dd238bc96fab78a1550b","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Other semantics of note:"},{"line_number":28,"context_line":"- Works with standard and custom traits."},{"line_number":29,"context_line":"- With --amend, both --trait and --no-trait are idempotent (traits"},{"line_number":30,"context_line":"  specified to ``--trait``/``--no-trait`` which are already"},{"line_number":31,"context_line":"  present/absent, respectively, will be ignored)."},{"line_number":32,"context_line":"- As previously, custom traits must be registered (``openstack trait"},{"line_number":33,"context_line":"  add``) before they can be added to a resource provider. However,"},{"line_number":34,"context_line":"  existence is not checked for removals, meaning that a nonexistent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_a3382dee","line":31,"range":{"start_line":29,"start_character":0,"end_line":31,"end_character":49},"updated":"2019-10-21 15:44:14.000000000","message":"is this okay, or should we make an attempt to validate that what you\u0027re trying to add/remove doesn\u0027t/does already exist on the provider?","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f26632ab38ad3b55ba62b7f33cde13b0314f2baa","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Other semantics of note:"},{"line_number":28,"context_line":"- Works with standard and custom traits."},{"line_number":29,"context_line":"- With --amend, both --trait and --no-trait are idempotent (traits"},{"line_number":30,"context_line":"  specified to ``--trait``/``--no-trait`` which are already"},{"line_number":31,"context_line":"  present/absent, respectively, will be ignored)."},{"line_number":32,"context_line":"- As previously, custom traits must be registered (``openstack trait"},{"line_number":33,"context_line":"  add``) before they can be added to a resource provider. However,"},{"line_number":34,"context_line":"  existence is not checked for removals, meaning that a nonexistent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_521f4f6b","line":31,"range":{"start_line":29,"start_character":0,"end_line":31,"end_character":49},"in_reply_to":"3fa7e38b_a3382dee","updated":"2019-10-28 21:10:42.000000000","message":"I don\u0027t think we need to do validation client-side for that, e.g. if I want to remove CUSTOM_FOO and that trait isn\u0027t on the provider, then who cares - it\u0027s already in the state I want. The client should probably validate, however, that the set of --trait(s) and --no-trait(s) are mutually exclusive.","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6707e77a20a86e91cb50dd238bc96fab78a1550b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  present/absent, respectively, will be ignored)."},{"line_number":32,"context_line":"- As previously, custom traits must be registered (``openstack trait"},{"line_number":33,"context_line":"  add``) before they can be added to a resource provider. However,"},{"line_number":34,"context_line":"  existence is not checked for removals, meaning that a nonexistent"},{"line_number":35,"context_line":"  custom trait on the removal list is ignored (because it is obviously"},{"line_number":36,"context_line":"  not already on the resource provider, because it would have needed to"},{"line_number":37,"context_line":"  exist)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_9ea226fc","line":34,"range":{"start_line":34,"start_character":2,"end_line":34,"end_character":39},"updated":"2019-10-21 15:44:14.000000000","message":"Is this okay? It probably means a typo. Should we try to check?","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f26632ab38ad3b55ba62b7f33cde13b0314f2baa","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  present/absent, respectively, will be ignored)."},{"line_number":32,"context_line":"- As previously, custom traits must be registered (``openstack trait"},{"line_number":33,"context_line":"  add``) before they can be added to a resource provider. However,"},{"line_number":34,"context_line":"  existence is not checked for removals, meaning that a nonexistent"},{"line_number":35,"context_line":"  custom trait on the removal list is ignored (because it is obviously"},{"line_number":36,"context_line":"  not already on the resource provider, because it would have needed to"},{"line_number":37,"context_line":"  exist)."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_12155749","line":34,"range":{"start_line":34,"start_character":2,"end_line":34,"end_character":39},"in_reply_to":"3fa7e38b_9ea226fc","updated":"2019-10-28 21:10:42.000000000","message":"I think the same as above - if I want to remove X and X doesn\u0027t exist already, it\u0027s fine - things are already in the state I want them in.","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"}],"osc_placement/resources/trait.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f26632ab38ad3b55ba62b7f33cde13b0314f2baa","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    \"\"\"Associate traits with the resource provider identified by {uuid}."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    All the associated traits will be replaced by the traits specified."},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    This command requires at least ``--os-placement-api-version 1.6``."},{"line_number":189,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_126eb7ff","line":186,"range":{"start_line":186,"start_character":38,"end_line":186,"end_character":46},"updated":"2019-10-28 21:10:42.000000000","message":"This needs updating.","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f26632ab38ad3b55ba62b7f33cde13b0314f2baa","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        )"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        parser.add_argument("},{"line_number":201,"context_line":"            \u0027--amend\u0027,"},{"line_number":202,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":203,"context_line":"            help\u003d\u0027If this option is specified, traits given via the --trait \u0027"},{"line_number":204,"context_line":"                 \u0027option will be added to the existing traits on the provider \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_f268bbf4","line":201,"updated":"2019-10-28 21:10:42.000000000","message":"Split this out from the --no-trait change for easier readability and testing. I had Mel do the same thing with the inventory set options when she added them.","commit_id":"b69c41f01540460919d499d0826b45327cb5c317"}]}
