2 * Copyright © 2016, 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.ovsdb.hwvtepsouthbound.reconciliation.configuration;
10 import org.opendaylight.mdsal.binding.api.DataObjectModification;
11 import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
12 import org.opendaylight.mdsal.binding.api.DataTreeModification;
13 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17 public class DataTreeModificationImpl<T extends DataObject> implements DataTreeModification {
19 InstanceIdentifier<T> nodeId;
23 public DataTreeModificationImpl(InstanceIdentifier<T> nodeId, T newNode, T oldNode) {
25 this.newNode = newNode;
26 this.oldNode = oldNode;
30 public DataTreeIdentifier<T> getRootPath() {
31 return DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, nodeId);
35 public DataObjectModification<T> getRootNode() {
36 return new DataObjectModificationImpl<>(nodeId, newNode, oldNode);