{"id":1632,"date":"2016-09-20T22:40:12","date_gmt":"2016-09-21T02:40:12","guid":{"rendered":"http:\/\/blog.domb.net\/?p=1632"},"modified":"2017-05-18T11:46:15","modified_gmt":"2017-05-18T15:46:15","slug":"register-hosts-to-satellite6-via-cloudforms-and-ansible-tower-part-3","status":"publish","type":"post","link":"https:\/\/blog.domb.net\/?p=1632","title":{"rendered":"Register hosts to Satellite6 via CloudForms and Ansible Tower part 4"},"content":{"rendered":"<p>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:<br \/>\n&#8211; Activation Keys<br \/>\n&#8211; Organization<br \/>\n&#8211; Location<br \/>\n&#8211; Hostgroups<\/p>\n<p>The end goal will look like this<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045.png\" alt=\"selection_045\" width=\"979\" height=\"835\" class=\"alignnone size-full wp-image-1734\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045.png 979w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045-300x256.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045-768x655.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><br \/>\n<strong>Step 1<\/strong> First you will need to pull my automation model which contains the functions to connect to satellite6 and get the necessary information. <\/p>\n<p><strong>Step 1<\/strong> 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.<br \/>\n<a href=\"https:\/\/depot.manageiq.org\/extensions\/ldomb\/miq-redhat-sat6\">https:\/\/depot.manageiq.org\/extensions\/ldomb\/miq-redhat-sat6<\/a><br \/>\nHere also a direct link to the download<br \/>\n<a href=\"https:\/\/depot.manageiq.org\/extensions\/ldomb\/miq-redhat-sat6\/download\">https:\/\/depot.manageiq.org\/extensions\/ldomb\/miq-redhat-sat6\/download<\/a><\/p>\n<p>Follow the instructions in the README.md to upload the automate domain into CloudForms. <\/p>\n<p><strong>Step 2<\/strong>  As the domain will be imported as disabled<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_047.png\" alt=\"selection_047\" width=\"413\" height=\"23\" class=\"alignnone size-full wp-image-1739\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_047.png 413w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_047-300x17.png 300w\" sizes=\"auto, (max-width: 413px) 100vw, 413px\" \/><br \/>\nWe will have to go and enable it.<br \/>\nClick on Configuration -&gt; Edit this Domain<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_048.png\" alt=\"selection_048\" width=\"189\" height=\"196\" class=\"alignnone size-full wp-image-1740\" \/><br \/>\nand check the box Enabled<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_049.png\" alt=\"selection_049\" width=\"1062\" height=\"231\" class=\"alignnone size-full wp-image-1741\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_049.png 1062w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_049-300x65.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_049-768x167.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_049-1024x223.png 1024w\" sizes=\"auto, (max-width: 1062px) 100vw, 1062px\" \/><br \/>\nSave the Domain name<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2016-09-20-at-5.30.44-PM.png\" alt=\"screen-shot-2016-09-20-at-5-30-44-pm\" width=\"46\" height=\"28\" class=\"alignnone size-full wp-image-1612\" \/><\/p>\n<p><strong>Step 3 <\/strong><br \/>\nYou should now see the following<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_046.png\" alt=\"selection_046\" width=\"425\" height=\"482\" class=\"alignnone size-full wp-image-1743\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_046.png 425w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_046-265x300.png 265w\" sizes=\"auto, (max-width: 425px) 100vw, 425px\" \/><\/p>\n<p><strong>Step 4 <\/strong> Edit the Schema to fit your configuration. Select DynamicDropDowns -&gt; and the Schema tab.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_050.png\" alt=\"selection_050\" width=\"1172\" height=\"478\" class=\"alignnone size-full wp-image-1745\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_050.png 1172w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_050-300x122.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_050-768x313.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_050-1024x418.png 1024w\" sizes=\"auto, (max-width: 1172px) 100vw, 1172px\" \/><\/p>\n<p>Click on Configuration -&gt; Edit selected Schema<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_051.png\" alt=\"selection_051\" width=\"186\" height=\"179\" class=\"alignnone size-full wp-image-1746\" \/><\/p>\n<p>Step 5 Edit the following fields<br \/>\n<em>username:<\/em> your admin user<br \/>\n<em>password:<\/em> your admin password<br \/>\n<em>sat6url<\/em>: https:\/\/yoursat6fqdn\/api<br \/>\n<em>katellourl<\/em>: https:\/\/yoursat6fqdn\/katello\/api<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_052.png\" alt=\"selection_052\" width=\"993\" height=\"157\" class=\"alignnone size-full wp-image-1747\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_052.png 993w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_052-300x47.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_052-768x121.png 768w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><\/p>\n<p>Click the save button<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2016-09-20-at-5.30.44-PM.png\" alt=\"screen-shot-2016-09-20-at-5-30-44-pm\" width=\"46\" height=\"28\" class=\"alignnone size-full wp-image-1612\" \/><\/p>\n<p><strong>Step 6 <\/strong>You are now ready to start pointing your service dialog fields to the automate methods. Go to Automate<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_026.png\" alt=\"selection_026\" width=\"217\" height=\"74\" class=\"alignnone size-full wp-image-1696\" \/><br \/>\nCustomization<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_027.png\" alt=\"selection_027\" width=\"190\" height=\"35\" class=\"alignnone size-full wp-image-1697\" \/><br \/>\nService Dialogs<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_053.png\" alt=\"selection_053\" width=\"433\" height=\"38\" class=\"alignnone size-full wp-image-1750\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_053.png 433w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_053-300x26.png 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/p>\n<p>Select your service catalog item which we created in the previous blog posts.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_054.png\" alt=\"selection_054\" width=\"415\" height=\"21\" class=\"alignnone size-full wp-image-1751\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_054.png 415w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_054-300x15.png 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/p>\n<p><strong>Step 7 <\/strong>Click the Configuration -&gt; Edit this Dialog<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_055.png\" alt=\"selection_055\" width=\"198\" height=\"118\" class=\"alignnone size-full wp-image-1752\" \/><br \/>\nWe want to re arrange the order of the fields a little bit. Click the Extra_Vars value on the left<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_063.png\" alt=\"selection_063\" width=\"911\" height=\"566\" class=\"alignnone size-full wp-image-1762\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_063.png 911w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_063-300x186.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_063-768x477.png 768w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><br \/>\nDrag and drop the fields on the right so they will look like mine.<\/p>\n<p>Do not hit save yet!<\/p>\n<p><strong>Step 8<\/strong><br \/>\nSelect the org field<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_056.png\" alt=\"selection_056\" width=\"433\" height=\"23\" class=\"alignnone size-full wp-image-1753\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_056.png 433w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_056-300x16.png 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><br \/>\nWe 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 )<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_057.png\" alt=\"selection_057\" width=\"1252\" height=\"561\" class=\"alignnone size-full wp-image-1754\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_057.png 1252w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_057-300x134.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_057-768x344.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_057-1024x459.png 1024w\" sizes=\"auto, (max-width: 1252px) 100vw, 1252px\" \/><\/p>\n<p>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.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_059.png\" alt=\"selection_059\" width=\"1084\" height=\"595\" class=\"alignnone size-full wp-image-1757\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_059.png 1084w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_059-300x165.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_059-768x422.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_059-1024x562.png 1024w\" sizes=\"auto, (max-width: 1084px) 100vw, 1084px\" \/><\/p>\n<p><strong>Step 9<\/strong> Select activationkey and change the values to the following<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_064.png\" alt=\"selection_064\" width=\"1499\" height=\"587\" class=\"alignnone size-full wp-image-1763\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_064.png 1499w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_064-300x117.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_064-768x301.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_064-1024x401.png 1024w\" sizes=\"auto, (max-width: 1499px) 100vw, 1499px\" \/><\/p>\n<p><strong>Step 10 <\/strong> Select location and change the fields to match the picture<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_065.png\" alt=\"selection_065\" width=\"1521\" height=\"573\" class=\"alignnone size-full wp-image-1765\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_065.png 1521w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_065-300x113.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_065-768x289.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_065-1024x386.png 1024w\" sizes=\"auto, (max-width: 1521px) 100vw, 1521px\" \/><\/p>\n<p><strong>Step 11<\/strong> Select hostgroup and change the values to reflect the picture below.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_066.png\" alt=\"selection_066\" width=\"1496\" height=\"638\" class=\"alignnone size-full wp-image-1766\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_066.png 1496w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_066-300x128.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_066-768x328.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_066-1024x437.png 1024w\" sizes=\"auto, (max-width: 1496px) 100vw, 1496px\" \/><\/p>\n<p><strong>Step 12<\/strong> We will update the updatehost filed from a text field to radio buttons.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_067.png\" alt=\"selection_067\" width=\"1058\" height=\"700\" class=\"alignnone size-full wp-image-1768\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_067.png 1058w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_067-300x198.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_067-768x508.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_067-1024x678.png 1024w\" sizes=\"auto, (max-width: 1058px) 100vw, 1058px\" \/><\/p>\n<p>Now you can hit the save button.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Screen-Shot-2016-09-20-at-5.30.44-PM.png\" alt=\"screen-shot-2016-09-20-at-5-30-44-pm\" width=\"46\" height=\"28\" class=\"alignnone size-full wp-image-1612\" \/><\/p>\n<p><strong>Step 13 <\/strong> Congratulations. Your done. when you go know to your service dialog or custom button you will see the following<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045.png\" alt=\"selection_045\" width=\"979\" height=\"835\" class=\"alignnone size-full wp-image-1734\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045.png 979w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045-300x256.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_045-768x655.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: &#8211; Activation Keys &#8211; Organization &#8211; Location &#8211; Hostgroups The end goal will look like this Step 1 First you will need to pull&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2048,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[64,37],"tags":[67,77,68],"class_list":["post-1632","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ansible","category-cloudforms","tag-ansible","tag-cloudfroms","tag-satellite6"],"_links":{"self":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/1632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1632"}],"version-history":[{"count":14,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/1632\/revisions"}],"predecessor-version":[{"id":1769,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/1632\/revisions\/1769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/media\/2048"}],"wp:attachment":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}