Skip to content

Script to generate models for openconfig/public #47

@wenovus

Description

@wenovus

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}

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