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.
https://github.com/ManageIQ/manageiq/pull/10281
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/d32b0a7c7089104112221f9c68ad883a3bc11c84 commit d32b0a7c7089104112221f9c68ad883a3bc11c84 Author: Tina Fitzgerald <tfitzger> AuthorDate: Fri Aug 5 11:10:59 2016 -0400 Commit: Tina Fitzgerald <tfitzger> 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
New commit detected on ManageIQ/manageiq/darga: https://github.com/ManageIQ/manageiq/commit/7f744d40d2e6a4fee37a540861e00385046ecd9b commit 7f744d40d2e6a4fee37a540861e00385046ecd9b Author: Greg McCullough <gmccullo> AuthorDate: Fri Sep 9 17:16:06 2016 -0400 Commit: Oleg Barenboim <chessbyte> 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
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
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
Verified in 5.7.0.0.20160906172503_12f65cb