)]}'
{"id":"openstack%2Fosc-placement~689823","triplet_id":"openstack%2Fosc-placement~master~I48b56f4e1942cad86cf9084a8ef48a910988f045","project":"openstack/osc-placement","branch":"master","topic":"story/2005258","hashtags":[],"change_id":"I48b56f4e1942cad86cf9084a8ef48a910988f045","subject":"WIP: resource provider trait set --amend --[no-]trait","status":"NEW","created":"2019-10-21 15:30:07.000000000","updated":"2019-11-15 23:24:32.000000000","submit_type":"MERGE_IF_NECESSARY","mergeable":true,"submittable":false,"total_comment_count":9,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"a542e3e4d49920ce0b59b9914c0de43547d13053","_number":689823,"virtual_id_number":689823,"owner":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"actions":{},"labels":{"Verified":{"recommended":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},{"tag":"autogenerated:zuul:check","value":1,"date":"2019-10-21 15:42:09.000000000","permitted_voting_range":{"min":-2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":1,"default_value":0,"optional":true},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"permitted_voting_range":{"min":-2,"max":2},"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"rejected":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"all":[{"value":-1,"date":"2019-11-15 23:12:48.000000000","permitted_voting_range":{"min":-1,"max":0},"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"date":"2019-11-15 23:24:32.000000000","_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},{"date":"2019-10-21 15:37:09.000000000","_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"date":"2019-10-21 15:37:13.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"date":"2019-10-21 15:37:07.000000000","_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"permitted_voting_range":{"min":0,"max":2},"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"value":0,"permitted_voting_range":{"min":0,"max":1},"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2019-10-21 15:37:07.000000000","updated_by":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"reviewer":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"state":"REVIEWER"},{"updated":"2019-10-21 15:37:09.000000000","updated_by":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"reviewer":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"state":"REVIEWER"},{"updated":"2019-10-21 15:37:13.000000000","updated_by":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"reviewer":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"state":"REVIEWER"},{"updated":"2019-10-21 15:42:09.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2019-11-15 23:24:32.000000000","updated_by":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"reviewer":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"state":"REVIEWER"}],"messages":[{"id":"b78dc67f81974fb3b82b094f3583eae76fecd8da","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-10-21 15:30:07.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"d04422cc8b344a80342b1ca837b9d9a89181887e","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2019-10-21 15:42:09.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-pep8 https://zuul.opendev.org/t/openstack/build/ce5e9028552f4c4d9c59c961ff351d6f : SUCCESS in 3m 37s\n- openstack-tox-py27 https://zuul.opendev.org/t/openstack/build/2abb0b6f7b394b228cb03a0118442baf : SUCCESS in 3m 54s\n- openstack-tox-py36 https://zuul.opendev.org/t/openstack/build/efcc2a951d884756a3ecd38d3c547d0c : SUCCESS in 3m 40s\n- openstack-tox-py37 https://zuul.opendev.org/t/openstack/build/2c1e836cc54d4d17a40c29a9f192de02 : SUCCESS in 4m 43s\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/daae239a32b64920a8434429d649f014 : SUCCESS in 5m 31s\n- openstack-tox-functional https://zuul.opendev.org/t/openstack/build/18742da83e184b5ca9f2060349e8a369 : SUCCESS in 4m 32s\n- openstack-tox-functional-py36 https://zuul.opendev.org/t/openstack/build/139b8bf9b0564da1a9179b38c9138585 : SUCCESS in 3m 22s","accounts_in_message":[],"_revision_number":1},{"id":"6707e77a20a86e91cb50dd238bc96fab78a1550b","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-10-21 15:44:14.000000000","message":"Patch Set 1:\n\n(3 comments)","accounts_in_message":[],"_revision_number":1},{"id":"f26632ab38ad3b55ba62b7f33cde13b0314f2baa","author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"date":"2019-10-28 21:10:42.000000000","message":"Patch Set 1:\n\n(6 comments)\n\nSome thoughts inline. Consistency with other OSC commands is the hard part here. I\u0027d definitely split the two options into separate patches though.","accounts_in_message":[],"_revision_number":1},{"id":"94403ec3054a68def619e5b18f790035afbf3447","author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"date":"2019-11-15 23:12:48.000000000","message":"Patch Set 1: Workflow-1\n\nAfter today\u0027s discussion [1] I\u0027m inclined to make this (in two patches):\n\n`openstack resource provider trait set --amend --trait $T [...] $RP` to add traits to whatever\u0027s already there;\n\n`openstack resource provider trait unset --trait $T [...] $RP` to remove traits.\n\nThinking at least one --trait should be required on the latter because a) it seems pretty unlikely you really want to delete all the traits from a provider; b) you can already do that via `set` with no --trait args.\n\nYou dig?\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-sdks/%23openstack-sdks.2019-11-15.log.html#t2019-11-15T14:13:27","accounts_in_message":[],"_revision_number":1},{"id":"f9a3e65dd53a7764ba2612db467f9ae8826e035d","author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"date":"2019-11-15 23:24:32.000000000","message":"Patch Set 1:\n\nQuick thoughts:\n\n\u003e `openstack resource provider trait set --amend --trait $T [...] $RP` to add traits to whatever\u0027s already there;\n\nThis seems OK since we have \"openstack resource provider inventory set --amend\":\n\nhttps://docs.openstack.org/osc-placement/latest/cli/index.html#resource-provider-inventory-set\n\n\u003e `openstack resource provider trait unset --trait $T [...] $RP` to remove traits.\n\nSeems fine.\n\n\u003e Thinking at least one --trait should be required on the latter because a) it seems pretty unlikely you really want to delete all the traits from a provider; b) you can already do that via `set` with no --trait args.\n\nI had to look at the code to confirm (b) since it\u0027s not documented:\n\nhttps://docs.openstack.org/osc-placement/latest/cli/index.html#resource-provider-trait-set\n\nMy only qualm would be that we should fix those docs for trait set with no --trait is specified to remove everything but that can be done separate from this. Also, for that matter the API reference isn\u0027t clear about wiping out all traits via PUT either:\n\nhttps://docs.openstack.org/api-ref/placement/?expanded\u003dupdate-resource-provider-traits-detail#update-resource-provider-traits\n\nBut the placement API schema for that API doesn\u0027t define a minItems value so I guess it works OK even though you could just use DELETE /resource_providers/{provider_id}/traits.","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"b69c41f01540460919d499d0826b45327cb5c317","revisions":{"b69c41f01540460919d499d0826b45327cb5c317":{"kind":"REWORK","_number":1,"created":"2019-10-21 15:30:07.000000000","uploader":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"ref":"refs/changes/23/689823/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/osc-placement","ref":"refs/changes/23/689823/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/osc-placement refs/changes/23/689823/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/osc-placement refs/changes/23/689823/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/osc-placement refs/changes/23/689823/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/osc-placement refs/changes/23/689823/1"}}},"commit":{"parents":[{"commit":"6cec98cf6f22c8ae2c5ff124b6194a162a7af882","subject":"Merge \"Update master for stable/train\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/osc-placement/commit/6cec98cf6f22c8ae2c5ff124b6194a162a7af882"}]}],"author":{"name":"Eric Fried","email":"openstack@fried.cc","date":"2019-10-21 15:13:56.000000000","tz":-300},"committer":{"name":"Eric Fried","email":"openstack@fried.cc","date":"2019-10-21 15:30:06.000000000","tz":-300},"subject":"WIP: resource provider trait set --amend --[no-]trait","message":"WIP: resource provider trait set --amend --[no-]trait\n\nPreviously\n\n openstack resource provider trait set\n\nwould replace the entire trait list with whatever items you specified to\nthe (multiple) ``--trait`` options.\n\nWith [1] we added the ability to amend/append inventories with a new\n``--amend`` option. This follows a similar principle for amending the\ntrait list in place: you can now specify ``--amend`` and any\n``--trait``s are appended to the existing trait list. A new\n``--no-trait`` option, which may similarly be repeated, allows you to\nremove traits from the existing trait list.\n\n openstack resource provider trait set --amend \\\n    --trait CUSTOM_ADD_THIS_ONE --trait CUSTOM_AND_THIS_ONE \\\n    --no-trait CUSTOM_REMOVE_THIS_ONE --no-trait CUSTOM_ALSO_THIS\n\nOther semantics of note:\n- Works with standard and custom traits.\n- With --amend, both --trait and --no-trait are idempotent (traits\n  specified to ``--trait``/``--no-trait`` which are already\n  present/absent, respectively, will be ignored).\n- As previously, custom traits must be registered (``openstack trait\n  add``) before they can be added to a resource provider. However,\n  existence is not checked for removals, meaning that a nonexistent\n  custom trait on the removal list is ignored (because it is obviously\n  not already on the resource provider, because it would have needed to\n  exist).\n\nWIP: test, reno\n\n[1] I4ed1016852144377485959e65077803f5f2c672c\n\nChange-Id: I48b56f4e1942cad86cf9084a8ef48a910988f045\nStory: #2005258\nTask: #30061\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/osc-placement/commit/b69c41f01540460919d499d0826b45327cb5c317"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/osc-placement/commit/b69c41f01540460919d499d0826b45327cb5c317"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[{"rule_name":"gerrit~DefaultSubmitRule","status":"OK","labels":[{"label":"Verified","status":"MAY","applied_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"MAY"},{"label":"Workflow","status":"MAY","applied_by":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"}},{"label":"Review-Priority","status":"MAY"}]}],"submit_requirements":[{"name":"Verified","description":"Verified in gate by CI","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Verified\u003dMAX AND -label:Verified\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Verified\u003dMAX","label:Verified\u003dMIN"],"atom_explanations":{"label:Verified\u003dMAX":"","label:Verified\u003dMIN":""}}},{"name":"Code-Review","description":"Code reviewed by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Code-Review\u003dMAX AND -label:Code-Review\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":[],"failing_atoms":["label:Code-Review\u003dMAX","label:Code-Review\u003dMIN"],"atom_explanations":{"label:Code-Review\u003dMAX":"","label:Code-Review\u003dMIN":""}}},{"name":"Review-Priority","description":"Review Priority","status":"NOT_APPLICABLE","is_legacy":false,"applicability_expression_result":{"fulfilled":false,"status":"FAIL"},"submittability_expression_result":{"expression":"is:true","fulfilled":true,"status":"NOT_EVALUATED","passing_atoms":[],"failing_atoms":[],"atom_explanations":{}}},{"name":"Workflow","description":"Approved for gate by core reviewer","status":"UNSATISFIED","is_legacy":false,"submittability_expression_result":{"expression":"label:Workflow\u003dMAX AND -label:Workflow\u003dMIN","fulfilled":false,"status":"FAIL","passing_atoms":["label:Workflow\u003dMIN"],"failing_atoms":["label:Workflow\u003dMAX"],"atom_explanations":{"label:Workflow\u003dMAX":"","label:Workflow\u003dMIN":""}}}]}
