Skip to content
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

Merged

Conversation

yrudman
Copy link
Contributor

@yrudman yrudman commented May 21, 2020

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

@miq-bot miq-bot added the wip label May 21, 2020
@yrudman yrudman closed this May 22, 2020
@yrudman yrudman reopened this May 27, 2020
@yrudman yrudman closed this May 28, 2020
@yrudman yrudman reopened this May 28, 2020
@yrudman yrudman closed this Jun 17, 2020
@yrudman yrudman reopened this Jun 17, 2020
@yrudman yrudman changed the title [WIP] Specify what is missing if tag assignment failed Specify what is missing if tag assignment failed Jun 17, 2020
@miq-bot miq-bot removed the wip label Jun 17, 2020
Copy link
Member

@bdunne bdunne left a 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?

@yrudman
Copy link
Contributor Author

yrudman commented Jun 18, 2020

@bdunne tests added. I think tests are almost duplicating what was tested in ManageIQ/manageiq#20216

@yrudman yrudman force-pushed the provide-detailed-message-if-tag-missing branch from 9d517e1 to fc2bc32 Compare June 18, 2020 19:39
@miq-bot
Copy link
Member

miq-bot commented Jun 18, 2020

Checked commits yrudman/manageiq-api@e9e4001~...fc2bc32 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. ⭐

@bdunne bdunne closed this Jun 19, 2020
@bdunne bdunne reopened this Jun 19, 2020
@bdunne bdunne merged commit 6256a0e into ManageIQ:master Jun 19, 2020
@bdunne bdunne self-assigned this Jun 19, 2020
@yrudman yrudman deleted the provide-detailed-message-if-tag-missing branch June 19, 2020 21:03
simaishi pushed a commit that referenced this pull request Jun 25, 2020
…missing

Specify what is missing if tag assignment failed

(cherry picked from commit 6256a0e)
@simaishi
Copy link
Contributor

Jansa backport details:

$ git log -1
commit 40e8a6ea65dca1772ef6889f30b8840d4c7ca4ac
Author: Brandon Dunne <bdunne@redhat.com>
Date:   Fri Jun 19 15:26:29 2020 -0400

    Merge pull request #843 from yrudman/provide-detailed-message-if-tag-missing

    Specify what is missing if tag assignment failed

    (cherry picked from commit 6256a0e321ef9d668fb984f09bf64dbac461092b)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants