Simplify enumeration handling

Use getName() on the java object instead of relying on a mapping file created by yang2props

Change-Id: Ie3405903af5211c019c93a9a0b49ba9159b0bbe2
Issue-ID: CCSDK-227
Signed-off-by: Smokowski, Kevin (ks6305) <ks6305@att.com>
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
index 7610151..b652c43 100644
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
@@ -56,6 +56,7 @@
         setYangMappingProperties(input);
     }
 
+    @Deprecated
     public static void setYangMappingProperties(Properties properties) {
         for (Object propNameObj : properties.keySet()) {
             String propName = (String) propNameObj;
@@ -63,6 +64,7 @@
         }
     }
 
+    @Deprecated
     public static void loadProperties(String propertiesFile) {
         File file = new File(propertiesFile);
         Properties properties = new Properties();
@@ -186,8 +188,9 @@
                                 }
                                 if (retValue != null) {
                                     String propName = propNamePfx + "." + fieldName;
-                                    propVal = retValue.toString();
-                                    props.setProperty(propName, mapEnumeratedValue(fieldName, propVal));
+                                    Method method = retValue.getClass().getMethod("getName");
+                                    String yangValue = (String) method.invoke(retValue);
+                                    props.setProperty(propName, yangValue);
                                 }
                             } catch (Exception e) {
                                 LOG.error(
@@ -1333,11 +1336,13 @@
         return (false);
     }
 
+    @Deprecated
     public static String getFullPropertiesPath(String propertiesFileName) {
         return "/opt/bvc/controller/configuration/" + propertiesFileName;
     }
 
     // This is called when mapping a valid java enumeration back to the yang model value
+    @Deprecated
     public static String mapEnumeratedValue(String propertyName, String propertyValue) {
         LOG.info("mapEnumeratedValue called with propertyName=" + propertyName + " and value=" + propertyValue);
         String mappingKey = "yang." + propertyName + "." + propertyValue;