KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
yang-forge
★ 14
Open GitHub ↗
YANG package manager and runtime engine
Download README (.md)
Explore Similar Repositories
DeltaPwn
:
A js bot that can solve the multiple choice questions on the website http://www.deltamath.com.
ServiceAndDaemon
:
C++ application providing a cross platform way of creating a Windows Service or a Linux Daemon.
igg
:
iGG cydia repo source
introduction-to-javascript
:
No description available.
drg
:
Gem version automation with Bundler
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
yang-forge
?
Download (.md)
# yang-forge YANG package manager and runtime engine `yfc` is the command utility providing YANG model-driven application lifecycle management. It provides advanced abstractions on top of [yang-cc](http://github.com/corenova/yang-cc) for richer schema interactions and flexible runtime capabilities such as dynamic interface generation (cli, express, restjson, websockets). [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] This module is a special core generated using the [yang-cc](http://github.com/corenova/yang-cc) application core composition library based on [yang-forge-core.yang](yang-forge-core.yang) schema. This software is brought to you by [Corenova](http://www.corenova.com). We'd love to hear your feedback. Please feel free to reach me at <peter@corenova.com> anytime with questions, suggestions, etc. It is written primarily using [CoffeeScript](http://coffeescript.org) and runs on [Node.js](http://nodejs.org) and the **web browser**. ## Installation ```bash $ npm install -g yang-forge ``` You must have `node >= 0.10.28` as a minimum requirement to run `yang-forge`. package.json -> yang-forge-package -> package.yang ## Usage ``` Usage: yfc [options] [command] Commands: schema [options] [file] process a specific YANG schema file or string build [options] [file...] package the module(s) for deployment/publishing inspect [options] [core] inspect a given core package file to extract metadata run [options] [module...] runs one or more core(s) and module(s) deploy deploy core(s) into target endpoint (planned) info [options] [core] shows info about a published core from the registry (planned) search [keyword...] search the registry for cores matching keywords (planned) publish [options] publish package to upstream registry (planned) translate [options] [file] translates input configuration data according to available YANG schema(s) (planned) This module provides YANG package management and runtime engine operations Options: -h, --help output usage information -V, --version output the version number -v, --verbose increase verbosity --no-color disable color output ``` The `yfc` command-line interface is **runtime-generated** according to [yang-forge-core.yang](yang-forge-core.yang) schema definitions. Please refer to the schema section covering various `rpc` extension statements and sub-statement definitions for a reference regarding different types of command-line arguments, descriptions, and options processing syntax. The corresponding **actions** for each of the `rpc` extensions are *dynamically linked* by the `yang-cc` composer by inspecting the `lib` directory in the package. For comprehensive **usage documentation** around various CLI commands, please refer to the [YangForge Examples README](examples#readme). ## Troubleshooting When you encounter errors or issues while utilizing the `yfc` command line utility, you can set ENVIRONMENTAL variable `yang_debug=1` to get complete debug output of the execution log. ```bash $ yang_debug=1 yfc <some-command> ``` The output generated is very verbose and may or may not assist you in determining the root cause. However, when reporting an issue into the Github repository, it will be helpful to paste a snippet of the debug output for quicker resolution by the project maintainer. ## Available YANG features name | description | dependency --- | --- | --- [cli](src/yang-forge-core/feature/cli.coffee) | generates command-line interface | none [express](src/yang-forge-core/feature/express.coffee) | generates HTTP/HTTPS web server instance | none [restjson](src/yang-forge-core/feature/restjson.coffee) | generates REST/JSON web services interface | express [websocket](src/yang-forge-core/feature/websocket.coffee) | generates socket.io interface | express You can click on the *name* entry above for reference documentation on each feature module. ## API Here's an example for using this module: ```coffeescript yf = require 'yang-forge' yf.run 'express', 5050 # fire up express instance on port 5050 yf.run 'restjson' # bind restjson interface generator to express yf.run 'websocket' # bind socket.io to express ``` Since [YangForge](src/index.coffee) itself is a YANG schema ([yang-forge-core.yang](./yang-forge-core.yang)) **compiled** module, it is simply the `Core` object instance generated by the [yang-cc](http://github.com/corenova/yang-cc) module. You can also interact with the **yang-forge-core** module instance directly to *invoke* the various RPC methods available. ```coffeescript yf = require 'yang-forge' forge = yf.access 'yang-forge-core' # grab the yang-forge-core module forge.invoke 'build', arguments: [ 'foo.yang', 'bar.yang' ] .then (res) -> console.log res.get() ``` The above example will generate a new `composition` output similarly to what `yang-cc` produced. For more info on other RPC methods available, take a look at the [yang-forge-core.yang](./yang-forge-core.yang) schema. ## Major changes from prior 0.11.x branch Please note that the newly designed `YangForge` no longer contains native interfaces to **compiler** methods such as parse/load/compile/etc. In order to access previous capabilities, you can consider utilizing the **rpc schema** interface via the *invoke* mechanism or just use the underlying [yang-js](https://github.com/saintkepha/yang-js) or [yang-cc](https://github.com/corenova/yang-cc) modules directly. This design change is a result of modularizing the earlier `YangForge` project into three distinct components: name | description --- | --- [yang-js](https://github.com/saintkepha/yang-js) | YANG parser and compiler [yang-cc](https://github.com/corenova/yang-cc) | YANG model-driven application core composer [yang-forge](https://github.com/corenova/yang-forge) | YANG package manager and runtime engine Furthermore, previous YAML schema to represent a **forged** module (with dependencies and behaviors) for a target YANG schema has been *superceded* by the new `composition` and `specification` custom YANG extensions. Due to potential breaking changes and other considerations, the previous `yangforge` package has been renamed to `yang-forge` and the former package will be marked *deprecated* but preserved for the near future. ## License [Apache 2.0](LICENSE) [npm-image]: https://img.shields.io/npm/v/yang-forge.svg [npm-url]: https://npmjs.org/package/yang-forge [downloads-image]: https://img.shields.io/npm/dm/yang-forge.svg [downloads-url]: https://npmjs.org/package/yang-forge