Register hosts to Satellite6 via CloudForms and Ansible Tower part 4

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
selection_045
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
selection_047
We will have to go and enable it.
Click on Configuration -> Edit this Domain
selection_048
and check the box Enabled
selection_049
Save the Domain name
screen-shot-2016-09-20-at-5-30-44-pm

Step 3
You should now see the following
selection_046

Step 4 Edit the Schema to fit your configuration. Select DynamicDropDowns -> and the Schema tab.
selection_050

Click on Configuration -> Edit selected Schema
selection_051

Step 5 Edit the following fields
username: your admin user
password: your admin password
sat6url: https://yoursat6fqdn/api
katellourl: https://yoursat6fqdn/katello/api
selection_052

Click the save button
screen-shot-2016-09-20-at-5-30-44-pm

Step 6 You are now ready to start pointing your service dialog fields to the automate methods. Go to Automate
selection_026
Customization
selection_027
Service Dialogs
selection_053

Select your service catalog item which we created in the previous blog posts.
selection_054

Step 7 Click the Configuration -> Edit this Dialog
selection_055
We want to re arrange the order of the fields a little bit. Click the Extra_Vars value on the left
selection_063
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
selection_056
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 )
selection_057

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.
selection_059

Step 9 Select activationkey and change the values to the following
selection_064

Step 10 Select location and change the fields to match the picture
selection_065

Step 11 Select hostgroup and change the values to reflect the picture below.
selection_066

Step 12 We will update the updatehost filed from a text field to radio buttons.
selection_067

Now you can hit the save button.
screen-shot-2016-09-20-at-5-30-44-pm

Step 13 Congratulations. Your done. when you go know to your service dialog or custom button you will see the following
selection_045

Leave a Reply

Your email address will not be published. Required fields are marked *

*


Hit Counter provided by laptop reviews