corenova / yang-forge

YANG package manager and runtime engine
Apache License 2.0
14 stars 8 forks source link

Error running yfc #37

Open ramukima opened 8 years ago

ramukima commented 8 years ago

After "npm install -g yang-forge" as root, and running yfc, I get this error -

root# yfc /usr/local/lib/node_modules/yang-forge/lib/index.js:9 return this.compose('yang-forge-core'); ^

TypeError: this.compose is not a function at Composer. (/usr/local/lib/node_modules/yang-forge/lib/index.js:9:17) at Object. (/usr/local/lib/node_modules/yang-forge/lib/index.js:10:6) at Object. (/usr/local/lib/node_modules/yang-forge/lib/index.js:12:4) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object. (/usr/local/lib/node_modules/yang-forge/bin/yfc:3:1) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.runMain (module.js:575:10) at run (bootstrap_node.js:352:7) at startup (bootstrap_node.js:144:9) at bootstrap_node.js:467:3

OSX-10:~ root#

sekur commented 8 years ago

Thanks for flagging this issue. We're currently planning an update to yang-forge to leverage latest development in yang-js and yang-express modules and will have a newer build published shortly. I'll update this ticket once new package ready for testing.

Thanks! On Fri, Aug 5, 2016 at 7:09 AM ramukima notifications@github.com wrote:

After "npm install -g yang-forge" as root, and running yfc, I get this error -

root# yfc /usr/local/lib/node_modules/yang-forge/lib/index.js:9 return this.compose('yang-forge-core'); ^

TypeError: this.compose is not a function at Composer. (/usr/local/lib/node_modules/yang-forge/lib/index.js:9:17) at Object. (/usr/local/lib/node_modules/yang-forge/lib/index.js:10:6) at Object. (/usr/local/lib/node_modules/yang-forge/lib/index.js:12:4) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object. (/usr/local/lib/node_modules/yang-forge/bin/yfc:3:1) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.runMain (module.js:575:10) at run (bootstrap_node.js:352:7) at startup (bootstrap_node.js:144:9) at bootstrap_node.js:467:3

OSX-10:~ root#

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/corenova/yang-forge/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6KbLb7z64g5nvErrAcFerJr7gL5Etqks5qc0P9gaJpZM4Jdt5G .

Peter Lee Corenova Technologies +1 310 400 6450 peter@corenova.com

jfulreader commented 8 years ago

Got same error with existing yang-forge code. Is there any update on when the new code will be available? Thanks

sekur commented 8 years ago

I expect to publish an update in about a week. It'd be helpful to know what features from YF you're interested in that is not provided by yang-js/yang-express so I can prioritize those capabilities in the upcoming update.

jfulreader commented 8 years ago

Thanks for the quick reply. Initially I am mainly looking for functionality that would allow me to plugin different data providers underneath the northbound APIs. Later am looking to use the Yang model registry and composition capabilities.

-----------------------------------------From: "Peter K. Lee" 

To: "corenova/yang-forge" Cc: "jfulreader", "Manual" Sent: Wed, 07 Sep 2016 11:52:15 -0700 Subject: Re: [corenova/yang-forge] Error running yfc (#37)

I expect to publish an update in about a week. It'd be helpful to

know what features from YF you're interested in that is not provided by yang-js/yang-express so I can prioritize those capabilities in the upcoming update.

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/corenova/yang-forge","title":"corenova/yang-forge","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open [3] in GitHub","url":"https://github.com/corenova/yang-forge"}},"updates":{"snippets":[{"icon":"PERSON","message":"@saintkepha [4] in #37: I expect to publish an update in about a week. It'd be helpful to know what features from YF you're interested in that is not provided by yang-js/yang-express so I can prioritize those capabilities in the upcoming update. "}],"action":{"name":"View Issue","url":"https://github.com/corenova/yang-forge/issues/37#issuecomment-245380119"}}} [5]

Links:

[1] https://github.com/corenova/yang-forge/issues/37#issuecomment-245380119 [2] https://github.com/notifications/unsubscribe-auth/AGxYw-Yj3xNmBg04D0Pbc4av71KghVl-ks5qnwffgaJpZM4Jdt5G [3] https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png [4] https://github.com/corenova/yang-forge [5] https://github.com/corenova/yang-forge/issues/37#issuecomment-245380119

sekur commented 8 years ago

Got it. In that case, I think you'd find an upcoming "yang-store" module more interesting. I haven't published it yet but the idea is to define ORM style data backend providers using YANG modules. What types of data providers did you have in mind?

jfulreader commented 8 years ago

Mine would be REST or NETCONF to agents running on other hosts.

-----------------------------------------From: "Peter K. Lee" 

To: "corenova/yang-forge" Cc: "jfulreader", "Manual" Sent: Wed, 07 Sep 2016 12:49:00 -0700 Subject: Re: [corenova/yang-forge] Error running yfc (#37)

Got it. In that case, I think you'd find an upcoming "yang-store"

module more interesting. I haven't published it yet but the idea is to define ORM style data backend providers using YANG modules. What types of data providers did you have in mind?

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/corenova/yang-forge","title":"corenova/yang-forge","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open [3] in GitHub","url":"https://github.com/corenova/yang-forge"}},"updates":{"snippets":[{"icon":"PERSON","message":"@saintkepha [4] in #37: Got it. In that case, I think you'd find an upcoming "yang-store" module more interesting. I haven't published it yet but the idea is to define ORM style data backend providers using YANG modules. What types of data providers did you have in mind?"}],"action":{"name":"View Issue","url":"https://github.com/corenova/yang-forge/issues/37#issuecomment-245395532"}}} [5]

Links:

[1] https://github.com/corenova/yang-forge/issues/37#issuecomment-245395532 [2] https://github.com/notifications/unsubscribe-auth/AGxYw-EzqpcXFswjyRprl6j22SBC98VJks5qnxUsgaJpZM4Jdt5G [3] https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png [4] https://github.com/corenova/yang-forge [5] https://github.com/corenova/yang-forge/issues/37#issuecomment-245395532

ramukima commented 8 years ago

Exactly what I am looking for as well, and for that, the store API must go beyond connect/import. If the store APIs align to -

  1. set/get for leaf
  2. iterator, get-next, set for list

or alike, things would perfectly fit for someone to be able to implement their own store provider implementation for a given YANG module. Further better will be to allow hooking up store at individual datastructure levels e.g. container/list/leaf etc. Imagine a Person object where the name/age comes from one datastore while the address/phone number comes from another datastore.

Not sure if this is what you planned for 'Store' module, looking at current code, it does not appear to be. May be you can describe your plan for Store module in more details, and that will help correct few of my assumptions.

sekur commented 8 years ago

@jfulreader - in that case, yang-express should be sufficient I think.

@ramukima - that's an interesting approach. I wasn't planning on many-to-one (multi source to a model) but rather one-to-many (a model to multi source) type implementation. Also many-to-many as in different models coming from different sources (but not at the level of schema tree elements as you describe). I've just split off yang-store as a separate module and going through the appropriate "rpc" operations that should be expressed. It'd be great to get further input on it.