X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fforwardingrules-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Ffrm%2Fgroup%2FGroupTransaction.xtend;h=e8d9982bdca3cb25ad35927045b035e07ba1ff99;hp=d68ffa09fa571beb2d679ebe9250eeae841199ed;hb=386d8f0ac5fa09ee5514d48284f1a4012f408b52;hpb=1993a259ac7f42767064d9a5c5e2dcef91e8333d diff --git a/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/frm/group/GroupTransaction.xtend b/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/frm/group/GroupTransaction.xtend index d68ffa09fa..e8d9982bdc 100644 --- a/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/frm/group/GroupTransaction.xtend +++ b/opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/frm/group/GroupTransaction.xtend @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.frm.group import org.opendaylight.controller.frm.AbstractTransaction @@ -14,14 +21,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node import org.opendaylight.yangtools.yang.binding.DataObject import org.opendaylight.yangtools.yang.binding.InstanceIdentifier +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri class GroupTransaction extends AbstractTransaction { @Property val SalGroupService groupService; - + new(DataModification, DataObject> modification,SalGroupService groupService) { - super(modification) + super(modification) _groupService = groupService; } @@ -31,6 +39,7 @@ class GroupTransaction extends AbstractTransaction { val nodeInstanceId = instanceId.firstIdentifierOf(Node); val builder = new RemoveGroupInputBuilder(group); builder.setNode(new NodeRef(nodeInstanceId)); + builder.setTransactionUri(new Uri(modification.getIdentifier() as String)); builder.setGroupRef(new GroupRef(instanceId)); _groupService.removeGroup(builder.build()); } @@ -46,6 +55,7 @@ class GroupTransaction extends AbstractTransaction { builder.setGroupRef(new GroupRef(instanceId)); val ufb = new UpdatedGroupBuilder(updatedGroup); builder.setUpdatedGroup((ufb.build())); + builder.setTransactionUri(new Uri(modification.getIdentifier() as String)); val ofb = new OriginalGroupBuilder(originalGroup); builder.setOriginalGroup(ofb.build()); _groupService.updateGroup(builder.build()); @@ -60,6 +70,7 @@ class GroupTransaction extends AbstractTransaction { val builder = new AddGroupInputBuilder(group); builder.setNode(new NodeRef(nodeInstanceId)); builder.setGroupRef(new GroupRef(instanceId)); + builder.setTransactionUri(new Uri(modification.getIdentifier() as String)); _groupService.addGroup(builder.build()); } } @@ -67,4 +78,4 @@ class GroupTransaction extends AbstractTransaction { override validate() throws IllegalStateException { GroupTransactionValidator.validate(this) } -} \ No newline at end of file +}