Bug 1290485 - validate_request for cloud does not include support for flavors
validate_request for cloud does not include support for flavors
Status: CLOSED CURRENTRELEASE
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.4.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.7.0
Assigned To: William Fitzgerald
Shveta
service:catalog
: TestOnly, ZStream
Depends On:
Blocks: 1375311
  Show dependency treegraph
 
Reported: 2015-12-10 11:17 EST by Jeffrey Cutter
Modified: 2017-01-11 23:55 EST (History)
8 users (show)

See Also:
Fixed In Version: 5.7.0.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1375311 (view as bug list)
Environment:
Last Closed: 2017-01-11 14:52:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
zip including before, after, and patch (4.70 KB, application/zip)
2015-12-10 11:17 EST, Jeffrey Cutter
no flags Details

  None (edit)
Description Jeffrey Cutter 2015-12-10 11:17:29 EST
Created attachment 1104406 [details]
zip including before, after, and patch

Description of problem:

/ ManageIQ / Cloud / VM / Provisioning / StateMachines / ProvisionRequestApproval / validate_request not working for requiring approval when flavors are used.

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. Edit the Default instance in the same location and add low limits for max_cpu and max_memory. 
2. Provision a cloud instance that exceeds those values.
3. Note that approval is not required.

Actual results:

Request provisions without requiring approval.

Expected results:

Request should be sent for approval.

Additional info:

See attachment with before and after and patch which seems to resolve the issue.
Comment 3 CFME Bot 2016-09-09 17:20:58 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d32b0a7c7089104112221f9c68ad883a3bc11c84

commit d32b0a7c7089104112221f9c68ad883a3bc11c84
Author:     Tina Fitzgerald <tfitzger@redhat.com>
AuthorDate: Fri Aug 5 11:10:59 2016 -0400
Commit:     Tina Fitzgerald <tfitzger@redhat.com>
CommitDate: Fri Sep 9 16:11:55 2016 -0400

    Automate - Fixed issue with cloud validate_request method not getting
    cloud flavor values properly. Added tests.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1290485

 .../__methods__/validate_request.rb                | 34 +++++++----
 .../method_validation/validate_request_spec.rb     | 69 ++++++++++++++++++++++
 2 files changed, 93 insertions(+), 10 deletions(-)
 create mode 100644 spec/automation/unit/method_validation/validate_request_spec.rb
Comment 4 CFME Bot 2016-09-09 18:30:54 EDT
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/7f744d40d2e6a4fee37a540861e00385046ecd9b

commit 7f744d40d2e6a4fee37a540861e00385046ecd9b
Author:     Greg McCullough <gmccullo@redhat.com>
AuthorDate: Fri Sep 9 17:16:06 2016 -0400
Commit:     Oleg Barenboim <chessbyte@gmail.com>
CommitDate: Fri Sep 9 18:29:07 2016 -0400

    Merge pull request #10281 from tinaafitz/validate_request
    
    Automate - Fixed issue with cloud validate_request method.
    (cherry picked from commit 4634e191ef92ab73cad3ff4a74be6c9a7afc3ba8)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1290485

 .../__methods__/validate_request.rb                | 34 +++++++----
 .../method_validation/validate_request_spec.rb     | 69 ++++++++++++++++++++++
 2 files changed, 93 insertions(+), 10 deletions(-)
 create mode 100644 spec/automation/unit/method_validation/validate_request_spec.rb
Comment 6 Shveta 2016-09-21 15:54:06 EDT
Hi Tina ,

Followed the exact same steps as you mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1375311.
But request gets approved.
Please check .Request 18 , 19

https://10.8.199.228
Comment 7 William Fitzgerald 2016-09-21 17:38:09 EDT
Shveta,

I re-ran one of your provisioning requests (#20) called billy_testagaininstac.  I changed number of instances = 2 and that caused the request to not be auto-approved.  I think the previous one was asking for 1 and the request limit was at 1 so it was auto-approved.

Hope this helps ...

Thanks

Billy
Comment 8 Shveta 2016-09-21 18:02:52 EDT
Verified in 5.7.0.0.20160906172503_12f65cb

Note You need to log in before you can comment on or make changes to this bug.