use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.neutron.router.dpns.RouterDpnList in project netvirt by opendaylight.
the class NeutronvpnUtils method getAllRouterDpnList.
public Set<RouterDpnList> getAllRouterDpnList(BigInteger dpid) {
Set<RouterDpnList> ret = new HashSet<>();
InstanceIdentifier<NeutronRouterDpns> routerDpnId = InstanceIdentifier.create(NeutronRouterDpns.class);
Optional<NeutronRouterDpns> neutronRouterDpnsOpt = MDSALUtil.read(dataBroker, LogicalDatastoreType.OPERATIONAL, routerDpnId);
if (neutronRouterDpnsOpt.isPresent()) {
NeutronRouterDpns neutronRouterDpns = neutronRouterDpnsOpt.get();
List<RouterDpnList> routerDpnLists = neutronRouterDpns.getRouterDpnList();
for (RouterDpnList routerDpnList : routerDpnLists) {
if (routerDpnList.getDpnVpninterfacesList() != null) {
for (DpnVpninterfacesList dpnInterfaceList : routerDpnList.getDpnVpninterfacesList()) {
if (dpnInterfaceList.getDpnId().equals(dpid)) {
ret.add(routerDpnList);
}
}
}
}
}
return ret;
}
Aggregations