WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Clarification : Need a way for gNMI union-replace to handle the OC/CLI config dependency #228

@peichengATgit

Description

@peichengATgit

It is not clear how "union-replace" handles the OC/CLI dependency per the current writing.

Take bgp as the example,
some vendor may include bgp as its built-in functionality,
while others may include bgp as a conditional feature, and requires explicit activation.

Take below config snippet as the example.
The user would need to first apply "feature bgp" to enable the bgp feature,
only then "router bgp ..." become acceptable config.

feature bgp

router bgp 64500
   neighbor 10.1.1.14 remote-as 50

Commonly, the openconfig would define the bgp model tree, while missing out the conditional toggle.
In this example, assume only the "router bgp ..." part is defined in openconfig.

This is usually not a big deal, as people today can do two gnmi set, or one gnmi set with two update requests.

  • the first request uses the native yang or cli to apply 'feature bgp'
  • the second request uses the OC payload to config the router bgp and its neighbor.

However, in case of 'union-replace' https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-union_replace.md#531-union-behavior-for-cli-and-openconfig, the writing restricts the the network device

  • there can be only one CLI payload
  • has to first process OC then the CLI.

This is a chicken-egg issue which cannot really work,
as the OC processing requires the CLI to enable the feature, but the CLI can only be processed after OC.

We would need some clarification / writing to allow the flexibility for the network device to handle the dependency.
Something like the following :

- Create a candidate configuration using factory defaults.
 o Factory defaults are used because CLI is expected to represent the entire configuration, subject to any partitioning rules of bootz and gNSI.

<< If the OC path depends on specific proprietary CLI items,
     the network device may merge such specific CLI items to the candidate configuration.
     Such early merge only means to facilitate the OC processing, and shall not introduce the conflicts.

-  Process OC paths, replacing the relevant configuration items in the candidate configuration. This includes OC default values.
-  Process CLI items merging them to the candidate configuration. Generate an error if there is conflict between OC and CLI as defined below. Conflict and resolution is defined in [5.3.3](https://github.com/openconfig/reference/blob/master/rpc/gnmi/5.3.3-Resolving-issues-with-union-between-the-origins).

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