use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId in project genius by opendaylight.
the class MDSALManager method deleteBucket.
public void deleteBucket(BigInteger dpId, long groupId, long bucketId, WriteTransaction tx) {
Node nodeDpn = buildDpnNode(dpId);
if (groupExists(nodeDpn, groupId)) {
InstanceIdentifier<Bucket> bucketInstanceId = buildBucketInstanceIdentifier(groupId, bucketId, nodeDpn);
tx.delete(LogicalDatastoreType.CONFIGURATION, bucketInstanceId);
} else {
LOG.debug("Group {} does not exist for dpn {}", groupId, dpId);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId in project netvirt by opendaylight.
the class ElanInterfaceManager method removeElanBroadcastGroup.
public void removeElanBroadcastGroup(ElanInstance elanInfo, InterfaceInfo interfaceInfo, WriteTransaction deleteFlowGroupTx) {
int bucketId = 0;
int actionKey = 0;
Long elanTag = elanInfo.getElanTag();
List<Bucket> listBuckets = new ArrayList<>();
List<Action> listAction = new ArrayList<>();
listAction.add(new ActionGroup(++actionKey, ElanUtils.getElanLocalBCGId(elanTag)).buildAction());
listBuckets.add(MDSALUtil.buildBucket(listAction, MDSALUtil.GROUP_WEIGHT, bucketId, MDSALUtil.WATCH_PORT, MDSALUtil.WATCH_GROUP));
bucketId++;
listBuckets.addAll(getRemoteBCGroupBucketInfos(elanInfo, bucketId, interfaceInfo, elanTag));
BigInteger dpnId = interfaceInfo.getDpId();
long groupId = ElanUtils.getElanRemoteBCGId(elanInfo.getElanTag());
Group group = MDSALUtil.buildGroup(groupId, elanInfo.getElanInstanceName(), GroupTypes.GroupAll, MDSALUtil.buildBucketLists(listBuckets));
LOG.trace("deleting the remoteBroadCast group:{}", group);
mdsalManager.removeGroupToTx(dpnId, group, deleteFlowGroupTx);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId in project netvirt by opendaylight.
the class ElanInterfaceManager method removeLocalBroadcastGroup.
public void removeLocalBroadcastGroup(ElanInstance elanInfo, InterfaceInfo interfaceInfo, WriteTransaction deleteFlowGroupTx) {
BigInteger dpnId = interfaceInfo.getDpId();
long groupId = ElanUtils.getElanLocalBCGId(elanInfo.getElanTag());
List<Bucket> listBuckets = new ArrayList<>();
int bucketId = 0;
listBuckets.add(getLocalBCGroupBucketInfo(interfaceInfo, bucketId));
// listBuckets.addAll(getRemoteBCGroupBucketInfos(elanInfo, 1,
// interfaceInfo));
Group group = MDSALUtil.buildGroup(groupId, elanInfo.getElanInstanceName(), GroupTypes.GroupAll, MDSALUtil.buildBucketLists(listBuckets));
LOG.trace("deleted the localBroadCast Group:{}", group);
mdsalManager.removeGroupToTx(dpnId, group, deleteFlowGroupTx);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId in project netvirt by opendaylight.
the class ElanInterfaceManager method removeLeavesEtreeBroadcastGroup.
private void removeLeavesEtreeBroadcastGroup(ElanInstance elanInfo, InterfaceInfo interfaceInfo, WriteTransaction deleteFlowGroupTx) {
EtreeInstance etreeInstance = elanInfo.getAugmentation(EtreeInstance.class);
if (etreeInstance != null) {
long etreeTag = etreeInstance.getEtreeLeafTagVal().getValue();
int bucketId = 0;
int actionKey = 0;
List<Bucket> listBuckets = new ArrayList<>();
List<Action> listAction = new ArrayList<>();
listAction.add(new ActionGroup(ElanUtils.getEtreeLeafLocalBCGId(etreeTag)).buildAction(++actionKey));
listBuckets.add(MDSALUtil.buildBucket(listAction, MDSALUtil.GROUP_WEIGHT, bucketId, MDSALUtil.WATCH_PORT, MDSALUtil.WATCH_GROUP));
bucketId++;
listBuckets.addAll(getRemoteBCGroupBucketInfos(elanInfo, bucketId, interfaceInfo, etreeTag));
BigInteger dpnId = interfaceInfo.getDpId();
long groupId = ElanUtils.getEtreeLeafRemoteBCGId(etreeTag);
Group group = MDSALUtil.buildGroup(groupId, elanInfo.getElanInstanceName(), GroupTypes.GroupAll, MDSALUtil.buildBucketLists(listBuckets));
LOG.trace("deleting the remoteBroadCast group:{}", group);
mdsalManager.removeGroupToTx(dpnId, group, deleteFlowGroupTx);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId in project netvirt by opendaylight.
the class ElanInterfaceManager method setElanAndEtreeBCGrouponOtherDpns.
private void setElanAndEtreeBCGrouponOtherDpns(ElanInstance elanInfo, BigInteger dpId) {
int elanTag = elanInfo.getElanTag().intValue();
long groupId = ElanUtils.getElanRemoteBCGId(elanTag);
setBCGrouponOtherDpns(elanInfo, dpId, elanTag, groupId);
EtreeInstance etreeInstance = elanInfo.getAugmentation(EtreeInstance.class);
if (etreeInstance != null) {
int etreeLeafTag = etreeInstance.getEtreeLeafTagVal().getValue().intValue();
long etreeLeafGroupId = ElanUtils.getEtreeLeafRemoteBCGId(etreeLeafTag);
setBCGrouponOtherDpns(elanInfo, dpId, etreeLeafTag, etreeLeafGroupId);
}
}
Aggregations