Status: built, 2026-10-06. Issue #806. Builds on the power-port half of
spec/tools/portrayal/dcim_export.py (PART_POWER) and on
connectors-dc-terminal-design.md.
The exporter wrote power-ports: where a supply's cable is landed. It had no notion of a
power OUTLET, which is where a device hands power on.
The first device this bit is the Amphenol Network Solutions 300CB08, a breaker panel. Two feeds come in, and sixteen circuits go out, each through one breaker position.
| on the device | exported before | exported now |
|---|---|---|
input-a, input-b - one feed each, both poles |
two dc-terminal power ports |
the same |
breaker-a1 to breaker-b8 - sixteen positions |
sixteen module bays | the same, each naming the output it protects |
output-a1 to output-b8 - sixteen output circuits |
nothing; registered in NOT_A_DCIM_PORT |
sixteen power outlets |
For a distribution panel the outlets are the fact a DCIM user most wants: which panel output a router's supply is cabled to, and which feed stands behind it.
Read from each project's source: NetBox dcim/choices.py at 64ce9e2d,
dcim/forms/object_import.py at 743b0683 and the component template models at
5707c0e9; Nautobot dcim/choices.py at 3edb1fca, dcim/forms.py at 6c1299e2 and
the component template models at 3606c7da.
| NetBox | Nautobot | |
|---|---|---|
| outlet type for a DC screw terminal | dc-terminal |
dc-terminal |
| outlet type for a connector upstream does not name | other |
other |
| the import key naming the feeding port | power_port |
power_port, mapped to power_port_template "for backwards compatibility" |
| how that key is matched | by name, among the same type's power ports | the same |
an outlet's description on import |
kept | dropped: not in the import form |
feed_leg |
A, B, C |
A, B, C |
| an outlet template may belong to | a device type or a module type | a device type or a module type |
| the feeding port must belong to | the same device type or module type | the same device type or module type |
Consequences.
dc-terminalis in both, as an outlet type as well as a port type, andotheris in both. No slug is invented.PART_OUTLET's values are checked againstOUTLET_TYPES, that shared list, because Nautobot's component import turns an unknown type intootherwithout a word.- One block serves both targets. Both read
power_portby name and import power ports before power outlets, sofor_targetdoes not rewrite outlets. - An outlet and the port that feeds it live on one type. Both models'
clean()refuse a port from another type, so an outlet on a breaker's module type could not name the panel's feed. The outlet is on the device type, which is also physically right: the BATT and RTN screws stay when a breaker is pulled, and a blank or fuse position keeps its terminals. - Nautobot loses the outlet's description. Its module-bay import keeps one, so the breaker sentence is written on the bay as well.
feed_leg is a phase of a three-phase supply. A panel's side A and side B are two feeds,
not two legs of one, so feed_leg is not used for them. It would also collide by
accident: the legs are spelled A and B.
Neither target links an outlet to a module bay. That a circuit is live only through the breaker in one position can be said in words and not as a relation.
- An output circuit is a power outlet on the device type, with
power_portset to the feed of its side. - The manifest says which feed, on each placement.
fed-byis stated per output and not on the group: nothing is inferred from a group or from an-a/-bin a name, and a panel whose outputs do not split cleanly by group needs nothing more. - The manifest says which position, on the placement.
throughnames the breaker position a circuit runs through, and is carried into the outlet's description and the bay's. feed_legis not written for a two-feed DC panel.- An outlet is named as its device's
interfaces:rules name it, else by its placement id, as every exported port is:output-a1. The rules name power outlets as they name interfaces, so an outlet a rule names takes its printed label (the Eaton EVMI2130X'soutlet-a1exports asA1); an outlet no rule names keeps its placement id. A NOS listing that states its owninterfacesdoes not apply these rules, so its export keeps every outlet's placement id. - Outlets are a table row per part, as power ports are. A part exports outlets
because
PART_OUTLETlists it, not because of its class. - A connectorized output is
other, labelled. The 300CB08-C and -SC outputs are two-pole P40 receptacles, which neither target names;amphenol-ns/output-p40maps tootherwithlabel: P40, the treatmentOTHER_LABELgives an interface whose form factor upstream does not name. - Stating
fed-byorthroughis a minor version; changing either is a major.
Rejected: for: (section 4), an attrs bag (nothing would check it), inferring the feed
from -a/-b names, one outlet per screw (the two screws are one circuit's two poles,
as a feed's two studs are one power port), outlets on the breaker's module type (section
2), and a hard-wired outlet type in the exporter instead of a table row.
Two placement keys.
views:
rear:
components:
placements:
- {id: input-a, ref: amphenol-ns/input-feed-studs@1, group: feeds, rel-pos: 1}
- {id: output-a3, ref: amphenol-ns/output-terminal@1, group: outputs-a,
rel-pos: 3, fed-by: input-a, through: breaker-a3}fed-bynames a placement on this device whose part exports a power port.throughnames the bay that the circuit runs through: its breaker or fuse position. It is optional; a panel with fixed, unprotected outputs has none.
Where through names a FIXED breaker placement rather than a bay (#934, a rack
PDU's branch breaker), the outlet description names that breaker as the unit prints
it, Through breaker A, and not by its placement id: the first of the placement's
attrs.label and attrs.section (the Eaton G4 tile letter) that is set, the id only
when neither is (decided 2026-10-09; dcim_export.breaker_name). A bay
position keeps Through breaker position <id>, since a bay prints nothing of its own.
Both are bare ids resolved over the whole device, because both cross a face: the output
is on the rear and the position it runs through is on the front. A for: cannot say
this. for: is a UI binding, emitted as data-for, saying "this mark or lamp annotates
that", and it waives L13's overlap check between the two; it was not made for two parts
on different faces with no drawing between them.
# device-types/Amphenol Network Solutions/300CB08.yaml
power-ports:
- {name: input-a, type: dc-terminal}
- {name: input-b, type: dc-terminal}
power-outlets:
- name: output-a1
type: dc-terminal
power_port: input-a
description: Through breaker position breaker-a1
# ... sixteen in all
module-bays:
- name: breaker-a1
position: breaker-a1
description: 'Accepts: breaker-1ru, tpa-fuse-holder-307492, breaker-blank-1ru; protects output-a1'PART_OUTLET = {"amphenol-ns/output-terminal": "dc-terminal", "amphenol-ns/output-p40": "other"}, besidePART_POWER, keyed on the ref for the reasonPART_POWERis;OUTLET_LABELgives the P40 its label.- A placement of a listed part becomes one outlet, and the rows are in natural order. Its
power_portis the power port itsfed-bynames. Afed-bythat names nothing exporting a power port stops the export (NotExpressible), because both targets reject a dangling reference at import. An outlet with nofed-byis written withoutpower_port; it imports, and L134 counts it. - The same block is written for NetBox and for Nautobot (section 2).
amphenol-ns/output-terminalandamphenol-ns/output-p40have leftNOT_A_DCIM_PORT; the register's stale-entry test insisted on it.- The bay's added sentence does not move the module-type collision check:
dcim_significantalready reads a bay's description as a sentence about the drawing.
Not needed by the 300CB08 and not built. It is the shape a rack PDU with a hot-swappable
outlet module would need, and both targets allow it: the outlet template belongs to the
module type. Its feeding port would have to be on the same module type, so it applies
only to a module that has an input of its own. build_module would read PART_OUTLET
the way it reads PART_POWER, and MODULE_PORT_KEYS would gain power-outlets with
each row's power_port tokenised as its name is.
- L132,
fed-byresolves. It names a placement on this device whose part is inPART_POWER, and stands on a part inPART_OUTLET. An error. - L133,
throughresolves. It names a bay on this device, or, since #934, a placement of a part of classbreakerfixed to the unit (a rack PDU's branch breaker, pdu-model-design.md section 5.3). An error. - L134, a part in
PART_OUTLETis fed. Every placement of one statesfed-by. A warning belowverifiedand an error at it: an outlet with no feed is importable, and is the incomplete model this work exists to end. - L135, one position, one circuit. Two placements do not name the same
through. A warning, because a panel that parallels two outputs behind one breaker is possible. It reads bays only: a fixed PDU breaker feeds many outlets by design (#934).
fed-by and through are in devicelock's PLACEMENT_ADDRESSING, beside for. They
change what is exported, not what is drawn. Stating one where there was none is a minor:
the export gains outlets and loses nothing. Changing or dropping one re-files an imported
outlet's feed and is a major. The three panels went to 1.1.0.
test_300cb08_power_outlets.py: each of the three panels exports sixteen outlets, eight naming each feed, each naming a position that exists and whose bay names it back, from the build and in the committed files of both trees, and both trees carry the same outlets.test_power_outlets.py: an outlet whosefed-bynames no power port stops the export; one with none is written withoutpower_port; nofeed_leg; the P40 label;OUTLET_TYPES.test_silent_drops.py: the census knows the outlet exit, and nothing listed inPART_OUTLETis inNOT_A_DCIM_PORT.test_power_outlet_lint.py: L132-L135.
- Schema:
fed-byandthroughon a placement; devicelock files them as addressing. - Lint, section 7.
- Exporter:
PART_OUTLET, thepower-outletsblock, the failing case. - The 300CB08, 300CB08-C and 300CB08-SC: the two keys, the register entries removed, exports regenerated.
- AC. A rack PDU's C13 and C19 outlets have types in both targets and would use the
same table. Whether a three-phase PDU states
feed_legper outlet is a question for the first one modelled. pdu-model-design.md (#934) proposes the answer: only for an outlet wired line to neutral on a wye input. - An alarm contact. The panel's Form C alarm relays have no port type in either
target. They stay in
NOT_A_DCIM_PORT. - Ratings. An outlet template in either target carries a type and no current rating. A feed rated in amperes at one of three nominal voltages has no honest single wattage, so no draw figure is written on the power ports either.
- An unfed outlet in Nautobot. Its import form reads
power_portfrom the submitted data before validating, so an outlet written without one has not been proved to import there. No device in the library writes one; L134 keeps it that way atverified.