command script tool netsight


Userlevel 2
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

8 replies

Userlevel 3
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
Userlevel 2
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 )
Userlevel 3
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 add ports {tagged | untagged} {nobroadcast} {soft-rate-limit}

For “e” series switches:

configure vlan add ports {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.
Userlevel 2
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 ?
Userlevel 3
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.
Userlevel 2
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
Userlevel 6
Hi Andres,

The NetSight Command Script tool lets you execute a sequence of CLI commands + variables (user-defined and system variables. There is no option for if/then statements in this script tool in Netsight. That option is available in Ridgeline only.

You can find some examples (CLI, variables and so on) in the "Netsight Suite-Wide Tools User Guide" in the link below (under Documentation => Manuals & Release Notes => Netsigh 6.x => Netsight Suite):

https://extranet.extremenetworks.com/downloads/Pages/NMS.aspx
Userlevel 4
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.

Userlevel 2
Yeah I know that tool. However that is not a option since it wont run on a "extremeware" OS. But thanks anyways.

Reply