Oneview scripting $vendor variable

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Pala, Zdenek

Pala, Zdenek, Employee

  • 9,160 Points 5k badge 2x thumb
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
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
But what about EOS? should I use "Enterasys"
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 12,960 Points 10k badge 2x thumb
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