YANG model-driven CORD
One of the key objectives is to provide an emulation layer of the CORD platform for service developers to experience the CORD/XOS runtime environment from their local systems and perform rapid integrations of their target service features.
$ npm install -g yang-cord
The preferred installation is global for easy access to the
utility but can also be used as a dependency module to utilize the XOS
Controller and associated YANG models as part of your project.
For development/testing, clone from repo and initialize:
$ git clone https://github.com/corenova/yang-cord$ cd yang-cord$ npm install
$ npm start
The above example will import the various XOS extension modules and
start an instance of
yang-express middleware web
server listening on port 5000 with
--port is provided to specify the port to listen on, it can be used with:
$ npm start -- --port 3000
To run with test data/config, you can set the
NODE_ENV=test environmental variable:
$ NODE_ENV=test npm start
You can also use the provided
bin/xos CLI utility directly to start
an instance of the XOS Controller (it's implicitly used in
$ bin/xos -hUsage: xos [options]Options:-c, --config <filename> Use <filename> to retrieve configuration data-p, --port <number> Run XOS Controller on <port>
bin/xos CLI utility, you can have flexible control around
loading additional YANG modules dynamically during runtime, such as
etc. By default, it runs with
xos-controller only. If a given target
module requires other dependency modules, they will be loaded
dynamically (such as
xos-slice which is a dependency to
bin/xos CLI utility uses default configurations found in
config directory. To run it with test data and expose some
runtime debug output you can use environmental variables as follows:
$ NODE_ENV=test DEBUG=yang-express bin/xos cord-tenant cord-volt-service cord-vsg-service
Alternatively, you can specify the
--config option and load any
arbitrary configuration data.
During troubleshooting/debugging, it may be helpful to turn on much
more verbose debug output via setting
DEBUG=yang:* or even
DEBUG=*. It generates significant amount of debugging output, so it
is recommended to only increase the verbosity to diagnose specific
For more information on advanced usage, be sure to take a look at the References listed below.
This module is a YANG model-driven data module, which is essentially a composition of the YANG Schema and Control Logic Binding. It is designed to model the XOS/CORD platform and can be utilized with or without any actual infrastructure dependencies.
- Using Model API
- Storing Data
- Expressing Interfaces
- Automating Documentation
There are a number of YANG modules inside this repository, with the xos-controller.yang serving as the primary module. The other modules serve a supporting role by dynamically augmenting the XOS Controller with additional capabilties as they are conditionally loaded into the runtime XOS Controller instance.
For additional information on working with XOS/CORD YANG Models, please refer to the Modeling Conventions guide.
This repository contains several pre-integrated packages as reference examples. Although they are available inside this repository tree, they have been fully packaged as independent modules and you can perform dev/test/deploy workflows within each of their respective package folders. It's recommended to first read the Composing Services documentation before browsing the various packages to better understand the contained assets.
To run the test suite, first install the dependencies, then run
$ npm install $ npm test
Mocha test suite is currently under development...