Skip to main content
CloudEnterprise

Technical Information

Juniper Mist to NetBox Object Mapping

This document provides a comprehensive mapping of Juniper Mist object types to their corresponding NetBox object types, based on the integration implementation.

Object Type Mapping Table

Juniper Mist ObjectNetBox Object TypeKey Fields MappedMapping Details
SiteSitenamename
nameslug
timezonetime_zone
idcustom_fields.mist_idMaps Mist sites (from listOrgSites) to NetBox sites with timezone and Mist site ID preserved. Site filtering via policy scope sites (default ["*"] = all).
Site (Unassigned)SiteStatic name / slugCreates "Unassigned Mist Inventory" site for devices with invalid or missing site_id (UUID 00000000-0000-0000-0000-000000000000).
Device (Inventory, standalone)Devicename or serial or "Unnamed" → name
serialserial
connectedstatus
typerole
modeldevice_type
maccustom_fields.mist_macStandalone (non–Virtual Chassis) inventory devices. Device type and role created from type and model.
Device (Inventory, VC member)Devicevc_name + fpc_idxname
module_stat[].serialserial
connectedstatus
typerole
module_stat[].modeldevice_type
module_stat[].maccustom_fields.mist_mac
vc_maccustom_fields.mist_vc_mac
vc_rolecustom_fields.mist_vc_role
virtual_chassis + vc_positionVirtual Chassis member devices; one Device per member. Master identified by vc_role='master' or lowest fpc_idx.
Virtual Chassis (switch stack)VirtualChassisnamename
Key: vc_macCreated for switches with type=="switch" and vc_mac starting with 0200. One VirtualChassis per unique vc_mac.
Device TypeDeviceTypemodelmodel
modelslug
typecustom_fields.mist_typeCreated per model; for VC members, model comes from module_stat[].model.
Device RoleDeviceRoletypename
typeslugMist device type (e.g. ap, switch, gateway) becomes NetBox device role.
PlatformPlatformStatic → name "Junos", slug "junos"Single platform for all Mist devices; linked to manufacturer.
ManufacturerManufacturerStatic → name "Juniper", slug "juniper"Single manufacturer for all Mist devices.
Wireless LANWirelessLANssidssid
enabledstatus
auth.typeauth_type
authauth_cipher
idcustom_fields.mist_wlan_id
ap_idscustom_fields.mist_ap_ids
apply_tocustom_fields.mist_ap_scope
wxtag_idscustom_fields.mist_wxtag_ids (when apply_to=wxtags)WLANs from listSiteWlansDerived; one entity per unique (wlan_id, site_id, ssid). Includes WLANs with no serving devices. After device–WLAN matching, mist_ap_mac_addresses_serving_this holds JSON array of AP MACs.
InterfaceInterfaceFrom device stats: if_stat / ip_stat.ips
key → name
upenabled
port_idcustom_fields.mist_interface_port_id
Heuristic from name → typeBuilt from getSiteDeviceStats(..., fields="ports"). For Virtual Chassis, interface assigned to member by FPC in name (e.g. ge-1/0/44 → fpc 1).
IP AddressIPAddressFrom device stats interface IPs
addressaddress
Interface → assigned_object_interface
status "active"Created when SKIP_IP_ADDRESSES is false. Management IP (matching device ip) set as device primary_ip4 or primary_ip6.
MAC AddressMACAddressFrom device stats ports (port_id → port_mac / mac for vme)
Or freestanding from inventory macInterface MACs from stats; device MACs created as freestanding when not attached to an interface. Internal ports cbp0, pip0, jsrv, bme0 skipped.

Field Mapping Details

Device Status Mapping

Mist Connection StatusNetBox Status
true (connected)active
false (disconnected)offline

Wireless LAN Status Mapping

Mist WLAN StatusNetBox Status
true (enabled)active
false (disabled)disabled

Authentication Type Mapping

Mist Auth TypeNetBox Auth Type
openopen
pskwpa-personal
psk-tkipwpa-personal
psk-wpa2-tkipwpa-personal
eapwpa-enterprise
eap192wpa-enterprise
wepwep
Any other valueUnknown

Authentication Cipher Mapping

Mist Auth TypeMist Pairwise CiphersNetBox Auth Cipher
eap192Anyaes
psk-tkip | psk-wpa2-tkipAnytkip
wepAnyauto
openAnyNone
psk | eapContains "tkip"tkip
psk | eapContains "ccmp" or "wpa3"aes
psk | eapNo recognized cipherNone
Unknown auth_typeIntegration raises

Cipher uses Mist auth.pairwise list (e.g. wpa2-ccmp, wpa2-tkip, wpa3).

Interface Type Heuristics

Interface Name PatternNetBox Type
ge-*1000base-t
vme* or VLAN*virtual
Otherother

Site Assignment Logic

  1. Allowed sites: From policy scope sites (list of site names). ["*"] or empty means all sites.
  2. Valid site: Device site_id present in allowed site IDs → assign to that NetBox site.
  3. Unassigned fallback: Missing or invalid site_id (e.g. 00000000-0000-0000-0000-000000000000) or site not in allowed list → assign to "Unassigned Mist Inventory" site.
  4. Inventory filtering: Only devices in allowed sites (or unassigned) are ingested; same for devices/search when building device–WLAN mapping.

WLAN Scope and Custom Fields

WLANs are always scoped to a site (scope_site). Mist scope is stored in custom fields:

Mist apply_toCustom Field Usage
siteStandard site scope
wxtagsmist_wxtag_ids (JSON array)
apsmist_ap_ids (JSON array)
NoneSite scope

Virtual Chassis Detection

  • Condition: type == "switch" and vc_mac starts with 0200 (Juniper VC MAC prefix).
  • VirtualChassis: One per unique vc_mac; name from device name.
  • Member devices: Built from getSiteDeviceStats module_stat; member name \{vc_name\}-member-\{fpc_idx\}; master by vc_role='master' or lowest fpc_idx.

Device–WLAN Matching

  • Source: devices/search (type=ap, duration=1h) gives per-device wlans[] (id, ssid).
  • Uniqueness: WLANs keyed by (wlan_id, site_id, ssid); only WLANs present in listSiteWlansDerived for that site are used.
  • Device custom field: mist_wlans_served (object, multiple) references the WirelessLAN entities the device serves.
  • WLAN custom field: mist_ap_mac_addresses_serving_this (JSON array of AP MAC addresses) populated after matching.

Custom Fields

Custom FieldObject TypePurpose
mist_idSiteMist site ID
mist_typeDevice TypeMist device type (ap, switch, etc.)
mist_macDeviceMist device MAC
mist_vc_macDeviceVirtual Chassis MAC (VC members only)
mist_vc_roleDeviceVC role: master, backup, or empty (VC members only)
mist_wlan_idWireless LANMist WLAN ID
mist_ap_idsWireless LANJSON array of AP IDs
mist_ap_scopeWireless LANapply_to (site, wxtags, aps)
mist_wxtag_idsWireless LANJSON array of WxTag IDs when apply_to=wxtags
mist_ap_mac_addresses_serving_thisWireless LANJSON array of AP MAC addresses serving this WLAN
mist_wlans_servedDeviceObject ref(s) to Wireless LAN(s) served by this device
mist_interface_port_idInterfaceMist port ID for the interface

Policy Configuration

  • BOOTSTRAP (optional): When true, only static entities (custom fields, manufacturer, platform) are created; no Mist API calls.
  • MIST_APITOKEN (required when not BOOTSTRAP): Mist API token.
  • MIST_ORG_ID (required when not BOOTSTRAP): Mist organization ID.
  • SKIP_IP_ADDRESSES (optional, default true): When true, IP address entities are not created.
  • Scope – sites (optional): List of site names to include; default ["*"] for all sites. Invalid or missing names cause validation to fail after fetching sites.

Tags and Metadata

All created entities are tagged with:

  • juniper
  • mist
  • discovered

Optional unique tag: mist-\{org_id\} when not in bootstrap mode.

API and Behavior Notes

  • APIs used: listOrgSites, getOrgInventory, getSiteDeviceStats (with fields="ports"), searchOrgDevices (type=ap), listSiteWlansDerived.
  • Rate limiting: Custom retry (e.g. MistCustomRetry) for 429, 5xx with Retry-After support.
  • Device naming: Standalone: name or serial or "Unnamed". VC members: \{vc_name\}-member-\{fpc_idx\}.
  • WLAN uniqueness: Deduplicated by (wlan_id, site_id, ssid). WLANs with no serving devices are still created from site-derived WLANs.
  • Interfaces: Only devices with a valid site_id (and in allowed sites) have stats fetched; unassigned devices do not get interfaces or IPs from this integration.