cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3205
Views
11
Helpful
12
Replies

APIC-EM 1.5 PnP Templates and Bulk Import

casanavep
Level 3
Level 3

Team, sorry for my ignorance.  This is my first attempt at APIC-EM, but I have installed 1.5.0.1368 and added the PnP 1.5.1.35 to it.  This is fully in a lab environment, but trying to get it working for proof of concept.  I have create a full featured router DMVPN spoke configuration with four $Variables build into the template and imported it.  I am able to test the template by filling in the variables via "form view" and see that the correct configuration is built in the "preview" tab.  When I try to manually add a device under a test project, I am able to select template but not pick one of the templates listed under my template tab of the PnP dashboard.  It simply stays at "Showing 0 of 0, Loading" with a perpetually spinning circle.  The same happens if I try to apply a static config vs a template; so, there is issue #1, cannot add devices manually with a static config or template.

Next, I figured I would try to bulk import the devices via CSV vs individually.  I am unable to find an example of a CSV bulk import that calls on a template and its per device variable fields.  Could anyone assist with an example?  Thank you all.  This product appears to have great potential, once I getting it to work!

Respetfully,

P

12 Replies 12

aradford
Cisco Employee
Cisco Employee

there is no way to "bulk update" template variables.

I have been meaning to write a script to do this..... i probably need to get this done.

Adam

So just to verify, you are saying that there is no way to "bulk import" devices via csv file and specify that those devices are associated with a template, in the same way that you can bulk import based on static configurations in the CSV (APIC-EM -> Network Plug and Play --> Bulk Import Tab -->  Import Button)?  Or is that they can be bulk imported, but just not with association to a template or individual variables for the template?

Also, any pointers to why I cannot add single devices / template option under add device doesn't seem to work?

sorry, I should be more specific...

No way to assign the variables.

Adam

Adam,

Thanks for the patience and assistance for me, a newbie at APIC-EM and DNA.  Do you have the format of a bulk import csv with templates, or would I simply update the "Config Name" column to be "Template Name" and the backend know how to handle it.  And lastly, do you know of any fixes to not being able to add individual devices as seen below the templates exist:

template.png

But when I try to add a device they never show up, stuck in loading on a fresh install of APIC-EM sitting idle / managing nothing yet, but give 32GB RAM, 500GB RAID 10 HDD (SAS 15K disks), and 6 cores worth of resources:

add device.png

ok, was able to import via CSV, just could only do with static configs vs templates.  Was also able to modify the individual devices to templates, then edit devices under the project, select template, copy and paste the template name into the edit device field (drop down population does not function).  It does take, but never gives you the option to plug in the variables for that unique device.   When you later edit that device, it switches it back to a config vs template selection, but keeps the template name as the config for the device.  I am guessing template functionality just doesn't work in stand alone APIC-EM with PnP 1.5.0 for now, from a being able to apply templates to many devices with only their unique variables pre-specified.

steffenwebb
Level 4
Level 4

have you seen the download sample (CSV) button

Skærmbillede 2017-09-13 kl. 11.34.38.png

Steffen,

Thanks for reaching out.  Yes I have seen and attempted the standard example.  It does give you the ability to bulk import devices against projects and assign the shared or unique "static configurations."  What it does not do is give that ability to bulk import against a dynamic template with variables, unless you have a working example (templates not shown in the sample CSV) of how to do this?  Templates is was what I was asking for and trying to understand if there was a capabilty to accomplish.  I did reach out to the make a wish email and they replied with the posability of add defining variables during bulk CSV import on future release, which I think would greatly improve the scalability PnP based template usablity.  Just for a picture of what I am trying to accomplish, if I had 200 iWAN or legacy DMVPN spokes that simply had unique hostnames and third octet of their LAN RFC1918 IP space, those two variables could easily be dropped into the CSV file.  THe same would be for a LAN campus rollout with 500 access switches, all the same model, port layout, and uplink used.  Typically only the MGMT IP and hostnames would be unique during initial rollout; so again, would be a great use of rollout via bulk import against a template with two variables defined during import vs individually via manually human per defince editing.  Your bulk import would require no more manualy intervention for your 200 spoke or 500 switch rollout, very efficient and greatly reduced room for human error.  That i what I initially thought the capability was, but I just wasn't understanding how to do it, thus I created this thread.

Respectfully,

P

A colleague and I made a python script that, based on a spoke template and a csv file generates config files for each router and upload the config to APIC-EM and assigns the config to a serial nr in a project.

What we actually did was assign alle serial number to a pnp project on a cisco smart account and made a controller profile that redirects the pnp agent to out APIC-EM controllers public ip. In that way we can send out 400 routers without any config, and the customer only need an internet connection with dhcp

If you like, i can send the files. In the template I have removed all sensitive information.

The example only works with predefined variables in the python script and template. And dynamic version will be for us only

best regards Steffen

That would be awesome and much appreciated.  Thanks again for taking the time to help a APIC-EM/SDN/DNA newbie like me!

Respectfully,

P

look under my profile / documents

The config-uploader is not made my me, but found on :

GitHub - CiscoDevNet/apic-em-pnp-config-uploader: Tool for the APIC-EM PnP App to add devices and upload their configs

best regard Steffen

did you succeed ?

Best regards Steffen

I am trying to use the Python script you refer to but cant get it to work.  I am not a script person :(

 

File "C:\Users\Me\Documents\APIC-EM\apic-em-pnp-config-uploader-master\apic-em-pnp-config-uploader-master\apic-em-pnp-config-uploader.py", line 71, in apic_connect
connection = opener.open(request)
File "C:\Python\lib\urllib\request.py", line 523, in open
req = meth(req)
File "C:\Python\lib\urllib\request.py", line 1247, in do_request_
raise TypeError(msg)
TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.

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:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community