private InstanceIdentifier<TerminationPoint> provideIIToTopologyTerminationPoint(final TpId terminationPointIdInTopology, final InstanceIdentifier<FlowCapableNodeConnector> iiToNodeInInventory) { NodeId nodeIdInTopology = provideTopologyNodeId(iiToNodeInInventory); if (terminationPointIdInTopology != null && nodeIdInTopology != null) { InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> iiToTopologyNode = provideIIToTopologyNode(nodeIdInTopology); return iiToTopologyNode.builder().child(TerminationPoint.class, new TerminationPointKey(terminationPointIdInTopology)).build(); } else { LOG.debug("Value of termination point ID in topology is null. Instance identifier to topology can't be built"); return null; } }
public OfOverlayL3ContextListener(DataBroker dataProvider, SwitchManager swManager) { super(dataProvider); this.swManager = checkNotNull(swManager); registerDataTreeChangeListener(new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier .builder(Endpoints.class).child(EndpointL3.class).augmentation(OfOverlayL3Context.class).build())); }
public void delHwmData(String secKey) { HighwatermarkKey sechwmKey = new HighwatermarkKey(secKey); InstanceIdentifier<Highwatermark> secHwmId = InstanceIdentifier.builder(HWM.class).child(Highwatermark.class, sechwmKey).toInstance(); WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction(); writeTransaction.delete(LogicalDatastoreType.OPERATIONAL, secHwmId); writeTransaction.commit(); LOG.debug("Data Store Entry is deleted for key ", secKey); }
public static InstanceIdentifier<FlowCapableNode> flowCapableNode(String nodeId) { return InstanceIdentifier .builder(Nodes.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class, new NodeKey(new NodeId(nodeId))) .augmentation(FlowCapableNode.class) .build(); }
public InstanceIdentifier<Flows> apply() { InstanceIdentifierBuilder<? extends Object> _builder = InstanceIdentifier.builder(); InstanceIdentifierBuilder<Flows> _node = _builder.<Flows>node(Flows.class); InstanceIdentifier<Flows> _instance = _node.toInstance(); return _instance; } }.apply();
public TerminationPointChangeListenerImpl(final DataBroker dataBroker, final OperationProcessor operationProcessor) { super(operationProcessor, dataBroker, InstanceIdentifier.builder(Nodes.class).child(Node.class) .child(NodeConnector.class).augmentation(FlowCapableNodeConnector.class).build()); this.operationProcessor = operationProcessor; }
private static InstanceIdentifier<Table> generateFlowTableInstanceIdentifier(final NodeConnectorRef nodeConnectorRef, final TableKey flowTableKey) { return generateNodeInstanceIdentifier(nodeConnectorRef).builder() .augmentation(FlowCapableNode.class) .child(Table.class, flowTableKey) .build(); } private static InstanceIdentifier<Node> generateNodeInstanceIdentifier(final NodeConnectorRef nodeConnectorRef) {
protected InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> provideIIToTopologyNode( final NodeId nodeIdInTopology) { org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey nodeKeyInTopology = new org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey( nodeIdInTopology); return II_TO_TOPOLOGY .builder() .child(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node.class, nodeKeyInTopology).build(); }
/** * {@inheritDoc} */ @Override protected InstanceIdentifier<FlowCapableNodeConnector> getWildcardPath() { return InstanceIdentifier.builder(Nodes.class).child(Node.class). child(NodeConnector.class). augmentation(FlowCapableNodeConnector.class).build(); }
public ResolvedPolicyClassifierListener(DataBroker dataProvider, OFStatisticsManager ofStatsManager) { super(dataProvider); this.ofStatsManager = checkNotNull(ofStatsManager); registerDataTreeChangeListener(new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.builder(ResolvedPolicies.class).child(ResolvedPolicy.class).build())); }
/** * Return path to the MAC mapping that maps the specified L2 host. * * @param mv A {@link MacVlan} instance that specifies the L2 host. * @return Path to the MAC mapping that maps the specified L2 host. */ public static InstanceIdentifier<MacMapAllowed> getAllowedPath(MacVlan mv) { return InstanceIdentifier.builder(VtnMappings.class). child(MacMapAllowed.class, new MacMapAllowedKey(mv.toString())). build(); }
/** * Return the instance identifier for the configuration container in the * target VTN. * * @param ident The identifier for the target VTN. * @return The instance identifier for the vtenant-config. */ @Override protected InstanceIdentifier<VtenantConfig> getConfigPath( VTenantIdentifier ident) { return ident.getIdentifierBuilder().child(VtenantConfig.class).build(); }
/** * Convert a given topology link ID into an instance identifier of * ignored inter-switch link. * * @param lid A topology link ID. * @return An instance identifier for a ignored link. */ public static InstanceIdentifier<IgnoredLink> toIgnoredLinkIdentifier( LinkId lid) { return InstanceIdentifier.builder(IgnoredLinks.class). child(IgnoredLink.class, new IgnoredLinkKey(lid)).build(); }
/** * Convert a given topology link ID into an instance identifier of * VTN topology link. * * @param lid A topology link ID. * @return An instance identifier for a VTN topology link. */ public static InstanceIdentifier<VtnLink> toVtnLinkIdentifier(LinkId lid) { return InstanceIdentifier.builder(VtnTopology.class). child(VtnLink.class, new VtnLinkKey(lid)).build(); }
public static short getVlanId(String interfaceName, DataBroker broker) { InstanceIdentifier<Interface> id = InstanceIdentifier.builder(Interfaces.class) .child(Interface.class, new InterfaceKey(interfaceName)).build(); Optional<Interface> ifInstance = MDSALUtil.read(LogicalDatastoreType.CONFIGURATION, id, broker); if (ifInstance.isPresent()) { IfL2vlan vlanIface =ifInstance.get().getAugmentation(IfL2vlan.class); short vlanId = vlanIface.getVlanId() == null ? 0 : vlanIface.getVlanId().getValue().shortValue(); return vlanId; } return -1; }
/** * @param nodeConnectorRef * @param flowTableKey * @return */ public static InstanceIdentifier<Table> generateFlowTableInstanceIdentifier(final NodeConnectorRef nodeConnectorRef, final TableKey flowTableKey) { return generateNodeInstanceIdentifier(nodeConnectorRef).builder() .augmentation(FlowCapableNode.class) .child(Table.class, flowTableKey) .build(); }
InstanceIdentifier<Adjacencies> getAdjListPath(String vpnInterfaceName) { return InstanceIdentifier.builder(VpnInterfaces.class) .child(VpnInterface.class, new VpnInterfaceKey(vpnInterfaceName)).augmentation( Adjacencies.class).build(); }
private static InstanceIdentifier<Flow> createFlowPath(FlowBuilder flowBuilder, NodeBuilder nodeBuilder) { return InstanceIdentifier.builder(Nodes.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class, nodeBuilder.getKey()) .augmentation(FlowCapableNode.class) .child(Table.class, new TableKey(flowBuilder.getTableId())) .child(Flow.class, flowBuilder.getKey()).build(); }
private static InstanceIdentifier<Flow> createFlowIid(Flow flow, InstanceIdentifier<Node> nodeIid) { return nodeIid.builder() .augmentation(FlowCapableNode.class) .child(Table.class, new TableKey(flow.getTableId())) .child(Flow.class, new FlowKey(flow.getId())) .build(); }