-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I tried to build a netsim that has something like this for the template
<main namespace="http://main.com/ns/yang/main"
<submain namespace="http://main.com/ns/yang/sub-main">
.....
</submain>
</main>
Is it possible to have this name space? I tried by using augment but seems the submain module is not loaded in main module. I can't find it when setting the cli
in my yang
main module yang
module Main {
namespace "http://main.com/ns/yang/main";
prefix main;
import ietf-inet-types { prefix inet; }
revision 2025-09-04 {
description "Use augmentation";
}
grouping native {
container native {
container interface {
container GigabitEthernet {
list name {
key "name";
leaf name {
type string;
description "Interface name suffix (e.g., 0/0/0)";
}
leaf description {
type string;
description "Interface description";
}
}
}
and this is the inner module yang
module submain {
namespace "http://main.com/ns/yang/sub-main;
prefix sub-main;
grouping config-l2-grouping {
list neighbor {
key "ip";
description "Neighbor PE for VFI";
leaf ip {
type string;
description "Neighbor IP address";
}
leaf pw-id {
type string;
description "Pseudowire ID (e.g., concatenation of bd and vlanid)";
}
leaf encapsulation {
type enumeration {
enum mpls;
}
description "Encapsulation type";
default mpls;
}
}
}
}
augment "/main:native/main:interface/main:GigabitEthernet" {
container {
........................
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels