command script tool netsight

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
  • (Edited)
I have a issue where I have to script towards none supported units in netsight ( older extremeware)

In the command script tools is there any way of doing something similar like this ?

if %DEVICEIP% == "192.168.1.1"

// Andreas
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Tony Thornton

Tony Thornton, Extreme Alumnus

  • 1,412 Points 1k badge 2x thumb
Hi Andreas,

Are you looking to do something equivalent to writing an ACL in EXOS (if / then / action)?

If yes, you can create an ACL on ExtremeWare.  Depending on if you have an 'i' series (Summit 48si, Summit 7i, Alpine, ex) or 'e' series switch (Summit 200/300/400), the commands are a little different.

Below is a link to the ExtremeWare CLI Guide.  Page 491 describes how to create an access list.

The guide shows how to create ACLs for 'e' and 'i' series switches.

http://extrcdn.extremenetworks.com/wp-content/uploads/2014/02/ExtremeWareCommandRef78.zip

Hope this helps.

Regards
Tony
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb
Thanks for the response.
The thing I'm looking for is actually a port group feature in nesight for extremeware. Since I couldn't add the ports to a port group I wanted to find a way to configure vlan X on device Y on port portgroup X ( in essence a array of ports )
Photo of Tony Thornton

Tony Thornton, Extreme Alumnus

  • 1,412 Points 1k badge 2x thumb
I'm not sure if this is what you are looking for, but you can add a group of ports to specific vlans and apply to certain switches like this:

For “i” series switches:

configure vlan <vlan name> add ports <portlist> {tagged | untagged} {nobroadcast} {soft-rate-limit}

For “e” series switches:

configure vlan <vlan name> add ports <portlist> {tagged | untagged}

You can enter these commands in the NetSight scripting tool to allow you to configure vlan X with port(s) Y and run the script on various device(s) Z.

Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb
No not what I mean.

In netsight there is a command script tool ( if you right click on a device it will show up as execute command)

Can I in that tool use any if/else statement to run a command script on a particular devices.

Say I have a group of 10 devices.

On device that has ip 1.1.1.2 and 1.1.1.3 I want to tag a Y with vlan X but on the rest of the devices I want to tag vlan X on port Z

Makes sense ?
Photo of Tony Thornton

Tony Thornton, Extreme Alumnus

  • 1,412 Points 1k badge 2x thumb
Ok, I think I understand now. ExtremeWare does not support if/else statements.  The only conditional statements that ExtremeWare supports are ACLs which seem to be more limited in their functionality than what you are looking for.  EXOS based switches support scripting such as UPM and Python which would probably support what you are trying to do, but ExtremeWare does not support this.

Hope this helps.
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb
No sorry not sure if I mislead you

Forget about extremeware.

Can I in "Nesight command script tool"
Do if and else statements ?
Similar to this script I wrote in ridgeline

IF ([string equal $eapsdomainname BLAJD]) THEN
IF ([string equal $deviceIP X.X.X.X ]) THEN
IF ([string equal $createvman yes]) THEN
create vman $vmanname
configure vman $vmanname tag $currentVmanTag
disable igmp snooping $vmanname
ENDIF
config eaps uppsala_pri add protected $vmanname
config vman $vmanname add ports X,X tagged
regexp {.*Adding EAPS ring ports to a VLAN could cause a loop.*} ${CLI.OUT} foundit
IF ([info exists foundit]) THEN
yes
ENDIF
ENDIF
Photo of Thomas, Frank

Thomas, Frank, Employee

  • 1,902 Points 1k badge 2x thumb
If you're running Netsight 6.2-3
While not in Console, from Oneview there is a pretty powerful scripting engine that might be able to accomplish what you are looking for.
It supports if-else style statements


Keyword wise, you could use IP, Device Type or software Rev.
Photo of andreas

andreas

  • 1,218 Points 1k badge 2x thumb
Yeah I know that tool. However that is not a option since it wont run on a "extremeware" OS.

But thanks anyways.