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 inventoryarista.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 source | NetBox Object | Key Fields Mapped |
|---|---|---|
| Inventory device | Device | hostname → name, device_id → serial, status "active", role from topology_type tag, site from topology_datacenter tag, streaming_status → custom_fields.cv_streaming_status |
Device model_name | DeviceType | Hardware model string → model; manufacturer "Arista". Falls back to model "Arista EOS Switch" when the inventory reports no model |
Device software_version | Platform | EOS {version} → name; manufacturer "Arista". Created only when a software version is present |
topology_type system tag | DeviceRole | Tag value → role (see Device role mapping) |
topology_datacenter system tag | Site | Tag value → site name, status "active". Falls back to SITE_NAME (default "CloudVision") when the tag is absent |
| (static) | Manufacturer | name "Arista", slug arista |
| Device (per device) | Interface | Management interface name (Management0 or Management1), type "1000base-t", enabled true |
Device system_mac_address | MACAddress | System 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 value | NetBox Device Role | Slug |
|---|---|---|
spine | Spine | spine |
leaf | Leaf | leaf |
l2leaf | L2 Leaf | l2leaf |
superspine | Superspine | superspine |
campus-leaf | Campus Leaf | campus-leaf |
borderleaf | Border Leaf | borderleaf |
| (absent or unknown) | Network Switch (fallback) | network-switch |
Site resolution
Site assignment uses a two-tier fallback per device:
- The
topology_datacenterCloudVision system tag on the device. - The
SITE_NAMEconfiguration key, defaulting to"CloudVision"whenSITE_NAMEis 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 prefix | Management port name |
|---|---|
DCS-7050, DCS-7060 (older fixed-form platforms) | Management1 |
| All other EOS platforms | Management0 |
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 status | cv_streaming_status value |
|---|---|
STREAMING_STATUS_ACTIVE | active |
STREAMING_STATUS_INACTIVE | inactive |
STREAMING_STATUS_UNSPECIFIED or unrecognized | unknown |
Custom Fields
The integration creates the following custom fields. Both are created during bootstrap and set to read-only in the NetBox UI.
| Custom Field | Object Type | Type | Purpose |
|---|---|---|---|
cv_streaming_status | Device (dcim.device) | Text | CloudVision streaming status (active, inactive, unknown) |
cv_interface_type | Interface (dcim.interface) | Text | EOS 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.
| Parameter | Required | Default | Description |
|---|---|---|---|
CVP_HOST | Yes | - | CloudVision hostname or IP, optionally with a port (cvp.example.com or cvp.example.com:443). Do not include a URL scheme |
CVP_API_TOKEN | Yes* | - | Service account API token (preferred authentication method) |
CVP_USERNAME | Yes* | - | Username for username/password authentication |
CVP_PASSWORD | Yes* | - | Password for username/password authentication |
CVP_SSL_VERIFY | No | True | Set 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_NAME | No | "CloudVision" | Fallback NetBox site name used when a device has no topology_datacenter tag |
CVP_NAME | No | value of CVP_HOST | Instance identifier used to build the per-instance unique tag cv-{name} |
BOOTSTRAP | No | False | When True, creates static entities only and makes no CloudVision API calls |
GRPC_STREAM_TIMEOUT_SECONDS | No | 300 | Timeout, 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
sites | List 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 |
tags | List 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: leafScope 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_USERNAMEandCVP_PASSWORD. The integration exchanges these for a session token via a RESTPOSTto/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 forCVP_HOST. For a certificate presenting a different name, use a CA bundle withCVP_SSL_VERIFY=Trueinstead. CVP_SSL_VERIFY=FalserequiresCVP_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:
| Tag | Color | Applied to | Purpose |
|---|---|---|---|
arista | Blue | All objects | Vendor tag |
cloudvision | Purple | All objects | Product tag |
discovered | Green | All objects | Indicates automated discovery origin |
cv-{name} | Orange | All 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
Aristamanufacturer - 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
scopeParameters). - 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.