Skip to content

improve nbn domain — characteristics inherited via assignment #49

@matt-beanland

Description

@matt-beanland

The NBN domain should surface relevant characteristics from related instances on consuming resources. Today an AVC's TMF JSON shows only its own characteristics, not the context from the CVC that assigned it a cvlan, or transitively the NniGroup that assigned the CVC an svlan. A consumer of the AVC therefore loses upstream context.

Separately, NBN resources also need a way to express local KPIs — counts and bandwidth aggregates across their assignees, and derived ratios like NniGroup utilization — without entangling those with inheritance.

Design

Each resource carries two distinct kinds of typed characteristic:

  1. Named characteristic (cvc on CVC, nni_group on NniGroup, etc.) — identity and context for the resource. Inheritable downstream via assignment. AVC inherits CVC's cvc via :cvlan; CVC inherits NniGroup's nni_group via :svlan. Mirrors the Access pattern (Card surfaces Shelf via :slot, Path surfaces Card via :port and Shelf two-hop via [:port, :slot]).
  2. metrics characteristic — local aggregates and KPIs. Not inheritable. Captures how this resource fits into the surrounding graph — counts of assignees, summed bandwidth across them, utilization. Computed live.

Rationale: downstream consumers benefit from upstream context (the CVC their AVC belongs to) but don't need to know how many siblings share that CVC. Keeping metrics local and context inheritable matches consumer expectations and keeps the JSON payload sane.

Resource shapes

AVC

  • Named avc characteristic — identity (cvlan, bandwidth_profile). Already exists.
  • Inherits CVC's cvc via the :cvlan assignment (single-hop).
  • Inherits NniGroup's nni_group two-hop via [:cvlan, :svlan].
  • No metrics — AVC is a leaf in the downstream direction.

CVC

  • Named cvc characteristic — identity (svlan, bandwidth). Already exists.
  • Inherits NniGroup's nni_group via the :svlan assignment (single-hop).
  • metrics characteristic carries:
    • avcs_count — count of AVCs assigned to this CVC.
    • avcs_total_bandwidth — summed bandwidth across those AVCs.

NniGroup

  • Named nni_group characteristic — identity (group_name, location). Already exists.
  • No inheritance (top of the chain in this direction).
  • metrics characteristic carries:
    • cvcs_count, cvcs_total_bandwidth — aggregates across assigned CVCs (demand side).
    • nnis_count, nnis_total_bandwidth — aggregates across the NNIs this group comprises (capacity side).
    • utilization = cvcs_total_bandwidth / nnis_total_bandwidth — demand over capacity. Expected 0–1 under normal provisioning; >1 under deliberate oversubscription.
  • Continues to surface its NNIs as a low-cardinality containment resourceRelationship (no aggregate explosion — typically only a few NNIs per group).

NTD

  • Named ntd characteristic — identity (model, serial_number, technology). Already exists.
  • No upstream inheritance (NTD sits at the customer edge).
  • Surfaces a low-cardinality unis[] view — the UNIs assigned to this NTD's ports (typical NTD has only a handful of UNIs). Each entry references the UNI with the port number carried as a relationship characteristic. Analogous shape to NniGroup's nnis[], just with assignment-style relationship metadata rather than containment.

NbnEthernet (PRI)

  • Named pri characteristic — identity (avcid, uniid, technology, bandwidth_profile, speeds_*). Already exists.
  • Brings up four characteristics from its related instances:
    • avc from the related AVC (via the :avc owns relationship).
    • uni from the related UNI (via the :uni owns relationship).
    • cvc transitively via AVC's assignment to CVC.
    • ntd transitively via UNI's assignment to NTD.
  • Result: an NBN Ethernet access surfaces its full delivery chain in one JSON payload — AVC, the CVC backing that AVC, the UNI at the customer end, and the NTD that UNI plugs into.
  • No metrics on PRI — it's a service-level resource; aggregation metrics live on the supporting resources (CVC, NniGroup).

UNI keeps its existing named uni characteristic and is consumed by PRI's bring-up — no changes needed.

Done

Definition of done includes a JSON and MCP surface check to confirm both the inherited characteristics and the metrics render correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions