Giter Club home page Giter Club logo

config-models's Introduction

config-models

Model Plugins for onos-config YANG Files compiled with YGOT loadable as Shared Object Libraries

Building the modules

The plugins can be built individually (use make help to see the target names), or altogether with make images.

Running

The plugins are loaded in Kubernetes by declaring them

  1. as additional (sidecar) containers in the onos-config Pod AND
  2. as a -modelPlugin option on the startup of onos-config

These are usually specified in the onos-config Helm Chart or in onit.

As the plugin containers startup in Kubernetes the default command is copylibandstay. This is a tiny program that copies the library in to a shared folder where onos-config can refer to it as a file e.g. /usr/local/lib/shared/devicesim.so.1.0.0

Extending

See the guide Extending onos-config with Model Plugins for more details.

Troubleshooting

There are some tips at the end of the Extending guide Troubleshooting

Additional notes

The first 3 plugins

  • testdevice-1.0.0
  • testdevice-2.0.0
  • devicesim-1.0.0

are used as Go module packages in their own right from inside the Unit tests of onos-config. For this reason each one has it's own go.mod.

The plugin

  • stratum-1.0.0

has its own go.mod to that it is ignored by the top level go.mod.

Also in future it is intended that the stratum_1_0_0 package will be generated at compile time from YANG, (using YGOT Generate) and removed from Git versioning

The main purpose of the top level go.mod is to provide a set of go modules (as vendor) to the Docker build container.

The versions of the packages in this top level go.mod must exactly match those of onos-config's go.mod, or the plugin will not be loadable by onos-config at run time.

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.