diff --git a/sdnr/wt/data-provider/database/pom.xml b/sdnr/wt/data-provider/database/pom.xml
new file mode 100644
index 0000000..444cd59
--- /dev/null
+++ b/sdnr/wt/data-provider/database/pom.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.sdnr.wt.data-provider.model
+ * ================================================================================
+ * Copyright (C) 2018 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+	<artifactId>sdnr-wt-data-provider-database</artifactId>
+	<version>0.7.0-SNAPSHOT</version>
+	<name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+	<packaging>bundle</packaging>
+
+	<parent>
+		<groupId>org.onap.ccsdk.parent</groupId>
+		<artifactId>binding-parent</artifactId>
+		<version>1.5.1-SNAPSHOT</version>
+		<relativePath />
+	</parent>
+
+	<properties>
+		<maven.javadoc.skip>true</maven.javadoc.skip>
+		<databaseport>49401</databaseport>
+	</properties>
+
+	<licenses>
+		<license>
+			<name>Apache License, Version 2.0</name>
+			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
+		</license>
+	</licenses>
+
+	<dependencies>
+		 <dependency>
+		    <groupId>org.mockito</groupId>
+		    <artifactId>mockito-core</artifactId>
+		    <scope>test</scope>
+	    </dependency>
+		<dependency>
+			<groupId>org.opendaylight.netconf</groupId>
+	 		<artifactId>sal-netconf-connector</artifactId>
+			<scope>provided</scope>
+		</dependency>
+<!-- 		<dependency> -->
+<!-- 			<groupId>org.json</groupId> -->
+<!-- 			<artifactId>json</artifactId> -->
+<!-- 			<scope>provided</scope> -->
+<!-- 		</dependency> -->
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>sdnr-wt-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>sdnr-wt-data-provider-model</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+<!-- 		<dependency> -->
+<!-- 			<groupId>org.elasticsearch.client</groupId> -->
+<!-- 			<artifactId>elasticsearch-rest-client</artifactId> -->
+<!-- 			<version>6.4.3</version> -->
+<!-- 		</dependency> -->
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>**/gen/**</exclude>
+						<exclude>**/generated-sources/**</exclude>
+						<exclude>**/yang-gen-sal/**</exclude>
+						<exclude>**/pax/**</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>exec-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>generateDTOs</id>
+						<phase>generate-sources</phase>
+					    <goals>
+        					<goal>exec</goal>
+				      	</goals>
+      				  	<configuration>
+      					  	<skip>${skipTests}</skip>
+                      		<executable>${basedir}/src/main/resources/es-init.sh</executable>
+       		                <arguments>
+       		                	<argument>initfile</argument>
+       		                	<argument>-f</argument>
+                    			<argument>${project.build.directory}/EsInit.script</argument>
+                    		</arguments>
+      					</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>com.github.alexcojocaru</groupId>
+				<artifactId>elasticsearch-maven-plugin</artifactId>
+				<version>6.16</version>
+				<configuration>
+					<skip>true</skip>
+					<clusterName>testCluster</clusterName>
+					<transportPort>9500</transportPort>
+					<httpPort>${databaseport}</httpPort>
+					<version>6.4.3</version>
+					<pathInitScript>${project.build.directory}/EsInit.script</pathInitScript>
+				</configuration>
+				<executions>
+					<execution>
+						<id>start-elasticsearch</id>
+						<phase>process-test-classes</phase>
+						<goals>
+							<goal>runforked</goal>
+						</goals>
+					</execution>
+					<execution>
+						<id>stop-elasticsearch</id>
+						<phase>prepare-package</phase>
+						<goals>
+							<goal>stop</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<systemProperties>
+						<property>
+							<name>databaseport</name>
+							<value>${databaseport}</value>
+						</property>
+					</systemProperties>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/base/netconf/util/InternalConnectionStatus.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/base/netconf/util/InternalConnectionStatus.java
new file mode 100644
index 0000000..81876b7
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/base/netconf/util/InternalConnectionStatus.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+
+package org.onap.ccsdk.features.sdnr.wt.base.netconf.util;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeConnectionStatus.ConnectionStatus;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ConnectionLogStatus;
+
+public class InternalConnectionStatus {
+	public static ConnectionLogStatus statusFromNodeStatus(ConnectionStatus nodeStatus) {
+		switch(nodeStatus) {
+		case Connected:
+			return ConnectionLogStatus.Connected;
+		case Connecting:
+			return ConnectionLogStatus.Connecting;
+		case UnableToConnect:
+			return ConnectionLogStatus.UnableToConnect;
+		default:
+			return ConnectionLogStatus.Undefined;
+		}
+	}
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/base/netconf/util/NetconfTimeStamp.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/base/netconf/util/NetconfTimeStamp.java
new file mode 100644
index 0000000..4857da6
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/base/netconf/util/NetconfTimeStamp.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.base.netconf.util;
+
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
+import java.util.Date;
+
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 2019/06/17 Redesign to ZonedDateTime because of sync problems.
+ *
+ * Function is handling the NETCONF and the format used by database and restconf communication.
+ *
+ * Input supported for the formats used in NETCONF messages:
+ *
+ * Format1 ISO 8601 2017-01-18T11:44:49.482-05:00
+ *
+ * Format2 NETCONF - pattern from ietf-yang-types "2013-07-15" Pattern:
+ * "\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-](\d{2}):(\d{2}))"
+ *
+ * Format3 NETCONF DateAndTime CoreModel-CoreFoundationModule-TypeDefinitions vom
+ * 2016-07-01 Example1: 20170118114449.1Z Example2: 20170118114449.1-0500 Pattern:
+ * "\d{4}\d{2}\d{2}\d{2}\d{2}\d{2}.\d+?(Z|[\+\-](\d{2})(\d{2}))" typedef DateAndTime { description
+ * "This primitive type defines the date and time according to the following structure:
+ * 'yyyyMMddhhmmss.s[Z|{+|-}HHMm]' where: yyyy '0000'..'9999' year MM '01'..'12' month dd '01'..'31'
+ * day hh '00'..'23' hour mm '00'..'59' minute ss '00'..'59' second s '.0'..'.9' tenth of second
+ * (set to '.0' if EMS or NE cannot support this granularity) Z 'Z' indicates UTC (rather than local
+ * time) {+|-} '+' or '-' delta from UTC HH '00'..'23' time zone difference in hours Mm '00'..'59'
+ * time zone difference in minutes."; type string; } Format4 E/// specific Example1:
+ * 2017-01-23T13:32:38-05:00 Example2: 2017-01-23T13:32-05:00
+ *
+ * Input formats netconfTime as String according the formats given above
+ *
+ * Return format is String in ISO8601 Format for database and presentation.
+ *
+ * Example formats:
+ *    1) ISO8601. Example 2017-01-18T11:44:49.482-05:00
+ *    2) Microwave ONF. Examples 20170118114449.1Z, 20170118114449.1-0500
+ *    3.1) Ericson. Example: 2017-01-23T13:32:38-05:00
+ *    3.2) Ericson. Example: 2017-01-23T13:32-05:00
+ *          Always 10 Groups,
+ *          1:Year 2:Month 3:day 4:Hour 5:minute 6:optional sec 7:optional ms 8:optional Z or 9:offset
+ *           signedhour 10:min
+ *
+ * Template:
+ *     private static final NetconfTimeStamp NETCONFTIME_CONVERTER = NetconfTimeStamp.getConverter();
+ */
+
+public class NetconfTimeStamp {
+    private static final Logger LOG = LoggerFactory.getLogger(NetconfTimeStamp.class);
+
+    private static final NetconfTimeStamp CONVERTER = new NetconfTimeStamp();
+
+    /**
+     * Specify the input format expected from netconf, and from specific devices.
+     */
+    private static DateTimeFormatter formatterInput = DateTimeFormatter.ofPattern(""
+            + "[yyyy-MM-dd'T'HH:mm[:ss][.SSS][.SS][.S][xxx][xx][X][Z]]"
+            + "[yyyyMMddHHmmss[.SSS][.SS][.S][xxx][xx][X][Z]]"
+            ).withZone(ZoneOffset.UTC);
+
+    /**
+     * Specify output format that is used internally
+     */
+    private static DateTimeFormatter formatterOutput = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.S'Z'")
+            .withZone(ZoneOffset.UTC);
+
+    /**
+     * Use static access
+     */
+    private NetconfTimeStamp() {
+    }
+
+    /*
+     * ------------------------------------ Public function
+     */
+
+    /**
+     * Use this function to get the converter
+     * @return global converter
+     */
+    public static NetconfTimeStamp getConverter() {
+        return CONVERTER;
+    }
+
+    /**
+     * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format
+     *
+     * @return String with Date in NETCONF/YANG Format Version 1.0.
+     */
+    public String getTimeStampAsNetconfString() {
+        return ZonedDateTime.now(ZoneOffset.UTC).format(formatterOutput);
+    }
+
+    /**
+     * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format
+
+     * @return String with Date in NETCONF/YANG Format Version 1.0.
+     */
+    public String getTimeStampAsNetconfString(Date date) {
+        return ZonedDateTime.ofInstant(date.toInstant(),ZoneOffset.UTC).format(formatterOutput);
+    }
+
+
+
+    /**
+     * Get actual timestamp as NETCONF specific type NETCONF/YANG 1.0 Format in GMT
+     *
+     * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0.
+     */
+    public DateAndTime getTimeStamp() {
+        return DateAndTime.getDefaultInstance(getTimeStampAsNetconfString());
+    }
+
+    /**
+     * Get time from date as NETCONF specific type NETCONF/YANG 1.0 Format in GMT
+     * @param date specifying the date and time
+     * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0.
+     */
+    public DateAndTime getTimeStamp(Date date) {
+        return DateAndTime.getDefaultInstance(getTimeStampAsNetconfString(date));
+    }
+    /**
+     * Get time from date as NETCONF specific type NETCONF/YANG 1.0 Format in GMT
+     * @param date specifying the date and time
+     * @return DateAndTime Type 1.0. Date in NETCONF/YANG Format Version 1.0.
+     */
+    public DateAndTime getTimeStamp(String date) {
+        return DateAndTime.getDefaultInstance(date);
+    }
+
+    /**
+     * Return the String with a NETCONF time converted to long
+     *
+     * @param netconfTime as String according the formats given above
+     * @return Epoch milliseconds
+     * @throws IllegalArgumentException In case of no compliant time format definition for the string
+     */
+    public long getTimeStampFromNetconfAsMilliseconds(String netconfTime) throws IllegalArgumentException {
+        try {
+            long utcMillis = doParse(netconfTime).toInstant().toEpochMilli();
+            return utcMillis;
+        } catch (DateTimeParseException e) {
+            throw new IllegalArgumentException(
+                    "No pattern for NETCONF data string: " + netconfTime + " Msg:" + e.getMessage());
+        }
+       }
+
+    /**
+     * Deliver String result.
+     *
+     * @param netconfTime as String according the formats given above
+     * @return If successful: String in ISO8601 Format for database and presentation. If "wrong formed
+     *         input" the Input string with the prefix "Maleformed date" is delivered back.
+     */
+    public String getTimeStampFromNetconf(String netconfTime) {
+        try {
+            String inputUTC = doParse(netconfTime).format(formatterOutput);
+            return inputUTC;
+        } catch (Exception e) {
+            LOG.info(e.getMessage());
+         }
+        LOG.debug("No pattern for NETCONF data string: {}", netconfTime);
+        return "Malformed date: " + netconfTime; // Error handling
+    }
+
+    /*----------------------------------------------------
+     * Private functions
+     */
+
+    private OffsetDateTime doParse(String netconfTime) {
+        return OffsetDateTime.parse(netconfTime, formatterInput);
+    }
+
+    public Date getDateFromNetconf(String netconfTime) {
+        return Date.from(LocalDateTime.parse(netconfTime, formatterInput).atZone(ZoneOffset.UTC).toInstant());
+    }
+
+    public String getTimeStampAsNetconfString(LocalDateTime dt) {
+        return formatterOutput.format(dt);
+    }
+
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/EsDataObjectReaderWriter.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/EsDataObjectReaderWriter.java
new file mode 100644
index 0000000..ac67602
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/EsDataObjectReaderWriter.java
@@ -0,0 +1,339 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.database;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.onap.ccsdk.features.sdnr.wt.common.database.DatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchHit;
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.yangtools.YangToolsMapper;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
+import org.opendaylight.yangtools.concepts.Builder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+/**
+ * Class to rw yang-tool generated objects into elasticsearch database. For "ES _id" exchange the esIdAddAtributteName is used.
+ * This attribute mast be of type String and contains for read and write operations the object id.
+ * The function can be used without id handling.
+ * If id handling is required the parameter needs to be specified by class definition in yang and  setting the name by using setAttributeName()
+ *
+ * @param <T> Yang tools generated class object.
+ */
+public class EsDataObjectReaderWriter<T extends DataObject> {
+
+ 	private final Logger LOG = LoggerFactory.getLogger(EsDataObjectReaderWriter.class);
+
+ 	/** Typename for elastic search data schema **/
+	private String dataTypeName;
+
+	/** Elasticsearch Database client to be used **/
+	private DatabaseClient db;
+
+	/** Mapper with configuration to use opendaylight yang-tools builder pattern for object creation **/
+	private YangToolsMapper yangtoolsMapper;
+
+	/** Class of T as attribute to allow JSON to Class object mapping **/
+	private Class<T> clazz;
+
+	/** Field is used to write id. If null no id handling **/
+	private @Nullable Field field;
+
+	/** Attribute that is used as id field for the database object **/
+	private @Nullable String esIdAddAtributteName;
+
+	/** Interface to be used for write operations. Rule for write: T extends S and  **/
+	private Class<? extends DataObject> writeInterfaceClazz; // == "S"
+
+	/**
+	 * Elasticsearch database read and write for specific class, defined by opendaylight yang-tools.
+	 *
+	 * @param db Database access client
+	 * @param dataTypeName typename in database schema
+	 * @param clazz class of type to be handled
+	 * @throws ClassNotFoundException
+	 */
+	public EsDataObjectReaderWriter(DatabaseClient db, Entity dataTypeName, Class<T> clazz) throws ClassNotFoundException {
+		this(db, dataTypeName.getName(), clazz);
+	}
+	public EsDataObjectReaderWriter(DatabaseClient db, String dataTypeName, Class<T> clazz) throws ClassNotFoundException {
+		LOG.info("Create {} for datatype {} class {}", this.getClass().getName(), dataTypeName, clazz.getName());
+
+		this.esIdAddAtributteName = null;
+		this.field = null;
+		this.writeInterfaceClazz = clazz;
+		this.db = db;
+		this.dataTypeName = dataTypeName;
+		this.yangtoolsMapper = new YangToolsMapper();
+		//this.yangtoolsMapper.assertBuilderClass(clazz);
+		this.clazz = clazz;
+//
+//		if (! db.isExistsIndex(dataTypeName)) {
+//			throw new IllegalArgumentException("Index "+dataTypeName+" not existing.");
+//		}
+	}
+
+	public String getDataTypeName() {
+		return dataTypeName;
+	}
+	public Class<T> getClazz() {
+		return clazz;
+	}
+	/**
+	 * Simlar to {@link #setEsIdAttributeName()}, but adapts the parameter to yangtools attribute naming schema
+	 * @param esIdAttributeName is converted to UnderscoreCamelCase
+	 * @return this for further operations.
+	 */
+	public EsDataObjectReaderWriter<T> setEsIdAttributeNameCamelized(String esIdAttributeName) {
+		return setEsIdAttributeName(YangToolsMapper.toCamelCaseAttributeName(esIdAttributeName));
+	}
+
+	/**
+	 * Attribute name of class that is containing the object id
+	 * @param esIdAttributeName of the implementation class for the yangtools interface.
+	 *        Expected attribute name format is CamelCase with leading underline. @
+	 * @return this for further operations.
+	 * @throws SecurityException if no access or IllegalArgumentException if wrong type or no attribute with this name.
+	 */
+	public EsDataObjectReaderWriter<T> setEsIdAttributeName(String esIdAttributeName) {
+		LOG.debug("Set attribute '{}'", esIdAttributeName);
+		this.esIdAddAtributteName = null; // Reset status
+		this.field = null;
+
+		Field attributeField;
+		try {
+			Builder<T> builder = yangtoolsMapper.getBuilder(clazz);
+			T object = builder.build();
+			attributeField = object.getClass().getDeclaredField(esIdAttributeName);
+			if (attributeField.getType().equals(String.class)) {
+				attributeField.setAccessible(true);
+				this.esIdAddAtributteName = esIdAttributeName; //Set new status if everything OK
+				this.field = attributeField;
+			} else {
+				String msg = "Wrong field type " + attributeField.getType().getName() + " of " + esIdAttributeName;
+				LOG.debug(msg);
+				throw new IllegalArgumentException(msg);
+			}
+		} catch (NoSuchFieldException e) {
+			// Convert to run-time exception
+			String msg = "NoSuchFieldException for '" + esIdAttributeName + "' in class " + clazz.getName();
+			LOG.debug(msg);
+			throw new IllegalArgumentException(msg);
+		} catch (SecurityException e) {
+			LOG.debug("Access problem "+esIdAttributeName,e);
+			throw e;
+		}
+		return this;
+	}
+
+	/**
+	 * Specify subclass of T for write operations.
+	 * @param writeInterfaceClazz
+	 */
+	public EsDataObjectReaderWriter<T> setWriteInterface( @Nonnull Class<? extends DataObject> writeInterfaceClazz ) {
+		LOG.debug("Set write interface to {}", writeInterfaceClazz);
+		if (writeInterfaceClazz == null)
+			throw new IllegalArgumentException("Null not allowed here.");
+
+		this.writeInterfaceClazz = writeInterfaceClazz;
+		return this;
+	}
+
+	/**
+	 * Write child object to database with specific id
+	 * @param object
+	 * @param @Nullable esId use the id or if null generate unique id
+	 * @return String with id or null
+	 */
+	public @Nullable <S extends DataObject> String write(S object, @Nullable String esId) {
+		if (writeInterfaceClazz.isInstance(object)) {
+			try {
+				String json = yangtoolsMapper.writeValueAsString(object);
+				return db.doWriteRaw(dataTypeName, esId, json);
+			} catch (JsonProcessingException e) {
+				LOG.error("Write problem: ", e);
+			}
+		} else {
+			LOG.error("Type {} does not provide interface {}", object!=null?object.getClass().getName():"null",
+					writeInterfaceClazz.getName());
+		}
+		return null;
+	}
+	/**
+	 * Update partial child object to database with match/term query
+	 * @param object
+	 * @param esId
+	 * @return String with esId or null
+	 */
+	public @Nullable <S extends DataObject> String update(S object, QueryBuilder query) {
+		if (writeInterfaceClazz.isInstance(object)) {
+			try {
+				String json = yangtoolsMapper.writeValueAsString(object);
+				return db.doUpdate(this.dataTypeName,json,query);
+			} catch (JsonProcessingException e) {
+				LOG.error("Update problem: ", e);
+			}
+		} else {
+			LOG.error("Type {} does not provide interface {}", object!=null?object.getClass().getName():"null",
+					writeInterfaceClazz.getName());
+		}
+		return null;
+	}
+	/**
+	 * Write/ update partial child object to database with specific id Write if not
+	 * exists, else update
+	 * @param object
+	 * @param esId
+	 * @return String with esId or null
+	 */
+	public @Nullable <S extends DataObject> String update(S object, String esId) {
+		return this.update(object, esId,null);
+	}
+	public @Nullable <S extends DataObject> String update(S object, String esId,List<String> onylForInsert) {
+		if (writeInterfaceClazz.isInstance(object)) {
+			try {
+				String json = yangtoolsMapper.writeValueAsString(object);
+				return db.doUpdateOrCreate(dataTypeName, esId, json,onylForInsert);
+			} catch (JsonProcessingException e) {
+				LOG.error("Update problem: ", e);
+			}
+		} else {
+			LOG.error("Type {} does not provide interface {}", object!=null?object.getClass().getName():"null",
+					writeInterfaceClazz.getName());
+		}
+		return null;
+	}
+
+    /**
+     * Read object from database, by using the id field
+     * @param object
+     * @return
+     */
+    public @Nullable T read(String esId) {
+    	@Nullable T res = (T)null;
+		if (esId != null) {
+			String json = db.doReadJsonData(dataTypeName, esId);
+			try {
+				res = yangtoolsMapper.readValue(json.getBytes(), clazz);
+			} catch (IOException e) {
+				LOG.error("Problem: ", e);
+			}
+		}
+        return res;
+    }
+
+    /**
+     * Remove object
+     * @param esId to identify the object.
+     * @return success
+     */
+    public boolean remove(String esId) {
+    	return db.doRemove(this.dataTypeName, esId);
+    }
+
+	public int remove(QueryBuilder query) {
+		return this.db.doRemove(this.dataTypeName, query);
+	}
+    /**
+     * Get all elements of related type
+     * @return all Elements
+     */
+    public SearchResult<T> doReadAll() {
+        return doReadAll(null);
+    }
+    public SearchResult<T> doReadAll(QueryBuilder query) {
+    	return this.doReadAll(query,false);
+	}
+    /**
+     * Read all existing objects of a type
+     * @param query for the elements
+     * @return the list of all objects
+     */
+
+    public SearchResult<T> doReadAll(QueryBuilder query, boolean ignoreException) {
+
+    	SearchResult<T> res = new SearchResult<T>();
+        int idx = 0;                //Idx for getAll
+        int iterateLength = 100;    //Step width for iterate
+
+        SearchResult<SearchHit> result;
+        List<SearchHit> hits;
+        do {
+            if(query!=null) {
+                LOG.debug("read data in {} with query {}",dataTypeName,query.toJSON());
+                result=db.doReadByQueryJsonData( dataTypeName, query,ignoreException);
+            }
+            else {
+            	result = db.doReadAllJsonData(dataTypeName,ignoreException);
+            }
+            hits=result.getHits();
+            LOG.debug("Read: {} elements: {}  Failures: {}",dataTypeName,hits.size(), yangtoolsMapper.getMappingFailures());
+
+            T object;
+            idx += result.getHits().size();
+			for (SearchHit hit : hits) {
+				object = getT(hit.getSourceAsString());
+				LOG.debug("Mapp Object: {}\nSource: '{}'\nResult: '{}'\n Failures: {}", hit.getId(),
+						hit.getSourceAsString(), object, yangtoolsMapper.getMappingFailures());
+				if (object != null) {
+					setEsId(object, hit.getId());
+					res.add(object);
+				} else {
+					LOG.warn("Mapp result null Object: {}\n Source: '{}'\n : '", hit.getId(), hit.getSourceAsString());
+				}
+			}
+
+		} while (hits.size() == iterateLength); // Do it until end indicated, because less hits than iterateLength
+												// allows.
+        res.setTotal(result.getTotal());
+        return res;
+    }
+
+	/* ---------------------------------------------
+     * Private functions
+     */
+
+	private void setEsId(T object, String esId) {
+		if (field != null) {
+			try {
+				field.set(object, esId);
+			} catch (IllegalArgumentException | IllegalAccessException e) {
+				LOG.debug("Field set problem.", e);			}
+		}
+	}
+
+    private @Nullable T getT(String jsonString) {
+    	try {
+			return yangtoolsMapper.readValue( jsonString, clazz );
+		} catch (IOException e) {
+			LOG.info("Mapping problem", e);
+			return (T)null;
+		}
+    }
+
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/EsDataObjectReaderWriter2.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/EsDataObjectReaderWriter2.java
new file mode 100644
index 0000000..b585b0c
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/EsDataObjectReaderWriter2.java
@@ -0,0 +1,360 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.database;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.onap.ccsdk.features.sdnr.wt.common.database.DatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchHit;
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.yangtools.YangToolsMapper;
+import org.onap.ccsdk.features.sdnr.wt.yangtools.YangToolsMapper2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
+import org.opendaylight.yangtools.concepts.Builder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+/**
+ * Class to rw yang-tool generated objects into elasticsearch database. For "ES _id" exchange the esIdAddAtributteName is used.
+ * This attribute mast be of type String and contains for read and write operations the object id.
+ * The function can be used without id handling.
+ * If id handling is required the parameter needs to be specified by class definition in yang and  setting the name by using setAttributeName()
+ *
+ * Due to using Jackson base interfaces the org.eclipse.jdt.annotation.NonNull needs to be used here to get rid of warnings
+ *
+ * @param <T> Yang tools generated class object.
+ */
+public class EsDataObjectReaderWriter2<T extends DataObject> {
+
+     private final Logger LOG = LoggerFactory.getLogger(EsDataObjectReaderWriter2.class);
+
+     /** Typename for elastic search data schema **/
+    private String dataTypeName;
+
+    /** Elasticsearch Database client to be used **/
+    private DatabaseClient db;
+
+    /** Mapper with configuration to use opendaylight yang-tools builder pattern for object creation **/
+    private YangToolsMapper2<T> yangtoolsMapper;
+
+    /** Class of T as attribute to allow JSON to Class object mapping **/
+    private Class<T> clazz;
+
+    /** Field is used to write id. If null no id handling **/
+    private @Nullable Field field;
+
+    /** Attribute that is used as id field for the database object **/
+    private @Nullable String esIdAddAtributteName;
+
+    /** Interface to be used for write operations. Rule for write: T extends S and  **/
+    private Class<? extends DataObject> writeInterfaceClazz; // == "S"
+
+    /**
+     * Elasticsearch database read and write for specific class, defined by opendaylight yang-tools.
+     *
+     * @param db Database access client
+     * @param dataTypeName typename in database schema
+     * @param clazz class of type to be handled
+     * @throws ClassNotFoundException
+     */
+    public <X extends T, @NonNull B extends Builder<X>> EsDataObjectReaderWriter2(DatabaseClient db, Entity dataTypeName, @Nonnull Class<T> clazz, @Nullable  Class<B> builderClazz) throws ClassNotFoundException {
+        this(db, dataTypeName.getName(), clazz, builderClazz);
+    }
+    public <X extends T, @NonNull B extends Builder<X>> EsDataObjectReaderWriter2(DatabaseClient db, Entity dataTypeName, @Nonnull Class<T> clazz) throws ClassNotFoundException {
+        this(db, dataTypeName.getName(), clazz, null);
+    }
+    public <X extends T, @NonNull  B extends Builder<X>> EsDataObjectReaderWriter2(DatabaseClient db, String dataTypeName, @Nonnull Class<T> clazz, @Nullable Class<B>  builderClazz) throws ClassNotFoundException {
+        LOG.info("Create {} for datatype {} class {}", this.getClass().getName(), dataTypeName, clazz.getName());
+
+        this.esIdAddAtributteName = null;
+        this.field = null;
+        this.writeInterfaceClazz = clazz;
+        this.db = db;
+        this.dataTypeName = dataTypeName;
+        this.yangtoolsMapper = new YangToolsMapper2<>(clazz, builderClazz);
+        this.clazz = clazz;
+    }
+
+    /**
+     * Simlar to {@link #setEsIdAttributeName()}, but adapts the parameter to yangtools attribute naming schema
+     * @param esIdAttributeName is converted to UnderscoreCamelCase
+     * @return this for further operations.
+     */
+    public EsDataObjectReaderWriter2<T> setEsIdAttributeNameCamelized(String esIdAttributeName) {
+        return setEsIdAttributeName(YangToolsMapper.toCamelCaseAttributeName(esIdAttributeName));
+    }
+
+    /**
+     * Attribute name of class that is containing the object id
+     * @param esIdAttributeName of the implementation class for the yangtools interface.
+     *        Expected attribute name format is CamelCase with leading underline. @
+     * @return this for further operations.
+     * @throws SecurityException if no access or IllegalArgumentException if wrong type or no attribute with this name.
+     */
+    public EsDataObjectReaderWriter2<T> setEsIdAttributeName(String esIdAttributeName) {
+        LOG.debug("Set attribute '{}'", esIdAttributeName);
+        this.esIdAddAtributteName = null; // Reset status
+        this.field = null;
+
+        Field attributeField;
+        try {
+            Builder<T> builder = yangtoolsMapper.getBuilder(clazz);
+            if (builder == null) {
+                String msg = "No builder for " + clazz;
+                LOG.debug(msg);
+                throw new IllegalArgumentException(msg);
+            } else {
+                T object = builder.build();
+                attributeField = object.getClass().getDeclaredField(esIdAttributeName);
+                if (attributeField.getType().equals(String.class)) {
+                    attributeField.setAccessible(true);
+                    this.esIdAddAtributteName = esIdAttributeName; // Set new status if everything OK
+                    this.field = attributeField;
+                } else {
+                    String msg = "Wrong field type " + attributeField.getType().getName() + " of " + esIdAttributeName;
+                    LOG.debug(msg);
+                    throw new IllegalArgumentException(msg);
+                }
+            }
+        } catch (NoSuchFieldException e) {
+            // Convert to run-time exception
+            String msg = "NoSuchFieldException for '" + esIdAttributeName + "' in class " + clazz.getName();
+            LOG.debug(msg);
+            throw new IllegalArgumentException(msg);
+        } catch (SecurityException e) {
+            LOG.debug("Access problem "+esIdAttributeName,e);
+            throw e;
+        }
+        return this;
+    }
+
+    /**
+     * Specify subclass of T for write operations.
+     * @param writeInterfaceClazz
+     */
+    public EsDataObjectReaderWriter2<T> setWriteInterface( @Nonnull Class<? extends DataObject> writeInterfaceClazz ) {
+        LOG.debug("Set write interface to {}", writeInterfaceClazz);
+        if (writeInterfaceClazz == null) {
+            throw new IllegalArgumentException("Null not allowed here.");
+        }
+
+        this.writeInterfaceClazz = writeInterfaceClazz;
+        return this;
+    }
+
+    public interface IdGetter<S extends DataObject> {
+        String getId(S object);
+    }
+
+    public <S extends DataObject> void write(List<S> objectList, IdGetter<S> idGetter) {
+        for (S object : objectList) {
+            write(object, idGetter.getId(object));
+        }
+    }
+
+    /**
+     * Write child object to database with specific id
+     * @param object
+     * @param @Nullable esId use the id or if null generate unique id
+     * @return String with id or null
+     */
+    public @Nullable <S extends DataObject> String write(S object, @Nullable String esId) {
+        if (writeInterfaceClazz.isInstance(object)) {
+            try {
+                String json = yangtoolsMapper.writeValueAsString(object);
+                return db.doWriteRaw(dataTypeName, esId, json);
+            } catch (JsonProcessingException e) {
+                LOG.error("Write problem: ", e);
+            }
+        } else {
+            LOG.error("Type {} does not provide interface {}", object!=null?object.getClass().getName():"null",
+                    writeInterfaceClazz.getName());
+        }
+        return null;
+    }
+    /**
+     * Update partial child object to database with match/term query
+     * @param object
+     * @param esId
+     * @return String with esId or null
+     */
+    public @Nullable <S extends DataObject> String update(S object, QueryBuilder query) {
+        if (writeInterfaceClazz.isInstance(object)) {
+            try {
+                String json = yangtoolsMapper.writeValueAsString(object);
+                return db.doUpdate(this.dataTypeName,json,query);
+            } catch (JsonProcessingException e) {
+                LOG.error("Update problem: ", e);
+            }
+        } else {
+            LOG.error("Type {} does not provide interface {}", object!=null?object.getClass().getName():"null",
+                    writeInterfaceClazz.getName());
+        }
+        return null;
+    }
+    /**
+     * Write/ update partial child object to database with specific id Write if not
+     * exists, else update
+     * @param object
+     * @param esId
+     * @return String with esId or null
+     */
+    public @Nullable <S extends DataObject> String update(S object, String esId) {
+        return this.updateOrCreate(object, esId,null);
+    }
+    /**
+     * See {@link doUpdateOrCreate(String dataTypeName, String esId, String json, List<String> doNotUpdateField) }
+     */
+    public @Nullable <S extends DataObject> String updateOrCreate(S object, String esId,List<String> onlyForInsert) {
+        if (writeInterfaceClazz.isInstance(object)) {
+            try {
+                String json = yangtoolsMapper.writeValueAsString(object);
+                return db.doUpdateOrCreate(dataTypeName, esId, json,onlyForInsert);
+            } catch (JsonProcessingException e) {
+                LOG.error("Update problem: ", e);
+            }
+        } else {
+            LOG.error("Type {} does not provide interface {}", object!=null?object.getClass().getName():"null",
+                    writeInterfaceClazz.getName());
+        }
+        return null;
+    }
+
+    /**
+     * Read object from database, by using the id field
+     * @param object
+     * @return
+     */
+    public @Nullable T read(String esId) {
+        @Nullable
+        T res = null;
+        if (esId != null) {
+            String json = db.doReadJsonData(dataTypeName, esId);
+            if (json != null) {
+                try {
+                    res = yangtoolsMapper.readValue(json.getBytes(), clazz);
+                } catch (IOException e) {
+                    LOG.error("Problem: ", e);
+                }
+            } else {
+                LOG.debug("Can not read from DB id {} type {}", esId, dataTypeName);
+            }
+        }
+        return res;
+    }
+
+    /**
+     * Remove object
+     * @param esId to identify the object.
+     * @return success
+     */
+    public boolean remove(String esId) {
+        return db.doRemove(this.dataTypeName, esId);
+    }
+
+    public int remove(QueryBuilder query) {
+        return this.db.doRemove(this.dataTypeName, query);
+    }
+    /**
+     * Get all elements of related type
+     * @return all Elements
+     */
+    public SearchResult<T> doReadAll() {
+        return doReadAll(null);
+    }
+    public SearchResult<T> doReadAll(QueryBuilder query) {
+        return this.doReadAll(query,false);
+    }
+    /**
+     * Read all existing objects of a type
+     * @param query for the elements
+     * @return the list of all objects
+     */
+
+    public SearchResult<T> doReadAll(QueryBuilder query, boolean ignoreException) {
+
+        SearchResult<T> res = new SearchResult<>();
+        int idx = 0;                //Idx for getAll
+        int iterateLength = 100;    //Step width for iterate
+
+        SearchResult<SearchHit> result;
+        List<SearchHit> hits;
+        do {
+            if(query!=null) {
+                LOG.debug("read data in {} with query {}",dataTypeName,query.toJSON());
+                result=db.doReadByQueryJsonData( dataTypeName, query,ignoreException);
+            }
+            else {
+                result = db.doReadAllJsonData(dataTypeName,ignoreException);
+            }
+            hits=result.getHits();
+            LOG.debug("Read: {} elements: {}  Failures: {}",dataTypeName,hits.size(), yangtoolsMapper.getMappingFailures());
+
+            T object;
+            idx += result.getHits().size();
+            for (SearchHit hit : hits) {
+                object = getT(hit.getSourceAsString());
+                LOG.debug("Mapp Object: {}\nSource: '{}'\nResult: '{}'\n Failures: {}", hit.getId(),
+                        hit.getSourceAsString(), object, yangtoolsMapper.getMappingFailures());
+                if (object != null) {
+                    setEsId(object, hit.getId());
+                    res.add(object);
+                } else {
+                    LOG.warn("Mapp result null Object: {}\n Source: '{}'\n : '", hit.getId(), hit.getSourceAsString());
+                }
+            }
+
+        } while (hits.size() == iterateLength); // Do it until end indicated, because less hits than iterateLength
+                                                // allows.
+        res.setTotal(result.getTotal());
+        return res;
+    }
+
+    /* ---------------------------------------------
+     * Private functions
+     */
+
+    private void setEsId(T object, String esId) {
+        if (field != null) {
+            try {
+                field.set(object, esId);
+            } catch (IllegalArgumentException | IllegalAccessException e) {
+                LOG.debug("Field set problem.", e);            }
+        }
+    }
+
+    private @Nullable T getT(String jsonString) {
+        try {
+            return yangtoolsMapper.readValue( jsonString, clazz );
+        } catch (IOException e) {
+            LOG.info("Mapping problem", e);
+            return null;
+        }
+    }
+
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/config/EsConfig.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/config/EsConfig.java
new file mode 100644
index 0000000..c828f33
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/database/config/EsConfig.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.database.config;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.onap.ccsdk.features.sdnr.wt.common.configuration.Configuration;
+import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
+import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
+import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo.Protocol;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class EsConfig implements Configuration {
+
+	private static final Logger LOG = LoggerFactory.getLogger(EsConfig.class);
+
+	public static final String SECTION_MARKER_ES = "es";
+
+	private static final String PROPERTY_KEY_DBHOSTS = "esHosts";
+	private static final String PROPERTY_KEY_ARCHIVE_LIMIT = "esArchiveLifetimeSeconds";
+	private static final String PROPERTY_KEY_CLUSTER = "esCluster";
+	private static final String PROPERTY_KEY_ARCHIVE_INTERVAL = "esArchiveCheckIntervalSeconds";
+	private static final String PROPERTY_KEY_NODE = "esNode";
+
+	private static String defaultHostinfo = printHosts(new HostInfo[] { new HostInfo("sdnrdb", 9200, Protocol.HTTP) });
+	private static final String DEFAULT_VALUE_CLUSTER = "";
+	/** check db data in this interval [in seconds] 0 deactivated */
+	private static final String DEFAULT_ARCHIVE_INTERVAL_SEC = "0";
+	/** keep data for this time [in seconds] 30 days */
+	private static final String DEFAULT_ARCHIVE_LIMIT_SEC = String.valueOf(60L * 60L * 24L * 30L);
+	private static final String DEFAULT_KEY_NODE = "elasticsearchnode";
+
+	private final ConfigurationFileRepresentation configuration;
+
+	public EsConfig(ConfigurationFileRepresentation configuration) {
+
+		this.configuration = configuration;
+		this.configuration.addSection(SECTION_MARKER_ES);
+		defaults();
+	}
+
+	/*
+	 * Setter
+	 */
+
+	public void setNode(String nodeName) {
+		configuration.setProperty(SECTION_MARKER_ES, PROPERTY_KEY_NODE, nodeName);
+	}
+
+	/*
+	 * Getter
+	 */
+
+	public String getNode() {
+		return configuration.getProperty(SECTION_MARKER_ES, PROPERTY_KEY_NODE);
+	}
+
+	public HostInfo[] getHosts() {
+		String dbHosts = configuration.getProperty(SECTION_MARKER_ES, PROPERTY_KEY_DBHOSTS);
+		return parseHosts(dbHosts);
+	}
+	public void setHosts(HostInfo[] hosts) {
+		this.configuration.setProperty(SECTION_MARKER_ES, PROPERTY_KEY_DBHOSTS, printHosts(hosts));
+	}
+	public String getCluster() {
+		return configuration.getProperty(SECTION_MARKER_ES, PROPERTY_KEY_ARCHIVE_INTERVAL);
+	}
+
+	public void setCluster(String cluster) {
+		configuration.setProperty(SECTION_MARKER_ES, PROPERTY_KEY_CLUSTER, cluster);
+	}
+
+	public long getArchiveCheckIntervalSeconds() {
+		return configuration.getPropertyLong(SECTION_MARKER_ES, PROPERTY_KEY_ARCHIVE_INTERVAL).orElse(0L);
+	}
+
+	public void setArchiveCheckIntervalSeconds(long seconds) {
+		configuration.setProperty(SECTION_MARKER_ES, PROPERTY_KEY_ARCHIVE_INTERVAL, seconds);
+	}
+
+	public long getArchiveLifetimeSeconds() {
+		return configuration.getPropertyLong(SECTION_MARKER_ES, PROPERTY_KEY_ARCHIVE_LIMIT).orElse(0L);
+	}
+
+	public void setArchiveLimit(long seconds) {
+		configuration.setProperty(SECTION_MARKER_ES, PROPERTY_KEY_ARCHIVE_LIMIT, seconds);
+	}
+
+	@Override
+	public String getSectionName() {
+		return SECTION_MARKER_ES;
+	}
+
+	@Override
+	public void defaults() {
+		// Add default if not available
+		configuration.setPropertyIfNotAvailable(SECTION_MARKER_ES, PROPERTY_KEY_DBHOSTS, defaultHostinfo);
+		configuration.setPropertyIfNotAvailable(SECTION_MARKER_ES, PROPERTY_KEY_ARCHIVE_LIMIT,
+				DEFAULT_ARCHIVE_LIMIT_SEC);
+		configuration.setPropertyIfNotAvailable(SECTION_MARKER_ES, PROPERTY_KEY_CLUSTER, DEFAULT_VALUE_CLUSTER);
+		configuration.setPropertyIfNotAvailable(SECTION_MARKER_ES, PROPERTY_KEY_ARCHIVE_INTERVAL,
+				DEFAULT_ARCHIVE_INTERVAL_SEC);
+		configuration.setPropertyIfNotAvailable(SECTION_MARKER_ES, PROPERTY_KEY_NODE, DEFAULT_KEY_NODE);
+	}
+
+	/** @TODO Shift to own class **/
+	private static String printHosts(HostInfo[] h) {
+		StringBuilder sb = new StringBuilder();
+		for (int i = 0; i < h.length; i++) {
+			sb.append(h[i].toUrl());
+			if (i != h.length - 1) {
+				sb.append(",");
+			}
+		}
+		return sb.toString();
+	}
+
+	/** @TODO Shift to own class **/
+	private static HostInfo[] parseHosts(String string) {
+		List<HostInfo> infos = new ArrayList<HostInfo>();
+		String[] list = string.split(",");
+		if (list.length > 0) {
+			for (String item : list) {
+				try {
+					URL url = new URL(item);
+					infos.add(new HostInfo(url.getHost(), url.getPort(), Protocol.getValueOf(url.getProtocol())));
+				} catch (MalformedURLException e) {
+					LOG.warn("problem parsing url {} : {}", item, e.getMessage());
+				}
+			}
+		}
+		HostInfo[] a = new HostInfo[infos.size()];
+		return infos.toArray(a);
+	}
+
+	@Override
+	public String toString() {
+		return "EsConfig [getNode()=" + getNode() + ", getHosts()=" + Arrays.toString(getHosts()) + ", getCluster()="
+				+ getCluster() + ", getArchiveCheckIntervalSeconds()=" + getArchiveCheckIntervalSeconds()
+				+ ", getArchiveLifetimeSeconds()=" + getArchiveLifetimeSeconds() + ", getSectionName()="
+				+ getSectionName() + "]";
+	}
+
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsCloner.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsCloner.java
new file mode 100644
index 0000000..1ac19ff
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsCloner.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.yangtools;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import org.opendaylight.yangtools.concepts.Builder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class YangToolsCloner {
+
+	private static YangToolsMapper yangtoolsMapper = new YangToolsMapper();
+	private static final Logger LOG = LoggerFactory.getLogger(YangToolsCloner.class);
+	public static final int ACCESSOR_FIELD = 0;
+	public static final int ACCESSOR_METHOD = 1;
+
+
+	private final int accessor;
+
+	private YangToolsCloner(int ac) {
+		this.accessor = ac;
+	}
+	public static YangToolsCloner instance() {
+		return instance(ACCESSOR_METHOD);
+	}
+	public static YangToolsCloner instance(int ac) {
+		return new YangToolsCloner(ac);
+	}
+	/**
+	 *
+     * @param source source object
+	 * @param clazz Class of return object
+	 * @return list of cloned object
+	 * @return
+	 */
+	public <S extends DataObject, T extends DataObject> List<T> cloneList(List<S> source, Class<T> clazz) {
+		return cloneList(source, clazz, null);
+	}
+
+	/**
+	 *
+	 * @param source source object
+	 * @param clazz Class of return object
+	 * @attrList filter for attribute Names to clone
+	 * @return list of cloned object
+	 */
+	public <S extends DataObject, T extends DataObject> List<T> cloneList(List<S> source, Class<T> clazz,
+			@Nullable List<String> attrList) {
+		if (source == null) {
+			return null;
+		}
+		List<T> list = new ArrayList<T>();
+		for (S s : source) {
+			list.add(clone(s, clazz, attrList));
+		}
+		return list;
+	}
+
+	/**
+	 *
+	 * @param source source object
+	 * @param clazz Class of return object
+	 * @return cloned object
+	 */
+	public <S , T extends DataObject> T clone(S source, Class<T> clazz) {
+		return clone(source, clazz, null);
+	}
+	/**
+	 *
+	 * @param source source object
+	 * @param clazz Class of return object
+	 * @attrList if empty copy all else list of attribute Names to clone
+	 * @return cloned object
+	 */
+	public <S, T extends DataObject> T clone(S source, Class<T> clazz,
+			@Nullable List<String> attrList) {
+		if (source == null) {
+			return (T)null;
+		}
+		Field[] attributeFields;
+		Field sourceField;
+		Method m;
+		Builder<T> builder = yangtoolsMapper.getBuilder(clazz);
+		T object = builder.build();
+		attributeFields = object.getClass().getDeclaredFields();
+		for (Field attributeField : attributeFields) {
+			// check if attr is in inclusion list
+			if (attrList != null && !attrList.contains(attributeField.getName())) {
+				continue;
+			}
+			// ignore QNAME
+			if (attributeField.getName().equals("QNAME")) {
+				continue;
+			}
+
+			attributeField.setAccessible(true);
+			try {
+				if(accessor==ACCESSOR_FIELD) {
+					sourceField = source.getClass().getDeclaredField(attributeField.getName());
+					sourceField.setAccessible(true);
+					if (attributeField.getType().equals(String.class) && !sourceField.getType().equals(String.class)) {
+						attributeField.set(object, String.valueOf(sourceField.get(source)));
+					} else {
+						attributeField.set(object, sourceField.get(source));
+					}
+				}
+				else if(accessor==ACCESSOR_METHOD) {
+					String getter = getter(attributeField.getName());
+					System.out.println("getter="+getter);
+					m = source.getClass().getDeclaredMethod(getter);
+					m.setAccessible(true);
+					if (attributeField.getType().equals(String.class) && !m.getReturnType().equals(String.class)) {
+						attributeField.set(object, String.valueOf(m.invoke(source)));
+					} else {
+						attributeField.set(object, m.invoke(source));
+					}
+				}
+
+			} catch (NoSuchMethodException | NoSuchFieldException e) {
+				// Convert to run-time exception
+				String msg = "no such field " + attributeField.getName() + " in class " + source.getClass().getName();
+				LOG.debug(msg);
+				// throw new IllegalArgumentException(msg);
+			} catch (IllegalAccessException|SecurityException e) {
+				LOG.debug("Access problem " + attributeField.getName(), e);
+			} catch (IllegalArgumentException e) {
+				LOG.debug("argument problem " + attributeField.getName(), e);
+			} catch (InvocationTargetException e) {
+				LOG.debug("invocation problem " + attributeField.getName(), e);
+			}
+		}
+
+		return object;
+	}
+
+	private static String getter(String name) {
+		return String.format("%s%s%s","get",name.substring(1, 2).toUpperCase(),name.substring(2));
+	}
+	public <S extends DataObject, T extends DataObject,B extends Builder<T>> B cloneToBuilder(S source, B builder){
+		return cloneToBuilder(source, builder,null);
+	}
+	public <S extends DataObject, T extends DataObject,B extends Builder<T>> B  cloneToBuilder(S source, B builder,
+			@Nullable List<String> attrList) {
+		Field[] attributeFields;
+		Field sourceField;
+		Method m;
+		attributeFields = builder.getClass().getDeclaredFields();
+		for (Field attributeField : attributeFields) {
+			// check if attr is in inclusion list
+			if (attrList != null && !attrList.contains(attributeField.getName())) {
+				continue;
+			}
+			// ignore QNAME
+			if (attributeField.getName().equals("QNAME")) {
+				continue;
+			}
+
+			attributeField.setAccessible(true);
+			try {
+				if(accessor==ACCESSOR_FIELD) {
+					sourceField = source.getClass().getDeclaredField(attributeField.getName());
+					sourceField.setAccessible(true);
+					if (attributeField.getType().equals(String.class) && !sourceField.getType().equals(String.class)) {
+						attributeField.set(builder, String.valueOf(sourceField.get(source)));
+					} else {
+						attributeField.set(builder, sourceField.get(source));
+					}
+				}
+				else if(accessor==ACCESSOR_METHOD) {
+					m = source.getClass().getDeclaredMethod(getter(attributeField.getName()));
+					m.setAccessible(true);
+					if (attributeField.getType().equals(String.class) && !m.getReturnType().equals(String.class)) {
+						attributeField.set(builder, String.valueOf(m.invoke(source)));
+					} else {
+						attributeField.set(builder, m.invoke(source));
+					}
+				}
+
+			} catch (NoSuchMethodException | NoSuchFieldException e) {
+				// Convert to run-time exception
+				String msg = "no such field " + attributeField.getName() + " in class " + source.getClass().getName();
+				LOG.debug(msg);
+				// throw new IllegalArgumentException(msg);
+			} catch (IllegalAccessException|SecurityException e) {
+				LOG.debug("Access problem " + attributeField.getName(), e);
+			} catch (IllegalArgumentException e) {
+				LOG.debug("argument problem " + attributeField.getName(), e);
+			} catch (InvocationTargetException e) {
+				LOG.debug("invocation problem " + attributeField.getName(), e);
+			}
+		}
+		return builder;
+	}
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsCloner2.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsCloner2.java
new file mode 100644
index 0000000..37d7aa4
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsCloner2.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.yangtools;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class YangToolsCloner2 {
+
+	private static final Logger LOG = LoggerFactory.getLogger(YangToolsCloner2.class);
+
+    public enum Accessor {
+    	ACCESSOR_FIELD,
+    	ACCESSOR_METHOD;
+    }
+
+	private Accessor accessor;
+
+	public YangToolsCloner2() {
+		LOG.info("Provide new {}",this.getClass().getName());
+		this.accessor = Accessor.ACCESSOR_METHOD;
+	}
+
+	YangToolsCloner2 setAcessor(Accessor accessor) {
+		this.accessor = accessor;
+		return this;
+	}
+
+	Accessor getAccessor() {
+		return accessor;
+	}
+
+	public interface Builder<T> {
+		T build();
+	}
+
+	/**
+	 *
+	 * @param source source object
+	 * @param clazz Class of return object
+	 * @attrList filter for attribute Names to clone
+	 * @return list of cloned object
+	 * @throws Exception
+	 */
+	public <S, T> List<T> cloneList(List<S> source, Builder<T> builder, String ... attrList) throws Exception {
+		if (source == null) {
+			return null;
+		}
+		List<T> list = new ArrayList<T>();
+		for (S s : source) {
+			list.add(copyAttributes(s, builder.build(), attrList));
+		}
+		return list;
+	}
+
+	/**
+	 * Copy attributes from source to destination object.
+	 * Copy the references.
+	 * @param source source object
+	 * @param clazz Class of return object
+	 * @attrList attribute Names NOT to clone.
+	 * @return cloned object
+	 * @throws Exception
+	 */
+	@SuppressWarnings("null")
+	public @Nullable <S, T> T copyAttributes(S source, T destination, String ... attributeArray) throws Exception {
+
+		LOG.debug("copyAttributes source.class {} destination.class {} attributes {}", source, destination, attributeArray.length);
+
+		if (destination == null || source == null)
+			return null;
+
+		List<String> attributeList = Arrays.asList(attributeArray);
+		LOG.debug("copyAttributes 2 attributes {}", attributeList);
+
+		Field[] destinationAttributeFields = source.getClass().getDeclaredFields();
+		String destinationName;
+		Class<?> destinationType;
+		for (Field destinationAttributeField : destinationAttributeFields) {
+			destinationName = destinationAttributeField.getName();
+			destinationType = destinationAttributeField.getType();
+			LOG.debug("Field: {}", destinationName);
+			// check if attr is in exclusion list
+			if (attributeList.contains(destinationName)) {
+				continue;
+			}
+			// ignore QNAME
+			if (destinationName.equals("QNAME")) {
+				continue;
+			}
+
+			destinationAttributeField.setAccessible(true);
+			Object sourceData = null;
+			Class<?> sourceType = null;
+			Class<?> sourceListType = null;
+			try {
+				if (accessor == Accessor.ACCESSOR_FIELD) {
+					Field sourceField;
+					sourceField = source.getClass().getDeclaredField(destinationName);
+					sourceField.setAccessible(true);
+					sourceType = sourceField.getType();
+					sourceData = sourceField.get(source);
+					sourceListType = getListClass(sourceType, sourceData);
+
+				} else if (accessor == Accessor.ACCESSOR_METHOD) {
+					Method sourceMethod;
+					sourceMethod = source.getClass().getDeclaredMethod(getter(destinationName));
+					sourceMethod.setAccessible(true);
+					sourceType = sourceMethod.getReturnType();
+					sourceData = sourceMethod.invoke(source);
+					sourceListType = getListClass(sourceType, sourceData);
+				}
+				LOG.info("Handle {} {} {}", destinationName, destinationType, sourceType);
+				if (destinationType == sourceType) {
+					destinationAttributeField.set(destination, sourceData);
+				} else {
+					throw new Exception(
+							"Problem to copy attribute " + destinationName
+							+" Sourceclass:" +sourceType
+							+" Destinationclass:" + destinationType
+							+" Method:"+accessor.name());
+				}
+			} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException
+					| NoSuchMethodException | InvocationTargetException e) {
+				throw e;
+			}
+		}
+		return destination;
+
+	}
+
+	private static String getter(String name) {
+		if (name == null || name.length() == 0) {
+			return null;
+		} else if (name.length() == 1) {
+			return String.format("%s%s", "get", name.substring(1, 2).toUpperCase());
+		} else { // >= 2
+			return String.format("%s%s%s", "get", name.substring(1, 2).toUpperCase(), name.substring(2));
+		}
+	}
+
+	private static Class<?> getListClass(Class<?> sourceType, Object sourceData) {
+		if (sourceData != null && sourceType.equals(List.class)) {
+			List<Object> sourceDataList = (List<Object>)sourceData;
+			if (sourceDataList.size() > 0) {
+				LOG.info("Is list with type"+sourceDataList.get(0).getClass().getName());
+			} else {
+				LOG.info("Is empty list");
+			}
+		}
+	    return(sourceType);
+	}
+
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsMapper.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsMapper.java
new file mode 100644
index 0000000..8306cb7
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsMapper.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.yangtools;
+
+import java.io.IOException;
+import javax.annotation.Nullable;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.Credentials;
+import org.opendaylight.yangtools.concepts.Builder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.PropertyNamingStrategy;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder.Value;
+import com.fasterxml.jackson.databind.introspect.AnnotatedClass;
+import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+/**
+ * YangToolsMapper is a specific Jackson mapper configuration for opendaylight yangtools serialization or deserialization of DataObject to/from JSON
+ * TODO ChoiceIn and Credentials deserialization only for LoginPasswordBuilder
+ */
+public class YangToolsMapper extends ObjectMapper {
+
+ 	private final Logger LOG = LoggerFactory.getLogger(YangToolsMapper.class);
+	private static final long serialVersionUID = 1L;
+	private static BundleContext context;
+
+	public YangToolsMapper() {
+		super();
+		configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+		setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
+		setSerializationInclusion(Include.NON_NULL);
+		setAnnotationIntrospector(new YangToolsBuilderAnnotationIntrospector());
+		SimpleModule dateAndTimeSerializerModule = new SimpleModule();
+		dateAndTimeSerializerModule.addSerializer(DateAndTime.class,new CustomDateAndTimeSerializer());
+		registerModule(dateAndTimeSerializerModule );
+		Bundle bundle = FrameworkUtil.getBundle(YangToolsMapper.class);
+		context = bundle != null ? bundle.getBundleContext() : null;
+	}
+
+	@Override
+	public String writeValueAsString(Object value) throws JsonProcessingException {
+		// TODO Auto-generated method stub
+		return super.writeValueAsString(value);
+	}
+	/**
+	 * Get Builder object for yang tools interface.
+	 * @param <T> yang-tools base datatype
+	 * @param clazz class with interface.
+	 * @return builder for interface or null if not existing
+	 */
+	@SuppressWarnings("unchecked")
+	public @Nullable <T extends DataObject> Builder<T> getBuilder(Class<T> clazz) {
+		String builder = clazz.getName() + "Builder";
+		try {
+			Class<?> clazzBuilder = findClass(builder);
+			return (Builder<T>) clazzBuilder.newInstance();
+		} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
+			LOG.debug("Problem ", e);
+			return null;
+		}
+	}
+
+	/**
+	 * Callback for handling mapping failures.
+	 * @return
+	 */
+	public int getMappingFailures() {
+		return 0;
+	}
+
+	/**
+	 * Provide mapping of string to attribute names, generated by yang-tools.
+	 * "netconf-id" converted to "_netconfId"
+	 * @param name with attribute name, not null or empty
+	 * @return converted string or null if name was empty or null
+	 */
+	public @Nullable static String toCamelCaseAttributeName(final String name) {
+		if (name == null || name.isEmpty())
+			return null;
+
+		final StringBuilder ret = new StringBuilder(name.length());
+		if (!name.startsWith("_"))
+			ret.append('_');
+		int start = 0;
+		for (final String word : name.split("-")) {
+			if (!word.isEmpty()) {
+				if (start++ == 0) {
+					ret.append(Character.toLowerCase(word.charAt(0)));
+				} else {
+					ret.append(Character.toUpperCase(word.charAt(0)));
+				}
+				ret.append(word.substring(1));
+			}
+		}
+		return ret.toString();
+	}
+
+	/**
+	 * Adapted Builder callbacks
+	 */
+	private static class YangToolsBuilderAnnotationIntrospector extends JacksonAnnotationIntrospector {
+		private static final long serialVersionUID = 1L;
+
+		@Override
+        public Class<?> findPOJOBuilder(AnnotatedClass ac) {
+        		try {
+            		String builder = null;
+            		if (ac.getRawType().equals(Credentials.class)) {
+            			builder = "org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder";
+            			//System.out.println(DataContainer.class.isAssignableFrom(ac.getRawType()));
+            			//System.out.println(ChoiceIn.class.isAssignableFrom(ac.getRawType()));
+
+            		} 
+            		else if(ac.getRawType().equals(DateAndTime.class)) {
+            			builder = DateAndTimeBuilder.class.getName();
+            		}
+                	
+            		else {
+        	        	if (ac.getRawType().isInterface()) 	{
+        	        		builder = ac.getName()+"Builder";
+        	        	}
+            		}
+            		if (builder != null) {
+		            	//System.out.println("XX1: "+ac.getRawType());
+		            	//System.out.println("XX2: "+builder);
+            			//Class<?> innerBuilder = Class.forName(builder);
+            			Class<?> innerBuilder = findClass(builder);
+	            	    //System.out.println("Builder found: "+ innerBuilder);
+	            	    return innerBuilder;
+            		}
+            	} catch( ClassNotFoundException e ) {
+    	            // No problem .. try next
+            	}
+           return super.findPOJOBuilder(ac);
+        }
+
+		@Override
+		public Value findPOJOBuilderConfig(AnnotatedClass ac) {
+			if (ac.hasAnnotation(JsonPOJOBuilder.class)) {
+				return super.findPOJOBuilderConfig(ac);
+			}
+			return new JsonPOJOBuilder.Value("build", "set");
+		}
+	}
+
+	private static Class<?> findClass(String name) throws ClassNotFoundException {
+		// Try to find in other bundles
+		if (context != null) {
+			//OSGi environment
+			for (Bundle b : context.getBundles()) {
+				try {
+					return b.loadClass(name);
+				} catch (ClassNotFoundException e) {
+					// No problem, this bundle doesn't have the class
+				}
+			}
+			throw new ClassNotFoundException("Can not find Class in OSGi context.");
+		} else {
+			return Class.forName(name);
+		}
+	    // not found in any bundle
+	}
+	public static class DateAndTimeBuilder{
+		
+		private final String _value;
+	
+		public DateAndTimeBuilder(String v) {
+			this._value= v;
+		}
+		
+		public DateAndTime build() {
+			return new DateAndTime(_value);
+		}
+		
+	}
+	public static class CustomDateAndTimeSerializer extends StdSerializer<DateAndTime>{
+
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = 1L;
+
+		public CustomDateAndTimeSerializer() {
+			this(null);
+		}
+		protected CustomDateAndTimeSerializer(Class<DateAndTime> t) {
+			super(t);
+		}
+
+		@Override
+		public void serialize(DateAndTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+			gen.writeString(value.getValue());
+		}
+		
+	}
+}
diff --git a/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsMapper2.java b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsMapper2.java
new file mode 100644
index 0000000..0ee76b0
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/main/java/org/onap/ccsdk/features/sdnr/wt/yangtools/YangToolsMapper2.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.yangtools;
+
+import java.io.IOException;
+import javax.annotation.Nullable;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.Credentials;
+import org.opendaylight.yangtools.concepts.Builder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.PropertyNamingStrategy;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder.Value;
+import com.fasterxml.jackson.databind.introspect.AnnotatedClass;
+import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+/**
+ * YangToolsMapper is a specific Jackson mapper configuration for opendaylight yangtools serialization or deserialization of DataObject to/from JSON
+ * TODO ChoiceIn and Credentials deserialization only for LoginPasswordBuilder
+ */
+public class YangToolsMapper2<T extends DataObject> extends ObjectMapper {
+
+ 	private final Logger LOG = LoggerFactory.getLogger(YangToolsMapper2.class);
+	private static final long serialVersionUID = 1L;
+	private static String ENTITY = "Entity";
+	private static String BUILDER = "Builder";
+
+	private @Nullable Class<T> clazz;
+	private @Nullable Class<? extends Builder<? extends T>> builderClazz;
+
+	private BundleContext context;
+
+	public <X extends T, B extends Builder<X>> YangToolsMapper2(Class<T> clazz, Class<B> builderClazz) throws ClassNotFoundException {
+		super();
+		configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+		setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
+		setSerializationInclusion(Include.NON_NULL);
+		setAnnotationIntrospector(new YangToolsBuilderAnnotationIntrospector());
+		SimpleModule dateAndTimeSerializerModule = new SimpleModule();
+		dateAndTimeSerializerModule.addSerializer(DateAndTime.class, new CustomDateAndTimeSerializer());
+		registerModule(dateAndTimeSerializerModule );
+		Bundle bundle = FrameworkUtil.getBundle(YangToolsMapper2.class);
+
+		this.clazz = clazz;
+		this.builderClazz = builderClazz != null ? builderClazz : getBuilderClass(getBuilderClassName(clazz)) ;
+		context = bundle != null ? bundle.getBundleContext() : null;
+	}
+
+	public YangToolsMapper2() throws ClassNotFoundException {
+		this(null, null);
+	}
+
+
+	@Override
+	public String writeValueAsString(Object value) throws JsonProcessingException {
+		return super.writeValueAsString(value);
+	}
+	/**
+	 * Get Builder object for yang tools interface.
+	 * @param <T> yang-tools base datatype
+	 * @param clazz class with interface.
+	 * @return builder for interface or null if not existing
+	 */
+	@SuppressWarnings("unchecked")
+	public @Nullable <T extends DataObject> Builder<T> getBuilder(Class<T> clazz) {
+		try {
+			//Class<?> clazzBuilder = getBuilderClass(getBuilderClassName(clazz));
+			return (Builder<T>) builderClazz.newInstance();
+		} catch (InstantiationException | IllegalAccessException e) {
+			LOG.debug("Problem ", e);
+			return null;
+		}
+	}
+
+	/**
+	 * Callback for handling mapping failures.
+	 * @return
+	 */
+	public int getMappingFailures() {
+		return 0;
+	}
+
+	/**
+	 * Provide mapping of string to attribute names, generated by yang-tools.
+	 * "netconf-id" converted to "_netconfId"
+	 * @param name with attribute name, not null or empty
+	 * @return converted string or null if name was empty or null
+	 */
+	public @Nullable static String toCamelCaseAttributeName(final String name) {
+		if (name == null || name.isEmpty())
+			return null;
+
+		final StringBuilder ret = new StringBuilder(name.length());
+		if (!name.startsWith("_"))
+			ret.append('_');
+		int start = 0;
+		for (final String word : name.split("-")) {
+			if (!word.isEmpty()) {
+				if (start++ == 0) {
+					ret.append(Character.toLowerCase(word.charAt(0)));
+				} else {
+					ret.append(Character.toUpperCase(word.charAt(0)));
+				}
+				ret.append(word.substring(1));
+			}
+		}
+		return ret.toString();
+	}
+
+	/** Verify if builder is available
+	 * @throws ClassNotFoundException **/
+	public Class<?> assertBuilderClass(Class<?> clazz) throws ClassNotFoundException {
+		return getBuilderClass(getBuilderClassName(clazz));
+	}
+
+	// --- Private functions
+
+	/**
+	 * Create name of builder class
+	 * @param <T>
+	 * @param clazz
+	 * @return builders class name
+	 * @throws ClassNotFoundException
+	 */
+	private static String getBuilderClassName(Class<?> clazz) {
+		return clazz.getName() + BUILDER;
+//		String clazzName = clazz.getName();
+//		if (clazzName.endsWith(ENTITY)) {
+//			return clazzName.replace(ENTITY, BUILDER);
+//		} else {
+//			return clazzName + BUILDER;
+//		}
+	}
+
+	/**
+	 * Search builder in context
+	 * @param name
+	 * @return
+	 * @throws ClassNotFoundException
+	 */
+	@SuppressWarnings("unchecked")
+	private <X extends T, B extends Builder<X>> Class<B> getBuilderClass(String name) throws ClassNotFoundException {
+		// Try to find in other bundles
+		if (context != null) {
+			//OSGi environment
+			for (Bundle b : context.getBundles()) {
+				try {
+					return (Class<B>) b.loadClass(name);
+				} catch (ClassNotFoundException e) {
+					// No problem, this bundle doesn't have the class
+				}
+			}
+			throw new ClassNotFoundException("Can not find Class in OSGi context.");
+		} else {
+			return (Class<B>) Class.forName(name);
+		}
+	    // not found in any bundle
+	}
+
+	// --- Classes
+
+	/**
+	 * Adapted Builder callbacks
+	 */
+	private class YangToolsBuilderAnnotationIntrospector extends JacksonAnnotationIntrospector {
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public Class<?> findPOJOBuilder(AnnotatedClass ac) {
+
+			if (ac.getRawType().equals(Credentials.class)) {
+				return org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder.class;
+
+			} else if (ac.getRawType().equals(DateAndTime.class)) {
+				return DateAndTimeBuilder.class;
+
+			} else if (ac.getRawType().equals(clazz)) {
+				return builderClazz;
+			}
+
+			if (ac.getRawType().isInterface()) {
+				String builder = getBuilderClassName(ac.getRawType());
+				try {
+					Class<?> innerBuilder = getBuilderClass(builder);
+					return innerBuilder;
+				} catch (ClassNotFoundException e) {
+					// No problem .. try next
+				}
+			}
+			return super.findPOJOBuilder(ac);
+		}
+
+		@Override
+		public Value findPOJOBuilderConfig(AnnotatedClass ac) {
+			if (ac.hasAnnotation(JsonPOJOBuilder.class)) {
+				return super.findPOJOBuilderConfig(ac);
+			}
+			return new JsonPOJOBuilder.Value("build", "set");
+		}
+	}
+
+	public static class DateAndTimeBuilder{
+
+		private final String _value;
+
+		public DateAndTimeBuilder(String v) {
+			this._value= v;
+		}
+
+		public DateAndTime build() {
+			return new DateAndTime(_value);
+		}
+
+	}
+	public static class CustomDateAndTimeSerializer extends StdSerializer<@NonNull DateAndTime>{
+
+		private static final long serialVersionUID = 1L;
+
+		public CustomDateAndTimeSerializer() {
+			this(null);
+		}
+		protected CustomDateAndTimeSerializer(Class<DateAndTime> t) {
+			super(t);
+		}
+
+		@Override
+		public void serialize(DateAndTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+			gen.writeString(value.getValue());
+		}
+
+	}
+}
diff --git a/sdnr/wt/data-provider/database/src/main/resources/es-init.sh b/sdnr/wt/data-provider/database/src/main/resources/es-init.sh
index be7d487..0b122c0 100755
--- a/sdnr/wt/data-provider/database/src/main/resources/es-init.sh
+++ b/sdnr/wt/data-provider/database/src/main/resources/es-init.sh
@@ -37,7 +37,7 @@
 set_definition() {
   def "connectionlog" '{"node-id": {"type": "keyword"},"timestamp": {"type": "date"},"status": {"type": "keyword"}}'
   def "maintenancemode" '{"node-id": {"type": "keyword"},"active": {"type": "boolean"}},"date_detection":false}}'
-  def "faultlog" '{"node-id": {"type": "keyword"},"severity": {"type": "keyword"},"timestamp": {"type": "date"},"problem": {"type": "keyword"},"counter": {"type": "keyword"},"object-id":{"type": "keyword"}}'
+  def "faultlog" '{"node-id": {"type": "keyword"},"severity": {"type": "keyword"},"timestamp": {"type": "date"},"problem": {"type": "keyword"},"counter": {"type": "keyword"},"object-id":{"type": "keyword"},"source-type":{"type": "keyword"}}'
   def "faultcurrent" '{"node-id": {"type": "keyword"},"severity": {"type": "keyword"},"timestamp": {"type": "date"},"problem": {"type": "keyword"},"counter": {"type": "keyword"},"object-id":{"type": "keyword"}}'
   def "eventlog" '{"node-id": {"type": "keyword"},"timestamp": {"type": "date"},"new-value": {"type": "keyword"},"attribute-name": {"type": "keyword"},"counter": {"type": "keyword"},"object-id": {"type": "keyword"}}'
   def "inventoryequipment" '{"date": {"type": "keyword"},"model-identifier": {"type": "keyword"},"manufacturer-identifier": {"type": "keyword"},"type-name": {"type": "keyword"},"description": {"type": "keyword"},"uuid": {"type": "keyword"},"version": {"type": "keyword"},"parent-uuid": {"type": "keyword"},"contained-holder": {"type": "keyword"},"node-id": {"type": "keyword"},"tree-level": {"type": "long"},"part-type-id": {"type": "keyword"},"serial": {"type": "keyword"}}'
@@ -88,11 +88,10 @@
     body=$(echo $response | sed -E 's/HTTPSTATUS\:[0-9]{3}$//')
     code=$(echo $response | tr -d '\n' | sed -E 's/.*HTTPSTATUS:([0-9]{3})$/\1/')
     if [ "$VERBOSE" = "0" -a "$code" -ne "200" ] ; then
- 	   echo "Error response $code $body"
- 	   exit 2
+        echo "Error response $code $body"
     fi
     if [ "$VERBOSE" -ge 1 ] ; then
- 	   echo "response $code"
+        echo "response $code"
     fi
     if [ "$VERBOSE" -ge 2 ] ; then
        echo "content: $body"
@@ -160,6 +159,11 @@
     echo "deleting index $index"
     url="$index"
     http_delete_request "$url"
+
+     # Delete alias that was falsely autocreated as index
+    echo "deleting index $index"
+    url="$alias"
+    http_delete_request "$url"
 }
 
 # Write mappings
@@ -181,9 +185,9 @@
     fi
 
     url=$index
-	echo "creating index $index"
-	if [ -z "$3" ] ; then
-	    http_put_request "$url" "$data"
+    echo "creating index $index"
+    if [ -z "$3" ] ; then
+        http_put_request "$url" "$data"
     else
         file_append "$url" "$data"
     fi
@@ -192,7 +196,7 @@
     url="$index/_alias/$alias"
     echo "creating alias $alias for $index"
     if [ -z "$3" ] ; then
-    	http_put_request "$url"
+        http_put_request "$url"
     else
         file_append "$url" "{}"
     fi
@@ -210,7 +214,7 @@
       echo "Error: Max attempts reached."
       exit 3
     fi
-	attempt_counter=$(($attempt_counter+1))
+    attempt_counter=$(($attempt_counter+1))
     printf '.'
     sleep 5
   done
@@ -222,7 +226,7 @@
       echo "Status $ESSTATUS reached: $RES"
     else
       echo "Error: DB Reachable, but status $ESSTATUS not reached"
-	  exit 2
+      exit 2
     fi
   else
     echo "Error: $DBURL not reachable"
@@ -234,20 +238,23 @@
 
 cmd_create() {
     if [ -n "$WAITYELLOW" ] ; then
-    	es_wait_yellow "$WAITYELLOW"
+        es_wait_yellow "$WAITYELLOW"
     fi
-	for i in "${!ALIAS[@]}"; do
-  		create_index_alias "${ALIAS[$i]}" "${MAPPING[$i]}"
-	done
+    for i in "${!ALIAS[@]}"; do
+          create_index_alias "${ALIAS[$i]}" "${MAPPING[$i]}"
+    done
 }
 
 cmd_delete() {
     if [ -n "$WAITYELLOW" ] ; then
-    	es_wait_yellow "$WAITYELLOW"
+        es_wait_yellow "$WAITYELLOW"
     fi
-	for i in "${!ALIAS[@]}"; do
-  		delete_index_alias "${ALIAS[$i]}"
-	done
+    for i in "${!ALIAS[@]}"; do
+          delete_index_alias "${ALIAS[$i]}"
+    done
+    for i in "${!ALIAS[@]}"; do
+        delete_index_alias "${ALIAS[$i]}"
+    done
 }
 cmd_purge() {
 #    http_get_request '_cat/aliases'
@@ -262,11 +269,11 @@
 cmd_initfile() {
     echo "Create script initfile: $INITFILENAME"
     if [ -f "$INITFILENAME" ] ; then
-    	rm $INITFILENAME
+        rm $INITFILENAME
     fi
-	for i in "${!ALIAS[@]}"; do
-  		create_index_alias "${ALIAS[$i]}" "${MAPPING[$i]}" file
-	done
+    for i in "${!ALIAS[@]}"; do
+          create_index_alias "${ALIAS[$i]}" "${MAPPING[$i]}" file
+    done
 }
 
 # Prepare database startup
@@ -325,22 +332,22 @@
         -f|--file)
           INITFILENAME="$value"
           shift
-		  ;;
-		-x|--verbose)
-		  VERBOSE="${value:-0}"
-		  shift
-		  ;;
-		-v|--version)
-		  VERSION="${value:--v1}"
-		  shift
-		  ;;
-		-vx|--versionx)
-		  VERSION=""
-		  ;;
-		-w|--wait)
+          ;;
+        -x|--verbose)
+          VERBOSE="${value:-0}"
+          shift
+          ;;
+        -v|--version)
+          VERSION="${value:--v1}"
+          shift
+          ;;
+        -vx|--versionx)
+          VERSION=""
+          ;;
+        -w|--wait)
           WAITYELLOW="${value:-30s}"
-		  shift
-		  ;;
+          shift
+          ;;
         --cmd)
           STARTUP_CMD="$value"
           shift
@@ -349,10 +356,10 @@
           CLUSTER_ENABLED="$value"
           shift
           ;;
- 	    --index)
- 	      NODE_INDEX="$value"
- 	      shift
- 	      ;;
+         --index)
+           NODE_INDEX="$value"
+           shift
+           ;;
         *)
           ;;
       esac;
@@ -379,32 +386,32 @@
 
 case "$TASK" in
     "create")
-		getsdnrurl
-		if [ -z "$DBURL" ] ; then
-		  echo "Error: unable to detect database url."
-		  exit 1
-		fi
+        getsdnrurl
+        if [ -z "$DBURL" ] ; then
+          echo "Error: unable to detect database url."
+          exit 1
+        fi
         cmd_create
         ;;
     "delete")
-		getsdnrurl
-		if [ -z "$DBURL" ] ; then
-		  echo "Error: unable to detect database url."
-		  exit 1
-		fi
+        getsdnrurl
+        if [ -z "$DBURL" ] ; then
+          echo "Error: unable to detect database url."
+          exit 1
+        fi
         cmd_delete
         ;;
     "purge")
-		getsdnrurl
-		if [ -z "$DBURL" ] ; then
-		  echo "Error: unable to detect database url."
-		  exit 1
-		fi
+        getsdnrurl
+        if [ -z "$DBURL" ] ; then
+          echo "Error: unable to detect database url."
+          exit 1
+        fi
         cmd_purge
         ;;
     "initfile")
         cmd_initfile
-    	;;
+        ;;
     "startup")
         cmd_startup
         ;;
diff --git a/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestConfig.java b/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestConfig.java
new file mode 100644
index 0000000..ecc7edf
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestConfig.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.database.test;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
+import org.onap.ccsdk.features.sdnr.wt.database.config.EsConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestConfig {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TestConfig.class);
+
+    private static final String TESTFILENAME = "testconfig.properties";
+
+    @After
+    @Before
+    public void afterAndBefore() {
+        File f=new File(TESTFILENAME);
+        if(f.exists()) {
+            LOG.info("Remove {}", f.getAbsolutePath());
+            f.delete();
+        }
+    }
+    @Test
+    public void test() {
+        ConfigurationFileRepresentation configuration=new ConfigurationFileRepresentation(TESTFILENAME);
+
+        EsConfig esConfig = new EsConfig(configuration);
+        LOG.info("Defaultconfiguration: {}", esConfig.toString());
+        assertEquals("http", esConfig.getHosts()[0].protocol.getValue());
+        assertEquals(9200, esConfig.getHosts()[0].port);
+        assertEquals("sdnrdb", esConfig.getHosts()[0].hostname);
+
+    }
+
+}
diff --git a/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestNetconfNodeBuilder.java b/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestNetconfNodeBuilder.java
new file mode 100644
index 0000000..9237aaf
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestNetconfNodeBuilder.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.database.test;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.Credentials;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPassword;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder;
+
+public class TestNetconfNodeBuilder {
+
+	@SuppressWarnings("deprecation")
+	//@Test
+	public void test() {
+
+		NetconfNodeBuilder netconfNodeBuilder = new NetconfNodeBuilder();
+
+		LoginPasswordBuilder loginPasswordBuilder = new LoginPasswordBuilder();
+		loginPasswordBuilder.setUsername("myTestUsername");
+		loginPasswordBuilder.setPassword("myTestPassword");
+		netconfNodeBuilder.setCredentials(loginPasswordBuilder.build());
+
+		NetconfNode netconfNode = netconfNodeBuilder.build();
+		System.out.println(netconfNode);
+
+		Credentials credentials = netconfNode.getCredentials();
+		System.out.println("Class: "+credentials.getClass()+"\nContent: "+credentials);
+
+        if (credentials instanceof LoginPassword) {
+        	LoginPassword loginPassword = (LoginPassword)credentials;
+        	System.out.println("User: "+loginPassword.getUsername()+" Password"+loginPassword.getPassword());
+        } else {
+        	System.out.println("Not expected class");
+        }
+	}
+
+}
diff --git a/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestNuMappings.java b/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestNuMappings.java
new file mode 100644
index 0000000..b7d0620
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/test/TestNuMappings.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.database.test;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import java.io.IOException;
+import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.yangtools.YangToolsMapper;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Faultcurrent;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultcurrentBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SeverityType;
+
+public class TestNuMappings {
+
+    @Test
+    public void test33() {
+        Faultcurrent c = new FaultcurrentBuilder().setSeverity(SeverityType.Critical).build();
+        YangToolsMapper mapper = new YangToolsMapper();
+        try {
+            System.out.println(mapper.writeValueAsString(c)+"<=>"+SeverityType.Critical.getName());
+        } catch (JsonProcessingException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        try {
+            Faultcurrent f=mapper.readValue( "{\"severity\":\"Critical\"}", Faultcurrent.class);
+            System.out.println(f);
+            System.out.println(mapper.writeValueAsString(f));
+        } catch (JsonParseException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (JsonMappingException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+}
diff --git a/sdnr/wt/data-provider/database/src/test/resources/log4j2.xml b/sdnr/wt/data-provider/database/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..164e93f
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/test/resources/log4j2.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration package="log4j.test" 
+               status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Logger name="log4j.test.Log4jTest" level="debug">
+            <AppenderRef ref="Console"/>
+        </Logger>
+        <Root level="trace">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/database/src/test/resources/simplelogger.properties b/sdnr/wt/data-provider/database/src/test/resources/simplelogger.properties
new file mode 100644
index 0000000..a2f1e7e
--- /dev/null
+++ b/sdnr/wt/data-provider/database/src/test/resources/simplelogger.properties
@@ -0,0 +1,6 @@
+org.slf4j.simpleLogger.defaultLogLevel=debug
+org.slf4j.simpleLogger.showDateTime=true
+#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+#org.slf4j.simpleLogger.showThreadName=true
+org.slf4j.simpleLogger.showLogName=true
+org.slf4j.simpleLogger.showShortLogName=false
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/feature/pom.xml b/sdnr/wt/data-provider/feature/pom.xml
new file mode 100644
index 0000000..0bda76f
--- /dev/null
+++ b/sdnr/wt/data-provider/feature/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.sdnr.wt.dataprovider.feature
+ * ================================================================================
+ * Copyright (C) 2018 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+  <artifactId>sdnr-wt-data-provider-feature</artifactId>
+  <version>0.7.0-SNAPSHOT</version>
+  <packaging>feature</packaging>
+  <name>ccsdk-features-sdnr-wt :: ${project.artifactId} :: feature</name>
+
+  <parent>
+    <groupId>org.onap.ccsdk.parent</groupId>
+    <artifactId>single-feature-parent</artifactId>
+    <version>1.5.1-SNAPSHOT</version>
+    <relativePath />
+  </parent>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>sdnr-wt-data-provider-provider</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/sdnr/wt/data-provider/installer/pom.xml b/sdnr/wt/data-provider/installer/pom.xml
new file mode 100755
index 0000000..c736041
--- /dev/null
+++ b/sdnr/wt/data-provider/installer/pom.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.sdnr.wt.dataprovider.installer
+ * ================================================================================
+ * Copyright (C) 2018 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.onap.ccsdk.parent</groupId>
+    <artifactId>odlparent-lite</artifactId>
+    <version>1.5.1-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+  <artifactId>sdnr-wt-data-provider-installer</artifactId>
+  <version>0.7.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+
+  <properties>
+    <application.name>sdnr-wt-data-provider</application.name>
+    <include.transitive.dependencies>false</include.transitive.dependencies>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+      <artifactId>${application.name}-feature</artifactId>
+      <version>${project.version}</version>
+      <type>xml</type>
+      <classifier>features</classifier>
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+      <artifactId>${application.name}-provider</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>maven-repo-zip</id>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <attach>true</attach>
+              <finalName>stage/${application.name}-${project.version}</finalName>
+              <descriptors>
+                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+              </descriptors>
+              <appendAssemblyId>true</appendAssemblyId>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-nested-dependencies</id>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <phase>prepare-package</phase>
+            <configuration>
+              <transitive>true</transitive>
+              <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+              <overWriteReleases>false</overWriteReleases>
+              <overWriteSnapshots>true</overWriteSnapshots>
+              <overWriteIfNewer>true</overWriteIfNewer>
+              <useRepositoryLayout>true</useRepositoryLayout>
+              <addParentPoms>false</addParentPoms>
+              <copyPom>false</copyPom>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.6</version>
+        <executions>
+          <execution>
+            <id>copy-schemas</id>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <phase>validate</phase>
+            <configuration>
+              <outputDirectory>${project.build.directory}/assembly/cache/schema</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${basedir}/../provider/src/main/resources/preload.cache.schema</directory>
+                  <includes>
+                    <include>*.yang</include>
+                  </includes>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/sdnr/wt/data-provider/installer/src/assembly/assemble_mvnrepo_zip.xml b/sdnr/wt/data-provider/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 0000000..c4eb9aa
--- /dev/null
+++ b/sdnr/wt/data-provider/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,49 @@
+<!--
+  ============LICENSE_START=======================================================
+  ONAP : CCSDK
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights
+  						reserved.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ============LICENSE_END=========================================================
+  -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+  <id>repo</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+
+	<!--  we want "system" and related files right at the root level
+		  as this file is suppose to be unzip on top of a karaf
+		  distro. -->
+	<includeBaseDirectory>false</includeBaseDirectory>
+
+	<fileSets>
+		<fileSet>
+			<directory>target/assembly/</directory>
+			<outputDirectory>.</outputDirectory>
+			<excludes>
+			</excludes>
+		</fileSet>
+	</fileSets>
+
+
+
+</assembly>
diff --git a/sdnr/wt/data-provider/model/pom.xml b/sdnr/wt/data-provider/model/pom.xml
new file mode 100644
index 0000000..454742a
--- /dev/null
+++ b/sdnr/wt/data-provider/model/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.sdnr.wt.data-provider.model
+ * ================================================================================
+ * Copyright (C) 2018 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+	<artifactId>sdnr-wt-data-provider-model</artifactId>
+	<version>0.7.0-SNAPSHOT</version>
+	<name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+	<packaging>bundle</packaging>
+
+	<parent>
+		<groupId>org.onap.ccsdk.parent</groupId>
+		<artifactId>binding-parent</artifactId>
+		<version>1.5.1-SNAPSHOT</version>
+		<relativePath />
+	</parent>
+
+	<properties>
+		<maven.javadoc.skip>true</maven.javadoc.skip>
+	</properties>
+
+	<licenses>
+		<license>
+			<name>Apache License, Version 2.0</name>
+			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
+		</license>
+	</licenses>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.opendaylight.netconf</groupId>
+	 		<artifactId>sal-netconf-connector</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>sdnr-wt-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>**/gen/**</exclude>
+						<exclude>**/generated-sources/**</exclude>
+						<exclude>**/yang-gen-sal/**</exclude>
+						<exclude>**/pax/**</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/ArchiveCleanProvider.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/ArchiveCleanProvider.java
new file mode 100644
index 0000000..00ec2e6
--- /dev/null
+++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/ArchiveCleanProvider.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.model;
+
+import java.util.Date;
+
+public interface ArchiveCleanProvider {
+
+    /**
+     * Remove all index data older, than specified
+     * @param olderAreOutdated time to specify older elements
+     * @return number of removed elements
+     */
+    int doIndexClean(Date olderAreOutdated);
+
+    /**
+     * Get number of elements older then
+     * @param olderAreOutdated date to compare with and specify older elements
+     * @return number of elements
+     */
+    public int getNumberOfOldObjects(Date olderAreOutdated);
+
+
+}
diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java
new file mode 100644
index 0000000..fbfd18a
--- /dev/null
+++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/DataProvider.java
@@ -0,0 +1,95 @@
+/**
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ */
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.model;
+
+import java.util.Date;
+import java.util.List;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ConnectionlogEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EventlogEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultcurrentEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultlogEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Inventory;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementConnectionEntity;
+
+public interface DataProvider extends ArchiveCleanProvider {
+
+    // -- Connection log
+    void writeConnectionLog(ConnectionlogEntity event);
+
+    // -- Event log
+    void writeEventLog(EventlogEntity event);
+
+    void writeFaultLog(FaultlogEntity fault);
+
+    void updateFaultCurrent(FaultcurrentEntity fault);
+
+    /**
+     * Remove all entries for one node
+     *
+     * @param nodeName contains the mountpointname
+     * @return number of deleted entries
+     */
+    int clearFaultsCurrentOfNode(String nodeName);
+
+    /**
+     * Remove all entries for one node
+     *
+     * @param nodeName contains the mountpointname
+     * @param objectId of element to be deleted
+     * @return number of deleted entries
+     */
+    int clearFaultsCurrentOfNodeWithObjectId(String nodeName, String objectId);
+
+    /**
+     * Deliver list with all mountpoint/node-names in the database.
+     *
+     * @return List of all mountpoint/node-names the had active alarms.
+     */
+    List<String> getAllNodesWithCurrentAlarms();
+
+    /**
+     * write internal equipment to database
+     * @param internalEquipment with mandatory fields.
+     */
+    void writeInventory(Inventory internalEquipment);
+
+    /**
+     *
+     * @param networkElementConnectionEntitiy to wirte to DB
+     * @param nodeId Id for this DB element
+     */
+    void updateNetworkConnectionDeviceType(NetworkElementConnectionEntity networkElementConnectionEntitiy,
+            String nodeId);
+
+    /**
+     * Update after new mountpoint registration
+     * @param networkElementConnectionEntitiy data
+     * @param nodeId of device (mountpoint name)
+     */
+    void updateNetworkConnection22(NetworkElementConnectionEntity networkElementConnectionEntitiy, String nodeId);
+
+    void removeNetworkConnection(String nodeId);
+
+    @Override
+	int doIndexClean(Date olderAreOutdated);
+
+    @Override
+	int getNumberOfOldObjects(Date olderAreOutdated);
+
+    List<NetworkElementConnectionEntity> getNetworkElementConnections();
+}
diff --git a/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEntityDataProvider.java b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEntityDataProvider.java
new file mode 100644
index 0000000..c8c9404
--- /dev/null
+++ b/sdnr/wt/data-provider/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/model/IEntityDataProvider.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.model;
+
+public interface IEntityDataProvider {
+
+    /** Get provider for database read/write operations **/
+    public DataProvider getDataProvider();
+
+    public void setReadyStatus(boolean status);
+}
diff --git a/sdnr/wt/data-provider/model/src/main/yang/dataprovider.yang b/sdnr/wt/data-provider/model/src/main/yang/dataprovider.yang
new file mode 100644
index 0000000..8fa19a9
--- /dev/null
+++ b/sdnr/wt/data-provider/model/src/main/yang/dataprovider.yang
@@ -0,0 +1,1207 @@
+module data-provider {
+
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:data-provider";
+    prefix "odluxprovider";
+
+    import ietf-yang-types { prefix "yang"; revision-date 2013-07-15; }
+    import netconf-node-topology { prefix "nettop"; revision-date 2015-01-14; }
+    description
+        "data-provider api module";
+
+    revision "2019-08-01" {
+        description
+                "Initial revision";
+    }
+    // --- typedef
+    typedef Entity {
+        description "Data type and alias for elasticsearch or table name for SQL database.";
+        type enumeration {
+            enum connectionlog {
+                description "logs mountpoint connection state changes";
+            }
+            enum faultcurrent {
+                description "current faults";
+            }
+            enum eventlog {
+                description "logs for all notifications e.g. netconf, ves and internal events";
+            }
+            enum faultlog {
+                description "faultlog information";
+            }
+            enum historicalperformance15min {
+                description "performance data";
+            }
+            enum historicalperformance24h {
+                description "performance data";
+            }
+            enum mediator-server {
+                description "list of mediator servers";
+            }
+            enum networkelement-connection {
+                description "list of mountpoints for netconf devices (joint required-network-element+mdsal
+                                state";
+            }
+            enum inventoryequipment {
+                description "list of equipment inventory";
+            }
+            enum maintenancemode {
+                description "list of maintenance setting";
+            }
+        }
+    }
+    typedef SortOrder {
+        type enumeration {
+            enum ascending {
+            }
+            enum descending {
+            }
+        }
+        description "Entities for odlux clients";
+    }
+    typedef FilterProperty {
+        type string;
+    }
+
+    typedef NotificationType {
+        type enumeration {
+            enum ProblemNotificationXml {
+                description "";
+            }
+            enum AttributeValueChangedNotificationXml {
+                description "";
+            }
+        }
+    }
+
+    typedef ConnectionLogStatus {
+        type enumeration {
+            enum Mounted {
+                description "Mountpoint created";
+            }
+            enum Unmounted {
+                description "Mountpoint removed";
+            }
+            enum Connecting {
+                description "Mountpoint establishing connection";
+            }
+            enum Connected {
+                description "Mountpoint connection established";
+            }
+            enum UnableToConnect {
+                description "Mountpoint connection not possible";
+            }
+            enum Disconnected {
+                description "Required and mountpoint removed";
+            }
+            enum Undefined {
+                description "Status not available";
+            }
+        }
+    }
+    typedef NetworkElementDeviceType {
+        type enumeration {
+            enum Wireless {
+                description "implements microwave-model.yang or air-interface.yang";
+            }
+            enum RAN {
+                description "implements sth. like o-ran*.yang";
+            }
+            enum ORAN {
+                description "implements RAN according to o-ran*.yang";
+            }
+            enum RAN3GPP {
+                description "implements RAN according to _3gpp-ran*.yang";
+            }
+            enum Optical {
+                description "implements tapi-*.yang or org-openroadm*.yang";
+            }
+            enum Router {
+                description "implements vlan-interface.yang";
+            }
+            enum NtsManager {
+
+                description "Simulation of device";
+            }
+            enum Nonsupported {
+                description "Device type known, but not support";
+            }
+            enum Unknown {
+                description "Device type at this point of time unknown";
+            }
+        }
+    }
+    typedef severity-type {
+        type enumeration {
+            enum NonAlarmed {
+                description "problem cleared indication";
+            }
+            enum Warning {
+                description "problem level";
+            }
+            enum Minor {
+                description "problem level";
+            }
+            enum Major {
+                description "problem level";
+            }
+            enum Critical {
+                description "problem level";
+            }
+        }
+        description "According to ITU-T M.3160";
+    }
+    typedef source-type {
+        type enumeration {
+            enum ves {
+                description "VES Interface";
+            }
+            enum netconf {
+                description "NETCONF Interface";
+            }
+            enum controller {
+                description "SDN Controller";
+            }
+            enum unknown {
+                description "Unknown source";
+            }
+        }
+    }
+    // --- grouping and builder-container
+    grouping connectionlog-entity {
+        leaf id {
+            type string;
+            description "database id";
+        }
+        leaf node-id {
+            type string;
+            description "the node/mountpoint which connection state has changed";
+        }
+        leaf timestamp {
+            type yang:date-and-time;
+            description "timestamp when event happened";
+        }
+        leaf status {
+            type ConnectionLogStatus;
+            description "new state of the connection of the device";
+        }
+    }
+    container connectionlog {
+        description "builder";
+        uses connectionlog-entity;
+    }
+    grouping object-change-reference {
+        description "Reference of of object (e.g. Interface pack) owned by a node";
+        leaf node-id {
+            type string;
+        }
+        leaf counter {
+            type int32;
+        }
+        leaf timestamp {
+            type yang:date-and-time;
+        }
+        leaf object-id {
+            type string;
+        }
+    }
+    grouping source-reference {
+        description "Identify a source";
+        leaf source-type {
+            type source-type;
+        }
+    }
+    grouping fault {
+        description "Fault event of an object";
+        leaf problem {
+            type string;
+        }
+        leaf severity {
+            type severity-type;
+        }
+    }
+    grouping attribute-change {
+        description "update change of an attribute";
+        leaf attribute-name {
+            type string;
+        }
+        leaf new-value {
+            type string;
+        }
+    }
+    grouping entity-id {
+        description "Unique database id of entity";
+        leaf id {
+            type string;
+        }
+    }
+    grouping faultcurrent-entity {
+        description "Current fault status";
+        uses object-change-reference;
+        uses fault;
+        uses entity-id;
+    }
+    container faultcurrent {
+        description "builder";
+        uses faultcurrent-entity;
+    }
+    grouping faultlog-entity {
+        description "Changed fault indication";
+        uses source-reference;
+        uses object-change-reference;
+
+        uses fault;
+        uses entity-id;
+    }
+    container faultlog {
+        description "builder";
+        uses faultlog-entity;
+    }
+    grouping eventlog-entity {
+        description "One change event of devices";
+        uses source-reference;
+        uses object-change-reference;
+        uses attribute-change;
+        uses entity-id;
+    }
+    container eventlog {
+        description "builder";
+        uses eventlog-entity;
+    }
+    grouping filter {
+        leaf description {
+            type string;
+            description "Filter specific description";
+        }
+        leaf start {
+            type yang:date-and-time;
+            description "begin of maintenance-mode";
+        }
+        leaf end {
+            type yang:date-and-time;
+            description "end of maintenance-mode";
+        }
+        leaf object-id-ref {
+            type string;
+            description "object id to filter on, or empty for all";
+        }
+        leaf problem {
+            type string;
+            description "name of the problem to filter or empty for all";
+        }
+    }
+    grouping maintenance-entity {
+        description "Maintenance mode for a device. ";
+        leaf id {
+            mandatory true;
+            type string;
+            description "Key to get/set configuration entry in database. Normally Mountpoint-name
+                        is used as key id of node.";
+        }
+        leaf node-id {
+            mandatory true;
+            type string;
+            description "";
+        }
+        leaf active {
+            type boolean;
+            description "Configuration to activate or deactivate this entry";
+        }
+        uses filter;
+    }
+    container maintenance {
+        description "builder";
+        uses maintenance-entity;
+    }
+    grouping mediator-server-entity {
+        leaf id {
+            mandatory true;
+            type string;
+        }
+        leaf url {
+            type string;
+        }
+        leaf name {
+            type string;
+        }
+    }
+    grouping pmdata-base {
+        leaf node-name {
+            type string;
+        }
+        leaf uuid-interface {
+            type string;
+        }
+        leaf layer-protocol-name {
+            type string;
+        }
+        leaf radio-signal-id {
+            type string;
+        }
+        leaf time-stamp {
+            type yang:date-and-time;
+        }
+        leaf suspect-interval-flag {
+            type boolean;
+        }
+        leaf granularity-period {
+            type string;
+        }
+        leaf scanner-id {
+            type string;
+        }
+    }
+    grouping pmdata-microwave {
+        description "Consolidated performance information of all microwave model interface pacs";
+        leaf es {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "Number of errored seconds.";
+        }
+        leaf ses {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "Number of severely errored seconds.";
+        }
+        leaf cses {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "Number of consecutive severely errored seconds.";
+        }
+        leaf unavailability {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "Total time of unavailability in seconds.";
+        }
+        leaf tx-level-min {
+            type int8;
+            units "dBm";
+            default 99;
+            config false;
+            description "Minimum transmit power. Signed integers are required.";
+        }
+        leaf tx-level-max {
+            type int8;
+            units "dBm";
+            default 99;
+            config false;
+            description "Maximum transmit power. Signed integers are required.";
+        }
+        leaf tx-level-avg {
+            type int8;
+            units "dBm";
+            default 99;
+            config false;
+            description "Averaged transmit power. Signed integers are required.";
+        }
+        leaf rx-level-min {
+            type int8;
+            units "dBm";
+            default 99;
+            config false;
+            description "Minimum receive level. Signed integers are required.";
+        }
+        leaf rx-level-max {
+            type int8;
+            units "dBm";
+            default 99;
+            config false;
+            description "Maximum receive level. Signed integers are required.";
+        }
+        leaf rx-level-avg {
+            type int8;
+            units "dBm";
+            default 99;
+            config false;
+            description "Averaged receive level. Signed integers are required.";
+        }
+        leaf time2-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "Sum of all seconds the transmitter operated in e.g. BPSK.";
+        }
+        leaf time4-states-s {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time4-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time8-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time16-states-s {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time16-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time32-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time64-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time128-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time256-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time512-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time512-states-l {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time1024-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time1024-states-l {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time2048-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time2048-states-l {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time4096-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time4096-states-l {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time8192-states {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf time8192-states-l {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "none";
+        }
+        leaf snir-min {
+            type int8;
+            units "dB";
+            default -99;
+            config false;
+            description "Minimum signal to (noise+interference) ratio.";
+        }
+        leaf snir-max {
+            type int8;
+            units "dB";
+            default -99;
+            config false;
+            description "Maximum signal to (noise+interference) ratio.";
+        }
+        leaf snir-avg {
+            type int8;
+            units "dB";
+            default -99;
+            config false;
+            description "Averaged signal to (noise+interference) ratio.";
+        }
+        leaf xpd-min {
+            type int8;
+            units "dB";
+            default -99;
+            config false;
+            description "Minimum cross polarization discrimination.";
+        }
+        leaf xpd-max {
+            type int8;
+            units "dB";
+            default -99;
+            config false;
+            description "Maximum cross polarization discrimination.";
+        }
+        leaf xpd-avg {
+            type int8;
+            units "dB";
+            default -99;
+            config false;
+            description "Averaged cross polarization discrimination.";
+        }
+        leaf rf-temp-min {
+            type int8;
+            units "C";
+            default -99;
+            config false;
+            description "Lowest temperature (in degree Celsius) of the radio module inside the outdoor unit.";
+        }
+        leaf rf-temp-max {
+            type int8;
+            units "C";
+            default -99;
+            config false;
+            description "Highest temperature (in degree Celsius) of the radio module inside the outdoor unit.";
+        }
+        leaf rf-temp-avg {
+            type int8;
+            units "C";
+            default -99;
+            config false;
+            description "Averaged temperature (in degree Celsius) of the radio module inside the outdoor unit.";
+        }
+        leaf defect-blocks-sum {
+            type int16;
+            units "blocks";
+            default -1;
+            config false;
+            description "Total number of blocks that were defect after receiving and could not be corrected by the FEC.";
+        }
+        leaf time-period {
+            type int32;
+            units "s";
+            default -1;
+            config false;
+            description "Total length of the measurement period.";
+        }
+    }
+    grouping pmdata-ethernet {
+        description "Consolidated performance information for ethernet.";
+        leaf tx-ethernet-bytes-max-s {
+            type int32;
+            units "Bytes/s";
+            default -1;
+            config false;
+            description "Counts the number of Bytes of Ethernet traffic (before header compression) transmitted within a second and keeps the highest value within the measurement period. Field to be left blank for all types of TDM containers.";
+        }
+        leaf tx-ethernet-bytes-max-m {
+            type int64;
+            units "Bytes/min";
+            default -1;
+            config false;
+            description "Counts the number of Bytes of Ethernet traffic (before header compression) transmitted within a minute and keeps the highest value with in the measurement period. Field to be left blank for all types of TDM containers.";
+        }
+        leaf tx-ethernet-bytes-sum {
+            type int64;
+            units "Bytes";
+            default -1;
+            config false;
+            description "Total number of Bytes of Ethernet traffic (before header compression) transmitted (in direction out of the device) during the measurement period. Field to be left blank for all types of TDM containers.";
+        }
+
+    }
+    grouping pmdata15m-entity {
+        uses pmdata-base;
+        container performance-data {
+            uses pmdata-microwave;
+            uses pmdata-ethernet;
+        }
+
+    }
+    grouping pmdata24h-entity {
+        uses pmdata-base;
+        container performance-data {
+            uses pmdata-microwave;
+            uses pmdata-ethernet;
+        }
+    }
+    grouping inventory-entity {
+        description "One equipment entity in a list of a network element that could be rack, card, backplane, module";
+
+        leaf id {
+            description "Unique database id, node-id/uuid";
+            mandatory true;
+            type string;
+        }
+        leaf tree-level {
+            description "Containment level, starting with 0..";
+            type uint32;
+        }
+        leaf parent-uuid {
+            description "Unique inventory id of holder";
+            type string;
+        }
+        leaf node-id {
+            description "Unique node id of network element";
+            type string;
+        }
+        leaf uuid {
+            description "Unique inventory id of this node for this equipement, provided by network element";
+            type string;
+        }
+        leaf-list contained-holder {
+            description "List of uuid of contained equipment";
+            type string;
+        }
+        leaf manufacturer-name {
+            description "manufactured-thing/manufacturer-properties/manufacturer-name";
+            type string;
+        }
+        leaf manufacturer-identifier {
+            description "manufactured-thing/manufacturer-properties/manufacturer-identifier";
+            type string;
+        }
+        leaf serial {
+            description "manufactured-thing/equipment-instance/serial";
+            type string;
+        }
+        leaf date {
+            description "manufactured-thing/equipment-instance/manufacture-date: Date information provided by manufacturer. No specific format. ()";
+            type string;
+        }
+        leaf version {
+            description "manufactured-thing/equipment-type/version";
+            type string;
+        }
+        leaf description {
+            description "manufactured-thing/equipment-type/description";
+            type string;
+        }
+        leaf part-type-id {
+            description "manufactured-thing/equipment-type/part-type-identifier";
+            type string;
+        }
+        leaf model-identifier {
+            description "manufactured-thing/equipment-type/model-identifier";
+            type string;
+        }
+        leaf type-name {
+            description "manufactured-thing/equipment-type/type-name";
+            type string;
+        }
+    }
+    container inventory {
+        description "builder";
+        uses inventory-entity;
+    }
+    grouping node-details-g {
+        leaf-list available-capabilities {
+            type string;
+        }
+        leaf-list unavailable-capabilities {
+            type string;
+        }
+    }
+    grouping network-element-connection-entity {
+
+        leaf id {
+            type string;
+            description "database id/key. here is equal to node-id";
+        }
+        leaf node-id {
+            type string;
+            description "mountpoint name of device in controller";
+        }
+        leaf host {
+            type string;
+            description "netconf hostname or ip address of device";
+        }
+        leaf port {
+            type uint32;
+            description "netconf port of device";
+        }
+        leaf username {
+            type string;
+            description "netconf username";
+        }
+        leaf password {
+            type string;
+            description "netconf password. should be removed asap";
+        }
+        leaf core-model-capability {
+            type string;
+            description "revision of core-model capability";
+        }
+        leaf device-type {
+            type NetworkElementDeviceType;
+            description "categoried type of ne based on implemented yang specs";
+        }
+        leaf is-required {
+            type boolean;
+            description "entry exists in db index required-networkelement";
+        }
+        container node-details {
+            uses node-details-g;
+            description "holder of available and unavailable capabilities";
+        }
+        leaf status {
+            type ConnectionLogStatus;
+            description "current connection status. default Disconnected";
+        }
+    }
+    container network-element-connection {
+        description "builder";
+        uses network-element-connection-entity;
+    }
+    grouping status-entity {
+        container faults {
+            leaf criticals {
+                type uint32;
+            }
+            leaf majors {
+                type uint32;
+            }
+            leaf minors {
+                type uint32;
+            }
+            leaf warnings {
+                type uint32;
+            }
+        }
+    }
+    container status {
+        description "builder";
+         uses status-entity;
+    }
+    grouping entity-input {
+        list filter {
+            key property;
+            leaf property {
+                type string;
+            }
+            leaf filtervalue {
+                type string;
+            }
+            description "List with filter criteria. Not listed means all.";
+        }
+        list sortorder {
+            key property;
+            leaf property {
+                type string;
+            }
+            leaf sortorder {
+                type SortOrder;
+            }
+            description "List with sort order. Not listed means default";
+        }
+        container pagination {
+            leaf size {
+                type uint32 {
+                    range "1..max";
+                }
+                default 20;
+                description "Number of entries to be delivered";
+            }
+            leaf page {
+                type uint64 {
+                    range "1..max";
+                }
+                default 1;
+                description "Number to be used to calculate starting entry to deliver";
+            }
+        }
+    }
+    grouping pagination-output-g {
+        leaf size {
+            type uint32 {
+                range "1..max";
+            }
+            default 20;
+            description "Number of entries to be delivered";
+        }
+        leaf page {
+            type uint64 {
+                range "1..max";
+            }
+            default 1;
+            description "Number to be used to calculate starting entry to deliver";
+        }
+        leaf total {
+            type uint64 {
+                range "0..max";
+            }
+            default 0;
+            description "Number to be used to calculate starting entry to deliver";
+        }
+    }
+    container pagination-output {
+        description "builder";
+        uses pagination-output-g;
+    }
+    // --- rpc
+    rpc read-faultcurrent-list {
+        description
+                "Get list of faultcurrent entries according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses faultcurrent-entity;
+            }
+        }
+    }
+    rpc read-faultlog-list {
+        description
+                "Get list of faultlog entries according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses faultlog-entity;
+            }
+        }
+    }
+
+    rpc read-eventlog-list {
+        description
+                "Get list of eventlog entities according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses eventlog-entity;
+            }
+        }
+    }
+    rpc read-connectionlog-list {
+        description
+                "Get list of eventlog entities according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses connectionlog-entity;
+            }
+        }
+    }
+    rpc read-maintenance-list {
+        description
+                "Get list of maintenance entries according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses maintenance-entity;
+            }
+        }
+    }
+    rpc create-maintenance {
+        description
+                "insert new entry of maintenance";
+        input {
+            uses maintenance-entity;
+        }
+        output {
+            uses maintenance-entity;
+        }
+    }
+    rpc update-maintenance {
+        description
+                "update existing entity of maintenance";
+        input {
+            uses maintenance-entity;
+        }
+        output {
+            uses maintenance-entity;
+        }
+    }
+    rpc delete-maintenance {
+        description
+                "delete entity of maintenance";
+        input {
+            uses maintenance-entity;
+        }
+        output {
+        }
+    }
+
+    rpc read-mediator-server-list {
+        description
+                "Get list of mediator-servers according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses mediator-server-entity;
+            }
+        }
+    }
+    rpc create-mediator-server {
+        description
+                "create new entry of entity mediator-server";
+        input {
+            uses mediator-server-entity;
+        }
+        output {
+            uses mediator-server-entity;
+        }
+    }
+    rpc update-mediator-server {
+        description
+                "update entry of entity mediator-server";
+        input {
+            uses mediator-server-entity;
+        }
+        output {
+            uses mediator-server-entity;
+        }
+    }
+    rpc delete-mediator-server {
+        description
+                "delete entry of entity mediator-server";
+        input {
+            uses mediator-server-entity;
+        }
+        output {
+        }
+    }
+    rpc read-network-element-connection-list {
+        description
+                "Get list of networkelement-connections according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses network-element-connection-entity;
+            }
+        }
+    }
+    rpc create-network-element-connection {
+        description "create entry in networkelement-connection";
+        input {
+            uses network-element-connection-entity;
+        }
+        output {
+            uses network-element-connection-entity;
+        }
+    }
+    rpc update-network-element-connection {
+        description "Put an element to ne-entity";
+        input {
+            uses network-element-connection-entity;
+        }
+        output {
+            uses network-element-connection-entity;
+        }
+    }
+    rpc delete-network-element-connection {
+        description "!ONLY FOR TESTING! Put an element to ne-entity";
+        input {
+            uses network-element-connection-entity;
+        }
+        output {
+        }
+    }
+
+    rpc read-pmdata-15m-ltp-list {
+        description
+                "Get list of ltps for one mountpoint with historical pmdata";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            leaf-list data {
+                type string;
+            }
+        }
+    }
+    rpc read-pmdata-24h-ltp-list {
+        description
+                "Get list of ltps for one mountpoint with historical pmdata";
+        input {
+            uses entity-input;
+        }
+
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            leaf-list data {
+                type string;
+            }
+        }
+    }
+    rpc read-pmdata-15m-device-list {
+        description
+                "Get list of mountpoints with historical pmdata";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            leaf-list data {
+                type string;
+            }
+        }
+    }
+    rpc read-pmdata-24h-device-list {
+        description
+                "Get list of mountpoints with historical pmdata";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            leaf-list data {
+                type string;
+            }
+        }
+    }
+
+    rpc read-pmdata-15m-list {
+        description
+                "Get list of entities according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses pmdata15m-entity;
+            }
+        }
+    }
+    rpc read-pmdata-24h-list {
+        description
+                "Get list of historical pmdata according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses pmdata24h-entity;
+            }
+        }
+    }
+    rpc read-inventory-list {
+        description
+                "Get list of inventory according to filter";
+        input {
+            uses entity-input;
+        }
+        output {
+            container pagination {
+                uses pagination-output-g;
+            }
+            list data {
+                uses inventory-entity;
+            }
+        }
+    }
+    rpc read-status {
+        description
+                "Read status information of controller";
+        output {
+            list data {
+                uses status-entity;
+            }
+        }
+    }
+}
+
diff --git a/sdnr/wt/data-provider/pom.xml b/sdnr/wt/data-provider/pom.xml
new file mode 100755
index 0000000..5b1f483
--- /dev/null
+++ b/sdnr/wt/data-provider/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.sdnr.wt.data-provider
+ * ================================================================================
+ * Copyright (C) 2018 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+      <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+    <artifactId>sdnr-wt-data-provider-top</artifactId>
+    <version>0.7.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+
+    <parent>
+        <groupId>org.onap.ccsdk.parent</groupId>
+        <artifactId>odlparent-lite</artifactId>
+        <version>1.5.1-SNAPSHOT</version>
+        <relativePath/>
+    </parent>
+
+    <properties>
+        <feature-name>sdnr-wt-data-provider</feature-name>
+    </properties>
+
+    <modules>
+        <module>model</module>
+        <module>database</module>
+        <module>provider</module>
+        <module>feature</module>
+        <module>installer</module>
+    </modules>
+
+</project>
diff --git a/sdnr/wt/data-provider/provider/copyright b/sdnr/wt/data-provider/provider/copyright
new file mode 100644
index 0000000..754b621
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/copyright
@@ -0,0 +1,17 @@
+/**
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ */
diff --git a/sdnr/wt/data-provider/provider/pom.xml b/sdnr/wt/data-provider/provider/pom.xml
new file mode 100644
index 0000000..2c1978b
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/pom.xml
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    ============LICENSE_START=======================================================
+    ONAP : CCSDK / SDNR / WT / data-provider
+    ================================================================================
+    Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All
+    rights reserved.
+    ================================================================================
+    Licensed under the Apache License, Version 2.0 (the "License"); you may not
+    use this file except in compliance with the License. You may obtain a copy
+    of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+    by applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+    OF ANY KIND, either express or implied. See the License for the specific
+    language governing permissions and limitations under the License.
+    ============LICENSE_END=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+	<artifactId>sdnr-wt-data-provider-provider</artifactId>
+	<version>0.7.0-SNAPSHOT</version>
+	<name>ccsdk-features-sdnr-wt :: ${project.artifactId}</name>
+	<packaging>bundle</packaging>
+
+	<parent>
+		<groupId>org.onap.ccsdk.parent</groupId>
+		<artifactId>binding-parent</artifactId>
+		<version>1.5.1-SNAPSHOT</version>
+		<relativePath />
+	</parent>
+
+	<properties>
+		<checkstyle.skip>true</checkstyle.skip> <!-- POM configuration -->
+		<maven.javadoc.skip>true</maven.javadoc.skip>
+		<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
+		<buildtime>${maven.build.timestamp}</buildtime>
+		<elasticsearch.version>6.4.3</elasticsearch.version>
+		<elasticsearch.lucene.version>7.4.0</elasticsearch.lucene.version>
+		<databaseport>49402</databaseport>
+		<onap.distname>Frankfurt</onap.distname>
+		<odl.distname>Neon-SR1</odl.distname>
+		<odlux.buildno>29.7af5ca8(19/11/19)</odlux.buildno>
+	</properties>
+
+	<licenses>
+		<license>
+			<name>Apache License, Version 2.0</name>
+			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
+		</license>
+	</licenses>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-core</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>sdnr-wt-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>sdnr-wt-data-provider-database</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+ 		<dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.opendaylight.netconf</groupId>
+			<artifactId>sal-netconf-connector</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+			<artifactId>rfc6991-ietf-yang-types</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.opendaylight.mdsal</groupId>
+			<artifactId>yang-binding</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.opendaylight.mdsal</groupId>
+			<artifactId>mdsal-singleton-common-api</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>**/gen/**</exclude>
+						<exclude>**/generated-sources/**</exclude>
+						<exclude>**/yang-gen-sal/**</exclude>
+						<exclude>**/pax/**</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>exec-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>generateDTOs</id>
+						<phase>generate-sources</phase>
+					    <goals>
+        					<goal>exec</goal>
+				      	</goals>
+      				  	<configuration>
+                      		<skip>${skipTests}</skip>
+							<executable>${basedir}/../database/src/main/resources/es-init.sh</executable>
+       		                <arguments>
+       		                	<argument>initfile</argument>
+       		                	<argument>-f</argument>
+                    			<argument>${project.build.directory}/EsInit.script</argument>
+                    		</arguments>
+      					</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>com.github.alexcojocaru</groupId>
+				<artifactId>elasticsearch-maven-plugin</artifactId>
+				<version>6.16</version>
+				<configuration>
+					<skip>true</skip>
+					<clusterName>testCluster</clusterName>
+					<transportPort>9500</transportPort>
+					<httpPort>${databaseport}</httpPort>
+					<version>6.4.3</version>
+					<pathInitScript>${project.build.directory}/EsInit.script</pathInitScript>
+				</configuration>
+				<executions>
+					<execution>
+						<id>start-elasticsearch</id>
+						<phase>process-test-classes</phase>
+						<goals>
+							<goal>runforked</goal>
+						</goals>
+					</execution>
+					<execution>
+						<id>stop-elasticsearch</id>
+						<phase>prepare-package</phase>
+						<goals>
+							<goal>stop</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<systemProperties>
+						<property>
+							<name>databaseport</name>
+							<value>${databaseport}</value>
+						</property>
+					</systemProperties>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
+
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessor.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessor.java
new file mode 100644
index 0000000..dc90ee9
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessor.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.database.EsDataObjectReaderWriter;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.impl.DataProviderServiceImpl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EntityInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultcurrentListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultcurrentListOutputBuilder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataObjectAcessor<T extends DataObject> extends EsDataObjectReaderWriter<T> {
+
+	private static final Logger LOG = LoggerFactory.getLogger(DataObjectAcessor.class);
+
+	public DataObjectAcessor(HtDatabaseClient dbClient, Entity entity, Class<T> clazz) throws ClassNotFoundException {
+		this(dbClient, entity, clazz, true);
+		LOG.info("Create {}", this.getClass().getName());
+	}
+
+	public DataObjectAcessor(HtDatabaseClient dbClient, Entity entity, Class<T> clazz, boolean idSupported) throws ClassNotFoundException {
+		super(dbClient, entity, clazz);
+		if (idSupported)
+			setEsIdAttributeName("_id");
+	}
+
+	QueryResult<T> getData(EntityInput input) {
+		long page = QueryByFilter.getPage(input);
+		long pageSize = QueryByFilter.getPageSize(input);
+        LOG.info("Request: {}", this.getDataTypeName());
+		QueryBuilder query = QueryByFilter.fromFilter(input.getFilter()).from((page - 1) * pageSize).size(pageSize);
+		QueryByFilter.setSortOrder(query, input.getSortorder());
+		SearchResult<T> result = doReadAll(query,query.contains("range"));
+		return new QueryResult<T>(page, pageSize, result);
+	}
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessorPm.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessorPm.java
new file mode 100644
index 0000000..a145a9f
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessorPm.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.io.IOException;
+
+import org.onap.ccsdk.features.sdnr.wt.common.database.ExtRestClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilders;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.SearchRequest;
+import org.onap.ccsdk.features.sdnr.wt.common.database.responses.AggregationEntries;
+import org.onap.ccsdk.features.sdnr.wt.common.database.responses.SearchResponse;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EntityInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SortOrder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Filter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Sortorder;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataObjectAcessorPm<T extends DataObject> extends DataObjectAcessor<T> {
+
+ 	private final Logger LOG = LoggerFactory.getLogger(DataObjectAcessorPm.class);
+
+	private static final String UUID_KEY = "uuid-interface";
+	private static final String NODE_KEY = "node-name";
+	private static final String KEY = "node-name";
+
+
+	enum Intervall {
+		PMDATA15M("historicalperformance15min", "historicalperformance15min"),
+		PMDATA24H("historicalperformance24h", "historicalperformance24h");
+
+		String index;
+		String type;
+
+		Intervall(String index, String type) {
+		    this.index = index;
+		    this.type = type;
+		}
+
+		public String getIndex() {
+			return index;
+		}
+
+		public String getType() {
+			return type;
+		}
+	}
+
+	private ExtRestClient dbClient;
+	private Intervall mode;
+
+	public DataObjectAcessorPm(HtDatabaseClient dbClient, Intervall mode, Entity entity, Class<T> clazz) throws ClassNotFoundException {
+		super(dbClient, entity, clazz, false);
+		this.dbClient = dbClient;
+		this.mode = mode;
+	}
+
+	/**
+	 * get aggregated list of ltps for filter NODE_KEY
+	 * @param input
+	 * @return
+	 * @throws IOException
+	 */
+	QueryResult<String> getDataLtpList(EntityInput input) throws IOException {
+		long page = QueryByFilter.getPage(input);
+		long pageSize = QueryByFilter.getPageSize(input);
+		Filter nodeFilter = QueryByFilter.getFilter(input.getFilter(), NODE_KEY);
+		if (nodeFilter != null) {
+			SearchRequest request = new SearchRequest(mode.getIndex(), mode.getType());
+			request.setQuery(QueryBuilders.matchQuery(NODE_KEY, nodeFilter.getFiltervalue()).aggregations(UUID_KEY).size(0));
+			try {
+				SearchResponse response = this.dbClient.search(request);
+				AggregationEntries aggs = response.getAggregations(UUID_KEY);
+				String[] uuids = aggs.getKeysAsPagedStringList(pageSize, pageSize * (page - 1));
+				long totalSize = aggs.size();
+				return new QueryResult<String>(page, pageSize, new SearchResult<String>(uuids, totalSize));
+			} catch (IOException e) {
+				throw new IOException("problem reading ltps for req="+request, e);
+			}
+		} else {
+			String msg = "no nodename in filter found ";
+			LOG.debug(msg);
+			throw new IllegalArgumentException(msg);
+		}
+	}
+	
+//	QueryResult<String> getDataDeviceList(EntityInput input) throws IOException {
+//
+//		long page = QueryByFilter.getPage(input);
+//		long pageSize = QueryByFilter.getPageSize(input);
+//
+//		SearchRequest request = new SearchRequest(mode.getIndex(), mode.getType());
+//		request.setQuery(QueryBuilders.matchAllQuery().aggregations(KEY).size(0));
+////		try {
+//			SearchResponse response = this.dbClient.search(request);
+//			AggregationEntries aggs = response.getAggregations(KEY);
+//			String[] uuids = aggs.getKeysAsPagedStringList(pageSize, pageSize * (page - 1));
+//			long totalSize = aggs.size();
+//			return new QueryResult<String>(page, pageSize, new SearchResult<String>(uuids, totalSize));
+////		} catch (IOException e) {
+////			throw new IOException("problem reading nodes for req="+request, e);
+////		}
+//	}
+	/**
+	 * get aggregated devices list
+	 * @param input filter should be empty/no filter handled, only sortorder for KEY ('node-name')
+	 * @return
+	 * @throws IOException
+	 */
+	QueryResult<String> getDataDeviceList(EntityInput input) throws IOException {
+
+		long page = QueryByFilter.getPage(input);
+		long pageSize = QueryByFilter.getPageSize(input);
+
+		Sortorder soNode = QueryByFilter.getSortOrder(input.getSortorder(), KEY);
+		SearchRequest request = new SearchRequest(mode.getIndex(), mode.getType());
+		QueryBuilder query = null;
+		if (soNode != null) {
+			query = QueryBuilders.matchAllQuery()
+					.aggregations(KEY,
+							soNode.getSortorder() == SortOrder.Ascending
+									? org.onap.ccsdk.features.sdnr.wt.common.database.queries.SortOrder.ASCENDING
+									: org.onap.ccsdk.features.sdnr.wt.common.database.queries.SortOrder.DESCENDING)
+					.size(0);
+		} else {
+			query = QueryBuilders.matchAllQuery().aggregations(KEY).size(0);
+		}
+		request.setQuery(query);
+		try {
+			SearchResponse response = this.dbClient.search(request);
+			AggregationEntries aggs = response.getAggregations(KEY);
+			String[] uuids = aggs.getKeysAsPagedStringList(pageSize, pageSize * (page - 1));
+			long totalSize = aggs.size();
+			return new QueryResult<String>(page, pageSize, new SearchResult<String>(uuids, totalSize));
+		} catch (IOException e) {
+			throw new IOException("problem reading nodes for req=" + request, e);
+		}
+
+	}
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessorStatus.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessorStatus.java
new file mode 100644
index 0000000..5970d54
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/DataObjectAcessorStatus.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.io.IOException;
+
+import org.onap.ccsdk.features.sdnr.wt.common.database.ExtRestClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilders;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.SearchRequest;
+import org.onap.ccsdk.features.sdnr.wt.common.database.responses.AggregationEntries;
+import org.onap.ccsdk.features.sdnr.wt.common.database.responses.SearchResponse;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.status.output.Data;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.status.output.DataBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.status.entity.FaultsBuilder;
+
+public class DataObjectAcessorStatus extends DataObjectAcessor<Data> {
+
+	final String ESDATATYPE_FAULTCURRENT_SEVERITY_KEY = "severity";
+
+	private final ExtRestClient dbClient;
+	private final Entity entity;
+
+	public DataObjectAcessorStatus(HtDatabaseClient dbClient, Entity entity)
+			throws ClassNotFoundException {
+		super(dbClient, entity, Data.class, false);
+		this.dbClient = dbClient;
+		this.entity = entity;
+	}
+
+	QueryResult<Data> getDataStatus() throws IOException {
+	SearchRequest request = getNewInstanceOfSearchRequest(entity);
+	request.setQuery(
+			QueryBuilders.matchAllQuery().aggregations(ESDATATYPE_FAULTCURRENT_SEVERITY_KEY).size(0));
+		SearchResponse response = this.dbClient.search(request);
+		AggregationEntries aggs = response.getAggregations(ESDATATYPE_FAULTCURRENT_SEVERITY_KEY);
+
+		Data[] data = { new DataBuilder().setFaults(new FaultsBuilder().
+						setCriticals(aggs.getOrDefault("Critical",0L)).
+						setMajors(aggs.getOrDefault("Major", 0L)).
+						setMinors(aggs.getOrDefault("Minor", 0L)).
+						setWarnings(aggs.getOrDefault("Warning", 0L)).
+						build()).build() };
+		long toalsize = data.length;
+		return new QueryResult<Data>(1L, 1L, new SearchResult<Data>(data, toalsize));
+
+	}
+
+
+    private static SearchRequest getNewInstanceOfSearchRequest(Entity entity) {
+    	return new SearchRequest(entity.getName(), entity.getName());
+    }
+
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java
new file mode 100644
index 0000000..306fe95
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java
@@ -0,0 +1,439 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.DataObjectAcessorPm.Intervall;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.IEntityDataProvider;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateNetworkElementConnectionOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMaintenanceInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMaintenanceOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMediatorServerInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMediatorServerOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteNetworkElementConnectionInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteNetworkElementConnectionOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EntityInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.MaintenanceEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.MediatorServerEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementConnectionEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadConnectionlogListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadEventlogListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadEventlogListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultcurrentListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultlogListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadInventoryListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadMaintenanceListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadMediatorServerListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadNetworkElementConnectionListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mDeviceListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mLtpListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hDeviceListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hLtpListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadStatusOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMaintenanceInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMaintenanceOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMediatorServerInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMediatorServerOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionOutputBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ElasticSearchDataProvider implements IEntityDataProvider {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ElasticSearchDataProvider.class);
+
+    private final HtDatabaseClient dbClient;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultcurrent.list.output.Data> eventRWFaultCurrent;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultlog.list.output.Data> eventRWFaultLog;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data> mediatorserverRW;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.maintenance.list.output.Data> maintenanceRW;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data> equipmentRW;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.connectionlog.list.output.Data> connnectionlogRW;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.eventlog.list.output.Data> eventlogRW;
+    private final DataObjectAcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.network.element.connection.list.output.Data> networkelementConnectionRW;
+    private final DataObjectAcessorPm<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data> pm15mRW;
+    private final DataObjectAcessorPm<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.list.output.Data> pm24hRW;
+
+    private final DataObjectAcessorStatus readStatus;
+    private final HtDatabaseEventsService databaseService;
+
+    public ElasticSearchDataProvider(HostInfo[] hosts) throws Exception {
+        LOG.info("Start {}", this.getClass().getName());
+
+        this.dbClient = new HtDatabaseClient(hosts);
+        this.mediatorserverRW = new DataObjectAcessor<>(dbClient, Entity.MediatorServer,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data.class);
+        this.mediatorserverRW.setWriteInterface(MediatorServerEntity.class);
+
+        this.maintenanceRW = new DataObjectAcessor<>(dbClient, Entity.Maintenancemode,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.maintenance.list.output.Data.class);
+        this.maintenanceRW.setWriteInterface(MaintenanceEntity.class);
+
+        this.equipmentRW = new DataObjectAcessor<>(dbClient, Entity.Inventoryequipment,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data.class);
+
+        this.eventRWFaultCurrent = new DataObjectAcessor<>(dbClient, Entity.Faultcurrent,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultcurrent.list.output.Data.class);
+
+        this.eventRWFaultLog = new DataObjectAcessor<>(dbClient, Entity.Faultlog,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultlog.list.output.Data.class);
+
+        this.connnectionlogRW = new DataObjectAcessor<>(dbClient, Entity.Connectionlog,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.connectionlog.list.output.Data.class);
+
+        this.eventlogRW = new DataObjectAcessor<>(dbClient, Entity.Eventlog,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.eventlog.list.output.Data.class);
+
+        this.networkelementConnectionRW = new DataObjectAcessor<>(dbClient, Entity.NetworkelementConnection,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.network.element.connection.list.output.Data.class);
+        this.networkelementConnectionRW.setWriteInterface(NetworkElementConnectionEntity.class);
+
+        this.pm15mRW = new DataObjectAcessorPm<>(dbClient, Intervall.PMDATA15M, Entity.Historicalperformance15min,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data.class);
+
+        this.pm24hRW = new DataObjectAcessorPm<>(dbClient, Intervall.PMDATA24H, Entity.Historicalperformance24h,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.list.output.Data.class);
+
+        this.readStatus = new DataObjectAcessorStatus(dbClient, Entity.Faultcurrent );
+
+        this.databaseService = new HtDatabaseEventsService(dbClient);
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultcurrent.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultcurrent.list.output.PaginationBuilder
+    //eventRWFaultCurrent
+    public ReadFaultcurrentListOutputBuilder readFaultCurrentList(EntityInput input) {
+
+        ReadFaultcurrentListOutputBuilder outputBuilder = new ReadFaultcurrentListOutputBuilder();
+
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultcurrent.list.output.Data> result = this.eventRWFaultCurrent
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultcurrent.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultlog.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultlog.list.output.PaginationBuilder
+    //eventRWFaultLog
+    public ReadFaultlogListOutputBuilder readFaultLogList(EntityInput input) {
+        ReadFaultlogListOutputBuilder outputBuilder = new ReadFaultlogListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultlog.list.output.Data> result = this.eventRWFaultLog
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.faultlog.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.maintenance.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.maintenance.list.output.PaginationBuilder
+    //maintenanceRW
+    public ReadMaintenanceListOutputBuilder readMaintenanceList(EntityInput input) {
+        ReadMaintenanceListOutputBuilder outputBuilder = new ReadMaintenanceListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.maintenance.list.output.Data> result = this.maintenanceRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.maintenance.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Pagination
+    //mediatorserverRW
+    public ReadMediatorServerListOutputBuilder readMediatorServerList(EntityInput input) {
+
+        ReadMediatorServerListOutputBuilder outputBuilder = new ReadMediatorServerListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data> result = this.mediatorserverRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.network.element.connection.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.network.element.connection.list.output.PaginationBuilder
+    //networkelementConnectionRW
+    public ReadNetworkElementConnectionListOutputBuilder readNetworkElementConnectionList(
+            EntityInput input) {
+        ReadNetworkElementConnectionListOutputBuilder outputBuilder = new ReadNetworkElementConnectionListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.network.element.connection.list.output.Data> result = this.networkelementConnectionRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.network.element.connection.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.PaginationBuilder
+    //equipmentRW
+    public ReadInventoryListOutputBuilder readInventoryList(EntityInput input) {
+        ReadInventoryListOutputBuilder outputBuilder = new ReadInventoryListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data> result = this.equipmentRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.PaginationBuilder
+    //connnectionlogRW
+    public ReadConnectionlogListOutputBuilder readConnectionlogList(EntityInput input) {
+        ReadConnectionlogListOutputBuilder outputBuilder = new ReadConnectionlogListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.connectionlog.list.output.Data> result = this.connnectionlogRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.connectionlog.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.eventlog.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.eventlog.list.output.PaginationBuilder
+    //eventlogRW
+    public ReadEventlogListOutputBuilder readEventlogList(ReadEventlogListInput input) throws IOException {
+        ReadEventlogListOutputBuilder outputBuilder = new ReadEventlogListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.eventlog.list.output.Data> result = this.eventlogRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.eventlog.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.PaginationBuilder
+    public ReadPmdata15mListOutputBuilder readPmdata15mList(EntityInput input) {
+        ReadPmdata15mListOutputBuilder outputBuilder = new ReadPmdata15mListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data> result = this.pm15mRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.list.output.Data
+    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.list.output.Pagination
+    public ReadPmdata24hListOutputBuilder readPmdata24hList(EntityInput input) {
+        ReadPmdata24hListOutputBuilder outputBuilder = new ReadPmdata24hListOutputBuilder();
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.list.output.Data> result = this.pm24hRW
+                .getData(input);
+        outputBuilder.setData(result.getResult().getHits());
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        return outputBuilder;
+    }
+
+    public ReadPmdata15mLtpListOutputBuilder readPmdata15mLtpList(EntityInput input) throws IOException {
+        ReadPmdata15mLtpListOutputBuilder outputBuilder = new ReadPmdata15mLtpListOutputBuilder();
+        QueryResult<String> result = pm15mRW.getDataLtpList(input);
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.ltp.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        outputBuilder.setData(result.getResult().getHits());
+        return outputBuilder;
+    }
+
+    public ReadPmdata15mDeviceListOutputBuilder readPmdata15mDeviceList(EntityInput input) throws IOException {
+        ReadPmdata15mDeviceListOutputBuilder outputBuilder = new ReadPmdata15mDeviceListOutputBuilder();
+        QueryResult<String> result = pm15mRW.getDataDeviceList(input);
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.device.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        outputBuilder.setData(result.getResult().getHits());
+        return outputBuilder;
+    }
+
+    public ReadPmdata24hLtpListOutputBuilder readPmdata24hLtpList(EntityInput input) throws IOException {
+
+        QueryResult<String> result = pm24hRW.getDataLtpList(input);
+
+        ReadPmdata24hLtpListOutputBuilder outputBuilder = new ReadPmdata24hLtpListOutputBuilder();
+        new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.ltp.list.output.PaginationBuilder();
+        outputBuilder.setPagination(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.ltp.list.output.PaginationBuilder(
+                result.getPagination()).build());
+        outputBuilder.setData(result.getResult().getHits());
+        return outputBuilder;
+    }
+
+    public ReadPmdata24hDeviceListOutputBuilder readPmdata24hDeviceList(EntityInput input)
+            throws IOException {
+
+        QueryResult<String> result = pm24hRW.getDataDeviceList(input);
+
+        ReadPmdata24hDeviceListOutputBuilder outputBuilder = new ReadPmdata24hDeviceListOutputBuilder();
+        outputBuilder.setPagination(
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._24h.device.list.output.PaginationBuilder(
+                        result.getPagination()).build());
+        outputBuilder.setData(result.getResult().getHits());
+        return outputBuilder;
+    }
+
+    public ReadStatusOutputBuilder readStatus() throws IOException {
+        QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.status.output.Data> result = readStatus.getDataStatus();
+
+        ReadStatusOutputBuilder outputBuilder = new ReadStatusOutputBuilder();
+        outputBuilder.setData(result.getResult().getHits());
+        return outputBuilder;
+    }
+
+    public boolean waitForYellowDatabaseStatus(long timeout, TimeUnit unit) {
+        return this.dbClient.waitForYellowStatus(unit.toMillis(timeout));
+    }
+
+     public CreateNetworkElementConnectionOutputBuilder createNetworkElementConnection(
+            NetworkElementConnectionEntity input) throws IOException {
+        String id = this.networkelementConnectionRW.update(input, input.getNodeId());
+        if (id == null) {
+            throw new IOException("unable to write data to database");
+        }
+        CreateNetworkElementConnectionOutputBuilder builder = new CreateNetworkElementConnectionOutputBuilder();
+        builder.setId(id).setNodeId(input.getNodeId()).setHost(input.getHost()).setPort(input.getPort())
+                .setUsername(input.getUsername()).setPassword(input.getPassword()).setIsRequired(input.isIsRequired())
+                .setCoreModelCapability(input.getCoreModelCapability()).setDeviceType(input.getDeviceType());
+        return builder;
+    }
+
+    public UpdateNetworkElementConnectionOutputBuilder updateNetworkElementConnection(
+            UpdateNetworkElementConnectionInput input) throws IOException {
+        String id = this.networkelementConnectionRW.update(input, input.getId());
+        if (id == null) {
+            throw new IOException("unable to update data in database");
+        }
+        UpdateNetworkElementConnectionOutputBuilder builder = new UpdateNetworkElementConnectionOutputBuilder();
+        builder.setId(id).setNodeId(input.getNodeId()).setHost(input.getHost()).setPort(input.getPort())
+                .setUsername(input.getUsername()).setPassword(input.getPassword())
+                .setCoreModelCapability(input.getCoreModelCapability()).setDeviceType(input.getDeviceType());
+        return builder;
+    }
+
+    public DeleteNetworkElementConnectionOutputBuilder deleteNetworkElementConnection(DeleteNetworkElementConnectionInput input) throws IOException {
+        boolean removed = this.networkelementConnectionRW.remove(input.getId());
+        if (!removed) {
+            throw new IOException("unable to remove data from database");
+        }
+        return new DeleteNetworkElementConnectionOutputBuilder();
+    }
+
+    public DeleteMediatorServerOutputBuilder deleteMediatorServer(DeleteMediatorServerInput input) throws IOException {
+        boolean removed = this.mediatorserverRW.remove(input.getId());
+        if (!removed) {
+            throw new IOException("unable to remove data from database");
+        }
+        return new DeleteMediatorServerOutputBuilder();
+    }
+
+    public DeleteMaintenanceOutputBuilder deleteMaintenance(DeleteMaintenanceInput input) throws IOException {
+        boolean removed = this.maintenanceRW.remove(input.getId());
+        if (!removed) {
+            throw new IOException("unable to remove data from database");
+        }
+        return new DeleteMaintenanceOutputBuilder();
+    }
+
+    public UpdateMaintenanceOutputBuilder updateMaintenance(UpdateMaintenanceInput input) throws IOException {
+        if (input.getId() == null) {
+            throw new IOException("please give the id for updating entry");
+        }
+        String id = this.maintenanceRW.update(input, input.getId());
+        if (id == null) {
+            throw new IOException("unable to update data in database");
+        }
+        UpdateMaintenanceOutputBuilder builder = new UpdateMaintenanceOutputBuilder(input).setId(id);
+        return builder;
+    }
+
+    public UpdateMediatorServerOutputBuilder updateMediatorServer(UpdateMediatorServerInput input) throws IOException {
+        if (input.getId() == null) {
+            throw new IOException("please give the id for updating entry");
+        }
+        String id = this.mediatorserverRW.update(input, input.getId());
+        if (id == null) {
+            throw new IOException("unable to update data in database");
+        }
+        UpdateMediatorServerOutputBuilder builder = new UpdateMediatorServerOutputBuilder();
+        builder.setId(id).setName(input.getName()).setUrl(input.getUrl());
+        return builder;
+    }
+
+    public CreateMaintenanceOutputBuilder createMaintenance(CreateMaintenanceInput input) throws IOException {
+        String id = this.maintenanceRW.write(input, input.getNodeId());
+        if (id == null) {
+            throw new IOException("unable to write data to database");
+        }
+        CreateMaintenanceOutputBuilder builder = new CreateMaintenanceOutputBuilder(input).setId(id);
+        return builder;
+    }
+
+     public CreateMediatorServerOutputBuilder createMediatorServer(CreateMediatorServerInput input) throws IOException {
+        String id = this.mediatorserverRW.write(input, null);
+
+        if (id == null) {
+            throw new IOException("unable to write data to database");
+        }
+        CreateMediatorServerOutputBuilder builder = new CreateMediatorServerOutputBuilder();
+        builder.setId(id).setName(input.getName()).setUrl(input.getUrl());
+        return builder;
+    }
+
+    @Override
+    public DataProvider getDataProvider() {
+        return this.databaseService;
+    }
+
+    /**
+     * no need for implementation
+     */
+	@Override
+	public void setReadyStatus(boolean status) {
+		
+	}
+
+
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/FaultEntityManager.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/FaultEntityManager.java
new file mode 100644
index 0000000..f26a30d
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/FaultEntityManager.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Fault;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultcurrentEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SeverityType;
+
+public class FaultEntityManager {
+
+    private static final Pattern pattern = Pattern.compile(".*\\[layerProtocol=(.*)\\]");
+
+    /**
+     * The leading indication for notification or events that are not in the
+     * currentProblem data of the ONF Coremodel
+     */
+    private static final String NOCURRENTPROBLEMINDICATION = "#";
+
+    /**
+     * Specific problems are not moving into current problem list
+     * @param problemName to be verified
+     * @return true if problem is current
+     */
+    public static boolean isManagedAsCurrentProblem(String problemName) {
+        return ! problemName.startsWith(NOCURRENTPROBLEMINDICATION);
+    }
+
+    public static boolean isManagedAsCurrentProblem(Fault problem) {
+        return isManagedAsCurrentProblem(problem.getProblem());
+    }
+
+    /**
+     * Specific problems are not moving into current problem list
+     * @param fault to be verified
+     * @return true if cleared indication
+     */
+    public static boolean isNoAlarmIndication(@Nonnull Fault fault) {
+        return SeverityType.NonAlarmed.equals(fault.getSeverity());
+    }
+
+    /**
+     * Create a specific ES id for the current log.
+     * @return a string with the generated ES Id
+     */
+     public static String genSpecificEsId(String nodeName, String objectId, String problemName) {
+
+        String uuId;
+
+        Matcher matcher = pattern.matcher(objectId);
+        if (matcher.matches() && matcher.groupCount() == 1) {
+            uuId = matcher.group(1);
+        } else {
+            uuId = objectId;
+        }
+
+        StringBuffer strBuf = new StringBuffer();
+        strBuf.append(nodeName);
+        strBuf.append("/");
+        strBuf.append(uuId);
+        strBuf.append("/");
+        strBuf.append(problemName);
+        return strBuf.toString();
+    }
+
+    /**
+     * Create Es id
+     * @param fault used to create uuid for faultcurrent
+     * @return String with Id
+     */
+    public static String genSpecificEsId(FaultcurrentEntity fault) {
+        return genSpecificEsId(fault.getNodeId(), fault.getObjectId(), fault.getProblem());
+    }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/HtDatabaseEventsService.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/HtDatabaseEventsService.java
new file mode 100644
index 0000000..b08466c
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/HtDatabaseEventsService.java
@@ -0,0 +1,388 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import org.onap.ccsdk.features.sdnr.wt.base.netconf.util.NetconfTimeStamp;
+import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.BoolQueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilders;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.RangeQueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.database.EsDataObjectReaderWriter2;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.ArchiveCleanProvider;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ConnectionLogStatus;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ConnectionlogBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ConnectionlogEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EventlogBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EventlogEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultcurrentBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultcurrentEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultlogBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultlogEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Inventory;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.InventoryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.InventoryEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementConnectionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementConnectionEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionInputBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Event service, writing all events into the database into the appropriate
+ * index.
+ *
+ * @author herbert
+ */
+public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvider {
+    private static final Logger LOG = LoggerFactory.getLogger(HtDatabaseEventsService.class);
+
+    private static final NetconfTimeStamp NETCONFTIME_CONVERTER = NetconfTimeStamp.getConverter();
+
+    private HtDatabaseClient client;
+    private EsDataObjectReaderWriter2<EventlogEntity> eventRWEventLogDevicemanager;
+    private EsDataObjectReaderWriter2<InventoryEntity> eventRWEquipment;
+    private EsDataObjectReaderWriter2<FaultcurrentEntity> eventRWFaultCurrentDB;
+    private EsDataObjectReaderWriter2<FaultlogEntity> eventRWFaultLogDB;
+    private EsDataObjectReaderWriter2<ConnectionlogEntity> eventRWConnectionLogDB;
+    private EsDataObjectReaderWriter2<NetworkElementConnectionEntity> networkelementConnectionDB;
+    // --- Construct and initialize
+
+    public HtDatabaseEventsService(HtDatabaseClient client) throws Exception {
+
+        LOG.info("Create {} start", HtDatabaseEventsService.class);
+
+        try {
+            // Create control structure
+            this.client = client;
+
+            eventRWEventLogDevicemanager = new EsDataObjectReaderWriter2<>(client, Entity.Eventlog,
+                    EventlogEntity.class, EventlogBuilder.class);
+
+            eventRWEquipment = new EsDataObjectReaderWriter2<>(client, Entity.Inventoryequipment,
+                    InventoryEntity.class, InventoryBuilder.class);
+
+            eventRWFaultCurrentDB = new EsDataObjectReaderWriter2<>(client, Entity.Faultcurrent,
+                    FaultcurrentEntity.class, FaultcurrentBuilder.class);
+
+            eventRWFaultLogDB = new EsDataObjectReaderWriter2<>(client, Entity.Faultlog,
+                    FaultlogEntity.class, FaultlogBuilder.class);
+
+            eventRWConnectionLogDB = new EsDataObjectReaderWriter2<>(client, Entity.Connectionlog,
+                    ConnectionlogEntity.class, ConnectionlogBuilder.class);
+
+            networkelementConnectionDB = new EsDataObjectReaderWriter2<>(client, Entity.NetworkelementConnection,
+                    NetworkElementConnectionEntity.class, NetworkElementConnectionBuilder.class)
+                    .setEsIdAttributeName("_id");
+
+        } catch (Exception e) {
+            LOG.error("Can not start database client. Exception: {}", e);
+            throw new Exception("Can not start database client. Exception: {}", e);
+        }
+        LOG.info("Create {} finished. DB Service {} started.", HtDatabaseEventsService.class,
+                client != null ? "sucessfully" : "not");
+    }
+
+    // --- Function
+
+    // -- Connection log
+    @Override
+    public void writeConnectionLog(ConnectionlogEntity event) {
+        if (assertIfClientNull(event)) {
+            return;
+        }
+        LOG.debug("Write event: {}", event);
+        eventRWConnectionLogDB.write(event, null);
+
+    }
+    // -- Event log
+    @Override
+    public void writeEventLog(EventlogEntity event) {
+        if (assertIfClientNull("No client to write {}", event)) {
+            return;
+        }
+
+        LOG.debug("Write event: {}", event.toString());
+        eventRWEventLogDevicemanager.write(event, null);
+    }
+
+
+    // -- Fault log
+
+    @Override
+    public void writeFaultLog(FaultlogEntity fault) {
+        if (assertIfClientNull(fault)) {
+            return;
+        }
+
+        LOG.debug("Write fault to faultlog: {}", fault.toString());
+        eventRWFaultLogDB.write(fault,null);
+    }
+
+    // -- Fault current
+
+    @Override
+    public void updateFaultCurrent(FaultcurrentEntity fault) {
+        if (assertIfClientNull(fault)) {
+            return;
+        }
+
+        if (FaultEntityManager.isManagedAsCurrentProblem(fault)) {
+            if (FaultEntityManager.isNoAlarmIndication(fault)) {
+                LOG.debug("Remove from currentFaults: {}", fault.toString());
+                eventRWFaultCurrentDB.remove(FaultEntityManager.genSpecificEsId(fault));
+            } else {
+                LOG.debug("Write to currentFaults: {}", fault.toString());
+                eventRWFaultCurrentDB.write(fault, FaultEntityManager.genSpecificEsId(fault));
+            }
+        } else {
+            LOG.debug("Ingnore for currentFaults: {}", fault.toString());
+        }
+    }
+
+    /**
+     * Remove all entries for one node
+     *
+     * @param nodeName contains the mountpointname
+     * @return number of deleted entries
+     */
+    @Override
+    public int clearFaultsCurrentOfNode(String nodeName) {
+        if (assertIfClientNullForNodeName(nodeName)) {
+            return -1;
+        }
+
+        LOG.debug("Remove from currentFaults all faults for node: {}", nodeName);
+        return eventRWFaultCurrentDB.remove(EsFaultCurrent.getQueryForOneNode(nodeName));
+    }
+
+    /**
+     * Remove all entries for one node
+     *
+     * @param nodeName contains the mountpointname
+     * @param objectId of element to be deleted
+     * @return number of deleted entries
+     */
+    @Override
+    public int clearFaultsCurrentOfNodeWithObjectId(String nodeName, String objectId) {
+        if (assertIfClientNullForNodeName(nodeName)) {
+            return -1;
+        }
+
+        LOG.debug("Remove from currentFaults all faults for node/objectId: {}/{}", nodeName, objectId);
+        return eventRWFaultCurrentDB.remove(EsFaultCurrent.getQueryForOneNodeAndObjectId(nodeName, objectId));
+    }
+
+    /**
+     * Deliver list with all mountpoint/node-names in the database.
+     *
+     * @return List of all mountpoint/node-names the had active alarms.
+     */
+    @Override
+    public @Nonnull List<String> getAllNodesWithCurrentAlarms() {
+        if (assertIfClientNull("No DB, can not delete for all nodes", null)) {
+            return new ArrayList<>();
+        }
+
+        LOG.debug("Remove from currentFaults faults for all node");
+        List<String> nodeNames = new ArrayList<>();
+
+        for (FaultcurrentEntity fault : eventRWFaultCurrentDB.doReadAll().getHits()) {
+            String nodeName = fault.getNodeId();
+            if (!nodeNames.contains(nodeName)) {
+                // this.clearFaultsCurrentOfNode(nodeName); -> Function shifted
+                nodeNames.add(nodeName);
+            }
+        }
+        return nodeNames;
+    }
+
+    // -- Inventory and equipment current
+
+    /**
+     * write internal equipment to database
+     * @param internalEquipment with mandatory fields.
+     */
+    @Override
+    public void writeInventory(Inventory internalEquipment) {
+
+        if (assertIfClientNullForNodeName(internalEquipment.getNodeId())) {
+            return;
+        }
+        eventRWEquipment.write(internalEquipment, internalEquipment.getNodeId()+"/"+internalEquipment.getUuid());
+    }
+
+
+    // -- Networkelement
+
+    /**
+     *
+     * @param networkElementConnectionEntitiy to wirte to DB
+     * @param nodeId Id for this DB element
+     */
+    @Override
+    public void updateNetworkConnectionDeviceType(NetworkElementConnectionEntity networkElementConnectionEntitiy, String nodeId) {
+        this.networkelementConnectionDB.update(networkElementConnectionEntitiy, nodeId);
+    }
+
+    /**
+     * Update after new mountpoint registration
+     * @param networkElementConnectionEntitiy data
+     * @param nodeId of device (mountpoint name)
+     */
+    @Override
+    public void updateNetworkConnection22(NetworkElementConnectionEntity networkElementConnectionEntitiy, String nodeId) {
+        this.networkelementConnectionDB.updateOrCreate(networkElementConnectionEntitiy, nodeId, Arrays.asList("is-required", "username", "password"));
+    }
+
+    /* please do not remove */
+    //    public void cleanNetworkElementConnections() {
+    //        this.networkelementConnectionDB.remove(QueryBuilders.matchQuery("is-required", false));
+    //        CreateNetworkElementConnectionInput x = new CreateNetworkElementConnectionInputBuilder().setStatus(ConnectionLogStatus.Disconnected).build();
+    //        this.networkelementConnectionDB.update(x,QueryBuilders.matchAllQuery());
+    //    }
+
+    @Override
+    public void removeNetworkConnection(String nodeId) {
+        Boolean isRequired;
+        NetworkElementConnectionEntity e = this.networkelementConnectionDB.read(nodeId);
+        if (e != null && (isRequired = e.isIsRequired()) != null) {
+            if (isRequired) {
+                LOG.debug("updating connection status for {} of required ne to disconnected",nodeId);
+                this.networkelementConnectionDB.update(new UpdateNetworkElementConnectionInputBuilder().setStatus(ConnectionLogStatus.Disconnected).build(), nodeId);
+            } else {
+                LOG.debug("remove networkelement-connection for {} entry because of non-required",nodeId);
+                this.networkelementConnectionDB.remove(nodeId);
+            }
+        }
+        else {
+            LOG.warn("Unable to update connection-status. dbentry for {} not found in networkelement-connection",nodeId);
+        }
+    }
+
+    // -- Multiple areas
+
+    @Override
+    public int doIndexClean(Date olderAreOutdated) {
+
+        String netconfTimeStamp = NETCONFTIME_CONVERTER.getTimeStampAsNetconfString(olderAreOutdated);
+        int removed = 0;
+
+        QueryBuilder queryEventBase = EsEventBase.getQueryForTimeStamp(netconfTimeStamp);
+        removed += eventRWEventLogDevicemanager.remove(queryEventBase);
+
+        QueryBuilder queryFaultLog = EsFaultLogDevicemanager.getQueryForTimeStamp(netconfTimeStamp);
+        removed += eventRWFaultLogDB.remove(queryFaultLog);
+        return removed;
+    }
+
+    @Override
+    public int getNumberOfOldObjects(Date olderAreOutdated) {
+
+        String netconfTimeStamp = NETCONFTIME_CONVERTER.getTimeStampAsNetconfString(olderAreOutdated);
+        int numberOfElements = 0;
+
+        QueryBuilder queryEventBase = EsEventBase.getQueryForTimeStamp(netconfTimeStamp);
+        numberOfElements += eventRWEventLogDevicemanager.doReadAll(queryEventBase).getTotal();
+
+        QueryBuilder queryFaultLog = EsFaultLogDevicemanager.getQueryForTimeStamp(netconfTimeStamp);
+        numberOfElements += eventRWFaultLogDB.doReadAll(queryFaultLog).getTotal();
+
+        return numberOfElements;
+    }
+
+    // -- Helper
+
+    /**
+     * Verify status of client
+     * @param event that is printed with message
+     * @return true if client is null
+     */
+    private boolean assertIfClientNull(Object event) {
+        return assertIfClientNull("No DB, can not write: {}", event);
+    }
+
+    private boolean assertIfClientNullForNodeName(Object object) {
+        return assertIfClientNull("No DB, can not handle node: {}", object);
+    }
+    /**
+     * Verify status of client
+     * @param message to print including {} for object printout.
+     * @return true if client is null
+     */
+    private boolean assertIfClientNull(String message, Object object) {
+        if (client == null) {
+            LOG.debug(message, object);
+            return true;
+        }
+        return false;
+    }
+
+    // ### sub classes
+
+
+    private static class EsEventBase {
+        /**
+         * Query to get older Elements
+         * @param netconfTimeStamp to identify older Elements
+         * @return QueryBuilder for older elements related to timestamp
+         */
+        private static QueryBuilder getQueryForTimeStamp(String netconfTimeStamp) {
+            return new RangeQueryBuilder("event.timeStamp").lte(netconfTimeStamp);
+        }
+    }
+    private static class EsFaultLogDevicemanager {
+        /**
+         * Get older Elements
+         * @param netconfTimeStamp to identify query elements older than this timestamp.
+         * @return QueryBuilder for related elements
+         */
+        public static QueryBuilder getQueryForTimeStamp(String netconfTimeStamp) {
+            return new RangeQueryBuilder("timestamp").lte(netconfTimeStamp);
+        }
+     }
+    public static class EsFaultCurrent  {
+        /**
+         * @param nodeName name of the node
+         * @return query builder
+         */
+        public static QueryBuilder getQueryForOneNode( String nodeName) {
+            return QueryBuilders.matchQuery("node-id", nodeName);
+        }
+
+        public static QueryBuilder getQueryForOneNodeAndObjectId( String nodeName, String objectId) {
+            BoolQueryBuilder bq = QueryBuilders.boolQuery();
+            bq.must(QueryBuilders.matchQuery("node-id", nodeName));
+            bq.must(QueryBuilders.matchQuery("object-id", objectId));
+            return bq;
+        }
+    }
+	@Override
+	public List<NetworkElementConnectionEntity> getNetworkElementConnections() {
+		return this.networkelementConnectionDB.doReadAll().getHits();
+	}
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/QueryByFilter.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/QueryByFilter.java
new file mode 100644
index 0000000..f00ffb5
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/QueryByFilter.java
@@ -0,0 +1,342 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.TimeZone;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.onap.ccsdk.features.sdnr.wt.base.netconf.util.NetconfTimeStamp;
+import org.onap.ccsdk.features.sdnr.wt.common.database.data.DbFilter;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.BoolQueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilders;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.RangeQueryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EntityInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.SortOrder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Filter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Sortorder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class QueryByFilter {
+
+ 	private static final Logger LOG = LoggerFactory.getLogger(DataObjectAcessorPm.class);
+
+ 	private QueryByFilter() {
+ 		//Hide
+ 	}
+
+	static long getPage(EntityInput input) {
+		return getPage(input, 1);
+	}
+
+	@SuppressWarnings("null")
+	private static long getPage(EntityInput input, long defaultValue) {
+		return input.getPagination() != null ? input.getPagination().getPage().longValue() : defaultValue;
+	}
+
+	static long getPageSize(EntityInput input) {
+		return getPageSize(input, 1);
+	}
+
+	@SuppressWarnings("null")
+	private static long getPageSize(EntityInput input, long defaultValue) {
+		return input.getPagination() != null ? input.getPagination().getSize().longValue() : defaultValue;
+	}
+
+
+	public static QueryBuilder setSortOrder(QueryBuilder query, @Nullable List<Sortorder> sortorder) {
+		return setSortOrder(query, sortorder, "");
+	}
+
+	private static QueryBuilder setSortOrder(QueryBuilder query, @Nullable List<Sortorder> sortorder, String prefix) {
+		if (sortorder != null && sortorder.size() > 0) {
+			for (Sortorder so : sortorder) {
+				query.sort((prefix != null ? prefix : "") + so.getProperty(),
+						so.getSortorder() == SortOrder.Ascending
+								? org.onap.ccsdk.features.sdnr.wt.common.database.queries.SortOrder.ASCENDING
+								: org.onap.ccsdk.features.sdnr.wt.common.database.queries.SortOrder.DESCENDING);
+			}
+		}
+		return query;
+
+	}
+
+
+	 public static Sortorder getSortOrder(@Nullable List<Sortorder> list, String prop) {
+		if (list == null) {
+			return null;
+		}
+		for (Sortorder o : list) {
+			if (prop.equals(o.getProperty())) {
+				return o;
+			}
+		}
+		return null;
+	}
+
+	 public static Filter getFilter(@Nullable List<Filter> list, String prop) {
+		if (list == null) {
+			return null;
+		}
+		for (Filter f : list) {
+			if (prop.equals(f.getProperty())) {
+				return f;
+			}
+		}
+		return null;
+	}
+
+	 public static QueryBuilder fromFilter(@Nullable List<Filter> filters) {
+		return fromFilter(filters, "");
+	}
+
+	 private static String fillTimeStamp(String value) {
+		int idx=value.lastIndexOf("*");
+		final String REPLACE="0000-00-00T00:00:00.0Z";
+		String s = value.substring(0,idx)+REPLACE.substring(idx);
+		if(Integer.parseInt(s.substring(5,7))==0) {
+			s=s.substring(0,5)+"01-"+s.substring(8);
+		}
+		if(Integer.parseInt(s.substring(8,10))==0) {
+			s=s.substring(0,8)+"01"+s.substring(10);
+		}
+		
+		return s;
+	 }
+	 /**
+	  * convert timestamp with ending placeholder in filter to elasticsearch filter
+	  * e.g. 2017* => gte: 2017-01-01T00:00:00Z, lt:2018-01-01T00:00:00Z
+	  * 
+	  * 201*   => 2010-01... 2020 ..
+	  * 2018-* => 2018-01... <=> 2019-01
+	  * 
+	  */
+	private static @Nullable QueryBuilder fromTimestampSearchFilter(String property,String value) {
+		if(!value.endsWith("*")) {
+			return null;
+		}
+		int idx=value.lastIndexOf("*");
+		String lowerEnd = fillTimeStamp(value);
+		String upperEnd =null;
+		NetconfTimeStamp converter = NetconfTimeStamp.getConverter();
+		Date dt = null;
+		try{
+			dt=converter.getDateFromNetconf(lowerEnd);
+		}
+		catch(Exception e) {
+			
+		}
+		if(dt==null) {
+			return null;
+		}
+//		property.substring(0,idx)+REPLACE.substring(idx+1);
+		Calendar c  = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
+		c.setTime(dt);
+		int tmpvalue;
+		switch(idx) {
+		case 1:  // (2*)
+			c.set(Calendar.YEAR,c.get(Calendar.YEAR)+1000);
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 2:  // (20*)
+			c.set(Calendar.YEAR,c.get(Calendar.YEAR)+100);
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 3:  // (200*)
+			c.set(Calendar.YEAR,c.get(Calendar.YEAR)+10);
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 4:  // (2000*)
+		case 5:  // (2000-*)
+			c.set(Calendar.YEAR,c.get(Calendar.YEAR)+1);
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 6: //switch 10 months (2000-0* or 2000-1*)
+			tmpvalue = c.get(Calendar.MONTH);
+				if(tmpvalue<9) {
+					c.set(Calendar.MONTH,9);
+				}
+				else {
+					c.set(Calendar.YEAR,c.get(Calendar.YEAR)+1);
+					c.set(Calendar.MONTH,0);		
+				}
+				upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			
+			break;
+		case 7: //switch one month (2018-01* or 2018-01-*)
+		case 8:
+			c.add(Calendar.MONTH, 1);
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 9: // (2018-01-0*)
+			tmpvalue = c.get(Calendar.DAY_OF_MONTH);
+			if(tmpvalue==1) {
+				c.set(Calendar.DAY_OF_MONTH, 10);
+			}else if(tmpvalue==10) {
+				c.set(Calendar.DAY_OF_MONTH, 20);
+			}else if(tmpvalue==20) {
+				if(c.getActualMaximum(Calendar.DAY_OF_MONTH)<30) {
+					c.set(Calendar.DAY_OF_MONTH,1);
+					c.add(Calendar.MONTH,1);
+				}
+				else {
+					c.set(Calendar.DAY_OF_MONTH,30);
+				}
+			}else if(tmpvalue==30) {
+				c.set(Calendar.DAY_OF_MONTH,1);
+				c.add(Calendar.MONTH,1);
+			}
+			else {
+				break;
+			}
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 10: // (2018-01-01*)
+		case 11: // (2018-01-01T*)
+			c.add(Calendar.DAY_OF_MONTH,1);
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 12: // (2018-01-01T1*)
+			tmpvalue = c.get(Calendar.HOUR_OF_DAY);
+			if(tmpvalue==20) {
+				c.set(Calendar.HOUR_OF_DAY,0);
+				c.add(Calendar.DAY_OF_MONTH,1);
+			}
+			else {
+				c.add(Calendar.HOUR_OF_DAY,10);
+			}
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 13: // (2018-01-01T11*)
+		case 14: // (2018-01-01T11-*)
+			c.add(Calendar.HOUR_OF_DAY,1);	
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 15: // (2018-01-01T11-3*)
+			c.add(Calendar.MINUTE,10);	
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 16: // (2018-01-01T11-32*)
+		case 17: // (2018-01-01T11-32-*)
+			c.add(Calendar.MINUTE,1);	
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 18: // (2018-01-01T11-32-1*)
+			c.add(Calendar.SECOND,10);	
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		case 19: // (2018-01-01T11-32-11*)
+		case 20: // (2018-01-01T11-32-11.*)
+			c.add(Calendar.SECOND,1);	
+			upperEnd = converter.getTimeStampAsNetconfString(c.getTime());
+			break;
+		
+			default:
+				break;
+		}
+		 
+		if(upperEnd==null) {
+			return null;
+		}
+		return QueryBuilders.rangeQuery(property).gte(lowerEnd).lt(upperEnd);
+		
+	}
+	private static QueryBuilder fromFilter(@Nullable List<Filter> filters, String prefix) {
+		if (filters == null || filters.size() == 0) {
+			return QueryBuilders.matchAllQuery();
+
+		} else if (filters.size() == 1) {
+			QueryBuilder query;
+			String p = filters.get(0).getProperty();
+			String v= filters.get(0).getFiltervalue();
+			if ("id".equals(p)) {
+				p = "_id";
+			}
+			else {
+			//	v=v.toLowerCase();
+			}
+			if (DbFilter.hasSearchParams(v)) {
+				if(p!=null && "timestamp".equals(p.toLowerCase())) {
+					query = fromTimestampSearchFilter(p,v);
+					if(query!=null) {
+						return query;
+					}
+				}
+				return QueryBuilders.regex(p, DbFilter.createDatabaseRegex(v));
+						
+				
+			} else if (DbFilter.isComparisonValid(v)) {
+				RangeQueryBuilder q = DbFilter.getRangeQuery((prefix != null ? prefix : "") + p, v);
+				if (q != null) {
+					return q;
+				}
+				else {
+					return QueryBuilders.matchQuery((prefix != null ? prefix : "") + p, v);
+				}
+			}
+			else {
+				return QueryBuilders.matchQuery((prefix != null ? prefix : "") + p, v);
+			}
+		}
+		else {
+			BoolQueryBuilder query = new BoolQueryBuilder();
+			QueryBuilder tmpQuery;
+			for (Filter fi : filters) {
+				String p = fi.getProperty();
+				String v=fi.getFiltervalue();
+				if ("id".equals(p)) {
+					p = "_id";
+				}
+				else {
+				//	v=v.toLowerCase();
+				}
+				if(DbFilter.hasSearchParams(v)) {
+					if(p!=null && "timestamp".equals(p.toLowerCase())) {
+						tmpQuery=fromTimestampSearchFilter(p,v);
+						if(tmpQuery!=null) {
+							query.must(tmpQuery);
+						}else {
+							query.must(QueryBuilders.regex((prefix != null ? prefix : "") + p,DbFilter.createDatabaseRegex(v)));
+						}
+					}else {
+						query.must(QueryBuilders.regex((prefix != null ? prefix : "") + p,DbFilter.createDatabaseRegex(v)));
+					}
+				}
+				else if (DbFilter.isComparisonValid(v)) {
+					RangeQueryBuilder q = DbFilter.getRangeQuery((prefix != null ? prefix : "") + p,v);
+					if(q!=null) {
+						query.must(q);
+					}
+					else {
+						query.must(QueryBuilders.matchQuery((prefix != null ? prefix : "") + p,v));
+					}
+				}
+				else {
+					query.must(QueryBuilders.matchQuery((prefix != null ? prefix : "") + p,v));
+				}
+			}
+			LOG.trace("Query result. {}", query.toJSON());
+			return query;
+		}
+	}
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/QueryResult.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/QueryResult.java
new file mode 100644
index 0000000..9cbe943
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/QueryResult.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.math.BigInteger;
+
+import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.PaginationOutputG;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.connectionlog.list.output.PaginationBuilder;
+
+public class QueryResult<T> {
+
+	private SearchResult<T> result;
+	private PaginationOutputG pagination;
+
+	public QueryResult(long page, long pageSize, SearchResult<T> result) {
+		this.result = result;
+
+		PaginationBuilder x = new PaginationBuilder();
+		x.setPage(BigInteger.valueOf(page));
+		x.setSize(pageSize);
+		x.setTotal(BigInteger.valueOf(result.getTotal()));
+		pagination = x.build();
+	}
+
+	public SearchResult<T> getResult() {
+		return result;
+	}
+
+	PaginationOutputG getPagination() {
+		return pagination;
+	}
+
+
+
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/YangFileProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/YangFileProvider.java
new file mode 100644
index 0000000..44240b0
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/YangFileProvider.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.file.Path;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class YangFileProvider {
+
+	private static final Logger LOG = LoggerFactory.getLogger(YangFileProvider.class);
+
+	private static final FilenameFilter yangFilenameFilter = new FilenameFilter() {
+
+		@Override
+		public boolean accept(File dir, String name) {
+			return name.toLowerCase().endsWith(".yang");
+		}
+	};
+
+	private static final int BUFFER_SIZE = 1024;
+
+	private final Path mainSourcePath;
+	private final List<Path> additionalSources;
+
+	public YangFileProvider(String path) {
+		this.mainSourcePath = new File(path).toPath();
+		this.additionalSources = new ArrayList<>();
+	}
+
+	public boolean hasFileForModule(String module, String version) {
+		return this.mainSourcePath.resolve(YangFilename.createFilename(module, version)).toFile().exists();
+	}
+
+	public boolean hasFileForModule(String module) {
+		return this.findYangFiles(module).size() > 0;
+	}
+
+	private List<YangFilename> findYangFiles(String module) {
+		List<YangFilename> list = new ArrayList<>();
+		String[] files = this.mainSourcePath.toFile().list(yangFilenameFilter);
+		YangFilename yangfile;
+		for (String file : files) {
+			files = this.mainSourcePath.toFile().list(yangFilenameFilter);
+			for (String fn : files) {
+				try {
+					yangfile = new YangFilename(this.mainSourcePath.resolve(fn).toString());
+					if (yangfile.getModule().equals(module)) {
+						list.add(yangfile);
+					}
+				} catch (ParseException e) {
+					LOG.warn("unable to handle yangfile {}: {}", file, e);
+				}
+			}
+		}
+		for (Path addPath : this.additionalSources) {
+			files = addPath.toFile().list(yangFilenameFilter);
+			for (String file : files) {
+				try {
+					yangfile = new YangFilename(addPath.resolve(file).toString());
+					if (yangfile.getModule().equals(module)) {
+						list.add(yangfile);
+					}
+				} catch (ParseException e) {
+					LOG.warn("unable to handle yangfile {}: {}", file, e);
+				}
+			}
+		}
+		return list;
+	}
+
+	/**
+	 * get yang file from source with specified version or least newer one if
+	 * version is null then the latest one
+	 * 
+	 * @param module
+	 * @param version
+	 * @return
+	 * @throws ParseException
+	 */
+	private @Nullable YangFilename getYangFile(@Nonnull String module, @Nullable String version) throws ParseException {
+		YangFilename f = null;
+		List<YangFilename> list = this.findYangFiles(module);
+
+		list.sort(SortByDateAscComparator.getInstance());
+
+		// find specific version or nearest oldest
+		if (version != null) {
+			Date rev = YangFilename.parseRevision(version);
+			for (YangFilename item : list) {
+				if (rev.equals(item.getRevision())) {
+					f = item;
+					break;
+				}
+				if (item.getRevision().after(rev)) {
+					f = item;
+					break;
+				}
+			}
+		}
+		// get latest
+		else {
+			f = list.get(list.size() - 1);
+		}
+		return f;
+	}
+
+	/**
+	 * write filestream directly to output stream easier for http handling
+	 * 
+	 * @param module
+	 * @param version
+	 * @param outputStream
+	 * @return
+	 * @throws IOException
+	 * @throws ParseException
+	 */
+	public int writeOutput(@Nonnull String module, @Nullable String version, @Nonnull OutputStream outputStream)
+			throws IOException, ParseException {
+		YangFilename fn = this.getYangFile(module, version);
+		if(fn==null) {
+			return 0;
+		}
+		byte[] buffer = new byte[BUFFER_SIZE];
+		int bytesRead = -1;
+		int sumlen = 0;
+		InputStream inputStream = null ;
+		try {
+			inputStream= new FileInputStream(fn.getFilename());
+
+		while ((bytesRead = inputStream.read(buffer)) != -1) {
+			outputStream.write(buffer, 0, bytesRead);
+			sumlen += bytesRead;
+		}}
+		catch(IOException e) {
+			LOG.warn("problem sending {}: {}",fn.getFilename(),e);
+		}
+		finally {
+			if(inputStream!=null) {
+				inputStream.close();		
+			}
+		}
+		return sumlen;
+	}
+
+	private static class SortByDateAscComparator implements Comparator<YangFilename> {
+
+		private static SortByDateAscComparator instance;
+
+		@Override
+		public int compare(YangFilename o1, YangFilename o2) {
+			return o1.getRevision().compareTo(o2.getRevision());
+		}
+
+		public static Comparator<? super YangFilename> getInstance() {
+			if (instance == null) {
+				instance = new SortByDateAscComparator();
+			}
+			return instance;
+		}
+
+	}
+
+	public YangFilename getFileForModule(String module, String rev) throws ParseException {
+		return this.getYangFile(module, rev);
+	}
+
+	public YangFilename getFileForModule(String module) throws ParseException {
+		return this.getFileForModule(module, null);
+	}
+
+	public boolean hasFileOrNewerForModule(String module, String version) throws ParseException {
+		return this.getYangFile(module, version) != null;
+	}
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/YangFilename.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/YangFilename.java
new file mode 100644
index 0000000..b00eb20
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/YangFilename.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.data;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class YangFilename {
+
+	private static final String regex = "([^\\/]*)@([0-9]{4}-[0-9]{2}-[0-9]{2}).yang";
+	private static final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
+	private final String filename;
+	private final Matcher matcher;
+	private Date revision;
+	private String module; 
+	public static Date parseRevision(String sRevision) throws ParseException {
+		final SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
+		return fmt.parse(sRevision);
+	}
+	public YangFilename(String fn) throws ParseException {
+		this.filename = fn;
+		matcher = pattern.matcher(this.filename);
+		if(!matcher.find()) {
+			throw new ParseException("unknown filename format", 0);
+		}
+		this.module= matcher.group(1);
+		this.revision=parseRevision(matcher.group(2));
+		
+	}
+	public static String createFilename(String module, String rev) {
+		return String.format("%s@%s.yang", module,rev);
+	}
+	public YangFilename(String module, String rev) throws ParseException {
+		this(createFilename(module, rev));
+	}
+	public String getFilename() {
+		return this.filename;
+	}
+	public Date getRevision() {
+		return this.revision;
+	}
+	public String getModule() {
+		return this.module;
+	}
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/AboutHttpServlet.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/AboutHttpServlet.java
new file mode 100644
index 0000000..66d2104
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/AboutHttpServlet.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.http;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;	
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.onap.ccsdk.features.sdnr.wt.common.Resources;
+import org.onap.ccsdk.features.sdnr.wt.common.file.PomFile;
+import org.onap.ccsdk.features.sdnr.wt.common.file.PomPropertiesFile;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AboutHttpServlet extends HttpServlet {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private static final Logger LOG = LoggerFactory.getLogger(AboutHttpServlet.class);
+
+	private static final String URI_PRE = "/about";
+	private static final String RES_BASEPATH = "about/";
+
+	private static final String PLACEHOLDER_ONAP_RELEASENAME = "{release-name}";
+	private static final String PLACEHOLDER_ODL_RELEASENAME = "{odl-version}";
+	private static final String PLACEHOLDER_BUILD_TIMESTAMP = "{build-time}";
+	private static final String PLACEHOLDER_ODLUX_REVISION = "{odlux-revision}";
+	private static final String PLACEHOLDER_PACAKGE_VERSION = "{package-version}";
+	private static final String README_FILE = "README.md";
+
+	private final String groupId="org.onap.ccsdk.features.sdnr.wt";
+	private final String artifactId="sdnr-wt-data-provider-provider";
+	
+//	private final ConfigurationFileRepresentation configuration;
+	//private final ExtRestClient dbClient;
+	private final Map<String, String> data;
+	private final String readmeContent;
+	
+	
+
+	public AboutHttpServlet() {
+//		this.configuration = new ConfigurationFileRepresentation(DataProviderServiceImpl.CONFIGURATIONFILE);
+//		EsConfig esConfig = new EsConfig(configuration);
+		//this.dbClient = ExtRestClient.createInstance(esConfig.getHosts());
+		this.data = new HashMap<>();
+		this.collectStaticData();
+		this.readmeContent = this.render(this.getFileContent(README_FILE));
+	}
+
+	private void collectStaticData() {
+		PomPropertiesFile props = this.getPomProperties();
+		this.data.put(PLACEHOLDER_ONAP_RELEASENAME, this.getPomProperty("onap.distname"));
+		this.data.put(PLACEHOLDER_ODL_RELEASENAME,  this.getPomProperty("odl.distname") );
+		this.data.put(PLACEHOLDER_BUILD_TIMESTAMP, props!=null?props.getBuildDate().toString():"");
+		this.data.put(PLACEHOLDER_ODLUX_REVISION, this.getPomProperty("odlux.buildno"));
+		this.data.put(PLACEHOLDER_PACAKGE_VERSION, this.getManifestValue("Bundle-Version"));
+	}
+
+	@Override
+	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+
+		String uri = req.getRequestURI().substring(URI_PRE.length());
+		LOG.debug("request for {}",uri);
+		if (uri.length() <= 0 || uri.equals("/")) {
+			// collect data
+			this.collectData();
+			// render readme
+			String content = this.render();
+			byte[] output = content!=null?content.getBytes():new byte[0];
+			// output
+			resp.setStatus(HttpServletResponse.SC_OK);
+			resp.setContentLength(output.length);
+			resp.setContentType("text/plain");
+			resp.getOutputStream().write(output);
+
+		} else {
+			this.doGetFile(uri, resp);
+		}
+	}
+
+	private String getFileContent(String filename) {
+		LOG.debug("try ti get content of {}",filename);
+		return Resources.getFileContent(AboutHttpServlet.class,RES_BASEPATH + filename);
+	}
+
+	private void collectData() {
+		// TODO Auto-generated method stub
+
+	}
+
+	private String getManifestValue(String key) {
+		URL url = Resources.getUrlForRessource(AboutHttpServlet.class, "/META-INF/MANIFEST.MF");
+		if(url==null) {
+			return null;
+		}
+		Manifest manifest;
+		try {
+			manifest = new Manifest(url.openStream());
+			Attributes attr = manifest.getMainAttributes();
+			return attr.getValue(key);
+		} catch (IOException e) {
+			LOG.warn("problem reading manifest: {}",e);
+		}
+		return null;
+
+	}
+	private PomPropertiesFile getPomProperties() {
+		URL url = Resources.getUrlForRessource(AboutHttpServlet.class, "/META-INF/maven/"+groupId+"/"+artifactId+"/pom.properties");
+		PomPropertiesFile propfile;
+		if(url==null) {
+			return null;
+		}
+		try {
+			propfile = new PomPropertiesFile(url.openStream());
+			return propfile;
+		} catch (Exception e) {
+			LOG.warn("unable to read inner pom file: {}",e);
+		}
+		return null;
+	}
+	private String getPomProperty(String key) {
+		LOG.info("try to get pom property for {}",key);
+		URL url = Resources.getUrlForRessource(AboutHttpServlet.class,"/META-INF/maven/"+groupId+"/"+artifactId+"/pom.xml");
+		if(url==null) {
+			return null;
+		}
+		PomFile pomfile;
+		try {
+			pomfile = new PomFile(url.openStream());
+			return pomfile.getProperty(key);
+		} catch (Exception e) {
+			LOG.warn("unable to read inner pom file: {}",e);
+		}
+		return null;
+	}
+	private void doGetFile(String uri, HttpServletResponse resp) {
+		String content = this.getFileContent(uri);
+		if (content == null) {
+			try {
+				resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+			} catch (IOException e) {
+				LOG.debug("unable to send error response : {}",e);
+			}
+		} else {
+			byte[] data = content.getBytes();
+			resp.setStatus(HttpServletResponse.SC_OK);
+			resp.setContentType(this.getContentType(uri));
+			try {
+				resp.getOutputStream().write(data);
+			} catch (IOException e) {
+				LOG.debug("unable to send data : {}",e);
+			}
+		}
+
+	}
+
+	private String getContentType(String filename) {
+		String ext = filename.substring(filename.lastIndexOf(".")+1).toLowerCase();
+		switch (ext) {
+		case "jpg":
+		case "jpeg":
+		case "svg":
+		case "png":
+		case "gif":
+		case "bmp":
+			return "image/" + ext;
+		case "json":
+			return "application/json";
+		case "html":
+		case "htm":
+			return "text/html";
+		case "txt":
+		case "md":
+		default:
+			return "text/plain";
+		}
+	}
+
+	private String render() {
+		return this.render(null);
+	}
+
+	private String render(String content) {
+		if (content == null) {
+			content = this.readmeContent;
+		}
+		if(content==null) {
+			return null;
+		}
+		for (Entry<String, String> entry : this.data.entrySet()) {
+			if (entry.getValue() != null && content.contains(entry.getKey())) {
+				content = content.replace(entry.getKey(), entry.getValue());
+			}
+		}
+
+		return content;
+	}
+}
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/GetYangSchemaRequest.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/GetYangSchemaRequest.java
new file mode 100644
index 0000000..db4faed
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/GetYangSchemaRequest.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.http;
+
+import javax.servlet.http.HttpServletRequest;
+
+public class GetYangSchemaRequest {
+
+	private static final String URI_PREFIX = "/yang-schema/";
+	private final String module;
+	private final String version;
+
+	public String getModule() {
+		return this.module;
+	}
+
+	public String getVersion() {
+		return this.version;
+	}
+
+	public boolean hasVersion() {
+		return this.version != null;
+	}
+
+	public GetYangSchemaRequest(HttpServletRequest req) throws Exception {
+		String uri = req.getRequestURI().substring(URI_PREFIX.length());
+
+		String[] hlp = uri.split("/");
+		if (hlp.length < 1) {
+			throw new Exception("no module request found");
+
+		} else if (hlp.length == 1) {
+			this.module = hlp[0];
+			this.version = null;
+		} else {
+			this.module = hlp[0];
+			this.version = hlp[1];
+		}
+
+	}
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/ReadyHttpServlet.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/ReadyHttpServlet.java
new file mode 100644
index 0000000..607f552
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/ReadyHttpServlet.java
@@ -0,0 +1,42 @@
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.http;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ReadyHttpServlet extends HttpServlet {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private static final Logger LOG = LoggerFactory.getLogger(ReadyHttpServlet.class);
+	private boolean status;
+
+	@Override
+	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+	
+		if(this.isReady()) {
+			resp.setStatus(HttpServletResponse.SC_OK);
+		}
+		else {
+		
+			resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+		}
+	}
+
+	private boolean isReady() {
+		return this.status;
+	}
+
+	public void setStatus(boolean status) {
+		this.status = status;
+		LOG.info("status is set to ready: {}",status);
+	}
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/YangSchemaHttpServlet.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/YangSchemaHttpServlet.java
new file mode 100644
index 0000000..94d2793
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/YangSchemaHttpServlet.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.http;
+
+import java.io.IOException;
+import java.text.ParseException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.YangFileProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class YangSchemaHttpServlet extends HttpServlet {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	private static final Logger LOG = LoggerFactory.getLogger(YangSchemaHttpServlet.class);
+
+	private static final String schemaCachePath = "cache/schema/";
+
+	private final YangFileProvider fileProvider;
+
+	public YangSchemaHttpServlet() {
+		this.fileProvider = new YangFileProvider(schemaCachePath);
+	}
+
+	@Override
+	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+
+		GetYangSchemaRequest request = null;
+		try {
+			request = new GetYangSchemaRequest(req);
+		} catch (Exception e) {
+			LOG.warn("bad request for yang-schema: {}", e);
+		}
+		if (request != null) {
+			int len;
+			LOG.debug("request for yang-schema for module {} with version {}", request.getModule(),
+					request.getVersion());
+			if (request.hasVersion()) {
+				boolean has=false;
+				try {
+					has = this.fileProvider.hasFileOrNewerForModule(request.getModule(), request.getVersion());
+				} catch (ParseException e1) {
+					LOG.warn("unable to parse revision: {}" ,e1);
+				}
+				if(has) {
+
+					try {
+						resp.setStatus(HttpServletResponse.SC_OK);
+						resp.setContentType("text/plain");
+						len = this.fileProvider.writeOutput(request.getModule(), request.getVersion(),
+								resp.getOutputStream());
+						resp.setContentLength(len);
+						
+					} catch (ParseException e) {
+						LOG.warn("unable to parse revision: {}", e);
+					}
+				} else {
+					resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+				}
+
+			} else if (this.fileProvider.hasFileForModule(request.getModule())) {
+
+				try {
+					resp.setStatus(HttpServletResponse.SC_OK);
+					resp.setContentType("text/plain");
+					len = this.fileProvider.writeOutput(request.getModule(), null, resp.getOutputStream());
+					resp.setContentLength(len);
+				} catch (ParseException e) {
+					LOG.warn(e.getMessage());
+				}
+
+			} else {
+				resp.sendError(HttpServletResponse.SC_NOT_FOUND);
+			}
+		} else {
+			resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
+		}
+
+	}
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
new file mode 100644
index 0000000..ba6e999
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.impl;
+
+import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.ReadyHttpServlet;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.IEntityDataProvider;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataProviderImpl implements IEntityDataProvider, AutoCloseable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DataProviderImpl.class);
+
+    private static final String APPLICATION_NAME = null;
+    private RpcProviderService rpcProviderService = null;
+    private DataProviderServiceImpl rpcApiService;
+	private ReadyHttpServlet readyServlet;
+    private HtDatabaseClient dbClient;
+
+
+    // Blueprint 1
+    public DataProviderImpl() {
+        LOG.info("Creating provider for {}", APPLICATION_NAME);
+    }
+
+    public void setRpcProviderService(RpcProviderService rpcProviderService) {
+        this.rpcProviderService = rpcProviderService;
+    }
+    public void setReadyServlet(ReadyHttpServlet readyServlet) {
+    	this.readyServlet = readyServlet;
+    }
+    public void init() throws Exception {
+
+        LOG.info("Session Initiated start {}", APPLICATION_NAME);
+
+        // Start RPC Service
+        this.rpcApiService = new DataProviderServiceImpl(rpcProviderService);
+        // Get configuration
+
+        LOG.info("Session Initiated end. Initialization done");
+    }
+
+    @Override
+    public void close() throws Exception {
+        LOG.info("DeviceManagerImpl closing ...");
+
+        close(dbClient);
+        close(rpcApiService);
+        LOG.info("DeviceManagerImpl closing done");
+    }
+
+    /**
+     * Used to close all Services, that should support AutoCloseable Pattern
+     *
+     * @param toClose
+     * @throws Exception
+     */
+    private void close(AutoCloseable... toCloseList) throws Exception {
+        for (AutoCloseable element : toCloseList) {
+            if (element != null) {
+                element.close();
+            }
+        }
+    }
+
+    @Override
+    public DataProvider getDataProvider() {
+        return rpcApiService.getDataProvider();
+    }
+
+	@Override
+	public void setReadyStatus(boolean status) {
+		if(this.readyServlet!=null) {
+			this.readyServlet.setStatus(status);
+		}
+	}
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java
new file mode 100644
index 0000000..70b7353
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java
@@ -0,0 +1,335 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.impl;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
+import org.onap.ccsdk.features.sdnr.wt.database.config.EsConfig;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.ElasticSearchDataProvider;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateNetworkElementConnectionInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateNetworkElementConnectionOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DataProviderService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMaintenanceInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMaintenanceOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMediatorServerInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteMediatorServerOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteNetworkElementConnectionInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteNetworkElementConnectionOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadConnectionlogListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadConnectionlogListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadEventlogListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadEventlogListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultcurrentListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultcurrentListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultlogListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadFaultlogListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadInventoryListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadInventoryListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadMaintenanceListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadMaintenanceListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadMediatorServerListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadMediatorServerListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadNetworkElementConnectionListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadNetworkElementConnectionListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mDeviceListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mDeviceListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mLtpListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata15mLtpListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hDeviceListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hDeviceListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hLtpListInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadPmdata24hLtpListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadStatusInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.ReadStatusOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMaintenanceInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMaintenanceOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMediatorServerInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateMediatorServerOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionOutput;
+import org.opendaylight.yangtools.concepts.Builder;
+import org.opendaylight.yangtools.concepts.ObjectRegistration;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+public class DataProviderServiceImpl implements DataProviderService, AutoCloseable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DataProviderServiceImpl.class);
+    public static final String CONFIGURATIONFILE = "etc/dataprovider.properties";
+    private static final long DATABASE_TIMEOUT_MS = 120*1000L;
+
+    private final ObjectRegistration<@NonNull DataProviderServiceImpl> rpcReg;
+    private final ElasticSearchDataProvider dataProvider;
+    private final ConfigurationFileRepresentation configuration;
+
+    DataProviderServiceImpl(final RpcProviderService rpcProviderService) throws Exception {
+        this.configuration = new ConfigurationFileRepresentation(CONFIGURATIONFILE);
+        EsConfig esConfig = new EsConfig(configuration);
+        this.dataProvider = new ElasticSearchDataProvider(esConfig.getHosts());
+        this.dataProvider.waitForYellowDatabaseStatus(DATABASE_TIMEOUT_MS,TimeUnit.MILLISECONDS);
+        // Register ourselves as the REST API RPC implementation
+        LOG.info("Register RPC Service " + DataProviderServiceImpl.class.getSimpleName());
+        this.rpcReg = rpcProviderService.registerRpcImplementation(DataProviderService.class, this);
+    }
+
+    /**
+     * @return the dataProvider
+     */
+    public DataProvider getDataProvider() {
+        return dataProvider.getDataProvider();
+    }
+
+
+
+    @Override
+    public void close() throws Exception {
+        LOG.info("Close RPC Service");
+        if (rpcReg != null) {
+            rpcReg.close();
+        }
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadFaultcurrentListOutput>> readFaultcurrentList(ReadFaultcurrentListInput input) {
+        LOG.debug("RPC Request: getFaultCurrentEntityList with input {}", input);
+        RpcResultBuilder<ReadFaultcurrentListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readFaultCurrentList(input));
+        return result.buildFuture();
+    }
+    @Override
+    public ListenableFuture<RpcResult<ReadFaultlogListOutput>> readFaultlogList(ReadFaultlogListInput input) {
+        LOG.debug("RPC Request: getFaultCurrentEntityList with input {}", input);
+        RpcResultBuilder<ReadFaultlogListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readFaultLogList(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadMaintenanceListOutput>> readMaintenanceList(ReadMaintenanceListInput input) {
+        LOG.debug("RPC Request: getMaintenanceEntityList with input {}", input);
+        RpcResultBuilder<ReadMaintenanceListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readMaintenanceList(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadMediatorServerListOutput>> readMediatorServerList(
+            ReadMediatorServerListInput input) {
+        LOG.debug("RPC Request: getMediatorServerEntityList with input {}", input);
+        RpcResultBuilder<ReadMediatorServerListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readMediatorServerList(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadNetworkElementConnectionListOutput>> readNetworkElementConnectionList(
+            ReadNetworkElementConnectionListInput input) {
+        LOG.debug("RPC Request: getNetworkElementConnectionEntityList with input {}", input);
+        RpcResultBuilder<ReadNetworkElementConnectionListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readNetworkElementConnectionList(input));
+        return result.buildFuture();
+
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadPmdata15mListOutput>> readPmdata15mList(ReadPmdata15mListInput input) {
+        LOG.debug("RPC Request: getNetworkElementConnectionEntityList with input {}", input);
+        RpcResultBuilder<ReadPmdata15mListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readPmdata15mList(input));
+        return result.buildFuture();
+
+    }
+    @Override
+    public ListenableFuture<RpcResult<ReadPmdata24hListOutput>> readPmdata24hList(ReadPmdata24hListInput input) {
+        LOG.debug("RPC Request: getNetworkElementConnectionEntityList with input {}", input);
+        RpcResultBuilder<ReadPmdata24hListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readPmdata24hList(input));
+        return result.buildFuture();
+
+    }
+    @Override
+    public ListenableFuture<RpcResult<ReadStatusOutput>> readStatus(ReadStatusInput input) {
+        LOG.debug("RPC Request: getStatusEntityList with input {}", input);
+        RpcResultBuilder<ReadStatusOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readStatus());
+        return result.buildFuture();
+
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadInventoryListOutput>> readInventoryList(ReadInventoryListInput input) {
+        LOG.debug("RPC Request: getInventoryEntityList with input {}", input);
+        RpcResultBuilder<ReadInventoryListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readInventoryList(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadPmdata15mLtpListOutput>> readPmdata15mLtpList(ReadPmdata15mLtpListInput input) {
+        LOG.debug("RPC Request: readPmdataLtpList with input {}", input);
+        RpcResultBuilder<ReadPmdata15mLtpListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readPmdata15mLtpList(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadPmdata15mDeviceListOutput>> readPmdata15mDeviceList(ReadPmdata15mDeviceListInput input) {
+            LOG.debug("RPC Request: readPmdataDeviceList with input {}", input);
+            RpcResultBuilder<ReadPmdata15mDeviceListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readPmdata15mDeviceList(input));
+            return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadPmdata24hLtpListOutput>> readPmdata24hLtpList(ReadPmdata24hLtpListInput input) {
+        LOG.debug("RPC Request: readPmdataLtpList with input {}", input);
+        RpcResultBuilder<ReadPmdata24hLtpListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readPmdata24hLtpList(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadPmdata24hDeviceListOutput>> readPmdata24hDeviceList(ReadPmdata24hDeviceListInput input) {
+            LOG.debug("RPC Request: readPmdataDeviceList with input {}", input);
+            RpcResultBuilder<ReadPmdata24hDeviceListOutput> result = read(()-> DataProviderServiceImpl.this.dataProvider.readPmdata24hDeviceList(input));
+            return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadConnectionlogListOutput>> readConnectionlogList(
+            ReadConnectionlogListInput input) {
+        LOG.debug("RPC Request: readConnectionlogList with input {}", input);
+        RpcResultBuilder<ReadConnectionlogListOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.readConnectionlogList(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<CreateNetworkElementConnectionOutput>> createNetworkElementConnection(
+            CreateNetworkElementConnectionInput input) {
+        LOG.debug("RPC Request: createNetworkElementConnection with input {}", input);
+        RpcResultBuilder<CreateNetworkElementConnectionOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.createNetworkElementConnection(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<UpdateNetworkElementConnectionOutput>> updateNetworkElementConnection(
+            UpdateNetworkElementConnectionInput input) {
+        LOG.debug("RPC Request: updateNetworkElementConnection with input {}", input);
+        RpcResultBuilder<UpdateNetworkElementConnectionOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.updateNetworkElementConnection(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<DeleteNetworkElementConnectionOutput>> deleteNetworkElementConnection(
+            DeleteNetworkElementConnectionInput input) {
+        RpcResultBuilder<DeleteNetworkElementConnectionOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.deleteNetworkElementConnection(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<DeleteMediatorServerOutput>> deleteMediatorServer(
+            DeleteMediatorServerInput input) {
+        LOG.debug("RPC Request: deleteMediatorServer with input {}", input);
+        RpcResultBuilder<DeleteMediatorServerOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.deleteMediatorServer(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<CreateMediatorServerOutput>> createMediatorServer(
+            CreateMediatorServerInput input) {
+        LOG.debug("RPC Request: createMediatorServer with input {}", input);
+        RpcResultBuilder<CreateMediatorServerOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.createMediatorServer(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<CreateMaintenanceOutput>> createMaintenance(CreateMaintenanceInput input) {
+        LOG.debug("RPC Request: createMaintenance with input {}", input);
+        RpcResultBuilder<CreateMaintenanceOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.createMaintenance(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<DeleteMaintenanceOutput>> deleteMaintenance(DeleteMaintenanceInput input) {
+        LOG.debug("RPC Request: deleteMaintenance with input {}", input);
+        RpcResultBuilder<DeleteMaintenanceOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.deleteMaintenance(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<UpdateMediatorServerOutput>> updateMediatorServer(
+            UpdateMediatorServerInput input) {
+        LOG.debug("RPC Request: updateMediatorServer with input {}", input);
+        RpcResultBuilder<UpdateMediatorServerOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.updateMediatorServer(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<UpdateMaintenanceOutput>> updateMaintenance(UpdateMaintenanceInput input) {
+        LOG.debug("RPC Request: updateMaintenance with input {}", input);
+        RpcResultBuilder<UpdateMaintenanceOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.updateMaintenance(input));
+        return result.buildFuture();
+    }
+
+    @Override
+    public ListenableFuture<RpcResult<ReadEventlogListOutput>> readEventlogList(ReadEventlogListInput input) {
+        LOG.debug("RPC Request: readEventlogList with input {}", input);
+        RpcResultBuilder<ReadEventlogListOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.readEventlogList(input));
+        return result.buildFuture();
+    }
+
+    // -- private classes and functions
+
+    private static String assembleExceptionMessage(Exception e) {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        e.printStackTrace(pw);
+
+        StringBuffer buf = new StringBuffer();
+        buf.append("Exception: ");
+        buf.append(sw.toString());
+        return buf.toString();
+    }
+
+    private interface GetEntityInput<O extends DataObject> {
+        Builder<O> get() throws IOException;
+    }
+
+    private static <O extends DataObject,I extends DataObject> RpcResultBuilder<O> read(GetEntityInput<O> inputgetter ) {
+        RpcResultBuilder<O> result;
+        try {
+            Builder<O> outputBuilder = inputgetter.get();
+            result = RpcResultBuilder.success(outputBuilder);
+        } catch (Exception e) {
+            LOG.info("Exception", e);
+            result = RpcResultBuilder.failed();
+            result.withError(ErrorType.APPLICATION, assembleExceptionMessage(e));
+        }
+        return result;
+    }
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/resources/about/README.md b/sdnr/wt/data-provider/provider/src/main/resources/about/README.md
new file mode 100644
index 0000000..9c45d83
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/resources/about/README.md
@@ -0,0 +1,2 @@
+# About
+ONAP SDN-R | ONF Wireless for ONAP {release-name} ({odl-version}) - Build: {build-time} {odlux-revision} {package-version}
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/provider/src/main/resources/about/test.bmp b/sdnr/wt/data-provider/provider/src/main/resources/about/test.bmp
new file mode 100644
index 0000000..d049ea5
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/resources/about/test.bmp
Binary files differ
diff --git a/sdnr/wt/data-provider/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/wt/data-provider/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
new file mode 100644
index 0000000..bc2e3f9
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+ONAP : ccsdk feature sdnr wt data-provider
+ ================================================================================
+Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
+All rights reserved.
+================================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END=========================================================
+ -->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+  xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true">
+
+  <reference id="rpcProviderService" interface="org.opendaylight.mdsal.binding.api.RpcProviderService"
+    odl:type="default" />
+
+  <bean id="readyServlet"
+    class="org.onap.ccsdk.features.sdnr.wt.dataprovider.http.ReadyHttpServlet">
+  </bean>
+  <service interface="javax.servlet.http.HttpServlet"
+    ref="readyServlet">
+    <service-properties>
+      <entry key="alias" value="/ready" />
+    </service-properties>
+  </service>
+
+ <bean id="provider"
+  class="org.onap.ccsdk.features.sdnr.wt.dataprovider.impl.DataProviderImpl"
+  init-method="init" destroy-method="close">
+  <property name="rpcProviderService" ref="rpcProviderService" />
+  <property name="readyServlet" ref="readyServlet" />
+</bean>
+  <bean id="yangServlet"
+    class="org.onap.ccsdk.features.sdnr.wt.dataprovider.http.YangSchemaHttpServlet">
+  </bean>
+  <service interface="javax.servlet.http.HttpServlet"
+    ref="yangServlet">
+    <service-properties>
+      <entry key="alias" value="/yang-schema" />
+    </service-properties>
+  </service>
+
+  <bean id="aboutServlet"
+    class="org.onap.ccsdk.features.sdnr.wt.dataprovider.http.AboutHttpServlet">
+  </bean>
+  <service interface="javax.servlet.http.HttpServlet"
+    ref="aboutServlet">
+    <service-properties>
+      <entry key="alias" value="/about" />
+    </service-properties>
+  </service>
+ 
+  <service ref="provider"
+    interface="org.onap.ccsdk.features.sdnr.wt.dataprovider.model.IEntityDataProvider" />
+
+</blueprint>
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java
new file mode 100644
index 0000000..e87ef9d
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
+
+import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.AboutHttpServlet;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.StringWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class TestAbout {
+
+	@Test
+	public void testReadmeRequest() throws IOException, ServletException {
+		AboutHelperServlet servlet =new AboutHelperServlet();
+		HttpServletRequest request = mock(HttpServletRequest.class);
+		HttpServletResponse response =  mock(HttpServletResponse.class);
+		when(request.getRequestURI()).thenReturn("/about");
+		StringWriter out = new StringWriter();
+		ServletOutputStream printOut = new ServletOutputStream() {
+
+			@Override
+			public void write(int arg0) throws IOException {
+				out.write(arg0);
+			}
+		};
+		when(response.getOutputStream()).thenReturn(printOut);
+		servlet.doGet(request,response);
+		verify(response).setStatus(200);
+		verify(response).setContentType("text/plain");
+		System.out.println(out.getBuffer().toString());
+		assertTrue(out.getBuffer().length()>0);
+	}
+
+	@Test
+	public void testReadmeResourceRequest() throws IOException, ServletException {
+		AboutHelperServlet servlet =new AboutHelperServlet();
+		HttpServletRequest request = mock(HttpServletRequest.class);
+		HttpServletResponse response =  mock(HttpServletResponse.class);
+		when(request.getRequestURI()).thenReturn("/about/test.bmp");
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		ServletOutputStream printOut = new ServletOutputStream() {
+
+			@Override
+			public void write(int arg0) throws IOException {
+				out.write(arg0);
+			}
+		};
+		when(response.getOutputStream()).thenReturn(printOut);
+		servlet.doGet(request,response);
+		verify(response).setStatus(200);
+		verify(response).setContentType("image/bmp");
+		assertTrue(out.size()>0);
+	}
+
+
+	private class AboutHelperServlet extends AboutHttpServlet{
+
+		/**
+		 *
+		 */
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+			super.doGet(req, resp);
+		}
+
+	}
+}
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestFilterConversion.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestFilterConversion.java
new file mode 100644
index 0000000..51fe76d
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestFilterConversion.java
@@ -0,0 +1,22 @@
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.QueryByFilter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Filter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.FilterBuilder;
+
+public class TestFilterConversion {
+
+	private static final String PROPERTY = "node-id";
+
+	@Test
+	public void testQuestionMark() {
+		 List<Filter> filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY).setFiltervalue("si?ba").build());
+		QueryBuilder query = QueryByFilter.fromFilter(filters );
+		System.out.println(query.toJSON());
+	}
+}
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTimestampFilter.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTimestampFilter.java
new file mode 100644
index 0000000..c32149b
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTimestampFilter.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.json.JSONObject;
+import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.QueryByFilter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Filter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.FilterBuilder;
+
+public class TestTimestampFilter {
+
+
+	
+	@Test
+	public void testTimestampRange() {
+		final String PROPERTY_TIMESTAMP = "timestamp";
+		List<Filter> filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2017*").build());
+		QueryBuilder query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2017-01-01T00:00:00.0Z", "2018-01-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2000-01-01T00:00:00.0Z", "3000-01-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("20*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2000-01-01T00:00:00.0Z", "2100-01-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("205*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-01-01T00:00:00.0Z", "2060-01-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-01-01T00:00:00.0Z", "2051-01-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-01-01T00:00:00.0Z", "2051-01-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-1*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-01T00:00:00.0Z", "2051-01-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-01T00:00:00.0Z", "2050-11-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-01T00:00:00.0Z", "2050-11-01T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-0*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-01T00:00:00.0Z", "2050-10-10T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-02*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-02T00:00:00.0Z", "2050-10-03T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T00:00:00.0Z", "2050-10-15T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T00:00:00.0Z", "2050-10-15T00:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T1*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T10:00:00.0Z", "2050-10-14T20:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T12*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T12:00:00.0Z", "2050-10-14T13:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T12:*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T12:00:00.0Z", "2050-10-14T13:00:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T12:4*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T12:40:00.0Z", "2050-10-14T12:50:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T12:42*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T12:42:00.0Z", "2050-10-14T12:43:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T12:42:*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T12:42:00.0Z", "2050-10-14T12:43:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T12:42:5*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T12:42:50.0Z", "2050-10-14T12:43:00.0Z");
+		
+		filters = Arrays.asList(new FilterBuilder().setProperty(PROPERTY_TIMESTAMP).setFiltervalue("2050-10-14T12:42:56*").build());
+		query=  QueryByFilter.fromFilter(filters );
+		assertRange(query.getInner(), PROPERTY_TIMESTAMP, "2050-10-14T12:42:56.0Z", "2050-10-14T12:42:57.0Z");
+	}
+	private void assertRange(JSONObject rangeQuery,String property,String lower,String upper) {
+		System.out.println("==test for "+rangeQuery.toString());
+		assertTrue(rangeQuery.has("range"));
+		assertTrue(rangeQuery.getJSONObject("range").has(property));
+		JSONObject o=rangeQuery.getJSONObject("range").getJSONObject(property);
+		assertNotNull(o);
+		assertTrue(o.has("lt"));
+		assertEquals(upper, o.getString("lt"));
+		assertTrue(o.has("gte"));
+		assertEquals(lower, o.getString("gte"));
+		System.out.println("succeeded");
+	}
+}
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangProvider.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangProvider.java
new file mode 100644
index 0000000..c911100
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangProvider.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
+package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.FileAttribute;
+import java.nio.file.attribute.PosixFilePermission;
+import java.nio.file.attribute.PosixFilePermissions;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Comparator;
+import java.util.EnumSet;
+import java.util.Set;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.YangFileProvider;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.YangFilename;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.YangSchemaHttpServlet;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class TestYangProvider {
+
+	private static final String TESTPATH = "cache/schema/";
+
+
+	@BeforeClass
+	public static void init() {
+		Set<PosixFilePermission> perms;
+		FileAttribute<?> attr;
+		perms     = EnumSet.noneOf(PosixFilePermission.class);
+
+		perms.add(PosixFilePermission.OWNER_READ);
+		perms.add(PosixFilePermission.OWNER_WRITE);
+		perms.add(PosixFilePermission.OWNER_EXECUTE);
+
+		attr = PosixFilePermissions.asFileAttribute(perms);
+		try {
+			Files.createDirectories(new File(TESTPATH).toPath(),attr);
+			new File(TESTPATH+new YangFilename("module1","2010-01-01").getFilename()).createNewFile();
+			new File(TESTPATH+new YangFilename("module2","2010-01-01").getFilename()).createNewFile();
+			new File(TESTPATH+new YangFilename("module2","2010-04-01").getFilename()).createNewFile();
+			new File(TESTPATH+new YangFilename("module3","2010-01-01").getFilename()).createNewFile();
+			new File(TESTPATH+new YangFilename("module4","2010-05-01").getFilename()).createNewFile();
+			new File(TESTPATH+new YangFilename("module5","2010-01-11").getFilename()).createNewFile();
+			new File(TESTPATH+new YangFilename("module6","2010-01-01").getFilename()).createNewFile();
+		} catch (IOException | ParseException e) {
+
+		}
+	}
+	@AfterClass
+	public static void deinit() {
+		try {
+			Files.walk(new File("cache").toPath())
+		      .sorted(Comparator.reverseOrder())
+		      .map(Path::toFile)
+		      .forEach(File::delete);
+		} catch (IOException e) {
+			System.err.println(e);
+		}
+	}
+	@Test
+	public void testExisting() {
+		YangFileProvider provider= new YangFileProvider(TESTPATH);
+		assertTrue(provider.hasFileForModule("module1","2010-01-01"));
+		assertTrue(provider.hasFileForModule("module2"));
+		assertTrue(provider.hasFileForModule("module3"));
+		assertFalse(provider.hasFileForModule("module5","2010-01-01"));
+	}
+	@Test
+	public void testRevision() throws ParseException {
+		SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
+		YangFileProvider provider= new YangFileProvider(TESTPATH);
+		YangFilename f1 = provider.getFileForModule("module1","2010-01-01");
+		assertEquals("module1",f1.getModule());
+		assertEquals(sdf.parse("2010-01-01"),f1.getRevision());
+		YangFilename f2 = provider.getFileForModule("module2");
+		assertEquals("module2",f2.getModule());
+		assertEquals(sdf.parse("2010-04-01"),f2.getRevision());
+		f2 = provider.getFileForModule("module2","2010-02-01");
+		assertEquals("module2",f2.getModule());
+		assertEquals(sdf.parse("2010-04-01"),f2.getRevision());
+		YangFilename f3 = provider.getFileForModule("module3");
+		assertEquals("module3",f3.getModule());
+		assertEquals(sdf.parse("2010-01-01"),f3.getRevision());
+		f3 = provider.getFileForModule("module3","2010-04-01");
+		assertNull(f3);
+	}
+	@Test
+	public void testServlet() throws IOException, ServletException {
+		HelpYangSchemaHttpServlet servlet = new HelpYangSchemaHttpServlet();
+		HttpServletRequest req = mock(HttpServletRequest.class);
+		HttpServletResponse resp = mock(HttpServletResponse.class);
+
+		when(req.getRequestURI()).thenReturn("/yang-schema/module1");
+		StringWriter out = new StringWriter();
+		ServletOutputStream printOut = new ServletOutputStream() {
+
+			@Override
+			public void write(int arg0) throws IOException {
+				out.write(arg0);
+			}
+		};
+		when(resp.getOutputStream()).thenReturn(printOut);
+		servlet.doGet(req,resp);
+		verify(resp).setStatus(200);
+		verify(resp).setContentType("text/plain");
+
+	}
+	@Test
+	public void testServletBad() throws IOException, ServletException {
+		HelpYangSchemaHttpServlet servlet = new HelpYangSchemaHttpServlet();
+		HttpServletRequest req = mock(HttpServletRequest.class);
+		HttpServletResponse resp = mock(HttpServletResponse.class);
+
+		when(req.getRequestURI()).thenReturn("/yang-schema/module1/2020-01-01");
+		StringWriter out = new StringWriter();
+		ServletOutputStream printOut = new ServletOutputStream() {
+
+			@Override
+			public void write(int arg0) throws IOException {
+				out.write(arg0);
+			}
+		};
+		when(resp.getOutputStream()).thenReturn(printOut);
+		servlet.doGet(req,resp);
+		verify(resp).sendError(HttpServletResponse.SC_NOT_FOUND);
+
+	}
+	@Test
+	public void testServletNear() throws IOException, ServletException {
+		HelpYangSchemaHttpServlet servlet = new HelpYangSchemaHttpServlet();
+		HttpServletRequest req = mock(HttpServletRequest.class);
+		HttpServletResponse resp = mock(HttpServletResponse.class);
+
+		when(req.getRequestURI()).thenReturn("/yang-schema/module2/2010-03-01");
+		StringWriter out = new StringWriter();
+		ServletOutputStream printOut = new ServletOutputStream() {
+
+			@Override
+			public void write(int arg0) throws IOException {
+				out.write(arg0);
+			}
+		};
+		when(resp.getOutputStream()).thenReturn(printOut);
+		servlet.doGet(req,resp);
+		verify(resp).setStatus(200);
+		verify(resp).setContentType("text/plain");
+
+	}
+	private static class HelpYangSchemaHttpServlet extends YangSchemaHttpServlet{
+
+		/**
+		 *
+		 */
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+			super.doGet(req, resp);
+		}
+	}
+
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/log4j.properties b/sdnr/wt/data-provider/provider/src/test/resources/log4j.properties
new file mode 100644
index 0000000..142663b
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/resources/log4j.properties
@@ -0,0 +1,12 @@
+log4j.rootLogger=INFO, out
+
+log4j.logger.org.apache.camel.impl.converter=WARN
+log4j.logger.org.apache.camel.management=WARN
+log4j.logger.org.apache.camel.impl.DefaultPackageScanClassResolver=WARN
+log4j.logger.org.springframework=ERROR
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/log4j2.xml b/sdnr/wt/data-provider/provider/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..164e93f
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/resources/log4j2.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration package="log4j.test" 
+               status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Logger name="log4j.test.Log4jTest" level="debug">
+            <AppenderRef ref="Console"/>
+        </Logger>
+        <Root level="trace">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/simplelogger.properties b/sdnr/wt/data-provider/provider/src/test/resources/simplelogger.properties
new file mode 100644
index 0000000..a2f1e7e
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/resources/simplelogger.properties
@@ -0,0 +1,6 @@
+org.slf4j.simpleLogger.defaultLogLevel=debug
+org.slf4j.simpleLogger.showDateTime=true
+#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+#org.slf4j.simpleLogger.showThreadName=true
+org.slf4j.simpleLogger.showLogName=true
+org.slf4j.simpleLogger.showShortLogName=false
\ No newline at end of file
