当前位置: 首页>>代码示例>>Java>>正文


Java OFGroupDelete类代码示例

本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFGroupDelete的典型用法代码示例。如果您正苦于以下问题:Java OFGroupDelete类的具体用法?Java OFGroupDelete怎么用?Java OFGroupDelete使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


OFGroupDelete类属于org.projectfloodlight.openflow.protocol包,在下文中一共展示了OFGroupDelete类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildGroupDel

import org.projectfloodlight.openflow.protocol.OFGroupDelete; //导入依赖的package包/类
/**
 * Builds the GroupDel OF message.
 *
 * @return GroupDel OF message
 */
public OFGroupDelete buildGroupDel() {

    OFGroupDelete groupMsg = factory.buildGroupDelete()
            .setGroup(OFGroup.of(groupId.id()))
            .setGroupType(OFGroupType.SELECT)
            .setXid(xid)
            .build();

    return groupMsg;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:GroupModBuilder.java

示例2: pushOFDeleteGroup

import org.projectfloodlight.openflow.protocol.OFGroupDelete; //导入依赖的package包/类
protected void pushOFDeleteGroup(IOFSwitch sw) {
	
	/* Delete the queues attached to all the member ports*/
	long queueId = -1;
	OFPort ofp = null;
	ArrayList<OFBucket> ofBuckets = multicastGroup.getMemberOFBucketList(sw.getId());
	OVSDBContext ovsdbContext = mcObject.ovsdbChannelMap.get(sw.getId());
	for (OFBucket ofb : ofBuckets) {
		queueId = -1;
		ofp = null;
		for (OFAction ofa:  ofb.getActions()){
			if (ofa.getType() == OFActionType.SET_QUEUE){
				OFActionSetQueue ofas = (OFActionSetQueue) ofa;
				queueId = ofas.getQueueId();
				/* removes queue using OVSDBContext on the switch */
				
			}
			if (ofa.getType() == OFActionType.OUTPUT){
				OFActionOutput ofo = (OFActionOutput) ofa;
				ofp = ofo.getPort();
				/* removes queue using OVSDBContext on the switch */
				
			}
		}
		if (ofp != null && queueId != -1)
			ovsdbContext.deleteQueueOnPort(ofp, (int)queueId);
		else
			logger.error("pushOFDeleteGroup: unexpected actionset in group bucket");
	}
	
	/* Creates group flow with set queue option */
	OFFactory of13Factory = sw.getOFFactory();

	OFGroupDelete delGroup = of13Factory.buildGroupDelete()
			.setGroup(OFGroup.of(multicastGroup.ofGroupId))
			.setGroupType(OFGroupType.ALL)
			.build();
	sw.write(delGroup);
}
 
开发者ID:hksoni,项目名称:SDN-Multicast,代码行数:40,代码来源:MulticastTree.java


注:本文中的org.projectfloodlight.openflow.protocol.OFGroupDelete类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。