Showing results for 
Search instead for 
Did you mean: 

Prime Infrastructure deploy to devices based on a list

Level 1
Level 1

Hi, I do need to deploy two lines of config to a few hundred network devices. The devices do exist in Prime, but I only want to deploy the config to a portion of the devices. 
I have have a list (csv) with the IP-addresses of the devices, is it possible to deploy the config based on the list through Prime?

6 Replies 6


 - Presumably not as seen from the link below :

  - I don't think it's possible to import a list as a 'change target' ; if someone found workarounds; glad to here.


-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

Bill Longman
Cisco Employee
Cisco Employee

You could do this with the NBI. From your CSV, which I'm assuming is just the IP addresses of the devices you want to update, you will need to determine the device ID.


for ip in $(cat ipAddress.csv)


  curl -k -u username:password https://$piHost/webacs/api/v1/data/Devices?ipAddress="$ip"| grep Devices/

done > deviceIdList.txt


From that list you can turn it into the body of the XML that you need to send in the second step. It needs to look like this:


<?xml version="1.0" encoding="UTF-8"?>


Then use that to PUT the XML file. Once you do that, it will apply the template to those devices.

curl -k -u username:password -X PUT \
https://$piHost/webacs/api/v1/op/cliTemplateConfiguration/deployTemplateThroughJob \
-H 'content-type: text/xml' -d @deviceListTemplate.xml



This assumes, of course, that you have already created a template for the command lines that you want to deploy.


The other assumption that I made was that the template does not have any parameters. If you need to send parameters to the template for each device, that's a bit different.


For help with using templates and the NBI, consult the /nbi_help page for details on what you need to send in the various NBI calls.


With curl and the shell, you can get pretty far. You can get even further with some real Python behind it.


 - I do acknowlegde the technical knowledge of your answers but in the end the product should evolve to include such tasks automatically for the requested functionality ; which would create great added value. It's a bit like having a banking app and saying : 'but if you need to transfer money to a series of multiple recipients simultaniously , you need to learn Fortran first!


-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

Hold's not like it cannot be done without programming. The problem as stated was that the IP addresses of the devices to manage were in a CSV file. You can just as easily recreate that "CSV file" by creating a user defined group and then running the template against that group. No programming required.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: