<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Does POST cliTemplateConfiguration/upload work with Global Variables? in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553682#M1379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Carl, my apologies.&amp;nbsp; There was a UI save happening afterwards that would cause the template to function properly during deployment when we attempted to reproduce this issue.&amp;nbsp; We'll work on getting this issue fixed.&amp;nbsp; I've created &lt;A href="https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvc11240"&gt;CSCvc11240 &lt;/A&gt;to track this issue (&lt;SPAN style="text-decoration: line-through;"&gt;it's not publicly visible yet but should be within 24 hours&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workarounds we'd suggest right now is either:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use template-specific (non-global) variables and populating the values as needed during deployment&lt;/LI&gt;&lt;LI&gt;After uploading the template, open it in the UI and click the save button.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for bringing this issue up and thank you for your patience.&amp;nbsp; I very much appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: bug is now visible, added link&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Nov 2016 21:52:20 GMT</pubDate>
    <dc:creator>Spencer Zier</dc:creator>
    <dc:date>2016-11-14T21:52:20Z</dc:date>
    <item>
      <title>Does POST cliTemplateConfiguration/upload work with Global Variables?</title>
      <link>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553679#M1376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been using &lt;SPAN style="font-size: 10pt;"&gt;POST cliTemplateConfiguration/upload to upload CLI Templates into Prime but I'm having issues with templates which use global variables (they're not being populated when I deploy the template).&amp;nbsp; If I post the following template with local variables I can deploy without a problem and the hostname gets set to 'carlsrouter'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;cliTemplate&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;content&amp;gt;hostname $hostname&lt;/P&gt;&lt;P&gt;&amp;lt;/content&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;Applies Hostname&amp;lt;/description&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;deviceType&amp;gt;Routers&amp;lt;/deviceType&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;lastDeployTime&amp;gt;2016-10-24T17:08:32.594+01:00&amp;lt;/lastDeployTime&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;ZEN-HOSTNAME-POSTED&amp;lt;/name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;path&amp;gt;My Templates/Zen Service Templates&amp;lt;/path&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;variables&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;variable&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;defaultValue&amp;gt;carlsrouter&amp;lt;/defaultValue&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;Device Host Name&amp;lt;/description&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;displayLabel&amp;gt;Hostname&amp;lt;/displayLabel&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;hostname&amp;lt;/name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;type&amp;gt;String&amp;lt;/type&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/variable&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/variables&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/cliTemplate&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I upload the following template into Prime via the API and deploy I get a router named '$gv.lab-hostname' :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;cliTemplate&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;content&amp;gt;hostname $gv.lab-hostname&lt;/P&gt;&lt;P&gt;&amp;lt;/content&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;Applies Hostname2&amp;lt;/description&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;deviceType&amp;gt;Routers&amp;lt;/deviceType&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;ZEN-HOSTNAME-POSTED2&amp;lt;/name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;path&amp;gt;My Templates/Provisioning Templates&amp;lt;/path&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/cliTemplate&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I create either template using the Web UI they work without a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there something special I need to do when uploading templates which use global variables via the API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 11:37:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553679#M1376</guid>
      <dc:creator>carl.simpson2</dc:creator>
      <dc:date>2016-10-31T11:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Does POST cliTemplateConfiguration/upload work with Global Variables?</title>
      <link>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553680#M1377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of Prime Infrastructure are you using?&amp;nbsp; We tried reproducing this issue on 3.1.0 but couldn't get it to reproduce.&amp;nbsp; As long as we defined the global variable in the UI, simply specifying it in the cliTemplate/content request parameter, like you do in your ZEN-HOSTNAME-POSTED2 example, works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 21:55:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553680#M1377</guid>
      <dc:creator>Spencer Zier</dc:creator>
      <dc:date>2016-11-02T21:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Does POST cliTemplateConfiguration/upload work with Global Variables?</title>
      <link>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553681#M1378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Spencer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the feedback.&amp;nbsp; I'm using &lt;SPAN class="s1"&gt;Build 3.1.0.0.132&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I've POSTed the template to Prime (e.g. &lt;SPAN class="s1"&gt;&lt;SPAN&gt;curl -H "Content-Type: text/xml" --data-binary @ZEN-HOSTNAME-POSTED3.xml -X POST -u username '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://cpi01.example.com/webacs/api/v2/op/cliTemplateConfiguration/upload" rel="nofollow" target="_blank"&gt;https://cpi01.example.com/webacs/api/v2/op/cliTemplateConfiguration/upload&lt;/A&gt;&lt;SPAN&gt;')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see that when going to deploy the template through the Web GUI it doesn't recognise that I've provided a template with Global Variables (When the 'Form' button is selected):&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2016-11-04 at 11.57.45.png" class="image-1 jive-image" src="/legacyfs/online/fusion/102387_Screen Shot 2016-11-04 at 11.57.45.png" style="height: 355px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;But if I select the 'CLI' button you can see that the global variable is there:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2016-11-04 at 11.58.08.png" class="jive-image image-2" src="/legacyfs/online/fusion/102388_Screen Shot 2016-11-04 at 11.58.08.png" style="height: 343px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Just to show the variable exists as a global variable:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2016-11-04 at 11.58.32.png" class="jive-image image-3" src="/legacyfs/online/fusion/102398_Screen Shot 2016-11-04 at 11.58.32.png" style="height: 15px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I search for and add the $gv.lab-hostname variable to the template through the Web GUI and save the template, it kicks it working using the global variables again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e Web GUI update to make the template content look like this (then click save):&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;hostname $gv.lab-hostname&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;$gv.lab-hostname&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I see the expected form values when trying to deploy:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2016-11-04 at 12.50.49.png" class="jive-image image-4" src="/legacyfs/online/fusion/102400_Screen Shot 2016-11-04 at 12.50.49.png" style="height: 376px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Were you using the exact same build when you tried to replicate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 12:57:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553681#M1378</guid>
      <dc:creator>carl.simpson2</dc:creator>
      <dc:date>2016-11-04T12:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Does POST cliTemplateConfiguration/upload work with Global Variables?</title>
      <link>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553682#M1379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Carl, my apologies.&amp;nbsp; There was a UI save happening afterwards that would cause the template to function properly during deployment when we attempted to reproduce this issue.&amp;nbsp; We'll work on getting this issue fixed.&amp;nbsp; I've created &lt;A href="https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvc11240"&gt;CSCvc11240 &lt;/A&gt;to track this issue (&lt;SPAN style="text-decoration: line-through;"&gt;it's not publicly visible yet but should be within 24 hours&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workarounds we'd suggest right now is either:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use template-specific (non-global) variables and populating the values as needed during deployment&lt;/LI&gt;&lt;LI&gt;After uploading the template, open it in the UI and click the save button.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for bringing this issue up and thank you for your patience.&amp;nbsp; I very much appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: bug is now visible, added link&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 21:52:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553682#M1379</guid>
      <dc:creator>Spencer Zier</dc:creator>
      <dc:date>2016-11-14T21:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Does POST cliTemplateConfiguration/upload work with Global Variables?</title>
      <link>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553683#M1380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Spencer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the update, hopefully the fix is simple and can be rolled out quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 18:15:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/does-post-clitemplateconfiguration-upload-work-with-global/m-p/3553683#M1380</guid>
      <dc:creator>carl.simpson2</dc:creator>
      <dc:date>2016-11-16T18:15:29Z</dc:date>
    </item>
  </channel>
</rss>

