BUG-6875: adjust for yangtools requiring getYangVersion working 06/51806/1
authorRobert Varga <rovarga@cisco.com>
Mon, 13 Feb 2017 17:33:05 +0000 (18:33 +0100)
committerRobert Varga <rovarga@cisco.com>
Mon, 13 Feb 2017 17:33:05 +0000 (18:33 +0100)
ModuleDependencySort requires a correct YangVersion, fake version 1.

Change-Id: I2877ee1a5ee1e7d3b56e7bf47c9c422a782b59a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/base/services/impl/FakeRestconfModule.java

index 4551acc2ee6691264c799dcba116a12e66b11ca2..3d73d22075fcb92e58d0f5c1397709cce5734c7a 100644 (file)
@@ -20,6 +20,7 @@ import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
+import org.opendaylight.yangtools.yang.common.YangVersion;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
@@ -130,27 +131,27 @@ final class FakeRestconfModule implements Module {
 
     @Override
     public String getYangVersion() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        return YangVersion.VERSION_1.toString();
     }
 
     @Override
     public String getDescription() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public String getReference() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public String getOrganization() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public String getContact() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
@@ -165,47 +166,46 @@ final class FakeRestconfModule implements Module {
 
     @Override
     public Set<FeatureDefinition> getFeatures() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public Set<NotificationDefinition> getNotifications() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public Set<AugmentationSchema> getAugmentations() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public Set<RpcDefinition> getRpcs() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public Set<Deviation> getDeviations() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public Set<IdentitySchemaNode> getIdentities() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public List<ExtensionDefinition> getExtensionSchemaNodes() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public List<UnknownSchemaNode> getUnknownSchemaNodes() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
 
     @Override
     public String getSource() {
-        throw new UnsupportedOperationException("Not supported operations.");
+        throw new UnsupportedOperationException("Operation not implemented.");
     }
-
 }