Giter Club home page Giter Club logo

config-models's Introduction

config-models

This repository contains configuration model compiler and a few sample configuration models.

The config model compiler operates as a docker image that can be run on a volume where the model meta data and the desired model YANG files are contained as inputs. The compiler will produce a set of outputs from which a docker image can be built and can be started as a sidecar to onos-config. The outputs include generated Go code used for validating configurations, generated main and NB API that is used by the onos-config.

This structure allows configuration models to be hosted at arbitrary locations, while providing the neccessary toolchain conveniently contained wihin the compiler docker image.

Building model compiler image

To build the configuration model compiler, run:

make model-compiler-docker 

The above will compile and assemble the compiler docker image.

Sample models

The repository also include several sample configuration models located in the models directory and serving to demonstrate the structure of the configuration models.

  • devicesim-1.0.x
  • testdevice-1.0.x
  • testdevice-2.0.x

Building sample models

Building configuration models is easy. For example, to generate the artifacts for the devicesim-1.0.0 configuration model, run the following:

docker run -v $(pwd)/models/devicesim-1.0.x:/config-model onosproject/model-compiler:latest

Afterwards, to compile and assemble the configuration model docker image, simply run:

cd models/devicesim-1.0.x && make

config-models's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

config-models's Issues

how to load stratum plugin

Hi, I want to load stratum plugin in onos-config.
I follow the steps at https://docs.onosproject.org/onos-config/docs/modelplugin/ .
But I can not find anyone of the .env files.
Now, I use 'make kind' in config-models, no error.
But there are only two TestDevice and Devicesim, no stratum, when I used 'onos config get plugins' in onon_cli.
Did I forget some steps, or is there other instruction about loading plugin?
Thanks a lot!

testdevice model plugin cannot be initialized

I was doing some tests and I noticed testdevice-2.0.0 model cannot be initialized. Something to investigate later.

panic: schema error: could not unzip the schema; json: cannot unmarshal object into Go struct field ListAttr.Dir.Dir.ListAttr.MaxElements of type uint64

goroutine 1 [running]:
github.com/onosproject/config-models/modelplugin/testdevice-2.0.0/testdevice_2_0_0.init.0()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.