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

Script to generate models for openconfig/public #47

Open
wenovus opened this issue Aug 26, 2022 · 0 comments
Open

Script to generate models for openconfig/public #47

wenovus opened this issue Aug 26, 2022 · 0 comments

Comments

@wenovus
Copy link
Contributor

wenovus commented Aug 26, 2022

Some might want to browse through historical models, or just to look at their local models in their local openconfig/public repo. Having a script to auto-generate it using the .spec.yml files would be convenient.

Script to generate aft models:

#!/bin/bash
cd ${GOPATH}/src/github.com/openconfig/public/release/models

NIDOCS="ni-docs"
mkdir ${NIDOCS}
pyang --plugindir ${GOPATH}/src/github.com/openconfig/oc-pyang/openconfig_pyang/plugins/ network-instance/openconfig-network-instance.yang aft/openconfig-aft-network-instance.yang -p ../../ -f docs --doc-format html --strip-ns --doc-title ni > ${NIDOCS}/docs.html
pyang --plugindir ${GOPATH}/src/github.com/openconfig/oc-pyang/openconfig_pyang/plugins/ network-instance/openconfig-network-instance.yang aft/openconfig-aft-network-instance.yang -p ../../ -f oc-jstree --oc-jstree-no-path > ${NIDOCS}/ni.html

cp -r ${GOPATH}/src/github.com/openconfig/oc-pyang/openconfig_pyang/plugins/templates/css ${NIDOCS}
cp -r ${GOPATH}/src/github.com/openconfig/oc-pyang/openconfig_pyang/plugins/templates/js ${NIDOCS}
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

No branches or pull requests

1 participant