Bug 1444484 - Expose container projects and template parms in service model
Summary: Expose container projects and template parms in service model
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: Greg McCullough
QA Contact: Dmitry Misharov
URL:
Whiteboard: automate:container
Depends On:
Blocks: 1444494 1460027
TreeView+ depends on / blocked
 
Reported: 2017-04-21 12:28 UTC by ncatling
Modified: 2018-06-01 12:05 UTC (History)
11 users (show)

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


Attachments (Terms of Use)

Description ncatling 2017-04-21 12:28:50 UTC
Description of problem:
Container projects and template parameters not available associations in Automate.

Functionality contained within this PR, which would need to be backported to 5.7.
https://github.com/ManageIQ/manageiq/pull/14233

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Milan Falešník 2017-05-02 11:45:33 UTC
I verified this bug on 5.8.0.12.

Though there is an issue, unrelated to this PR - It seems that via $evm.vmdb(:ExtManagementSystems).find_by_name(...) I can only get instances of MiqAeServiceManageIQ_Providers_ContainerManager and not MiqAeServiceManageIQ_Providers_OpenshiftEnterprise_ContainerManager, therefore I could not verify the link "expose :container_projects" on the provider. Due to underscores I cannot refer to the class directly from $evm.vmdb.

Is that a bug to be filed?

Comment 4 Greg McCullough 2017-05-02 13:44:48 UTC
Looks like you should be using ManageIQ::Providers::Openshift::ContainerManager now.  See https://github.com/ManageIQ/manageiq/pull/13908

Comment 5 Milan Falešník 2017-05-02 13:48:27 UTC
By looking at this:
https://github.com/ManageIQ/manageiq/pull/13908/files#diff-d836ac4b1b3b9c255283fe7142975b67

It seems like we lost the exposed items then, as these are deleted and there is no replacement, which would explain why I could not access it. This then seems like a FailedQA.

Comment 6 Greg McCullough 2017-05-02 14:01:12 UTC
Milan - I agree.  The removal of miq_ae_service_manageiq-providers-openshift_enterprise-container_manager.rb should have also moved the two `expose` lines to the new model.  This is a regression for the containers team.

Comment 7 Milan Falešník 2017-05-02 15:38:48 UTC
Bringing attention to the containers team, @azellner, could you take a look at  the link in comment 5 and what Greg said in comment 6? This needs fixing in order to pass this as verified, originally I thought there was a different way to get the right class, but moving back to assigned.

Comment 8 Ari Zellner 2017-05-07 10:56:53 UTC
I think https://github.com/ManageIQ/manageiq-automation_engine/pull/17 might fix this. nick, how do i test this out?

Comment 9 Milan Falešník 2017-05-09 08:21:24 UTC
Hey Ari,

1) Set up a provider in your CFME
2) open rails console
3)
$evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
provider = $evm.vmdb(:ExtManagementSystem).find_by_name(<provider_name>)

Then you can try out the two relationships via automate engine:
provider.container_image_registries
provider.container_projects

They should not raise an error.

Comment 11 Ari Zellner 2017-05-11 10:59:52 UTC
tesing https://github.com/ManageIQ/manageiq-automation_engine/pull/17,
I used both:
$evm.vmdb(:ExtManagementSystem).all.first.container_projects
$evm.vmdb(:ExtManagementSystem).all.first.container_image_registries

and both returned correct results.
The provider type is now 'MiqAeServiceManageIQ_Providers_Openshift_ContainerManager' instead of the removed openshift enterprise provider.
should there be some sort of migration for this?

Comment 12 Milan Falešník 2017-05-12 16:28:03 UTC
I think there are no migrations in here as these service models just wrap the existing AR models in rails.

Comment 14 Milan Falešník 2017-10-12 11:36:03 UTC
Verified in 5.9.0.1.

Clearing the needinfo on Nick as well.


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