Cloud Managed Networks

last person joined: 11 hours ago 

Forum to discuss all things Aruba Central and UXI Network Management, this includes Aruba Central managed networks, Central configuration, best practices, Central APIs, Cloud Guest, AIOps, Presence Analytics and Other Central Applications
Expand all | Collapse all

empty json variable when using config templates for switches in Aruba Central

  • 1.  empty json variable when using config templates for switches in Aruba Central

    Posted Sep 17, 2018 07:21 AM
      |   view attached

    Hello,

     

    I have different switches using the same configuration template in Aruba Central. Some switches don't have untagged VLANS on their ports. But because i use variable for this untagged VLAN i get a template ERROR on the switches who don't use that untagged VLAN. 

     

    "vlan.508.untagged": "" doesn't work. I get no value ERROR. Null doesn't work either. 

     

    Anybody got experience with this. I think the only solution is to use different config templates for every switch. I'm not a json guru, so maybe you can do something else i don't know. 



  • 2.  RE: empty json variable when using config templates for switches in Aruba Central

    Posted Oct 05, 2018 02:02 PM

    Central templates admit %if variable% type of constructs precisely for this use case. Here are some examples:

     

    If-endif

    %if condition1=true%
    routing-profile 10.10.1.0 255.255.255.0 10.10.1.255
    %endif%

    If-else-endif

    %if condition1=true%
    routing-profile 10.40.0.0 255.255.255.0 10.40.0.255
    %else%
    routing-profile 10.20.1.0 255.255.255.0 10.20.1.255
    %endif%

    Nested if

    %if condition1=true%
    routing-profile 10.10.0.0 255.255.255.0 10.10.0.255
       %if condition2=true%
       routing-profile 10.30.1.0 255.255.255.0 10.30.1.255
       %else%
       routing-profile 10.50.1.0 255.255.255.0 10.50.1.255
       %endif%
    %else%
    routing-profile 10.20.0.0 255.255.255.0 10.20.0.255
       %if condition3=true%
       routing-profile 10.70.1.0 255.255.255.0 10.70.1.255
       %else%
       routing-profile 10.40.1.0 255.255.255.0 10.40.1.255
       %endif%
    %endif%