/** * Creates a path for particular flow, by appending flow-specific information * to table path. * * @param table the table iid * @param flowKey the flow key * @return the {@link InstanceIdentifier} */ public static InstanceIdentifier<Flow> createFlowPath(final InstanceIdentifier<Table> table, final FlowKey flowKey) { return table.child(Flow.class, flowKey); }
public NeutronLoadBalancerPoolChangeListener(DataBroker db){ this.db = db; InstanceIdentifier<Pool> path = InstanceIdentifier .create(Neutron.class) .child(Pools.class) .child(Pool.class); LOG.debug("Register listener for Neutron Load Balancer Pool model data changes"); registration = this.db.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION, path, this, AsyncDataBroker.DataChangeScope.ONE); }
public void register(final EventSource eventSource) { final NodeKey nodeKey = eventSource.getSourceNodeKey(); final KeyedInstanceIdentifier<Node, NodeKey> sourcePath = EVENT_SOURCE_TOPOLOGY_PATH.child(Node.class, nodeKey); final Registration reg = rpcRegistry.registerRpcImplementation(EventSourceService.class, eventSource, Collections.singleton(sourcePath)); routedRpcRegistrations.put(nodeKey, reg); insert(sourcePath); }
public static InstanceIdentifier<Topology> createTopologyInstanceIdentifier() { return InstanceIdentifier .create(NetworkTopology.class) .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)); }
/** * Generates an Instance Identifier for the OVSDB topology ovsdb:1. * @return An Instance Identifier for the OVSDB topology ovsdb:1 */ public static InstanceIdentifier<Topology> getOvsdbTopologyIid() { InstanceIdentifier<Topology> topoPath = InstanceIdentifier .create(NetworkTopology.class) .child(Topology.class, new TopologyKey(UnimgrConstants.OVSDB_TOPOLOGY_ID)); return topoPath; }
private static void updateSessions(WriteTransaction tx, Collection<Session> sessions) { for (Session session : sessions) { final InstanceIdentifier<Session> sessionPath = SESSIONS_INSTANCE_IDENTIFIER.child(Session.class, session.getKey()); tx.put(LogicalDatastoreType.OPERATIONAL, sessionPath, session); } } }
public AuthenticationKeyDataListener(DataBroker broker, IMappingSystem mapSystem) { setBroker(broker); setMappingSystem(mapSystem); setPath(InstanceIdentifier.create(MappingDatabase.class).child(VirtualNetworkIdentifier.class) .child(AuthenticationKey.class)); LOG.trace("Registering AuthenticationKey listener."); registerDataChangeListener(); }
private void registerListner(final EventSourceTopology eventSourceTopology) { this.listenerRegistration = eventSourceTopology.getDataBroker().registerDataTreeChangeListener( DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL, EventSourceTopology.EVENT_SOURCE_TOPOLOGY_PATH.child(Node.class)), this); }
private InstanceIdentifier<Link> getEvcTopologyPath() { final InstanceIdentifier<Link> evcPath = InstanceIdentifier .create(NetworkTopology.class) .child(Topology.class, new TopologyKey(UnimgrConstants.EVC_TOPOLOGY_ID)) .child(Link.class); return evcPath; }
public static InstanceIdentifier<Node> createInstanceIdentifier(NodeId nodeId) { return InstanceIdentifier .create(NetworkTopology.class) .child(Topology.class, new TopologyKey(OVSDB_TOPOLOGY_ID)) .child(Node.class,new NodeKey(nodeId)); }
public static Optional<Node> sourceNode(final ReadTransaction t, final InstanceIdentifier<Topology> topology, final Link link) throws ReadFailedException { return t.read(LogicalDatastoreType.OPERATIONAL, topology.child(Node.class, new NodeKey(link.getSource().getSourceNode()))).checkedGet(); } }
private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.StaleFlow> getStaleFlowInstanceIdentifier(StaleFlow staleFlow, InstanceIdentifier<FlowCapableNode> nodeIdent) { return nodeIdent .child(Table.class, new TableKey(staleFlow.getTableId())) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.StaleFlow.class, new StaleFlowKey(new FlowId(staleFlow.getId()))); } }
public static InstanceIdentifier<TerminationPoint> createLogicPortIId(FabricId fabricId, NodeId nodeId, TpId tpid) { return InstanceIdentifier.create(NetworkTopology.class) .child(Topology.class, new TopologyKey(new TopologyId(fabricId))) .child(Node.class, new NodeKey(nodeId)) .child(TerminationPoint.class, new TerminationPointKey(new TpId(tpid))); }