Skip to content

feat: InternalConnection generalization #367

@ggfevans

Description

@ggfevans

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 InternalConnection interface
  • Create InternalConnectionType enum
  • 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: 20

Patch 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: passthrough

Test 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions