# itachiuch1haa/nautobot-day2-v2 architecture

> Architecture diagram of the GitHub repository itachiuch1haa/nautobot-day2-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/itachiuch1haa/nautobot-day2-v2
- Repository: https://github.com/itachiuch1haa/nautobot-day2-v2

## Overview

nautobot-day2 is a Nautobot app for customer/site onboarding, multi-vendor network-data sync, shadow-IP reconciliation, and ad-hoc device troubleshooting. The principal path is an engineer using the web wizard to collect and validate tenant/site/device data, create Nautobot records, then trigger a sync Job that fans out per-device work. ChatOps and conversational MCP provide additional onboarding and sync entry points; the Agent Broker is a separate troubleshooting flow. README documents these capabilities, while some internal links below are limited to sampled excerpts or SOURCE INDEX references.

Main entry points: [`nautobot_day2/onboarding/upload_app.py`](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/upload_app.py) (Web wizard), [`nautobot_day2/onboarding_mcp/tools_schema.py`](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/tools_schema.py) (Onboarding tools), [`nautobot_day2/onboarding/sync_network_data.py`](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/sync_network_data.py) (Vendor sync engine), [`nautobot_day2/broker/core.py`](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/broker/core.py) (Broker command core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_onboard["Site onboarding"]
  node_web["Web wizard<br/>[upload_app.py]"]
  node_tenant["Tenant setup<br/>[create_tenant.py]"]
  node_vendor["Vendor matrix<br/>[vendor_matrix.py]"]
  node_credentialtest["Credential validation<br/>[vendor_test_app.py]"]
  node_prepare["Nautobot preparation"]
  node_devicecreate["Device provisioning"]
  node_nautobotclient["Nautobot REST client<br/>[client.py]"]
  node_chatops["ChatOps commands<br/>[worker.py]"]
  node_cli["CLI onboarding<br/>[onboard_cli.py]"]
end

subgraph group_sync["Network sync"]
  node_job["Sync Jobs"]
  node_mistjob["Mist sync Job<br/>[mist_sync.py]"]
  node_tasks["Device tasks<br/>[tasks.py]"]
  node_concurrency["Site concurrency cap<br/>[concurrency.py]"]
  node_syncengine["Vendor sync engine"]
  node_openbao[("OpenBao credentials<br/>[openbao_client.py]")]
end

subgraph group_shadow["Shadow IP"]
  node_shadowjobs["Shadow-IP Jobs"]
  node_shadowmath["Shadow IP mapping<br/>[shadow_math.py]"]
  node_shadowfields["Shadow custom fields<br/>[custom_fields.py]"]
  node_fortigate["FortiGate VIPs"]
end

subgraph group_broker["Agent Broker"]
  node_restbroker["Broker REST API<br/>[api_server.py]"]
  node_mcpbroker["Broker MCP API<br/>[mcp_server.py]"]
  node_brokercore["Broker command core<br/>[core.py]"]
end

subgraph group_conversational["Conversational onboarding"]
  node_mcpserver["Onboarding MCP server<br/>[server.py]"]
  node_toolset["Onboarding tools<br/>[tools_schema.py]"]
  node_state["Session state machine<br/>[state_machine.py]"]
  node_intake["Device intake"]
  node_controllers["Controller adapters"]
  node_deployer["Nautobot deployer"]
end

node_engineer(("Network engineer"))
node_nautobot[("Nautobot")]
node_chatuser(("ChatOps user"))
node_devices["Network devices"]
node_agent(("External agent"))
node_mcpuser(("Onboarding agent"))

node_engineer -->|"uses"| node_web
node_web -->|"creates profile"| node_tenant
node_web -->|"uses choices"| node_vendor
node_web -->|"validates credentials"| node_credentialtest
node_web -->|"prepares data"| node_prepare
node_web -->|"deploys devices"| node_devicecreate
node_devicecreate -->|"calls API"| node_nautobotclient
node_nautobotclient -->|"reads and writes"| node_nautobot
node_web -->|"triggers sync Job"| node_nautobot
node_chatuser -->|"uses"| node_chatops
node_chatops -->|"enqueues Job"| node_job
node_engineer -->|"uses"| node_cli
node_cli -->|"runs directly"| node_syncengine
node_nautobot -->|"runs Job"| node_job
node_job -->|"fans out tasks"| node_tasks
node_tasks -->|"limits site work"| node_concurrency
node_tasks -->|"syncs device"| node_syncengine
node_syncengine -->|"fetches credentials"| node_openbao
node_syncengine -->|"collects network data"| node_devices
node_syncengine -->|"updates inventory"| node_nautobotclient
node_nautobot -->|"runs Job"| node_mistjob
node_mistjob -->|"syncs Mist data"| node_devices
node_nautobot -->|"runs Jobs"| node_shadowjobs
node_shadowjobs -.->|"maps addresses"| node_shadowmath
node_shadowjobs -.->|"reconciles fields"| node_shadowfields
node_shadowjobs -.->|"checks VIP coverage"| node_fortigate
node_agent -->|"sends commands"| node_restbroker
node_agent -->|"sends commands"| node_mcpbroker
node_restbroker -->|"dispatches request"| node_brokercore
node_mcpbroker -->|"shares logic"| node_brokercore
node_brokercore -->|"looks up device"| node_nautobot
node_brokercore -->|"fetches credential"| node_openbao
node_brokercore -->|"runs commands"| node_devices
node_mcpuser -->|"uses tools"| node_mcpserver
node_mcpserver -->|"registers tools"| node_toolset
node_toolset -.->|"tracks session"| node_state
node_toolset -.->|"collects devices"| node_intake
node_toolset -.->|"discovers APs"| node_controllers
node_toolset -.->|"deploys site"| node_deployer
node_deployer -.->|"creates records"| node_nautobot

click node_web "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/upload_app.py"
click node_tenant "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/create_tenant.py"
click node_vendor "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/vendor_matrix.py"
click node_credentialtest "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/vendor_test_app.py"
click node_prepare "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/nautobot_prepare.py"
click node_devicecreate "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/nautobot_onboard_v2.py"
click node_nautobotclient "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/client.py"
click node_chatops "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/chatops/worker.py"
click node_cli "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/onboard_cli.py"
click node_job "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/jobs/sync_network_data_job.py"
click node_mistjob "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/jobs/mist_sync.py"
click node_tasks "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/tasks.py"
click node_concurrency "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/concurrency.py"
click node_syncengine "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/sync_network_data.py"
click node_openbao "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/openbao_client.py"
click node_shadowjobs "https://github.com/itachiuch1haa/nautobot-day2-v2/tree/main/nautobot_day2/shadow_ip/jobs"
click node_shadowmath "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/shadow_ip/shadow_math.py"
click node_shadowfields "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/shadow_ip/custom_fields.py"
click node_fortigate "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/shadow_ip/integrations/fortigate_client.py"
click node_restbroker "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/broker/api_server.py"
click node_mcpbroker "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/broker/mcp_server.py"
click node_brokercore "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/broker/core.py"
click node_mcpserver "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/server.py"
click node_toolset "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/tools_schema.py"
click node_state "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/session/state_machine.py"
click node_intake "https://github.com/itachiuch1haa/nautobot-day2-v2/tree/main/nautobot_day2/onboarding_mcp/intake"
click node_controllers "https://github.com/itachiuch1haa/nautobot-day2-v2/tree/main/nautobot_day2/onboarding_mcp/controllers"
click node_deployer "https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/deploy/nautobot_deployer.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_tenant,node_vendor,node_credentialtest,node_prepare,node_devicecreate,node_nautobotclient,node_chatops,node_cli,node_chatuser toneBlue
class node_job,node_mistjob,node_tasks,node_concurrency,node_syncengine,node_openbao,node_nautobot toneAmber
class node_shadowjobs,node_shadowmath,node_shadowfields,node_fortigate toneMint
class node_restbroker,node_mcpbroker,node_brokercore toneRose
class node_mcpserver,node_toolset,node_state,node_intake,node_controllers,node_deployer,node_engineer,node_devices,node_agent,node_mcpuser toneIndigo
```

## Components

### Site onboarding

- [Web wizard](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/upload_app.py): `nautobot_day2/onboarding/upload_app.py`
- [Tenant setup](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/create_tenant.py): `nautobot_day2/onboarding/create_tenant.py`
- [Vendor matrix](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/vendor_matrix.py): `nautobot_day2/onboarding/vendor_matrix.py`
- [Credential validation](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/vendor_test_app.py): `nautobot_day2/onboarding/vendor_test_app.py`
- [Nautobot preparation](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/nautobot_prepare.py): `nautobot_day2/onboarding/nautobot_prepare.py`
- [Device provisioning](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/nautobot_onboard_v2.py): `nautobot_day2/onboarding/nautobot_onboard_v2.py`
- [Nautobot REST client](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/client.py): `nautobot_day2/client.py`
- [ChatOps commands](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/chatops/worker.py): `nautobot_day2/chatops/worker.py`
- [CLI onboarding](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/onboard_cli.py): `nautobot_day2/onboarding/onboard_cli.py`

### Network sync

- [Sync Jobs](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/jobs/sync_network_data_job.py): `nautobot_day2/jobs/sync_network_data_job.py`
- [Mist sync Job](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/jobs/mist_sync.py): `nautobot_day2/jobs/mist_sync.py`
- [Device tasks](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/tasks.py): `nautobot_day2/tasks.py`
- [Site concurrency cap](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/concurrency.py): `nautobot_day2/concurrency.py`
- [Vendor sync engine](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding/sync_network_data.py): `nautobot_day2/onboarding/sync_network_data.py`
- [OpenBao credentials](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/openbao_client.py): `nautobot_day2/openbao_client.py`

### Shadow IP

- [Shadow-IP Jobs](https://github.com/itachiuch1haa/nautobot-day2-v2/tree/main/nautobot_day2/shadow_ip/jobs): `nautobot_day2/shadow_ip/jobs`
- [Shadow IP mapping](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/shadow_ip/shadow_math.py): `nautobot_day2/shadow_ip/shadow_math.py`
- [Shadow custom fields](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/shadow_ip/custom_fields.py): `nautobot_day2/shadow_ip/custom_fields.py`
- [FortiGate VIPs](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/shadow_ip/integrations/fortigate_client.py): `nautobot_day2/shadow_ip/integrations/fortigate_client.py`

### Agent Broker

- [Broker REST API](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/broker/api_server.py): `nautobot_day2/broker/api_server.py`
- [Broker MCP API](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/broker/mcp_server.py): `nautobot_day2/broker/mcp_server.py`
- [Broker command core](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/broker/core.py): `nautobot_day2/broker/core.py`

### Conversational onboarding

- [Onboarding MCP server](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/server.py): `nautobot_day2/onboarding_mcp/server.py`
- [Onboarding tools](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/tools_schema.py): `nautobot_day2/onboarding_mcp/tools_schema.py`
- [Session state machine](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/session/state_machine.py): `nautobot_day2/onboarding_mcp/session/state_machine.py`
- [Device intake](https://github.com/itachiuch1haa/nautobot-day2-v2/tree/main/nautobot_day2/onboarding_mcp/intake): `nautobot_day2/onboarding_mcp/intake`
- [Controller adapters](https://github.com/itachiuch1haa/nautobot-day2-v2/tree/main/nautobot_day2/onboarding_mcp/controllers): `nautobot_day2/onboarding_mcp/controllers`
- [Nautobot deployer](https://github.com/itachiuch1haa/nautobot-day2-v2/blob/main/nautobot_day2/onboarding_mcp/deploy/nautobot_deployer.py): `nautobot_day2/onboarding_mcp/deploy/nautobot_deployer.py`

### Other components

- **Network engineer**
- **Nautobot**
- **ChatOps user**
- **Network devices**
- **External agent**
- **Onboarding agent**

## Connections

- Network engineer → Web wizard: uses (evidence: `README.md`)
- Web wizard → Tenant setup: creates profile (evidence: `nautobot_day2/onboarding/upload_app.py`)
- Web wizard → Vendor matrix: uses choices (evidence: `nautobot_day2/onboarding/upload_app.py`)
- Web wizard → Credential validation: validates credentials (evidence: `README.md`)
- Web wizard → Nautobot preparation: prepares data (evidence: `nautobot_day2/onboarding/upload_app.py`)
- Web wizard → Device provisioning: deploys devices (evidence: `nautobot_day2/onboarding/upload_app.py`)
- Device provisioning → Nautobot REST client: calls API (evidence: `nautobot_day2/onboarding/nautobot_onboard_v2.py`)
- Nautobot REST client → Nautobot: reads and writes (evidence: `nautobot_day2/client.py`)
- Web wizard → Nautobot: triggers sync Job (evidence: `README.md`)
- ChatOps user → ChatOps commands: uses (evidence: `README.md`)
- ChatOps commands → Sync Jobs: enqueues Job (evidence: `nautobot_day2/chatops/worker.py`)
- Network engineer → CLI onboarding: uses (evidence: `README.md`)
- CLI onboarding → Vendor sync engine: runs directly (evidence: `README.md`)
- Nautobot → Sync Jobs: runs Job (evidence: `README.md`)
- Sync Jobs → Device tasks: fans out tasks (evidence: `README.md`)
- Device tasks → Site concurrency cap: limits site work (evidence: `nautobot_day2/tasks.py`)
- Device tasks → Vendor sync engine: syncs device (evidence: `nautobot_day2/tasks.py`)
- Vendor sync engine → OpenBao credentials: fetches credentials (evidence: `nautobot_day2/openbao_client.py`)
- Vendor sync engine → Network devices: collects network data (evidence: `README.md`)
- Vendor sync engine → Nautobot REST client: updates inventory (evidence: `README.md`)
- Nautobot → Mist sync Job: runs Job (evidence: `README.md`)
- Mist sync Job → Network devices: syncs Mist data (evidence: `README.md`)
- Nautobot → Shadow-IP Jobs: runs Jobs (evidence: `README.md`)
- Shadow-IP Jobs → Shadow IP mapping: maps addresses
- Shadow-IP Jobs → Shadow custom fields: reconciles fields
- Shadow-IP Jobs → FortiGate VIPs: checks VIP coverage
- External agent → Broker REST API: sends commands (evidence: `README.md`)
- External agent → Broker MCP API: sends commands (evidence: `README.md`)
- Broker REST API → Broker command core: dispatches request (evidence: `nautobot_day2/broker/api_server.py`)
- Broker MCP API → Broker command core: shares logic (evidence: `README.md`)
- Broker command core → Nautobot: looks up device (evidence: `README.md`)
- Broker command core → OpenBao credentials: fetches credential (evidence: `README.md`)
- Broker command core → Network devices: runs commands (evidence: `README.md`)
- Onboarding agent → Onboarding MCP server: uses tools (evidence: `README.md`)
- Onboarding MCP server → Onboarding tools: registers tools (evidence: `nautobot_day2/onboarding_mcp/server.py`)
- Onboarding tools → Session state machine: tracks session
- Onboarding tools → Device intake: collects devices
- Onboarding tools → Controller adapters: discovers APs
- Onboarding tools → Nautobot deployer: deploys site
- Nautobot deployer → Nautobot: creates records
