-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify what is missing if tag assignment failed #843
Specify what is missing if tag assignment failed #843
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tests for success and error cases?
@bdunne tests added. I think tests are almost duplicating what was tested in ManageIQ/manageiq#20216 |
9d517e1
to
fc2bc32
Compare
Checked commits yrudman/manageiq-api@e9e4001~...fc2bc32 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint |
…missing Specify what is missing if tag assignment failed (cherry picked from commit 6256a0e)
Jansa backport details:
|
Specify what is missing if tag assignment failed
Required: ManageIQ/manageiq#20216
Example:
curl --user admin:smartvm -i -X POST -d '{"action":"assign","resources":[{"category":"team","name":"it_pnp"}]}' http://localhost:3000/api/vms/54/tags
BEFORE:
{"results":[{"success":false,"message":"Assigning Tag: category:'team' name:'it_pnp'", ...}
AFTER:
{"results":[{"success":false,"message":"Assigning Tag: category:'team' name:'it_pnp' - FAILED. Tag category 'team' not found in region 0", ...}
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1792106