public icon indicating copy to clipboard operation
public copied to clipboard

Create import-match-table configuraiton for table-connections

Open dplore opened this issue 6 months ago • 1 comments

Today, table-connections only defines an import-policy leaf and implies that the matching conditions are evaluated against the src-protocol and the resulting matching routes are copied into the dst-protocol. https://github.com/openconfig/featureprofiles/pull/4588 identifies a need to advertise an aggregate route based on a routing-policy matching a prefix that is not in the src-protocol.

A new OC path is proposed to fulfill this need:

/routing-policy/policy-definitions/policy-definition/statements/statement/actions/config/import-match-protocol = "BGP"

For context, here is the tree for table-connections with the proposed import-match-protocol leaf:

        +--rw table-connections
        |  +--rw table-connection* [src-protocol dst-protocol address-family]
        |     +--rw src-protocol      -> ../config/src-protocol
        |     +--rw dst-protocol      -> ../config/dst-protocol
        |     +--rw address-family    -> ../config/address-family
        |     +--rw config
        |     |  +--rw src-protocol?                 -> ../../../../tables/table/config/protocol
        |     |  +--rw address-family?               -> ../../../../tables/table[protocol=current()/../src-protocol]/config/address-family
        |     |  +--rw dst-protocol?                 -> ../../../../tables/table/config/protocol
        |     |  +--rw disable-metric-propagation?   boolean
        |     |  +--rw import-policy*                -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
+       |     |  +--rw import-match-protocol          -> ../../../../tables/table/config/protocol
        |     |  +--rw default-import-policy?        default-policy-type
        |     +--ro state
        |        +--ro src-protocol?                 -> ../../../../tables/table/config/protocol
        |        +--ro address-family?               -> ../../../../tables/table[protocol=current()/../src-protocol]/config/address-family
        |        +--ro dst-protocol?                 -> ../../../../tables/table/config/protocol
        |        +--ro disable-metric-propagation?   boolean
        |        +--ro import-policy*                -> /oc-rpol:routing-policy/policy-definitions/policy-definition/name
+       |        +--rw import-match-protocol          -> ../../../../tables/table/config/protocol
        |        +--ro default-import-policy?        default-policy-type

dplore avatar Sep 11 '25 21:09 dplore

We have a way to generate aggregates that is in the local-routes module. Can we explain why doesn't allow for aggregate generation in the expected manner?

robshakir avatar Sep 12 '25 21:09 robshakir