Bug 1382766

Summary: when a user in a child tenant executes create_provision_request the miq_request has the wrong tenant id
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ProvisioningAssignee: mkanoor
Status: CLOSED CURRENTRELEASE QA Contact: Pavol Kotvan <pakotvan>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: cpelland, dajohnso, jhardy, kmorey, mkanoor, nachandr, nstephan, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: All   
OS: All   
Whiteboard: tenant_cfme:catalog:provision
Fixed In Version: 5.7.0.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1322983 Environment:
Last Closed: 2017-01-11 20:11:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1322983    
Bug Blocks:    

Comment 3 mkanoor 2016-10-24 16:05:13 UTC
For our testing we have used the CloudFormsPOC domain from https://github.com/ramrexx/CloudFormsPOC
It has the dialogs and all methods already wired up.

Comment 7 mkanoor 2016-11-14 21:00:42 UTC
Steps:

1. Create a new subtenant
2. Create a user in that sub tenant, set password (e.g. User1)
3. Make sure you have an Amazon EC2 provider defined in CFME
4. Download the service dialogs from 
    1. https://github.com/ramrexx/CloudForms_Essentials/blob/master/service_dialogs/ec2_dialogs.yml
5. Using Automate -> Customization -> Import/Export -> Import Choose File
6. Choose ec2_dialogs.yml
7. This should import service dialogs called ec2_build_request_admin, ec2_build_request_user
8. Import the CloudForms_Essential domain  using the Automate -> Import/Export -> GIT URL
9.  https://github.com/ramrexx/CloudForms_Essentials (no userid password needed)
10. Create a generic service (TestService)
11. Set the Dialog to ec2_build_request_user
12. Set the Provisioning Entry Point to /Service/Provisioning/StateMachines/ServiceProvision_Template/build_vm_provision_request
13. That build_vm_provision_request comes from a the CloudForms_Essential domain
14. Login as Admin order the TestService
15. After the service is provisioned
16. Login as User1 and order TestService
17. Once the Request has been Submitted you should see the Request (This was broken, where the User1 couldn’t see this request)

Comment 8 mkanoor 2016-11-16 14:58:35 UTC
For Step 4, you can download the ec2_dialogs.yml file which has multiple dialogs.
Then you can import that dialog into CFME using Step (5) you would point to the downloaded ec2_dialogs.yml