本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode类的典型用法代码示例。如果您正苦于以下问题:Java FlowCapableNode类的具体用法?Java FlowCapableNode怎么用?Java FlowCapableNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FlowCapableNode类属于org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819包,在下文中一共展示了FlowCapableNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: remove
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
@Override
protected void remove(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode dataObjectModification) {
NodeKey nodeKey = key.firstKeyOf(Node.class);
BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
if (!aclDataUtil.doesDpnHaveAclInterface(dpnId)) {
// serialize ACL pool deletion per switch
jobCoordinator.enqueueJob(String.valueOf(dpnId), () -> {
this.aclServiceUtils.deleteAclIdPools(dpnId);
return Collections.emptyList();
});
LOG.debug("On FlowCapableNode remove event, ACL pools for dpid: {} are deleted.", dpnId);
} else {
LOG.info("On FlowCapableNode remove event, ACL pools for dpid: {} are not deleted "
+ "because ACL ports are associated.", dpnId);
}
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:AclNodeListener.java
示例2: removeTunnelTableEntry
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
private void removeTunnelTableEntry(BigInteger dpId, long label, WriteTransaction tx) {
FlowEntity flowEntity;
LOG.debug("remove terminatingServiceActions called with DpnId = {} and label = {}", dpId, label);
List<MatchInfo> mkMatches = new ArrayList<>();
// Matching metadata
mkMatches.add(new MatchTunnelId(BigInteger.valueOf(label)));
flowEntity = MDSALUtil.buildFlowEntity(dpId,
NwConstants.INTERNAL_TUNNEL_TABLE,
getTableMissFlowRef(dpId, NwConstants.INTERNAL_TUNNEL_TABLE, (int) label),
5, String.format("%s:%d", "TST Flow Entry ", label), 0, 0,
COOKIE_TUNNEL.add(BigInteger.valueOf(label)), mkMatches, null);
Node nodeDpn = FibUtil.buildDpnNode(flowEntity.getDpnId());
FlowKey flowKey = new FlowKey(new FlowId(flowEntity.getFlowId()));
InstanceIdentifier<Flow> flowInstanceId = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flowEntity.getTableId())).child(Flow.class, flowKey).build();
tx.delete(LogicalDatastoreType.CONFIGURATION, flowInstanceId);
LOG.debug("Terminating service Entry for dpID {} : label : {} removed successfully", dpId, label);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:21,代码来源:VrfEntryListener.java
示例3: getGroup
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
private Group getGroup(GroupBuilder groupBuilder, NodeBuilder nodeBuilder) {
InstanceIdentifier<Group> path1 = InstanceIdentifier.builder(Nodes.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class,
nodeBuilder.getKey())
.augmentation(FlowCapableNode.class).child(Group.class, new GroupKey(groupBuilder.getGroupId()))
.build();
DataBroker databroker = getDataBroker();
ReadOnlyTransaction readTx = databroker.newReadOnlyTransaction();
try {
Optional<Group> data = readTx.read(LogicalDatastoreType.CONFIGURATION, path1).get();
if (data.isPresent()) {
return data.get();
}
} catch (InterruptedException | ExecutionException e) {
LOG.error(e.getMessage(), e);
}
LOG.debug("Cannot find data for Group " + groupBuilder.getGroupName());
return null;
}
开发者ID:opendaylight,项目名称:faas,代码行数:21,代码来源:PipelineL2Forwarding.java
示例4: writeGroup
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
private void writeGroup(GroupBuilder groupBuilder, NodeBuilder nodeBuilder) {
DataBroker databroker = getDataBroker();
ReadWriteTransaction modification = databroker.newReadWriteTransaction();
InstanceIdentifier<Group> path1 = InstanceIdentifier.builder(Nodes.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class,
nodeBuilder.getKey())
.augmentation(FlowCapableNode.class).child(Group.class, new GroupKey(groupBuilder.getGroupId()))
.build();
// modification.put(LogicalDatastoreType.CONFIGURATION, path1,
// groupBuilder.build(), true /*createMissingParents*/);
modification.merge(LogicalDatastoreType.CONFIGURATION, path1, groupBuilder.build(),
true /* createMissingParents */);
CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
try {
commitFuture.get();
LOG.debug("Transaction success for write of Group " + groupBuilder.getGroupName());
} catch (InterruptedException | ExecutionException e) {
LOG.error(e.getMessage(), e);
}
}
开发者ID:opendaylight,项目名称:faas,代码行数:22,代码来源:PipelineL2Forwarding.java
示例5: removeGroup
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
private void removeGroup(GroupBuilder groupBuilder, NodeBuilder nodeBuilder) {
DataBroker databroker = getDataBroker();
WriteTransaction modification = databroker.newWriteOnlyTransaction();
InstanceIdentifier<Group> path1 = InstanceIdentifier.builder(Nodes.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class,
nodeBuilder.getKey())
.augmentation(FlowCapableNode.class).child(Group.class, new GroupKey(groupBuilder.getGroupId()))
.build();
modification.delete(LogicalDatastoreType.CONFIGURATION, path1);
CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
try {
commitFuture.get();
LOG.debug("Transaction success for deletion of Group " + groupBuilder.getGroupName());
} catch (InterruptedException | ExecutionException e) {
LOG.error(e.getMessage(), e);
}
}
开发者ID:opendaylight,项目名称:faas,代码行数:19,代码来源:PipelineL2Forwarding.java
示例6: removeTap
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
private void removeTap(Tap tap) {
NodeId nodeId = tap.getNode();
String tapId = tap.getId();
String flowIdStr = "Tap_" + tapId + "SrcPort_"; // TODO: Concat srcNodeConnector to each flow;
FlowId flowId = new FlowId(flowIdStr);
FlowBuilder flowBuilder = new FlowBuilder()
.setKey(new FlowKey(flowId))
.setId(flowId)
.setTableId((short)0);
InstanceIdentifier<Flow> flowIID = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, new NodeKey(nodeId))
.augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flowBuilder.getTableId()))
.child(Flow.class, flowBuilder.getKey())
.build();
GenericTransactionUtils.writeData(dataBroker, LogicalDatastoreType.CONFIGURATION, flowIID, flowBuilder.build(), false);
}
开发者ID:sdnhub,项目名称:SDNHub_Opendaylight_Tutorial,代码行数:18,代码来源:TutorialTapProvider.java
示例7: AclNodeListener
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
@Inject
public AclNodeListener(final IMdsalApiManager mdsalManager, DataBroker dataBroker, AclserviceConfig config,
AclServiceUtils aclServiceUtils, AclDataUtil aclDataUtil, JobCoordinator jobCoordinator) {
super(FlowCapableNode.class, AclNodeListener.class);
this.mdsalManager = mdsalManager;
this.dataBroker = dataBroker;
this.config = config;
this.aclServiceUtils = aclServiceUtils;
this.aclDataUtil = aclDataUtil;
this.jobCoordinator = jobCoordinator;
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:13,代码来源:AclNodeListener.java
示例8: add
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
@Override
protected void add(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode dataObjectModification) {
LOG.trace("FlowCapableNode Added: key: {}", key);
NodeKey nodeKey = key.firstKeyOf(Node.class);
BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
createTableDefaultEntries(dpnId);
// serialize ACL pool creation per switch
jobCoordinator.enqueueJob(String.valueOf(dpnId), () -> {
this.aclServiceUtils.createAclIdPools(dpnId);
return Collections.emptyList();
});
LOG.trace("FlowCapableNode (dpid: {}) add event is processed.", dpnId);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:14,代码来源:AclNodeListener.java
示例9: QosNodeListener
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
@Inject
public QosNodeListener(final DataBroker dataBroker, final IMdsalApiManager mdsalUtils) {
super(FlowCapableNode.class, QosNodeListener.class);
this.dataBroker = dataBroker;
this.mdsalUtils = mdsalUtils;
LOG.debug("{} created", getClass().getSimpleName());
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:8,代码来源:QosNodeListener.java
示例10: getFlowRef
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
public static FlowRef getFlowRef(BigInteger dpId, Flow flow) {
FlowKey flowKey = new FlowKey(new FlowId(flow.getId()));
Node nodeDpn = buildInventoryDpnNode(dpId);
InstanceIdentifier<Flow> flowInstanceId =
InstanceIdentifier.builder(Nodes.class)
.child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flow.getTableId()))
.child(Flow.class, flowKey)
.build();
return new FlowRef(flowInstanceId);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:12,代码来源:NaptEventHandler.java
示例11: add
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
@Override
protected void add(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode flowCapableNode) {
BigInteger dpId = MDSALUtil.getDpnIdFromNodeName(key.firstKeyOf(Node.class).getId());
WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
createTableMissFlow(dpId, NwConstants.EGRESS_POLICY_CLASSIFIER_TABLE,
NwConstants.EGRESS_POLICY_CLASSIFIER_COOKIE, tx);
createTableMissFlow(dpId, NwConstants.EGRESS_POLICY_ROUTING_TABLE, NwConstants.EGRESS_POLICY_ROUTING_COOKIE,
tx);
tx.submit();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:11,代码来源:PolicyNodeListener.java
示例12: createTerminatingServiceActions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
public void createTerminatingServiceActions(BigInteger destDpId, int label, List<ActionInfo> actionsInfos,
WriteTransaction tx) {
List<MatchInfo> mkMatches = new ArrayList<>();
LOG.debug("create terminatingServiceAction on DpnId = {} and serviceId = {} and actions = {}",
destDpId, label, actionsInfos);
// Matching metadata
// FIXME vxlan vni bit set is not working properly with OVS.need to revisit
mkMatches.add(new MatchTunnelId(BigInteger.valueOf(label)));
List<InstructionInfo> mkInstructions = new ArrayList<>();
mkInstructions.add(new InstructionApplyActions(actionsInfos));
FlowEntity terminatingServiceTableFlowEntity =
MDSALUtil.buildFlowEntity(destDpId, NwConstants.INTERNAL_TUNNEL_TABLE,
getTableMissFlowRef(destDpId, NwConstants.INTERNAL_TUNNEL_TABLE, label), 5,
String.format("%s:%d", "TST Flow Entry ", label),
0, 0, COOKIE_TUNNEL.add(BigInteger.valueOf(label)), mkMatches, mkInstructions);
FlowKey flowKey = new FlowKey(new FlowId(terminatingServiceTableFlowEntity.getFlowId()));
FlowBuilder flowbld = terminatingServiceTableFlowEntity.getFlowBuilder();
Node nodeDpn = FibUtil.buildDpnNode(terminatingServiceTableFlowEntity.getDpnId());
InstanceIdentifier<Flow> flowInstanceId = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(terminatingServiceTableFlowEntity.getTableId()))
.child(Flow.class, flowKey).build();
tx.put(LogicalDatastoreType.CONFIGURATION, flowInstanceId, flowbld.build(),
WriteTransaction.CREATE_MISSING_PARENTS);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:33,代码来源:VrfEntryListener.java
示例13: makeLFibTableEntry
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
private void makeLFibTableEntry(BigInteger dpId, long label, List<InstructionInfo> instructions, int priority,
int addOrRemove, WriteTransaction tx) {
Boolean wrTxPresent = true;
if (tx == null) {
wrTxPresent = false;
tx = dataBroker.newWriteOnlyTransaction();
}
List<MatchInfo> matches = new ArrayList<>();
matches.add(MatchEthernetType.MPLS_UNICAST);
matches.add(new MatchMplsLabel(label));
// Install the flow entry in L3_LFIB_TABLE
String flowRef = FibUtil.getFlowRef(dpId, NwConstants.L3_LFIB_TABLE, label, priority);
FlowEntity flowEntity;
flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.L3_LFIB_TABLE, flowRef, priority, flowRef, 0, 0,
NwConstants.COOKIE_VM_LFIB_TABLE, matches, instructions);
Flow flow = flowEntity.getFlowBuilder().build();
String flowId = flowEntity.getFlowId();
FlowKey flowKey = new FlowKey(new FlowId(flowId));
Node nodeDpn = FibUtil.buildDpnNode(dpId);
InstanceIdentifier<Flow> flowInstanceId = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flow.getTableId())).child(Flow.class, flowKey).build();
if (addOrRemove == NwConstants.ADD_FLOW) {
tx.put(LogicalDatastoreType.CONFIGURATION, flowInstanceId, flow, WriteTransaction.CREATE_MISSING_PARENTS);
} else {
tx.delete(LogicalDatastoreType.CONFIGURATION, flowInstanceId);
}
if (!wrTxPresent) {
tx.submit();
}
LOG.debug("LFIB Entry for dpID {} : label : {} instructions {} : key {} {} successfully",
dpId, label, instructions, flowKey, NwConstants.ADD_FLOW == addOrRemove ? "ADDED" : "REMOVED");
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:39,代码来源:VrfEntryListener.java
示例14: appendFlowForCreate
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
public void appendFlowForCreate(NodeId node, Flow flow, WriteTransaction tx) {
NodeKey nodeKey = new NodeKey(node);
InstanceIdentifier<Flow> iidFlow = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, nodeKey)
.augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flow.getTableId()))
.child(Flow.class, flow.getKey())
.build();
tx.put(LogicalDatastoreType.CONFIGURATION, iidFlow, flow, WriteTransaction.CREATE_MISSING_PARENTS);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:12,代码来源:OpenFlow13Provider.java
示例15: appendFlowForDelete
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
public void appendFlowForDelete(NodeId node, Flow flow, WriteTransaction tx) {
NodeKey nodeKey = new NodeKey(node);
InstanceIdentifier<Flow> iidFlow = InstanceIdentifier.builder(Nodes.class)
.child(Node.class, nodeKey)
.augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flow.getTableId()))
.child(Flow.class, flow.getKey())
.build();
tx.delete(LogicalDatastoreType.CONFIGURATION, iidFlow);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:12,代码来源:OpenFlow13Provider.java
示例16: add
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
@Override
protected void add(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode dataObjectModification) {
LOG.trace("FlowCapableNode Added: key: {}", key);
NodeKey nodeKey = key.firstKeyOf(Node.class);
BigInteger dpnId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
createTableMissEntry(dpnId);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:9,代码来源:Ipv6NodeListener.java
示例17: getFlowIid
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
public static InstanceIdentifier<Flow> getFlowIid(Flow flow, BigInteger dpnId) {
FlowKey flowKey = new FlowKey(new FlowId(flow.getId()));
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId nodeId =
new org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId("openflow:" + dpnId);
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node nodeDpn =
new NodeBuilder().setId(nodeId).setKey(new NodeKey(nodeId)).build();
return InstanceIdentifier.builder(Nodes.class)
.child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class,
nodeDpn.getKey()).augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flow.getTableId())).child(Flow.class, flowKey).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:12,代码来源:ElanUtils.java
示例18: getFlowIid
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
protected InstanceIdentifier<Flow> getFlowIid(short tableId, FlowId flowid, BigInteger dpnId) {
FlowKey flowKey = new FlowKey(new FlowId(flowid));
NodeId nodeId =
new NodeId("openflow:" + dpnId);
Node nodeDpn =
new NodeBuilder().setId(nodeId).setKey(new NodeKey(nodeId)).build();
return InstanceIdentifier.builder(Nodes.class)
.child(Node.class,
nodeDpn.getKey()).augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(tableId)).child(Flow.class, flowKey).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:13,代码来源:ElanServiceTestBase.java
示例19: onDataChanged
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
@Override
public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
Map<InstanceIdentifier<?>, DataObject> createdData = change.getCreatedData();
for (Map.Entry<InstanceIdentifier<?>, DataObject> entrySet : createdData.entrySet()) {
InstanceIdentifier<?> iiD = entrySet.getKey();
final DataObject dataObject = entrySet.getValue();
if (dataObject instanceof FlowCapableNode) {
final InstanceIdentifier<Node> path = iiD.firstIdentifierOf(Node.class);
ReadOnlyTransaction readOnlyTransaction = dataBroker.newReadOnlyTransaction();
final CheckedFuture<Optional<Node>, ReadFailedException> readFuture = readOnlyTransaction
.read(LogicalDatastoreType.OPERATIONAL, path);
Futures.addCallback(readFuture, new FutureCallback<Optional<Node>>() {
@Override
public void onSuccess(Optional<Node> result) {
if (result.isPresent()) {
bgpRouter.processNodeAdd(result.get().getId());
LOG.info("Node discovered and passed to processNodeAdd : " + result.get().getId());
} else {
LOG.info("Read succeeded, node doesn't exist: {}", path);
}
}
@Override
public void onFailure(Throwable t) {
LOG.info("Failed to read Node: {}", path, t);
}
});
}
}
}
开发者ID:onfsdn,项目名称:atrium-odl,代码行数:35,代码来源:DeviceListener.java
示例20: createFlowPath
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; //导入依赖的package包/类
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();
}
开发者ID:opendaylight,项目名称:faas,代码行数:9,代码来源:AbstractServiceInstance.java
注:本文中的org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论