Wireless Access

Reply
MVP

iAP Templates using custom variables

This is a really cool addtion to the process - Thanks!

 

I get using %if custom = such and such%, but what I find is that I'd rather do more interesting logic.

Is there a NOT operator?

 

I've tried !=, <>, and NOT to no avail.

 

--Matthew

--Matthew

if I've helped, please give kudos
if I've provided a solution, please mark the solution so others can find it
Moderator

Re: iAP Templates using custom variables

Glad you like the feature.  This is the kind of feedback that really helps improve the product.  We currently do not have a 'NOT' operator, but please file it into the Ideas Portal on the support site.  Can you also provide some use cases?


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
MVP

Re: iAP Templates using custom variables

We are replacing an existing (bad) WLAN product, but don't want to have both hot at the same time on the same SSID.

 

I want use custom_variable_2 to indicate variation from normal -- my preference is "Install" and blank.

So what I'm actually looking for is a test for blankness.

 

%if %custom_variable_2%=Install%

set dummy SSID

put radios in spectrum monitor mode

etc.

%endif%

 

%if custom_variable_2%NOT=Install%

do normal stuff

%endif%

 

I'm finding out that the synatx I'm using above isn't actually working.  Is it possible to test the variable for a specific string, or is it just a test of filled or not filled?

 

--Matthew

--Matthew

if I've helped, please give kudos
if I've provided a solution, please mark the solution so others can find it
Moderator

Re: iAP Templates using custom variables

Templates only test the existence or not of a variable on the device's variable listing.  It's not testing the content of the variables.


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
MVP

Re: iAP Templates using custom variables

Then I think I'll just head on over to the feature request page...

--Matthew

if I've helped, please give kudos
if I've provided a solution, please mark the solution so others can find it
Occasional Contributor II

Re: iAP Templates using custom variables

Hi msabin.

 

Did you ever get this to work, either with a feature upgrade or a workaround?

 

Is it possible to check if a field is NULL?

 

what i am trying to achieve is setting bandwidth limits as per a custom_variable

 

I have got the following:

 

 %if custom_variable_1%
 bandwidth-limit %custom_variable_1%
 %endif%
bandwidth-limit 2048

 

This appears to work, but has the side effect of causing an error in the config

 

Apologies for resurrecting an old post

 

TIA

 

G

MVP

Re: iAP Templates using custom variables

I use that syntax for 7 or 8 variables now, all seem to work fine and I don't have any errors in the config reported.

 

The answer was that %if custom_variable_1% is essentially testing for NULL and if NULL then the if returns negative and the line is skipped.

 

What version of iAP/Airwave are you on, and what error are you getting.

 

 

--Matthew

if I've helped, please give kudos
if I've provided a solution, please mark the solution so others can find it
Occasional Contributor II

Re: iAP Templates using custom variables

Hi Matthew,

 

We are on AMP 7.7.13 and iAP 6.4.2.0.

 

When looking at the config, it shows the 2 bandwidth lines as such

 

Desired   bandwidth-limit 2048
          bandwidth-limit 768

 

Looking at the VC and the line shows

 

Configuration:    Error (Configuration contains invalid commands)

running a repair doesnt seem to resolve the issue.  I am 99.999% sure its not anything else in the config as if i remove the logic and revert back to

 

 %if custom_variable_1%
 bandwidth-limit %custom_variable_1%
 %endif%

 

The error doesnt appear, making me think that the rest of the config is OK, and its this bit causing the issue.

 

 

 TIA

 

G

 

MVP

Re: iAP Templates using custom variables

Yeah, I ran into the same behavior.

My solution was to dedicate a variable to that valueand set it for all locations.

 

We enter the "default" or "normal" value at all sites, then change it for those which need a variation.

--Matthew

if I've helped, please give kudos
if I've provided a solution, please mark the solution so others can find it
Occasional Contributor II

Re: iAP Templates using custom variables

Hi Matthew,

 

Glad its not just me :)

 

What method did you use to set all of them as a "default"? 

 

Did you use the template to set the default limit then manually change the ones that required a different limit?

 

TIA

 

G

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: