Calling Variable in XOS 15.X
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-07-2014 09:50 PM
Create Date: Aug 23 2012 9:24AM
I am trying to set a variable to a port number (or range) and apply the variable when configuring a vlan:
set var uplink 1:48
config vlan vlan200 add port $uplink tag
I can see that the variable gets created and is correctly '1:48', however the config vlan command fails with the ^ pointing at the 'u' in uplink.
I am just using the scripting basics guide as my reference (they do this using $count to assign a vlan to a port), has the variable call changed in 15.X or am i simply doing something wrong / unsupported?
Thanks.
(from Nick_Lindhag)
I am trying to set a variable to a port number (or range) and apply the variable when configuring a vlan:
set var uplink 1:48
config vlan vlan200 add port $uplink tag
I can see that the variable gets created and is correctly '1:48', however the config vlan command fails with the ^ pointing at the 'u' in uplink.
I am just using the scripting basics guide as my reference (they do this using $count to assign a vlan to a port), has the variable call changed in 15.X or am i simply doing something wrong / unsupported?
Thanks.
(from Nick_Lindhag)
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-07-2014 09:50 PM
Create Date: Aug 23 2012 9:46AM
Thank you for the response, i have this working now. My issue was very noob . I wrote the script to be used after we have enabled stacking but was testing on a new switch (stacking was not yet enabled). I found this out by removing my "1:" and the command worked.
(from Nick_Lindhag)
Thank you for the response, i have this working now. My issue was very noob . I wrote the script to be used after we have enabled stacking but was testing on a new switch (stacking was not yet enabled). I found this out by removing my "1:" and the command worked.
(from Nick_Lindhag)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-07-2014 09:50 PM
Create Date: Aug 23 2012 9:36AM
- Make sure vlan200 is tagged Put quotes around set var uplink "1:48" Try referencing the variable with $(uplink) instead of $uplink. This helps when a variable has a special character in it.
