Revert "Bump yang tools version to 2.4"

This reverts commit 5193cb736c41d52f6007e7e2bdfd619b7598604f.

Change-Id: If061ca507f702f161fa112188abd26aa4924618d
diff --git a/apps/yang/src/main/java/org/onosproject/yang/impl/YangRuntimeManager.java b/apps/yang/src/main/java/org/onosproject/yang/impl/YangRuntimeManager.java
index c338c33..950a63e 100644
--- a/apps/yang/src/main/java/org/onosproject/yang/impl/YangRuntimeManager.java
+++ b/apps/yang/src/main/java/org/onosproject/yang/impl/YangRuntimeManager.java
@@ -26,7 +26,6 @@
 import org.onosproject.yang.YangClassLoaderRegistry;
 import org.onosproject.yang.model.ModelConverter;
 import org.onosproject.yang.model.ModelObjectData;
-import org.onosproject.yang.model.ModelObjectId;
 import org.onosproject.yang.model.NodeKey;
 import org.onosproject.yang.model.ResourceData;
 import org.onosproject.yang.model.ResourceId;
@@ -164,8 +163,7 @@
     }
 
     @Override
-    public void registerAnydataSchema(ModelObjectId arg0, ModelObjectId arg1)
-            throws IllegalArgumentException {
+    public void registerAnydataSchema(Class id, Class id1) {
         throw new UnsupportedOperationException("registerAnydataSchema() needs to be implemented");
     }
 
diff --git a/drivers/microsemi/src/test/java/org/onosproject/yang/MockYangRuntimeManager.java b/drivers/microsemi/src/test/java/org/onosproject/yang/MockYangRuntimeManager.java
index 5cfa3ef..3bebf4c 100644
--- a/drivers/microsemi/src/test/java/org/onosproject/yang/MockYangRuntimeManager.java
+++ b/drivers/microsemi/src/test/java/org/onosproject/yang/MockYangRuntimeManager.java
@@ -23,7 +23,6 @@
 import org.onosproject.drivers.netconf.MockCoreService;
 import org.onosproject.yang.model.ModelConverter;
 import org.onosproject.yang.model.ModelObjectData;
-import org.onosproject.yang.model.ModelObjectId;
 import org.onosproject.yang.model.NodeKey;
 import org.onosproject.yang.model.ResourceData;
 import org.onosproject.yang.model.ResourceId;
@@ -110,17 +109,17 @@
             return modelRegistry.getModels();
         }
 
-        @Override
-        public YangModel getModel(String s) {
-            return modelRegistry.getModel(s);
-        }
+    @Override
+    public YangModel getModel(String s) {
+        return modelRegistry.getModel(s);
+    }
 
-        @Override
-        public YangModule getModule(YangModuleId yangModuleId) {
-            return modelRegistry.getModule(yangModuleId);
-        }
+    @Override
+    public YangModule getModule(YangModuleId yangModuleId) {
+        return modelRegistry.getModule(yangModuleId);
+    }
 
-        @Override
+    @Override
         public void registerSerializer(YangSerializer ys) {
             serializerRegistry.registerSerializer(ys);
         }
@@ -131,7 +130,7 @@
         }
 
         @Override
-        public void registerAnydataSchema(ModelObjectId arg0, ModelObjectId arg1) {
+        public void registerAnydataSchema(Class id, Class id1) {
             throw new UnsupportedOperationException("registerAnydataSchema() needs to be implemented");
         }
 
diff --git a/lib/BUCK b/lib/BUCK
index 8021a3d..f7cb757 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Fri, 16 Feb 2018 17:18:31 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Sat, 17 Feb 2018 00:32:25 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 pass_thru_pom(
@@ -1340,55 +1340,55 @@
 
 remote_jar (
   name = 'onos-yang-model',
-  out = 'onos-yang-model-2.4.1.jar',
-  url = 'mvn:org.onosproject:onos-yang-model:jar:2.4.1',
-  sha1 = '3e9bce9e34b8cd48e35db9f5f1b7bcf02272cc94',
-  maven_coords = 'org.onosproject:onos-yang-model:2.4.1',
+  out = 'onos-yang-model-2.3.1.jar',
+  url = 'mvn:org.onosproject:onos-yang-model:jar:2.3.1',
+  sha1 = 'ffe8a79368ae816220a47bb9cad39e2d48ae415d',
+  maven_coords = 'org.onosproject:onos-yang-model:2.3.1',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'onos-yang-compiler-api',
-  out = 'onos-yang-compiler-api-2.4.1.jar',
-  url = 'mvn:org.onosproject:onos-yang-compiler-api:jar:2.4.1',
-  sha1 = '84c8a4ff5275673bb250aee386ad101efa9ffd1f',
-  maven_coords = 'org.onosproject:onos-yang-compiler-api:2.4.1',
+  out = 'onos-yang-compiler-api-2.3.1.jar',
+  url = 'mvn:org.onosproject:onos-yang-compiler-api:jar:2.3.1',
+  sha1 = '11edae3442f9fc8b4cb69aec2004203189fb3034',
+  maven_coords = 'org.onosproject:onos-yang-compiler-api:2.3.1',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'onos-yang-runtime',
-  out = 'onos-yang-runtime-2.4.1.jar',
-  url = 'mvn:org.onosproject:onos-yang-runtime:jar:2.4.1',
-  sha1 = '1bafc4fa6121a8f5704875f5f314651d368edf4a',
-  maven_coords = 'org.onosproject:onos-yang-runtime:2.4.1',
+  out = 'onos-yang-runtime-2.3.1.jar',
+  url = 'mvn:org.onosproject:onos-yang-runtime:jar:2.3.1',
+  sha1 = 'b5da218f5841a39787aff51a58d154a76f07d249',
+  maven_coords = 'org.onosproject:onos-yang-runtime:2.3.1',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'onos-yang-serializers-json',
-  out = 'onos-yang-serializers-json-2.4.1.jar',
-  url = 'mvn:org.onosproject:onos-yang-serializers-json:jar:2.4.1',
-  sha1 = '78fa5693549453c1ead06404196c14db06abb82e',
-  maven_coords = 'org.onosproject:onos-yang-serializers-json:2.4.1',
+  out = 'onos-yang-serializers-json-2.3.1.jar',
+  url = 'mvn:org.onosproject:onos-yang-serializers-json:jar:2.3.1',
+  sha1 = '8f101d36ebcb14176121ddfddd15599c07967138',
+  maven_coords = 'org.onosproject:onos-yang-serializers-json:2.3.1',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'onos-yang-serializers-xml',
-  out = 'onos-yang-serializers-xml-2.4.1.jar',
-  url = 'mvn:org.onosproject:onos-yang-serializers-xml:jar:2.4.1',
-  sha1 = '42e43a7ede05451d94107d185d6658c57a72baf5',
-  maven_coords = 'org.onosproject:onos-yang-serializers-xml:2.4.1',
+  out = 'onos-yang-serializers-xml-2.3.1.jar',
+  url = 'mvn:org.onosproject:onos-yang-serializers-xml:jar:2.3.1',
+  sha1 = '58090e77105c6f0cbf594b7130263056d4f9a473',
+  maven_coords = 'org.onosproject:onos-yang-serializers-xml:2.3.1',
   visibility = [ 'PUBLIC' ],
 )
 
 remote_jar (
   name = 'onos-yang-serializers-utils',
-  out = 'onos-yang-serializers-utils-2.4.1.jar',
-  url = 'mvn:org.onosproject:onos-yang-serializers-utils:jar:2.4.1',
-  sha1 = '8fa9c76821c976f42b548794caeda69e9391facc',
-  maven_coords = 'org.onosproject:onos-yang-serializers-utils:2.4.1',
+  out = 'onos-yang-serializers-utils-2.3.1.jar',
+  url = 'mvn:org.onosproject:onos-yang-serializers-utils:jar:2.3.1',
+  sha1 = '58d6d3a6b10e236b1b65230a02cd7c2389478645',
+  maven_coords = 'org.onosproject:onos-yang-serializers-utils:2.3.1',
   visibility = [ 'PUBLIC' ],
 )
 
diff --git a/lib/deps.json b/lib/deps.json
index ede7521..223f4e71 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -247,13 +247,13 @@
     "aries-util": "mvn:org.apache.aries:org.apache.aries.util:1.1.1",
     "guava20": "mvn:com.google.guava:guava:20.0",
 
-    // Note update BVER in tools/dev/bin/patch-yang-libs and YANG_VER in tools/build/onos-buck
-    "onos-yang-model":"mvn:org.onosproject:onos-yang-model:2.4.1",
-    "onos-yang-compiler-api":"mvn:org.onosproject:onos-yang-compiler-api:2.4.1",
-    "onos-yang-runtime":"mvn:org.onosproject:onos-yang-runtime:2.4.1",
-    "onos-yang-serializers-json":"mvn:org.onosproject:onos-yang-serializers-json:2.4.1",
-    "onos-yang-serializers-xml":"mvn:org.onosproject:onos-yang-serializers-xml:2.4.1",
-    "onos-yang-serializers-utils":"mvn:org.onosproject:onos-yang-serializers-utils:2.4.1",
+    // Note: update BVER in tools/dev/bin/patch-yang-libs
+    "onos-yang-model":"mvn:org.onosproject:onos-yang-model:2.3.1",
+    "onos-yang-compiler-api":"mvn:org.onosproject:onos-yang-compiler-api:2.3.1",
+    "onos-yang-runtime":"mvn:org.onosproject:onos-yang-runtime:2.3.1",
+    "onos-yang-serializers-json":"mvn:org.onosproject:onos-yang-serializers-json:2.3.1",
+    "onos-yang-serializers-xml":"mvn:org.onosproject:onos-yang-serializers-xml:2.3.1",
+    "onos-yang-serializers-utils":"mvn:org.onosproject:onos-yang-serializers-utils:2.3.1",
     "org.apache.servicemix.bundles.dom4j":"mvn:org.apache.servicemix.bundles:org.apache.servicemix.bundles.dom4j:1.6.1_5",
     "plexus-utils": "mvn:org.codehaus.plexus:plexus-utils:3.0.24",
     "sshd-core": "mvn:org.apache.sshd:sshd-core:1.4.0",
diff --git a/lib/pom.xml b/lib/pom.xml
index 95f5640..8cc00c4 100644
--- a/lib/pom.xml
+++ b/lib/pom.xml
@@ -40,7 +40,7 @@
         <netty4.version>4.1.8.Final</netty4.version>
         <openflowj.version>3.2.0.onos</openflowj.version>
         <onos-maven-plugin.version>1.11</onos-maven-plugin.version>
-        <onos-yang-tools.version>2.4</onos-yang-tools.version>
+        <onos-yang-tools.version>2.3.1</onos-yang-tools.version>
         <osgi.version>5.0.0</osgi.version>
         <karaf.version>3.0.8</karaf.version>
         <jersey.version>2.25.1</jersey.version>
diff --git a/tools/build/onos-buck b/tools/build/onos-buck
index 70c4414..ff8893c 100755
--- a/tools/build/onos-buck
+++ b/tools/build/onos-buck
@@ -5,11 +5,11 @@
 
 set -e
 
-BUCK_URL="http://repo1.maven.org/maven2/org/onosproject/onos-buck/v2018.02.09.01/buck-v2018.02.09.01.zip"
-BUCK_SHA="45d8bd28f441991257babf89f7a317edb3a2b536"
+BUCK_URL="http://repo1.maven.org/maven2/org/onosproject/onos-buck/v2018.01.17.01/buck-v2018.01.17.01.zip"
+BUCK_SHA="4a70a84ef40a06762a7248db25590696e80af9fe"
 
 # onos-yang-tools buck plugin version
-YANG_VER="2.4.1"
+YANG_VER="2.3.1"
 
 [  "-U" = "$1" ] && shift && FORCE_UPDATE=True
 
diff --git a/tools/dev/bin/patch-yang-libs b/tools/dev/bin/patch-yang-libs
index 2686836..fd119b3 100755
--- a/tools/dev/bin/patch-yang-libs
+++ b/tools/dev/bin/patch-yang-libs
@@ -3,8 +3,8 @@
 # Patches lib/BUCK file to use locally built YANG tools.
 # -----------------------------------------------------------------------------
 
-BVER=2.4
-SVER=2.5-SNAPSHOT
+BVER=2.3.1
+SVER=2.4-SNAPSHOT
 
 YANG_TOOLS_ROOT=${YANG_TOOLS_ROOT:-~/onos-yang-tools}