Bug 1652883

Summary: ancestry not set for ansible items part of a service bundle
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: APIAssignee: Keenan Brock <kbrock>
Status: CLOSED NOTABUG QA Contact: Parthvi Vala <pvala>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.9.5CC: dmetzger, fdewaley, jocarter, jprause, lavenel, obarenbo, pvala, vaclav.miller
Target Milestone: GA   
Target Release: 5.10.6   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-11 18:35:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1704905    

Description Felix Dewaleyne 2018-11-23 11:43:21 UTC
Description of problem:
ancestry not set for ansible items part of a service bundle
you cannot see the relation between a ansible item part of a service bundle and the service bundle from the API

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

How reproducible:
all the time

Steps to Reproduce:
1.create a bundle with two service items - an aws orchestration and an ansible tower item
2. list the service items through the api 
3.

Actual results:
the relation between the parent (the service bundle) and the ansible tower item are not visible in the api, there is no ancestry for the item

Expected results:
the ancestry is visible in the api call for the ansible tower item provisioned as part of the catalog bundle

Additional info:

Comment 2 Felix Dewaleyne 2018-11-23 11:44:07 UTC
*** Bug 1652880 has been marked as a duplicate of this bug. ***

Comment 9 Keenan Brock 2019-06-10 14:29:07 UTC
Not totally sure we should be looking at the ancestry field here.
It is more of an internal thing.

I'm currently looking into how the consumer of the api can best know about these relationships

Comment 10 Keenan Brock 2019-06-11 18:35:43 UTC
Services are related to other services in one of 2 ways:

- For ServiceTemplates, service_resources is used (as seen by Ansible tower items)
- For Services, ancestry is used (as seen by AWS Orchestration).

I'm under the impression that a service template may be a "child" of multiple service templates, so service_resources is used instead.

I suggest using parent_services instead of ancestry. It understands the nuances here and will tell you the relationship between these catalog items.
Also, ancestry is more of an internal field and my possibly change in usage over time (though there are not immediate plans to do so)