* 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.openflowplugin.impl.device;
+package org.opendaylight.openflowplugin.common.txchain;
import static org.mockito.ArgumentMatchers.any;
import org.opendaylight.mdsal.binding.api.TransactionChainListener;
import org.opendaylight.mdsal.common.api.CommitInfo;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
-import org.opendaylight.openflowplugin.common.txchain.TransactionChainManager;
-import org.opendaylight.openflowplugin.impl.util.DeviceStateUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
private ReadWriteTransaction writeTx;
@Mock
private TransactionChain transactionChain;
- @Mock
- DeviceInfo deviceInfo;
@Mock
private KeyedInstanceIdentifier<Node, NodeKey> nodeKeyIdent;
Mockito.when(dataBroker.createTransactionChain(any(TransactionChainListener.class)))
.thenReturn(txChain);
nodeId = new NodeId("h2g2:42");
- nodeKeyIdent = DeviceStateUtil.createNodeInstanceIdentifier(nodeId);
+ nodeKeyIdent = InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(nodeId));
txChainManager = new TransactionChainManager(dataBroker, nodeId.getValue());
Mockito.when(txChain.newReadWriteTransaction()).thenReturn(writeTx);