Upgrading app to ONOS 1.13

Change-Id: Idc05bff116a94fb185d45174f6abb1cdb2369702
diff --git a/pom.xml b/pom.xml
index 6d93a10..c6b33db 100755
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.onosproject</groupId>
         <artifactId>onos-dependencies</artifactId>
-        <version>1.10.9</version>
+        <version>1.13.1</version>
         <relativePath></relativePath>
     </parent>
 
@@ -43,7 +43,7 @@
         <onos.app.requires>
             org.opencord.sadis
         </onos.app.requires>
-	<onos.version>1.10.9</onos.version>
+        <onos.version>1.13.1</onos.version>
         <sadis.api.version>2.1.0-SNAPSHOT</sadis.api.version>
     </properties>
 
@@ -119,6 +119,11 @@
             <artifactId>easymock</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
@@ -136,6 +141,7 @@
             <plugin>
                 <groupId>org.onosproject</groupId>
                 <artifactId>onos-maven-plugin</artifactId>
+                <version>1.11</version>
             </plugin>
         </plugins>
     </build>
diff --git a/src/main/java/org/opencord/dhcpl2relay/DhcpL2Relay.java b/src/main/java/org/opencord/dhcpl2relay/DhcpL2Relay.java
index b25f615..1adb1e5 100755
--- a/src/main/java/org/opencord/dhcpl2relay/DhcpL2Relay.java
+++ b/src/main/java/org/opencord/dhcpl2relay/DhcpL2Relay.java
@@ -27,7 +27,6 @@
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.onlab.packet.DHCP;
-import org.onlab.packet.DHCPOption;
 import org.onlab.packet.DHCPPacketType;
 import org.onlab.packet.Ethernet;
 import org.onlab.packet.IPv4;
@@ -36,6 +35,7 @@
 import org.onlab.packet.TpPort;
 import org.onlab.packet.UDP;
 import org.onlab.packet.VlanId;
+import org.onlab.packet.dhcp.DhcpOption;
 import org.onlab.util.Tools;
 import org.onosproject.cfg.ComponentConfigService;
 import org.onosproject.core.ApplicationId;
@@ -76,8 +76,8 @@
 import org.slf4j.LoggerFactory;
 
 import java.nio.ByteBuffer;
-import java.util.Arrays;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Dictionary;
 import java.util.List;
 import java.util.Map;
@@ -574,7 +574,7 @@
         // get the type of the DHCP packet
         private DHCPPacketType getDhcpPacketType(DHCP dhcpPayload) {
 
-            for (DHCPOption option : dhcpPayload.getOptions()) {
+            for (DhcpOption option : dhcpPayload.getOptions()) {
                 if (option.getCode() == OptionCode_MessageType.getValue()) {
                     byte[] data = option.getData();
                     return DHCPPacketType.getType(data[0]);
@@ -707,8 +707,8 @@
                 String portId = nasPortId(subsCp);
                 SubscriberAndDeviceInformation sub = subsService.get(portId);
                 if (sub != null) {
-                    List<DHCPOption> options = dhcpPayload.getOptions();
-                    List<DHCPOption> circuitIds = options.stream()
+                    List<DhcpOption> options = dhcpPayload.getOptions();
+                    List<DhcpOption> circuitIds = options.stream()
                             .filter(option -> option.getCode() == DHCP.DHCPOptionCode.OptionCode_CircuitID.getValue())
                             .collect(Collectors.toList());
 
@@ -800,11 +800,11 @@
     private DHCP addOption82(DHCP dhcpPacket, SubscriberAndDeviceInformation entry) {
         log.debug("option82data {} ", entry);
 
-        List<DHCPOption> options = Lists.newArrayList(dhcpPacket.getOptions());
+        List<DhcpOption> options = Lists.newArrayList(dhcpPacket.getOptions());
         DhcpOption82 option82 = new DhcpOption82();
         option82.setAgentCircuitId(entry.circuitId());
         option82.setAgentRemoteId(entry.remoteId());
-        DHCPOption option = new DHCPOption()
+        DhcpOption option = new DhcpOption()
                 .setCode(DHCP.DHCPOptionCode.OptionCode_CircuitID.getValue())
                 .setData(option82.toByteArray())
                 .setLength(option82.length());
@@ -817,8 +817,8 @@
     }
 
     private DHCP removeOption82(DHCP dhcpPacket) {
-        List<DHCPOption> options = dhcpPacket.getOptions();
-        List<DHCPOption> newoptions = options.stream()
+        List<DhcpOption> options = dhcpPacket.getOptions();
+        List<DhcpOption> newoptions = options.stream()
                 .filter(option -> option.getCode() != DHCP.DHCPOptionCode.OptionCode_CircuitID.getValue())
                 .collect(Collectors.toList());
 
diff --git a/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTest.java b/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTest.java
index ebde675..228d59f 100755
--- a/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTest.java
+++ b/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTest.java
@@ -24,7 +24,6 @@
 import org.onlab.osgi.ComponentContextAdapter;
 import org.onlab.packet.ChassisId;
 import org.onlab.packet.DHCP;
-import org.onlab.packet.DHCPOption;
 import org.onlab.packet.Ethernet;
 import org.onlab.packet.IPv4;
 import org.onlab.packet.Ip4Address;
@@ -32,6 +31,7 @@
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.UDP;
 import org.onlab.packet.VlanId;
+import org.onlab.packet.dhcp.DhcpOption;
 import org.onosproject.cfg.ComponentConfigService;
 import org.onosproject.core.CoreServiceAdapter;
 import org.onosproject.mastership.MastershipServiceAdapter;
@@ -195,11 +195,11 @@
         UDP udpPacket = (UDP) ipv4Packet.getPayload();
         DHCP dhcpPacket = (DHCP) udpPacket.getPayload();
 
-        List<DHCPOption> options = Lists.newArrayList(dhcpPacket.getOptions());
+        List<DhcpOption> options = Lists.newArrayList(dhcpPacket.getOptions());
         DhcpOption82 option82 = new DhcpOption82();
         option82.setAgentCircuitId(CLIENT_CIRCUIT_ID);
 
-        DHCPOption option = new DHCPOption()
+        DhcpOption option = new DhcpOption()
                 .setCode(DHCP.DHCPOptionCode.OptionCode_CircuitID.getValue())
                 .setData(option82.toByteArray())
                 .setLength(option82.length());
diff --git a/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTestBase.java b/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTestBase.java
index 540a691..7a1dd1a 100755
--- a/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTestBase.java
+++ b/src/test/java/org/opencord/dhcpl2relay/DhcpL2RelayTestBase.java
@@ -18,13 +18,13 @@
 
 import org.onlab.packet.BasePacket;
 import org.onlab.packet.DHCP;
-import org.onlab.packet.DHCPOption;
 import org.onlab.packet.DHCPPacketType;
 import org.onlab.packet.Ethernet;
 import org.onlab.packet.IPv4;
 import org.onlab.packet.Ip4Address;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.UDP;
+import org.onlab.packet.dhcp.DhcpOption;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.packet.DefaultInboundPacket;
 import org.onosproject.net.packet.DefaultPacketContext;
@@ -33,14 +33,11 @@
 import org.onosproject.net.packet.PacketContext;
 import org.onosproject.net.packet.PacketProcessor;
 import org.onosproject.net.packet.PacketServiceAdapter;
-
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
-
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
@@ -267,11 +264,11 @@
      *
      * @return Ethernet packet
      */
-    private List<DHCPOption> constructDhcpOptions(DHCPPacketType packetType) {
+    private List<DhcpOption> constructDhcpOptions(DHCPPacketType packetType) {
 
         // DHCP Options.
-        DHCPOption option = new DHCPOption();
-        List<DHCPOption> optionList = new ArrayList<>();
+        DhcpOption option = new DhcpOption();
+        List<DhcpOption> optionList = new ArrayList<>();
 
 
         // DHCP Message Type.
@@ -282,7 +279,7 @@
         optionList.add(option);
 
         // DHCP Requested IP.
-        option = new DHCPOption();
+        option = new DhcpOption();
         option.setCode(DHCP.DHCPOptionCode.OptionCode_RequestedIP.getValue());
         option.setLength((byte) 4);
         optionData = Ip4Address.valueOf(EXPECTED_IP).toOctets();
@@ -290,7 +287,7 @@
         optionList.add(option);
 
         // End Option.
-        option = new DHCPOption();
+        option = new DhcpOption();
         option.setCode(DHCP.DHCPOptionCode.OptionCode_END.getValue());
         option.setLength((byte) 1);
         optionList.add(option);