npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yang-cord

v1.3.1

Published

YANG model-driven CORD

Downloads

51

Readme

YANG model-driven CORD

This implementation is an on-going effort to create YANG data models for the CORD project and deliver flexible service compositions.

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.

You may contact Larry Peterson [email protected] and Peter Lee [email protected] to learn more about this initiative and find out how you can help.

Installation

$ npm install -g yang-cord

The preferred installation is global for easy access to the xos 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

Quick Start

$ 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 restjson and openapi features enabled.

An option --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 npm start).

$ bin/xos -h
  Usage: xos [options]

  Options:
    -c, --config <filename>  Use <filename> to retrieve configuration data (default: uses 'config' directory)
    -p, --port <number>      Run XOS Controller on <port>

Using the bin/xos CLI utility, you can have flexible control around loading additional YANG modules dynamically during runtime, such as cord-tenant, cord-volt-service, cord-vsg-service, xos-slice, 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 cord-vsg-service).

The 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 runtime errors.

For more information on advanced usage, be sure to take a look at the References listed below.

References

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.

For Developers:

YANG Models

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.

Service Packages

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.

Tests

To run the test suite, first install the dependencies, then run npm test.

$ npm install
$ npm test

Mocha test suite is currently under development...

LICENSE

Apache 2.0