Hi,
Given the following YANG model:
list site {
key id;
leaf id {
type string;
}
leaf internal-vpn-id {
type leafref {
path "/vpn/internal-vpn-id";
}
}
container access {
leaf poi-id {
type leafref {
path "deref(../../internal-vpn-id)/../poi/poi-id";
}
}
}
}
list vpn {
key internal-vpn-id;
leaf internal-vpn-id {
type string;
}
list poi {
key poi-id;
leaf poi-id {
type string;
}
list interface {
key "device interface-id";
leaf device {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
leaf interface-id {
type string;
}
}
}
}
container selection {
leaf site-select {
type leafref {
path "/site/id";
}
}
leaf device-select {
type leafref {
path "/vpn/poi/interface/device";
}
}
}
I´d like to be able to filter out and only display under the container "selection" all the devices that are inside a particular site and VPN and PoI. As you see from above, a Site references to a VPN and within a VPN there are multiple PoIs and inside a PoI many devices. So what I want to see it´s just all the devices that belongs to a Site and PoI that are stored in the VPN container. What would be the best way to get that information? Thanks in advance
Regards
Álvaro