Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import path declaration #67

Open
rgaglian opened this issue Mar 4, 2016 · 4 comments
Open

import path declaration #67

rgaglian opened this issue Mar 4, 2016 · 4 comments

Comments

@rgaglian
Copy link

rgaglian commented Mar 4, 2016

Hi,

Using IDE 1.1.1.

In an import statement, I am getting "Not existing module imported". How can I set the path to the module to be imported? BTW, the .yang file to import is not part of the same project but part of an external application.

Thanks!

@davidmichaelkarr
Copy link
Contributor

Wow. Someone else is looking at this. Good to see. If you don't mind, please contact me offline from this. If possible, I'd like to know a little bit about what you're doing with Yang, in general. I'm attempting to move the development of this project forward in a fork.

Ideally, import candidates are found through Maven dependencies, and the maven-yang-plugin will expect the jar file to have a "META-INF/yang" folder containing yang files. For instance, if you have the opendaylight repos registered, and you set a dependency for "org.opendaylight.yangtools.model:ietf-yang-types:someversion" (abbreviated GAV notation), then that will make the "ietf-yang-types" module available to the compiler (you also have to set the "inspectDependencies" flag to true in the POM, which in my POV should have defaulted to true).

If your module is not currently available in a Maven dependency somewhere, you'll likely have to copy it into your project. I considered the idea of somehow specifying github urls in the project, to get import candidates from, but I'm not going to go down that road until I get real requirements feedback.

@rgaglian
Copy link
Author

rgaglian commented Mar 9, 2016

Hi David,

I am a user of Cisco NSO product and I do extensive YANG editing. I was just checking new IDEs available after the renewal buzz on YANG. It would be great if you could add the option of using the tool to edit YANG files without needing a Maven environment as this is not needed for NSO (all compiling is done by the tool). For my specific problem, what is missing is a way to add library information for the internal compiler.

Cheers!
Roque

@htam-net
Copy link

I'm also interested by this.

Sincerely yours, Mathieu.

@davidmichaelkarr
Copy link
Contributor

You do not need to "provide" a Maven environment in order to use Yang IDE. If you don't want to get your imports from Maven artifacts, then copy your import files directly into your project. The Yang IDE may use Maven, but when you install Eclipse, it comes with an embedded instance of Maven, so you don't have to install it separately, and the Yang IDE automatically uses that instance if you don't override it.

Note that this project has been forked to be part of the OpenDaylight project. Using Yang IDE does not require that you use OpenDaylight for your work, it simply uses the OpenDaylight Yangtools parser to parse Yang files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants