[RESOLVED] Supported Commands for eAPI?

Posted on November 20, 2014 10:13 pm
 |  Asked by Mike Cotrone
 |  972 views
Tags:
« Back to Previous Page
0
0

Hi,

Is there a link to a document that shows the supported commands for the eAPI using JSON/ text format? I need to decide how to filter out the commands that aren’t supported in the eAPI.

 

Thank you very much,
Mike

0
Posted by Andrei Dvornic
Answered on November 20, 2014 10:17 pm

Hi Mike,

A few options here:

  • enable eAPI on your switch and then navigate to: http[s]://<SWITCH_HOSTNAME/IP>/documentation.html in your favourite browser
  • for out latest releases, you can find a PDF with the documentation on the Software Download page on http://www.arista.com (you need to login first)

Let me know if you can’t figure it out.

Thanks,
Andrei

0
Posted by Mike Cotrone
Answered on November 21, 2014 1:38 pm

Andrei,

Thank you very much for your response as I appreciate your help. I am definitely aware of the documentation set in your eAPI Explorer so let me take a quick set to explain the origin of my question so it makes more sense :) I am a software developer working on a software products called the ”Arista® eAPI Navigator”. I work for Intelligent Visibility, Inc. and we are a new Arista software development partner.

This is a very graphical desktop software package designed to take showcase the eAPI while providing some automation intelligence. I have implemented a custom auto-complete textfield class control that pre parses your command s using a source text file I already exported via your Arista user configuration PDF.

The issue I have is that say for example the ssh command. Your eAPI explorer already knows it doesn’t accept ssh as a starting command so your auto complete does not show that command. I basically need some help understanding which commands are supported in that manor so I can trim my pre-source file accordingly.

I have a bunch of screen shots on Twitter using the hashtag #ARISTA

Here is a direct link to a screen shot of our auto-complete functionality.

Image and video hosting by TinyPic

Any assistance would be very much appreciated.

Thank you much,

Mike Cotrone

1
Posted by Andrei Dvornic
Answered on November 21, 2014 1:54 pm

Hi Mike,

The largest class of unsupported commands are the interactive ones: “top” and “bash” are prime examples. Other commands, like “reload” must use their non-interactive versions: such as “reload now”. Commands that attempt to use CLI pipes (e.g. “show interfaces | grep Ethernet1” ) are also not supported.

In addition, no abbreviations are allowed in commands. This is necessary because future versions of EOS may add more commands, rendering previous abbreviations ambiguous.

Will try to get a complete list of commands which are not supported for you soon (unfortunately we don’t expose that in our documentation right now) – thank you for your patience.

Thanks,
Andrei

0
Posted by unknown
Answered on November 21, 2014 2:18 pm

Andrei thank you very much and I appreciate your help.

Thanks,
Mike

1
Posted by Andrei Dvornic
Answered on November 21, 2014 8:06 pm

Hi Mike,

Besides the comment from above, here is a draft of the list of commands which are unsupported :

  • bash (without a timeout)
  • reload without the now keyword
  • show logging follow
  • session peer-supervisor [ COMMAND ]
  • xmpp session SWITCHGROUP

We are going to try to document this better in future releases – for reference, this effort is tracked by RFE104788.

Let me know if you need more help on this.

Thanks,
Andrei

1
Posted by Duegi Duegi
Answered on December 4, 2014 12:58 am

Mike,

Lots of good answers here already, I just wanted to add one thing. An undocumented feature of eAPI, is not just being able to run commands, but also being able to do auto-complete. The way the Explorer figures out valid commands is by using the ”getCommandCompletions” method instead of the ”runCmds” method. This will return a list of completions for you.

Also, stay tuned, there is a small documentation improvement coming up in our next release that will make programatic access to the documentation better.

Diego

Diego thank you and I wanted to see if these documentation additions were going to be in Evans?

Thank you

(Mike Cotrone at October 20, 2015 1:47 pm)
0
Posted by Skeeve Stevens
Answered on October 20, 2015 1:36 pm

Hi there,

 

Did we eventually get a list of supported commands?

 

I am trying to do a comment under a VLAN and I can’t figure out how to make it work.

 

…Skeeve

0
Posted by Mike Cotrone
Answered on October 20, 2015 1:45 pm

Skeeve,

What I found that using the eAPI ”JSON” results format many commands were not yet supported, however by switching the eAPI results format from JSON to TEXT I am able to send any command. I haven’t seen anything yet on feature parity among results format quite yet.

For example my eAPI Call for ”show processes top” in the TEXT Results format:

{”jsonrpc”:”2.0”,”method”:”runCmds”,”params”:{”version”:1,”cmds”:[”show processes top once”],”format”:”text”},”id”:”Arista Navigator”}

 

eAPI Results in TEXT format (snipped since it was huge):

[{”output”:”top – 06:41:33 up 25 days, 20:08,  1 user,  load average: 0.22, 0.28, 0.21\nTasks: 403 total,   1 running, 402 sleeping,   0 stopped,   0 zombie\nCpu(s):  2.3%us,  0.3%sy,  0.0%ni, 97.2%id,  0.0%wa,  0.1%hi,  0.1%si,  0.0%st\nMem:  15814608k total,  4413552k used, 11401056k free,   203412k buffers\nSwap:        0k total,        0k used,        0k free,  2338244k cached\n\n  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            \n 2443 root      20   0  553m  85m  23m S  1.8  0.6 390:29.59 Smbus              \n 2481 root      20   0  544m  80m  24m S  1.8  0.5   6:48.30 Ucd9012            \n 3169 root      20   0  547m  80m  21m S  1.8  0.5  67:57.69 Adt7462Agent     \n\n”}]

 

HTH,
Mike

« Back to Previous Page

Post your Answer

You must be logged in to post an answer.