Skip to content

Conversation

Copy link

Copilot AI commented Nov 1, 2025

Implementation plan for capturing CYOA and DIA interface types onchain:

  • Extend InterfaceV1 struct with new fields:
    • Add connectivity_type (CYOA, DIA, None)
    • Add cyoa_subtype (GREoverDIA, None)
    • Add bandwidth (optional u64)
    • Add cir (optional u64)
    • Add mtu (optional u16)
    • Add routing_mode (BGP, Static, None)
  • Create new enums:
    • ConnectivityType (CYOA, DIA, None)
    • CYOASubtype (GREoverDIA, None)
    • RoutingMode (BGP, Static, None)
  • Add validation logic:
    • GREoverDIA requires routing_mode to be set
  • Update CLI list command to display new fields
  • Update CLI update command to support setting new fields
  • Add backward compatibility defaults (all default to None)
  • Create regression tests for legacy interface deserialization
  • Run all tests to ensure nothing breaks
Original prompt

This section details on the original issue you should resolve

<issue_title>Capture CYOA and DIA Interfaces onchain</issue_title>
<issue_description>Context / Why:
We need to classify each device interface by type (CYOA, DIA, or others) to properly support different connectivity models and automation flows.
CYOA interfaces also require additional attributes (e.g., GRE over DIA, capacity, routing mode) to enable accurate configuration, validation, and provisioning.

What to do:
• Add an interface_type field to device interfaces
• Initial values: CYOA, DIA, None
• For CYOA interfaces:
• Include a subtype cyoa_type (initial support for GREoverDIA)
• Add the following optional metadata fields:
• bandwidth
• cir (committed information rate / sub-rate speed)
• mtu
• routing_mode (supported: BGP, Static)

How (high-level):
• Extend the Interface struct in the on-chain account with the new fields.
• Introduce an InterfaceType enum.
• Update CLI to set and display these values.
• Add basic validation (e.g., GREoverDIA requires routing mode set).
• Provide defaults for backward compatibility.

Notes:
• No strict validation yet for MTU/bandwidth values — store only.
• Existing interfaces default to None.
• Update CLI output for dz device interface list to include new fields.
• Add regression tests to ensure legacy interfaces still deserialize correctly.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capture CYOA and DIA Interfaces onchain

2 participants