use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.inter.vpn.link.rev160311.InterVpnLinkStatesBuilder in project netvirt by opendaylight.
the class InterVpnLinkLocatorTest method setUp.
@Before
public void setUp() throws Exception {
dataBroker = getDataBroker();
// Creating both empty containers: InterVpnLinks and InterVpnLinkStates
WriteTransaction writeTx = dataBroker.newWriteOnlyTransaction();
writeTx.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.builder(InterVpnLinks.class).build(), new InterVpnLinksBuilder().setInterVpnLink(Collections.emptyList()).build(), true);
writeTx.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.builder(InterVpnLinkStates.class).build(), new InterVpnLinkStatesBuilder().setInterVpnLinkState(Collections.emptyList()).build(), true);
writeTx.submit().checkedGet();
interVpnLinkCache = new InterVpnLinkCacheImpl(dataBroker);
interVpnLinkCache.initialFeed();
// Prepare
populateL3Vpns(dataBroker, L3VpnTestCatalog.ALL_VPNS);
InterVpnLinkTestCatalog.populateIvpnLinks(dataBroker, ALL_IVPN_LINKS);
for (InterVpnLinkDataComposite ivl : ALL_IVPN_LINKS) {
interVpnLinkCache.addInterVpnLinkToCaches(ivl.getInterVpnLinkConfig());
interVpnLinkCache.addInterVpnLinkStateToCaches(ivl.getInterVpnLinkState());
}
// SUT
sut = new InterVpnLinkLocator(dataBroker, interVpnLinkCache);
}
Aggregations