Skip to content

Interacting with Disconnect Maps

Every disconnect channel in the system BOM, plus rows with device assignments after routing. Call new() to list disconnect channels, assign() for manual path requirements, then resolve() to route cross-harness channel-map rows and perform disconnect channel assignments.


Columns

Columns are automatically generated when disconnect_map.new() is called. Additional columns are not supported and may result in an error when parsing.

Column Description
A-side_device_refdes device on harness A after this disconnect channel is assigned
A-side_device_channel_id channel id on that A-side device
A-side_device_channel_type channel type at the A-side endpoint for this assignment
B-side_device_refdes device on harness B after this disconnect channel is assigned
B-side_device_channel_id channel id on that B-side device
B-side_device_channel_type channel type at the B-side endpoint for this assignment
disconnect_refdes disconnect symbol refdes (from BOM)
disconnect_channel_id channel on that disconnect (from BOM)
A-disconnect_port_channel_type disconnect port channel type on shell A
B-disconnect_port_channel_type disconnect port channel type on shell B
manual_map_channel_python_equiv copy-paste disconnect_map.assign(...) for this disconnect channel

Commands:

Use the following functions by first importing the module in your script like this:

from harnice.lists import disconnect_map
then use as written.

disconnect_map.new(*, visualize=False)

Create disconnect channel rows on the disconnect map from the BOM (unassigned disconnect channels and their disconnect port channel types).

Clears disconnect requirements so the file only contains rows written by assign() calls after this new() (removing assign() from build instructions drops stale requirements on the next build).

When visualize is true, regenerates disconnect_networks/ PNGs via :func:visualize. When false, removes disconnect_networks/ if present. Does not route channels. Call assign() to record manual requirements, then resolve() to route and assign disconnect channels.

disconnect_map.assign(assignments)

Record manual disconnect path requirements (does not assign disconnect channels on the disconnect map yet).

Writes disconnect requirements (see :func:fileio.path) in call order. new() clears that file first; later assign() calls in the same build append after earlier ones. Re-assigning a channel moves it to the end. Clears disconnect_refdes_requirement on affected channel-map rows until resolve(). Cross-harness paths are checked against endpoint channel-type compatibility at assign time. Call resolve() after new() and any assign() calls to write maps and perform disconnect channel assignments. Each assignment is (device_channel_key, disconnect_choice) where device_channel_key is (device_refdes, channel_id) for either endpoint on the row, and disconnect_choice is 'no disconnects' or a path list such as [('X1', 'ch0')].

disconnect_map.resolve()

Finish disconnect routing for channel-map rows that do not already have a solution.

Call after new() and any assign() calls. Requirements in disconnect requirements are applied in assign() order (each call and each list entry appends to that order). Earlier requirements assign disconnect channels first; DFS for remaining rows prefers channels in the same order. Raises ValueError when a requirement or auto-route cannot be satisfied.

disconnect_map.visualize()

Regenerate disconnect_networks/ PNGs from the current channel map (no routing).

Writes one Graphviz PNG per mapped channel-map row. Disconnect edges run shell A → shell B; colors show which port channel types mate the row's from/to types (red / blue / yellow).