Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial import from sonic-mgmt-framework repo #10

Merged
merged 4 commits into from
Jun 13, 2020

Conversation

sachinholla
Copy link
Contributor

- Why I did it
sonic-mgmt-common repo is introduced for the common translib related code which will be used by both REST and gNMI services. Common code includes YANGs, translib infra, transformer infra, app modules and CVL infra. This commit brings all such common code from sonic-mgmt-framework repo to sonic-mgmt-common.

- How I did it
Moved yangs, translib, transformer, cvl and go library patch files from sonic-mgmt-framework repo. These files are removed from sonic-mgmt-framework. Both REST server code in sonic-mgmt-framework and gNMI code in sonic-telemetry are modified to access translib APIs from sonic-mgmt-common.
Implemented gomodule based go dependency management.

- How to verify it
Full build and incremental builds
Basic ACL and interface opreations through REST, KLISH CLI and gNMI
Gotest

- Description for the changelog
Moved YANGs, translib, transformer, cvl code from sonic-mgmt-framework to sonic-mgmt-common.

1) Moved yangs, translib, transformer, cvl and go library patch files
from sonic-mgmt-framework repo. Mgmt-framework base is f789b29.
These are used by both mgmt-framework and telemetry services.

2) Implemented gomodule based go dependency management. Uses vendoing
to create a private copy of the libraries under "vendor" directory and
all patches are applied on this copy. This happens automatically
during build; vendor copy is not committed to repo. New script
patches/apply.sh has been introduced to apply the patches. This can be
invoked from mgmt-framework and telemetry makefiles to patch their
respective vendor directories.

3) During build, two deb files are generated. No docker image is
generated for this repo.
    - sonic-mgmt-common_1.0.0_{arch}.deb
    - sonic-mgmt-common-codegen_1.0.0_{arch}.deb

4) sonic-mgmt-common.deb includes yangs, cvl schema and other
configuration files required by translib and cvl during runtime. Both
mgmt-framework and telemetry dockers will install it.

5) sonic-mgmt-common-codegen.deb includes source files generated by
ygot and yang code generators. When package cache is enabled sonic
build will compile the repo only when there are some changes. So code
generators may not be run always, but mgmt-framework and telemetry
repo compilation requires these generated source files. Such source
files are created by installing sonic-mgmt-common-codegen.deb on the
build slave docker itself. This package is not installed on switch.
CVL gotest cases require both main cvl schema files and additional
test shema files. Modified the makefile to copy the main schema files
to build/cvl/testdata/schema directory, which will be used as the
schema root by gotest.
@ghost
Copy link

ghost commented Jun 12, 2020

CLA assistant check
All CLA requirements met.

@renukamanavalan renukamanavalan merged commit 444aa9a into sonic-net:master Jun 13, 2020
@sachinholla sachinholla deleted the mgmt-reorg branch October 1, 2020 10:57
renukamanavalan pushed a commit that referenced this pull request Jan 12, 2021
…d new test cases addition (#39)

Adding Custom Validation Infrastructure
Unit Test files reorganization
Adding Test YANG Schemas
Adding Unit Test for new CVL APIs
Adding Unit Test for leafref, when, must expression evaluation
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.

2 participants