It cannot cross reference between two yang

55 views
Skip to first unread message

iflove...@gmail.com

unread,
May 27, 2015, 1:31:47 AM5/27/15
to neto...@googlegroups.com
Hi,

I have two yang, aaa and bbb, and I want to bbb refers to aaa.

<aaa.yang>
module aaa {
namespace "urn:test:aaa";
prefix a;

container aaa-settings {
leaf name {
type string {
length "1..63";
}
}
}
}

<bbb.yang>
module bbb {
namespace "urn:test:bbb";
prefix b;

import aaa { prefix a; }

container bbb-settings {
leaf aaa_ref {
type leafref {
path "/a:aaa-settings/a:name";
}
}
}
}

But I can add a aaa_ref even if the a:name is not existed.

Is the bbb.yang right?

Or is there anything I missed?

Thank,
Severa
Reply all
Reply to author
Forward
0 new messages