Bug 1318717 - [RFE] Reporting: Unable to report on CF Tenant Quotas
Summary: [RFE] Reporting: Unable to report on CF Tenant Quotas
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.5.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.5.5
Assignee: Libor Pichler
QA Contact: Pavol Kotvan
URL:
Whiteboard: tenant_cfme:report
Depends On: 1299963
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-17 15:15 UTC by Libor Pichler
Modified: 2016-07-26 15:31 UTC (History)
7 users (show)

Fixed In Version: 5.5.5.2
Doc Type: Enhancement
Doc Text:
Clone Of: 1299963
Environment:
Last Closed: 2016-07-26 15:31:39 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1488 normal SHIPPED_LIVE CFME 5.5.5 bug fixes and enhancement update 2016-07-26 19:28:27 UTC

Comment 3 CFME Bot 2016-06-14 13:27:26 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=36e52a81fdfc369d984b1b981e6cdb687e4d4aee

commit 36e52a81fdfc369d984b1b981e6cdb687e4d4aee
Merge: 5b7a012 d3dc330
Author:     Gregg Tanzillo <gtanzill@redhat.com>
AuthorDate: Tue Jun 14 09:23:07 2016 -0400
Commit:     Gregg Tanzillo <gtanzill@redhat.com>
CommitDate: Tue Jun 14 09:23:07 2016 -0400

    Merge branch 'bz_1318717_new' into '5.5.z'
    
    Add tenant quota report and widget
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1318717
    
    replacement of https://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme/merge_requests/860
    
    PR from upstream
    https://github.com/ManageIQ/manageiq/pull/6963
    
    
    Everything was clean expect two things:
    
    1) [commit https://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme/commit/a44beabfbcd7cf68943a892cceff110fb0520b34] TenantQuota model needed to add ReportableMixin, because I throws errors
    app/models/miq_report/generator.rb:640 in this method:
    
    ```
    def build_reportable_data(entry, options = {})
      rec = entry[:obj]
      data_records = [build_get_attributes_with_options(rec, options)]
      rec.class.aar_columns |= data_records.first.keys  <— line 640
    
      data_records = build_add_includes(data_records, entry, options["include"]) if options["include"]
      data_records
    end
    ```
    
    and it expected arr_columns for model TenantQuota. In upstream this was eliminated
    by PRs:https://github.com/ManageIQ/manageiq/pull/6273 and eventually
    https://github.com/ManageIQ/manageiq/pull/4802 and
    
    2)[commit https://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme/commit/aca8d7d9a96075dec8b6314c6e81560af8e40aa9] I needed also cherry-pick also https://github.com/ManageIQ/manageiq/pull/6364 - it just brings this method for localisation instead of getting it from yaml
    
    ```
    def self.tenant_quota_description(name)
      case name
      when :cpu_allocated
        _("Allocated Virtual CPUs")
      when :mem_allocated
        _("Allocated Memory in GB")
      when :storage_allocated
        _("Allocated Storage in GB")
      when :vms_allocated
        _("Allocated Number of Virtual Machines")
      when :templates_allocated
        _("Allocated Number of Templates")
      end
    end
    ```
    
    3)[commit https://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme/commit/4b20fe06afa53c8c8491468a5cdd5fcf9e353724] Also added https://github.com/ManageIQ/manageiq/pull/8043, there was UI constant used before
    
    4)[commit https://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme/commit/d3dc330f131e15e0c88321b4cb9d4d1d85453884] Also added https://github.com/ManageIQ/manageiq/pull/7474 for fixing sporadic spec failing.
    
    cc @gtanzill
    
    
    See merge request !965

 app/helpers/ops_helper/textual_summary.rb          |   6 +-
 app/models/miq_expression.rb                       |   2 +
 app/models/miq_report/generator/html.rb            |   8 +-
 app/models/tenant_quota.rb                         |  41 ++++++-
 config/locales/en.yml                              |   7 --
 product/dashboard/widgets/tenant_quotas.yaml       |  17 +++
 .../001_Tenant Quotas.yaml                         |  42 ++++++++
 spec/factories/tenant_quota.rb                     |  26 ++++-
 spec/models/miq_report_spec.rb                     |  94 ++++++++++++++++
 spec/models/tenant_quota_spec.rb                   | 118 +++++++++++++++++++++
 spec/support/quota_helper.rb                       |   2 +
 11 files changed, 347 insertions(+), 16 deletions(-)

Comment 8 errata-xmlrpc 2016-07-26 15:31:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1488.html


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