Skip to content

[DASH] Add Yang definitions for DASH #13078

Merged
prsunny merged 1 commit intosonic-net:masterfrom
prsunny:dashyang
Jan 3, 2023
Merged

[DASH] Add Yang definitions for DASH #13078
prsunny merged 1 commit intosonic-net:masterfrom
prsunny:dashyang

Conversation

@prsunny
Copy link
Contributor

@prsunny prsunny commented Dec 15, 2022

Why I did it

Introduce Sonic Yang for DASH for the following tables:

  • VNET
  • ENI
  • ACL
  • ROUTES
  • MAPPING

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@chrispsommers
Copy link

Hi, do you intend to eventually provide test files which can be used by a gNMI client to sent to the northbound gNMI interface (for example, any number of CLI-type gNMI clients, or a library)? The .json files appear to be formatted for Redis DB importing.

} /* end of list DASH_ROUTE_TABLE_LIST */
} /* end of container DASH_ROUTE_TABLE */

container DASH_VNET_MAPPING_TABLE {
Copy link
Contributor

@ganglyu ganglyu Dec 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When GNMI run yang validation, GNMI needs to read current config from ApplDB and merge with incoming config.
DASH_ROUTE_TABLE and DASH_VNET_MAPPING_TABLE have large number of entries, so it will spend too much time to read these 2 tables.
My suggestion is to ignore existing DASH_ROUTE_TABLE and DASH_VNET_MAPPING_TABLE in ApplDB, therefore we should use different name pattern for DASH_ROUTE_TABLE and DASH_VNET_MAPPING_TABLE, and then GNMI can ignore these 2 tables and only read other tables. For example, DASHI_ROUTE_TABLE and DASHI_VNET_MAPPING_TABLE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think gnmi should be reading current config from APPDB for Mapping and Routing. Lets discuss to understand your concern.

Copy link
Contributor

@ganglyu ganglyu Dec 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I can use redis api like redis.keys("DASH_") to read all the other DASH tables except Mapping and Routing, and then Mapping and Routing table should use different name pattern.
Please let me know what you think.

@prsunny
Copy link
Contributor Author

prsunny commented Dec 16, 2022

Hi, do you intend to eventually provide test files which can be used by a gNMI client to sent to the northbound gNMI interface (for example, any number of CLI-type gNMI clients, or a library)? The .json files appear to be formatted for Redis DB importing.

@chrispsommers, i'll work with @ganglyu to provide example gnmi configuration (may not be full-fledged test files) to DASH repo.

Copy link
Contributor

@ganglyu ganglyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to discuss DASH yang models.

@prsunny prsunny enabled auto-merge (squash) December 28, 2022 21:38
@prsunny prsunny merged commit fa9abb6 into sonic-net:master Jan 3, 2023
@prsunny prsunny deleted the dashyang branch January 3, 2023 17:21
@stephenxs
Copy link
Collaborator

Hi @prsunny
Looks like it causes the follow error

admin@r-boxer-sw01:~$ sudo sonic-package-manager list
libyang[1]: Value "vnet-direct" does not satisfy the constraint "direct|vnet|vnet_direct|vnet_encap|drop|appliance|privatelink|privatelinknsg|servicetunnel" (range, length, or pattern). (path: /sonic-dash:action_type)
libyang[1]: Previous warning generated by XPath subexpression[54] "action_type = 'vnet-direct'".
libyang[1]: Value "vnet-direct" does not satisfy the constraint "direct|vnet|vnet_direct|vnet_encap|drop|appliance|privatelink|privatelinknsg|servicetunnel" (range, length, or pattern). (path: /sonic-dash:action_type)
libyang[1]: Previous warning generated by XPath subexpression[54] "action_type = 'vnet-direct'".
Name                Repository                                        Description                   Version       Status
------------------  ------------------------------------------------  ----------------------------  ------------  ---------
database            docker-database                                   SONiC database package        1.0.0         Built-In
dhcp-relay          docker-dhcp-relay                                 N/A                           1.0.0         Installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants