Arista CloudVision Configlet

Arista CloudVision Configlet

Certified
Enterprise Edition

Manage a CloudVision configlet

Creates, updates, deletes a configlet, or assigns it to a device or a container. Every action is idempotent: nothing is written when the configlet already is in the requested state, and changed is false. Content is compared ignoring line endings, trailing spaces and trailing blank lines.

  • CREATE: creates the configlet. When it exists with other content the task fails, use UPDATE.
  • UPDATE: replaces the content of an existing configlet. Devices using it get a CloudVision task to reconcile, returned in taskIds.
  • DELETE: removes the configlet. CloudVision refuses it while the configlet is assigned, the error is returned as is.
  • ASSIGN and UNASSIGN: attach or detach the configlet to device (hostname, serial number or IP) or container. CloudVision creates tasks, returned in taskIds: execute them with ChangeControl. When the configlet already is assigned, nothing is written and taskIds is empty: the pending tasks cannot be attributed to this run, select them with GetTasks.

With dryRun nothing is written: changed tells if the action would change something and diff shows the content change. The diff is only returned with dryRun and contains the configlet content as is.

yaml
type: io.kestra.plugin.ee.arista.cvp.Configlet

Create a configlet and assign it to a switch

yaml
id: arista_cvp_configlet
namespace: company.network

tasks:
  - id: create
    type: io.kestra.plugin.ee.arista.cvp.Configlet
    host: www.cv-prod-us-central1-b.arista.io
    token: "{{ secret('CVP_TOKEN') }}"
    action: CREATE
    name: ntp-servers
    config: |
      ntp server 10.0.0.1
      ntp server 10.0.0.2

  - id: assign
    type: io.kestra.plugin.ee.arista.cvp.Configlet
    host: www.cv-prod-us-central1-b.arista.io
    token: "{{ secret('CVP_TOKEN') }}"
    action: ASSIGN
    name: ntp-servers
    device: leaf1

Preview the change of a configlet without writing it

yaml
id: arista_cvp_configlet_dry_run
namespace: company.network

tasks:
  - id: preview
    type: io.kestra.plugin.ee.arista.cvp.Configlet
    host: cvp.lab.example.com
    token: "{{ secret('CVP_TOKEN') }}"
    caCertificate: "{{ secret('CVP_CA_PEM') }}"
    action: UPDATE
    name: ntp-servers
    config: |
      ntp server 10.0.0.1
      ntp server 10.0.0.3
    dryRun: true
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
Possible Values
CREATEUPDATEDELETEASSIGNUNASSIGN

Action

CREATE, UPDATE, DELETE, ASSIGN or UNASSIGN.

CloudVision host

Host name or IP address of CloudVision. Use www.cv-prod-<region>.arista.io for CVaaS or the address of your on-prem CVP.

Configlet name

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
Possible Values
SERVICE_ACCOUNT_TOKENUSER_PASSWORD

Authentication type

SERVICE_ACCOUNT_TOKEN (default, CVaaS and on-prem) sends token as a bearer token. USER_PASSWORD (on-prem only) logs in with username and password, reuses the session cookie for the task run and logs out at the end.

CA certificate

PEM encoded CA certificate(s) used to validate the CloudVision certificate. When set, only this CA is trusted. When empty, the JVM trust store is used. An on-prem CVP with a self-signed certificate needs this property.

Configuration

Configlet content, or a kestra:// internal storage URI of a file holding it. Required for CREATE and UPDATE.

Connect timeout

Maximum time to open the connection. Must be greater than zero. Defaults to 10 seconds.

Container

Name of the target container of the provisioning tree, for the actions that assign or apply (ASSIGN, UNASSIGN, APPLY). Set this or device.

Device

Hostname, FQDN, serial number or IP address of the target device, for the actions that assign or apply (ASSIGN, UNASSIGN, APPLY). Set this or container.

Dry run

When true, nothing is written. Reports changed and diff only. Defaults to false.

Trust any certificate

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

Password

Required for USER_PASSWORD. Use {{ secret('CVP_PASSWORD') }}. The value is never logged nor returned in outputs.

Port

Between 1 and 65535. Defaults to 443.

Request timeout

Maximum time to wait for one CloudVision answer. Must be greater than zero. Defaults to 60 seconds.

Service account token

Required for SERVICE_ACCOUNT_TOKEN. Use {{ secret('CVP_TOKEN') }}. The value is never logged nor returned in outputs.

Username

Required for USER_PASSWORD.

Changed

True when the configlet was written, or would be with dryRun. False when it already was in the requested state.

Diff

Changed lines of the configuration, - removed and + added. Only set with dryRun, so configlet content such as secrets and keys does not end up in the outputs of a real run. The diff contains the configlet content as is.

Configlet key

CloudVision key of the configlet. Not set when DELETE found nothing to delete, or for a dryRun creation.

SubTypestring

Task ids

CloudVision tasks created by ASSIGN, UNASSIGN and by UPDATE of an assigned configlet, to execute with ChangeControl. Empty when nothing changed, in particular when ASSIGN finds the configlet already assigned: use GetTasks to pick pending tasks.