Docs
Arista CloudVision

Technical Information

Arista CloudVision to NetBox Object Mapping

This page describes how CloudVision data is mapped to NetBox objects by the integration.

The integration reads two CloudVision gRPC Resource APIs:

  • arista.inventory.v1 (DeviceService.GetAll) - the managed device inventory
  • arista.tag.v2 (TagAssignmentService.GetAll) - device system tag assignments from the mainline workspace

Both streams are read to their INITIAL_SYNC_COMPLETE marker, giving a point-in-time snapshot without blocking on the live-update stream that follows.

Object Type Mapping Table

CloudVision sourceNetBox ObjectKey Fields Mapped
Inventory deviceDevicehostnamename, device_idserial, status "active", role from topology_type tag, site from topology_datacenter tag, streaming_statuscustom_fields.cv_streaming_status
Device model_nameDeviceTypeHardware model string → model; manufacturer "Arista". Falls back to model "Arista EOS Switch" when the inventory reports no model
Device software_versionPlatformEOS {version}name; manufacturer "Arista". Created only when a software version is present
topology_type system tagDeviceRoleTag value → role (see Device role mapping)
topology_datacenter system tagSiteTag value → site name, status "active". Falls back to SITE_NAME (default "CloudVision") when the tag is absent
(static)Manufacturername "Arista", slug arista
Device (per device)InterfaceManagement interface name (Management0 or Management1), type "1000base-t", enabled true
Device system_mac_addressMACAddressSystem MAC (uppercased) → mac_address, assigned to the management interface and set as the interface primary_mac_address

Field Mapping Details

Device role mapping

The device role is resolved from the topology_type CloudVision system tag. All roles below are created on every run; each device is then assigned the role matching its topology_type tag value. A device with no topology_type tag, or with a value not listed here, is assigned the fallback role.

topology_type tag valueNetBox Device RoleSlug
spineSpinespine
leafLeafleaf
l2leafL2 Leafl2leaf
superspineSuperspinesuperspine
campus-leafCampus Leafcampus-leaf
borderleafBorder Leafborderleaf
(absent or unknown)Network Switch (fallback)network-switch

Site resolution

Site assignment uses a two-tier fallback per device:

  1. The topology_datacenter CloudVision system tag on the device.
  2. The SITE_NAME configuration key, defaulting to "CloudVision" when SITE_NAME is not set.

Each site is created on demand as devices are processed. The fallback site is only created when at least one device has no topology_datacenter tag, so a deployment where every device carries a datacenter tag never leaves an unused fallback site in NetBox.

Management interface naming

Each device receives exactly one management interface. The port name is derived from the hardware model:

Hardware model prefixManagement port name
DCS-7050, DCS-7060 (older fixed-form platforms)Management1
All other EOS platformsManagement0

The management interface is created with type 1000base-t and enabled: true. The management IP address is not available from the inventory API and is not set in this release.

MAC address handling

The device system_mac_address from the inventory is uppercased and emitted as a MACAddress object assigned to the device's management interface. The same value is also set as the interface primary_mac_address. Devices with no serial number or no system MAC are skipped.

Streaming status

Each device's CloudVision streaming status is mapped from the inventory streaming_status field and stored in the cv_streaming_status custom field on the device:

CloudVision streaming statuscv_streaming_status value
STREAMING_STATUS_ACTIVEactive
STREAMING_STATUS_INACTIVEinactive
STREAMING_STATUS_UNSPECIFIED or unrecognizedunknown

Custom Fields

The integration creates the following custom fields. Both are created during bootstrap and set to read-only in the NetBox UI.

Custom FieldObject TypeTypePurpose
cv_streaming_statusDevice (dcim.device)TextCloudVision streaming status (active, inactive, unknown)
cv_interface_typeInterface (dcim.interface)TextEOS interface classification. The field is created now; it is populated by a later release

Configuration Parameters

config Parameters

Configure these under the config key in the policy definition.

ParameterRequiredDefaultDescription
CVP_HOSTYes-CloudVision hostname or IP, optionally with a port (cvp.example.com or cvp.example.com:443). Do not include a URL scheme
CVP_API_TOKENYes*-Service account API token (preferred authentication method)
CVP_USERNAMEYes*-Username for username/password authentication
CVP_PASSWORDYes*-Password for username/password authentication
CVP_SSL_VERIFYNoTrueSet False to accept a self-signed certificate issued for CVP_HOST. Requires CVP_API_TOKEN; cannot be used with CVP_USERNAME/CVP_PASSWORD. See TLS verification
SITE_NAMENo"CloudVision"Fallback NetBox site name used when a device has no topology_datacenter tag
CVP_NAMENovalue of CVP_HOSTInstance identifier used to build the per-instance unique tag cv-{name}
BOOTSTRAPNoFalseWhen True, creates static entities only and makes no CloudVision API calls
GRPC_STREAM_TIMEOUT_SECONDSNo300Timeout, in seconds, for the gRPC inventory and tag streams

* Provide either CVP_API_TOKEN, or both CVP_USERNAME and CVP_PASSWORD. Token authentication takes precedence when both are supplied.

The gRPC Resource API uses port 443 for both on-premises CVP and CVaaS. To use a different port, include it directly in CVP_HOST (for example, cvp.example.com:8443).

scope Parameters

Scope parameters limit which devices are ingested. Configure them under a scope key in the policy definition, separate from config.

ParameterTypeDefaultDescription
sitesList of strings["*"]Include only devices whose resolved site name (from the topology_datacenter tag, or the SITE_NAME fallback) matches one of the listed names. Use ["*"] or omit to ingest all sites
tagsList of {label, value}(none)Include only devices that carry at least one matching CloudVision tag. Each entry must have a label and a value. Omit for no tag filter

Example scope block:

scope:
  sites:
    - London
    - Amsterdam
  tags:
    - label: topology_type
      value: spine
    - label: topology_type
      value: leaf

Scope filtering and the tag API

Both scope filters are resolved through CloudVision device tags: scope.sites resolves through the topology_datacenter tag, and scope.tags matches tag {label, value} pairs. When either filter is active and the CloudVision tag API cannot be read, the run fails rather than silently emitting zero devices. When no scope filter is set, a tag API error is logged and the run continues using the site and role fallbacks.

Authentication

The integration supports two authentication methods against the CloudVision gRPC Resource API:

  • Service account token (preferred) - set CVP_API_TOKEN. The token is sent as gRPC call credentials on the encrypted channel. This is the recommended method for both CVP and CVaaS.
  • Username and password - set CVP_USERNAME and CVP_PASSWORD. The integration exchanges these for a session token via a REST POST to /cvpservice/login/authenticate.do, then opens the gRPC channel with that token. The username is also sent as per-call metadata alongside the token.

Both on-premises CVP and CVaaS use the same gRPC Resource API on port 443. For CVaaS, use a service account token.

TLS verification

By default (CVP_SSL_VERIFY=True), the server certificate is validated against the system trust store. For a certificate signed by an internal or private CA, provide the CA chain to the host trust store and leave CVP_SSL_VERIFY=True.

Setting CVP_SSL_VERIFY=False accepts a self-signed certificate. In this mode:

  • The server certificate is fetched on each run without CA validation and trusted only for that run's channel. It is not persisted.
  • gRPC still verifies the certificate's SAN/CN against the target name, which is pinned to CVP_HOST. The self-signed certificate must therefore be issued for CVP_HOST. For a certificate presenting a different name, use a CA bundle with CVP_SSL_VERIFY=True instead.
  • CVP_SSL_VERIFY=False requires CVP_API_TOKEN. It cannot be used with username/password authentication, because those credentials would travel over an unverified TLS connection during the REST session-token exchange.
  • This mode is vulnerable to a machine-in-the-middle attack on each run. Use it only on trusted networks. For production, provide a proper CA chain and leave CVP_SSL_VERIFY=True.

Tags

The integration applies the following tags to the objects it ingests:

TagColorApplied toPurpose
aristaBlueAll objectsVendor tag
cloudvisionPurpleAll objectsProduct tag
discoveredGreenAll objectsIndicates automated discovery origin
cv-{name}OrangeAll discovered objects (non-bootstrap runs)Unique per-instance tag derived from CVP_NAME (or CVP_HOST). Enables filtering by CloudVision instance and supports multi-instance deployments

The per-instance cv-{name} tag is created only on a real sync, not in bootstrap mode. When running multiple integration instances against different CloudVision systems, set a distinct CVP_NAME per instance so each set of objects can be identified by its tag.

Bootstrap Mode

When BOOTSTRAP is set to True, the integration creates the following without connecting to CloudVision:

  • Tags: arista, cloudvision, discovered
  • Custom fields: cv_streaming_status, cv_interface_type
  • The Arista manufacturer
  • All device roles: Spine, Leaf, L2 Leaf, Superspine, Campus Leaf, Border Leaf, and the Network Switch fallback

No site is created in bootstrap mode - the fallback site is created on demand during a real sync only when a device lacks a topology_datacenter tag, so bootstrap does not leave an unused site in NetBox. Use bootstrap mode on the initial setup only, then set it to False for all subsequent runs.

Sync Behavior

  • Direction: One-way, CloudVision to NetBox.
  • Object deletion: The integration does not delete NetBox objects. Devices removed from CloudVision are not automatically decommissioned in NetBox.
  • Idempotency: Subsequent runs update existing NetBox objects rather than creating duplicates. The Diode SDK handles conflict resolution.
  • Scope: All managed devices are synced by default. Optional site and tag scope filtering is available (see scope Parameters).
  • Multi-instance: Each agent instance is configured for a single CloudVision system. Run a separate agent instance per system, each with a distinct CVP_NAME.

Planned Discovery

Layer-3 interface, VLAN, VRF, prefix, and IP address discovery derived from EOS running configuration - including VARP anycast address handling - is planned for a future release and is not emitted by the current preview. The cv_interface_type custom field is created now so that interface classifications can be populated when that discovery lands.

On this page