cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
305
Views
0
Helpful
2
Replies

System variable "__device.platformId" not available at day-0/PNP?

KristofB
Level 1
Level 1
Why is system variable "__device.platformId" not available for OnBoarding day-0 Templates?  
 
When a new device appears in Plug And Play inventory, all kinds of information is available; 
   Product ID : C9300-24P

   Neighbors Detail:
        Device Name:  xxxx
        Interface name: xxxx

So I would expect that we can use all this information to help build our Day-0 template.
For example, I wanted to use the platformId to determine the number of stack members and define how many ports are available;

 

{% for Platform in __device.platformId.split(',') %}
   {% if '24' in Platform %}
      {% set LastPort = 24 %}
   {% elif '48' in Platform %}
      {% set LastPort = 48 %}
   {% endif %}
     
interface range GigabitEthernet{{ loop.index }}/0/1-{{ LastPort }}
 description It Works

{%endfor%}     
 

I'm not sure if this is the best way to achieve what I need, but it seemed like a logical approach to me.

However, I’m getting the following error:

 

error.jpg

 
What’s frustrating, though, is that after onboarding, the provisioning status shows as “Success”, even though the Day-N template hasn’t actually been applied yet.
Only when you manually trigger a provision on the device does the Day-N template get applied.
 
Thanks!
1 Accepted Solution

Accepted Solutions

Torbjørn
VIP
VIP

Hello @KristofB,

This is a known limitation in onboarding templates as described in the user guide: https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/catalyst-center/2-3-7/user_guide/b_cisco_catalyst_center_user_guide_237/b_cisco_dna_center_ug_2_3_7_chapter_01000.html#onboarding-templates-or-day-zero-t... 

You will either have to supply the required information as a variable or handle it with an EEM applet during provisioning

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

View solution in original post

2 Replies 2

KristofB
Level 1
Level 1

Sorry I pasted the error image on top of sentence; 

"Using the exact same script in a day-N template works just fine." 

Torbjørn
VIP
VIP

Hello @KristofB,

This is a known limitation in onboarding templates as described in the user guide: https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/catalyst-center/2-3-7/user_guide/b_cisco_catalyst_center_user_guide_237/b_cisco_dna_center_ug_2_3_7_chapter_01000.html#onboarding-templates-or-day-zero-t... 

You will either have to supply the required information as a variable or handle it with an EEM applet during provisioning

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev