The VPC Assignment workflow binds an existing VPC’s VRF to a specific device and to a specific set of ports on that device. It updates Nautobot’s intent — the model of which VRF terminates on which port — without touching the device itself; the device-side change happens when a subsequent deploy applies the resulting intended configuration. Assignment is the second step in the VPC lifecycle, after VPC Creation provisions the VRF.
For the end-to-end assign + render + deploy lifecycle, use VPC Tenant Change — it calls this workflow as a child plus the render and deploy steps.
This workflow is experimental and not intended for general use. Use it only in test or pilot environments.
Before running, confirm:
vpc_id + namespace_tag. Multiple VRFs (or zero) under the same VPC ID is treated as an error.VPC Assignment is not exposed in the Config Manager UI today. It is invoked as a child of VPC Tenant Change, which orchestrates assignment plus the subsequent re-render and deploy. To run assignment in isolation, submit the workflow through the API with the target VPC, device, ports, and site.
After submission, a status page shows the three stages.
The workflow runs three stages in order. None require manual approval.
get_device_and_vrf — Resolve the device and the VPC’s VRF.
Loads the target device record and queries Nautobot for the VRF matching vpc_id + namespace_tag + site. The query is asserted to return exactly one VRF — zero or more than one raises ApplicationError and halts the workflow.
assign_vrf_to_device — Bind the VRF to the device record.
Attaches the VRF to the device’s VRF list in Nautobot. If the VRF is already assigned to this device, the stage short-circuits with vrf_assigned=False (meaning “no change made”); otherwise it returns vrf_assigned=True.
assign_vrf_to_ports — Bind the VRF to each named port.
For each port in port_names, assigns the VRF to the interface in Nautobot, running all per-port writes in parallel. Ports that already have this VRF assigned are skipped and recorded in already_assigned_ports. The final assigned_ports list contains the ports actually changed by this run.
After the workflow reports success, confirm:
assigned_ports lists the ports actually changed; vrf_assigned=true means the device-level binding was new this run; vrf carries the bound VRF record.get_device_and_vrf raises ApplicationError “0 VRFs found”.
The VPC has not been created yet at this site. Run VPC Creation first.
get_device_and_vrf raises ApplicationError “multiple VRFs found”.
Nautobot has more than one VRF matching vpc_id + namespace_tag + site. Investigate — VPC IDs are expected to be unique within a site. Reconcile the duplicates before re-running.
assign_vrf_to_device reports vrf_assigned=false.
The device was already bound to this VRF. Successful no-op.
assign_vrf_to_ports reports many ports in already_assigned_ports.
Those ports were already bound to this VRF. Successful no-op for those ports — assigned_ports lists only the ports newly bound by this run.