Bump version odlparent->6.0.0,mdsal->5.0.3
[genius.git] / itm / itm-impl / src / main / java / org / opendaylight / genius / itm / cli / TepDelete.java
index 37a57719b2523dcee174e43253268f5b4b3bd2cf..fe68fffb70c07f6ada21d94a2be2eaaa33a7cbdb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. 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,
@@ -7,15 +7,15 @@
  */
 package org.opendaylight.genius.itm.cli;
 
+import java.math.BigInteger;
 import org.apache.karaf.shell.commands.Argument;
 import org.apache.karaf.shell.commands.Command;
 import org.apache.karaf.shell.console.OsgiCommandSupport;
 import org.opendaylight.genius.itm.api.IITMProvider;
+import org.opendaylight.yangtools.yang.common.Uint64;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.math.BigInteger;
-
 @Command(scope = "tep", name = "delete", description = "deleting a tunnel end point")
 public class TepDelete extends OsgiCommandSupport {
 
@@ -34,23 +34,26 @@ public class TepDelete extends OsgiCommandSupport {
     @Argument(index = 6, name = "transportZone", description = "transport_zone", required = false, multiValued = false)
     private String transportZone;
 
-    private static final Logger logger = LoggerFactory.getLogger(TepDelete.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TepDelete.class);
     private IITMProvider itmProvider;
 
     public void setItmProvider(IITMProvider itmProvider) {
         this.itmProvider = itmProvider;
     }
+
     @Override
-    protected Object doExecute() throws Exception {
+    protected Object doExecute() {
 
         if (dpnId == null || portName == null || vlanId == null || ipAddress == null || subnetMask == null
                         || transportZone == null) {
             session.getConsole().println("Insufficient Arguments");
-            session.getConsole().println("Correct Usage : exec tep-delete dpnId portName vlanId ipAddress subnetMask gatewayIp transportZone");
+            session.getConsole().println("Correct Usage : exec tep-delete dpnId portName vlanId ipAddress subnetMask "
+                    + "gatewayIp transportZone");
             return null;
         }
-        itmProvider.deleteVtep(dpnId, portName, vlanId, ipAddress, subnetMask, gatewayIp, transportZone, session);
-        logger.trace("Executing delete TEP command");
+        itmProvider.deleteVtep(Uint64.valueOf(dpnId), portName, vlanId, ipAddress, subnetMask, gatewayIp,
+            transportZone);
+        LOG.trace("Executing delete TEP command");
 
         return null;