Skip to content

feat: expand InterfaceTemplate type and Zod schema #247

@ggfevans

Description

@ggfevans

Parent Epic

Part of #71 (Network Interface Visualization and Connectivity)

Summary

Expand the existing Interface type to a full InterfaceTemplate with NetBox-compatible fields and Rackula extensions for visual positioning.

Acceptance Criteria

  • Create InterfaceType enum with common interface types (1000base-t, 10gbase-x-sfpp, etc.)
  • Expand InterfaceTemplate with fields: name, type, label, mgmt_only, position, poe_mode, poe_type
  • Add PoEType enum for PoE standards
  • Update Zod schema with InterfaceTemplateSchema
  • Ensure backward compatibility (empty interfaces array is valid)
  • Update TypeScript exports in types/index.ts

Technical Notes

type InterfaceType =
  | '1000base-t'        // 1GbE RJ45
  | '10gbase-t'         // 10GbE RJ45
  | '10gbase-x-sfpp'    // 10GbE SFP+
  | '25gbase-x-sfp28'   // 25GbE SFP28
  | '40gbase-x-qsfpp'   // 40GbE QSFP+
  | '100gbase-x-qsfp28' // 100GbE QSFP28
  | 'console'
  | 'management';

interface InterfaceTemplate {
  name: string;
  type: InterfaceType;
  label?: string;
  mgmt_only?: boolean;
  position?: 'front' | 'rear';
  poe_mode?: 'pd' | 'pse';
  poe_type?: PoEType;
}

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions