how to import a module in Yang
<p>I'm trying to build a CLI. I choose to use 'yang' to do so. I'm new to it and can't find out how to import existing moduls. As exemple I found a module for ospf on github (<a href="https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/1631/ietf-ospf.yang" rel="nofollow noreferrer">https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/1631/ietf-ospf.yang</a>) and I would like to import it in my own moduls. Can this be done? how?</p>

<p>EDIT1:</p>

<pre><code>module mininet {

 /* name space */
 namespace "http://tail-f.com/ns/example/mininet";
 prefix mininet;

 import ietf-ospf {
     prefix ospf;
     revision-date 2015-03-09
 }

 leaf area-id-type {
     type yang:area-id-type;
 }
}
</code></pre>

<p>So I tried to do it this way using Piotr Babij help. Unfortunately this isn't working. What do I need to change?
area-id-type is a typedef of ietf-ospf. The error I have is te following one:</p>

<pre><code>mininet.yang:12:3: error: trailing garbage after module
mininet.yang:12:3: error: unterminated statement
</code></pre>