-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Parent Epic
Part of #71 (Network Interface Visualization and Connectivity)
Summary
Design and implement the data model for cable connections between device interfaces.
Data Model
interface Cable {
id: string; // UUID
// A-side termination
a_device_id: string; // Placed device UUID
a_interface: string; // Interface name
// B-side termination
b_device_id: string;
b_interface: string;
// Cable properties
type?: CableType;
color?: string; // 6-digit hex
label?: string;
length?: number;
length_unit?: 'm' | 'cm' | 'ft' | 'in';
status?: 'connected' | 'planned' | 'decommissioning';
}
type CableType =
| 'cat5e' | 'cat6' | 'cat6a' | 'cat7' | 'cat8'
| 'dac-passive' | 'dac-active'
| 'mmf-om3' | 'mmf-om4' | 'smf-os2'
| 'aoc'
| 'power'
| 'serial';Acceptance Criteria
- Define Cable interface in types/index.ts
- Create CableSchema in schemas/index.ts
- Add cables array to Layout type
- Update LayoutSchema
- Ensure YAML serialization works
- Create cable store (cables.svelte.ts)
- Add cable CRUD operations
Storage Location
interface Layout {
// ... existing fields
cables?: Cable[]; // New field
}Validation Rules
- a_device_id and b_device_id must exist in rack.devices
- a_interface must exist on a_device's device type
- b_interface must exist on b_device's device type
- No duplicate cables (same A and B endpoints)
References
- NetBox cable model:
docs/research/netbox-interface-cable-schema.md - Spike research: spike: Network interface visualization research #237