Description of problem: We have an Automate method that displays a list of Credentials when ordering a service or when invoked from a Custom Button. This method uses the passed in service template to figure out the provider and display the credentials for the Provider. When invoked from a Service Template the Credential list is populated, but when the same dialog is used from a Custom button there is no service template and the credential list is empty. Version-Release number of selected component (if applicable): 5.8 How reproducible: 100% Steps to Reproduce: 1. For the Ansible provider Add a bunch of machine credentials 2. Create an Ansible Playbook Service and an associated Dialog 3. Order the Service and check the list of credentials in the dropdown 4. Create a new custom button and for the dialog use the Dialog created in Step 2. 5. Invoke the custom button and the Dialog would pop up and check the credentials 6. The Credentials have to match the list displayed in Step 3 Actual results: The Credential List is empty Expected results: The Credential list should not be empty and should match the list when the same dialog is invoked from Service Ordering Additional info:
https://github.com/ManageIQ/manageiq-content/pull/112
New commit detected on ManageIQ/manageiq-content/master: https://github.com/ManageIQ/manageiq-content/commit/af395c7cea2d63c87059fb2f84120c326ae22001 commit af395c7cea2d63c87059fb2f84120c326ae22001 Author: mkanoor <mkanoor> AuthorDate: Tue May 9 10:00:54 2017 -0400 Commit: mkanoor <mkanoor> CommitDate: Tue May 9 10:00:54 2017 -0400 Support embedded_ansible to fetch credentials from provider https://bugzilla.redhat.com/show_bug.cgi?id=1448918 If we dont find a ansible provider thru the service template and the method gets passed in a parameter embedded_ansible true we use the first Embedded Ansible Provider and collect the credentials connected to it .../Operations/Methods.class/__class__.yaml | 22 +++++++++++++- .../__methods__/available_credentials.rb | 8 ++++- .../__methods__/available_credentials.yaml | 20 +++++++++++++ ...dded_ansible_available_machine_credentials.yaml | 2 ++ ...dded_ansible_available_network_credentials.yaml | 2 ++ .../__methods__/available_credentials_spec.rb | 34 +++++++++++++++++----- 6 files changed, 79 insertions(+), 9 deletions(-)
Verified in 5.9.0.2.20171010190026_0413a06. Credentials list is not empty and matches with the list of the service catalog item dialog.