简体   繁体   English

在OpenDaylight中更新OpenFlow组表存储桶列表

[英]Updating OpenFlow group table bucket list in OpenDaylight

I have a mininet (v2.2.2) network with openvswitch (v2.5.2), controlled by OpenDaylight Carbon. 我有一个由OpenDaylight Carbon控制的带有openvswitch(v2.5.2)的小型网络(v2.2.2)。 My application is an OpenDaylight karaf feature. 我的应用程序是OpenDaylight karaf功能。 The application creates a flow (for multicasts) to a group table (type=all) and adds/removes buckets as needed. 该应用程序创建到组表(类型=全部)的流(用于多播),并根据需要添加/删除存储桶。 To add/remove buckets, I first check if there is an existing group table: 要添加/删除存储桶,我首先检查是否存在现有的组表:

InstanceIdentifier<Group> groupIid = InstanceIdentifier.builder(Nodes.class)
    .child(Node.class, new NodeKey(NodId))
    .augmentation(FlowCapableNode.class)
    .child(Group.class, grpKey)
    .build();
ReadOnlyTransaction roTx = dataBroker.newReadOnlyTransaction();
Future<Optional<Group>> futOptGrp = rwTx.read(LogicalDatastoreType.OPERATIONAL, groupIid);

If it doesn't find the group table, it is created (SalGroupService.addGroup()). 如果找不到组表,则会创建它(SalGroupService.addGroup())。 If it does find the group table, it is updated (SalGroupService.updateGroup()). 如果找到组表,则会对其进行更新(SalGroupService.updateGroup())。

The problem is that it takes some time after the RPC call add/updateGroup() to see the changes in the data model. 问题在于,RPC调用add / updateGroup()之后要花费一些时间才能看到数据模型中的更改。 Waiting for the Future<RPCResult<?>> doesn't guarantee that the data model has the same state as the device. 等待Future<RPCResult<?>>不能保证数据模型具有与设备相同的状态。

So, how do I read the group table and bucket list from the data model and make sure that I am indeed reading the same state as the current state of the device? 那么,如何从数据模型中读取组表和存储区列表,并确保确实读取与设备当前状态相同的状态?

I know that 我知道

  • Add/UpdateGroupInputBuilder has setTransactionUri() Add / UpdateGroupInputBuilder具有setTransactionUri()
  • DataBroker gives transaction to read/write DataBroker提供事务以读取/写入
  • you should use transaction chaining 您应该使用交易链

But I cannot figure out how to combine these. 但是我不知道如何将它们结合起来。 Thank you 谢谢

EDIT: Or do I have to use write transactions in stead of RPC calls? 编辑:还是我必须使用写事务来代替RPC调用?

I dropped using RPC calls for writing flows and switched to using writes to the config datastore. 我放弃了使用RPC调用来写流,而转而使用对配置数据存储的写操作。 It will still take some time to see the changes appear in the actual device and in the operational datastore but that is ok as long as I use the config datastore for both reads and writes. 仍然需要一些时间才能看到更改出现在实际设备和可操作的数据存储区中,但是可以,只要我将config数据存储区用于读取和写入即可。

However, I have to keep in mind that it is not guaranteed that changes to the config datastore will always make it to the actual device. 但是,我必须牢记,不能保证对配置数据存储的更改将始终使之成为实际设备。 My flows are not that complicated in the sense that conflicts are unlikely to happen. 就冲突不太可能发生的意义而言,我的流程并不那么复杂。 Still, I will probably check consistency between operational and configuration datastore. 不过,我可能会检查操作和配置数据存储之间的一致性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 opendaylight Openflow插件创建流表 - opendaylight Openflow plugin create a flow table Opendaylight openflow插件:多个通知开关 - Opendaylight openflow plugin: multiple notifications on switch OpenDaylight:OpenFlow FLOW_MOD消息 - OpenDaylight: OpenFlow FLOW_MOD messages Opendaylight:如何在Openflow中添加NORMAL动作? - Opendaylight: How to add a NORMAL action in Openflow? 在 Opendaylight 中,我们发送了 openflow 的 multipart 请求,为什么wireshark 可以看到单个数据包中累积的 multipart 请求? - In Opendaylight, we send openflow's multipart request and why wireshark can see accumulate multipart request in a single packet? 一个流不正确地击中了 OVS 的 OpenFlow 流表 - A flow hit the OpenFlow flow table at OVS, improperly 在opendaylight dlux上的openflow-provider-config下配置节点时,控制器上将发生“绑定失败!地址已在使用中”错误 - When config the node under openflow-provider-config on opendaylight dlux,“bind failed!Address already in use” error will occur on controller Opendaylight Dlux如何制作流表? - Opendaylight Dlux how to make flow table? 如何在 openflow 中实现每包多路径路由? 每次数据包传输后是否更新流表? - How in per packet multipath routing implemented in openflow? Is flow table updated after each packet transfer? OpenFlow Switch中的资源数据库 - Resource Database in OpenFlow Switch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM