Oneview default scripts don't support A/B/C EOS devices?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hi,

When I try to run default scripts like ModBPConfigBasic in OneView on A4H124-48, it fails. I looked to script's code and it seems it is not for EOS?

So all these predefined scripts are for XOS?

Thanks.
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Mike Thomas

Mike Thomas, Employee - GTAC - NMS

  • 7,498 Points 5k badge 2x thumb
Hello Rahman,
The default scripts are for XOS devices. They are more script driven then EOS devices, which are more MIB-OID driven.
But custom scripts can be done in Oneview and console.
In Oneview they are in Administration->Scripting Tab.
An overview is in the help file. See partial screenshot below.
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
Hello Mike,

Yes I see. But if I want to write scripts for EOS, I cant use "set" command as it is a TCL reserved keyword also. So "set vlan create 10" line fails.

I used inventory manager for scripting with success. But I don't want to use jlnp interfaces if I can use OneView (really when will we get rid of the jlnp interfaces for the sake of OneView?).

So is it possible to use TCL (because it's use of variables/form inputs are good) and EOS?

Thanks,

Rahman
(Edited)
Photo of Thomas, Frank

Thomas, Frank, Employee

  • 1,902 Points 1k badge 2x thumb
Oneview scripting you can escape the TCL parsing by using CLI

An example of using a script against an K10 EOS switch

#@MetaDataStart#############################################################################################
# Define your user parameters in this section. For reference, see bundled scripts.
#############################################################################################
#@MetaDataEnd
# Enter all CLI commands from here
# EXOS CLI stype if statement (case sensitive : NO)
IF (!$match($isExos,true) ) THEN
 Echo "$deviceIP is an EXOS switch."
 enable ports $port
ELSE 
 Echo "$deviceIP is NOT and EXOS switch"
 CLI set port enable $port 
ENDIF




I believe most if not all the oneview scripts were ported for Ridgeline and are XOS based. There are a few example scripts to show how to do things for both.
(Edited)
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
Thank you, it did the trick :)
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
Well, I run my script on a A4H124-48 switch with success. But the same script throws this error on another switch with same model:

Missing parameter for task : CLI_LOGIN_PROMPT

I can access the switch with the same ssh credentials. So what should be the problem?
Photo of Mike Thomas

Mike Thomas, Employee - GTAC - NMS

  • 7,498 Points 5k badge 2x thumb
Rahman,
Can you check the cli credential assignment mapping for that particular A4? Maybe it is different than the other. This is discussed in the following article, emphasized at the Profile/Device Mapping section.

https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-setup-CLI-crentials-in-Netsight-Con...
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
Hi Mike,

I already checked them. All has same profile set. I also tried to login via ssh one by one with the same ssh user and password and it works. But same script doesn't run on the other devices. 
Photo of Thomas, Frank

Thomas, Frank, Employee

  • 1,902 Points 1k badge 2x thumb
I would double check if the profile works is try a command from Console or Inventory Manager with a ping there. If it fails from there, then it's definitely something with the profile missing CLI creds.



Also are you defining the login within the script or relying on Netsight's login? Could we see the script?
(Edited)
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
I tried in inventory manager with execute script. IM can connect to both switches via ssh credentials and can run "show time" command with success.

But OneView, one one switch the script works but the other throws 
*** Error at line - 59 ***
Missing parameter for task : CLI_LOGIN_PROMPT

So there is no problem with profile mapping. Any other ideas?
Photo of Mike Thomas

Mike Thomas, Employee - GTAC - NMS

  • 7,498 Points 5k badge 2x thumb
Rahman, Can you open a case with the GTAC? We can run some debug for you to gather for this issue and can figure it out that way. I do not wish to discuss the debug process on the hub, as improper use can fill a hard drive of the server if misused.
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
I did it Case Number: 01132470.

Thanks,

Rahman
Photo of Rahman Duran

Rahman Duran

  • 2,012 Points 2k badge 2x thumb
For your information, GTAC confirmed that this is how OneView designed so it is expected. You can not run scripts on devices on non-discovered devices (no snmp access) via OneView even OneView can access the device via CLI.