Oneview scripting $vendor variable


Userlevel 3
Hi,

I want to create custom Oneview script based on official XOS ones. On XOS script it controls $vendor variable to see if it is a supported device with this:

IF (![string equal $vendor "Extreme"]) THEN error "This script is only supported for Extreme switches."
ENDIF

So if I want to control for EOS and Cisco or other vendors we have, what should be the vendor string? Where can I find it?

Thanks,

Rahman

3 replies

Userlevel 6
I believe it does take some OID for the vendor through SNMP. in my case following works:

IF (![string equal $vendor "Cisco"]) THEN error "This script is only supported for Cisco switches. This device is $vendor."
ENDIF
Userlevel 3
Pala, Zdenek wrote:

I believe it does take some OID for the vendor through SNMP. in my case following works:

IF (![string equal $vendor "Cisco"]) THEN error "This script is only supported for Cisco switches. This device is $vendor."
ENDIF

But what about EOS? should I use "Enterasys"
Userlevel 7
Pala, Zdenek wrote:

I believe it does take some OID for the vendor through SNMP. in my case following works:

IF (![string equal $vendor "Cisco"]) THEN error "This script is only supported for Cisco switches. This device is $vendor."
ENDIF

Hi Rahman,

the script from the post above will show the contents of the vendor variable if it is different from Cisco. Thus you can use that to find out what $vendor value to use for EOS devices.

Thanks,
Erik

Reply