Add a global template for encap-header attributes - #1512
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a global encapsulation header template for static next-hops in the openconfig-network-instance-static YANG module, adding configuration and state parameters for IPv4, IPv6, and MPLS destination UDP ports. The review feedback suggests correcting the description of encap-header-template to reflect that it is a single template rather than a group of templates, and adding a reference to RFC 7510 for the MPLS destination UDP port leaf.
…atic.yang Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…h/public into static_nh_global_template * 'static_nh_global_template' of https://github.com/tasaleh/public: Update release/models/network-instance/openconfig-network-instance-static.yang
robshakir
left a comment
There was a problem hiding this comment.
We have generally said that we do not have ideas such as templates within OpenConfig models. They seem generally to be for the reason that a human needs to type less configuration. Is there a use case beyond this for this template?
The static next-hop UDP encap-headers allow for configured UDP destination ports per tunnel. In many existing implementations, a system-wide configuration is used where the destination port is set globally. This template is a placeholder for any encap-header attributes that needs to be set globally and only contains the destination port for now. Probably, we should not use "template" in the name. Instead we can use |
|
@tasaleh in general for this to move forward you'd need to add 2 supporting vendor implementations also, Can you please also speak about a use case as such for this ? |
Change Scope
Tree View
+--rw network-instances +--rw static + | +--rw encap-header-template + | | +--rw config + | | | +--rw ipv4-dst-udp-port? oc-inet:port-number + | | | +--rw ipv6-dst-udp-port? oc-inet:port-number + | | | +--rw mpls-dst-udp-port? oc-inet:port-number + | | +--ro state + | | +--ro ipv4-dst-udp-port? oc-inet:port-number + | | +--ro ipv6-dst-udp-port? oc-inet:port-number + | | +--ro mpls-dst-udp-port? oc-inet:port-number | +--rw next-hops | +--rw next-hop* [index] | +--rw index -> ../config/index | +--rw config | | +--rw index? string | | +--rw next-hop? union | | +--rw recurse? boolean | | +--rw metric? uint32 | | +--rw preference? uint32 | | +--rw wecmp-weight? union | +--ro state | | +--ro index? string | | +--ro next-hop? union | | +--ro recurse? boolean | | +--ro metric? uint32 | | +--ro preference? uint32 | | +--ro wecmp-weight? union | +--rw encap-headers | +--rw encap-header* [index] | +--rw index -> ../config/index | +--rw config | | +--rw index? uint8 | | +--rw type? oc-aftt:encapsulation-header-type | +--ro state | | +--ro index? uint8 | | +--ro type? oc-aftt:encapsulation-header-type | +--rw udp-v4 | | +--rw config | | | +--rw src-ip? oc-inet:ipv4-address | | | +--rw dst-ip? oc-inet:ipv4-address | | | +--rw dscp? oc-inet:dscp | | | +--rw src-udp-port? oc-inet:port-number | | | +--rw dst-udp-port? oc-inet:port-number | | | +--rw ip-ttl? uint8 | | +--ro state | | +--ro src-ip? oc-inet:ipv4-address | | +--ro dst-ip? oc-inet:ipv4-address | | +--ro dscp? oc-inet:dscp | | +--ro src-udp-port? oc-inet:port-number | | +--ro dst-udp-port? oc-inet:port-number | | +--ro ip-ttl? uint8