-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Milestone
Description
Parent Epic
Part of #362 (Connection Graph Model - Port-Based Architecture)
Summary
Add InternalConnection to DeviceType to model internal topology (PDU circuits, patch panel pass-through, switch fabric, chassis backplane).
Background
Devices like PDUs have internal topology - an input feeds multiple outlets through circuits. Patch panels have pass-through connections from front to rear. This internal topology enables power path traversal and connection tracing.
Type Definition
type InternalConnectionType =
| 'power-distribution' // PDU inlet → outlets
| 'passthrough' // Patch panel front ↔ rear
| 'fabric' // Chassis backplane
| 'stacking'; // Switch stack ring
interface InternalConnection {
from_interface: string; // InterfaceTemplate.name
to_interfaces: string[]; // Array of InterfaceTemplate.name
connection_type: InternalConnectionType;
circuit_name?: string; // For PDU circuits: "Bank A"
breaker_amps?: number; // For PDU circuits: 20
}Acceptance Criteria
- Create
InternalConnectioninterface - Create
InternalConnectionTypeenum - Add
internal_connections: InternalConnection[]to DeviceType - Validate that referenced interfaces exist on device type
- YAML serialization for internal connections
Examples
PDU with circuits:
internal_connections:
- from_interface: "Input"
to_interfaces: ["Out 1", "Out 2", "Out 3", "Out 4"]
connection_type: power-distribution
circuit_name: "Bank A"
breaker_amps: 20
- from_interface: "Input"
to_interfaces: ["Out 5", "Out 6", "Out 7", "Out 8"]
connection_type: power-distribution
circuit_name: "Bank B"
breaker_amps: 20Patch panel passthrough:
internal_connections:
- from_interface: "Port 1 Front"
to_interfaces: ["Port 1 Rear"]
connection_type: passthrough
- from_interface: "Port 2 Front"
to_interfaces: ["Port 2 Rear"]
connection_type: passthroughTest Requirements
- InternalConnection schema validates correctly
- PDU device type with circuits serializes correctly
- Patch panel pass-through modeled correctly
- Invalid interface references are caught
- Internal connections used in path traversal
Related
- Parent Epic: feat: Connection Graph Model - Phase 1: Port-Based Architecture #362
- Enables: Power path visualization (feat: power port and outlet visualization #270)
- Enables: Patch panel pass-through (feat: patch panel pass-through visualization #269)