This post will walk you through how to customize the service dialog which we created in the previous post so that we pull the following values via api calls from Satellite6:
– Activation Keys
– Organization
– Location
– Hostgroups
The end goal will look like this
Step 1 First you will need to pull my automation model which contains the functions to connect to satellite6 and get the necessary information.
Step 1 Download the automate model for satellite6 from the managiq depot so you get access to the api calls to Red Hat Satellite 6 for the dynamic drop downs.
https://depot.manageiq.org/extensions/ldomb/miq-redhat-sat6
Here also a direct link to the download
https://depot.manageiq.org/extensions/ldomb/miq-redhat-sat6/download
Follow the instructions in the README.md to upload the automate domain into CloudForms.
Step 2 As the domain will be imported as disabled
We will have to go and enable it.
Click on Configuration -> Edit this Domain
and check the box Enabled
Save the Domain name
Step 3
You should now see the following
Step 4 Edit the Schema to fit your configuration. Select DynamicDropDowns -> and the Schema tab.
Click on Configuration -> Edit selected Schema
Step 5 Edit the following fields
username: your admin user
password: your admin password
sat6url: https://yoursat6fqdn/api
katellourl: https://yoursat6fqdn/katello/api
Click the save button
Step 6 You are now ready to start pointing your service dialog fields to the automate methods. Go to Automate
Customization
Service Dialogs
Select your service catalog item which we created in the previous blog posts.
Step 7 Click the Configuration -> Edit this Dialog
We want to re arrange the order of the fields a little bit. Click the Extra_Vars value on the left
Drag and drop the fields on the right so they will look like mine.
Do not hit save yet!
Step 8
Select the org field
We will switch the Type of the filed from Text Box to Drop Down List. Check the Dynamic box which will give you the ability to select the Entry point for that field ( /Integration/RedHat/Satellite6/DynamicDropDowns/List_Organizations )
We also want the Show Refresh Button box checked and the values loaded on init. As the organization defines the activation keys we want to Auto Refresh other fields when modified as well.
Step 9 Select activationkey and change the values to the following
Step 10 Select location and change the fields to match the picture
Step 11 Select hostgroup and change the values to reflect the picture below.
Step 12 We will update the updatehost filed from a text field to radio buttons.
Now you can hit the save button.
Step 13 Congratulations. Your done. when you go know to your service dialog or custom button you will see the following