Bug 1236001 - Missing tenant stuff in conditions for policies
Summary: Missing tenant stuff in conditions for policies
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Control
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: cfme-future
Assignee: Gregg Tanzillo
QA Contact: Dmitry Misharov
URL:
Whiteboard: control:tenant:condition
Depends On:
Blocks: 1245696 1291724 1346955
TreeView+ depends on / blocked
 
Reported: 2015-06-26 10:20 UTC by Eduardo Minguez
Modified: 2017-06-07 18:46 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1245696 1291724 1346955 (view as bug list)
Environment:
Last Closed: 2017-06-07 18:46:30 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eduardo Minguez 2015-06-26 10:20:51 UTC
Description of problem:
In Control -> Conditions, there aren't a "VM and Instance: Tenant" field available.

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

How reproducible:
Try to create a condition like "vms belonging to X tenant"

Steps to Reproduce:
1. Control -> Conditions
2. Add a new condition
3. Search in "Fields" for something like "Tenant"

Actual results:
No tenant shown

Expected results:
"VM and Instance: Tenant" field available

Additional info:

Comment 2 Bill Wei 2015-06-30 14:11:14 UTC
Available field selections are based on class VmOrTemplate through reflection. Any fields that are available only to a subclass of VmOrTemplate will not be visible here. In this particular example, cloud_tenant is a field visible to VmOpenstack. 

This problem applies to both scope and condition definitions, where MiqExpression is used. 

One possible solution is in the UI makes a list of all subclasses of VmOrTemplate and allows a user to select one.

Comment 3 Greg McCullough 2015-09-22 16:50:04 UTC
https://github.com/ManageIQ/manageiq/pull/4416

Comment 4 Gregg Tanzillo 2015-11-18 21:37:33 UTC
https://github.com/ManageIQ/manageiq/pull/5506

Comment 5 CFME Bot 2015-11-20 14:25:23 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a7597b65273b9c6089ee19a887cd85c72d1f8f08

commit a7597b65273b9c6089ee19a887cd85c72d1f8f08
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Wed Nov 18 16:35:33 2015 -0500
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Fri Nov 20 07:00:27 2015 -0500

    Include reflections of descendant classes when building model details for reporting and expression editors
    
    - Enabled only for Vm and Host models
    - Enables inclusion of cloud tenants under an openstack VM in reports and expressions
    - Enables inclusion of cloud networks under an openstack Host
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1236001

 app/models/host.rb                                |  4 ++++
 app/models/miq_expression.rb                      |  9 +++++++--
 app/models/vm.rb                                  |  4 ++++
 config/locales/en.yml                             |  5 +++++
 spec/models/miq_expression/miq_expression_spec.rb | 17 +++++++++++++++++
 5 files changed, 37 insertions(+), 2 deletions(-)

Comment 7 CFME Bot 2016-01-04 21:09:17 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=0d2a48ae68fdf469d5a6ff7dda3e572d209a9585

commit 0d2a48ae68fdf469d5a6ff7dda3e572d209a9585
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Wed Nov 18 16:35:33 2015 -0500
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Mon Dec 21 17:01:32 2015 -0500

    Include reflections of descendant classes when building model details for reporting and expression editors
    
    - Enabled only for Vm and Host models
    - Enables inclusion of cloud tenants under an openstack VM in reports and expressions
    - Enables inclusion of cloud networks under an openstack Host
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1236001

 app/models/host.rb                                |  4 ++++
 app/models/miq_expression.rb                      |  9 +++++++--
 app/models/vm.rb                                  |  4 ++++
 config/locales/en.yml                             |  3 +++
 spec/models/miq_expression/miq_expression_spec.rb | 17 +++++++++++++++++
 5 files changed, 35 insertions(+), 2 deletions(-)

Comment 8 amogh 2016-04-27 20:34:54 UTC
 	
@Gregg Tanzillo @Eduardo Minguez I'm verifying this bug in "5.6.0.4-beta2.3.20160421172650_719e256" and I don't see the "VM and Instance: Tenant" in fields for new condition. Please let me know if I'm missing anything from the below steps.

1. navigate to "control->explorer->conditions->All VM and Instance Conditions" click on "Add a New VM Condition"
2. choose->field, 
3. observe that, from the drop down no option for "VM and Instance: Tenant".

Comment 11 Chris Pelland 2017-06-07 18:46:30 UTC
This BZ has been closed since it was opened on a version of CloudForms that has reached the end of its lifecycle.  If you find that this bug is still relevant, please open a new BZ against the relevant supported version of CloudForms.


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