Skip to content

Derive RoutingProtocol.description from device, VRF and protocol instead of requiring it #86

Open

Description

@lancamat1

Context. RoutingProtocol is the generic every routing protocol extension inherits from.
Its description is a mandatory, globally unique Text attribute, so every BGP session,
OSPF process, PIM instance and aggregate route in the library forces the operator to hand
type a string that no two objects may share. The obvious value is mechanical: device plus
VRF plus protocol.

Current marker.

extensions/routing/routing.yml:18
      # TODO: Should be computed later

sitting above:

      - name: description
        kind: Text
        unique: true
        optional: false
        description: "Description of the protocol"
        order_weight: 1100

What this asks for. Convert description to a Jinja2 computed attribute derived from the
protocol's own device, VRF and protocol type, or replace it with a proper identity so the
mandatory-unique free-text field goes away. Not a v2.0 edit: a computed attribute must be
optional: true and read_only: true, which interacts with the HFID and uniqueness work
the review already does under CC-4, and the derivation has to hold for all five protocol
extensions plus routing_bgp_rr and peering_ixp.

Origin: pass-1 review of #75, packet RTG-CC1, CC-8 bucket (c).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions