Arista EOS RunCommands

Arista EOS RunCommands

Certified
Enterprise Edition

Run commands on an Arista EOS switch

Sends a list of CLI commands through eAPI (runCmds) and returns one result per command. Privileged mode (enable) is entered automatically. Results are JSON by default; when a command has no JSON form (eAPI error 1003) a read-only request (only show, dir and verify commands) is sent again in text form and each result is {"output": "..."}. A batch with any other command is never replayed, so the error is raised: set format: TEXT for batches that change the configuration. A failing command raises a CommandError with the eAPI code and message.

yaml
type: io.kestra.plugin.ee.arista.eos.RunCommands

Read the running version of a switch

yaml
id: arista_show_version
namespace: company.network

tasks:
  - id: show_version
    type: io.kestra.plugin.ee.arista.eos.RunCommands
    host: leaf1.lab.example.com
    username: "{{ secret('ARISTA_USERNAME') }}"
    password: "{{ secret('ARISTA_PASSWORD') }}"
    commands:
      - show version

Run several commands and store the results in a file

yaml
id: arista_inventory
namespace: company.network

tasks:
  - id: inventory
    type: io.kestra.plugin.ee.arista.eos.RunCommands
    host: leaf1.lab.example.com
    username: "{{ secret('ARISTA_USERNAME') }}"
    password: "{{ secret('ARISTA_PASSWORD') }}"
    caCertificate: "{{ secret('ARISTA_CA_PEM') }}"
    store: true
    commands:
      - show version
      - show lldp neighbors detail
      - show interfaces status
Installation

This Enterprise plugin requires an Enterprise image and access to the plugin registry. Install it with the following command:

kestractl plugins get io.kestra.plugin.ee:plugin-ee-arista --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.

Properties
SubTypestring

Commands

CLI commands, run in order in privileged mode. Use configure as first command to run configuration commands.

Switch host

Host name or IP address of the switch management interface serving eAPI.

Password

Use {{ secret('ARISTA_PASSWORD') }}. The value is never logged nor returned in outputs.

Username

Account allowed to run privileged commands over eAPI.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

CA certificate

PEM encoded CA certificate(s) used to validate the switch certificate. When set, only this CA is trusted. When empty, the JVM trust store is used.

Connect timeout

Maximum time to open the connection. Defaults to 10 seconds.

Possible Values
JSONTEXT

Output format

JSON (default) with automatic text fallback for read-only batches, or TEXT to ask for text from the start. Use TEXT for batches that change the configuration.

Trust any certificate

Disables certificate and host name validation. Only for labs with self-signed certificates. Defaults to false.

eAPI port

Defaults to 443.

Request timeout

Maximum time to wait for one eAPI answer. Defaults to 60 seconds. Tasks that run slow commands (image copy, checksum) expose their own timeout.

Store results in a file

When true, results are written to internal storage and only uri is returned. Defaults to false.

Results

One entry per command, in order. Not set when store is true.

Formaturi

Results file

Internal storage URI of a JSON array with one entry per command. Only set when store is true.