use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId in project openflowplugin by opendaylight.
the class FlowCapableTopologyExporterTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
doReturn(mockTxChain).when(mockDataBroker).createTransactionChain(any(TransactionChainListener.class));
processor = new OperationProcessor(mockDataBroker);
topologyIID = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class, new TopologyKey(new TopologyId("flow:1")));
exporter = new FlowCapableTopologyExporter(processor, topologyIID);
executor.execute(processor);
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId in project openflowplugin by opendaylight.
the class FlowCapableTopologyProvider method start.
/**
* Gets called on start of a bundle.
*/
public void start() {
final TopologyKey key = new TopologyKey(new TopologyId(TOPOLOGY_ID));
final InstanceIdentifier<Topology> path = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class, key);
final FlowCapableTopologyExporter listener = new FlowCapableTopologyExporter(processor, path);
this.listenerRegistration = notificationService.registerNotificationListener(listener);
this.transactionChainManager = new TransactionChainManager(dataBroker, TOPOLOGY_PROVIDER);
this.transactionChainManager.activateTransactionManager();
this.transactionChainManager.initialSubmitWriteTransaction();
if (!isFlowTopologyExist(path)) {
transactionChainManager.writeToTransaction(LogicalDatastoreType.OPERATIONAL, path, new TopologyBuilder().setKey(key).build(), true);
transactionChainManager.submitTransaction();
}
LOG.info("FlowCapableTopologyProvider started");
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId in project openflowplugin by opendaylight.
the class DataTreeChangeListenerBase method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
doReturn(mockTxChain).when(mockDataBroker).createTransactionChain(any(TransactionChainListener.class));
processor = new OperationProcessor(mockDataBroker);
topologyIID = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class, new TopologyKey(new TopologyId("flow:1")));
terminationPointListener = new TerminationPointChangeListenerImpl(mockDataBroker, processor);
nodeChangeListener = new NodeChangeListenerImpl(mockDataBroker, processor);
executor.execute(processor);
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId in project bgpcep by opendaylight.
the class TunnelProviderDeployer method updateTunnelTopologyProvider.
private synchronized void updateTunnelTopologyProvider(final Topology topology) {
if (!filterPcepTopologies(topology.getTopologyTypes())) {
return;
}
final TopologyId topologyId = topology.getTopologyId();
final PCEPTunnelClusterSingletonService previous = this.pcepTunnelServices.remove(topology.getTopologyId());
closeTopology(previous, topologyId);
createTunnelTopologyProvider(topology);
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId in project bgpcep by opendaylight.
the class TunnelProgrammingTest method createNode.
private static Node createNode(final NodeId nodeId, final TpId tpId, final String ipv4Address) {
final TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
tpBuilder.setTpId(tpId);
tpBuilder.setKey(new TerminationPointKey(tpId));
tpBuilder.addAugmentation(TerminationPoint1.class, new TerminationPoint1Builder().setIgpTerminationPointAttributes(new IgpTerminationPointAttributesBuilder().setTerminationPointType(new IpBuilder().setIpAddress(Collections.singletonList(new IpAddress(new Ipv4Address(ipv4Address)))).build()).build()).build());
final NodeBuilder nodeBuilder = new NodeBuilder();
nodeBuilder.setNodeId(nodeId);
nodeBuilder.setKey(new NodeKey(nodeId));
nodeBuilder.setTerminationPoint(Lists.newArrayList(tpBuilder.build()));
final SupportingNode supportingNode = new SupportingNodeBuilder().setKey(new SupportingNodeKey(nodeId, new TopologyId("dummy"))).addAugmentation(SupportingNode1.class, new SupportingNode1Builder().setPathComputationClient(new PathComputationClientBuilder().setControlling(true).build()).build()).build();
nodeBuilder.setSupportingNode(Lists.newArrayList(supportingNode));
return nodeBuilder.build();
}
Aggregations