Add dummy input 86/77886/1
authorTimoney, Dan (dt5972) <dtimoney@att.com>
Tue, 5 Feb 2019 16:17:44 +0000 (11:17 -0500)
committerTimoney, Dan (dt5972) <dtimoney@att.com>
Tue, 5 Feb 2019 16:17:44 +0000 (11:17 -0500)
Fluorine version of restconf does not handle RPCs with no input
correctly.  So, need to work around that by defining dummy input
for SLI-API vlbcheck and healthcheck APIs

Change-Id: I6a78a899937e1bb9bd7674530166a493875ca3bf
Issue-ID: CCSDK-1035
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
dblib/provider/src/main/java/org/onap/ccsdk/sli/core/dblib/DBResourceManager.java
sliapi/model/src/main/yang/sliapi.yang

index 0b8c565..236bce6 100755 (executable)
@@ -97,6 +97,7 @@ public class DBResourceManager implements DataSource, DataAccessor, DBResourceOb
         // TODO : hack to force classloader to cache mariadb driver.  This shouldnt be necessary,
         // but for some reason it is (without this, dblib throws ClassNotFound on mariadb driver
         // and fails to load).
+        LOGGER.info("Creating dummy instance of org.mariadb.jdbc.Driver");
         Driver dvr = new org.mariadb.jdbc.Driver();
         dvr = null;
 
index 98cbb2a..b3272be 100755 (executable)
@@ -103,12 +103,25 @@ module SLI-API {
     }
 
     rpc healthcheck {
+       // OpenDaylight Fluorine version of restconf cannot handle RPCs with no input
+       input {
+               leaf dummy {
+                       type string;
+               }
+       }
         output {
             uses response-fields;
         }
     }
 
     rpc vlbcheck {
+       // OpenDaylight Fluorine version of restconf cannot handle RPCs with no input
+       input {
+               leaf dummy
+               {
+                       type string;
+               }
+       }
         output {
             uses response-fields;
         }