wrong feature dependencies in newly added features.
authorFaseela K <faseela.k@ericsson.com>
Thu, 12 Apr 2018 15:23:30 +0000 (20:53 +0530)
committerFaseela K <faseela.k@ericsson.com>
Thu, 12 Apr 2018 16:55:19 +0000 (22:25 +0530)
Change-Id: Ie592de3ee8f6ba01c86e7d411dad8d5c411cf59c
Signed-off-by: Faseela K <faseela.k@ericsson.com>
shell/pom.xml
shell/src/main/java/org/opendaylight/genius/srm/shell/SrmDebugCommand.java

index 32cfd78ca878c93b513715919e4a4ad03f859bed..6327ba30772006fdc61f7c7b09bee39b4d6f5f98 100644 (file)
@@ -25,11 +25,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <name>ODL :: genius :: ${project.artifactId}</name>
 
   <dependencies>
-    <dependency>
-      <groupId>org.opendaylight.genius</groupId>
-      <artifactId>mdsalutil-api</artifactId>
-      <version>${genius.version}</version>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.genius</groupId>
       <artifactId>srm-api</artifactId>
index fbc57826e64a4672ea42ae1ad1718855942dcd8a..176a8d32031dea97b189630e31c3c86aa154f901 100644 (file)
@@ -12,8 +12,8 @@ import org.apache.karaf.shell.commands.Command;
 import org.apache.karaf.shell.commands.Option;
 import org.apache.karaf.shell.console.OsgiCommandSupport;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.srm.ops.rev170711.ServiceOps;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
@@ -24,10 +24,10 @@ public class SrmDebugCommand extends OsgiCommandSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(SrmDebugCommand.class);
 
-    private final SingleTransactionDataBroker txDataBroker;
+    private final DataBroker txDataBroker;
 
     public SrmDebugCommand(DataBroker dataBroker) {
-        this.txDataBroker = new SingleTransactionDataBroker(dataBroker);
+        this.txDataBroker = dataBroker;
     }
 
     @Option(name = "-c", aliases = {"--clear-ops"}, description = "Clear operations DS",
@@ -44,7 +44,9 @@ public class SrmDebugCommand extends OsgiCommandSupport {
 
     private void clearOpsDs() throws Exception {
         InstanceIdentifier<ServiceOps> path = getInstanceIdentifier();
-        txDataBroker.syncDelete(LogicalDatastoreType.OPERATIONAL, path);
+        WriteTransaction tx = txDataBroker.newWriteOnlyTransaction();
+        tx.delete(LogicalDatastoreType.OPERATIONAL, path);
+        tx.submit();
     }
 
     private static InstanceIdentifier<ServiceOps> getInstanceIdentifier() {