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

Use correct identifier for VM Retirement #15509

Merged
merged 1 commit into from
Jul 5, 2017
Merged

Use correct identifier for VM Retirement #15509

merged 1 commit into from
Jul 5, 2017

Conversation

jntullo
Copy link

@jntullo jntullo commented Jul 5, 2017

Currently, the vm "retire" action is using the product feature vm_retire which aligns to Set Retirement Date. The identifier that should be used is vm_retire_now which is the correct product feature for immediately retiring a VM.

The response for before the fix if the user does not have "Set Retirement Date" permissions but has "Retire Now" permissions:

"error":{"kind":"forbidden","message":"Use of Action retire is forbidden","klass":"Api::ForbiddenError"}}

Response after the fix is applied to use the correct product feature:

{"success":true,"message":"VM id:10000000001997 name:'jenkins' retiring","href":"http://localhost:3000/api/vms/10000000001997"}

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1464093

@miq-bot add_label api, bug, euwe/yes, fine/yes
@miq-bot assign @abellotti

cc: @yrudman

@abellotti
Copy link
Member

LGTM @jntullo, could you check out travis. Thanks!!

/cc @imtayadeway I see some api logging failures, not sure if related to your PR.

@miq-bot
Copy link
Member

miq-bot commented Jul 5, 2017

Checked commit jntullo@680c290 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. 🍰

@abellotti
Copy link
Member

Thanks @jntullo for fixing this. 😍

@abellotti abellotti merged commit 30f51d5 into ManageIQ:master Jul 5, 2017
@abellotti abellotti added this to the Sprint 64 Ending Jul 10, 2017 milestone Jul 5, 2017
simaishi pushed a commit that referenced this pull request Jul 7, 2017
@simaishi
Copy link
Contributor

simaishi commented Jul 7, 2017

Euwe backport details:

$ git log -1
commit f3a41dda0a4e142aecd59fa1dd1ca3563362c949
Author: Alberto Bellotti <[email protected]>
Date:   Wed Jul 5 16:35:41 2017 -0400

    Merge pull request #15509 from jntullo/bz/wrong_retirement_product_feature
    
    Use correct identifier for VM Retirement
    (cherry picked from commit 30f51d5eec8695e68ad0205a477e636d2c86892a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1468614

simaishi pushed a commit that referenced this pull request Aug 4, 2017
@simaishi
Copy link
Contributor

simaishi commented Aug 4, 2017

Fine backport details:

 $ git log -1
commit 9eed9540813626a4e96e1537b7c31d9ab3dffbb0
Author: Alberto Bellotti <[email protected]>
Date:   Wed Jul 5 16:35:41 2017 -0400

    Merge pull request #15509 from jntullo/bz/wrong_retirement_product_feature
    
    Use correct identifier for VM Retirement
    (cherry picked from commit 30f51d5eec8695e68ad0205a477e636d2c86892a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1478508

@jntullo jntullo deleted the bz/wrong_retirement_product_feature branch November 28, 2017 19:42
d-m-u pushed a commit to d-m-u/manageiq that referenced this pull request Jun 6, 2018
…oduct_feature

Use correct identifier for VM Retirement
(cherry picked from commit 30f51d5)

https://bugzilla.redhat.com/show_bug.cgi?id=1478508
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.

4 participants