Bug 1491409 - Add miq_provision_quota_mixin to Service Template Provision Request service model.
Summary: Add miq_provision_quota_mixin to Service Template Provision Request service m...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.9.0
Assignee: Tina Fitzgerald
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On:
Blocks: 1493207
TreeView+ depends on / blocked
 
Reported: 2017-09-13 17:30 UTC by Tina Fitzgerald
Modified: 2018-05-29 08:31 UTC (History)
5 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1493207 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:06:17 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tina Fitzgerald 2017-09-13 17:30:00 UTC
Description of problem:
Automate Engine service_template_provision_request service model missing  include of MiqAeServiceMiqProvisionMixin which causes 
check_quota(:active_provisions_by_tenant) for a Service Request to fail with: undefined method `check_quota' for #<MiqAeMethodService::MiqAeServiceServiceTemplateProvisionRequest:0x007fe1d81c86f0>


How reproducible:
Always

Steps to Reproduce: 
1.Create a Service request. 
2.From the vmdb folder, run 'bin/rails c'
3.Setup $evm by running '$evm=MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)'
4. 'request = $evm.vmdb('miq_request', <Id of Service request in step 1>)'
5. 'request.check_quota(:active_provisions_by_tenant)'

Actual results:
undefined method `check_quota' for #<MiqAeMethodService::MiqAeServiceServiceTemplateProvisionRequest:0x007fe1d81c86f0>

Expected results:
=> {:count=>0, :memory=>0, :cpu=>0, :storage=>0, :ids=>[], :class_name=>"MiqProvisionRequest", :active=>{:class_name=>"MiqProvision", :ids=>[], :storage_by_id=>{}, :memory_by_host_id=>{}, :cpu_by_host_id=>{}, :vms_by_storage_id=>{}}}

Comment 2 Dave Johnson 2017-09-13 17:44:58 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set it to Low/Low.

Comment 4 CFME Bot 2017-09-14 20:09:36 UTC
New commit detected on ManageIQ/manageiq-automation_engine/master:
https://github.com/ManageIQ/manageiq-automation_engine/commit/05ef42b745d206033d06fb6db1c0dc67c7c6e632

commit 05ef42b745d206033d06fb6db1c0dc67c7c6e632
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Wed Sep 13 13:32:00 2017 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Wed Sep 13 13:32:00 2017 -0400

    Add miq_provision_quota mixin to Service Template Provision Request
    Service model.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1491409

 .../miq_ae_service_service_template_provision_request.rb               | 3 +++
 1 file changed, 3 insertions(+)

Comment 6 Milan Falešník 2017-11-08 15:00:46 UTC
Verified in 5.9.0.5 using the steps provided by Tina.


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