diff --git a/onap-enabler-be/pom.xml b/onap-enabler-be/pom.xml
new file mode 100644
index 0000000..9952caf
--- /dev/null
+++ b/onap-enabler-be/pom.xml
@@ -0,0 +1,636 @@
+<?xml version="1.0"?>
+<!--/*-
+        * ============LICENSE_START=======================================================
+        * OSAM Core
+        * ================================================================================
+        * Copyright (C) 2018 AT&T
+        * ================================================================================
+        * 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
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+
+	<!-- This is the Maven project object model (POM) file for VID web application 
+		based on the ECOMP SDK distribution. This file stands alone; it does not 
+		inherit from a parent maven module. -->
+	<groupId>org.onap.osam</groupId>
+	<artifactId>onap-enabler-be</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<packaging>war</packaging>
+
+	<properties>
+		<encoding>UTF-8</encoding>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+		<epsdk.version>2.4.0</epsdk.version>
+		<springframework.version>4.2.9.RELEASE</springframework.version>
+		<hibernate.version>4.3.11.Final</hibernate.version>
+		<!-- Skip assembling the zip by default -->
+		<skipassembly>true</skipassembly>
+		<!-- Tests usually require some setup that maven cannot do, so skip. -->
+		<!--<skiptests>false</skiptests>-->
+		<nexusproxy>https://nexus.onap.org</nexusproxy>
+		<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
+		<releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
+		<stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
+		<sitePath>/content/sites/site/org/onap/vid/${project.version}</sitePath>
+	</properties>
+
+
+	<!-- this should be commented for local debugging -->
+	<!-- <deployenv>local</deployenv> -->
+
+	<repositories>
+		<repository>
+			<id>ecomp-releases</id>
+			<name>VID Release Repository</name>
+			<url>${nexusproxy}${releaseNexusPath}</url>
+		</repository>
+		<repository>
+			<id>ecomp-snapshots</id>
+			<name>VID Snapshot Repository</name>
+			<url>${nexusproxy}${snapshotNexusPath}</url>
+		</repository>
+		<repository>
+			<id>ecomp-staging</id>
+			<name>VID Staging Repository</name>
+			<url>${nexusproxy}${stagingNexusPath}</url>
+		</repository>
+		<repository>
+			<!-- Snapshots repository has ECOMP snapshot artifacts -->
+			<id>oss-snapshots</id>
+			<name>oss Central - Snapshots</name>
+			<url>https://oss.sonatype.org/service/local/repositories/releases/content/</url>
+		</repository>
+        <repository>
+            <id>maven2-repo</id>
+            <name>Maven2 repo</name>
+            <url>https://repo.maven.apache.org/maven2</url>
+        </repository>
+
+	</repositories>
+	<distributionManagement>
+		<repository>
+			<id>ecomp-releases</id>
+			<name>VID Release Repository</name>
+			<url>${nexusproxy}/${releaseNexusPath}</url>
+		</repository>
+		<snapshotRepository>
+			<id>ecomp-snapshots</id>
+			<name>VID Snapshot Repository</name>
+			<url>${nexusproxy}/${snapshotNexusPath}</url>
+		</snapshotRepository>
+		<!-- added for javadoc -->
+		<site>
+			<id>ecomp-site</id>
+			<url>dav:${nexusproxy}${sitePath}</url>
+		</site>
+	</distributionManagement>
+
+	<build>
+		<finalName>onap-enabler-be</finalName>
+
+		<plugins>
+            <!-- License plugin should only run once at the start of the project.
+                 For new classes, the header should be added manually by the company which creates it.-->
+
+           <!-- <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>license-maven-plugin</artifactId>
+                <version>1.16</version>
+                <configuration>
+                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
+                    <processStartTag>============LICENSE_START=======================================================</processStartTag>
+                    <processEndTag>============LICENSE_END=========================================================</processEndTag>
+                    <sectionDelimiter>================================================================================</sectionDelimiter>
+                    <licenseName>apache_v2</licenseName>
+                    <inceptionYear>2018</inceptionYear>
+                    <organizationName>AT&amp;T</organizationName>
+                    <projectName>OSAM</projectName>
+                    <canUpdateCopyright>true</canUpdateCopyright>
+                    <canUpdateDescription>true</canUpdateDescription>
+                    <canUpdateLicense>true</canUpdateLicense>
+                    <emptyLineAfterHeader>true</emptyLineAfterHeader>
+                    <verbose>false</verbose>
+                    <includes>
+                        <include>**/*.java</include>
+                    </includes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>first</id>
+                        <goals>
+                            <goal>update-file-header</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                    </execution>
+                </executions>
+            </plugin>-->
+			<plugin>
+				<groupId>org.sonatype.plugins</groupId>
+				<artifactId>nexus-staging-maven-plugin</artifactId>
+				<version>1.6.7</version>
+				<extensions>true</extensions>
+				<configuration>
+					<nexusUrl>${nexusproxy}</nexusUrl>
+					<stagingProfileId>176c31dfe190a</stagingProfileId>
+					<serverId>ecomp-staging</serverId>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.jacoco</groupId>
+				<artifactId>jacoco-maven-plugin</artifactId>
+				<version>0.7.9</version>
+				<executions>
+					<execution>
+						<id>default-prepare-agent</id>
+						<goals>
+							<goal>prepare-agent</goal>
+						</goals>
+					</execution>
+					<execution>
+						<id>default-report</id>
+						<goals>
+							<goal>report</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.tomcat.maven</groupId>
+				<artifactId>tomcat6-maven-plugin</artifactId>
+				<version>2.2</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.tomcat.maven</groupId>
+				<artifactId>tomcat7-maven-plugin</artifactId>
+				<version>2.2</version>
+			</plugin>
+
+			<!-- Generate POJOs from MSO json schema -->
+			<plugin>
+				<groupId>org.jsonschema2pojo</groupId>
+				<artifactId>jsonschema2pojo-maven-plugin</artifactId>
+				<version>0.4.23</version>
+				<configuration>
+					<sourceDirectory>${basedir}/src/main/resources/json/mso</sourceDirectory>
+					<targetPackage>org.onap.osam.domain.mso</targetPackage>
+					<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.1</version>
+				<configuration>
+					<source>1.8</source>
+					<target>1.8</target>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<version>2.19.1</version>
+				<configuration>
+					<!--<skipTests>${skiptests}</skipTests>-->
+					<includes>
+						<include>**/Test*.java</include>
+						<include>**/*Test.java</include>
+						<include>**/*TestCase.java</include>
+					</includes>
+					<excludes>
+						<exclude>**/selenium/*.java</exclude>
+						<exclude>**/integrationTest/*.java</exclude>
+					</excludes>
+					<additionalClasspathElements>
+						<additionalClasspathElement>${basedir}/war</additionalClasspathElement>
+					</additionalClasspathElements>
+					<systemPropertyVariables>
+						<container.classpath>classpath:</container.classpath>
+					</systemPropertyVariables>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<configuration>
+					<skipAssembly>${skipassembly}</skipAssembly>
+					<descriptors>
+						<descriptor>${basedir}/distribution.xml</descriptor>
+					</descriptors>
+				</configuration>
+				<executions>
+					<execution>
+						<id>make-assembly</id>
+						<phase>package</phase>
+						<goals>
+							<goal>single</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>3.0.0</version>
+				<configuration>
+					<!-- Build a jar with all the Java classes -->
+					<attachClasses>true</attachClasses>
+					<!-- Do not put any jars in the war -->
+					<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-site-plugin</artifactId>
+				<version>3.6</version>
+				<dependencies>
+					<dependency>
+						<groupId>org.apache.maven.wagon</groupId>
+						<artifactId>wagon-webdav-jackrabbit</artifactId>
+						<version>2.10</version>
+					</dependency>
+				</dependencies>
+			</plugin>
+			<plugin>
+				<groupId>pl.project13.maven</groupId>
+				<artifactId>git-commit-id-plugin</artifactId>
+				<version>2.2.4</version>
+				<executions>
+					<execution>
+						<id>get-the-git-infos</id>
+						<goals>
+							<goal>revision</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
+					<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
+					<dateFormatTimeZone>${user.timezone}</dateFormatTimeZone>
+					<generateGitPropertiesFile>true</generateGitPropertiesFile>
+					<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
+					<includeOnlyProperties>
+						 <includeOnlyProperty>^git.commit.id$</includeOnlyProperty>
+						 <includeOnlyProperty>^git.commit.message.short$</includeOnlyProperty>
+						 <includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
+					</includeOnlyProperties>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<version>2.10.4</version>
+				<configuration>
+					<failOnError>false</failOnError>
+					<doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
+					<docletArtifact>
+						<groupId>org.umlgraph</groupId>
+						<artifactId>umlgraph</artifactId>
+						<version>5.6</version>
+					</docletArtifact>
+					<additionalparam>-views</additionalparam>
+					<useStandardDocletOptions>true</useStandardDocletOptions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</reporting>
+
+	<dependencies>
+	
+		<dependency>
+		    <groupId>com.opencsv</groupId>
+		    <artifactId>opencsv</artifactId>
+		    <version>4.1</version>
+		</dependency>
+			
+		<!-- HTTP client -->
+
+		<dependency>
+			<groupId>io.joshworks.unirest</groupId>
+			<artifactId>unirest-java</artifactId>
+			<version>0.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpclient</artifactId>
+			<version>4.3.6</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpasyncclient</artifactId>
+			<version>4.0.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpmime</artifactId>
+			<version>4.3.6</version>
+		</dependency>
+		<dependency>
+			<groupId>com.xebialabs.restito</groupId>
+			<artifactId>restito</artifactId>
+			<version>0.9.3</version>
+			<scope>test</scope>
+		</dependency>
+
+		<!-- Helpers -->
+		<dependency>
+			<groupId>org.projectlombok</groupId>
+			<artifactId>lombok</artifactId>
+			<version>1.18.2</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>io.vavr</groupId>
+			<artifactId>vavr</artifactId>
+			<version>0.9.2</version>
+		</dependency>
+
+		<!-- SDK overlay war -->
+		<dependency>
+			<groupId>org.onap.portal.sdk</groupId>
+			<artifactId>epsdk-app-overlay</artifactId>
+			<version>${epsdk.version}</version>
+			<type>war</type>
+		</dependency>
+		<dependency>
+			<groupId>org.onap.portal.sdk</groupId>
+			<artifactId>epsdk-app-common</artifactId>
+			<version>${epsdk.version}</version>
+			<type>jar</type>
+		</dependency>
+
+		<dependency>
+			<groupId>org.onap.portal.sdk</groupId>
+			<artifactId>epsdk-core</artifactId>
+			<version>${epsdk.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.onap.portal.sdk</groupId>
+			<artifactId>epsdk-analytics</artifactId>
+			<version>${epsdk.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.onap.portal.sdk</groupId>
+			<artifactId>epsdk-workflow</artifactId>
+			<version>${epsdk.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.att.eelf</groupId>
+			<artifactId>eelf-core</artifactId>
+			<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>ch.qos.logback</groupId>
+			<artifactId>logback-core</artifactId>
+			<version>1.2.3</version>
+		</dependency>
+		<dependency>
+			<groupId>ch.qos.logback</groupId>
+			<artifactId>logback-classic</artifactId>
+			<version>1.2.3</version>
+		</dependency>
+
+		<!-- Mapper -->
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+			<version>2.6.3</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-core</artifactId>
+			<version>2.8.6</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+			<version>2.6.7.1</version>
+		</dependency>
+		<dependency>
+			<groupId>com.mchange</groupId>
+			<artifactId>c3p0</artifactId>
+			<version>0.9.5.2</version>
+		</dependency>
+		<dependency>
+			<groupId>io.searchbox</groupId>
+			<artifactId>jest</artifactId>
+			<version>2.0.0</version>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>3.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.12</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>2.4</version>
+			<!--<scope>test</scope>-->
+		</dependency>
+		<dependency>
+			<groupId>com.google.code.bean-matchers</groupId>
+			<artifactId>bean-matchers</artifactId>
+			<version>0.11</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20160212</version>
+		</dependency>
+		<dependency>
+			<groupId>org.quartz-scheduler</groupId>
+			<artifactId>quartz</artifactId>
+			<version>2.2.1</version>
+			<exclusions>
+				<!-- exclude 0.9.1.1 to avoid dupe of com.mchange:c3p0:0.9.2.1 -->
+				<exclusion>
+					<groupId>c3p0</groupId>
+					<artifactId>c3p0</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<!-- bridge to implement commons-logging using slf4j -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+			<version>1.7.12</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context-support</artifactId>
+			<version>${springframework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-core</artifactId>
+			<version>${springframework.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-test</artifactId>
+			<version>${springframework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-tx</artifactId>
+			<version>${springframework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+			<version>${springframework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-webmvc</artifactId>
+			<version>${springframework.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.glassfish.jersey.core</groupId>
+			<artifactId>jersey-client</artifactId>
+			<version>2.23.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.glassfish.jersey.connectors</groupId>
+			<artifactId>jersey-jetty-connector</artifactId>
+			<version>2.23.1</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.jaxrs</groupId>
+			<artifactId>jackson-jaxrs-json-provider</artifactId>
+			<version>2.6.3</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.9.3</version>
+		</dependency>
+		<dependency>
+			<groupId>com.googlecode.json-simple</groupId>
+			<artifactId>json-simple</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.seleniumhq.selenium</groupId>
+			<artifactId>selenium-java</artifactId>
+			<version>2.53.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.seleniumhq.selenium</groupId>
+			<artifactId>selenium-api</artifactId>
+			<version>2.53.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.testng</groupId>
+			<artifactId>testng</artifactId>
+			<version>6.8</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.seleniumhq.selenium</groupId>
+			<artifactId>selenium-firefox-driver</artifactId>
+			<version>2.53.1</version>
+		</dependency>
+		<dependency>
+			<groupId>xml-apis</groupId>
+			<artifactId>xml-apis</artifactId>
+			<version>1.4.01</version>
+		</dependency>
+		<dependency>
+			<groupId>org.yaml</groupId>
+			<artifactId>snakeyaml</artifactId>
+			<version>1.16</version>
+		</dependency>
+	        <dependency>
+	            <groupId>org.skyscreamer</groupId>
+	            <artifactId>jsonassert</artifactId>
+	            <version>1.5.0</version>
+	        </dependency>
+	        <dependency>
+	            <groupId>org.onap.sdc.sdc-tosca</groupId>
+	            <artifactId>sdc-tosca</artifactId>
+            	    <version>1.4.1</version>
+            	    <scope>compile</scope>
+	        </dependency>
+	        <dependency>
+	            <groupId>net.javacrumbs.json-unit</groupId>
+	            <artifactId>json-unit</artifactId>
+	            <version>1.23.0</version>
+	            <scope>test</scope>
+	        </dependency>
+	        <dependency>
+	            <groupId>org.apache.commons</groupId>
+	            <artifactId>commons-text</artifactId>
+	            <version>1.1</version>
+	        </dependency>
+	        <dependency>
+	            <groupId>org.hamcrest</groupId>
+	            <artifactId>java-hamcrest</artifactId>
+	            <version>2.0.0.0</version>
+	            <scope>test</scope>
+	        </dependency>
+	        <dependency>
+	            <groupId>org.togglz</groupId>
+	            <artifactId>togglz-spring-core</artifactId>
+	            <version>2.5.0.Final</version>
+	        </dependency>
+			<dependency>
+				<groupId>org.assertj</groupId>
+				<artifactId>assertj-core</artifactId>
+				<version>3.10.0</version>
+				<scope>compile</scope>
+		 	</dependency>
+		</dependencies>
+</project>
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/RelatedTo.java b/onap-enabler-be/src/main/java/org/onap/osam/RelatedTo.java
new file mode 100644
index 0000000..21fb8b8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/RelatedTo.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam;
+
+import com.fasterxml.jackson.annotation.*;
+import java.util.HashMap;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+        "id",
+        "node-type",
+        "relationship-label",
+        "url"
+})
+public class RelatedTo {
+
+    @JsonProperty("id")
+    public String id;
+    @JsonProperty("node-type")
+    public String nodeType;
+    @JsonProperty("relationship-label")
+    public String relationshipLabel;
+    @JsonProperty("url")
+    public String url;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiClient.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiClient.java
new file mode 100644
index 0000000..e04301b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiClient.java
@@ -0,0 +1,652 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.utils.URIBuilder;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.onap.osam.aai.model.AaiGetAicZone.AicZones;
+import org.onap.osam.aai.model.AaiGetInstanceGroupsByCloudRegion;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.AaiGetNetworkCollectionDetails;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.AaiGetNetworkCollectionDetailsHelper;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.AaiGetRelatedInstanceGroupsByVnfId;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.InstanceGroup;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.Network;
+import org.onap.osam.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
+import org.onap.osam.aai.model.AaiGetPnfResponse;
+import org.onap.osam.aai.model.AaiGetPnfs.Pnf;
+import org.onap.osam.aai.model.AaiGetPortMirroringSourcePorts;
+import org.onap.osam.aai.model.AaiGetServicesRequestModel.GetServicesAAIRespone;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.aai.model.AaiNodeQueryResponse;
+import org.onap.osam.aai.model.GetServiceModelsByDistributionStatusResponse;
+import org.onap.osam.aai.model.LogicalLinkResponse;
+import org.onap.osam.aai.model.OwningEntityResponse;
+import org.onap.osam.aai.model.PortDetailsTranslator;
+import org.onap.osam.aai.model.ProjectResponse;
+import org.onap.osam.aai.model.Relationship;
+import org.onap.osam.aai.model.RelationshipData;
+import org.onap.osam.aai.model.RelationshipList;
+import org.onap.osam.aai.model.ResourceType;
+import org.onap.osam.aai.model.ServiceRelationships;
+import org.onap.osam.aai.util.AAIRestInterface;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.model.probes.ErrorMetadata;
+import org.onap.osam.model.probes.ExternalComponentStatus;
+import org.onap.osam.model.probes.HttpRequestMetadata;
+import org.onap.osam.utils.Logging;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.web.util.UriUtils;
+
+import javax.inject.Inject;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.UUID;
+
+import static java.util.Collections.emptyList;
+import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
+
+public class AaiClient implements AaiClientInterface {
+
+
+    public static final String QUERY_FORMAT_RESOURCE = "query?format=resource";
+    public static final String SERVICE_SUBSCRIPTIONS_PATH = "/service-subscriptions/service-subscription/";
+    public static final String MODEL_INVARIANT_ID = "&model-invariant-id=";
+    public static final String QUERY_FORMAT_SIMPLE = "query?format=simple";
+    public static final String BUSINESS_CUSTOMER = "/business/customers/customer/";
+    public static final String SERVICE_INSTANCE = "/service-instances/service-instance/";
+    public static final String BUSINESS_CUSTOMERS_CUSTOMER = "business/customers/customer/";
+
+    protected String fromAppId = "VidAaiController";
+
+    private PortDetailsTranslator portDetailsTranslator;
+
+    private final AAIRestInterface restController;
+
+    EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AaiClient.class);
+
+    /**
+     * The Constant dateFormat.
+     */
+    static final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+    static final String GET_SERVICE_MODELS_RESPONSE_BODY = "{\"start\" : \"service-design-and-creation/models/\", \"query\" : \"query/serviceModels-byDistributionStatus?distributionStatus=DISTRIBUTION_COMPLETE_OK\"}";
+
+    @Inject
+    public AaiClient(AAIRestInterface restController, PortDetailsTranslator portDetailsTranslator) {
+        this.restController = restController;
+        this.portDetailsTranslator = portDetailsTranslator;
+    }
+
+
+    private static String checkForNull(String local) {
+        if (local != null)
+            return local;
+        else
+            return "";
+
+    }
+
+    @Override
+    public AaiResponse getServicesByOwningEntityId(List<String> owningEntityIds){
+        Response resp = doAaiGet(getUrlFromLIst("business/owning-entities?", "owning-entity-id=", owningEntityIds), false);
+        return processAaiResponse(resp, OwningEntityResponse.class, null);
+    }
+
+    @Override
+    public AaiResponse getServicesByProjectNames(List<String> projectNames){
+        Response resp = doAaiGet(getUrlFromLIst("business/projects?", "project-name=",  projectNames), false);
+        return processAaiResponse(resp, ProjectResponse.class, null);
+    }
+
+    @Override
+    public AaiResponse getServiceModelsByDistributionStatus() {
+        Response resp = doAaiPut(QUERY_FORMAT_RESOURCE, GET_SERVICE_MODELS_RESPONSE_BODY, false);
+        return processAaiResponse(resp, GetServiceModelsByDistributionStatusResponse.class, null);
+    }
+
+    @Override
+    public AaiResponse getNetworkCollectionDetails(String serviceInstanceId) {
+        Response resp = doAaiPut(QUERY_FORMAT_RESOURCE, "{\"start\": [\"nodes/service-instances/service-instance/" + serviceInstanceId + "\"],\"query\": \"query/network-collection-ByServiceInstance\"}\n", false);
+        AaiResponse<AaiGetNetworkCollectionDetailsHelper> aaiResponse = processAaiResponse(resp, AaiGetNetworkCollectionDetailsHelper.class, null);
+        return getNetworkCollectionDetailsResponse(aaiResponse);
+    }
+
+    @Override
+    public AaiResponse getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction) {
+        Response resp = doAaiPut(QUERY_FORMAT_RESOURCE,
+                "{\"start\": [\"cloud-infrastructure/cloud-regions/cloud-region/" + cloudOwner + "/" + cloudRegionId + "\"]," +
+                        "\"query\": \"query/instance-group-byCloudRegion?type=L3-NETWORK&role=SUB-INTERFACE&function=" + networkFunction + "\"}\n", false);
+        return processAaiResponse(resp, AaiGetInstanceGroupsByCloudRegion.class, null);
+    }
+
+    private AaiResponse getNetworkCollectionDetailsResponse(AaiResponse<AaiGetNetworkCollectionDetailsHelper> aaiResponse){
+        if(aaiResponse.getHttpCode() == 200) {
+            com.fasterxml.jackson.databind.ObjectMapper om = new com.fasterxml.jackson.databind.ObjectMapper();
+            AaiGetNetworkCollectionDetails aaiGetNetworkCollectionDetails = new AaiGetNetworkCollectionDetails();
+            try {
+                for (int i = 0; i < aaiResponse.getT().getResults().size(); i++) {
+                    LinkedHashMap<String, Object> temp = ((LinkedHashMap) aaiResponse.getT().getResults().get(i));
+                    if (temp.get("service-instance") != null)
+                        aaiGetNetworkCollectionDetails.getResults().setServiceInstance(om.readValue(om.writeValueAsString(temp.get("service-instance")), org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.ServiceInstance.class));
+                    else if (temp.get("collection") != null)
+                        aaiGetNetworkCollectionDetails.getResults().setCollection(om.readValue(om.writeValueAsString(temp.get("collection")), org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.Collection.class));
+                    else if (temp.get("instance-group") != null)
+                        aaiGetNetworkCollectionDetails.getResults().setInstanceGroup(om.readValue(om.writeValueAsString(temp.get("instance-group")), InstanceGroup.class));
+                    else if (temp.get("l3-network") != null)
+                        aaiGetNetworkCollectionDetails.getResults().getNetworks().add(om.readValue(om.writeValueAsString(temp.get("l3-network")), Network.class));
+                }
+                return new AaiResponse(aaiGetNetworkCollectionDetails, null, HttpStatus.SC_OK);
+            }
+            catch (com.fasterxml.jackson.databind.JsonMappingException e) {
+                return new AaiResponse(e.getCause(), "AAI response parsing Error" , aaiResponse.getHttpCode());
+            }
+            catch (Exception e) {
+                return new AaiResponse(e.getCause(), "Got " + aaiResponse.getHttpCode() + " from a&ai" , aaiResponse.getHttpCode());
+            }
+        }
+        return aaiResponse;
+    }
+
+    @Override
+    public AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel) {
+        String siQuery = BUSINESS_CUSTOMER + globalCustomerId + SERVICE_SUBSCRIPTIONS_PATH + encodePathSegment(serviceType) + "/service-instances?model-version-id=" + modelVersionId + MODEL_INVARIANT_ID + modelInvariantId;
+        String pnfQuery = "query/pnf-fromModel-byRegion?cloudRegionId=" + encodePathSegment(cloudRegion) + "&equipVendor=" + encodePathSegment(equipVendor) + "&equipModel=" + encodePathSegment(equipModel);
+        String payload = "{\"start\":\"" + siQuery + "\",\"query\":\"" + pnfQuery + "\"}";
+        Response resp = doAaiPut(QUERY_FORMAT_SIMPLE, payload, false);
+        return processAaiResponse(resp, AaiGetPnfResponse.class, null);
+    }
+
+
+    @Override
+    public AaiResponse<Pnf> getSpecificPnf(String pnfId) {
+        Response resp = doAaiGet("network/pnfs/pnf/"+pnfId, false);
+        return processAaiResponse(resp, Pnf.class, null);
+    }
+
+
+    public AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId){
+        Response resp = doAaiGet("network/generic-vnfs/generic-vnf/" + vnfInstanceId + "?depth=0", false);
+        return processAaiResponse(resp, AaiGetRelatedInstanceGroupsByVnfId.class , null);
+    }
+
+
+    @Override
+    public List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationID) {
+        String payload = "{\"start\":\"/network/configurations/configuration/" + configurationID + "\",\"query\":\"query/pserver-fromConfiguration\"}";
+        Response resp = doAaiPut(QUERY_FORMAT_SIMPLE, payload, false);
+        resp.bufferEntity(); // avoid later "Entity input stream has already been closed" problems
+        String rawPayload = resp.readEntity(String.class);
+        AaiResponse<AaiGetPortMirroringSourcePorts> aaiResponse = processAaiResponse(resp, AaiGetPortMirroringSourcePorts.class, rawPayload);
+        return portDetailsTranslator.extractPortDetails(aaiResponse, rawPayload);
+    }
+
+
+
+    public AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId) {
+        String getServiceInstancePath = BUSINESS_CUSTOMERS_CUSTOMER + globalCustomerId+ SERVICE_SUBSCRIPTIONS_PATH +serviceType+ SERVICE_INSTANCE +serviceInstanceId;
+        Response resp = doAaiGet(getServiceInstancePath , false);
+        return processAaiResponse(resp, ServiceRelationships.class, null);
+    }
+
+    @Override
+    public AaiResponse getLogicalLink(String link) {
+        Response resp = doAaiGet("network/logical-links/logical-link/" + link , false);
+        return processAaiResponse(resp, LogicalLinkResponse.class, null);
+    }
+
+    @Override
+    public AaiResponse<AaiNodeQueryResponse> searchNodeTypeByName(String name, ResourceType type) {
+        String path = String.format(
+                "search/nodes-query?search-node-type=%s&filter=%s:EQUALS:%s",
+                type.getAaiFormat(),
+                type.getNameFilter(),
+                name
+        );
+        return typedAaiGet(path, AaiNodeQueryResponse.class);
+    }
+
+    private <T> AaiResponse<T> typedAaiGet(String path, Class<T> clz) {
+        Response resp = doAaiGet(path , false);
+        return processAaiResponse(resp, clz, null);
+    }
+
+
+
+    private String getUrlFromLIst(String url, String paramKey, List<String> params){
+        int i = 0;
+        for(String param: params){
+            i ++;
+            url = url.concat(paramKey);
+            String encodedParam= param;
+            try {
+                encodedParam= URLEncoder.encode(param, "UTF-8");
+            } catch (UnsupportedEncodingException e) {
+                String methodName = "getUrlFromList";
+                logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            }
+            url = url.concat(encodedParam);
+            if(i != params.size()){
+                url = url.concat("&");
+            }
+        }
+        return url;
+    }
+
+
+    @Override
+    public AaiResponse<SubscriberList> getAllSubscribers() {
+        return getAllSubscribers(false).getAaiResponse();
+    }
+
+    AaiResponseWithRequestInfo<SubscriberList> getAllSubscribers(boolean propagateExceptions){
+        String depth = "0";
+        ResponseWithRequestInfo aaiGetResult = doAaiGet("business/customers?subscriber-type=INFRA&depth=" + depth, false, propagateExceptions);
+        AaiResponseWithRequestInfo<SubscriberList> responseWithRequestInfo = processAaiResponse(aaiGetResult, SubscriberList.class, propagateExceptions);
+        responseWithRequestInfo.setRequestedUrl(aaiGetResult.getRequestUrl());
+        responseWithRequestInfo.setHttpMethod(aaiGetResult.getRequestHttpMethod());
+        return responseWithRequestInfo;
+    }
+
+
+    @Override
+    public AaiResponse getAllAicZones() {
+        Response resp = doAaiGet("network/zones", false);
+        return processAaiResponse(resp, AicZones.class, null);
+    }
+
+
+    @Override
+    public AaiResponse<String> getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId) {
+        String aicZonePath = BUSINESS_CUSTOMERS_CUSTOMER + globalCustomerId + SERVICE_SUBSCRIPTIONS_PATH + serviceType + SERVICE_INSTANCE + serviceId;
+        Response resp = doAaiGet(aicZonePath , false);
+        AaiResponse<ServiceRelationships> aaiResponse = processAaiResponse(resp , ServiceRelationships.class , null);
+        ServiceRelationships serviceRelationships = aaiResponse.getT();
+        RelationshipList relationshipList = serviceRelationships.getRelationshipList();
+        Relationship relationship = relationshipList.getRelationship().get(0);
+        RelationshipData relationshipData=  relationship.getRelationDataList().get(0);
+        String aicZone = relationshipData.getRelationshipValue();
+        return new AaiResponse(aicZone , null ,HttpStatus.SC_OK);
+    }
+
+
+    @Override
+    public AaiResponse getVNFData() {
+        String payload = "{\"start\": [\"/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances/service-instance/3f93c7cb-2fd0-4557-9514-e189b7b04f9d\"],	\"query\": \"query/vnf-topology-fromServiceInstance\"}";
+        Response resp = doAaiPut(QUERY_FORMAT_SIMPLE, payload, false);
+        return processAaiResponse(resp, AaiGetVnfResponse.class, null);
+    }
+
+    @Override
+    public Response getVNFData(String globalSubscriberId, String serviceType) {
+        String payload = "{\"start\": [\"business/customers/customer/" + globalSubscriberId + SERVICE_SUBSCRIPTIONS_PATH + encodePathSegment(serviceType) +"/service-instances\"]," +
+                "\"query\": \"query/vnf-topology-fromServiceInstance\"}";
+        return doAaiPut(QUERY_FORMAT_SIMPLE, payload, false);
+    }
+
+    @Override
+    public AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId) {
+        String payload = "{\"start\": [\"/business/customers/customer/" + globalSubscriberId + SERVICE_SUBSCRIPTIONS_PATH + encodePathSegment(serviceType) + SERVICE_INSTANCE + serviceInstanceId + "\"],	\"query\": \"query/vnf-topology-fromServiceInstance\"}";
+        Response resp = doAaiPut(QUERY_FORMAT_SIMPLE, payload, false);
+        return processAaiResponse(resp, AaiGetVnfResponse.class, null);
+    }
+
+    @Override
+    public Response getVersionByInvariantId(List<String> modelInvariantId) {
+        StringBuilder sb = new StringBuilder();
+        for (String id : modelInvariantId){
+            sb.append(MODEL_INVARIANT_ID);
+            sb.append(id);
+
+        }
+        return doAaiGet("service-design-and-creation/models?depth=2"+ sb.toString(), false);
+    }
+
+    @Override
+    public AaiResponse getSubscriberData(String subscriberId) {
+        String depth = "2";
+        AaiResponse subscriberDataResponse;
+        Response resp = doAaiGet(BUSINESS_CUSTOMERS_CUSTOMER + subscriberId + "?depth=" + depth, false);
+        subscriberDataResponse = processAaiResponse(resp, Services.class, null);
+        return subscriberDataResponse;
+    }
+
+    @Override
+    public AaiResponse getServices() {
+        Response resp = doAaiGet("service-design-and-creation/services", false);
+        return processAaiResponse(resp, GetServicesAAIRespone.class, null);
+    }
+
+    @Override
+    public AaiResponse getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus) {
+        String url = "cloud-infrastructure/operational-environments";
+        URIBuilder urlBuilder  = new URIBuilder();
+        if (operationalEnvironmentType != null)
+            urlBuilder.addParameter("operational-environment-type", operationalEnvironmentType);
+        if (operationalEnvironmentStatus != null)
+            urlBuilder.addParameter("operational-environment-status", operationalEnvironmentStatus);
+        url += urlBuilder.toString();
+        Response resp = doAaiGet(url, false);
+        return processAaiResponse(resp, OperationalEnvironmentList.class, null);
+    }
+
+    @Override
+    public AaiResponse getTenants(String globalCustomerId, String serviceType) {
+        AaiResponse aaiResponse;
+
+        if ((globalCustomerId == null || globalCustomerId.isEmpty()) || ((serviceType == null) || (serviceType.isEmpty())) ){
+            aaiResponse = new AaiResponse<>(null, "{\"statusText\":\" Failed to retrieve LCP Region & Tenants from A&AI, Subscriber ID or Service Type is missing.\"}", HttpStatus.SC_INTERNAL_SERVER_ERROR);
+            return  aaiResponse;
+        }
+
+        String url = BUSINESS_CUSTOMERS_CUSTOMER + globalCustomerId + SERVICE_SUBSCRIPTIONS_PATH + serviceType;
+
+        Response resp = doAaiGet(url, false);
+        String responseAsString = parseForTenantsByServiceSubscription(resp.readEntity(String.class));
+        if (responseAsString.equals("")){
+            return new AaiResponse<>(null, String.format("{\"statusText\":\" A&AI has no LCP Region & Tenants associated to subscriber '%s' and service type '%s'\"}", globalCustomerId, serviceType), HttpStatus.SC_INTERNAL_SERVER_ERROR);
+        }
+        else {
+            return processAaiResponse(resp, GetTenantsResponse[].class, responseAsString);
+        }
+    }
+
+    @Override
+    public AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion) {
+
+        String siQuery = BUSINESS_CUSTOMER + globalCustomerId + SERVICE_SUBSCRIPTIONS_PATH + encodePathSegment(serviceType) + "/service-instances?model-version-id=" + modelVersionId + MODEL_INVARIANT_ID + modelInvariantId;
+        String vnfQuery = "query/queryvnfFromModelbyRegion?cloudRegionId=" + encodePathSegment(cloudRegion);
+        String payload1 = "{\"start\":\"" + siQuery + "\",\"query\":\"" + vnfQuery + "\"}";
+
+        Response resp1 = doAaiPut(QUERY_FORMAT_SIMPLE, payload1, false);
+        AaiResponse aaiResponse1 = processAaiResponse(resp1, AaiGetVnfResponse.class, null);
+        logger.debug(EELFLoggerDelegate.debugLogger, "getNodeTemplateInstances AAI's response: {}", aaiResponse1);
+        return aaiResponse1;
+    }
+
+    private <T> AaiResponseWithRequestInfo<T> processAaiResponse(ResponseWithRequestInfo responseWithRequestInfo, Class<? extends T> classType, boolean propagateExceptions) {
+        String responseBody = null;
+        Integer responseHttpCode = null;
+        try {
+            Response response = responseWithRequestInfo.getResponse();
+            responseHttpCode = (response != null) ? response.getStatus() : null;
+            responseBody = (response != null) ? response.readEntity(String.class) : null;
+            AaiResponse<T> processedAaiResponse = processAaiResponse(response, classType, responseBody, propagateExceptions);
+            return new AaiResponseWithRequestInfo<>(responseWithRequestInfo.getRequestHttpMethod(), responseWithRequestInfo.getRequestUrl(), processedAaiResponse,
+                    responseBody);
+        } catch (Exception e) {
+            throw new ExceptionWithRequestInfo(responseWithRequestInfo.getRequestHttpMethod(),
+                    responseWithRequestInfo.getRequestUrl(), responseBody, responseHttpCode, e);
+        }
+    }
+
+    private AaiResponse processAaiResponse(Response resp, Class classType, String responseBody) {
+        return processAaiResponse(resp, classType, responseBody, false);
+    }
+
+    private AaiResponse processAaiResponse(Response resp, Class classType, String responseBody, boolean propagateExceptions) {
+        AaiResponse subscriberDataResponse;
+        if (resp == null) {
+            subscriberDataResponse = new AaiResponse<>(null, null, HttpStatus.SC_INTERNAL_SERVER_ERROR);
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Invalid response from AAI");
+        } else {
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscribers() resp=" + resp.getStatusInfo().toString());
+            if (resp.getStatus() != HttpStatus.SC_OK) {
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "Invalid response from AAI");
+                String rawData = resp.readEntity(String.class);
+                subscriberDataResponse = new AaiResponse<>(null, rawData, resp.getStatus());
+            } else {
+                subscriberDataResponse = processOkResponse(resp, classType, responseBody, propagateExceptions);
+            }
+        }
+        return subscriberDataResponse;
+    }
+
+    private AaiResponse processOkResponse(Response resp, Class classType, String responseBody, boolean propagateExceptions) {
+        AaiResponse subscriberDataResponse;
+        String finalResponse = null;
+        try {
+            if (responseBody != null) {
+                finalResponse = responseBody;
+            } else {
+                finalResponse = resp.readEntity(String.class);
+            }
+
+        subscriberDataResponse = parseFasterXmlObject(classType, finalResponse);
+
+        } catch(Exception e){
+            if (propagateExceptions) {
+                throw new GenericUncheckedException(e);
+            } else {
+                subscriberDataResponse = new AaiResponse<>(null, null, HttpStatus.SC_INTERNAL_SERVER_ERROR);
+                logger.error("Failed to parse aai response: \"{}\" to class {}", finalResponse, classType, e);
+            }
+        }
+        return subscriberDataResponse;
+    }
+
+    private AaiResponse parseFasterXmlObject(Class classType, String finalResponse) throws IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        return new AaiResponse<>((objectMapper.readValue(finalResponse, classType)), null, HttpStatus.SC_OK);
+    }
+
+    public Response doAaiGet(String uri, boolean xml) {
+        return doAaiGet(uri, xml, false).getResponse();
+    }
+
+
+    public ResponseWithRequestInfo doAaiGet(String uri, boolean xml, boolean propagateExceptions) {
+        String methodName = "doAaiGet";
+        String transId = UUID.randomUUID().toString();
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        ResponseWithRequestInfo resp;
+        try {
+            resp = restController.RestGet(fromAppId, transId, uri, xml, propagateExceptions);
+
+        } catch (Exception e) {
+            if (propagateExceptions) {
+                throw (e instanceof RuntimeException) ? (RuntimeException)e : new GenericUncheckedException(e);
+            } else {
+                final Exception actual =
+                        e instanceof ExceptionWithRequestInfo ? (Exception) e.getCause() : e;
+
+                final String message =
+                        actual instanceof WebApplicationException ? ((WebApplicationException) actual).getResponse().readEntity(String.class) : e.toString();
+
+                //ToDo: change parameter of requestUrl to real url from RestGet function
+                resp = new ResponseWithRequestInfo(null, null, org.springframework.http.HttpMethod.GET);
+                logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message);
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message);
+            }
+        }
+        return resp;
+    }
+
+    private String parseForTenantsByServiceSubscription(String resp) {
+        String tenantList = "";
+
+        try {
+            JSONParser jsonParser = new JSONParser();
+
+            JSONObject jsonObject = (JSONObject) jsonParser.parse(resp);
+
+            return parseServiceSubscriptionObjectForTenants(jsonObject);
+        } catch (Exception ex) {
+            logger.debug(EELFLoggerDelegate.debugLogger, "parseForTenantsByServiceSubscription error while parsing tenants by service subscription", ex);
+        }
+        return tenantList;
+    }
+
+    protected Response doAaiPut(String uri, String payload, boolean xml) {
+        String methodName = "doAaiPut";
+        String transId = UUID.randomUUID().toString();
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        Response resp = null;
+        try {
+
+            resp = restController.RestPut(fromAppId, uri, payload, xml);
+
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+        }
+        return resp;
+    }
+
+
+    private String parseServiceSubscriptionObjectForTenants(JSONObject jsonObject) {
+        JSONArray tenantArray = new JSONArray();
+        boolean bconvert = false;
+        try {
+            JSONObject relationShipListsObj = (JSONObject) jsonObject.get("relationship-list");
+            if (relationShipListsObj != null) {
+                JSONArray rShipArray = (JSONArray) relationShipListsObj.get("relationship");
+                for (Object innerObj : defaultIfNull(rShipArray, emptyList())) {
+                    if (innerObj != null) {
+                        bconvert = parseTenant(tenantArray, bconvert, (JSONObject) innerObj);
+                    }
+                }
+            }
+        } catch (NullPointerException ex) {
+            logger.debug(EELFLoggerDelegate.debugLogger, "parseServiceSubscriptionObjectForTenants. error while parsing service subscription object for tenants", ex);
+        }
+
+        if (bconvert)
+            return tenantArray.toJSONString();
+        else
+            return "";
+
+    }
+
+    private static boolean parseTenant(JSONArray tenantArray, boolean bconvert, JSONObject inner1Obj) {
+        String relatedTo = checkForNull((String) inner1Obj.get("related-to"));
+        if (relatedTo.equalsIgnoreCase("tenant")) {
+            JSONObject tenantNewObj = new JSONObject();
+
+            String relatedLink = checkForNull((String) inner1Obj.get("related-link"));
+            tenantNewObj.put("link", relatedLink);
+
+            JSONArray rDataArray = (JSONArray) inner1Obj.get("relationship-data");
+            for (Object innerObj : defaultIfNull(rDataArray, emptyList())) {
+                parseRelationShip(tenantNewObj, (JSONObject) innerObj);
+            }
+
+            JSONArray relatedTPropArray = (JSONArray) inner1Obj.get("related-to-property");
+            for (Object innerObj : defaultIfNull(relatedTPropArray, emptyList())) {
+                parseRelatedTProp(tenantNewObj, (JSONObject) innerObj);
+            }
+            bconvert = true;
+            tenantArray.add(tenantNewObj);
+        }
+        return bconvert;
+    }
+
+    private static void parseRelatedTProp(JSONObject tenantNewObj, JSONObject innerObj) {
+        if (innerObj == null)
+            return;
+
+        String propKey = checkForNull((String) innerObj.get("property-key"));
+        String propVal = checkForNull((String) innerObj.get("property-value"));
+        if (propKey.equalsIgnoreCase("tenant.tenant-name")) {
+            tenantNewObj.put("tenantName", propVal);
+        }
+    }
+
+    private static void parseRelationShip(JSONObject tenantNewObj, JSONObject inner2Obj) {
+        if (inner2Obj == null)
+            return;
+
+        String rShipKey = checkForNull((String) inner2Obj.get("relationship-key"));
+        String rShipVal = checkForNull((String) inner2Obj.get("relationship-value"));
+        if (rShipKey.equalsIgnoreCase("cloud-region.cloud-owner")) {
+            tenantNewObj.put("cloudOwner", rShipVal);
+        } else if (rShipKey.equalsIgnoreCase("cloud-region.cloud-region-id")) {
+            tenantNewObj.put("cloudRegionID", rShipVal);
+        }
+
+        if (rShipKey.equalsIgnoreCase("tenant.tenant-id")) {
+            tenantNewObj.put("tenantID", rShipVal);
+        }
+    }
+
+    private static String encodePathSegment(String segmentToEncode) {
+        try {
+            return UriUtils.encodePathSegment(segmentToEncode, "UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            throw new GenericUncheckedException("URI encoding failed unexpectedly", e);
+        }
+    }
+
+    @Override
+    public ExternalComponentStatus probeAaiGetAllSubscribers(){
+        long startTime = System.currentTimeMillis();
+        try {
+            AaiResponseWithRequestInfo<SubscriberList> responseWithRequestInfo = getAllSubscribers(true);
+            AaiResponse<SubscriberList> aaiResponse = responseWithRequestInfo.getAaiResponse();
+            long duration = System.currentTimeMillis() - startTime;
+
+            SubscriberList subscribersList = (aaiResponse != null) ? aaiResponse.getT() : null;
+            boolean isAvailable = subscribersList != null && subscribersList.customer != null && !subscribersList.customer.isEmpty();
+
+            HttpRequestMetadata metadata = new HttpRequestMetadata(
+                    responseWithRequestInfo.getHttpMethod(),
+                    (aaiResponse != null) ? aaiResponse.getHttpCode() : 0,
+                    responseWithRequestInfo.getRequestedUrl(),
+                    StringUtils.substring(responseWithRequestInfo.getRawData(), 0, 500),
+                    isAvailable ? "OK" : "No subscriber received",
+                    duration
+            );
+            return new ExternalComponentStatus(ExternalComponentStatus.Component.AAI, isAvailable, metadata);
+
+        } catch (ExceptionWithRequestInfo e) {
+            long duration = System.currentTimeMillis() - startTime;
+            return new ExternalComponentStatus(ExternalComponentStatus.Component.AAI, false,
+                    new HttpRequestMetadata(
+                            e.getHttpMethod(),
+                            defaultIfNull(e.getHttpCode(), 0),
+                            e.getRequestedUrl(),
+                            e.getRawData(),
+                            Logging.exceptionToDescription(e.getCause()), duration));
+        } catch (Exception e) {
+            long duration = System.currentTimeMillis() - startTime;
+            return new ExternalComponentStatus(ExternalComponentStatus.Component.AAI, false,
+                    new ErrorMetadata(Logging.exceptionToDescription(e), duration));
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiClientInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiClientInterface.java
new file mode 100644
index 0000000..d39dbb1
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiClientInterface.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.onap.osam.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
+import org.onap.osam.aai.model.AaiGetPnfs.Pnf;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.aai.model.AaiNodeQueryResponse;
+import org.onap.osam.aai.model.PortDetailsTranslator;
+import org.onap.osam.aai.model.ResourceType;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.model.probes.ExternalComponentStatus;
+
+import javax.ws.rs.core.Response;
+import java.util.List;
+
+public interface AaiClientInterface {
+
+    AaiResponse<AaiNodeQueryResponse> searchNodeTypeByName(String name, ResourceType type);
+
+    AaiResponse<SubscriberList> getAllSubscribers();
+
+    AaiResponse getSubscriberData(String subscriberId);
+
+    AaiResponse getServices();
+
+    AaiResponse getServicesByOwningEntityId(List<String> owningEntityIds);
+
+    AaiResponse<GetTenantsResponse[]> getTenants(String globalCustomerId, String serviceType);
+
+    AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus);
+
+    AaiResponse getAllAicZones();
+
+    AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId);
+
+	AaiResponse getVNFData();
+
+    AaiResponse getNetworkCollectionDetails(String serviceInstanceId);
+
+    AaiResponse getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction);
+
+    Response getVNFData(String globalSubscriberId, String serviceType);
+
+    AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId);
+
+    AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion);
+
+    Response getVersionByInvariantId(List<String> modelInvariantId);
+
+    AaiResponse getServicesByProjectNames(List<String> projectNames);
+
+    AaiResponse getServiceModelsByDistributionStatus();
+	
+    AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel);
+
+    AaiResponse<Pnf> getSpecificPnf(String pnfId);
+
+    AaiResponse getServiceInstance(String globalCustomerId, String serviceType, String serviceInstanceId);
+
+    AaiResponse getLogicalLink(String link);
+
+    List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationID);
+
+    AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId);
+
+    ExternalComponentStatus probeAaiGetAllSubscribers();
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiGetVnfResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiGetVnfResponse.java
new file mode 100644
index 0000000..74bad6a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiGetVnfResponse.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.google.common.base.MoreObjects;
+import org.onap.osam.aai.model.VnfResult;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+        "results"
+})
+public class AaiGetVnfResponse {
+    @JsonProperty("results")
+    public List<VnfResult> results = null;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("results", results)
+                .add("additionalProperties", additionalProperties)
+                .toString();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiResponse.java
new file mode 100644
index 0000000..50ded45
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiResponse.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.google.common.base.MoreObjects;
+import org.onap.osam.model.ProxyResponse;
+
+public class AaiResponse<T> extends ProxyResponse{
+
+    T t;
+
+    public AaiResponse() {
+    }
+
+    public AaiResponse(T t, String errorMessage, int aaiHttpCode) {
+        this.t = t;
+        this.errorMessage = errorMessage;
+        this.httpCode = aaiHttpCode;
+    }
+
+    public T getT() {
+        return t;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("httpCode", httpCode)
+                .add("errorMessage", errorMessage)
+                .add("t", t)
+                .toString();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiResponseWithRequestInfo.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiResponseWithRequestInfo.java
new file mode 100644
index 0000000..73ed78c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/AaiResponseWithRequestInfo.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+
+import org.springframework.http.HttpMethod;
+
+import java.io.Serializable;
+
+public class AaiResponseWithRequestInfo<T> implements Serializable {
+    private AaiResponse<T> aaiResponse;
+    private String requestedUrl;
+    private String rawData;
+    private HttpMethod httpMethod;
+
+    public AaiResponseWithRequestInfo(HttpMethod httpMethod, String requestedUrl, AaiResponse<T> aaiResponse, String rawData) {
+        this.aaiResponse = aaiResponse;
+        this.requestedUrl = requestedUrl;
+        this.rawData = rawData;
+        this.httpMethod = httpMethod;
+    }
+
+    public void setRequestedUrl(String requestedUrl) {
+        this.requestedUrl = requestedUrl;
+    }
+
+    public void setHttpMethod(HttpMethod httpMethod) {
+        this.httpMethod = httpMethod;
+    }
+
+    public AaiResponse<T> getAaiResponse() {
+        return aaiResponse;
+    }
+
+    public String getRequestedUrl() {
+        return requestedUrl;
+    }
+
+    public String getRawData() {
+        return rawData;
+    }
+
+    public HttpMethod getHttpMethod() {
+        return httpMethod;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/ExceptionWithRequestInfo.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/ExceptionWithRequestInfo.java
new file mode 100644
index 0000000..8b1ff6f
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/ExceptionWithRequestInfo.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.http.HttpMethod;
+
+import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
+
+public class ExceptionWithRequestInfo extends RuntimeException {
+
+    private final HttpMethod httpMethod;
+    private final String requestedUrl;
+    private final Integer httpCode;
+    private final String rawData;
+
+    public ExceptionWithRequestInfo(HttpMethod httpMethod, String requestedUrl, String rawData, Integer httpCode, Throwable cause) {
+        super(toMessage(httpMethod, requestedUrl, cause), cause);
+        this.httpMethod = httpMethod;
+        this.requestedUrl = requestedUrl;
+        this.rawData = rawData;
+        this.httpCode = httpCode;
+    }
+
+    public ExceptionWithRequestInfo(HttpMethod httpMethod, String requestedUrl, Throwable cause) {
+        this(httpMethod, requestedUrl, null, null, cause);
+    }
+
+    public String getRequestedUrl() {
+        return requestedUrl;
+    }
+
+    public String getRawData() {
+        return rawData;
+    }
+
+    public HttpMethod getHttpMethod() {
+        return httpMethod;
+    }
+
+    public Integer getHttpCode() {
+        return httpCode;
+    }
+
+    private static String toMessage(HttpMethod httpMethod, String requestedUrl, Throwable cause) {
+        if (StringUtils.isEmpty(requestedUrl)) {
+            return cause.toString();
+        } else {
+            return "" +
+                    "Exception while handling " +
+                    defaultIfNull(httpMethod, "request").toString() +
+                    " " + requestedUrl +
+                    ": " + cause.toString();
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/OperationalEnvironment.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/OperationalEnvironment.java
new file mode 100644
index 0000000..a96df31
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/OperationalEnvironment.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.aai.model.RelationshipList;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class OperationalEnvironment {
+
+    private String operationalEnvironmentId;
+    private String operationalEnvironmentName;
+    private String operationalEnvironmentType;
+    private String operationalEnvironmentStatus;
+    private String tenantContext;
+    private String workloadContext;
+    private String resourceVersion;
+    private RelationshipList relationshipList;
+
+    public OperationalEnvironment() {
+    }
+
+    public OperationalEnvironment(String operationalEnvironmentId, String operationalEnvironmentName, String operationalEnvironmentType, String operationalEnvironmentStatus, String tenantContext, String workloadContext, String resourceVersion, RelationshipList relationshipList) {
+        this.operationalEnvironmentId = operationalEnvironmentId;
+        this.operationalEnvironmentName = operationalEnvironmentName;
+        this.operationalEnvironmentType = operationalEnvironmentType;
+        this.operationalEnvironmentStatus = operationalEnvironmentStatus;
+        this.tenantContext = tenantContext;
+        this.workloadContext = workloadContext;
+        this.resourceVersion = resourceVersion;
+        this.relationshipList = relationshipList;
+    }
+
+    @JsonProperty("operational-environment-id")
+    public String getOperationalEnvironmentId() {
+        return operationalEnvironmentId;
+    }
+
+    public void setOperationalEnvironmentId(String operationalEnvironmentId) {
+        this.operationalEnvironmentId = operationalEnvironmentId;
+    }
+
+    @JsonProperty("operational-environment-name")
+    public String getOperationalEnvironmentName() {
+        return operationalEnvironmentName;
+    }
+
+    public void setOperationalEnvironmentName(String operationalEnvironmentName) {
+        this.operationalEnvironmentName = operationalEnvironmentName;
+    }
+
+    @JsonProperty("operational-environment-type")
+    public String getOperationalEnvironmentType() {
+        return operationalEnvironmentType;
+    }
+
+    public void setOperationalEnvironmentType(String operationalEnvironmentType) {
+        this.operationalEnvironmentType = operationalEnvironmentType;
+    }
+
+    @JsonProperty("operational-environment-status")
+    public String getOperationalEnvironmentStatus() {
+        return operationalEnvironmentStatus;
+    }
+
+    public void setOperationalEnvironmentStatus(String operationalEnvironmentStatus) {
+        this.operationalEnvironmentStatus = operationalEnvironmentStatus;
+    }
+
+    @JsonProperty("tenant-context")
+    public String getTenantContext() {
+        return tenantContext;
+    }
+
+    public void setTenantContext(String tenantContext) {
+        this.tenantContext = tenantContext;
+    }
+
+    @JsonProperty("workload-context")
+    public String getWorkloadContext() {
+        return workloadContext;
+    }
+
+    public void setWorkloadContext(String workloadContext) {
+        this.workloadContext = workloadContext;
+    }
+
+    @JsonProperty("resource-version")
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    @JsonProperty("relationship-list")
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaClientImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaClientImpl.java
new file mode 100644
index 0000000..0c51e17
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaClientImpl.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.osam.model.PombaInstance.PombaRequest;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.core.Response;
+import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class PombaClientImpl implements PombaClientInterface {
+
+    final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+    protected String fromAppId = "VidAaiController";
+    EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AaiClient.class);
+
+    @Autowired
+    ServletContext servletContext;
+
+    @Autowired
+    PombaRestInterface pombaRestInterface;
+
+
+    @Override
+    public void verify(PombaRequest request) {
+        String methodName = "doAaiPost";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+        String uri = SystemProperties.getProperty("pomba.server.url");
+
+
+        try {
+            Response response = pombaRestInterface.RestPost(fromAppId, uri, new ObjectMapper().writeValueAsString(request));
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+        }
+    }
+
+
+    private File getCertificatesFile() {
+        if (servletContext != null)
+            return new File(servletContext.getRealPath("/WEB-INF/cert/"));
+        return null;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaClientInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaClientInterface.java
new file mode 100644
index 0000000..c5f5fbb
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaClientInterface.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.onap.osam.model.PombaInstance.PombaRequest;
+
+public interface PombaClientInterface {
+    void verify(PombaRequest request);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaRestInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaRestInterface.java
new file mode 100644
index 0000000..c5dd171
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/PombaRestInterface.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.osam.aai.util.*;
+import org.onap.osam.utils.Logging;
+import org.springframework.http.HttpMethod;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.UUID;
+
+import static org.onap.osam.utils.Logging.REQUEST_ID_HEADER_KEY;
+
+public class PombaRestInterface extends AAIRestInterface {
+
+    public PombaRestInterface (HttpsAuthClient httpsAuthClientFactory, ServletRequestHelper servletRequestHelper, SystemPropertyHelper systemPropertyHelper) {
+        super(httpsAuthClientFactory, servletRequestHelper, systemPropertyHelper);
+    }
+
+    private Client client = null;
+
+    private void initRestClient()
+    {
+        if (client == null) {
+            try {
+                client = httpsAuthClientFactory.getClient(HttpClientMode.UNSECURE);
+            }
+            catch (Exception e) {
+                logger.info(EELFLoggerDelegate.errorLogger, "Exception in REST call to DB in initRestClient" + e.toString());
+                logger.debug(EELFLoggerDelegate.debugLogger, "Exception in REST call to DB : " + e.toString());
+            }
+        }
+    }
+
+
+    public Response RestPost(String fromAppId, String url, String payload) {
+        String methodName = "RestPost";
+        String transId = UUID.randomUUID().toString();
+        try {
+            initRestClient();
+
+            Logging.logRequest(outgoingRequestsLogger, HttpMethod.POST, url, payload);
+            final Response cres = client.target(url)
+                    .request()
+                    .accept(MediaType.APPLICATION_JSON)
+                    .header(TRANSACTION_ID_HEADER, transId)
+                    .header(FROM_APP_ID_HEADER,  fromAppId)
+                    .header(REQUEST_ID_HEADER_KEY, extractOrGenerateRequestId())
+                    .post(Entity.entity(payload, MediaType.APPLICATION_JSON));
+            Logging.logResponse(outgoingRequestsLogger, HttpMethod.POST, url, cres);
+
+            if (cres.getStatusInfo().getFamily().equals(Response.Status.Family.SUCCESSFUL)) {
+                logger.info(EELFLoggerDelegate.errorLogger, getValidResponseLogMessage(methodName));
+                logger.debug(EELFLoggerDelegate.debugLogger, getValidResponseLogMessage(methodName));
+            } else {
+                logger.debug(EELFLoggerDelegate.debugLogger, getInvalidResponseLogMessage(url, methodName, cres));
+            }
+        } catch (Exception e) {
+            logger.debug(EELFLoggerDelegate.debugLogger, getFailedResponseLogMessage(url, methodName, e));
+        }
+        return null;
+    }
+
+}
+
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/ResponseWithRequestInfo.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/ResponseWithRequestInfo.java
new file mode 100644
index 0000000..27804a3
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/ResponseWithRequestInfo.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.springframework.http.HttpMethod;
+
+import javax.ws.rs.core.Response;
+
+public class ResponseWithRequestInfo {
+    private String requestUrl;
+    private HttpMethod requestHttpMethod;
+    private Response response;
+
+    public ResponseWithRequestInfo(Response response, String requestUrl, HttpMethod requestHttpMethod) {
+        this.response = response;
+        this.requestUrl = requestUrl;
+        this.requestHttpMethod = requestHttpMethod;
+    }
+
+    public String getRequestUrl() {
+        return requestUrl;
+    }
+
+    public HttpMethod getRequestHttpMethod() {
+        return requestHttpMethod;
+    }
+
+    public Response getResponse() {
+        return response;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstance.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstance.java
new file mode 100644
index 0000000..0610969
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstance.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ServiceInstance {
+	
+	@JsonProperty("service-instance-id")
+	public String serviceInstanceId;
+
+	@JsonProperty("service-instance-name")
+	public String serviceInstanceName;
+	
+	@JsonProperty("persona-model-id")
+	public String personaModelId;
+	
+	@JsonProperty("persona-model-version")
+	public String personaModelVersion;
+	
+	@JsonProperty("resource-version")
+	public String resourceVersion;
+	
+	@JsonProperty("orchestration-status")
+	public String orchestrationStatus;
+
+	@JsonProperty("model-invariant-id")
+	public String modelInvariantId;
+
+	@JsonProperty("model-version-id")
+	public String modelVersionId;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstances.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstances.java
new file mode 100644
index 0000000..1e51e4b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstances.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ServiceInstances {
+	
+	@JsonProperty("service-instance")
+	public List<ServiceInstance> serviceInstance;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstancesSearchResults.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstancesSearchResults.java
new file mode 100644
index 0000000..6fd8859
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceInstancesSearchResults.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.model.ServiceInstanceSearchResult;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ServiceInstancesSearchResults {
+    @JsonProperty("service-instances")
+    public List<ServiceInstanceSearchResult> serviceInstances;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceSubscription.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceSubscription.java
new file mode 100644
index 0000000..6234b99
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceSubscription.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ServiceSubscription {
+	
+    @JsonProperty("service-type")
+    public String serviceType;
+
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+
+    @JsonProperty("service-instances")
+    public ServiceInstances serviceInstances;
+
+    @JsonProperty("is-permitted")
+    public boolean isPermitted =false;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceSubscriptions.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceSubscriptions.java
new file mode 100644
index 0000000..ed20dc0
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/ServiceSubscriptions.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+public class ServiceSubscriptions {
+
+    @JsonProperty("service-subscription")
+    public List<ServiceSubscription> serviceSubscription;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/Services.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/Services.java
new file mode 100644
index 0000000..eb268ab
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/Services.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Services {
+    @JsonProperty("global-customer-id")
+    public String globalCustomerId;
+
+    @JsonProperty("subscriber-name")
+    public String subscriberName;
+
+    @JsonProperty("subscriber-type")
+    public String subscriberType;
+
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+    
+    @JsonProperty("service-subscriptions")
+    public ServiceSubscriptions serviceSubscriptions;
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberAaiResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberAaiResponse.java
new file mode 100644
index 0000000..5c0104b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberAaiResponse.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.onap.osam.model.ProxyResponse;
+import org.onap.osam.model.SubscriberList;
+
+public class SubscriberAaiResponse extends ProxyResponse {
+
+
+    private SubscriberList subscriberList;
+
+    public SubscriberAaiResponse(SubscriberList subscriberList, String errorMessage, int aaiHttpCode) {
+        this.subscriberList = subscriberList;
+        this.errorMessage = errorMessage;
+        this.httpCode = aaiHttpCode;
+    }
+
+
+    public SubscriberList getSubscriberList() {
+        return subscriberList;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberData.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberData.java
new file mode 100644
index 0000000..cb3132b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberData.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+public class SubscriberData {
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberFilteredResults.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberFilteredResults.java
new file mode 100644
index 0000000..20f1201
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberFilteredResults.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.onap.osam.model.ProxyResponse;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.roles.RoleValidator;
+
+
+public class SubscriberFilteredResults extends ProxyResponse {
+
+    private SubscriberListWithFilterData subscriberList;
+
+    public SubscriberFilteredResults(RoleValidator roleValidator,SubscriberList subscribers, String errorMessage, int aaiHttpCode) {
+        this.subscriberList = new SubscriberListWithFilterData(subscribers,roleValidator);
+        this.errorMessage = errorMessage;
+        this.httpCode = aaiHttpCode;
+    }
+
+
+    public SubscriberListWithFilterData getSubscriberList() {
+        return subscriberList;
+    }
+
+    public void setSubscriberList(SubscriberListWithFilterData subscriberList) {
+        this.subscriberList = subscriberList;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberListWithFilterData.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberListWithFilterData.java
new file mode 100644
index 0000000..3784256
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberListWithFilterData.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.onap.osam.model.Subscriber;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.roles.RoleValidator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SubscriberListWithFilterData {
+
+    public SubscriberListWithFilterData(SubscriberList subscriberList, RoleValidator roleValidator){
+        List<Subscriber> subscribers = subscriberList != null ? subscriberList.customer : new ArrayList<>();
+        List<SubscriberWithFilter> subscribersWithFilter = new ArrayList<>();
+        for (Subscriber subscriber :subscribers){
+            SubscriberWithFilter subscriberWithFilter = new SubscriberWithFilter();
+            subscriberWithFilter.setIsPermitted(roleValidator.isSubscriberPermitted(subscriber.globalCustomerId));
+            subscriberWithFilter.subscriberType = subscriber.subscriberType;
+            subscriberWithFilter.resourceVersion = subscriber.resourceVersion;
+            subscriberWithFilter.subscriberName = subscriber.subscriberName;
+            subscriberWithFilter.globalCustomerId = subscriber.globalCustomerId;
+            subscribersWithFilter.add(subscriberWithFilter);
+        }
+        this.customer = subscribersWithFilter;
+     }
+
+    public List<SubscriberWithFilter> customer;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberWithFilter.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberWithFilter.java
new file mode 100644
index 0000000..c71b0d3
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/SubscriberWithFilter.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.model.Subscriber;
+
+public class SubscriberWithFilter extends Subscriber{
+
+    @JsonProperty("is-permitted")
+    private boolean isPermitted;
+
+    public boolean getIsPermitted() {
+        return isPermitted;
+    }
+
+    public void setIsPermitted(boolean isPermitted) {
+        this.isPermitted = isPermitted;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/HttpClientBuilderException.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/HttpClientBuilderException.java
new file mode 100644
index 0000000..dab5a34
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/HttpClientBuilderException.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.exceptions;
+
+public class HttpClientBuilderException extends RuntimeException {
+
+    public HttpClientBuilderException(Throwable cause) {
+        super(cause);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/InvalidAAIResponseException.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/InvalidAAIResponseException.java
new file mode 100644
index 0000000..c033d9c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/InvalidAAIResponseException.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.exceptions;
+
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.exceptions.GenericUncheckedException;
+
+public class InvalidAAIResponseException extends GenericUncheckedException {
+    public InvalidAAIResponseException(AaiResponse aaiResponse) {
+        super(String.format("errorCode: %d, raw: %s", aaiResponse.getHttpCode(), aaiResponse.getErrorMessage()));
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/InvalidPropertyException.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/InvalidPropertyException.java
new file mode 100644
index 0000000..0d3e5b1
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/InvalidPropertyException.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.exceptions;
+
+public class InvalidPropertyException extends Exception {
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/RoleParsingException.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/RoleParsingException.java
new file mode 100644
index 0000000..5ab442b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/exceptions/RoleParsingException.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.exceptions;
+
+public class RoleParsingException extends Exception {
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetAicZone/AicZones.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetAicZone/AicZones.java
new file mode 100644
index 0000000..34a16fc
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetAicZone/AicZones.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetAicZone;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class AicZones {
+	@JsonProperty("zone")
+	public List<Zone> zones;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetAicZone/Zone.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetAicZone/Zone.java
new file mode 100644
index 0000000..e3bdc69
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetAicZone/Zone.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetAicZone;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Zone {
+    @JsonProperty("zone-id")
+    public String zoneId;
+    
+    @JsonProperty("zone-name")
+    public String zoneName;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetInstanceGroupsByCloudRegion.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetInstanceGroupsByCloudRegion.java
new file mode 100644
index 0000000..a576ae2
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetInstanceGroupsByCloudRegion.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AaiGetInstanceGroupsByCloudRegion {
+
+    private final List<InstanceGroupWrapper> results;
+
+    public AaiGetInstanceGroupsByCloudRegion(@JsonProperty("results") List<InstanceGroupWrapper> results) {
+        this.results = results;
+    }
+
+    public List<InstanceGroupWrapper> getResults() {
+        return results;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetNetworkCollectionDetails.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetNetworkCollectionDetails.java
new file mode 100644
index 0000000..290cc0e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetNetworkCollectionDetails.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class AaiGetNetworkCollectionDetails {
+
+    public AaiGetNetworkCollectionDetails(){
+        results = new Result();
+    }
+    @JsonProperty("results")
+    private Result results = null;
+
+    @JsonProperty("results")
+    public Result getResults() {
+        return results;
+    }
+
+    @JsonProperty("results")
+    public void setResults(Result results) {
+        this.results = results;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetNetworkCollectionDetailsHelper.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetNetworkCollectionDetailsHelper.java
new file mode 100644
index 0000000..daade03
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetNetworkCollectionDetailsHelper.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AaiGetNetworkCollectionDetailsHelper {
+    @JsonProperty("results")
+    private List<Object> results = null;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+
+    @JsonProperty("results")
+    public List<Object> getResults() {
+        return results;
+    }
+
+    @JsonProperty("results")
+    public void setResults(List<Object> results) {
+        this.results = results;
+    }
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetRelatedInstanceGroupsByVnfId.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetRelatedInstanceGroupsByVnfId.java
new file mode 100644
index 0000000..a1c7b44
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/AaiGetRelatedInstanceGroupsByVnfId.java
@@ -0,0 +1,203 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AaiGetRelatedInstanceGroupsByVnfId {
+
+    @JsonProperty("vnf-id")
+    private String vnfId;
+    @JsonProperty("vnf-name")
+    private String vnfName;
+    @JsonProperty("vnf-type")
+    private String vnfType;
+    @JsonProperty("prov-status")
+    private String provStatus;
+    @JsonProperty("operational-status")
+    private String operationalStatus;
+    @JsonProperty("equipment-role")
+    private String equipmentRole;
+    @JsonProperty("in-maint")
+    private Boolean inMaint;
+    @JsonProperty("is-closed-loop-disabled")
+    private Boolean isClosedLoopDisabled;
+    @JsonProperty("resource-version")
+    private String resourceVersion;
+    @JsonProperty("model-invariant-id")
+    private String modelInvariantId;
+    @JsonProperty("model-version-id")
+    private String modelVersionId;
+    @JsonProperty("model-customization-id")
+    private String modelCustomizationId;
+    @JsonProperty("selflink")
+    private String selflink;
+    @JsonProperty("relationship-list")
+    private RelationshipList relationshipList;
+
+
+    @JsonProperty("vnf-id")
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    @JsonProperty("vnf-id")
+    public void setVnfId(String vnfId) {
+        this.vnfId = vnfId;
+    }
+
+    @JsonProperty("vnf-name")
+    public String getVnfName() {
+        return vnfName;
+    }
+
+    @JsonProperty("vnf-name")
+    public void setVnfName(String vnfName) {
+        this.vnfName = vnfName;
+    }
+
+    @JsonProperty("vnf-type")
+    public String getVnfType() {
+        return vnfType;
+    }
+
+    @JsonProperty("vnf-type")
+    public void setVnfType(String vnfType) {
+        this.vnfType = vnfType;
+    }
+
+    @JsonProperty("prov-status")
+    public String getProvStatus() {
+        return provStatus;
+    }
+
+    @JsonProperty("prov-status")
+    public void setProvStatus(String provStatus) {
+        this.provStatus = provStatus;
+    }
+
+    @JsonProperty("operational-status")
+    public String getOperationalStatus() {
+        return operationalStatus;
+    }
+
+    @JsonProperty("operational-status")
+    public void setOperationalStatus(String operationalStatus) {
+        this.operationalStatus = operationalStatus;
+    }
+
+    @JsonProperty("equipment-role")
+    public String getEquipmentRole() {
+        return equipmentRole;
+    }
+
+    @JsonProperty("equipment-role")
+    public void setEquipmentRole(String equipmentRole) {
+        this.equipmentRole = equipmentRole;
+    }
+
+    @JsonProperty("in-maint")
+    public Boolean getInMaint() {
+        return inMaint;
+    }
+
+    @JsonProperty("in-maint")
+    public void setInMaint(Boolean inMaint) {
+        this.inMaint = inMaint;
+    }
+
+    @JsonProperty("is-closed-loop-disabled")
+    public Boolean getIsClosedLoopDisabled() {
+        return isClosedLoopDisabled;
+    }
+
+    @JsonProperty("is-closed-loop-disabled")
+    public void setIsClosedLoopDisabled(Boolean isClosedLoopDisabled) {
+        this.isClosedLoopDisabled = isClosedLoopDisabled;
+    }
+
+    @JsonProperty("resource-version")
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    @JsonProperty("resource-version")
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    @JsonProperty("model-invariant-id")
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    @JsonProperty("model-invariant-id")
+    public void setModelInvariantId(String modelInvariantId) {
+        this.modelInvariantId = modelInvariantId;
+    }
+
+    @JsonProperty("model-version-id")
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    @JsonProperty("model-version-id")
+    public void setModelVersionId(String modelVersionId) {
+        this.modelVersionId = modelVersionId;
+    }
+
+    @JsonProperty("model-customization-id")
+    public String getModelCustomizationId() {
+        return modelCustomizationId;
+    }
+
+    @JsonProperty("model-customization-id")
+    public void setModelCustomizationId(String modelCustomizationId) {
+        this.modelCustomizationId = modelCustomizationId;
+    }
+
+    @JsonProperty("selflink")
+    public String getSelflink() {
+        return selflink;
+    }
+
+    @JsonProperty("selflink")
+    public void setSelflink(String selflink) {
+        this.selflink = selflink;
+    }
+
+    @JsonProperty("relationship-list")
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    @JsonProperty("relationship-list")
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Collection.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Collection.java
new file mode 100644
index 0000000..1d392f5
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Collection.java
@@ -0,0 +1,152 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Collection {
+    @JsonProperty("collection-id")
+    private String collectionId;
+    @JsonProperty("model-invariant-id")
+    private String modelInvariantId;
+    @JsonProperty("model-version-id")
+    private String modelVersionId;
+    @JsonProperty("collection-name")
+    private String collectionName;
+    @JsonProperty("collection-type")
+    private String collectionType;
+    @JsonProperty("collection-role")
+    private String collectionRole;
+    @JsonProperty("collection-function")
+    private String collectionFunction;
+    @JsonProperty("collection-customization-id")
+    private String collectionCustomizationId;
+    @JsonProperty("relationship-list")
+    private RelationshipList relationshipList;
+    @JsonProperty("resource-version")
+    private String resourceVersion;
+
+    @JsonProperty("collection-id")
+    public String getCollectionId() {
+        return collectionId;
+    }
+
+    @JsonProperty("collection-id")
+    public void setCollectionId(String collectionId) {
+        this.collectionId = collectionId;
+    }
+
+    @JsonProperty("model-invariant-id")
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    @JsonProperty("model-invariant-id")
+    public void setModelInvariantId(String modelInvariantId) {
+        this.modelInvariantId = modelInvariantId;
+    }
+
+    @JsonProperty("model-version-id")
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    @JsonProperty("model-version-id")
+    public void setModelVersionId(String modelVersionId) {
+        this.modelVersionId = modelVersionId;
+    }
+
+    @JsonProperty("collection-name")
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+    @JsonProperty("collection-name")
+    public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+    @JsonProperty("collection-type")
+    public String getCollectionType() {
+        return collectionType;
+    }
+
+    @JsonProperty("collection-type")
+    public void setCollectionType(String collectionType) {
+        this.collectionType = collectionType;
+    }
+
+    @JsonProperty("collection-role")
+    public String getCollectionRole() {
+        return collectionRole;
+    }
+
+    @JsonProperty("collection-role")
+    public void setCollectionRole(String collectionRole) {
+        this.collectionRole = collectionRole;
+    }
+
+    @JsonProperty("collection-function")
+    public String getCollectionFunction() {
+        return collectionFunction;
+    }
+
+    @JsonProperty("collection-function")
+    public void setCollectionFunction(String collectionFunction) {
+        this.collectionFunction = collectionFunction;
+    }
+
+    @JsonProperty("collection-customization-id")
+    public String getCollectionCustomizationId() {
+        return collectionCustomizationId;
+    }
+
+    @JsonProperty("collection-customization-id")
+    public void setCollectionCustomizationId(String collectionCustomizationId) {
+        this.collectionCustomizationId = collectionCustomizationId;
+    }
+
+    @JsonProperty("relationship-list")
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    @JsonProperty("relationship-list")
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+
+    @JsonProperty("resource-version")
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    @JsonProperty("resource-version")
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/InstanceGroup.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/InstanceGroup.java
new file mode 100644
index 0000000..3bc6742
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/InstanceGroup.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class InstanceGroup {
+    @JsonProperty("instance-group-role")
+    private String instanceGroupRole;
+    @JsonProperty("model-invariant-id")
+    private String modelInvariantId;
+    @JsonProperty("model-version-id")
+    private String modelVersionId;
+    private String id;
+    private String description;
+    @JsonProperty("instance-group-type")
+    private String instanceGroupType;
+    @JsonProperty("resource-version")
+    private String resourceVersion;
+    @JsonProperty("instance-group-name")
+    private String instanceGroupName;
+    @JsonProperty("instance-group-function")
+    private String instanceGroupFunction;
+    @JsonProperty("relationship-list")
+    private RelationshipList relationshipList;
+
+    public InstanceGroup(){
+        super();
+    }
+    
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public InstanceGroup(
+                        @JsonProperty("instance-group-role")
+                        String instanceGroupRole,
+                        @JsonProperty("model-invariant-id")
+                        String modelInvariantId,
+                        @JsonProperty("model-version-id")
+                        String modelVersionId,
+                        @JsonProperty(value = "id", required = true)
+                        String id,
+                        @JsonProperty(value = "description", required = true)
+                        String description,
+                        @JsonProperty(value = "instance-group-type", required = true)
+                        String instanceGroupType,
+                        @JsonProperty("resource-version")
+                        String resourceVersion,
+                        @JsonProperty("instance-group-name")
+                        String instanceGroupName,
+                        @JsonProperty("instance-group-function")
+                        String instanceGroupFunction,
+                        @JsonProperty("relationship-list")
+                        RelationshipList relationshipList) {
+        this.instanceGroupRole = instanceGroupRole;
+        this.modelInvariantId = modelInvariantId;
+        this.modelVersionId = modelVersionId;
+        this.id = id;
+        this.description = description;
+        this.instanceGroupType = instanceGroupType;
+        this.resourceVersion = resourceVersion;
+        this.instanceGroupName = instanceGroupName;
+        this.instanceGroupFunction = instanceGroupFunction;
+        this.relationshipList = relationshipList;
+    }
+
+    public String getInstanceGroupRole() {
+        return instanceGroupRole;
+    }
+
+    public String getModelInvariantId() {
+        return modelInvariantId;
+    }
+
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public String getInstanceGroupType() {
+        return instanceGroupType;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public String getInstanceGroupName() {
+        return instanceGroupName;
+    }
+
+    public String getInstanceGroupFunction() {
+        return instanceGroupFunction;
+    }
+
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Network.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Network.java
new file mode 100644
index 0000000..6527438
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Network.java
@@ -0,0 +1,164 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Network {
+    @JsonProperty("network-id")
+    private String networkId;
+    @JsonProperty("network-name")
+    private String networkName;
+    @JsonProperty("network-type")
+    private String networkType;
+    @JsonProperty("network-role")
+    private String networkRole;
+    @JsonProperty("network-technology")
+    private String networkTechnology;
+    @JsonProperty("is-bound-to-vpn")
+    private Boolean isBoundToVpn;
+    @JsonProperty("resource-version")
+    private String resourceVersion;
+    @JsonProperty("is-provider-network")
+    private Boolean isProviderNetwork;
+    @JsonProperty("is-shared-network")
+    private Boolean isSharedNetwork;
+    @JsonProperty("is-external-network")
+    private Boolean isExternalNetwork;
+    @JsonProperty("relationship-list")
+    private RelationshipList relationshipList;
+
+
+    @JsonProperty("network-id")
+    public String getNetworkId() {
+        return networkId;
+    }
+
+    @JsonProperty("network-id")
+    public void setNetworkId(String networkId) {
+        this.networkId = networkId;
+    }
+
+    @JsonProperty("network-name")
+    public String getNetworkName() {
+        return networkName;
+    }
+
+    @JsonProperty("network-name")
+    public void setNetworkName(String networkName) {
+        this.networkName = networkName;
+    }
+
+    @JsonProperty("network-type")
+    public String getNetworkType() {
+        return networkType;
+    }
+
+    @JsonProperty("network-type")
+    public void setNetworkType(String networkType) {
+        this.networkType = networkType;
+    }
+
+    @JsonProperty("network-role")
+    public String getNetworkRole() {
+        return networkRole;
+    }
+
+    @JsonProperty("network-role")
+    public void setNetworkRole(String networkRole) {
+        this.networkRole = networkRole;
+    }
+
+    @JsonProperty("network-technology")
+    public String getNetworkTechnology() {
+        return networkTechnology;
+    }
+
+    @JsonProperty("network-technology")
+    public void setNetworkTechnology(String networkTechnology) {
+        this.networkTechnology = networkTechnology;
+    }
+
+    @JsonProperty("is-bound-to-vpn")
+    public Boolean getIsBoundToVpn() {
+        return isBoundToVpn;
+    }
+
+    @JsonProperty("is-bound-to-vpn")
+    public void setIsBoundToVpn(Boolean isBoundToVpn) {
+        this.isBoundToVpn = isBoundToVpn;
+    }
+
+    @JsonProperty("resource-version")
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    @JsonProperty("resource-version")
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    @JsonProperty("is-provider-network")
+    public Boolean getIsProviderNetwork() {
+        return isProviderNetwork;
+    }
+
+    @JsonProperty("is-provider-network")
+    public void setIsProviderNetwork(Boolean isProviderNetwork) {
+        this.isProviderNetwork = isProviderNetwork;
+    }
+
+    @JsonProperty("is-shared-network")
+    public Boolean getIsSharedNetwork() {
+        return isSharedNetwork;
+    }
+
+    @JsonProperty("is-shared-network")
+    public void setIsSharedNetwork(Boolean isSharedNetwork) {
+        this.isSharedNetwork = isSharedNetwork;
+    }
+
+    @JsonProperty("is-external-network")
+    public Boolean getIsExternalNetwork() {
+        return isExternalNetwork;
+    }
+
+    @JsonProperty("is-external-network")
+    public void setIsExternalNetwork(Boolean isExternalNetwork) {
+        this.isExternalNetwork = isExternalNetwork;
+    }
+
+    @JsonProperty("relationship-list")
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    @JsonProperty("relationship-list")
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelatedToProperty.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelatedToProperty.java
new file mode 100644
index 0000000..d201559
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelatedToProperty.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelatedToProperty {
+
+	public String getPropertyKey() {
+		return propertyKey;
+	}
+
+
+	public void setPropertyKey(String propertyKey) {
+		this.propertyKey = propertyKey;
+	}
+
+
+	public String getPropertyValue() {
+		return propertyValue;
+	}
+
+
+	public void setPropertyValue(String propertyValue) {
+		this.propertyValue = propertyValue;
+	}
+
+
+	@JsonProperty("property-key")
+	public String propertyKey;
+
+
+	@JsonProperty("property-value")
+	public String propertyValue;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Relationship.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Relationship.java
new file mode 100644
index 0000000..fb3497c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Relationship.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Relationship {
+
+	@JsonProperty("related-to")
+	public String relatedTo;
+	
+	@JsonProperty("related-link")
+	public String relatedLink;
+
+	@JsonProperty("relationship-label")
+	public String relationshipLabel;
+	
+	@JsonProperty("relationship-data")
+	public List<RelationshipData> relationshipData;
+
+	@JsonProperty("related-to-property")
+	public List<RelatedToProperty> relatedToProperty;
+
+
+	public String getRelatedTo() {
+		return relatedTo;
+	}
+
+	public void setRelatedTo(String relatedTo) {
+		this.relatedTo = relatedTo;
+	}
+
+	public String getRelatedLink() {
+		return relatedLink;
+	}
+
+	public void setRelatedLink(String relatedLink) {
+		this.relatedLink = relatedLink;
+	}
+
+	public List<RelationshipData> getRelationDataList() {
+		return relationshipData;
+	}
+
+	public void setRelationDataList(List<RelationshipData> relationDataList) {
+		this.relationshipData = relationDataList;
+	}
+
+	public List<RelatedToProperty> getRelatedToPropertyList() {
+		return relatedToProperty;
+	}
+
+	public void setRelatedToPropertyList(List<RelatedToProperty> relatedToPropertyList) {
+		this.relatedToProperty = relatedToPropertyList;
+	}
+
+	public String getRelationshipLabel() {
+		return relationshipLabel;
+	}
+
+	public void setRelationshipLabel(String relationshipLabel) {
+		this.relationshipLabel = relationshipLabel;
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelationshipData.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelationshipData.java
new file mode 100644
index 0000000..15a5aef
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelationshipData.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelationshipData {
+	@JsonProperty("relationship-key")
+	public String getRelationshipKey() {
+		return relationshipKey;
+	}
+	@JsonProperty("relationship-key")
+	public void setRelationshipKey(String relationshipKey) {
+		this.relationshipKey = relationshipKey;
+	}
+	@JsonProperty("relationship-value")
+	public String getRelationshipValue() {
+		return relationshipValue;
+	}
+	@JsonProperty("relationship-value")
+	public void setRelationshipValue(String relationshipValue) {
+		this.relationshipValue = relationshipValue;
+	}
+
+	public String relationshipKey;
+	
+	public String relationshipValue;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelationshipList.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelationshipList.java
new file mode 100644
index 0000000..16521df
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/RelationshipList.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelationshipList {
+	
+	@JsonProperty("relationship")
+	public List<Relationship> getRelationship() {
+		return relationship;
+	}
+
+	@JsonProperty("relationship")
+	public void setRelationship(List<Relationship> relationship) {
+		this.relationship = relationship;
+	}
+
+	public List<Relationship> relationship;
+	
+	
+	
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Result.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Result.java
new file mode 100644
index 0000000..d5f6bc7
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/Result.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Result {
+
+    @JsonProperty("service-instance")
+    private ServiceInstance serviceInstance;
+    @JsonProperty("collection")
+    private Collection collection;
+    @JsonProperty("instance-group")
+    private InstanceGroup instanceGroup;
+    @JsonProperty("networks")
+    private List<Network> networks;
+
+    public Result(){
+        this.networks = new ArrayList<>();
+    }
+
+
+    @JsonProperty("service-instance")
+    public ServiceInstance getServiceInstance() {
+        return serviceInstance;
+    }
+
+    @JsonProperty("service-instance")
+    public void setServiceInstance(ServiceInstance serviceInstance) {
+        this.serviceInstance = serviceInstance;
+    }
+
+    @JsonProperty("collection")
+    public Collection getCollection() {
+        return collection;
+    }
+
+    @JsonProperty("collection")
+    public void setCollection(Collection collection) {
+        this.collection = collection;
+    }
+
+    @JsonProperty("instance-group")
+    public InstanceGroup getInstanceGroup() {
+        return instanceGroup;
+    }
+
+    @JsonProperty("instance-group")
+    public void setInstanceGroup(InstanceGroup instanceGroup) {
+        this.instanceGroup = instanceGroup;
+    }
+
+    @JsonProperty("networks")
+    public List<Network> getNetworks() { return networks; }
+
+    @JsonProperty("networks")
+    public void setNetworks(List<Network> networks) { this.networks = networks; }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/ServiceInstance.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/ServiceInstance.java
new file mode 100644
index 0000000..efc038f
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetNetworkCollectionDetails/ServiceInstance.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetNetworkCollectionDetails;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ServiceInstance {
+
+    @JsonProperty("service-instance-id")
+    public String serviceInstanceId;
+
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+
+    @JsonProperty("relationship-list")
+    public RelationshipList relationshipList;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentList.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentList.java
new file mode 100644
index 0000000..a6416ae
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentList.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetOperationalEnvironments;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.aai.OperationalEnvironment;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class OperationalEnvironmentList {
+
+    @JsonProperty("operational-environment")
+    public List<OperationalEnvironment> getOperationalEnvironment() {
+        return operationalEnvironment;
+    }
+
+    @JsonProperty("operational-environment")
+    public void setOperationalEnvironment(List<OperationalEnvironment> operationalEnvironment) {
+        this.operationalEnvironment = operationalEnvironment;
+    }
+
+    public OperationalEnvironmentList() {
+    }
+
+    public OperationalEnvironmentList(List<OperationalEnvironment> operationalEnvironment) {
+        this.operationalEnvironment = operationalEnvironment;
+    }
+
+    private List<OperationalEnvironment> operationalEnvironment;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPnfResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPnfResponse.java
new file mode 100644
index 0000000..f60f3ad
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPnfResponse.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.google.common.base.MoreObjects;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+        "results"
+})
+public class AaiGetPnfResponse {
+    @JsonProperty("results")
+    public List<PnfResult> results = null;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("results", results)
+                .add("additionalProperties", additionalProperties)
+                .toString();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPnfs/Pnf.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPnfs/Pnf.java
new file mode 100644
index 0000000..517111a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPnfs/Pnf.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetPnfs;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.aai.model.AaiRelationResponse;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Pnf extends AaiRelationResponse {
+
+    @JsonProperty("pnf-name")
+    public String pnfName;
+    @JsonProperty("pnf-name2")
+    public String pnfName2;
+    @JsonProperty("pnf-name2-source")
+    public String pnfName2Source;
+    @JsonProperty("pnf-id")
+    public String pnfId;
+    @JsonProperty("equip-type")
+    public String equipType;
+    @JsonProperty("equip-vendor")
+    public String equipVendor;
+    @JsonProperty("equip-model")
+    public String equipModel;
+
+    public String getPnfName() {
+        return pnfName;
+    }
+
+    public void setPnfName(String pnfName) {
+        this.pnfName = pnfName;
+    }
+
+    public String getEquipType() {
+        return equipType;
+    }
+
+    public void setEquipType(String equipType) {
+        this.equipType = equipType;
+    }
+
+    public String getEquipVendor() {
+        return equipVendor;
+    }
+
+    public void setEquipVendor(String equipVendor) {
+        this.equipVendor = equipVendor;
+    }
+
+    public String getPnfName2() {
+        return pnfName2;
+    }
+
+    public void setPnfName2(String pnfName2) {
+        this.pnfName2 = pnfName2;
+    }
+
+    public String getPnfId() {
+        return pnfId;
+    }
+
+    public void setPnfId(String pnfId) {
+        this.pnfId = pnfId;
+    }
+
+    public String getEquipModel() {
+        return equipModel;
+    }
+
+    public void setEquipModel(String equipModel) {
+        this.equipModel = equipModel;
+    }
+
+    public String getPnfName2Source() { return pnfName2Source; }
+
+    public void setPnfName2Source(String pnfName2Source) { this.pnfName2Source = pnfName2Source; }
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPortMirroringSourcePorts.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPortMirroringSourcePorts.java
new file mode 100644
index 0000000..2ce6dca
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetPortMirroringSourcePorts.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class AaiGetPortMirroringSourcePorts {
+
+    private final List<SimpleResult> results;
+
+    public AaiGetPortMirroringSourcePorts(@JsonProperty("results") List<SimpleResult> results) {
+        this.results = results;
+    }
+
+    public List<SimpleResult> getResults() {
+        return results;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java
new file mode 100644
index 0000000..a79ba9e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetServicesRequestModel/GetServicesAAIRespone.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetServicesRequestModel;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+import java.util.List;
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class GetServicesAAIRespone {
+
+    public List<Service> service;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetServicesRequestModel/Service.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetServicesRequestModel/Service.java
new file mode 100644
index 0000000..db4daeb
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetServicesRequestModel/Service.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetServicesRequestModel;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Service {
+    @JsonProperty("service-id")
+    public String serviceId;
+    @JsonProperty("service-description")
+    public String serviceDescription;
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+    @JsonProperty("is-permitted")
+    public boolean isPermitted;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetTenatns/GetTenantsResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetTenatns/GetTenantsResponse.java
new file mode 100644
index 0000000..5caa193
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiGetTenatns/GetTenantsResponse.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetTenatns;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class GetTenantsResponse {
+
+    @JsonProperty("cloudRegionID")
+    public String cloudRegionId;
+
+    @JsonProperty("cloudOwner")
+    public String cloudOwner;
+    
+    @JsonProperty("tenantName")
+    public String tenantName;
+
+    @JsonProperty("tenantID")
+    public String tenantID;
+
+    @JsonProperty("is-permitted")
+    public boolean isPermitted;
+
+    public GetTenantsResponse() {
+    }
+
+    public GetTenantsResponse(String cloudRegionId, String cloudOwner, String tenantName, String tenantID, boolean isPermitted) {
+        this.cloudRegionId = cloudRegionId;
+        this.cloudOwner = cloudOwner;
+        this.tenantName = tenantName;
+        this.tenantID = tenantID;
+        this.isPermitted = isPermitted;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiNodeQueryResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiNodeQueryResponse.java
new file mode 100644
index 0000000..6e02979
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiNodeQueryResponse.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class AaiNodeQueryResponse {
+
+    public static class ResultData {
+
+        public final ResourceType resourceType;
+        public final String resourceLink;
+
+        public ResultData(@JsonProperty("resource-type") ResourceType resourceType,
+                          @JsonProperty("resource-link") String resourceLink) {
+            this.resourceType = resourceType;
+            this.resourceLink = resourceLink;
+        }
+    }
+
+    public final List<ResultData> resultData;
+
+    public AaiNodeQueryResponse(@JsonProperty("result-data") List<ResultData> resultData) {
+        this.resultData = resultData;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiRelationResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiRelationResponse.java
new file mode 100644
index 0000000..5ead2f8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/AaiRelationResponse.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class AaiRelationResponse {
+
+    @JsonProperty("resource-version")
+    private String resourceVersion;
+    @JsonProperty("relationship-list")
+    private RelationshipList relationshipList;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+
+    @JsonProperty("resource-version")
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    @JsonProperty("resource-version")
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    @JsonProperty("relationship-list")
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    @JsonProperty("relationship-list")
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/GetServiceModelsByDistributionStatusResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/GetServiceModelsByDistributionStatusResponse.java
new file mode 100644
index 0000000..028739a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/GetServiceModelsByDistributionStatusResponse.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class GetServiceModelsByDistributionStatusResponse {
+    @JsonProperty("results")
+    private List<Result> results;
+
+
+    @JsonProperty("results")
+    public List<Result> getResults() {
+        return results;
+    }
+
+    @JsonProperty("results")
+    public void setResults(List<Result> results) {
+        this.results = results;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/InstanceGroupInfo.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/InstanceGroupInfo.java
new file mode 100644
index 0000000..98600b8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/InstanceGroupInfo.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+public class InstanceGroupInfo {
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    private String type;
+    private String name;
+
+    public InstanceGroupInfo(String name){
+        this.name = name;
+        this.type = "instance-group";
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/InstanceGroupWrapper.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/InstanceGroupWrapper.java
new file mode 100644
index 0000000..d4076d7
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/InstanceGroupWrapper.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.InstanceGroup;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class InstanceGroupWrapper {
+
+    private InstanceGroup instanceGroup;
+
+    @JsonProperty("instance-group")
+    public InstanceGroup getInstanceGroup() {
+        return instanceGroup;
+    }
+    @JsonProperty("instance-group")
+    public void setInstanceGroup(InstanceGroup instanceGroup) {
+        this.instanceGroup = instanceGroup;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/LogicalLinkResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/LogicalLinkResponse.java
new file mode 100644
index 0000000..e380978
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/LogicalLinkResponse.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class LogicalLinkResponse {
+
+    @JsonProperty("link-name")
+    public String linkName;
+
+    @JsonProperty("in-maint")
+    public Boolean inMaint;
+
+    @JsonProperty("link-type")
+    public String linkType;
+
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+
+    @JsonProperty("purpose")
+    public String purpose;
+
+    @JsonProperty("relationship-list")
+    public RelationshipList relationshipList;
+
+    public String getLinkName() {
+        return linkName;
+    }
+
+    public void setLinkName(String linkName) {
+        this.linkName = linkName;
+    }
+
+    public Boolean getInMaint() {
+        return inMaint;
+    }
+
+    public void setInMaint(Boolean inMaint) {
+        this.inMaint = inMaint;
+    }
+
+    public String getLinkType() {
+        return linkType;
+    }
+
+    public void setLinkType(String linkType) {
+        this.linkType = linkType;
+    }
+
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    public String getPurpose() {
+        return purpose;
+    }
+
+    public void setPurpose(String purpose) {
+        this.purpose = purpose;
+    }
+
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Model.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Model.java
new file mode 100644
index 0000000..03c6906
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Model.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Model {
+
+        @JsonProperty("model-invariant-id")
+        private String modelInvariantId;
+        @JsonProperty("model-type")
+        private String modelType;
+        @JsonProperty("resource-version")
+        private String resourceVersion;
+        @JsonProperty("model-vers")
+        private ModelVers modelVers;
+
+        @JsonProperty("model-invariant-id")
+        public String getModelInvariantId() {
+            return modelInvariantId;
+        }
+
+        @JsonProperty("model-invariant-id")
+        public void setModelInvariantId(String modelInvariantId) {
+            this.modelInvariantId = modelInvariantId;
+        }
+
+        @JsonProperty("model-type")
+        public String getModelType() {
+            return modelType;
+        }
+
+        @JsonProperty("model-type")
+        public void setModelType(String modelType) {
+            this.modelType = modelType;
+        }
+
+        @JsonProperty("resource-version")
+        public String getResourceVersion() {
+            return resourceVersion;
+        }
+
+        @JsonProperty("resource-version")
+        public void setResourceVersion(String resourceVersion) {
+            this.resourceVersion = resourceVersion;
+        }
+
+        @JsonProperty("model-vers")
+        public ModelVers getModelVers() {
+            return modelVers;
+        }
+
+        @JsonProperty("model-vers")
+        public void setModelVers(ModelVers modelVers) {
+            this.modelVers = modelVers;
+        }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ModelVer.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ModelVer.java
new file mode 100644
index 0000000..925a875
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ModelVer.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ModelVer {
+
+    @JsonProperty("model-version-id")
+    private String modelVersionId;
+    @JsonProperty("model-name")
+    private String modelName;
+    @JsonProperty("model-version")
+    private String modelVersion;
+    @JsonProperty("distribution-status")
+    private String distributionStatus;
+    @JsonProperty("resource-version")
+    private String resourceVersion;
+    @JsonProperty("model-description")
+    private String modelDescription;
+
+
+
+    @JsonProperty("model-version-id")
+    public String getModelVersionId() {
+        return modelVersionId;
+    }
+
+    @JsonProperty("model-version-id")
+    public void setModelVersionId(String modelVersionId) {
+        this.modelVersionId = modelVersionId;
+    }
+
+    @JsonProperty("model-name")
+    public String getModelName() {
+        return modelName;
+    }
+
+    @JsonProperty("model-name")
+    public void setModelName(String modelName) {
+        this.modelName = modelName;
+    }
+
+    @JsonProperty("model-version")
+    public String getModelVersion() {
+        return modelVersion;
+    }
+
+    @JsonProperty("model-version")
+    public void setModelVersion(String modelVersion) {
+        this.modelVersion = modelVersion;
+    }
+
+    @JsonProperty("distribution-status")
+    public String getDistributionStatus() {
+        return distributionStatus;
+    }
+
+    @JsonProperty("distribution-status")
+    public void setDistributionStatus(String distributionStatus) {
+        this.distributionStatus = distributionStatus;
+    }
+
+    @JsonProperty("resource-version")
+    public String getResourceVersion() {
+        return resourceVersion;
+    }
+
+    @JsonProperty("resource-version")
+    public void setResourceVersion(String resourceVersion) {
+        this.resourceVersion = resourceVersion;
+    }
+
+    @JsonProperty("model-description")
+    public String getModelDescription() {
+        return modelDescription;
+    }
+
+    @JsonProperty("model-description")
+    public void setModelDescription(String modelDescription) {
+        this.modelDescription = modelDescription;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ModelVers.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ModelVers.java
new file mode 100644
index 0000000..f49c6fe
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ModelVers.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class ModelVers {
+
+    @JsonProperty("model-ver")
+    private List<ModelVer> modelVer;
+
+    @JsonProperty("model-ver")
+    public List<ModelVer> getModelVer() {
+        return modelVer;
+    }
+
+    @JsonProperty("model-ver")
+    public void setModelVer(List<ModelVer> modelVer) {
+        this.modelVer = modelVer;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/OwningEntity.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/OwningEntity.java
new file mode 100644
index 0000000..6484bad
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/OwningEntity.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class OwningEntity extends AaiRelationResponse {
+    @JsonProperty("owning-entity-id")
+    private String owningEntityId;
+    @JsonProperty("owning-entity-name")
+    private String owningEntityName;
+
+    @JsonProperty("owning-entity-id")
+    public String getOwningEntityId() {
+        return owningEntityId;
+    }
+
+    @JsonProperty("owning-entity-id")
+    public void setOwningEntityId(String owningEntityId) {
+        this.owningEntityId = owningEntityId;
+    }
+
+    @JsonProperty("owning-entity-name")
+    public String getOwningEntityName() {
+        return owningEntityName;
+    }
+
+    @JsonProperty("owning-entity-name")
+    public void setOwningEntityName(String owningEntityName) {
+        this.owningEntityName = owningEntityName;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/OwningEntityResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/OwningEntityResponse.java
new file mode 100644
index 0000000..767a628
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/OwningEntityResponse.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class OwningEntityResponse {
+
+    @JsonProperty("owning-entity")
+    private List<OwningEntity> owningEntity;
+
+
+    @JsonProperty("owning-entity")
+    public List<OwningEntity> getOwningEntity() {
+        return owningEntity;
+    }
+
+    @JsonProperty("owning-entity")
+    public void setOwningEntity(List<OwningEntity> owningEntity) {
+        this.owningEntity = owningEntity;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PnfProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PnfProperties.java
new file mode 100644
index 0000000..4d6a6b0
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PnfProperties.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({
+        "pnf-name",
+        "equip-type",
+        "equip-vendor",
+        "equip-model",
+        "in-maint",
+        "resource-version"
+})
+public class PnfProperties {
+
+    @JsonProperty("pnf-name")
+    public String pnfName;
+    @JsonProperty("equip-type")
+    public String equipType;
+    @JsonProperty("equip-vendor")
+    public String equipVendor;
+    @JsonProperty("equip-model")
+    public String equipModel;
+    @JsonProperty("in-maint")
+    public Boolean inMaint;
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PnfResult.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PnfResult.java
new file mode 100644
index 0000000..3057019
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PnfResult.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.onap.osam.RelatedTo;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+        "id",
+        "node-type",
+        "url",
+        "properties",
+        "related-to"
+})
+public class PnfResult {
+
+    @JsonProperty("id")
+    public String id;
+    @JsonProperty("node-type")
+    public String nodeType;
+    @JsonProperty("url")
+    public String url;
+    @JsonProperty("properties")
+    public PnfProperties properties;
+    @JsonProperty("related-to")
+    public List<RelatedTo> relatedTo;
+
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PortDetailsTranslator.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PortDetailsTranslator.java
new file mode 100644
index 0000000..10612f8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/PortDetailsTranslator.java
@@ -0,0 +1,160 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.google.common.collect.ImmutableList;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.properties.Features;
+import org.togglz.core.manager.FeatureManager;
+
+import javax.inject.Inject;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Optional;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+public class PortDetailsTranslator {
+
+    @Inject
+    FeatureManager featureManager;
+
+    public static class PortDetailsOk extends PortDetails {
+
+        private final String interfaceId;
+        private final String interfaceName;
+        private final boolean isPortMirrored;
+
+        public PortDetailsOk(String interfaceId, String interfaceName, boolean isPortMirrored) {
+            this.interfaceId = interfaceId;
+            this.interfaceName = interfaceName;
+            this.isPortMirrored = isPortMirrored;
+        }
+
+        public String getInterfaceId() {
+            return interfaceId;
+        }
+
+        public String getInterfaceName() {
+            return interfaceName;
+        }
+
+        public boolean getIsPortMirrored() {
+            return isPortMirrored;
+        }
+    }
+
+    public abstract static class PortDetails {
+    }
+
+    public static class PortDetailsError extends PortDetails {
+        private final String errorDescription;
+        private final String rawAaiResponse;
+
+        public PortDetailsError(String errorDescription, String rawAaiResponse){
+           this.errorDescription = errorDescription;
+           this.rawAaiResponse = rawAaiResponse;
+        }
+
+        public String getErrorDescription() {
+            return errorDescription;
+        }
+
+        public String getRawAaiResponse() {
+            return rawAaiResponse;
+        }
+    }
+
+    public static PortDetails extractPortDetailsFromProperties(Properties properties, String rawPayload){
+        List<String> errorDescriptions = new LinkedList<>();
+        describeIfNullOrEmpty("interface-id", properties.getInterfaceId(), errorDescriptions);
+        describeIfNullOrEmpty("interface-name", properties.getInterfaceName(), errorDescriptions);
+        describeIfNullOrEmpty("is-port-mirrored", properties.getIsPortMirrored(), errorDescriptions);
+
+        if(errorDescriptions.isEmpty()){
+            return new PortDetailsOk(properties.getInterfaceId(), properties.getInterfaceName(), properties.getIsPortMirrored());
+        } else {
+            return new PortDetailsError(String.join(" ", errorDescriptions), rawPayload);
+        }
+    }
+
+    private static void describeIfNullOrEmpty(String name, Object value, List<String> errorDescriptions) {
+        if (value == null) {
+            errorDescriptions.add("Value of '" + name + "' is missing.");
+        } else if (value.toString().isEmpty()) {
+            errorDescriptions.add("Value of '" + name + "' is empty.");
+        }
+    }
+
+    private static Optional<List<PortDetails>> extractErrorResponseIfHttpError(AaiResponse aaiResponse, String rawPayload) {
+        if (aaiResponse.getHttpCode() != org.springframework.http.HttpStatus.OK.value()) {
+            final String errorMessage = aaiResponse.getErrorMessage();
+            return Optional.of(ImmutableList.of(new PortDetailsError(
+                    "Got " + aaiResponse.getHttpCode() + " from aai",
+                    errorMessage != null ? errorMessage.toString() : rawPayload)
+            ));
+        } else {
+            return Optional.empty();
+        }
+    }
+
+    public List<PortDetails> extractPortDetailsInternal(AaiGetPortMirroringSourcePorts aaiGetPortsResponse, String rawPayload){
+        List<SimpleResult> filteredResult = getFilteredPortList(aaiGetPortsResponse.getResults());
+
+        return filteredResult.stream()
+                .map(SimpleResult::getProperties)
+                .map(p -> extractPortDetailsFromProperties(p, rawPayload))
+                .collect(Collectors.toList());
+    }
+
+    public List<SimpleResult> getFilteredPortList(List<SimpleResult> results) {
+        String LINTERFACE = "l-interface";
+
+        final Predicate<SimpleResult> ifIsPort = (SimpleResult r) -> LINTERFACE.equals(r.getNodeType());
+        Predicate<SimpleResult> ifIsSource = getIsSourcePredicate();
+
+        return results.stream()
+                .filter(ifIsPort)
+                .filter(ifIsSource)
+                .collect(Collectors.toList());
+    }
+
+    private Predicate<SimpleResult> getIsSourcePredicate() {
+        boolean FLAG_ADVANCED_PORTS_FILTER = featureManager.isActive(Features.FLAG_ADVANCED_PORTS_FILTER);
+
+        if (FLAG_ADVANCED_PORTS_FILTER) {
+            String PORT_LABEL = "org.onap.relationships.inventory.Source";
+            return (SimpleResult r) -> r.getRelatedTo().stream()
+                    .anyMatch(relatedTo -> PORT_LABEL.equalsIgnoreCase(relatedTo.getRelationshipLabel()));
+        } else {
+            return (SimpleResult r) -> true;
+        }
+    }
+
+    public List<PortDetails> extractPortDetails(AaiResponse<AaiGetPortMirroringSourcePorts> aaiGetPortsResponse, String rawPayload){
+        return extractErrorResponseIfHttpError(aaiGetPortsResponse, rawPayload).orElseGet(() -> extractPortDetailsInternal(aaiGetPortsResponse.getT(), rawPayload));
+
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Project.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Project.java
new file mode 100644
index 0000000..dc6e219
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Project.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Project extends AaiRelationResponse {
+
+    @JsonProperty("project-name")
+    private String projectName;
+
+    @JsonProperty("project-name")
+    public String getProjectName() { return projectName; }
+
+    @JsonProperty("project-name")
+    public void setProjectName(String projectName) { this.projectName = projectName; }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ProjectResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ProjectResponse.java
new file mode 100644
index 0000000..1067bff
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ProjectResponse.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class ProjectResponse {
+
+    @JsonProperty("project")
+    private List<Project> project;
+
+
+    @JsonProperty("project")
+    public List<Project> getProject() {
+        return project;
+    }
+
+    @JsonProperty("project")
+    public void setProject(List<Project> project) {
+        this.project = project;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Properties.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Properties.java
new file mode 100644
index 0000000..644c429
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Properties.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Properties {
+
+    private final String interfaceName;
+    private final String interfaceId;
+    private final Boolean isPortMirrored;
+
+    public Properties(
+            @JsonProperty("interface-name") String interfaceName,
+            @JsonProperty("interface-id") String interfaceId,
+            @JsonProperty("is-port-mirrored") Boolean isPortMirrored) {
+        this.interfaceName = interfaceName;
+        this.interfaceId = interfaceId;
+        this.isPortMirrored = isPortMirrored;
+    }
+
+    public String getInterfaceName() {
+        return interfaceName;
+    }
+
+    public String getInterfaceId() {
+        return interfaceId;
+    }
+
+    public Boolean getIsPortMirrored() {
+        return isPortMirrored;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelatedTo.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelatedTo.java
new file mode 100644
index 0000000..37d622e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelatedTo.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelatedTo {
+    private final String id;
+    private final String relationshipLabel;
+    private final String nodeType;
+    private final String url;
+
+    public RelatedTo(
+            @JsonProperty("id") String id,
+            @JsonProperty("relationship-label") String relationshipLabel,
+            @JsonProperty("node-type") String nodeType,
+            @JsonProperty("url") String url) {
+        this.id = id;
+        this.relationshipLabel = relationshipLabel;
+        this.nodeType = nodeType;
+        this.url = url;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public String getRelationshipLabel() {
+        return relationshipLabel;
+    }
+
+    public String getNodeType() {
+        return nodeType;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelatedToProperty.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelatedToProperty.java
new file mode 100644
index 0000000..036a663
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelatedToProperty.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelatedToProperty {
+
+	public String getPropertyKey() {
+		return propertyKey;
+	}
+
+
+	public void setPropertyKey(String propertyKey) {
+		this.propertyKey = propertyKey;
+	}
+
+
+	public String getPropertyValue() {
+		return propertyValue;
+	}
+
+
+	public void setPropertyValue(String propertyValue) {
+		this.propertyValue = propertyValue;
+	}
+
+
+	@JsonProperty("property-key")
+	public String propertyKey;
+
+
+	@JsonProperty("property-value")
+	public String propertyValue;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Relationship.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Relationship.java
new file mode 100644
index 0000000..15f2e6a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Relationship.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Relationship {
+
+	@JsonProperty("related-to")
+	public String relatedTo;
+	
+	@JsonProperty("related-link")
+	public String relatedLink;
+
+	@JsonProperty("relationship-label")
+	public String relationshipLabel;
+	
+	@JsonProperty("relationship-data")
+	public List<RelationshipData> relationshipData;
+	
+	@JsonProperty("related-to-property")
+	public List<RelatedToProperty> relatedToProperty;
+
+	
+	public String getRelatedTo() {
+		return relatedTo;
+	}
+
+	public void setRelatedTo(String relatedTo) {
+		this.relatedTo = relatedTo;
+	}
+
+	public String getRelatedLink() {
+		return relatedLink;
+	}
+
+	public void setRelatedLink(String relatedLink) {
+		this.relatedLink = relatedLink;
+	}
+
+	public List<RelationshipData> getRelationDataList() {
+		return relationshipData;
+	}
+
+	public void setRelationDataList(List<RelationshipData> relationDataList) {
+		this.relationshipData = relationDataList;
+	}
+
+	public List<RelatedToProperty> getRelatedToPropertyList() {
+		return relatedToProperty;
+	}
+
+	public void setRelatedToPropertyList(List<RelatedToProperty> relatedToPropertyList) {
+		this.relatedToProperty = relatedToPropertyList;
+	}
+
+	public String getRelationshipLabel() {
+		return relationshipLabel;
+	}
+
+	public void setRelationshipLabel(String relationshipLabel) {
+		this.relationshipLabel = relationshipLabel;
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelationshipData.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelationshipData.java
new file mode 100644
index 0000000..107ac3d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelationshipData.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelationshipData {
+	@JsonProperty("relationship-key")
+	public String getRelationshipKey() {
+		return relationshipKey;
+	}
+	@JsonProperty("relationship-key")
+	public void setRelationshipKey(String relationshipKey) {
+		this.relationshipKey = relationshipKey;
+	}
+	@JsonProperty("relationship-value")
+	public String getRelationshipValue() {
+		return relationshipValue;
+	}
+	@JsonProperty("relationship-value")
+	public void setRelationshipValue(String relationshipValue) {
+		this.relationshipValue = relationshipValue;
+	}
+
+	public String relationshipKey;
+	
+	public String relationshipValue;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelationshipList.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelationshipList.java
new file mode 100644
index 0000000..c2cd4be
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/RelationshipList.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RelationshipList {
+	
+	@JsonProperty("relationship")
+	public List<Relationship> getRelationship() {
+		return relationship;
+	}
+	
+	@JsonProperty("relationship")
+	public void setRelationship(List<Relationship> relationship) {
+		this.relationship = relationship;
+	}
+
+	public List<Relationship> relationship;
+	
+	
+	
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ResourceType.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ResourceType.java
new file mode 100644
index 0000000..bbe0ed5
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ResourceType.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public enum ResourceType {
+
+    SERVICE_INSTANCE("service-instance", "service-instance-name"),
+    GENERIC_VNF("generic-vnf", "vnf-name"),
+    VF_MODULE("vf-module", "vf-module-name"),
+    VOLUME_GROUP("volume-group", "volume-group-name");
+
+    private static Map<String, ResourceType> AAI_FORMAT_MAP = Stream
+            .of(ResourceType.values())
+            .collect(Collectors.toMap(s -> s.aaiFormat, Function.identity()));
+
+    private final String aaiFormat;
+    private final String nameFilter;
+
+    ResourceType(String formatted, String nameFilter) {
+        this.aaiFormat = formatted;
+        this.nameFilter = nameFilter;
+    }
+
+    public String getAaiFormat() {
+        return aaiFormat;
+    }
+
+    public String getNameFilter() {
+        return nameFilter;
+    }
+
+    @JsonCreator
+    public static ResourceType fromString(String string) {
+        return Optional
+                .ofNullable(AAI_FORMAT_MAP.get(string))
+                .orElseThrow(() -> new IllegalArgumentException(string));
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Result.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Result.java
new file mode 100644
index 0000000..d50603f
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Result.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Result {
+    @JsonProperty("model")
+    private Model model;
+
+    @JsonProperty("model")
+    public Model getModel() {
+        return model;
+    }
+
+    @JsonProperty("model")
+    public void setModel(Model model) {
+        this.model = model;
+    }
+
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceInstance.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceInstance.java
new file mode 100644
index 0000000..a6fbb50
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceInstance.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ServiceInstance {
+	
+	@JsonProperty("service-instance-id")
+	public String serviceInstanceId;
+
+	@JsonProperty("service-instance-name")
+	public String serviceInstanceName;
+	
+	@JsonProperty("persona-model-id")
+	public String personaModelId;
+	
+	@JsonProperty("persona-model-version")
+	public String personaModelVersion;
+	
+	@JsonProperty("resource-version")
+	public String resourceVersion;
+	
+	@JsonProperty("orchestration-status")
+	public String orchestrationStatus;
+
+	
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceInstances.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceInstances.java
new file mode 100644
index 0000000..6c2de4a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceInstances.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+public class ServiceInstances {
+	
+	@JsonProperty("service-instance")
+	public List<ServiceInstance> serviceInstance;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceProperties.java
new file mode 100644
index 0000000..bd8d26e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceProperties.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.*;
+import java.util.HashMap;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({
+        "service-instance-id",
+        "service-instance-name",
+        "model-invariant-id",
+        "model-version-id",
+        "resource-version",
+        "orchestration-status",
+        "global-customer-id",
+        "subscriber-name",
+        "subscriber-type",
+        "vnf-id",
+        "vnf-name",
+        "vnf-type",
+        "service-id",
+        "prov-status",
+        "in-maint",
+        "is-closed-loop-disabled",
+        "model-customization-id",
+        "nf-type",
+        "nf-function",
+        "nf-role",
+        "nf-naming-code"
+})
+public class ServiceProperties {
+
+    @JsonProperty("service-instance-id")
+    public String serviceInstanceId;
+    @JsonProperty("service-instance-name")
+    public String serviceInstanceName;
+    @JsonProperty("model-invariant-id")
+    public String modelInvariantId;
+    @JsonProperty("model-version-id")
+    public String modelVersionId;
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+    @JsonProperty("orchestration-status")
+    public String orchestrationStatus;
+    @JsonProperty("global-customer-id")
+    public String globalCustomerId;
+    @JsonProperty("subscriber-name")
+    public String subscriberName;
+    @JsonProperty("subscriber-type")
+    public String subscriberType;
+    @JsonProperty("vnf-id")
+    public String vnfId;
+    @JsonProperty("vnf-name")
+    public String vnfName;
+    @JsonProperty("vnf-type")
+    public String vnfType;
+    @JsonProperty("service-id")
+    public String serviceId;
+    @JsonProperty("prov-status")
+    public String provStatus;
+    @JsonProperty("in-maint")
+    public Boolean inMaint;
+    @JsonProperty("is-closed-loop-disabled")
+    public Boolean isClosedLoopDisabled;
+    @JsonProperty("model-customization-id")
+    public String modelCustomizationId;
+    @JsonProperty("nf-type")
+    public String nfType;
+    @JsonProperty("nf-function")
+    public String nfFunction;
+    @JsonProperty("nf-role")
+    public String nfRole;
+    @JsonProperty("nf-naming-code")
+    public String nfNamingCode;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceRelationships.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceRelationships.java
new file mode 100644
index 0000000..e7c2fc1
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceRelationships.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ServiceRelationships {
+	
+	@JsonProperty("service-instance-id")
+	public String serviceInstanceId;
+
+	@JsonProperty("service-instance-name")
+	public String serviceInstanceName;
+
+	@JsonProperty("service-type")
+	public String serviceType;
+
+	@JsonProperty("service-role")
+	public String serviceRole;
+
+	@JsonProperty("environment-context")
+	public String environmentContext;
+
+	@JsonProperty("workload-context")
+	public String workloadContext;
+
+	@JsonProperty("model-invariant-id")
+	public String modelInvariantId;
+	
+	@JsonProperty("model-version-id")
+	public String modelVersionId;
+
+	@JsonProperty("resource-version")
+	public String resourceVersion;
+	
+	@JsonProperty("orchestration-status")
+	public String orchestrationStatus;
+
+	@JsonProperty("relationship-list")
+	public RelationshipList relationshipList;
+
+
+	public String getServiceInstanceId() {
+		return serviceInstanceId;
+	}
+
+	public void setServiceInstanceId(String serviceInstanceId) {
+		this.serviceInstanceId = serviceInstanceId;
+	}
+
+	public String getServiceInstanceName() {
+		return serviceInstanceName;
+	}
+
+	public void setServiceInstanceName(String serviceInstanceName) {
+		this.serviceInstanceName = serviceInstanceName;
+	}
+
+	public String getModelInvariantId() {
+		return modelInvariantId;
+	}
+
+	public void setModelInvariantId(String modelInvariantId) {
+		this.modelInvariantId = modelInvariantId;
+	}
+
+	public String getModelVersionId() {
+		return modelVersionId;
+	}
+
+	public void setModelVersionId(String modelVersionId) {
+		this.modelVersionId = modelVersionId;
+	}
+
+	public String getResourceVersion() {
+		return resourceVersion;
+	}
+
+	public void setResourceVersion(String resourceVersion) {
+		this.resourceVersion = resourceVersion;
+	}
+
+	public String getOrchestrationStatus() {
+		return orchestrationStatus;
+	}
+
+	public void setOrchestrationStatus(String orchestrationStatus) {
+		this.orchestrationStatus = orchestrationStatus;
+	}
+
+	public RelationshipList getRelationshipList() {
+		return relationshipList;
+	}
+
+	public void setRelationshipList(RelationshipList relationshipList) {
+		this.relationshipList = relationshipList;
+	}
+
+
+
+	
+	
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceSubscription.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceSubscription.java
new file mode 100644
index 0000000..077903d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/ServiceSubscription.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ServiceSubscription {
+	
+    @JsonProperty("service-type")
+    public String serviceType;
+
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+
+    @JsonProperty("service-instances")
+    public ServiceInstances serviceInstances;
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Services.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Services.java
new file mode 100644
index 0000000..367ee42
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/Services.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+
+public class Services {
+    @JsonProperty("global-customer-id")
+    public String globalCustomerId;
+
+    @JsonProperty("subscriber-name")
+    public String subscriberName;
+
+    @JsonProperty("subscriber-type")
+    public String subscriberType;
+
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+    
+    @JsonProperty("service-subscriptions")
+    public List<ServiceSubscription> serviceSubscriptions;
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/SimpleResult.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/SimpleResult.java
new file mode 100644
index 0000000..92189b0
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/SimpleResult.java
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SimpleResult {
+    @JsonProperty("id")
+    private String id;
+    @JsonProperty("node-type")
+    private String nodeType;
+    @JsonProperty("url")
+    private String url;
+    @JsonProperty("properties")
+    private Properties properties;
+    @JsonProperty("related-to")
+    private List<RelatedTo> relatedTo = null;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    @JsonProperty("id")
+    public String getId() {
+        return id;
+    }
+
+    @JsonProperty("id")
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @JsonProperty("node-type")
+    public String getNodeType() {
+        return nodeType;
+    }
+
+    @JsonProperty("node-type")
+    public void setNodeType(String nodeType) {
+        this.nodeType = nodeType;
+    }
+
+    @JsonProperty("url")
+    public String getUrl() {
+        return url;
+    }
+
+    @JsonProperty("url")
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    @JsonProperty("properties")
+    public Properties getProperties() {
+        return properties;
+    }
+
+    @JsonProperty("properties")
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+
+    @JsonProperty("related-to")
+    public List<RelatedTo> getRelatedTo() {
+        return relatedTo;
+    }
+
+    @JsonProperty("related-to")
+    public void setRelatedTo(List<RelatedTo> relatedTo) {
+        this.relatedTo = relatedTo;
+    }
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/model/VnfResult.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/VnfResult.java
new file mode 100644
index 0000000..9d4e0a2
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/model/VnfResult.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.annotation.*;
+import org.onap.osam.RelatedTo;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+        "id",
+        "node-type",
+        "url",
+        "properties",
+        "related-to"
+})
+public class VnfResult {
+
+    @JsonProperty("id")
+    public String id;
+    @JsonProperty("node-type")
+    public String nodeType;
+    @JsonProperty("url")
+    public String url;
+    @JsonProperty("properties")
+    public ServiceProperties properties;
+    @JsonProperty("related-to")
+    public List<RelatedTo> relatedTo = null;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/AAIProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/AAIProperties.java
new file mode 100644
index 0000000..cc5c1cf
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/AAIProperties.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+
+import org.onap.portalsdk.core.util.SystemProperties;
+
+public class AAIProperties extends SystemProperties {
+
+	//VID Specific
+	public static final String AAI_SERVER_URL_BASE = "aai.server.url.base";
+	
+	/** The Constant AAI_SERVER_URL. */
+	public static final String AAI_SERVER_URL = "aai.server.url";
+	
+	/** The Constant AAI_OLDSERVER_URL_BASE. */
+	public static final String AAI_OLDSERVER_URL_BASE = "aai.oldserver.url.base";
+	
+	/** The Constant AAI_OLDSERVER_URL. */
+	public static final String AAI_OLDSERVER_URL = "aai.oldserver.url";
+	
+	/** The Constant AAI_TRUSTSTORE_FILENAME. */
+	public static final String AAI_TRUSTSTORE_FILENAME = "aai.truststore.filename";
+	
+	/** The Constant AAI_TRUSTSTORE_PASSWD_X. */
+	public static final String AAI_TRUSTSTORE_PASSWD_X = "aai.truststore.passwd.x";
+	
+	/** The Constant AAI_KEYSTORE_FILENAME. */
+	public static final String AAI_KEYSTORE_FILENAME = "aai.keystore.filename";
+	
+	/** The Constant AAI_KEYSTORE_PASSWD_X. */
+	public static final String AAI_KEYSTORE_PASSWD_X = "aai.keystore.passwd.x";
+		
+	/** The Constant AAI_VID_USERNAME. */
+	public static final String AAI_VID_USERNAME = "aai.vid.username";
+
+	/** The Constant AAI_VID_PASSWD_X. */
+	public static final String AAI_VID_PASSWD_X = "aai.vid.passwd.x";
+	
+	/** The Constant FILESEPARTOR. */
+	public static final String FILESEPARTOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
+
+	/** The Constant AAI_USE_CLIENT_CERT */
+	public static final String AAI_USE_CLIENT_CERT = "aai.use.client.cert";
+	
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/AAIRestInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/AAIRestInterface.java
new file mode 100644
index 0000000..8a69076
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/AAIRestInterface.java
@@ -0,0 +1,355 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+
+import com.att.eelf.configuration.EELFLogger;
+import org.apache.commons.lang3.exception.ExceptionUtils;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.osam.aai.ExceptionWithRequestInfo;
+import org.onap.osam.aai.ResponseWithRequestInfo;
+import org.onap.osam.aai.exceptions.InvalidPropertyException;
+import org.onap.osam.utils.Logging;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Optional;
+import java.util.UUID;
+
+import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
+import static org.onap.osam.utils.Logging.REQUEST_ID_HEADER_KEY;
+
+
+public class AAIRestInterface {
+
+	protected EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AAIRestInterface.class);
+
+	protected final EELFLogger outgoingRequestsLogger = Logging.getRequestsLogger("aai");
+
+
+	/** The client. */
+	private Client client = null;
+
+	/** The rest srvr base URL. */
+	private String restSrvrBaseURL;
+
+	@Autowired
+	protected HttpsAuthClient httpsAuthClientFactory;
+	private final ServletRequestHelper servletRequestHelper;
+	private final SystemPropertyHelper systemPropertyHelper;
+
+	protected static final String START_STRING = " start";
+	protected static final String TRANSACTION_ID_HEADER = "X-TransactionId";
+	protected static final String FROM_APP_ID_HEADER = "X-FromAppId";
+	protected static final String SUCCESSFUL_API_MESSAGE = " REST api call was successful!";
+	protected static final String URL_DECLARATION = ", url=";
+
+	public AAIRestInterface(HttpsAuthClient httpsAuthClientFactory, ServletRequestHelper servletRequestHelper, SystemPropertyHelper systemPropertyHelper) {
+		this.httpsAuthClientFactory = httpsAuthClientFactory;
+		this.servletRequestHelper = servletRequestHelper;
+		this.systemPropertyHelper = systemPropertyHelper;
+		initRestClient();
+	}
+
+	/**
+	 * For testing purpose
+	 */
+	AAIRestInterface(Optional<Client> client,
+					 HttpsAuthClient httpsAuthClientFactory, ServletRequestHelper servletRequestHelper, SystemPropertyHelper systemPropertyHelper){
+		this.httpsAuthClientFactory = httpsAuthClientFactory;
+		this.servletRequestHelper = servletRequestHelper;
+		this.systemPropertyHelper = systemPropertyHelper;
+		if (client != null && client.isPresent()){
+			this.client = client.get();
+		}
+
+	}
+
+	/**
+	 * Encode URL.
+	 *
+	 * @param nodeKey the node key
+	 * @return the string
+	 * @throws UnsupportedEncodingException the unsupported encoding exception
+	 */
+	public String encodeURL (String nodeKey) throws UnsupportedEncodingException {
+		return URLEncoder.encode(nodeKey, "UTF-8").replaceAll("\\+", "%20");
+	}
+
+    private void initRestClient() {
+        initRestClient(false);
+    }
+
+
+	private void initRestClient(boolean propagateExceptions) {
+		if (client == null) {
+			try {
+				client = httpsAuthClientFactory.getClient(HttpClientMode.WITH_KEYSTORE);
+			} catch (Exception e) {
+				logger.info(EELFLoggerDelegate.errorLogger, "Exception in REST call to DB in initRestClient" + e.toString());
+				logger.debug(EELFLoggerDelegate.debugLogger, "Exception in REST call to DB : " + e.toString());
+				if (propagateExceptions) {
+					ExceptionUtils.rethrow(e);
+				}
+			}
+		}
+	}
+
+
+
+	/**
+	 * Sets the rest srvr base URL.
+	 *
+	 * @param baseURL the base URL
+	 */
+	public void SetRestSrvrBaseURL(String baseURL)
+	{
+		if (baseURL == null) {
+			logger.info(EELFLoggerDelegate.errorLogger, "REST Server base URL cannot be null.");
+			logger.debug(EELFLoggerDelegate.debugLogger, "REST Server base URL cannot be null.");
+		}
+
+		restSrvrBaseURL = baseURL;
+	}
+
+	/**
+	 * Gets the rest srvr base URL.
+	 *
+	 * @return the rest srvr base URL
+	 */
+	public String getRestSrvrBaseURL() {
+		return restSrvrBaseURL;
+	}
+
+
+	/**
+	 * Rest get.
+	 *
+	 * @param fromAppId the from app id
+	 * @param transId the trans id
+	 * @param requestUri the request uri
+	 * @param xml the xml
+	 * @return the string
+	 */
+	public ResponseWithRequestInfo RestGet(String fromAppId, String transId, String requestUri, boolean xml) {
+		return RestGet(fromAppId, transId, requestUri, xml, false);
+	}
+
+	public ResponseWithRequestInfo RestGet(String fromAppId, String transId, String requestUri, boolean xml, boolean propagateExceptions) {
+        String methodName = "RestGet";
+		String url = systemPropertyHelper.getFullServicePath(requestUri);
+		try {
+			initRestClient(propagateExceptions);
+
+			logger.debug(EELFLoggerDelegate.debugLogger, methodName + START_STRING);
+			logger.debug(EELFLoggerDelegate.debugLogger, url + " for the get REST API");
+
+			Logging.logRequest(outgoingRequestsLogger, HttpMethod.GET, url);
+
+			final Response response;
+            Invocation.Builder requestBuilder = client.target(url)
+                    .request()
+                    .accept(xml ? MediaType.APPLICATION_XML : MediaType.APPLICATION_JSON)
+                    .header(TRANSACTION_ID_HEADER, transId)
+                    .header(FROM_APP_ID_HEADER, fromAppId)
+                    .header("Content-Type", MediaType.APPLICATION_JSON)
+                    .header(REQUEST_ID_HEADER_KEY, extractOrGenerateRequestId());
+            response = systemPropertyHelper.isClientCertEnabled() ?
+                    requestBuilder.get() : authenticateRequest(requestBuilder).get();
+			Logging.logResponse(outgoingRequestsLogger, HttpMethod.GET, url, response);
+
+			if (response.getStatusInfo().equals(Response.Status.OK)) {
+				logger.debug(EELFLoggerDelegate.debugLogger, methodName + SUCCESSFUL_API_MESSAGE);
+				logger.info(EELFLoggerDelegate.errorLogger, methodName + SUCCESSFUL_API_MESSAGE);
+			} else {
+				logger.debug(EELFLoggerDelegate.debugLogger, getInvalidResponseLogMessage(url, methodName, response));
+			}
+			return new ResponseWithRequestInfo(response, url, HttpMethod.GET);
+		} catch (Exception e) {
+			logger.debug(EELFLoggerDelegate.debugLogger, getFailedResponseLogMessage(url, methodName, e));
+			if (propagateExceptions) {
+                throw new ExceptionWithRequestInfo(HttpMethod.GET, defaultIfNull(url, requestUri), e);
+            } else {
+                return new ResponseWithRequestInfo(null, url, HttpMethod.GET);
+            }
+		}
+	}
+
+	protected String extractOrGenerateRequestId() {
+		return servletRequestHelper.extractOrGenerateRequestId();
+	}
+
+
+	/**
+	 * Delete.
+	 *
+	 * @param sourceID the source ID
+	 * @param transId the trans id
+	 * @param path the path
+	 * @return true, if successful
+	 */
+	public boolean Delete(String sourceID, String transId, String path) {
+		String methodName = "Delete";
+		transId += ":" + UUID.randomUUID().toString();
+		logger.debug(methodName + START_STRING);
+		Boolean response = false;
+		String url = systemPropertyHelper.getFullServicePath(path);;
+		try {
+
+			initRestClient();
+			Logging.logRequest(outgoingRequestsLogger, HttpMethod.DELETE, url);
+			final Response cres = client.target(url)
+					.request()
+					.accept(MediaType.APPLICATION_JSON)
+					.header(TRANSACTION_ID_HEADER, transId)
+					.header(FROM_APP_ID_HEADER, sourceID)
+					.header(REQUEST_ID_HEADER_KEY, extractOrGenerateRequestId())
+					.delete();
+			Logging.logResponse(outgoingRequestsLogger, HttpMethod.DELETE, url, cres);
+			if (cres.getStatusInfo().equals(Response.Status.NOT_FOUND)) {
+				logger.debug(EELFLoggerDelegate.debugLogger, "Resource does not exist...: " + cres.getStatus()
+						+ ":" + cres.readEntity(String.class));
+				response = false;
+			} else if (cres.getStatusInfo().equals(Response.Status.OK) || cres.getStatusInfo().equals(Response.Status.NO_CONTENT)) {
+				logger.debug(EELFLoggerDelegate.debugLogger, "Resource " + url + " deleted");
+				logger.info(EELFLoggerDelegate.errorLogger, "Resource " + url + " deleted");
+				response = true;
+			} else {
+				logger.debug(EELFLoggerDelegate.debugLogger, "Deleting Resource failed: " + cres.getStatus()
+						+ ":" + cres.readEntity(String.class));
+				response = false;
+			}
+
+		} catch (Exception e) {
+			logger.debug(EELFLoggerDelegate.debugLogger, getFailedResponseLogMessage(url, methodName, e));
+		}
+		return response;
+	}
+
+
+	/**
+	 * Rest put.
+	 *
+	 * @param fromAppId the from app id
+	 * @param path the path
+	 * @param payload the payload
+	 * @param xml the xml
+	 * @return the string
+	 */
+	public Response RestPut(String fromAppId, String path, String payload, boolean xml) {
+		String methodName = "RestPut";
+		String url=systemPropertyHelper.getFullServicePath(path);
+		String transId = UUID.randomUUID().toString();
+		logger.debug(EELFLoggerDelegate.debugLogger, methodName + START_STRING);
+
+        Response response = null;
+		try {
+			initRestClient();
+			Logging.logRequest(outgoingRequestsLogger, HttpMethod.PUT, url, payload);
+			response = authenticateRequest(client.target(url)
+					.request()
+                    .accept(xml ? MediaType.APPLICATION_XML : MediaType.APPLICATION_JSON)
+					.header(TRANSACTION_ID_HEADER, transId)
+					.header(FROM_APP_ID_HEADER,  fromAppId))
+					.header(REQUEST_ID_HEADER_KEY, extractOrGenerateRequestId())
+					.put(Entity.entity(payload, MediaType.APPLICATION_JSON));
+			Logging.logResponse(outgoingRequestsLogger, HttpMethod.PUT, url, response);
+
+			if (response.getStatusInfo().getFamily().equals(Response.Status.Family.SUCCESSFUL)) {
+				logger.info(EELFLoggerDelegate.errorLogger, getValidResponseLogMessage(methodName));
+				logger.debug(EELFLoggerDelegate.debugLogger, getValidResponseLogMessage(methodName));
+			} else {
+				logger.debug(EELFLoggerDelegate.debugLogger, getInvalidResponseLogMessage(url, methodName, response));
+			}
+		} catch (Exception e) {
+			logger.debug(EELFLoggerDelegate.debugLogger, getFailedResponseLogMessage(url, methodName, e));
+		}
+		return response;
+	}
+
+
+
+	/**
+	 * Rest post.
+	 *
+	 * @param fromAppId the from app id
+	 * @param path the path
+	 * @param payload the payload
+	 * @param xml the xml
+	 * @return the string
+	 */
+	public Response RestPost(String fromAppId, String path, String payload, boolean xml) {
+		String methodName = "RestPost";
+		String url=systemPropertyHelper.getServiceBasePath(path);
+		String transId = UUID.randomUUID().toString();
+		logger.debug(EELFLoggerDelegate.debugLogger, methodName + START_STRING);
+
+        Response response = null;
+		try {
+			initRestClient();
+			Logging.logRequest(outgoingRequestsLogger, HttpMethod.POST, url, payload);
+			response = authenticateRequest(client.target(systemPropertyHelper.getServiceBasePath(path))
+					.request()
+                    .accept(xml ? MediaType.APPLICATION_XML : MediaType.APPLICATION_JSON)
+					.header(TRANSACTION_ID_HEADER, transId)
+					.header(FROM_APP_ID_HEADER,  fromAppId))
+					.header(REQUEST_ID_HEADER_KEY, extractOrGenerateRequestId())
+					.post(Entity.entity(payload, MediaType.APPLICATION_JSON));
+			Logging.logResponse(outgoingRequestsLogger, HttpMethod.POST, url, response);
+
+			if (response.getStatusInfo().getFamily().equals(Response.Status.Family.SUCCESSFUL)) {
+				logger.info(EELFLoggerDelegate.errorLogger, getValidResponseLogMessage(methodName));
+				logger.debug(EELFLoggerDelegate.debugLogger, getValidResponseLogMessage(methodName));
+			} else {
+				logger.debug(EELFLoggerDelegate.debugLogger, getInvalidResponseLogMessage(url, methodName, response));
+			}
+		} catch (Exception e) {
+			logger.debug(EELFLoggerDelegate.debugLogger, getFailedResponseLogMessage(url, methodName, e));
+		}
+		return response;
+	}
+
+	protected String getFailedResponseLogMessage(String path, String methodName, Exception e) {
+		return methodName + URL_DECLARATION + path + ", Exception: " + e.toString();
+	}
+
+	protected String getValidResponseLogMessage(String methodName) {
+		return methodName + URL_DECLARATION;
+	}
+
+	protected String getInvalidResponseLogMessage(String path, String methodName, Response cres) {
+		return methodName + " with status=" + cres.getStatus() + URL_DECLARATION + path;
+	}
+
+	private Invocation.Builder authenticateRequest(Invocation.Builder requestBuilder) throws InvalidPropertyException, UnsupportedEncodingException {
+		return requestBuilder
+				.header("Authorization", "Basic " + systemPropertyHelper.getEncodedCredentials());
+	}
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/CustomJacksonJaxBJsonProvider.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/CustomJacksonJaxBJsonProvider.java
new file mode 100644
index 0000000..19c8f6b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/CustomJacksonJaxBJsonProvider.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
+
+import javax.ws.rs.ext.Provider;
+
+@Provider
+public class CustomJacksonJaxBJsonProvider extends JacksonJaxbJsonProvider {
+
+    	private static ObjectMapper commonMapper = null;
+
+	    /**
+    	 * Instantiates a new custom jackson jax B json provider.
+    	 */
+    	public CustomJacksonJaxBJsonProvider() {
+	        if (commonMapper == null) {
+	            ObjectMapper mapper = new ObjectMapper();
+
+	            mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+	            
+	            mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+	            mapper.configure(SerializationFeature.INDENT_OUTPUT, false);
+	            mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+
+	            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+	            mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
+
+	            mapper.registerModule(new JaxbAnnotationModule());
+
+	            commonMapper = mapper;
+	        }
+	        super.setMapper(commonMapper);
+	    }
+	    
+	    /**
+    	 * Gets the mapper.
+    	 *
+    	 * @return the mapper
+    	 */
+    	public ObjectMapper getMapper() {
+	    	return commonMapper;
+	    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpClientMode.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpClientMode.java
new file mode 100644
index 0000000..fb68947
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpClientMode.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+public enum HttpClientMode {
+
+    WITH_KEYSTORE,
+    WITHOUT_KEYSTORE(),
+    UNSECURE,
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpsAuthClient.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpsAuthClient.java
new file mode 100644
index 0000000..bbac7e4
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpsAuthClient.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.HttpUrlConnectorProvider;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.osam.aai.exceptions.HttpClientBuilderException;
+
+import javax.net.ssl.HttpsURLConnection;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.security.GeneralSecurityException;
+
+import static org.onap.osam.aai.util.HttpClientMode.WITH_KEYSTORE;
+
+public class HttpsAuthClient {
+
+    private static final String SSL_TRUST_STORE = "javax.net.ssl.trustStore";
+    private static final String SSL_TRUST_STORE_PASS_WORD = "javax.net.ssl.trustStorePassword";
+
+    private final SystemPropertyHelper systemPropertyHelper;
+    private final SSLContextProvider sslContextProvider;
+
+    public HttpsAuthClient(String certFilePath, SystemPropertyHelper systemPropertyHelper, SSLContextProvider sslContextProvider) {
+        this.certFilePath = certFilePath;
+        this.systemPropertyHelper = systemPropertyHelper;
+        this.sslContextProvider = sslContextProvider;
+    }
+
+    private final String certFilePath;
+
+    static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsAuthClient.class);
+
+
+    /**
+     * Gets the client.
+     *
+     * @return the client
+     */
+    public Client getClient(HttpClientMode mode) throws GeneralSecurityException, IOException {
+        ClientConfig config = prepareClientConfig(mode);
+
+        try {
+            setSystemProperties();
+
+            ignoreHostname();
+
+            return systemPropertyHelper.isClientCertEnabled() ?
+                    getTrustedClient(config, getKeystorePath(), systemPropertyHelper.getDecryptedKeystorePassword(), mode)
+                    : getUntrustedClient(config);
+
+        } catch (Exception e) {
+            logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up config", e);
+            throw e;
+        }
+
+    }
+
+    private void ignoreHostname() {
+        HttpsURLConnection.setDefaultHostnameVerifier((hostname, session) -> true);
+    }
+
+    private Client getUntrustedClient(ClientConfig config) {
+        return ClientBuilder.newBuilder().withConfig(config).build().register(CustomJacksonJaxBJsonProvider.class);
+    }
+
+    private Client getTrustedClient(ClientConfig config, String keystorePath, String keystorePassword, HttpClientMode httpClientMode) throws HttpClientBuilderException {
+        return ClientBuilder.newBuilder()
+                .sslContext(sslContextProvider.getSslContext(keystorePath, keystorePassword, httpClientMode))
+                .hostnameVerifier((s, sslSession) -> true)
+                .withConfig(config)
+                .build()
+                .register(CustomJacksonJaxBJsonProvider.class);
+    }
+
+    private String getKeystorePath() {
+        return getCertificatesPath() + FileSystems.getDefault().getSeparator() + systemPropertyHelper.getAAIKeystoreFilename();
+    }
+
+    private void setSystemProperties() {
+        System.setProperty(SSL_TRUST_STORE, getCertificatesPath() + FileSystems.getDefault().getSeparator() +
+                systemPropertyHelper.getAAITruststoreFilename().orElse(""));
+        System.setProperty(SSL_TRUST_STORE_PASS_WORD, systemPropertyHelper.getDecryptedTruststorePassword());
+    }
+
+    private ClientConfig prepareClientConfig(HttpClientMode mode) {
+        ClientConfig config = new ClientConfig();
+        if (mode.equals(WITH_KEYSTORE)) {
+            config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, Boolean.TRUE);
+            config.connectorProvider(new HttpUrlConnectorProvider().useSetMethodWorkaround());
+        }
+        return config;
+    }
+
+    private String getCertificatesPath() {
+        return certFilePath;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpsComponentsClient.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpsComponentsClient.java
new file mode 100644
index 0000000..9e7e3d6
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/HttpsComponentsClient.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLContextBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.eclipse.jetty.util.security.Password;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.security.GeneralSecurityException;
+import java.security.KeyManagementException;
+import java.security.KeyStore;
+
+
+public class HttpsComponentsClient{
+
+	static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsComponentsClient.class);
+
+	public static CloseableHttpClient getClient(String certFilePath) {
+		CloseableHttpClient httpclient = null;
+		try {
+
+			String truststore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_FILENAME);
+			String truststore_password = SystemProperties.getProperty(AAIProperties.AAI_TRUSTSTORE_PASSWD_X);
+			String decrypted_truststore_password = Password.deobfuscate(truststore_password);
+			String keystore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_FILENAME);
+			String keystore_password = SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X);
+			String decrypted_keystore_password = Password.deobfuscate(keystore_password);
+			
+			SSLContextBuilder sslContextB = new SSLContextBuilder();
+			
+			KeyStore ks = KeyStore.getInstance("PKCS12");
+			char[] pwd = decrypted_keystore_password.toCharArray();
+
+			try(FileInputStream fin = new FileInputStream(keystore_path)) {
+				ks.load(fin, pwd);
+			}
+			catch (Exception e) {
+				logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up keystore");
+				logger.error(EELFLoggerDelegate.errorLogger, "Error loading  keystore materials: (keystore path: {}, obfuascated keystore password: {})", keystore_path, keystore_password);
+				throw new GenericUncheckedException(e);
+			}
+
+			sslContextB.loadKeyMaterial(ks, pwd);
+			
+			KeyStore ts = KeyStore.getInstance("JKS");
+			char[] pwd1 = decrypted_truststore_password.toCharArray();
+
+			try(FileInputStream fin1 = new FileInputStream(truststore_path)) {
+				ts.load(fin1, pwd1);
+			}
+			catch (Exception e) {
+				logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up truststore");
+				logger.error(EELFLoggerDelegate.errorLogger, "Error loading  truststore materials: (truststore path: {}, obfuascated truststore password: {})", truststore_path, truststore_password);
+				throw new GenericUncheckedException(e);
+			}
+
+			sslContextB.loadTrustMaterial(ts);
+			sslContextB.loadKeyMaterial(ks, pwd);
+			sslContextB.useTLS();
+			
+			SSLContext sslcontext = sslContextB.build();
+			
+			SSLConnectionSocketFactory sslFactory = new SSLConnectionSocketFactory(
+	                sslcontext,
+	                new String[] { "TLSv1.1", "TLSv1.2" },
+	                null,
+	            	SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER );
+		
+			httpclient = HttpClients.custom()
+	                .setSSLSocketFactory(sslFactory)
+	                .build();
+
+
+		} catch (GeneralSecurityException e) {
+			throw new GenericUncheckedException(e);
+		}
+		return httpclient;
+	}
+
+
+	
+}  
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/JettyObfuscationConversionCommandLineUtil.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/JettyObfuscationConversionCommandLineUtil.java
new file mode 100644
index 0000000..05e3f80
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/JettyObfuscationConversionCommandLineUtil.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+
+import org.apache.commons.cli.*;
+import org.eclipse.jetty.util.security.Password;
+
+
+public class JettyObfuscationConversionCommandLineUtil {
+	public static void main(String[] args){
+		Options options = new Options();
+		options.addOption("e", true, "obfuscate the given string");
+		options.addOption("d", true, "deobfuscate the given string");
+		
+		CommandLineParser parser = new BasicParser();
+		
+		try {
+			CommandLine cmd = parser.parse(options, args);
+			String toProcess = null;
+			
+			if (cmd.hasOption("e")){
+				toProcess = cmd.getOptionValue("e");
+				String encoded = Password.obfuscate(toProcess);
+				System.out.println(encoded);
+			} else if (cmd.hasOption("d")) {
+				toProcess = cmd.getOptionValue("d");
+				String decoded_str = Password.deobfuscate(toProcess);
+				System.out.println(decoded_str);
+			} else {
+				usage();
+			}
+		} catch (ParseException e) {
+			System.out.println("failed to parse input");
+			System.out.println(e.toString());
+			usage();
+		} catch (Exception e) {
+			System.out.println("exception:" + e.toString());
+		}
+	}
+	
+	private static void usage(){
+		System.out.println("usage:");
+		System.out.println("-e [string] to obfuscate");
+		System.out.println("-d [string] to deobfuscate");
+		System.out.println("-h help");
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/SSLContextProvider.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/SSLContextProvider.java
new file mode 100644
index 0000000..3706456
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/SSLContextProvider.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.osam.aai.exceptions.HttpClientBuilderException;
+
+import javax.net.ssl.*;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.KeyStore;
+import java.security.cert.X509Certificate;
+
+public class SSLContextProvider {
+
+    private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SSLContextProvider.class);
+
+    public SSLContext getSslContext(String keystorePath, String keystorePassword, HttpClientMode httpClientMode) throws HttpClientBuilderException {
+        try {
+            final SSLContext ctx = SSLContext.getInstance("TLSv1.2");
+            KeyManager[] keyManagers = getKeyManagerFactory(keystorePath, keystorePassword, httpClientMode);
+            ctx.init(keyManagers, getTrustManager(httpClientMode), null);
+            return ctx;
+        } catch (IOException | GeneralSecurityException e) {
+            logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up ssl context.");
+            throw new HttpClientBuilderException(e);
+        }
+    }
+
+    private KeyManager[] getKeyManagerFactory(String keystorePath, String keystorePassword, HttpClientMode httpClientMode) throws IOException, GeneralSecurityException {
+        switch (httpClientMode) {
+            case WITH_KEYSTORE:
+                final KeyManagerFactory kmf;
+                try (FileInputStream fin = new FileInputStream(keystorePath)) {
+                    kmf = KeyManagerFactory.getInstance("SunX509");
+                    KeyStore ks = KeyStore.getInstance("PKCS12");
+                    char[] pwd = keystorePassword.toCharArray();
+                    ks.load(fin, pwd);
+                    kmf.init(ks, pwd);
+                } catch (Exception e) {
+                    logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up kmf");
+                    logger.error(EELFLoggerDelegate.errorLogger, "Error setting up kmf (keystore path: {}, deobfuascated keystore password: {})", keystorePath, keystorePassword, e);
+                    throw e;
+                }
+                return kmf.getKeyManagers();
+
+            case WITHOUT_KEYSTORE:
+                return null;
+
+            default:
+                logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up getKeyManagerFactory. HttpClientMode is " + httpClientMode);
+                throw new IllegalStateException("Error setting up getKeyManagerFactory. HttpClientMode is " + httpClientMode);
+        }
+    }
+
+    private TrustManager[] getTrustManager(HttpClientMode httpClientMode) {
+        //Creating a trustManager that will accept all certificates.
+        //TODO - remove this one the POMBA certificate is added to the tomcat_keystore file
+        TrustManager[] trustAllCerts = null;
+        if (httpClientMode == HttpClientMode.UNSECURE) {
+
+            trustAllCerts = new TrustManager[]{new X509TrustManager() {
+                public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+                    return new java.security.cert.X509Certificate[]{};
+                }
+
+                public void checkClientTrusted(X509Certificate[] certs, String authType) {
+                    // trust all
+                }
+
+                public void checkServerTrusted(X509Certificate[] certs, String authType) {
+                    // trust all
+                }
+            }};
+        }
+        return trustAllCerts;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/ServletRequestHelper.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/ServletRequestHelper.java
new file mode 100644
index 0000000..20f0040
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/ServletRequestHelper.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import org.onap.osam.utils.Logging;
+
+public class ServletRequestHelper {
+
+    public String extractOrGenerateRequestId() {
+        return Logging.extractOrGenerateRequestId();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/aai/util/SystemPropertyHelper.java b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/SystemPropertyHelper.java
new file mode 100644
index 0000000..34d7bcc
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/aai/util/SystemPropertyHelper.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import org.eclipse.jetty.util.security.Password;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.aai.exceptions.InvalidPropertyException;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Base64;
+import java.util.Optional;
+
+public class SystemPropertyHelper {
+
+    public Optional<String> getAAIUseClientCert(){
+        return getSystemProperty(AAIProperties.AAI_USE_CLIENT_CERT);
+    }
+
+    public Optional<String> getAAIServerUrl(){
+        return getSystemProperty(AAIProperties.AAI_SERVER_URL);
+    }
+
+    public Optional<String> getAAIServerBaseUrl(){
+        return getSystemProperty(AAIProperties.AAI_SERVER_URL_BASE);
+    }
+
+    public Optional<String> getAAIVIDUsername(){
+        return getSystemProperty(AAIProperties.AAI_VID_USERNAME);
+    }
+
+    public Optional<String> getAAIVIDPasswd(){
+        return getSystemProperty(AAIProperties.AAI_VID_PASSWD_X);
+    }
+
+    public Optional<String> getAAITruststorePasswd(){
+        return getSystemProperty(AAIProperties.AAI_TRUSTSTORE_PASSWD_X);
+    }
+
+    public Optional<String> getAAITruststoreFilename(){
+        return getSystemProperty(AAIProperties.AAI_TRUSTSTORE_FILENAME);
+    }
+
+    public Optional<String> getAAIKeystoreFilename(){
+        return getSystemProperty(AAIProperties.AAI_KEYSTORE_FILENAME);
+    }
+
+    public Optional<String> getAAIKeystorePasswd(){
+        return getSystemProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X);
+    }
+
+    public boolean isClientCertEnabled() {
+        return getAAIUseClientCert().orElse("false").equalsIgnoreCase("true");
+    }
+
+    public String getFullServicePath(String path) {
+        return getAAIServerUrl().orElse("") + path;
+    }
+
+    public String getServiceBasePath(String path) {
+        return getAAIServerBaseUrl().orElse("") + path;
+    }
+
+    public String getEncodedCredentials() throws InvalidPropertyException, UnsupportedEncodingException {
+        String vidUsername = getAAIVIDUsername().orElseThrow(InvalidPropertyException::new);
+        String vidPassword = Password.deobfuscate(getAAIVIDPasswd().orElseThrow(InvalidPropertyException::new));
+        return Base64.getEncoder().encodeToString((vidUsername + ":" + vidPassword).getBytes("utf-8"));
+    }
+
+    public String getDecryptedTruststorePassword(){
+        return Password.deobfuscate(getAAITruststorePasswd().orElse(""));
+    }
+
+    public String getDecryptedKeystorePassword(){
+        return Password.deobfuscate(getAAIKeystorePasswd().orElse(""));
+    }
+
+    private Optional<String> getSystemProperty(String propertyKey){
+        return Optional.ofNullable(SystemProperties.getProperty(propertyKey));
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/client/HttpBasicClient.java b/onap-enabler-be/src/main/java/org/onap/osam/client/HttpBasicClient.java
new file mode 100644
index 0000000..171d2f0
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/client/HttpBasicClient.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientProperties;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+
+public class HttpBasicClient{
+	
+	@Autowired 
+	private ServletContext servletContext;
+	
+	/** The logger. */
+	EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpBasicClient.class);
+	
+	/** The Constant dateFormat. */
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+	
+	/**
+	 * Obtain a basic HTTP client .
+	 *
+	 * @return Client client object
+	 * @throws Exception the exception
+	 */
+	public static Client getClient() {
+		
+		ClientConfig config = new ClientConfig();
+		config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
+		
+		return ClientBuilder.newClient(config)
+				.register(org.onap.osam.aai.util.CustomJacksonJaxBJsonProvider.class);
+	}	
+}  
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/client/HttpsBasicClient.java b/onap-enabler-be/src/main/java/org/onap/osam/client/HttpsBasicClient.java
new file mode 100644
index 0000000..b0fceb7
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/client/HttpsBasicClient.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+import org.eclipse.jetty.util.security.Password;
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientProperties;
+import org.onap.osam.properties.VidProperties;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+ 
+public class HttpsBasicClient{
+	
+	static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsBasicClient.class);
+	
+	/** The Constant dateFormat. */
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+	
+	/**
+	 * Retrieve an SSL client.
+	 *
+	 * @return Client The SSL client
+	 * @throws Exception the exception
+	 */
+	public static Client getClient() {
+		String methodName = "getClient";
+		ClientConfig config = new ClientConfig();
+
+		SSLContext ctx = null;
+		
+		try {
+			
+			config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
+			
+			String truststore_path = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_FILENAME);
+			logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " truststore_path=" + truststore_path);
+			String truststore_password = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_PASSWD_X);
+			
+			
+			String decrypted_truststore_password = Password.deobfuscate(truststore_password);
+			//logger.debug(dateFormat.format(new Date()) + " " + methodName + " decrypted_truststore_password=" + decrypted_truststore_password);
+			
+			File tr = new File (truststore_path);
+			logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " absolute truststore path=" + tr.getAbsolutePath());
+			
+		    System.setProperty("javax.net.ssl.trustStore", truststore_path);
+		    System.setProperty("javax.net.ssl.trustStorePassword", decrypted_truststore_password);
+			HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){
+			    public boolean verify(String string,SSLSession ssls) {
+			        return true;
+			    }
+			});
+	
+			//May need to make the algorithm a parameter. MSO requires TLSv1.1	or TLSv1.2
+			ctx = SSLContext.getInstance("TLSv1.2");
+
+			ctx.init(null, null, null);
+			//config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
+			//							new HTTPSProperties( , ctx));
+			
+			return ClientBuilder.newBuilder()
+				.sslContext(ctx)
+				.hostnameVerifier(new HostnameVerifier() {
+					@Override
+					public boolean verify( String s, SSLSession sslSession ) {
+						return true;
+					}
+				}).withConfig(config)
+				.build()
+				.register(org.onap.osam.aai.util.CustomJacksonJaxBJsonProvider.class);
+			
+		} catch (Exception e) {
+			logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up config: exiting", e);
+			return null;
+		}
+	}
+}  
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/client/SyncRestClient.java b/onap-enabler-be/src/main/java/org/onap/osam/client/SyncRestClient.java
new file mode 100644
index 0000000..62d673c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/client/SyncRestClient.java
@@ -0,0 +1,231 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+import io.joshworks.restclient.http.HttpResponse;
+import io.joshworks.restclient.http.JsonNode;
+import io.joshworks.restclient.http.RestClient;
+import io.joshworks.restclient.http.exceptions.RestClientException;
+import io.joshworks.restclient.http.mapper.ObjectMapper;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.eclipse.jetty.util.security.Password;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.conn.ssl.SSLContexts;
+import io.vavr.CheckedFunction1;
+import lombok.SneakyThrows;
+import lombok.val;
+
+import java.security.UnrecoverableKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.KeyManagementException;
+import java.security.cert.CertificateException;
+import javax.net.ssl.SSLException;
+import java.security.KeyStoreException;
+import java.text.SimpleDateFormat;
+import javax.net.ssl.SSLContext;
+import java.io.FileInputStream;
+import java.security.KeyStore;
+import java.text.DateFormat;
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Date;
+import java.util.Map;
+import java.io.File;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.properties.VidProperties;
+
+public class SyncRestClient implements SyncRestClientInterface {
+
+    private static final String CANNOT_INITIALIZE_CUSTOM_HTTP_CLIENT = "Cannot initialize custom http client from current configuration. Using default one.";
+    private static final String TRY_TO_CALL_OVER_HTTP = "SSL Handshake problem occured. Will try to retry over Http.";
+    private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SyncRestClient.class);
+    private static final DateFormat DATE_FORMAT = new SimpleDateFormat("HH:mm:ss:SSSS");
+    private static final String[] SUPPORTED_SSL_VERSIONS = {"TLSv1", "TLSv1.2"};
+    private static final String HTTPS_SCHEMA = "https://";
+    private static final String HTTP_SCHEMA = "http://";
+
+    private RestClient restClient;
+
+    public SyncRestClient() {
+        restClient = RestClient.newClient().objectMapper(defaultObjectMapper()).httpClient(defaultHttpClient()).build();
+    }
+
+    public SyncRestClient(ObjectMapper objectMapper) {
+        restClient = RestClient.newClient().objectMapper(objectMapper).httpClient(defaultHttpClient()).build();
+    }
+
+    public SyncRestClient(CloseableHttpClient httpClient) {
+        restClient = RestClient.newClient().objectMapper(defaultObjectMapper()).httpClient(httpClient).build();
+    }
+
+    public SyncRestClient(CloseableHttpClient httpClient, ObjectMapper objectMapper) {
+        restClient = RestClient.newClient().objectMapper(objectMapper).httpClient(httpClient).build();
+    }
+
+    @Override
+    public HttpResponse<JsonNode> post(String url, Map<String, String> headers, Object body) {
+        return callWithRetryOverHttp(url, url2 -> restClient.post(url2).headers(headers).body(body).asJson());
+    }
+
+    @Override
+    public <T> HttpResponse<T> post(String url, Map<String, String> headers, Object body, Class<T> responseClass) {
+        return callWithRetryOverHttp(url,
+            url2 -> restClient.post(url2).headers(headers).body(body).asObject(responseClass));
+    }
+
+    @Override
+    public HttpResponse<JsonNode> get(String url, Map<String, String> headers, Map<String, String> routeParams) {
+        return callWithRetryOverHttp(url, url2 -> {
+            val getRequest = restClient.get(url2).headers(headers);
+            routeParams.forEach(getRequest::routeParam);
+            return getRequest.asJson();
+        });
+    }
+
+    @Override
+    public <T> HttpResponse<T> get(String url, Map<String, String> headers, Map<String, String> routeParams,
+        Class<T> responseClass) {
+        return callWithRetryOverHttp(url, url2 -> {
+            val getRequest = restClient.get(url2).headers(headers);
+            routeParams.forEach(getRequest::routeParam);
+            return getRequest.asObject(responseClass);
+        });
+    }
+
+    @Override
+    public HttpResponse<InputStream> getStream(String url, Map<String, String> headers,
+        Map<String, String> routeParams) {
+        return callWithRetryOverHttp(url, url2 -> {
+            val getRequest = restClient.get(url2).headers(headers);
+            routeParams.forEach(getRequest::routeParam);
+            return getRequest.asBinary();
+        });
+    }
+
+    @Override
+    public HttpResponse<JsonNode> put(String url, Map<String, String> headers, Object body) {
+        return callWithRetryOverHttp(url, url2 -> restClient.put(url2).headers(headers).body(body).asJson());
+    }
+
+    @Override
+    public <T> HttpResponse<T> put(String url, Map<String, String> headers, Object body, Class<T> responseClass) {
+        return callWithRetryOverHttp(url,
+            url2 -> restClient.put(url2).headers(headers).body(body).asObject(responseClass));
+    }
+
+    @Override
+    public <T> HttpResponse<T> delete(String url, Map<String, String> headers, Class<T> responseClass) {
+        return callWithRetryOverHttp(url, url2 -> restClient.delete(url2).headers(headers).asObject(responseClass));
+    }
+
+    @Override
+    public HttpResponse<JsonNode> delete(String url, Map<String, String> headers) {
+        return callWithRetryOverHttp(url, url2 -> restClient.delete(url2).headers(headers).asJson());
+    }
+
+    @Override
+    public void destroy() {
+        restClient.shutdown();
+    }
+
+    @SneakyThrows
+    private <T> HttpResponse<T> callWithRetryOverHttp(String url,
+                                                      CheckedFunction1<String, HttpResponse<T>> httpRequest) {
+        try {
+            return httpRequest.apply(url);
+        } catch (RestClientException e) {
+            if (e.getCause() instanceof SSLException) {
+                logger.warn(EELFLoggerDelegate.debugLogger,
+                        DATE_FORMAT.format(new Date()) + TRY_TO_CALL_OVER_HTTP, e);
+                return httpRequest.apply(url.replaceFirst(HTTPS_SCHEMA, HTTP_SCHEMA));
+            }
+            throw e;
+        }
+    }
+
+    private ObjectMapper defaultObjectMapper() {
+        val objectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
+
+        return new ObjectMapper() {
+            @Override
+            @SneakyThrows
+            public <T> T readValue(String value, Class<T> aClass) {
+                return objectMapper.readValue(value, aClass);
+            }
+
+            @Override
+            @SneakyThrows
+            public String writeValue(Object value) {
+                return objectMapper.writeValueAsString(value);
+            }
+        };
+    }
+
+    private CloseableHttpClient defaultHttpClient() {
+        try {
+            val trustStorePath = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_FILENAME);
+            val trustStorePass = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_PASSWD_X);
+            val decryptedTrustStorePass = Password.deobfuscate(trustStorePass);
+
+            val trustStore = loadTruststore(trustStorePath, decryptedTrustStorePass);
+            val sslContext = trustOwnCACerts(decryptedTrustStorePass, trustStore);
+            val sslSf = allowTLSProtocols(sslContext);
+
+            return HttpClients.custom().setSSLSocketFactory(sslSf).build();
+        } catch (IOException | CertificateException | UnrecoverableKeyException | NoSuchAlgorithmException | KeyStoreException | KeyManagementException e) {
+            logger.warn(EELFLoggerDelegate.debugLogger,
+                DATE_FORMAT.format(new Date()) + CANNOT_INITIALIZE_CUSTOM_HTTP_CLIENT, e);
+            return HttpClients.createDefault();
+        }
+    }
+
+    private SSLConnectionSocketFactory allowTLSProtocols(SSLContext sslcontext) {
+        return new SSLConnectionSocketFactory(
+            sslcontext,
+            SUPPORTED_SSL_VERSIONS,
+            null,
+            SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+    }
+
+    private SSLContext trustOwnCACerts(String trustStorePass, KeyStore trustStore)
+        throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {
+        return SSLContexts.custom()
+            .useTLS()
+            .loadKeyMaterial(trustStore, trustStorePass.toCharArray())
+            .loadTrustMaterial(trustStore, new TrustSelfSignedStrategy())
+            .build();
+    }
+
+    private KeyStore loadTruststore(String trustStorePath, String trustStorePass)
+        throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException {
+        val trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
+        try (FileInputStream instream = new FileInputStream(new File(trustStorePath))) {
+            trustStore.load(instream, trustStorePass.toCharArray());
+        }
+        return trustStore;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/client/SyncRestClientInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/client/SyncRestClientInterface.java
new file mode 100644
index 0000000..a7af206
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/client/SyncRestClientInterface.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+import io.joshworks.restclient.http.HttpResponse;
+import io.joshworks.restclient.http.JsonNode;
+
+import java.io.InputStream;
+import java.util.Map;
+
+public interface SyncRestClientInterface {
+    class HEADERS {
+        public static final String CONTENT_TYPE = "Content-Type";
+        public static final String AUTHORIZATION = "Authorization";
+        public static final String X_ECOMP_INSTANCE_ID = "X-ECOMP-InstanceID";
+    }
+
+    HttpResponse<JsonNode> post(String url, Map<String, String> headers, Object body);
+
+    <T> HttpResponse<T> post(String url, Map<String, String> headers, Object body, Class<T> aClass);
+
+    HttpResponse<JsonNode> get(String url, Map<String, String> headers, Map<String, String> routeParams);
+
+    <T> HttpResponse<T> get(String url, Map<String, String> headers, Map<String, String> routeParams, Class<T> aClass);
+
+    HttpResponse<InputStream> getStream(String url, Map<String, String> headers, Map<String, String> routeParams);
+
+    HttpResponse<JsonNode> put(String url, Map<String, String> headers, Object body);
+
+    <T> HttpResponse<T> put(String url, Map<String, String> headers, Object body, Class<T> aClass);
+
+    <T> HttpResponse<T> delete(String url, Map<String, String> headers, Class<T> aClass);
+
+    HttpResponse<JsonNode> delete(String url, Map<String, String> headers);
+
+    void destroy();
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/AaiController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/AaiController.java
new file mode 100644
index 0000000..398b968
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/AaiController.java
@@ -0,0 +1,749 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.ServiceInstancesSearchResults;
+import org.onap.osam.aai.SubscriberData;
+import org.onap.osam.aai.SubscriberFilteredResults;
+import org.onap.osam.aai.model.AaiGetInstanceGroupsByCloudRegion;
+import org.onap.osam.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
+import org.onap.osam.aai.model.AaiGetPnfs.Pnf;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.aai.util.AAIRestInterface;
+import org.onap.osam.model.VersionByInvariantIdsRequest;
+import org.onap.osam.roles.Role;
+import org.onap.osam.roles.RoleProvider;
+import org.onap.osam.roles.RoleValidator;
+import org.onap.osam.services.IAaiService;
+import org.onap.portalsdk.core.controller.RestrictedBaseController;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.HandlerMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import static org.onap.osam.utils.Logging.getMethodName;
+
+
+@RestController
+public class AaiController extends RestrictedBaseController {
+    final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+    /**
+     * The from app id.
+     */
+    protected String fromAppId = "VidAaiController";
+    /**
+     * The logger.
+     */
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(AaiController.class);
+    /**
+     * The model.
+     */
+    private Map<String, Object> model = new HashMap<String, Object>();
+    /**
+     * The servlet context.
+     */
+    @Autowired
+    private ServletContext servletContext;
+    /**
+     * aai service
+     */
+    @Autowired
+    private IAaiService aaiService;
+    @Autowired
+    private RoleProvider roleProvider;
+
+    @Autowired
+    private AAIRestInterface aaiRestInterface;
+
+    /**
+     * Welcome method.
+     *
+     * @param request the request
+     * @return ModelAndView The view
+     */
+    @RequestMapping(value = {"/subscriberSearch"}, method = RequestMethod.GET)
+    public ModelAndView welcome(HttpServletRequest request) {
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== AaiController welcome start");
+        return new ModelAndView(getViewName());
+    }
+
+   /* @RequestMapping(value = {"/aai_get_aic_zones"}, method = RequestMethod.GET)
+    public ResponseEntity<String> getAicZones(HttpServletRequest request) throws IOException {
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== getAicZones controller start");
+        AaiResponse response = aaiService.getAaiZones();
+        return aaiResponseToResponseEntity(response);
+    }*/
+
+    @RequestMapping(value = {"/aai_get_aic_zone_for_pnf/{globalCustomerId}/{serviceType}/{serviceId}"}, method = RequestMethod.GET)
+    public ResponseEntity<String> getAicZoneForPnf(@PathVariable("globalCustomerId") String globalCustomerId ,@PathVariable("serviceType") String serviceType , @PathVariable("serviceId") String serviceId ,HttpServletRequest request) throws IOException {
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== getAicZoneForPnf controller start");
+        AaiResponse response = aaiService.getAicZoneForPnf(globalCustomerId , serviceType , serviceId);
+        return aaiResponseToResponseEntity(response);
+    }
+
+    @RequestMapping(value = {"/aai_get_instance_groups_by_vnf_instance_id/{vnfInstanceId}"}, method = RequestMethod.GET)
+    public ResponseEntity<String> getInstanceGroupsByVnfInstanceId(@PathVariable("vnfInstanceId") String vnfInstanceId ,HttpServletRequest request) throws IOException {
+        AaiResponse response = aaiService.getInstanceGroupsByVnfInstanceId(vnfInstanceId);
+        return aaiResponseToResponseEntity(response);
+    }
+    /**
+     * Get services from a&ai.
+     *
+     * @return ResponseEntity<String> The response entity with the logged in user uuid.
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = {"/getuserID"}, method = RequestMethod.GET)
+    public ResponseEntity<String> getUserID(HttpServletRequest request) {
+
+        String userId = ControllersUtils.extractUserId(request);
+
+        return new ResponseEntity<String>(userId, HttpStatus.OK);
+    }
+
+    /**
+     * Get services from a&ai.
+     *
+     * @return ResponseEntity<String> The response entity
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/aai_get_services", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> doGetServices(HttpServletRequest request) throws IOException {
+        RoleValidator roleValidator = new RoleValidator(roleProvider.getUserRoles(request));
+
+        AaiResponse subscriberList = aaiService.getServices(roleValidator);
+        ResponseEntity<String> responseEntity = aaiResponseToResponseEntity(subscriberList);
+
+        return responseEntity;
+    }
+
+
+    @RequestMapping(value = {"/aai_get_version_by_invariant_id"}, method = RequestMethod.POST)
+    public ResponseEntity<String> getVersionByInvariantId(HttpServletRequest request, @RequestBody VersionByInvariantIdsRequest versions) {
+        ResponseEntity<String> responseEntity;
+        ObjectMapper objectMapper = new ObjectMapper();
+
+        Response result = aaiService.getVersionByInvariantId(versions.versions);
+
+        return new ResponseEntity<String>(result.readEntity(String.class), HttpStatus.OK);
+    }
+
+
+    private ResponseEntity<String> aaiResponseToResponseEntity(AaiResponse aaiResponseData)
+            throws IOException {
+        ResponseEntity<String> responseEntity;
+        ObjectMapper objectMapper = new ObjectMapper();
+        if (aaiResponseData.getHttpCode() == 200) {
+            responseEntity = new ResponseEntity<String>(objectMapper.writeValueAsString(aaiResponseData.getT()), HttpStatus.OK);
+        } else {
+            responseEntity = new ResponseEntity<String>(aaiResponseData.getErrorMessage(), HttpStatus.valueOf(aaiResponseData.getHttpCode()));
+        }
+        return responseEntity;
+    }
+
+    /**
+     * Lookup single service instance in a&ai.  Get the service-subscription and customer, too, i guess?
+     *
+     * @param serviceInstanceId the service instance Id
+     * @return ResponseEntity The response entity
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/aai_get_service_instance/{service-instance-id}/{service-instance-type}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> doGetServiceInstance(@PathVariable("service-instance-id") String serviceInstanceId, @PathVariable("service-instance-type") String serviceInstanceType) {
+        Response resp = null;
+
+        if (serviceInstanceType.equalsIgnoreCase("Service Instance Id")) {
+            resp = doAaiGet(
+                    "search/nodes-query?search-node-type=service-instance&filter=service-instance-id:EQUALS:"
+                            + serviceInstanceId, false);
+        } else {
+            resp = doAaiGet(
+                    "search/nodes-query?search-node-type=service-instance&filter=service-instance-name:EQUALS:"
+                            + serviceInstanceId, false);
+        }
+        return convertResponseToResponseEntity(resp);
+    }
+
+    /**
+     * Get services from a&ai.
+     *
+     * @param globalCustomerId      the global customer id
+     * @param serviceSubscriptionId the service subscription id
+     * @return ResponseEntity The response entity
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/aai_get_service_subscription/{global-customer-id}/{service-subscription-id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> doGetServices(@PathVariable("global-customer-id") String globalCustomerId,
+                                                @PathVariable("service-subscription-id") String serviceSubscriptionId) {
+        Response resp = doAaiGet("business/customers/customer/" + globalCustomerId
+                + "/service-subscriptions/service-subscription/" + serviceSubscriptionId + "?depth=0", false);
+        return convertResponseToResponseEntity(resp);
+    }
+
+    /**
+     * Obtain the subscriber list from a&ai.
+     *
+     * @param fullSet the full set
+     * @return ResponseEntity The response entity
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/aai_get_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> doGetSubscriberList(HttpServletRequest request, @DefaultValue("n") @QueryParam("fullSet") String fullSet) throws IOException {
+        return getFullSubscriberList(request);
+    }
+
+    /**
+     * Obtain the Target Prov Status from the System.Properties file.
+     *
+     * @return ResponseEntity The response entity
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/get_system_prop_vnf_prov_status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> getTargetProvStatus() {
+        String p = SystemProperties.getProperty("aai.vnf.provstatus");
+        return new ResponseEntity<String>(p, HttpStatus.OK);
+    }
+
+
+    /**
+     * Obtain the Target Prov Status from the System.Properties file.
+     *
+     * @return ResponseEntity The response entity
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/get_operational_environments", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(@RequestParam(value="operationalEnvironmentType", required = false) String operationalEnvironmentType,
+                                                           @RequestParam(value="operationalEnvironmentStatus", required = false) String operationalEnvironmentStatus) {
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({}, {})", getMethodName(), operationalEnvironmentType, operationalEnvironmentStatus);
+        AaiResponse<OperationalEnvironmentList> response = aaiService.getOperationalEnvironments(operationalEnvironmentType,operationalEnvironmentStatus);
+        if (response.getHttpCode() != 200) {
+            String errorMessage = getAaiErrorMessage(response.getErrorMessage());
+            if(errorMessage != null) {
+                response = new AaiResponse<OperationalEnvironmentList>(response.getT(), errorMessage, response.getHttpCode());
+            }
+        }
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), response);
+        return response;
+    }
+
+    /**
+     * Obtain the full subscriber list from a&ai.
+     * <p>
+     * g @return ResponseEntity The response entity
+     *
+     * @throws IOException          Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/aai_get_full_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> getFullSubscriberList(HttpServletRequest request) throws IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        ResponseEntity<String> responseEntity;
+        RoleValidator roleValidator = new RoleValidator(roleProvider.getUserRoles(request));
+        SubscriberFilteredResults subscriberList = aaiService.getFullSubscriberList(roleValidator);
+        if (subscriberList.getHttpCode() == 200) {
+            responseEntity = new ResponseEntity<String>(objectMapper.writeValueAsString(subscriberList.getSubscriberList()), HttpStatus.OK);
+        } else {
+            responseEntity = new ResponseEntity<String>(subscriberList.getErrorMessage(), HttpStatus.valueOf(subscriberList.getHttpCode()));
+        }
+
+
+        return responseEntity;
+    }
+
+
+    @RequestMapping(value = "/get_vnf_data_by_globalid_and_service_type/{globalCustomerId}/{serviceType}",
+            method = RequestMethod.GET,
+            produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> getVnfDataByGlobalIdAndServiceType(HttpServletRequest request,
+                                                                     @PathVariable("globalCustomerId") String globalCustomerId,
+                                                                     @PathVariable("serviceType") String serviceType) {
+
+        Response resp = aaiService.getVNFData(globalCustomerId, serviceType);
+        return convertResponseToResponseEntity(resp);
+    }
+
+
+    /**
+     * Refresh the subscriber list from a&ai.
+     *
+     * @return ResponseEntity The response entity
+     * @throws IOException Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/aai_refresh_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> doRefreshSubscriberList() {
+        Response resp = getSubscribers(false);
+        return convertResponseToResponseEntity(resp);
+    }
+
+    /**
+     * Refresh the full subscriber list from a&ai.
+     *
+     * @return ResponseEntity The response entity
+     * @throws IOException Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/aai_refresh_full_subscribers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> doRefreshFullSubscriberList() {
+        Response resp = getSubscribers(false);
+        return convertResponseToResponseEntity(resp);
+    }
+
+    /**
+     * Get subscriber details from a&ai.
+     *
+     * @param subscriberId the subscriber id
+     * @return ResponseEntity The response entity
+     */
+    @RequestMapping(value = "/aai_sub_details/{subscriberId}", method = RequestMethod.GET)
+    public ResponseEntity<String> GetSubscriberDetails(HttpServletRequest request, @PathVariable("subscriberId") String subscriberId) throws IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        ResponseEntity responseEntity;
+        List<Role> roles = roleProvider.getUserRoles(request);
+        RoleValidator roleValidator = new RoleValidator(roles);
+        AaiResponse<SubscriberData> subscriberData = aaiService.getSubscriberData(subscriberId, roleValidator);
+        String httpMessage = subscriberData.getT() != null ?
+                objectMapper.writeValueAsString(subscriberData.getT()) :
+                subscriberData.getErrorMessage();
+
+        responseEntity = new ResponseEntity<String>(httpMessage, HttpStatus.valueOf(subscriberData.getHttpCode()));
+        return responseEntity;
+    }
+
+    /**
+     * Get service instances that match the query from a&ai.
+     *
+     * @param subscriberId the subscriber id
+     * @param instanceIdentifier the service instance name or id.
+     * @param projects the projects that are related to the instance
+     * @param owningEntities the owningEntities that are related to the instance
+     * @return ResponseEntity The response entity
+     */
+    @RequestMapping(value = "/search_service_instances", method = RequestMethod.GET)
+    public ResponseEntity<String> SearchServiceInstances(HttpServletRequest request,
+                                                         @RequestParam(value="subscriberId", required = false) String subscriberId,
+                                                         @RequestParam(value="serviceInstanceIdentifier", required = false) String instanceIdentifier,
+                                                         @RequestParam(value="project", required = false) List<String> projects,
+                                                         @RequestParam(value="owningEntity", required = false) List<String> owningEntities) throws IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        ResponseEntity responseEntity;
+
+        List<Role> roles = roleProvider.getUserRoles(request);
+        RoleValidator roleValidator = new RoleValidator(roles);
+
+        AaiResponse<ServiceInstancesSearchResults> searchResult = aaiService.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator, owningEntities, projects);
+
+        String httpMessage = searchResult.getT() != null ?
+                objectMapper.writeValueAsString(searchResult.getT()) :
+                searchResult.getErrorMessage();
+
+
+        if(searchResult.getT().serviceInstances.size() == 0){
+            responseEntity = new ResponseEntity<String>(httpMessage, HttpStatus.NOT_FOUND);
+
+        } else {
+            responseEntity = new ResponseEntity<String>(httpMessage, HttpStatus.valueOf(searchResult.getHttpCode()));
+
+        }
+        return responseEntity;
+    }
+
+
+
+    /**
+     * Issue a named query to a&ai.
+     *
+     * @param namedQueryId     the named query id
+     * @param globalCustomerId the global customer id
+     * @param serviceType      the service type
+     * @param serviceInstance  the service instance
+     * @return ResponseEntity The response entity
+     */
+    @RequestMapping(value = "/aai_sub_viewedit/{namedQueryId}/{globalCustomerId}/{serviceType}/{serviceInstance}", method = RequestMethod.GET)
+    public ResponseEntity<String> viewEditGetComponentList(
+            @PathVariable("namedQueryId") String namedQueryId,
+            @PathVariable("globalCustomerId") String globalCustomerId,
+            @PathVariable("serviceType") String serviceType,
+            @PathVariable("serviceInstance") String serviceInstance) {
+
+        String componentListPayload = getComponentListPutPayload(namedQueryId, globalCustomerId, serviceType, serviceInstance);
+
+        Response resp = doAaiPost("search/named-query", componentListPayload, false);
+        return convertResponseToResponseEntity(resp);
+    }
+
+    @RequestMapping(value = "/aai_get_vnf_data/{globalCustomerId}/{serviceType}/{serviceInstanceId}", method = RequestMethod.GET)
+    public AaiResponse<String> getVnfData(
+            @PathVariable("globalCustomerId") String globalCustomerId,
+            @PathVariable("serviceType") String serviceType,
+            @PathVariable("serviceInstanceId") String serviceInstanceId) {
+
+        return aaiService.getVNFData(globalCustomerId, serviceType, serviceInstanceId);
+
+    }
+
+
+    /**
+     * Issue a named query to a&ai.
+     *
+     * @param namedQueryId     the named query id
+     * @param globalCustomerId the global customer id
+     * @param serviceType      the service type
+     * @return ResponseEntity The response entity
+     */
+    @RequestMapping(value = "/aai_get_models_by_service_type/{namedQueryId}/{globalCustomerId}/{serviceType}", method = RequestMethod.GET)
+    public ResponseEntity<String> viewEditGetComponentList(
+            @PathVariable("namedQueryId") String namedQueryId,
+            @PathVariable("globalCustomerId") String globalCustomerId,
+            @PathVariable("serviceType") String serviceType) {
+
+        String componentListPayload = getModelsByServiceTypePayload(namedQueryId, globalCustomerId, serviceType);
+
+        Response resp = doAaiPost("search/named-query", componentListPayload, false);
+        return convertResponseToResponseEntity(resp);
+    }
+
+    @RequestMapping(value = "/aai_get_vnf_instances/{globalCustomerId}/{serviceType}/{modelVersionId}/{modelInvariantId}/{cloudRegion}", method = RequestMethod.GET)
+    public ResponseEntity<String> getNodeTemplateInstances(
+            @PathVariable("globalCustomerId") String globalCustomerId,
+            @PathVariable("serviceType") String serviceType,
+            @PathVariable("modelVersionId") String modelVersionId,
+            @PathVariable("modelInvariantId") String modelInvariantId,
+            @PathVariable("cloudRegion") String cloudRegion) {
+
+        AaiResponse<String> resp = aaiService.getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion);
+        return new ResponseEntity<String>(resp.getT(), HttpStatus.valueOf(resp.getHttpCode()));
+    }
+
+    @RequestMapping(value = "/aai_get_network_collection_details/{serviceInstanceId}", method = RequestMethod.GET)
+    public ResponseEntity<String> getNetworkCollectionDetails(@PathVariable("serviceInstanceId") String serviceInstanceId) throws IOException {
+        com.fasterxml.jackson.databind.ObjectMapper objectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
+        AaiResponse<String> resp = aaiService.getNetworkCollectionDetails(serviceInstanceId);
+
+        String httpMessage = resp.getT() != null ?
+                objectMapper.writeValueAsString(resp.getT()) :
+                resp.getErrorMessage();
+        return new ResponseEntity<String>(httpMessage, HttpStatus.valueOf(resp.getHttpCode()));
+    }
+
+    @RequestMapping(value = "/aai_get_instance_groups_by_cloudregion/{cloudOwner}/{cloudRegionId}/{networkFunction}", method = RequestMethod.GET)
+    public ResponseEntity<String> getInstanceGroupsByCloudRegion(@PathVariable("cloudOwner") String cloudOwner,
+                                                                 @PathVariable("cloudRegionId") String cloudRegionId,
+                                                                 @PathVariable("networkFunction") String networkFunction) throws IOException {
+        com.fasterxml.jackson.databind.ObjectMapper objectMapper = new com.fasterxml.jackson.databind.ObjectMapper();
+        AaiResponse<AaiGetInstanceGroupsByCloudRegion> resp = aaiService.getInstanceGroupsByCloudRegion(cloudOwner, cloudRegionId, networkFunction);
+
+        String httpMessage = resp.getT() != null ?
+                objectMapper.writeValueAsString(resp.getT()) :
+                resp.getErrorMessage();
+        return new ResponseEntity<String>(httpMessage, HttpStatus.valueOf(resp.getHttpCode()));
+    }
+
+    @RequestMapping(value = "/aai_get_by_uri/**", method = RequestMethod.GET)
+    public ResponseEntity<String> getByUri(HttpServletRequest request) {
+
+        String restOfTheUrl = (String) request.getAttribute(
+                HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
+        String formattedUri = restOfTheUrl.replaceFirst("/aai_get_by_uri/", "").replaceFirst("^aai/v[\\d]+/", "");
+
+        Response resp = doAaiGet(formattedUri, false);
+
+        return convertResponseToResponseEntity(resp);
+    }
+
+
+
+    @RequestMapping(value = "/aai_get_configuration/{configuration_id}", method = RequestMethod.GET)
+    public ResponseEntity<String> getSpecificConfiguration(@PathVariable("configuration_id") String configurationId) {
+
+        Response resp = doAaiGet("network/configurations/configuration/"+configurationId, false);
+
+        return convertResponseToResponseEntity(resp);
+    }
+
+    @RequestMapping(value = "/aai_get_service_instance_pnfs/{globalCustomerId}/{serviceType}/{serviceInstanceId}", method = RequestMethod.GET)
+    public List<String> getServiceInstanceAssociatedPnfs(
+            @PathVariable("globalCustomerId") String globalCustomerId,
+            @PathVariable("serviceType") String serviceType,
+            @PathVariable("serviceInstanceId") String serviceInstanceId) {
+
+        return aaiService.getServiceInstanceAssociatedPnfs(globalCustomerId, serviceType, serviceInstanceId);
+    }
+
+    /**
+     * PNF section
+     */
+    @RequestMapping(value = "/aai_get_pnfs/pnf/{pnf_id}", method = RequestMethod.GET)
+    public ResponseEntity getSpecificPnf(@PathVariable("pnf_id") String pnfId) {
+        //logger.trace(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName(), pnfId);
+        AaiResponse<Pnf> resp;
+        ResponseEntity<Pnf> re;
+        try {
+            resp = aaiService.getSpecificPnf(pnfId);
+            re = new ResponseEntity<Pnf>(resp.getT(), HttpStatus.valueOf(resp.getHttpCode()));
+        } catch (Exception e){
+            return new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+        //logger.trace(EELFLoggerDelegate.debugLogger, "end {}() => {}", getMethodName(), resp.getHttpCode());
+        return re;
+    }
+
+
+    /**
+     * Obtain tenants for a given service type.
+     *
+     * @param globalCustomerId the global customer id
+     * @param serviceType      the service type
+     * @return ResponseEntity The response entity
+     */
+    @RequestMapping(value = "/aai_get_tenants/{global-customer-id}/{service-type}", method = RequestMethod.GET)
+    public ResponseEntity<String> viewEditGetTenantsFromServiceType(HttpServletRequest request,
+                                                                    @PathVariable("global-customer-id") String globalCustomerId, @PathVariable("service-type") String serviceType) {
+
+        ResponseEntity responseEntity;
+        try {
+            ObjectMapper objectMapper = new ObjectMapper();
+            List<Role> roles = roleProvider.getUserRoles(request);
+            RoleValidator roleValidator = new RoleValidator(roles);
+            AaiResponse<GetTenantsResponse[]> response = aaiService.getTenants(globalCustomerId, serviceType, roleValidator);
+            if (response.getHttpCode() == 200) {
+                responseEntity = new ResponseEntity<String>(objectMapper.writeValueAsString(response.getT()), HttpStatus.OK);
+            } else {
+                responseEntity = new ResponseEntity<String>(response.getErrorMessage(), HttpStatus.valueOf(response.getHttpCode()));
+            }
+        } catch (Exception e) {
+            responseEntity = new ResponseEntity<String>("Unable to proccess getTenants reponse", HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+        return responseEntity;
+    }
+
+    @RequestMapping(value = "/aai_get_pnf_instances/{globalCustomerId}/{serviceType}/{modelVersionId}/{modelInvariantId}/{cloudRegion}/{equipVendor}/{equipModel}", method = RequestMethod.GET)
+    public ResponseEntity<String> getPnfInstances(
+            @PathVariable("globalCustomerId") String globalCustomerId,
+            @PathVariable("serviceType") String serviceType,
+            @PathVariable("modelVersionId") String modelVersionId,
+            @PathVariable("modelInvariantId") String modelInvariantId,
+            @PathVariable("cloudRegion") String cloudRegion,
+            @PathVariable("equipVendor") String equipVendor,
+            @PathVariable("equipModel") String equipModel) {
+
+        AaiResponse<String> resp = aaiService.getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor, equipModel);
+        return new ResponseEntity<String>(resp.getT(), HttpStatus.valueOf(resp.getHttpCode()));
+    }
+
+    @RequestMapping(value = "/aai_getPortMirroringSourcePorts", method = RequestMethod.GET)
+    public Map<String, Object> getPortMirroringSourcePorts(
+            @RequestParam ("configurationIds") List<String> configurationIds) {
+
+        return configurationIds.stream()
+                .map(id -> ImmutablePair.of(id, aaiService.getPortMirroringSourcePorts(id)))
+                .collect(Collectors.toMap(Pair::getKey, Pair::getValue));
+    }
+
+    private ResponseEntity<String> convertResponseToResponseEntity(Response resp) {
+        ResponseEntity<String> respEnt;
+        ObjectMapper objectMapper = new ObjectMapper();
+        if (resp == null) {
+            respEnt = new ResponseEntity<String>("Failed to fetch data from A&AI, check server logs for details.", HttpStatus.INTERNAL_SERVER_ERROR);
+        } else {
+            respEnt = new ResponseEntity<String>(resp.readEntity(String.class), HttpStatus.valueOf(resp.getStatus()));
+        }
+        return respEnt;
+    }
+
+    /**
+     * Gets the subscribers.
+     *
+     * @param isFullSet the is full set
+     * @return the subscribers
+     */
+    private Response getSubscribers(boolean isFullSet) {
+
+        String depth = "0";
+
+        Response resp = doAaiGet("business/customers?subscriber-type=INFRA&depth=" + depth, false);
+        if (resp != null) {
+            LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscribers() resp=" + resp.getStatusInfo().toString());
+        }
+        return resp;
+    }
+
+    /**
+     * Gets the subscriber details.
+     *
+     * @param subscriberId the subscriber id
+     * @return the subscriber details
+     */
+    private Response getSubscriberDetails(String subscriberId) {
+        Response resp = doAaiGet("business/customers/customer/" + subscriberId + "?depth=2", false);
+        //String resp = doAaiGet(certiPath.getAbsolutePath(), "business/customers/customer/" + subscriberId, false);
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "getSubscriberDetails() resp=" + resp.getStatusInfo().toString());
+        return resp;
+    }
+
+    /**
+     * Send a GET request to a&ai.
+     *
+     * @param uri       the uri
+     * @param xml       the xml
+     * @return String The response
+     */
+    protected Response doAaiGet(String uri, boolean xml) {
+        String methodName = "getSubscriberList";
+        String transId = UUID.randomUUID().toString();
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        Response resp = null;
+        try {
+
+
+            resp = aaiRestInterface.RestGet(fromAppId, transId, uri, xml).getResponse();
+
+        } catch (WebApplicationException e) {
+            final String message = e.getResponse().readEntity(String.class);
+            LOGGER.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message);
+            LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + message);
+        } catch (Exception e) {
+            LOGGER.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+        }
+
+        return resp;
+    }
+
+    /**
+     * Send a POST request to a&ai.
+     *
+     * @param uri       the uri
+     * @param payload   the payload
+     * @param xml       the xml
+     * @return String The response
+     */
+    protected Response doAaiPost(String uri, String payload, boolean xml) {
+        String methodName = "getSubscriberList";
+        String transId = UUID.randomUUID().toString();
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        Response resp = null;
+        try {
+
+            resp = aaiRestInterface.RestPost(fromAppId, uri, payload, xml);
+
+        } catch (Exception e) {
+            LOGGER.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+        }
+
+        return resp;
+    }
+
+    /**
+     * Gets the component list put payload.
+     *
+     * @param namedQueryId     the named query id
+     * @param globalCustomerId the global customer id
+     * @param serviceType      the service type
+     * @param serviceInstance  the service instance
+     * @return the component list put payload
+     */
+    private String getComponentListPutPayload(String namedQueryId, String globalCustomerId, String serviceType, String serviceInstance) {
+        return
+                "		{" +
+                        "    \"instance-filters\": {" +
+                        "        \"instance-filter\": [" +
+                        "            {" +
+                        "                \"customer\": {" +
+                        "                    \"global-customer-id\": \"" + globalCustomerId + "\"" +
+                        "                }," +
+                        "                \"service-instance\": {" +
+                        "                    \"service-instance-id\": \"" + serviceInstance + "\"" +
+                        "                }," +
+                        "                \"service-subscription\": {" +
+                        "                    \"service-type\": \"" + serviceType + "\"" +
+                        "                }" +
+                        "            }" +
+                        "        ]" +
+                        "    }," +
+                        "    \"query-parameters\": {" +
+                        "        \"named-query\": {" +
+                        "            \"named-query-uuid\": \"" + namedQueryId + "\"" +
+                        "        }" +
+                        "    }" +
+                        "}";
+
+    }
+
+    private String getModelsByServiceTypePayload(String namedQueryId, String globalCustomerId, String serviceType) {
+        // TODO Auto-generated method stub
+        return "		{" +
+                "    \"instance-filters\": {" +
+                "        \"instance-filter\": [" +
+                "            {" +
+                "                \"customer\": {" +
+                "                    \"global-customer-id\": \"" + globalCustomerId + "\"" +
+                "                }," +
+                "                \"service-subscription\": {" +
+                "                    \"service-type\": \"" + serviceType + "\"" +
+                "                }" +
+                "            }" +
+                "        ]" +
+                "    }," +
+                "    \"query-parameters\": {" +
+                "        \"named-query\": {" +
+                "            \"named-query-uuid\": \"" + namedQueryId + "\"" +
+                "        }" +
+                "    }" +
+                "}";
+
+    }
+
+    private String getAaiErrorMessage(String message) {
+        try {
+            org.json.JSONObject json = new org.json.JSONObject(message);
+            json = json.getJSONObject("requestError").getJSONObject("serviceException");
+
+            return json.getString("messageId") + ": " + json.getString("text");
+
+        } catch (Exception e) {
+            return null;
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/AsyncControllerForTests.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/AsyncControllerForTests.java
new file mode 100644
index 0000000..cfc8f48
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/AsyncControllerForTests.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.model.ExceptionResponse;
+import org.onap.osam.model.JobBulk;
+import org.onap.osam.model.JobModel;
+import org.onap.osam.services.IBulkInstantiationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.ws.rs.WebApplicationException;
+import java.util.Map;
+import java.util.UUID;
+
+import static org.springframework.http.HttpStatus.BAD_REQUEST;
+
+@RestController
+@RequestMapping("asyncForTests")
+public class AsyncControllerForTests extends OsamCoreRestrictedBaseController {
+
+    private IBulkInstantiationService bulkInstantiationService;
+
+    @Autowired
+    public AsyncControllerForTests(IBulkInstantiationService bulkInstantiationService) {
+        this.bulkInstantiationService = bulkInstantiationService;
+    }
+
+    @RequestMapping(method = RequestMethod.POST)
+    public JobBulk createAsyncJob(@RequestBody Map<String, Object> body) {
+        return bulkInstantiationService.saveBulk(body);
+    }
+
+    @RequestMapping(value = "/job/{uuid}", method = RequestMethod.GET)
+    public JobModel getJob(@PathVariable UUID uuid) {
+        return bulkInstantiationService.getJob(uuid);
+    }
+
+    @RequestMapping(value = "/error", method = RequestMethod.GET)
+    public void throwError() {
+        throw new GenericUncheckedException("dummy error");
+    }
+
+    @ExceptionHandler({IllegalArgumentException.class})
+    @ResponseStatus(value=BAD_REQUEST)
+    private ExceptionResponse exceptionHandlerBadRequest(Exception e) {
+        return ControllersUtils.handleException(e, LOGGER);
+    }
+
+    @ExceptionHandler(WebApplicationException.class)
+    private ResponseEntity webApplicationExceptionHandler(WebApplicationException e) {
+        return ControllersUtils.handleWebApplicationException(e, LOGGER);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/AsyncInstantiationController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/AsyncInstantiationController.java
new file mode 100644
index 0000000..7296c20
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/AsyncInstantiationController.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+
+import org.onap.osam.exceptions.OperationNotAllowedException;
+import org.onap.osam.model.ExceptionResponse;
+
+import org.onap.osam.model.JobAuditStatus;
+import org.onap.osam.model.ServiceInfo;
+import org.onap.osam.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.osam.mso.MsoResponseWrapper2;
+import org.onap.osam.services.IAsyncInstantiationBusinessLogic;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+import java.util.UUID;
+import static org.springframework.http.HttpStatus.METHOD_NOT_ALLOWED;
+
+
+@RestController
+@RequestMapping(AsyncInstantiationController.ASYNC_INSTANTIATION)
+public class AsyncInstantiationController extends OsamCoreRestrictedBaseController {
+
+    public static final String ASYNC_INSTANTIATION = "asyncInstantiation";
+
+    protected final IAsyncInstantiationBusinessLogic asyncInstantiationBL;
+
+    @Autowired
+    public AsyncInstantiationController(IAsyncInstantiationBusinessLogic asyncInstantiationBL) {
+        this.asyncInstantiationBL = asyncInstantiationBL;
+    }
+
+    @ExceptionHandler(OperationNotAllowedException.class)
+    @ResponseStatus(value=METHOD_NOT_ALLOWED)
+    public ExceptionResponse illegalStateExceptionHandler(Exception e) {
+        return ControllersUtils.handleException(e, LOGGER);
+    }
+
+    @RequestMapping(method = RequestMethod.GET)
+    public List<ServiceInfo> getServicesInfo(HttpServletRequest request) {
+        return asyncInstantiationBL.getAllServicesInfo();
+    }
+
+    @RequestMapping(value = "bulk", method = RequestMethod.POST)
+    public MsoResponseWrapper2<List<String>> createBulkOfServices(@RequestBody ServiceInstantiation request, HttpServletRequest httpServletRequest) {
+        //Push to DB according the model
+
+        String userId = ControllersUtils.extractUserId(httpServletRequest);
+        List<UUID> uuids =  asyncInstantiationBL.pushBulkJob(request, userId);
+
+        return new MsoResponseWrapper2(200, uuids);
+    }
+
+    @RequestMapping(value = "job/{jobId}", method = RequestMethod.DELETE)
+    public void deleteServiceInfo(@PathVariable("jobId") UUID jobId) {
+        asyncInstantiationBL.deleteJob(jobId);
+    }
+
+    @RequestMapping(value = "hide/{jobId}", method = RequestMethod.POST)
+    public void hideServiceInfo(@PathVariable("jobId") UUID jobId) {
+        asyncInstantiationBL.hideServiceInfo(jobId);
+    }
+
+    @RequestMapping(value = "auditStatus/{jobId}", method = RequestMethod.GET)
+    public List<JobAuditStatus> getJobAuditStatus(HttpServletRequest request, @PathVariable(value="jobId") UUID jobId, @RequestParam(value="source") JobAuditStatus.SourceStatus source){
+        return asyncInstantiationBL.getAuditStatuses(jobId, source);
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/ControllersUtils.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/ControllersUtils.java
new file mode 100644
index 0000000..4aaff2e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/ControllersUtils.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import org.apache.commons.lang3.exception.ExceptionUtils;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.model.ExceptionResponse;
+import org.springframework.http.ResponseEntity;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.ws.rs.WebApplicationException;
+
+import static org.onap.osam.utils.Logging.getMethodName;
+
+public class ControllersUtils {
+
+
+    public static String extractUserId(HttpServletRequest request) {
+        String userId = "";
+        HttpSession session = request.getSession();
+        if (session != null) {
+            User user = (User) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));
+            if (user != null) {
+                //userId = user.getHrid();
+                userId = user.getLoginId();
+                if (userId == null)
+                    userId = user.getOrgUserId();
+            }
+        }
+        return userId;
+    }
+
+    public static ExceptionResponse handleException(Exception e, EELFLoggerDelegate logger) {
+        logger.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodName(), ExceptionUtils.getMessage(e), e);
+
+        ExceptionResponse exceptionResponse = new ExceptionResponse(e);
+        return exceptionResponse;
+    }
+
+    public static ResponseEntity handleWebApplicationException(WebApplicationException e, EELFLoggerDelegate logger) {
+        return ResponseEntity.status(e.getResponse().getStatus()).body(ControllersUtils.handleException(e, logger));
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/FeatureTogglingController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/FeatureTogglingController.java
new file mode 100644
index 0000000..f145a49
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/FeatureTogglingController.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import org.onap.osam.properties.Features;
+import org.onap.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@RestController
+@RequestMapping("flags")
+public class FeatureTogglingController extends RestrictedBaseController {
+
+    @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public @ResponseBody Map<String,Boolean> getFeatureToggles()
+    {
+        HashMap<String,Boolean> flags = new HashMap <String, Boolean>();
+        for(Features flag : Features.values()){
+            flags.put(flag.name(), flag.isActive());
+        }
+        return flags;
+
+
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/LoggerController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/LoggerController.java
new file mode 100644
index 0000000..e3c273b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/LoggerController.java
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.FileAppender;
+import ch.qos.logback.core.spi.AppenderAttachable;
+import org.apache.commons.io.input.ReversedLinesFileReader;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.portalsdk.core.controller.RestrictedBaseController;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.osam.model.ExceptionResponse;
+import org.onap.osam.roles.Role;
+import org.onap.osam.roles.RoleProvider;
+import org.onap.osam.utils.Streams;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.NotAuthorizedException;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static com.att.eelf.configuration.Configuration.GENERAL_LOGGER_NAME;
+
+
+@RestController
+@RequestMapping("logger")
+public class LoggerController extends RestrictedBaseController {
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(LoggerController.class);
+
+    @Autowired
+    RoleProvider roleProvider;
+
+    @RequestMapping(value = "/{loggerName:audit|error|metrics}", method = RequestMethod.GET)
+    public String getLog(@PathVariable String loggerName, HttpServletRequest request,
+                         @RequestParam(value="limit", defaultValue = "5000") Integer limit) throws IOException {
+
+        List<Role> roles = roleProvider.getUserRoles(request);
+        boolean userPermitted = roleProvider.userPermissionIsReadLogs(roles);
+        if (!userPermitted) {
+            throw new NotAuthorizedException("User not authorized to get logs");
+        }
+
+        String logfilePath = getLogfilePath(loggerName);
+
+        try (final ReversedLinesFileReader reader = new ReversedLinesFileReader(new File(logfilePath))) {
+            Supplier<String> reverseLinesSupplier = () -> {
+                try {
+                    return reader.readLine();
+                } catch (NullPointerException e) {
+                    // EOF Reached
+                    return null;
+                } catch (IOException e) {
+                    throw new InternalServerErrorException("error while reading " + logfilePath, e);
+                }
+            };
+
+            return Streams.takeWhile(
+                    Stream.generate(reverseLinesSupplier),
+                    line -> !StringUtils.contains(line, "Logging is started"))
+                    .limit(limit)
+                    .limit(5_000)
+                    .filter(Objects::nonNull)
+                    .collect(Collectors.joining("\n"));
+        }
+    }
+
+    private String getLogfilePath(String loggerName) {
+        LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
+        return context.getLoggerList().stream()
+                .filter(logger -> logger.getName().equals(GENERAL_LOGGER_NAME + "." + loggerName))
+                .flatMap(this::pullSubAppenders)
+                .flatMap(appender -> {
+                    // Appender might be "attachable", if so - roll-up its sub-appenders
+                    return (appender instanceof AppenderAttachable) ?
+                            pullSubAppenders((AppenderAttachable<?>) appender) : Stream.of(appender);
+                })
+                .filter(appender -> appender instanceof FileAppender)
+                .map(appender -> (FileAppender<?>) appender)
+                .map(FileAppender::getFile)
+                .findFirst()
+                .orElseThrow(() -> new InternalServerErrorException("logfile for " + loggerName + " not found"));
+    }
+
+    private <T> Stream<Appender<T>> pullSubAppenders(AppenderAttachable<T> logger) {
+        return Streams.fromIterator(logger.iteratorForAppenders());
+    }
+
+    @ExceptionHandler({ NotAuthorizedException.class })
+    @ResponseStatus(HttpStatus.UNAUTHORIZED)
+    public String notAuthorizedHandler(NotAuthorizedException e) {
+        return "UNAUTHORIZED";
+    }
+
+    @ExceptionHandler({ IOException.class, InternalServerErrorException.class })
+    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+    public ExceptionResponse ioExceptionHandler(Exception e) {
+        return org.onap.osam.controllers.ControllersUtils.handleException(e, LOGGER);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/MsoConfig.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/MsoConfig.java
new file mode 100644
index 0000000..fd19f0e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/MsoConfig.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.portalsdk.core.util.SystemProperties;
+
+import org.onap.osam.client.SyncRestClient;
+import org.onap.osam.factories.MsoRequestFactory;
+import org.onap.osam.mso.MsoBusinessLogic;
+import org.onap.osam.mso.MsoBusinessLogicImpl;
+import org.onap.osam.mso.MsoInterface;
+import org.onap.osam.mso.MsoProperties;
+import org.onap.osam.mso.rest.MsoRestClientNew;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.togglz.core.manager.FeatureManager;
+
+
+@Configuration
+public class MsoConfig {
+
+    @Bean
+    public ObjectMapper getObjectMapper() {
+        return new ObjectMapper();
+    }
+
+    @Bean
+    public MsoRequestFactory createRequestDetailsFactory(){
+        return new MsoRequestFactory();
+    }
+
+    @Bean
+    public MsoInterface getMsoClient(){
+        return new MsoRestClientNew(new SyncRestClient(MsoInterface.objectMapper()), SystemProperties.getProperty(
+            MsoProperties.MSO_SERVER_URL));
+    }
+
+    @Bean
+    public MsoBusinessLogic getMsoBusinessLogic(MsoInterface msoClient, FeatureManager featureManager){
+        return new MsoBusinessLogicImpl(msoClient, featureManager);
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/MsoController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/MsoController.java
new file mode 100644
index 0000000..53cdde7
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/MsoController.java
@@ -0,0 +1,689 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.osam.model.ExceptionResponse;
+import org.onap.osam.mso.MsoBusinessLogic;
+import org.onap.osam.mso.MsoResponseWrapper;
+import org.onap.osam.mso.rest.Request;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.onap.osam.mso.rest.Task;
+import org.onap.portalsdk.core.controller.RestrictedBaseController;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import static org.onap.osam.utils.Logging.getMethodName;
+
+//import java.util.UUID;
+//import org.springframework.http.ResponseEntity;
+//import org.springframework.http.RequestEntity;
+
+@RestController
+@RequestMapping("mso")
+public class MsoController extends RestrictedBaseController {
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(MsoController.class);
+
+    /**
+     * The Constant dateFormat.
+     */
+    private final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+    /**
+     * The Constant SVC_INSTANCE_ID.
+     */
+    public final static String SVC_INSTANCE_ID = "<service_instance_id>";
+    public final static String REQUEST_TYPE = "<request_type>";
+
+    /**
+     * The Constant CONFIGURATION_ID
+     */
+    public final static String CONFIGURATION_ID = "<configuration_id>";
+
+    /**
+     * The Constant VNF_INSTANCE_ID.
+     */
+    public final static String VNF_INSTANCE_ID = "<vnf_instance_id>";
+
+    private final MsoBusinessLogic msoBusinessLogic;
+
+    @Autowired
+    public MsoController(MsoBusinessLogic msoBusinessLogic) {
+        this.msoBusinessLogic = msoBusinessLogic;
+    }
+
+    /**
+     * Creates the svc instance.
+     *
+     * @param request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_svc_instance", method = RequestMethod.POST)
+    public ResponseEntity<String> createSvcInstance(HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+        String methodName = "createSvcInstance";
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        // always return OK, the MSO status code is embedded in the body
+
+        MsoResponseWrapper w = msoBusinessLogic.createSvcInstance(mso_request);
+
+        return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
+
+    }
+    
+    /**
+     * Creates the e2e svc instance.
+     *
+     * @param request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_e2e_svc_instance", method = RequestMethod.POST)
+    public ResponseEntity<String> createE2eSvcInstance(HttpServletRequest request, @RequestBody LinkedHashMap<String, Object> mso_request) {
+        String methodName = "createE2eSvcInstance";
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        // always return OK, the MSO status code is embedded in the body
+
+        MsoResponseWrapper w = msoBusinessLogic.createE2eSvcInstance(mso_request.get("requestDetails"));
+
+        return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
+
+    }
+
+    /**
+     * Creates the vnf.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_vnf_instance/{serviceInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> createVnf(@PathVariable("serviceInstanceId") String serviceInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+
+        MsoResponseWrapper w = msoBusinessLogic.createVnf(mso_request, serviceInstanceId);
+
+        // always return OK, the MSO status code is embedded in the body
+
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+
+    }
+
+    /**
+     * Creates the nw instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_nw_instance/{serviceInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> createNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+        String methodName = "createNwInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start, serviceInstanceId = " + serviceInstanceId);
+
+        MsoResponseWrapper w = msoBusinessLogic.createNwInstance(mso_request, serviceInstanceId);
+
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+
+    }
+
+    /**
+     * Creates the volume group instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param vnfInstanceId     the vnf instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> createVolumeGroupInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId,
+                                                            HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+        String methodName = "createVolumeGroupInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.createVolumeGroupInstance(mso_request, serviceInstanceId, vnfInstanceId);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Creates the vf module instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param vnfInstanceId     the vnf instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> createVfModuleInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
+                                                         @PathVariable("vnfInstanceId") String vnfInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+        String methodName = "createVfModuleInstance";
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.createVfModuleInstance(mso_request, serviceInstanceId, vnfInstanceId);
+
+        // always return OK, the MSO status code is embedded in the body
+
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Creates a configuration instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_create_configuration_instance/{serviceInstanceId}/configurations/", method = RequestMethod.POST)
+    public ResponseEntity<String> createConfigurationInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
+                                                         HttpServletRequest request, @RequestBody RequestDetailsWrapper mso_request) {
+        String methodName = "createConfigurationInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.createConfigurationInstance(mso_request, serviceInstanceId);
+
+        // always return OK, the MSO status code is embedded in the body
+
+        return (new ResponseEntity<>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Delete E2e svc instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_delete_e2e_svc_instance/{serviceInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteE2eSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
+                                                    HttpServletRequest request, @RequestBody LinkedHashMap<String, Object> mso_request) {
+
+        String methodName = "deleteE2eSvcInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName(), mso_request);
+
+        MsoResponseWrapper w = msoBusinessLogic.deleteE2eSvcInstance(mso_request.get("requestDetails"), serviceInstanceId);
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse());
+        // always return OK, the MSO status code is embedded in the body
+
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+
+    }
+    
+    /**
+     * Delete svc instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+
+    @RequestMapping(value = "/mso_delete_svc_instance/{serviceInstanceId}", method = RequestMethod.POST)
+    public String deleteSvcInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
+                                                    HttpServletRequest request, @RequestBody RequestDetails mso_request,
+                                                    @RequestParam(value = "serviceStatus") String serviceStatus) {
+
+        String methodName = "deleteSvcInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "start {}({})", getMethodName(), mso_request);
+        MsoResponseWrapper w = msoBusinessLogic.deleteSvcInstance(mso_request, serviceInstanceId, serviceStatus);
+        // always return OK, the MSO status code is embedded in the body
+
+        return w.getResponse();
+    }
+
+    /**
+     * Delete vnf.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param vnfInstanceId     the vnf instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_delete_vnf_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}", method = RequestMethod.POST)
+
+    public ResponseEntity<String> deleteVnf(@PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId,
+                                            HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+        String methodName = "deleteVnf";
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.deleteVnf(mso_request, serviceInstanceId, vnfInstanceId);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+
+    }
+
+    /**
+     * Delete configuration instance
+     * @param serviceInstanceId the service instance id
+     * @param configurationId the configuration id
+     * @param mso_request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "mso_delete_configuration/{serviceInstanceId}/configurations/{configurationId}",
+            method = RequestMethod.POST)
+    public ResponseEntity<String> deleteConfiguration(
+            @PathVariable("serviceInstanceId") String serviceInstanceId,
+            @PathVariable ("configurationId") String configurationId,
+            @RequestBody RequestDetailsWrapper mso_request) {
+
+        String methodName = "deleteConfiguration";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger,
+                dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.deleteConfiguration(mso_request, serviceInstanceId, configurationId);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Activate configuration instance
+     * @param serviceInstanceId the service instace id
+     * @param configurationId the configuration id
+     * @param mso_request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "mso_activate_configuration/{serviceInstanceId}/configurations/{configurationId}",
+            method = RequestMethod.POST)
+    public ResponseEntity<String> activateConfiguration(
+            @PathVariable("serviceInstanceId") String serviceInstanceId,
+            @PathVariable("configurationId") String configurationId,
+            @RequestBody RequestDetails mso_request) {
+
+        MsoResponseWrapper w = msoBusinessLogic.setConfigurationActiveStatus(mso_request, serviceInstanceId, configurationId, true);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Deactivate configuration instance
+     * @param serviceInstanceId the service instace id
+     * @param configurationId the configuration id
+     * @param mso_request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "mso_deactivate_configuration/{serviceInstanceId}/configurations/{configurationId}",
+            method = RequestMethod.POST)
+    public ResponseEntity<String> deactivateConfiguration(
+            @PathVariable("serviceInstanceId") String serviceInstanceId,
+            @PathVariable("configurationId") String configurationId,
+            @RequestBody RequestDetails mso_request) {
+
+        MsoResponseWrapper w = msoBusinessLogic.setConfigurationActiveStatus(mso_request, serviceInstanceId, configurationId, false);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Disable port on configuration instance
+     * @param serviceInstanceId the service instance id
+     * @param configurationId the configuration instance id
+     * @param mso_request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "mso_disable_port_configuration/{serviceInstanceId}/configurations/{configurationId}",
+            method = RequestMethod.POST)
+    public ResponseEntity<String> disablePortOnConfiguration(
+            @PathVariable("serviceInstanceId") String serviceInstanceId,
+            @PathVariable("configurationId") String configurationId,
+            @RequestBody RequestDetails mso_request) {
+
+        MsoResponseWrapper w = msoBusinessLogic.setPortOnConfigurationStatus(mso_request, serviceInstanceId, configurationId, false);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Enable port on configuration instance
+     * @param serviceInstanceId the service instance id
+     * @param configurationId the configuration instance id
+     * @param mso_request the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "mso_enable_port_configuration/{serviceInstanceId}/configurations/{configurationId}",
+            method = RequestMethod.POST)
+    public ResponseEntity<String> enablePortOnConfiguration(
+            @PathVariable("serviceInstanceId") String serviceInstanceId,
+            @PathVariable("configurationId") String configurationId,
+            @RequestBody RequestDetails mso_request) {
+
+        MsoResponseWrapper w = msoBusinessLogic.setPortOnConfigurationStatus(mso_request, serviceInstanceId, configurationId, true);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Delete vf module.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param vnfInstanceId     the vnf instance id
+     * @param vfModuleId        the vf module id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    //mso_delete_vf_module/bc305d54-75b4-431b-adb2-eb6b9e546014/vnfs/fe9000-0009-9999/vfmodules/abeeee-abeeee-abeeee
+    @RequestMapping(value = "/mso_delete_vfmodule_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfModuleId}", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteVfModule(
+            @PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId,
+            @PathVariable("vfModuleId") String vfModuleId, HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+
+        String methodName = "deleteVfModule";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.deleteVfModule(mso_request, serviceInstanceId, vnfInstanceId, vfModuleId);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Delete volume group instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param vnfInstanceId     the vnf instance id
+     * @param volumeGroupId     the volume group id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_delete_volumegroup_instance/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volumeGroupId}", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteVolumeGroupInstance(
+            @PathVariable("serviceInstanceId") String serviceInstanceId, @PathVariable("vnfInstanceId") String vnfInstanceId, @PathVariable("volumeGroupId") String volumeGroupId,
+            HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+        String methodName = "deleteVolumeGroupInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.deleteVolumeGroupInstance(mso_request, serviceInstanceId, vnfInstanceId, volumeGroupId);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Delete nw instance.
+     *
+     * @param serviceInstanceId the service instance id
+     * @param networkInstanceId the network instance id
+     * @param request           the request
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_delete_nw_instance/{serviceInstanceId}/networks/{networkInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteNwInstance(@PathVariable("serviceInstanceId") String serviceInstanceId,
+                                                   @PathVariable("networkInstanceId") String networkInstanceId, HttpServletRequest request, @RequestBody RequestDetails mso_request) {
+        String methodName = "deleteNwInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.deleteNwInstance(mso_request, serviceInstanceId, networkInstanceId);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Gets the orchestration request.
+     *
+     * @param requestId the request id
+     * @param request   the request
+     * @return the orchestration request
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_get_orch_req/{requestId}", method = RequestMethod.GET)
+    public ResponseEntity<String> getOrchestrationRequest(@PathVariable("requestId") String requestId,
+                                                          HttpServletRequest request) {
+
+        String methodName = "getOrchestrationRequest";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+
+        MsoResponseWrapper w = msoBusinessLogic.getOrchestrationRequest(requestId);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * Gets the orchestration requests.
+     *
+     * @param filterString the filter string
+     * @param request      the request
+     * @return the orchestration requests
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_get_orch_reqs/{filterString}", method = RequestMethod.GET)
+    public ResponseEntity<String> getOrchestrationRequests(@PathVariable("filterString") String filterString,
+                                                           HttpServletRequest request) {
+
+        String methodName = "getOrchestrationRequests";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+
+        MsoResponseWrapper w = msoBusinessLogic.getOrchestrationRequests(filterString);
+
+        // always return OK, the MSO status code is embedded in the body
+        return (new ResponseEntity<String>(w.getResponse(), HttpStatus.OK));
+    }
+
+    /**
+     * activate to a pnf instance.
+     *
+     * @param serviceInstanceId the id of the service.
+     * @param requestDetails the body of the request.
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_activate_service_instance/{serviceInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> activateServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @RequestBody RequestDetails requestDetails) {
+        String methodName = "activateServiceInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.setServiceInstanceStatus(requestDetails, serviceInstanceId, true);
+        return new ResponseEntity<>(w.getResponse(), HttpStatus.OK);
+    }
+
+    /**
+     * deactivate a service instance.
+     *
+     * @param serviceInstanceId the id of the service.
+     * @param requestDetails the body of the request.
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_deactivate_service_instance/{serviceInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> deactivateServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId, @RequestBody RequestDetails requestDetails) {
+        String methodName = "deactivateServiceInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.setServiceInstanceStatus(requestDetails, serviceInstanceId, false);
+        return new ResponseEntity<>(w.getResponse(), HttpStatus.OK);
+    }
+
+    /**
+     * Gets the orchestration requests for the dashboard.
+     *  currently its all the orchestration requests with RequestType updateInstance or replaceInstance.
+     * @return the orchestration requests
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_get_orch_reqs/dashboard", method = RequestMethod.GET)
+    public List<Request> getOrchestrationRequestsForDashboard() {
+
+        String methodName = "getOrchestrationRequestsForDashboard";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+
+        return msoBusinessLogic.getOrchestrationRequestsForDashboard();
+    }
+
+    /**
+     * Gets the Manual Tasks for the given request id.
+     *
+     * @param originalRequestId the id of the original request.
+     * @return the tasks
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_get_man_task/{originalRequestId}", method = RequestMethod.GET)
+    public List<Task> getManualTasksByRequestId(@PathVariable("originalRequestId") String originalRequestId) {
+
+        String methodName = "getManualTasksByRequestId";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        return  msoBusinessLogic.getManualTasksByRequestId(originalRequestId);
+    }
+
+    /**
+     * Complete the manual task.
+     *
+     * @param taskId the id of the task to complete.
+     * @param requestDetails the body of the request.
+     * @return the response entity
+     * @throws Exception the exception
+     */
+    @RequestMapping(value = "/mso_post_man_task/{taskId}", method = RequestMethod.POST)
+    public ResponseEntity<String> manualTaskComplete(@PathVariable("taskId") String taskId , @RequestBody RequestDetails requestDetails) {
+
+        String methodName = "manualTaskComplete";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w = msoBusinessLogic.completeManualTask(requestDetails, taskId);
+        return new ResponseEntity<String>(w.getResponse(), HttpStatus.OK);
+    }
+
+    @RequestMapping(value = "/mso_remove_relationship/{serviceInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> removeRelationshipFromServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId ,
+                                                                        @RequestBody RequestDetails requestDetails) {
+
+        String methodName = "removeRelationshipFromServiceInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w;
+        try {
+            w = msoBusinessLogic.removeRelationshipFromServiceInstance(requestDetails, serviceInstanceId);
+        } catch (Exception e){
+            LOGGER.error("Internal error when calling MSO controller logic for {}", methodName, e);
+            return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+        return new ResponseEntity<>(w.getResponse(), HttpStatus.OK);
+    }
+
+    @RequestMapping(value = "/mso_add_relationship/{serviceInstanceId}", method = RequestMethod.POST)
+    public ResponseEntity<String> addRelationshipToServiceInstance(@PathVariable("serviceInstanceId") String serviceInstanceId ,
+                                                                        @RequestBody RequestDetails requestDetails) {
+
+        String methodName = "addRelationshipToServiceInstance";
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+        MsoResponseWrapper w;
+        try {
+            w = msoBusinessLogic.addRelationshipToServiceInstance(requestDetails, serviceInstanceId);
+        } catch (Exception e){
+            LOGGER.error("Internal error when calling MSO controller logic for {}", methodName, e);
+            return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+        return new ResponseEntity<>(w.getResponse(), HttpStatus.OK);
+    }
+
+    /**
+     * Exception handler.
+     *
+     * @param e        the e
+     * @param response the response
+     * @throws IOException Signals that an I/O exception has occurred.
+     */
+    @ExceptionHandler(Exception.class)
+    private void exceptionHandler(Exception e, HttpServletResponse response) throws IOException {
+
+		/*
+         * The following "logger.error" lines "should" be sufficient for logging the exception.
+		 * However, the console output in my Eclipse environment is NOT showing ANY of the
+		 * logger statements in this class. Thus the temporary "e.printStackTrace" statement
+		 * is also included.
+		 */
+
+        String methodName = "exceptionHandler";
+        LOGGER.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+        StringWriter sw = new StringWriter();
+        e.printStackTrace(new PrintWriter(sw));
+        LOGGER.error(EELFLoggerDelegate.errorLogger, sw.toString());
+
+		/*
+         *  Temporary - IF the above  mentioned "logger.error" glitch is resolved ...
+		 *  this statement could be removed since it would then likely result in duplicate
+		 *  trace output. 
+		 */
+        e.printStackTrace(System.err);
+
+        response.setContentType("application/json; charset=UTF-8");
+        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+
+        ExceptionResponse exceptionResponse = new ExceptionResponse();
+        exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", ""));
+        exceptionResponse.setMessage(e.getMessage());
+
+        response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse));
+
+        response.flushBuffer();
+
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/OsamCoreRestrictedBaseController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/OsamCoreRestrictedBaseController.java
new file mode 100644
index 0000000..24dbbb5
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/OsamCoreRestrictedBaseController.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.exception.ExceptionUtils;
+import org.onap.osam.model.ExceptionResponse;
+import org.onap.portalsdk.core.controller.RestrictedBaseController;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
+
+import static org.onap.osam.utils.Logging.getMethodCallerName;
+import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
+
+public abstract class OsamCoreRestrictedBaseController extends RestrictedBaseController {
+
+    protected final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(this.getClass().getName());
+
+    @ExceptionHandler(MethodArgumentTypeMismatchException.class)
+    @ResponseBody
+    public ResponseEntity handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e) {
+        LOGGER.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodCallerName(), ExceptionUtils.getMessage(e), e);
+        Class<?> type = e.getRequiredType();
+        String message;
+        if (type.isEnum()) {
+            message = "The parameter " + e.getName() + " must have a value among : " + StringUtils.join(type.getEnumConstants(), ", ");
+        }
+        else {
+            message = "The parameter " + e.getName() + " must be of type " + type.getTypeName();
+        }
+        ResponseEntity  response = new ResponseEntity<String>(message, HttpStatus.BAD_REQUEST);
+        return response;
+    }
+
+    @ExceptionHandler(Exception.class)
+    @ResponseStatus(value=INTERNAL_SERVER_ERROR)
+    public ExceptionResponse exceptionHandler(Exception e) {
+        return ControllersUtils.handleException(e, LOGGER);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/PodDemoController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/PodDemoController.java
new file mode 100644
index 0000000..c401d32
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/PodDemoController.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.services.IAaiService;
+import org.onap.portalsdk.core.controller.UnRestrictedBaseController;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.dao.FnAppDoaImpl;
+import org.onap.osam.model.GitRepositoryState;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Properties;
+
+@RestController
+@RequestMapping("/")
+public class PodDemoController extends UnRestrictedBaseController {
+
+    @Autowired
+    private IAaiService aaiService;
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(PodDemoController.class);
+
+    final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+    private static final String HEALTH_CHECK_PATH = "/healthCheck";
+    private static final String GIT_PROPERTIES_FILENAME = "git.properties";
+
+    /**
+     * Model for JSON response with health-check results.
+     */
+    public class HealthStatus {
+        // Either 200 or 500
+        public int statusCode;
+
+        // Additional detail in case of error, empty in case of success.
+        public String message;
+
+        public String date;
+
+        public HealthStatus(int code, String msg) {
+            this.statusCode = code;
+            this.message = msg;
+        }
+
+        public HealthStatus(int code, String date, String msg) {
+            this.statusCode = code;
+            this.message = msg;
+            this.date = date;
+        }
+
+        public int getStatusCode() {
+            return statusCode;
+        }
+
+        public void setStatusCode(int code) {
+            this.statusCode = code;
+        }
+
+        public String getMessage() {
+            return message;
+        }
+
+        public void setMessage(String msg) {
+            this.message = msg;
+        }
+
+        public String getDate() {
+            return date;
+        }
+
+        public void setDate(String date) {
+            this.date = date;
+        }
+
+    }
+
+    @SuppressWarnings("unchecked")
+    public int getProfileCount(String driver, String URL, String username, String password) {
+        FnAppDoaImpl doa = new FnAppDoaImpl();
+        int count = doa.getProfileCount(driver, URL, username, password);
+        return count;
+    }
+
+
+    /**
+     * Obtain the HealthCheck Status from the System.Properties file.
+     * Used by IDNS for redundancy
+     *
+     * @return ResponseEntity The response entity
+     * @throws IOException Signals that an I/O exception has occurred.
+     */
+    @RequestMapping(value = "/healthCheck", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public HealthStatus gethealthCheckStatusforIDNS() {
+
+        String driver = SystemProperties.getProperty("db.driver");
+        String URL = SystemProperties.getProperty("db.connectionURL");
+        String username = SystemProperties.getProperty("db.userName");
+        String password = SystemProperties.getProperty("db.password");
+
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "driver ::" + driver);
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "URL::" + URL);
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "username::" + username);
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "password::" + password);
+
+
+        HealthStatus healthStatus = null;
+        try {
+            LOGGER.debug(EELFLoggerDelegate.debugLogger, "Performing health check");
+            int count = getProfileCount(driver, URL, username, password);
+            LOGGER.debug(EELFLoggerDelegate.debugLogger, "count:::" + count);
+            healthStatus = new HealthStatus(200, "health check succeeded");
+        } catch (Exception ex) {
+
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex);
+            healthStatus = new HealthStatus(500, "health check failed: " + ex.toString());
+        }
+        return healthStatus;
+    }
+
+    @RequestMapping(value = "/pods/getAndSaveAll", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public ResponseEntity<String> getAndSaveAllPods() {
+
+        return (new ResponseEntity<>("", HttpStatus.OK));
+    }
+
+    @RequestMapping(value = {"/aai_test"}, method = RequestMethod.GET)
+    public ResponseEntity<String> getAicZones(HttpServletRequest request) throws IOException {
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== getAicZones controller start");
+        AaiResponse response = aaiService.getAaiZones();
+        return aaiResponseToResponseEntity(response);
+    }
+
+    private ResponseEntity<String> aaiResponseToResponseEntity(AaiResponse aaiResponseData)
+            throws IOException {
+        ResponseEntity<String> responseEntity;
+        ObjectMapper objectMapper = new ObjectMapper();
+        if (aaiResponseData.getHttpCode() == 200) {
+            responseEntity = new ResponseEntity<String>(objectMapper.writeValueAsString(aaiResponseData.getT()), HttpStatus.OK);
+        } else {
+            responseEntity = new ResponseEntity<String>(aaiResponseData.getErrorMessage(), HttpStatus.valueOf(aaiResponseData.getHttpCode()));
+        }
+        return responseEntity;
+    }
+
+    @RequestMapping(value = "/commitInfo", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public GitRepositoryState getCommitInfo() throws IOException {
+        Properties properties = new Properties();
+        properties.load(getClass().getClassLoader().getResourceAsStream(GIT_PROPERTIES_FILENAME));
+        return new GitRepositoryState(properties);
+    }
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/ViewLogController.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/ViewLogController.java
new file mode 100644
index 0000000..dc98503
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/ViewLogController.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import org.onap.portalsdk.core.controller.RestrictedBaseController;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+
+@RestController
+public class ViewLogController extends RestrictedBaseController{
+	
+	private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(ViewLogController.class);
+	
+	/** The Constant dateFormat. */
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+	
+	/** The servlet context. */
+	private @Autowired ServletContext servletContext;
+	
+	/**
+	 * Welcome.
+	 *
+	 * @param request the request
+	 * @return the model and view
+	 */
+	@RequestMapping(value = {"/viewlog" }, method = RequestMethod.GET)
+	public ModelAndView welcome(HttpServletRequest request) {
+		
+ 	return new ModelAndView(getViewName());		
+	}
+	
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/controllers/WebConfig.java b/onap-enabler-be/src/main/java/org/onap/osam/controllers/WebConfig.java
new file mode 100644
index 0000000..32e0510
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/controllers/WebConfig.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.osam.aai.AaiClient;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.PombaClientImpl;
+import org.onap.osam.aai.PombaClientInterface;
+import org.onap.osam.aai.PombaRestInterface;
+import org.onap.osam.aai.model.PortDetailsTranslator;
+import org.onap.osam.aai.util.AAIRestInterface;
+import org.onap.osam.aai.util.HttpsAuthClient;
+import org.onap.osam.aai.util.SSLContextProvider;
+import org.onap.osam.aai.util.ServletRequestHelper;
+import org.onap.osam.aai.util.SystemPropertyHelper;
+import org.onap.osam.client.SyncRestClient;
+import org.onap.osam.client.SyncRestClientInterface;
+import org.onap.osam.scheduler.SchedulerRestInterface;
+import org.onap.osam.scheduler.SchedulerRestInterfaceIfc;
+import org.onap.osam.services.AaiServiceImpl;
+import org.onap.osam.services.IAaiService;
+import org.onap.osam.services.IPombaService;
+import org.onap.osam.services.PombaServiceImpl;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.ServletContext;
+import java.io.File;
+
+@Configuration
+public class WebConfig {
+
+    @Bean
+    public ObjectMapper getObjectMapper() {
+        return new ObjectMapper();
+    }
+
+    @Bean
+    public IAaiService getAaiService() {
+        return new AaiServiceImpl();
+    }
+
+    @Bean
+    public PortDetailsTranslator portDetailsTranslator() {
+        return new PortDetailsTranslator();
+    }
+
+    @Bean
+    public AaiClientInterface getAaiRestInterface(@Qualifier("aaiRestInterface") AAIRestInterface restController, PortDetailsTranslator portsDetailsTranslator) {
+        return new AaiClient(restController, portsDetailsTranslator);
+    }
+
+    @Bean(name = "aaiRestInterface")
+    public AAIRestInterface aaiRestInterface(HttpsAuthClient httpsAuthClientFactory, ServletRequestHelper servletRequestHelper, SystemPropertyHelper systemPropertyHelper) {
+        return new AAIRestInterface(httpsAuthClientFactory, servletRequestHelper, systemPropertyHelper);
+    }
+
+    @Bean
+    public PombaRestInterface getPombaRestInterface(HttpsAuthClient httpsAuthClientFactory, ServletRequestHelper servletRequestHelper, SystemPropertyHelper systemPropertyHelper) {
+        return new PombaRestInterface(httpsAuthClientFactory, servletRequestHelper, systemPropertyHelper);
+    }
+
+    @Bean
+    public SSLContextProvider sslContextProvider() {
+        return new SSLContextProvider();
+    }
+
+    @Bean
+    public SystemPropertyHelper systemPropertyHelper() {
+        return new SystemPropertyHelper();
+    }
+
+    @Bean
+    public ServletRequestHelper servletRequestHelper() {
+        return new ServletRequestHelper();
+    }
+
+    @Bean
+    public HttpsAuthClient httpsAuthClientFactory(ServletContext servletContext, SystemPropertyHelper systemPropertyHelper, SSLContextProvider sslContextProvider) {
+        final String certFilePath = new File(servletContext.getRealPath("/WEB-INF/cert/")).getAbsolutePath();
+        return new HttpsAuthClient(certFilePath, systemPropertyHelper, sslContextProvider);
+    }
+
+    @Bean
+    public SyncRestClientInterface syncRestClient() {
+        return new SyncRestClient();
+    }
+
+    @Bean
+    public IPombaService getVerifyServiceInstanceService() {
+        return new PombaServiceImpl();
+    }
+
+    @Bean
+    public PombaClientInterface getVerifyServiceInstanceClientInterface() {
+        return new PombaClientImpl();
+    }
+
+    @Bean
+    public SchedulerRestInterfaceIfc getSchedulerRestInterface(){
+        return new SchedulerRestInterface();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/dao/FnAppDoaImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/dao/FnAppDoaImpl.java
new file mode 100644
index 0000000..1bb57d8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/dao/FnAppDoaImpl.java
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.dao;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+import java.sql.*;
+
+
+public class FnAppDoaImpl {
+
+	static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnAppDoaImpl.class);
+		
+		public int getProfileCount(String driver, String URL, String username, String password) {
+			Connection dbc = null;
+			PreparedStatement pst = null;
+			ResultSet rs = null;
+			String q = null;
+			int count = 0;
+			try {
+				 	dbc = getConnection(URL,username,password);
+				   logger.debug(EELFLoggerDelegate.debugLogger, "getConnection:::"+ dbc);
+				q = "select count(*) from fn_app";
+					pst = dbc.prepareStatement(q);
+					rs = pst.executeQuery();
+					
+					if (rs.next())
+						count = rs.getInt(1);
+			} catch(Exception ex) {
+				logger.error(EELFLoggerDelegate.errorLogger, "Failed to perform health check", ex);
+			} finally {
+				cleanup(rs,pst,dbc);
+			}
+			logger.debug(EELFLoggerDelegate.debugLogger, "count:::"+ count);
+			return count;
+		}
+
+		public static Connection getConnection(String url, String username, String password) throws SQLException {
+			java.sql.Connection con=null;
+		
+			if( url!=null && username!=null && password!=null ){
+			    con = DriverManager.getConnection(url, username, password);
+			}
+
+			logger.info("Connection Successful");
+
+			return con;
+			
+		}
+		
+		public static void cleanup(ResultSet rs, PreparedStatement st, Connection c) {
+			if (rs != null) {
+				closeResultSet(rs);
+			}
+			if (st != null) {
+				closePreparedStatement(st);
+			}
+			if (c != null) {
+				rollbackAndCloseConnection(c);
+			}
+		}
+
+	private static void rollbackAndCloseConnection(Connection c) {
+		try {
+            c.rollback();
+        } catch (Exception e) {
+            if (logger != null)
+                logger.error("Error when trying to rollback connection", e);
+        }
+		try {
+            c.close();
+        } catch (Exception e) {
+            if (logger != null)
+                logger.error("Error when trying to close connection", e);
+        }
+	}
+
+	private static void closePreparedStatement(PreparedStatement st) {
+		try {
+            st.close();
+        } catch (Exception e) {
+            if (logger != null)
+                logger.error("Error when trying to close statement", e);
+        }
+	}
+
+	private static void closeResultSet(ResultSet rs) {
+		try {
+            rs.close();
+        } catch (Exception e) {
+            if (logger != null)
+                logger.error("Error when trying to close result set", e);
+        }
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/dao/ProfileDao.java b/onap-enabler-be/src/main/java/org/onap/osam/dao/ProfileDao.java
new file mode 100644
index 0000000..22afd2e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/dao/ProfileDao.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.dao;
+
+import java.util.List;
+import org.onap.portalsdk.core.domain.Profile;
+
+public interface ProfileDao {
+	
+	List<Profile> findAll();
+	
+	/**
+	 * Gets the profile.
+	 *
+	 * @param id the id
+	 * @return the profile
+	 */
+	Profile getProfile(int id);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/exceptions/DbFailureUncheckedException.java b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/DbFailureUncheckedException.java
new file mode 100644
index 0000000..084833e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/DbFailureUncheckedException.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.exceptions;
+
+public class DbFailureUncheckedException extends GenericUncheckedException {
+
+
+    public DbFailureUncheckedException(String message) {
+        super(message);
+    }
+
+    public DbFailureUncheckedException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public DbFailureUncheckedException(Throwable cause) {
+        super(cause);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/exceptions/GenericUncheckedException.java b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/GenericUncheckedException.java
new file mode 100644
index 0000000..b922b90
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/GenericUncheckedException.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.exceptions;
+
+public class GenericUncheckedException extends RuntimeException {
+    public GenericUncheckedException(String message) {
+        super(message);
+    }
+
+    public GenericUncheckedException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public GenericUncheckedException(Throwable cause) {
+        super(cause);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/exceptions/MaxRetriesException.java b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/MaxRetriesException.java
new file mode 100644
index 0000000..6b3a77c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/MaxRetriesException.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.exceptions;
+
+public class MaxRetriesException extends GenericUncheckedException {
+
+    public MaxRetriesException(String operationDetails, int numberOfRetries) {
+        super(String.format("Max retries for %s, retries: %d", operationDetails, numberOfRetries));
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/exceptions/NotFoundException.java b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/NotFoundException.java
new file mode 100644
index 0000000..9fa1ff2
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/NotFoundException.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.exceptions;
+
+public class NotFoundException extends RuntimeException {
+
+     public NotFoundException(String message) {
+        super(message);
+    }
+
+    public NotFoundException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/exceptions/OperationNotAllowedException.java b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/OperationNotAllowedException.java
new file mode 100644
index 0000000..c83c38d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/OperationNotAllowedException.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.exceptions;
+
+public class OperationNotAllowedException extends GenericUncheckedException {
+    public OperationNotAllowedException(String message) {
+        super(message);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/exceptions/VidServiceUnavailableException.java b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/VidServiceUnavailableException.java
new file mode 100644
index 0000000..50432a1
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/exceptions/VidServiceUnavailableException.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.exceptions;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.ResponseStatus;
+
+@ResponseStatus(value=HttpStatus.SERVICE_UNAVAILABLE)
+public class VidServiceUnavailableException extends Exception {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Instantiates a new vid service unavailable exception.
+	 */
+	public VidServiceUnavailableException() {
+		super();
+	}
+	
+	/**
+	 * Instantiates a new vid service unavailable exception.
+	 *
+	 * @param msg the msg
+	 */
+	public VidServiceUnavailableException(String msg) {
+		super(msg);
+	}
+	
+	/**
+	 * Instantiates a new vid service unavailable exception.
+	 *
+	 * @param t the t
+	 */
+	public VidServiceUnavailableException(Throwable t) {
+		super(t);
+	}
+	
+	/**
+	 * Instantiates a new vid service unavailable exception.
+	 *
+	 * @param msg the msg
+	 * @param t the t
+	 */
+	public VidServiceUnavailableException(String msg, Throwable t) {
+		super(msg, t);
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/factories/MsoRequestFactory.java b/onap-enabler-be/src/main/java/org/onap/osam/factories/MsoRequestFactory.java
new file mode 100644
index 0000000..0e6363a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/factories/MsoRequestFactory.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.factories;
+
+import org.onap.osam.mso.rest.RequestDetails;
+
+public class MsoRequestFactory {
+
+    public RequestDetails createMsoRequest(String path)
+    {
+        return null;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/filters/ClientCredentialsFilter.java b/onap-enabler-be/src/main/java/org/onap/osam/filters/ClientCredentialsFilter.java
new file mode 100644
index 0000000..210a289
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/filters/ClientCredentialsFilter.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.filters;
+
+import org.apache.commons.lang3.StringUtils;
+import org.onap.osam.scheduler.SchedulerProperties;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.web.filter.GenericFilterBean;
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebFilter(urlPatterns = "/change-management/workflow/*")
+public class ClientCredentialsFilter  extends GenericFilterBean {
+
+    private final static EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(ClientCredentialsFilter.class);
+
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+
+        if (!(request instanceof HttpServletRequest) || !(response instanceof HttpServletResponse))
+            return;
+
+        String expectedAuthorization = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_BASIC_AUTH);
+        String actualAuthorization = ((HttpServletRequest)request).getHeader("Authorization");
+
+        if (verifyClientCredentials(actualAuthorization, expectedAuthorization)) {
+            LOGGER.warn(EELFLoggerDelegate.debugLogger,"Client credentials authenticated.");
+            chain.doFilter(request, response);
+            return;
+        }
+
+        LOGGER.warn(EELFLoggerDelegate.debugLogger,"Client did not provide the expected credentials.");
+        ((HttpServletResponse) response).sendError(401);
+    }
+
+    public boolean verifyClientCredentials(String actualAuthorization, String expectedAuthorization)
+    {
+        if (StringUtils.isEmpty(expectedAuthorization))
+        {
+            LOGGER.warn(EELFLoggerDelegate.debugLogger,String.format("Expected Authorization is not configured (key: %s)", SchedulerProperties.SCHEDULER_BASIC_AUTH));
+            return true;
+        }
+
+        if (StringUtils.isEmpty(actualAuthorization))
+        {
+            LOGGER.warn(EELFLoggerDelegate.debugLogger,"Authorization header is missing.");
+            return false;
+        }
+
+        return actualAuthorization.equals(expectedAuthorization);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/filters/PromiseEcompRequestIdFilter.java b/onap-enabler-be/src/main/java/org/onap/osam/filters/PromiseEcompRequestIdFilter.java
new file mode 100644
index 0000000..9c3d918
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/filters/PromiseEcompRequestIdFilter.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.filters;
+
+
+import com.google.common.collect.ImmutableList;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.web.filter.GenericFilterBean;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.UUID;
+
+import static org.onap.portalsdk.core.util.SystemProperties.ECOMP_REQUEST_ID;
+
+@WebFilter(urlPatterns = "/*")
+public class PromiseEcompRequestIdFilter extends GenericFilterBean {
+
+    private final static EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(PromiseEcompRequestIdFilter.class);
+    private final static String REQUEST_ID_RESPONSE_HEADER = ECOMP_REQUEST_ID + "-echo";
+
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+            throws IOException, ServletException {
+
+        if (request instanceof HttpServletRequest) {
+            request = wrapIfNeeded(request);
+
+            if (response instanceof HttpServletResponse) {
+                final String actualRequestId = ((HttpServletRequest) request).getHeader(ECOMP_REQUEST_ID);
+                ((HttpServletResponse) response).addHeader(REQUEST_ID_RESPONSE_HEADER, actualRequestId);
+            }
+        }
+
+        chain.doFilter(request, response);
+    }
+
+    public static ServletRequest wrapIfNeeded(ServletRequest request) {
+        final HttpServletRequest httpRequest = (HttpServletRequest) request;
+        final String originalRequestId = httpRequest.getHeader(ECOMP_REQUEST_ID);
+
+        if (StringUtils.isEmpty(originalRequestId)) {
+            request = new PromiseEcompRequestIdRequestWrapper(httpRequest);
+        }
+
+        return request;
+    }
+
+    private static class PromiseEcompRequestIdRequestWrapper extends HttpServletRequestWrapper {
+
+        private final UUID requestId;
+
+        PromiseEcompRequestIdRequestWrapper(HttpServletRequest request) {
+            super(request);
+            requestId = UUID.randomUUID();
+        }
+
+        @Override
+        public String getHeader(String name) {
+            return isRequestIdHeaderName(name) ?
+                    requestId.toString() : super.getHeader(name);
+        }
+
+        @Override
+        public Enumeration<String> getHeaders(String name) {
+            if (isRequestIdHeaderName(name)) {
+                return Collections.enumeration(Collections.singleton(requestId.toString()));
+            } else {
+                return super.getHeaders(name);
+            }
+        }
+
+        @Override
+        public Enumeration<String> getHeaderNames() {
+            return Collections.enumeration(ImmutableList.<String>builder()
+                    .add(ECOMP_REQUEST_ID)
+                    .addAll(Collections.list(super.getHeaderNames()))
+                    .build());
+        }
+
+        private boolean isRequestIdHeaderName(String name) {
+            return ECOMP_REQUEST_ID.equalsIgnoreCase(name);
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/filters/TempFilterForCORS.java b/onap-enabler-be/src/main/java/org/onap/osam/filters/TempFilterForCORS.java
new file mode 100644
index 0000000..5f76026
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/filters/TempFilterForCORS.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.filters;
+
+import org.apache.commons.lang3.StringUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.web.filter.GenericFilterBean;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@WebFilter(urlPatterns = "/*")
+public class TempFilterForCORS extends GenericFilterBean {
+
+    private static final String ENV_MODE = "env.mode";
+    private Boolean devMode = null;
+
+     //dev mode is initialized here since @WebFilter doesn't support @Autowired
+    //So we are sure that SystemProperties bean was initialed only after the first call to doFilter
+    private boolean isDevMode() {
+        if (devMode!=null) {
+            return devMode;
+        }
+        else {
+            if (!SystemProperties.containsProperty(ENV_MODE)) {
+                devMode = Boolean.FALSE;
+                return devMode;
+            }
+
+            String envMode = SystemProperties.getProperty(ENV_MODE);
+            devMode = StringUtils.equalsIgnoreCase(envMode, "dev") ;
+        }
+        return devMode;
+    }
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+
+        if (isDevMode() && response instanceof HttpServletResponse) {
+            ((HttpServletResponse) response).addHeader("Access-Control-Allow-Origin", "http://localhost:3000");
+            ((HttpServletResponse) response).addHeader("Access-Control-Allow-Credentials", "true");
+        }
+        chain.doFilter(request, response);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/Job.java b/onap-enabler-be/src/main/java/org/onap/osam/job/Job.java
new file mode 100644
index 0000000..8c4deed
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/Job.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import java.util.Map;
+import java.util.UUID;
+
+public interface Job {
+
+    UUID getUuid();
+
+    void setUuid(UUID uuid);
+
+    JobStatus getStatus();
+
+    void setStatus(JobStatus status);
+
+    @JsonIgnore
+    Map<String, Object> getData();
+
+    void setTypeAndData(JobType jobType, Map<String, Object> data);
+
+    UUID getTemplateId();
+
+    void setTemplateId(UUID templateId);
+
+    void setIndexInBulk(Integer indexInBulk);
+
+    JobType getType();
+
+    enum JobStatus {
+        COMPLETED(true),
+        FAILED(true),
+        IN_PROGRESS(false),
+        PAUSE(false),
+        PENDING(false),
+        STOPPED(true);
+
+        private final Boolean finalStatus;
+        public Boolean isFinal(){return finalStatus;}
+
+        JobStatus(Boolean finalStatus)
+        {
+            this.finalStatus = finalStatus ;
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/JobAdapter.java b/onap-enabler-be/src/main/java/org/onap/osam/job/JobAdapter.java
new file mode 100644
index 0000000..b7a732d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/JobAdapter.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job;
+
+import org.onap.osam.model.JobBulk;
+import org.onap.osam.model.JobModel;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+public interface JobAdapter {
+    JobModel toModel(Job job);
+
+    JobBulk toModelBulk(List<Job> jobList);
+
+    List<Job> createBulkOfJobs(Map<String, Object> bulkRequest);
+
+    Job createJob(JobType jobType, AsyncJobRequest request, UUID templateId, String userId, Integer indexInBulk);
+
+    // Marks types that are an AsyncJob payload
+    public interface AsyncJobRequest {
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/JobCommand.java b/onap-enabler-be/src/main/java/org/onap/osam/job/JobCommand.java
new file mode 100644
index 0000000..161461b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/JobCommand.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job;
+
+import java.util.Map;
+import java.util.UUID;
+
+
+public interface JobCommand {
+
+    default JobCommand init(UUID jobUuid, Map<String, Object> data) {
+        return this;
+    }
+
+    /**
+     * @return Returns the inner state of the command. This state, once passed into init(), should
+     *         bring the command back to it's state.
+     */
+    Map<String, Object> getData();
+
+    /**
+     * Execute the command represented by this instance. Assumes the instance is already init().
+     * @return A NextCommand containing the next command in chain of commands, or null if chain
+     *         should be terminated. Might return itself (packed in a NextCommand).
+     */
+    NextCommand call();
+
+    default JobType getType() {
+        return JobType.jobTypeOf(this.getClass());
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/JobType.java b/onap-enabler-be/src/main/java/org/onap/osam/job/JobType.java
new file mode 100644
index 0000000..6b8f5b2
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/JobType.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job;
+
+import org.onap.osam.job.command.*;
+
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public enum JobType {
+
+    HttpCall(HttpCallCommand.class),
+    AggregateState(AggregateStateCommand.class),
+    InProgressStatus(InProgressStatusCommand.class),
+    NoOp(NoOpCommand.class),
+    ServiceInstantiation(ServiceInstantiationCommand.class);
+
+    private static final Map<Class, JobType> REVERSE_MAP = Stream.of(values()).collect(Collectors.toMap(t -> t.getCommandClass(), t -> t));
+
+    private final Class commandClass;
+
+    <T extends JobCommand> JobType(Class<T> commandClass) {
+        this.commandClass = commandClass;
+    }
+
+    public Class getCommandClass() {
+        return commandClass;
+    }
+    static JobType jobTypeOf(Class commandClass) {
+        return REVERSE_MAP.get(commandClass);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/JobsBrokerService.java b/onap-enabler-be/src/main/java/org/onap/osam/job/JobsBrokerService.java
new file mode 100644
index 0000000..3554a08
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/JobsBrokerService.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job;
+
+import java.util.Collection;
+import java.util.Optional;
+import java.util.UUID;
+
+public interface JobsBrokerService {
+
+    UUID add(Job job);
+
+    Optional<Job> pull(Job.JobStatus topic, String ownerId);
+
+    void pushBack(Job job);
+
+    Collection<Job> peek();
+
+    Job peek(UUID jobId);
+
+    void delete(UUID jobId);
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/NextCommand.java b/onap-enabler-be/src/main/java/org/onap/osam/job/NextCommand.java
new file mode 100644
index 0000000..4afb54a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/NextCommand.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job;
+
+public class NextCommand {
+    private final Job.JobStatus status;
+    private final JobCommand command;
+
+    public NextCommand(Job.JobStatus nextStatus, JobCommand nextCommand) {
+        this.status = nextStatus;
+        this.command = nextCommand;
+    }
+
+    public NextCommand(Job.JobStatus nextStatus) {
+        this.status = nextStatus;
+        this.command = null;
+    }
+
+    public Job.JobStatus getStatus() {
+        return status;
+    }
+
+    public JobCommand getCommand() {
+        return command;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/command/AggregateStateCommand.java b/onap-enabler-be/src/main/java/org/onap/osam/job/command/AggregateStateCommand.java
new file mode 100644
index 0000000..fbbb95e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/command/AggregateStateCommand.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.command;
+
+import org.onap.osam.job.JobCommand;
+import org.onap.osam.job.NextCommand;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import java.util.Collections;
+import java.util.Map;
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class AggregateStateCommand implements JobCommand {
+
+    @Override
+    public NextCommand call() {
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> getData() {
+        return Collections.emptyMap();
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/command/HttpCallCommand.java b/onap-enabler-be/src/main/java/org/onap/osam/job/command/HttpCallCommand.java
new file mode 100644
index 0000000..79d664f
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/command/HttpCallCommand.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.command;
+
+import com.google.common.collect.ImmutableMap;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobCommand;
+import org.onap.osam.job.NextCommand;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.Response;
+import java.util.Map;
+import java.util.UUID;
+
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class HttpCallCommand implements JobCommand {
+    private String url;
+    private UUID uuid;
+
+    public HttpCallCommand() {
+    }
+
+    public HttpCallCommand(String url, UUID uuid) {
+        init(url, uuid);
+    }
+
+    @Override
+    public NextCommand call() {
+        final Response response = ClientBuilder.newClient().target(url).request().post(Entity.text(uuid.toString()));
+        return new NextCommand(Job.JobStatus.COMPLETED);
+    }
+
+    @Override
+    public HttpCallCommand init(UUID jobUuid, Map<String, Object> data) {
+        return init((String) data.get("url"), jobUuid);
+    }
+
+    private HttpCallCommand init(String url, UUID jobUuid) {
+        this.url = url;
+        this.uuid = jobUuid;
+        return this;
+    }
+
+    @Override
+    public Map<String, Object> getData() {
+        return ImmutableMap.of("url", url);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/command/InProgressStatusCommand.java b/onap-enabler-be/src/main/java/org/onap/osam/job/command/InProgressStatusCommand.java
new file mode 100644
index 0000000..dc42136
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/command/InProgressStatusCommand.java
@@ -0,0 +1,133 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.command;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableMap;
+import io.joshworks.restclient.http.HttpResponse;
+import org.onap.osam.job.Job.JobStatus;
+import org.onap.osam.job.JobCommand;
+import org.onap.osam.job.NextCommand;
+import org.onap.osam.mso.MsoInterface;
+import org.onap.osam.mso.rest.AsyncRequestStatus;
+import org.onap.osam.services.IAsyncInstantiationBusinessLogic;
+import org.onap.osam.services.IAuditService;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import javax.inject.Inject;
+import java.util.Map;
+import java.util.UUID;
+
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class InProgressStatusCommand implements JobCommand {
+
+    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(InProgressStatusCommand.class);
+
+    @Inject
+    private IAsyncInstantiationBusinessLogic asyncInstantiationBL;
+
+    @Inject
+    private MsoInterface restMso;
+
+    @Inject
+    private IAuditService auditService;
+
+    private String requestId;
+
+    private UUID jobUuid;
+
+    public InProgressStatusCommand() {
+    }
+
+    InProgressStatusCommand(UUID jobUuid, String requestId) {
+        init(jobUuid, requestId);
+    }
+
+    @Override
+    public NextCommand call() {
+
+        try {
+            String path = asyncInstantiationBL.getOrchestrationRequestsPath()+"/"+requestId;
+            HttpResponse<AsyncRequestStatus> msoResponse = restMso.get(path, AsyncRequestStatus.class);
+
+
+            JobStatus jobStatus;
+            if (msoResponse.getStatus() >= 400 || msoResponse.getBody() == null) {
+                auditService.setFailedAuditStatusFromMso(jobUuid, requestId, msoResponse.getStatus(), msoResponse.getBody().toString());
+                LOGGER.error(EELFLoggerDelegate.errorLogger,
+                        "Failed to get orchestration status for {}. Status code: {},  Body: {}",
+                        requestId, msoResponse.getStatus(), msoResponse.getRawBody().toString());
+                return new NextCommand(JobStatus.IN_PROGRESS, this);
+            }
+            else {
+                jobStatus = asyncInstantiationBL.calcStatus(msoResponse.getBody());
+            }
+
+            asyncInstantiationBL.auditMsoStatus(jobUuid,msoResponse.getBody().request);
+
+
+            if (jobStatus == JobStatus.FAILED) {
+                asyncInstantiationBL.handleFailedInstantiation(jobUuid);
+            }
+            else {
+                asyncInstantiationBL.updateServiceInfoAndAuditStatus(jobUuid, jobStatus);
+            }
+            //in case of JobStatus.PAUSE we leave the job itself as IN_PROGRESS, for keep tracking job progress
+            if (jobStatus == JobStatus.PAUSE) {
+                return new NextCommand(JobStatus.IN_PROGRESS, this);
+            }
+            return new NextCommand(jobStatus, this);
+        } catch (javax.ws.rs.ProcessingException e) {
+            // Retry when we can't connect MSO during getStatus
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, will retry: {}", requestId, e, e);
+            return new NextCommand(JobStatus.IN_PROGRESS, this);
+        } catch (RuntimeException e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, stopping: {}", requestId, e, e);
+            return new NextCommand(JobStatus.STOPPED, this);
+        }
+    }
+
+    @Override
+    public InProgressStatusCommand init(UUID jobUuid, Map<String, Object> data) {
+        return init(jobUuid, (String) data.get("requestId"));
+    }
+
+    private InProgressStatusCommand init(UUID jobUuid, String requestId) {
+        this.requestId = requestId;
+        this.jobUuid = jobUuid;
+        return this;
+    }
+
+    @Override
+    public Map<String, Object> getData() {
+        return ImmutableMap.of("requestId", requestId);
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/command/JobCommandFactory.java b/onap-enabler-be/src/main/java/org/onap/osam/job/command/JobCommandFactory.java
new file mode 100644
index 0000000..be430b8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/command/JobCommandFactory.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.command;
+
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobCommand;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
+
+import javax.inject.Inject;
+import java.util.function.Function;
+
+@Component
+public class JobCommandFactory {
+
+    final Function<Class<? extends JobCommand>, JobCommand> jobFactory;
+
+    @Inject
+    public JobCommandFactory(ApplicationContext applicationContext) {
+        this.jobFactory = (jobType -> {
+            final Object commandBean = applicationContext.getBean(jobType);
+
+            if (!(commandBean instanceof JobCommand)) {
+                throw new GenericUncheckedException(commandBean.getClass() + " is not a JobCommand");
+            }
+
+            return (JobCommand) commandBean;
+        });
+    }
+
+    public JobCommandFactory(Function<Class<? extends JobCommand>, JobCommand> jobFactory) {
+        this.jobFactory = jobFactory;
+    }
+
+    public JobCommand toCommand(Job job) {
+
+        final JobCommand command = jobFactory.apply(job.getType().getCommandClass());
+        command.init(job.getUuid(), job.getData());
+
+        return command;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/command/NoOpCommand.java b/onap-enabler-be/src/main/java/org/onap/osam/job/command/NoOpCommand.java
new file mode 100644
index 0000000..92619b0
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/command/NoOpCommand.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.command;
+
+import org.onap.osam.job.JobCommand;
+import org.onap.osam.job.NextCommand;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import java.util.Collections;
+import java.util.Map;
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class NoOpCommand implements JobCommand {
+
+    @Override
+    public NextCommand call() {
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> getData() {
+        return Collections.emptyMap();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/command/ServiceInstantiationCommand.java b/onap-enabler-be/src/main/java/org/onap/osam/job/command/ServiceInstantiationCommand.java
new file mode 100644
index 0000000..1e03d4f
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/command/ServiceInstantiationCommand.java
@@ -0,0 +1,162 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.command;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableMap;
+import io.joshworks.restclient.http.HttpResponse;
+import org.onap.osam.services.IAsyncInstantiationBusinessLogic;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.osam.aai.exceptions.InvalidAAIResponseException;
+import org.onap.osam.exceptions.MaxRetriesException;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobCommand;
+import org.onap.osam.job.NextCommand;
+import org.onap.osam.model.RequestReferencesContainer;
+import org.onap.osam.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.osam.mso.MsoInterface;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.onap.osam.services.IAuditService;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import javax.inject.Inject;
+import java.util.Map;
+import java.util.UUID;
+
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+public class ServiceInstantiationCommand implements JobCommand {
+
+    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(ServiceInstantiationCommand.class);
+
+    @Inject
+    private IAsyncInstantiationBusinessLogic asyncInstantiationBL;
+
+    @Inject
+    private IAuditService auditService;
+
+    @Inject
+    private MsoInterface restMso;
+
+    private UUID uuid;
+    private ServiceInstantiation serviceInstantiationRequest;
+    private String userId;
+
+    public ServiceInstantiationCommand() {
+    }
+
+    public ServiceInstantiationCommand(UUID uuid, ServiceInstantiation serviceInstantiationRequest, String userId) {
+        init(uuid, serviceInstantiationRequest, userId);
+    }
+
+    @Override
+    public NextCommand call() {
+        RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper();
+        try {
+            /*requestDetailsWrapper = asyncInstantiationBL.generateServiceInstantiationRequest(
+                    uuid, serviceInstantiationRequest, userId
+            );*/
+        }
+
+        //Aai return bad response while checking names uniqueness
+        catch (InvalidAAIResponseException exception) {
+            LOGGER.error("Failed to check name uniqueness in AAI. VID will try again later", exception);
+            //put the job in_progress so we will keep trying to check name uniqueness in AAI
+            //And then send the request to MSO
+            return new NextCommand(Job.JobStatus.IN_PROGRESS, this);
+        }
+
+        //Vid reached to max retries while trying to find unique name in AAI
+        catch (MaxRetriesException exception) {
+            LOGGER.error("Failed to find unused name in AAI. Set the job to FAILED ", exception);
+            return handleCommandFailed();
+        }
+
+        String path = asyncInstantiationBL.getServiceInstantiationPath(serviceInstantiationRequest);
+
+        HttpResponse<RequestReferencesContainer> msoResponse = restMso.post(path,
+            requestDetailsWrapper, RequestReferencesContainer.class);
+
+
+        if (msoResponse.getStatus() >= 200 && msoResponse.getStatus() < 400) {
+            final Job.JobStatus jobStatus = Job.JobStatus.IN_PROGRESS;
+            final String requestId = msoResponse.getBody().getRequestReferences().getRequestId();
+            final String instanceId = msoResponse.getBody().getRequestReferences().getInstanceId();
+            asyncInstantiationBL.auditVidStatus(uuid, jobStatus);
+            setInitialRequestAuditStatusFromMso(requestId);
+            asyncInstantiationBL.updateServiceInfo(uuid, x-> {
+                x.setJobStatus(jobStatus);
+                x.setServiceInstanceId(instanceId);
+            });
+
+            return new NextCommand(jobStatus, new InProgressStatusCommand(uuid, requestId));
+        } else {
+            auditService.setFailedAuditStatusFromMso(uuid,null, msoResponse.getStatus(),
+                msoResponse.getBody().toString());
+            return handleCommandFailed();
+        }
+
+    }
+
+    private void setInitialRequestAuditStatusFromMso(String requestId){
+        final String initialMsoRequestStatus = "REQUESTED";
+        asyncInstantiationBL.auditMsoStatus(uuid,initialMsoRequestStatus,requestId,null);
+    }
+
+    protected NextCommand handleCommandFailed() {
+        asyncInstantiationBL.handleFailedInstantiation(uuid);
+        return new NextCommand(Job.JobStatus.FAILED);
+    }
+
+    @Override
+    public ServiceInstantiationCommand init(UUID jobUuid, Map<String, Object> data) {
+        final Object request = data.get("request");
+
+        return init(
+                jobUuid,
+                OBJECT_MAPPER.convertValue(request, ServiceInstantiation.class),
+                (String) data.get("userId")
+        );
+    }
+
+    private ServiceInstantiationCommand init(UUID jobUuid, ServiceInstantiation serviceInstantiationRequest, String userId) {
+        this.uuid = jobUuid;
+        this.serviceInstantiationRequest = serviceInstantiationRequest;
+        this.userId = userId;
+
+        return this;
+    }
+
+    @Override
+    public Map<String, Object> getData() {
+        return ImmutableMap.of(
+                "uuid", uuid,
+                "request", serviceInstantiationRequest,
+                "userId", userId
+        );
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobAdapterImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobAdapterImpl.java
new file mode 100644
index 0000000..280eb84
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobAdapterImpl.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.impl;
+
+import com.google.common.collect.ImmutableMap;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobAdapter;
+import org.onap.osam.job.JobType;
+import org.onap.osam.model.JobBulk;
+import org.onap.osam.model.JobModel;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.BadRequestException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+@Component
+public class JobAdapterImpl implements JobAdapter {
+
+    @Override
+    public JobModel toModel(Job job) {
+        JobModel jobModel = new JobModel();
+        jobModel.setUuid(job.getUuid());
+        jobModel.setStatus(job.getStatus());
+        jobModel.setTemplateId(job.getTemplateId());
+        return jobModel;
+    }
+
+    @Override
+    public JobBulk toModelBulk(List<Job> jobList) {
+        return new JobBulk(jobList.stream().map(this::toModel).collect(Collectors.toList()));
+    }
+
+    @Override
+    public Job createJob(JobType jobType, AsyncJobRequest request, UUID templateId, String userId, Integer indexInBulk){
+        JobDaoImpl job = new JobDaoImpl();
+        job.setStatus(Job.JobStatus.PENDING);
+        job.setTypeAndData(jobType, ImmutableMap.of(
+                "request", request,
+                "userId", userId));
+        job.setTemplateId(templateId);
+        job.setIndexInBulk(indexInBulk);
+        job.setUserId(userId);
+        return job;
+    }
+
+    @Override
+    public List<Job> createBulkOfJobs(Map<String, Object> bulkRequest) {
+        int count;
+        JobType jobType;
+
+        try {
+            count = (Integer) bulkRequest.get("count");
+            jobType = JobType.valueOf((String) bulkRequest.get("type"));
+        } catch (Exception exception) {
+            throw new BadRequestException(exception);
+        }
+        List<Job> jobList = new ArrayList<>(count + 1);
+        UUID templateId = UUID.randomUUID();
+        for (int i = 0; i < count; i++) {
+            Job child = new JobDaoImpl();
+            child.setTypeAndData(jobType, bulkRequest);
+            child.setStatus(Job.JobStatus.PENDING);
+            child.setTemplateId(templateId);
+            child.setIndexInBulk(i);
+            jobList.add(child);
+        }
+        return jobList;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobDaoImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobDaoImpl.java
new file mode 100644
index 0000000..c1f6c61
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobDaoImpl.java
@@ -0,0 +1,214 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.impl;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.MoreObjects;
+import org.hibernate.annotations.Type;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobType;
+import org.onap.osam.model.VidBaseEntity;
+
+import javax.persistence.*;
+import java.io.IOException;
+import java.util.*;
+
+@Entity
+@Table(name = "vid_job")
+public class JobDaoImpl extends VidBaseEntity implements Job {
+
+    private static ObjectMapper objectMapper = new ObjectMapper();
+    private Job.JobStatus status;
+    private JobType type;
+    private Map<JobType, Map<String, Object>> data = new TreeMap<>();
+    private UUID templateId;
+    private UUID uuid;
+    private String takenBy;
+    private String userId;
+    private Integer age = 0;
+    private Integer indexInBulk = 0;
+    private Date deletedAt;
+
+    @Id
+    @Column(name = "JOB_ID", columnDefinition = "CHAR(36)")
+    @Type(type="org.hibernate.type.UUIDCharType")
+    public UUID getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(UUID uuid) {
+        this.uuid = uuid;
+    }
+
+    //we use uuid instead id. So making id Transient
+    @Override
+    @Transient
+    @JsonIgnore
+    public Long getId() {
+        return this.getUuid().getLeastSignificantBits();
+    }
+
+    @Column(name = "JOB_STATUS")
+    @Enumerated(EnumType.STRING)
+    public Job.JobStatus getStatus() {
+        return status;
+    }
+
+    public void setStatus(Job.JobStatus status) {
+        this.status = status;
+    }
+
+    @Enumerated(EnumType.STRING)
+    @Column(name = "JOB_TYPE")
+    public JobType getType() {
+        return type;
+    }
+
+    public void setType(JobType type) {
+        this.type = type;
+    }
+
+    //the columnDefinition is relevant only for UT
+    @Column(name = "JOB_DATA", columnDefinition = "VARCHAR(30000)")
+    public String getDataRaw() {
+        try {
+            return objectMapper.writeValueAsString(data);
+        } catch (JsonProcessingException e) {
+            throw new GenericUncheckedException(e);
+        }
+    }
+
+    public void setDataRaw(String data) {
+        try {
+            this.data = objectMapper.readValue(data, new TypeReference<Map<JobType, Map<String, Object>>>() {
+            });
+        } catch (IOException e) {
+            throw new GenericUncheckedException(e);
+        }
+    }
+
+    @Transient
+    public Map<String, Object> getData() {
+        return data.get(getType());
+    }
+
+    @Override
+    public void setTypeAndData(JobType jobType, Map<String, Object> data) {
+        // *add* the data to map,
+        // then change state to given type
+        this.type = jobType;
+        this.data.put(jobType, data);
+    }
+
+    @Column(name = "TAKEN_BY")
+    public String getTakenBy() {
+        return takenBy;
+    }
+
+    public void setTakenBy(String takenBy) {
+        this.takenBy = takenBy;
+    }
+
+    @Type(type="org.hibernate.type.UUIDCharType")
+    @Column(name = "TEMPLATE_ID", columnDefinition = "CHAR(36)")
+    public UUID getTemplateId() {
+        return templateId;
+    }
+
+    @Override
+    public void setTemplateId(UUID templateId) {
+        this.templateId = templateId;
+    }
+
+    @Column(name="INDEX_IN_BULK")
+    public Integer getIndexInBulk() {
+        return indexInBulk;
+    }
+
+    @Override
+    public void setIndexInBulk(Integer indexInBulk) {
+        this.indexInBulk = indexInBulk;
+    }
+
+    @Column(name="USER_ID")
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    @Column(name="AGE")
+    public Integer getAge() {
+        return age;
+    }
+
+    public void setAge(Integer age) {
+        this.age = age;
+    }
+
+    @Column(name="DELETED_AT")
+    public Date getDeletedAt() {
+        return deletedAt;
+    }
+
+    public void setDeletedAt(Date deletedAt) {
+        this.deletedAt = deletedAt;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof JobDaoImpl)) return false;
+        JobDaoImpl daoJob = (JobDaoImpl) o;
+        return Objects.equals(getUuid(), daoJob.getUuid());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getUuid());
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("status", status)
+                .add("type", type)
+                .add("templateId", templateId)
+                .add("uuid", uuid)
+                .add("takenBy", takenBy)
+                .add("userId", userId)
+                .add("age", age)
+                .add("created", created)
+                .add("modified", modified)
+                .add("deletedAt", deletedAt)
+                .add("data", data)
+                .toString();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobSchedulerInitializer.java b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobSchedulerInitializer.java
new file mode 100644
index 0000000..7a983c8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobSchedulerInitializer.java
@@ -0,0 +1,98 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.impl;
+
+import com.google.common.collect.ImmutableMap;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobsBrokerService;
+import org.onap.osam.job.command.JobCommandFactory;
+import org.onap.osam.properties.Features;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.quartz.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.quartz.SchedulerFactoryBean;
+import org.springframework.stereotype.Component;
+import org.togglz.core.manager.FeatureManager;
+
+import javax.annotation.PostConstruct;
+
+import static org.quartz.SimpleScheduleBuilder.simpleSchedule;
+
+@Component
+public class JobSchedulerInitializer {
+
+    private JobsBrokerService jobsBrokerService;
+    private SchedulerFactoryBean schedulerFactoryBean;
+    private FeatureManager featureManager;
+    private JobCommandFactory jobCommandFactory;
+    private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JobSchedulerInitializer.class);
+
+    @Autowired
+    public JobSchedulerInitializer(
+            JobsBrokerService jobsBrokerService,
+            SchedulerFactoryBean schedulerFactoryBean,
+            FeatureManager featureManager,
+            JobCommandFactory JobCommandFactory
+    ) {
+        this.jobsBrokerService = jobsBrokerService;
+        this.schedulerFactoryBean = schedulerFactoryBean;
+        this.featureManager = featureManager;
+        this.jobCommandFactory = JobCommandFactory;
+
+    }
+
+    @PostConstruct
+    public void init() {
+        if (!featureManager.isActive(Features.FLAG_ASYNC_JOBS)) {
+            return;
+        }
+        scheduleJobWorker(Job.JobStatus.PENDING, 1);
+        scheduleJobWorker(Job.JobStatus.IN_PROGRESS, 1);
+    }
+
+    private void scheduleJobWorker(Job.JobStatus topic, int intervalInSeconds) {
+        Scheduler scheduler = schedulerFactoryBean.getScheduler();
+        JobDetail jobDetail = JobBuilder.newJob().ofType(JobWorker.class)
+                .withIdentity("AsyncWorkersJob" + topic)
+                .withDescription("Job that run async worker for " + topic)
+                .setJobData(new JobDataMap(ImmutableMap.of(
+                        "jobsBrokerService", jobsBrokerService,
+                        "jobCommandFactory", jobCommandFactory,
+                        "featureManager", featureManager,
+                        "topic", topic
+                )))
+                .build();
+        Trigger asyncWorkerTrigger = TriggerBuilder.newTrigger().forJob(jobDetail)
+                .withIdentity("AsyncWorkersTrigger" + topic)
+                .withDescription("Trigger to run async worker for " + topic)
+                .withSchedule(simpleSchedule().repeatForever().withIntervalInSeconds(intervalInSeconds))
+                .build();
+        try {
+            scheduler.scheduleJob(jobDetail, asyncWorkerTrigger);
+        } catch (SchedulerException e) {
+            logger.error(EELFLoggerDelegate.errorLogger, "Failed to schedule trigger for async worker jobs: {}", e.getMessage());
+            throw new GenericUncheckedException(e);
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobWorker.java b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobWorker.java
new file mode 100644
index 0000000..54899ec
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobWorker.java
@@ -0,0 +1,157 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.impl;
+
+import org.apache.commons.lang3.StringUtils;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobCommand;
+import org.onap.osam.job.JobsBrokerService;
+import org.onap.osam.job.NextCommand;
+import org.onap.osam.job.command.JobCommandFactory;
+import org.onap.osam.properties.Features;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.quartz.JobExecutionContext;
+import org.springframework.scheduling.quartz.QuartzJobBean;
+import org.springframework.stereotype.Component;
+import org.togglz.core.manager.FeatureManager;
+
+import java.util.Optional;
+import java.util.UUID;
+
+import static org.onap.osam.job.Job.JobStatus.FAILED;
+import static org.onap.osam.job.Job.JobStatus.STOPPED;
+
+@Component
+public class JobWorker extends QuartzJobBean {
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(JobWorker.class);
+
+    private JobsBrokerService jobsBrokerService;
+    private FeatureManager featureManager;
+    private JobCommandFactory jobCommandFactory;
+    private Job.JobStatus topic;
+
+    @Override
+    protected void executeInternal(JobExecutionContext context) {
+        Optional<Job> job;
+
+        if (!isMsoNewApiActive()) {
+            return;
+        }
+
+        job = pullJob();
+
+        while (job.isPresent()) {
+            Job nextJob = executeJobAndGetNext(job.get());
+            pushBack(nextJob);
+
+            job = pullJob();
+        }
+    }
+
+    private Optional<Job> pullJob() {
+        try {
+            return jobsBrokerService.pull(topic, UUID.randomUUID().toString());
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "failed to pull job from queue, breaking: {}", e, e);
+            return Optional.empty();
+        }
+    }
+
+    private void pushBack(Job nextJob) {
+        try {
+            jobsBrokerService.pushBack(nextJob);
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "failed pushing back job to queue: {}", e, e);
+        }
+    }
+
+    protected Job executeJobAndGetNext(Job job) {
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "going to execute job {} of {}: {}/{}",
+                StringUtils.substring(String.valueOf(job.getUuid()), 0, 8),
+                StringUtils.substring(String.valueOf(job.getTemplateId()), 0, 8),
+                job.getStatus(), job.getType());
+
+        NextCommand nextCommand = executeCommandAndGetNext(job);
+
+        Job nextJob = setNextCommandInJob(nextCommand, job);
+
+        return nextJob;
+    }
+
+    private NextCommand executeCommandAndGetNext(Job job) {
+        NextCommand nextCommand;
+        try {
+            final JobCommand jobCommand = jobCommandFactory.toCommand(job);
+            nextCommand = jobCommand.call();
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "error while executing job from queue: {}", e, e);
+            nextCommand = new NextCommand(FAILED);
+        }
+
+        if (nextCommand == null) {
+            nextCommand = new NextCommand(STOPPED);
+        }
+        return nextCommand;
+    }
+
+    private Job setNextCommandInJob(NextCommand nextCommand, Job job) {
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "transforming job {} of {}: {}/{} -> {}{}",
+                StringUtils.substring(String.valueOf(job.getUuid()), 0, 8),
+                StringUtils.substring(String.valueOf(job.getTemplateId()), 0, 8),
+                job.getStatus(), job.getType(),
+                nextCommand.getStatus(),
+                nextCommand.getCommand() != null ? ("/" + nextCommand.getCommand().getType()) : "");
+
+        job.setStatus(nextCommand.getStatus());
+
+        if (nextCommand.getCommand() != null) {
+            job.setTypeAndData(nextCommand.getCommand().getType(), nextCommand.getCommand().getData());
+        }
+
+        return job;
+    }
+
+    private boolean isMsoNewApiActive() {
+        return featureManager.isActive(Features.FLAG_ASYNC_INSTANTIATION);
+    }
+
+
+    //used by quartz to inject JobsBrokerService into the job
+    //see JobSchedulerInitializer
+    public void setJobsBrokerService(JobsBrokerService jobsBrokerService) {
+        this.jobsBrokerService = jobsBrokerService;
+    }
+
+    public void setFeatureManager(FeatureManager featureManager) {
+        this.featureManager = featureManager;
+    }
+
+    public void setJobCommandFactory(JobCommandFactory jobCommandFactory) {
+        this.jobCommandFactory = jobCommandFactory;
+    }
+
+    public void setTopic(Job.JobStatus topic) {
+        this.topic = topic;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobsBrokerServiceInDatabaseImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobsBrokerServiceInDatabaseImpl.java
new file mode 100644
index 0000000..672197c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/job/impl/JobsBrokerServiceInDatabaseImpl.java
@@ -0,0 +1,258 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.impl;
+
+import org.apache.commons.lang3.StringUtils;
+import org.hibernate.SessionFactory;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.exceptions.OperationNotAllowedException;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobsBrokerService;
+import org.onap.osam.properties.VidProperties;
+import org.onap.osam.utils.DaoUtils;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.PostConstruct;
+import java.nio.ByteBuffer;
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.*;
+
+@Service
+public class JobsBrokerServiceInDatabaseImpl implements JobsBrokerService {
+
+    static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JobsBrokerServiceInDatabaseImpl.class);
+
+    private final DataAccessService dataAccessService;
+
+    private final SessionFactory sessionFactory;
+    private int maxOpenedInstantiationRequestsToMso;
+    private int pollingIntervalSeconds;
+
+    @Autowired
+    public JobsBrokerServiceInDatabaseImpl(DataAccessService dataAccessService, SessionFactory sessionFactory,
+                                           @Value("0") int maxOpenedInstantiationRequestsToMso,
+                                           @Value("10") int pollingIntervalSeconds) {
+        // tha @Value will inject conservative defaults; overridden in @PostConstruct from configuration
+        this.dataAccessService = dataAccessService;
+        this.sessionFactory = sessionFactory;
+        this.maxOpenedInstantiationRequestsToMso = maxOpenedInstantiationRequestsToMso;
+        this.pollingIntervalSeconds = pollingIntervalSeconds;
+    }
+
+    @PostConstruct
+    public void configure() {
+        maxOpenedInstantiationRequestsToMso = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_MAX_OPENED_INSTANTIATION_REQUESTS));
+        pollingIntervalSeconds = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_ASYNC_POLLING_INTERVAL_SECONDS));
+    }
+
+    public void deleteAll() {
+        dataAccessService.deleteDomainObjects(JobDaoImpl.class, "1=1", null);
+    }
+
+    @Override
+    public UUID add(Job job) {
+        final JobDaoImpl jobDao = castToJobDaoImpl(job);
+        jobDao.setUuid(UUID.randomUUID());
+        dataAccessService.saveDomainObject(jobDao, DaoUtils.getPropsMap());
+        return job.getUuid();
+    }
+
+    @Override
+    public Optional<Job> pull(Job.JobStatus topic, String ownerId) {
+        JobDaoImpl daoJob;
+        int updatedEntities;
+        do {
+            String query = sqlQueryForTopic(topic);
+            List<JobDaoImpl> jobs = dataAccessService.executeSQLQuery(query, JobDaoImpl.class, null);
+            if (jobs.isEmpty()) {
+                return Optional.empty();
+            }
+
+            daoJob = jobs.get(0);
+
+            final UUID uuid = daoJob.getUuid();
+            final Integer age = daoJob.getAge();
+
+            daoJob.setTakenBy(ownerId);
+
+            // It might become that daoJob was taken and pushed-back already, before we
+            // arrived here, so we're verifying the age was not pushed forward.
+            // Age is actually forwarded upon pushBack().
+            String hqlUpdate = "update JobDaoImpl job set job.takenBy = :takenBy where " +
+                    " job.id = :id" +
+                    " and job.age = :age" +
+                    " and takenBy is null";
+            updatedEntities = DaoUtils.tryWithSessionAndTransaction(sessionFactory, session ->
+                    session.createQuery(hqlUpdate)
+                            .setText("id", uuid.toString())
+                            .setInteger("age", age)
+                            .setText("takenBy", ownerId)
+                            .executeUpdate());
+
+        } while (updatedEntities == 0);
+
+        return Optional.ofNullable(daoJob);
+    }
+
+    private java.sql.Timestamp nowMinusInterval() {
+        return Timestamp.valueOf(LocalDateTime.now().minusSeconds(pollingIntervalSeconds));
+    }
+
+    private String sqlQueryForTopic(Job.JobStatus topic) {
+        switch (topic) {
+            case IN_PROGRESS:
+                return "" +
+                        "select * from VID_JOB" +
+                        " where" +
+                        // select only non-deleted in-progress jobs
+                        "    JOB_STATUS = 'IN_PROGRESS'" +
+                        "    and TAKEN_BY is null" +
+                        "    and DELETED_AT is null" +
+                        // give some breath, don't select jos that were recently reached
+                        "    and MODIFIED_DATE <= '" + nowMinusInterval() +
+                        // take the oldest handled one
+                        "' order by MODIFIED_DATE ASC" +
+                        // select only one result
+                        " limit 1";
+
+            case PENDING:
+                return "" +
+                        // select only pending jobs
+                        "select vid_job.* from VID_JOB " +
+                        // select users have in_progress jobs
+                        "left join \n" +
+                        " (select user_Id, 1 as has_any_in_progress_job from VID_JOB  where JOB_STATUS = 'IN_PROGRESS' or TAKEN_BY IS NOT NULL \n" +
+                        "group by user_id)  users_have_any_in_progress_job_tbl\n" +
+                        "on vid_job.user_id = users_have_any_in_progress_job_tbl.user_id " +
+                        "where JOB_STATUS = 'PENDING' and TAKEN_BY is null" +
+                        // job is not deleted
+                        "      AND DELETED_AT is null and (\n" +
+                        // limit in-progress to some amount
+                        "select sum(CASE WHEN JOB_STATUS='IN_PROGRESS' or (JOB_STATUS='PENDING' and TAKEN_BY IS NOT NULL) THEN 1 ELSE 0 END) as in_progress\n" +
+                        "from VID_JOB ) <" + maxOpenedInstantiationRequestsToMso + " \n " +
+                        // don't take jobs from templates that already in-progress/failed
+                        "and TEMPLATE_Id not in \n" +
+                        "(select TEMPLATE_Id from vid_job where" +
+                        "   (JOB_STATUS='FAILED' and DELETED_AT is null)" + // failed but not deleted
+                        "   or JOB_STATUS='IN_PROGRESS'" +
+                        "   or TAKEN_BY IS NOT NULL)" + " \n " +
+                        // prefer older jobs, but the earlier in each bulk
+                        "order by has_any_in_progress_job, CREATED_DATE, INDEX_IN_BULK " +
+                        // select only one result
+                        "limit 1";
+            default:
+                throw new GenericUncheckedException("Unsupported topic to pull from: " + topic);
+        }
+    }
+
+
+    private byte[] getUuidAsByteArray(UUID owner) {
+        ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
+        bb.putLong(owner.getMostSignificantBits());
+        bb.putLong(owner.getLeastSignificantBits());
+        return bb.array();
+    }
+
+    @Override
+    public void pushBack(Job job) {
+        final JobDaoImpl remoteDaoJob = (JobDaoImpl) dataAccessService.getDomainObject(JobDaoImpl.class, job.getUuid(), null);
+
+        if (remoteDaoJob == null) {
+            throw new IllegalStateException("Can push back only pulled jobs. Add new jobs using add()");
+        }
+
+        if (remoteDaoJob.getTakenBy() == null) {
+            throw new IllegalStateException("Can push back only pulled jobs. This one already pushed back.");
+        }
+
+        final JobDaoImpl jobDao = castToJobDaoImpl(job);
+
+        jobDao.setTakenBy(null);
+
+        Integer age = jobDao.getAge();
+        jobDao.setAge(age + 1);
+
+        logger.debug(EELFLoggerDelegate.debugLogger, "{}/{}", jobDao.getStatus(), jobDao.getType());
+
+        dataAccessService.saveDomainObject(jobDao, DaoUtils.getPropsMap());
+    }
+
+    private JobDaoImpl castToJobDaoImpl(Job job) {
+        if (!(job instanceof JobDaoImpl)) {
+            throw new UnsupportedOperationException("Can't add " + job.getClass() + " to " + this.getClass());
+        }
+        return (JobDaoImpl) job;
+    }
+
+    @Override
+    public Collection<Job> peek() {
+        return dataAccessService.getList(JobDaoImpl.class, null);
+    }
+
+    @Override
+    public Job peek(UUID jobId) {
+        return (JobDaoImpl) dataAccessService.getDomainObject(JobDaoImpl.class, jobId, null);
+    }
+
+    @Override
+    public void delete(UUID jobId) {
+        int updatedEntities;
+        Date now = new Date();
+
+        String hqlUpdate = "update JobDaoImpl job set job.deletedAt = :now where " +
+                " job.id = :id" +
+                " and job.status in(:pending, :stopped)" +
+                " and takenBy is null";
+
+        updatedEntities = DaoUtils.tryWithSessionAndTransaction(sessionFactory, session ->
+                session.createQuery(hqlUpdate)
+                        .setTimestamp("now", now)
+                        .setText("id", jobId.toString())
+                        .setText("pending", Job.JobStatus.PENDING.toString())
+                        .setText("stopped", Job.JobStatus.STOPPED.toString())
+                        .executeUpdate());
+
+        if (updatedEntities == 0) {
+            final JobDaoImpl remoteDaoJob = (JobDaoImpl) dataAccessService.getDomainObject(JobDaoImpl.class, jobId, null);
+
+            if (remoteDaoJob == null || remoteDaoJob.getUuid() == null) {
+                logger.debug(EELFLoggerDelegate.debugLogger,"jobId {}: Service does not exist", jobId);
+                throw new OperationNotAllowedException("Service does not exist");
+            }
+
+            if (!remoteDaoJob.getStatus().equals(Job.JobStatus.PENDING) && !remoteDaoJob.getStatus().equals(Job.JobStatus.STOPPED) || !StringUtils.isEmpty(remoteDaoJob.getTakenBy()) ) {
+                logger.debug(EELFLoggerDelegate.debugLogger,"jobId {}: Service status does not allow deletion from the queue, status = {}", jobId, remoteDaoJob.getStatus() +
+                ", takenBy " + remoteDaoJob.getTakenBy());
+                throw new OperationNotAllowedException("Service status does not allow deletion from the queue");
+            }
+
+            throw new OperationNotAllowedException("Service deletion failed");
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/logging/VidLoggerAspect.java b/onap-enabler-be/src/main/java/org/onap/osam/logging/VidLoggerAspect.java
new file mode 100644
index 0000000..2847354
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/logging/VidLoggerAspect.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.logging;
+
+import org.apache.commons.lang3.StringUtils;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.onap.portalsdk.core.logging.aspect.EELFLoggerAdvice;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN;
+
+
+@Aspect
+@org.springframework.context.annotation.Configuration
+public class VidLoggerAspect {
+
+    private String canonicalHostName;
+    @Autowired
+    EELFLoggerAdvice advice;
+
+    public VidLoggerAspect() {
+        try {
+            final InetAddress localHost = InetAddress.getLocalHost();
+            canonicalHostName = localHost.getCanonicalHostName();
+        } catch (UnknownHostException e) {
+            // YOLO
+            canonicalHostName = null;
+        }
+    }
+
+    @Pointcut("execution(public * org.onap.osam.controller.*Controller.*(..))")
+    public void vidControllers() {}
+
+    @Around("vidControllers() && (" +
+            "  @within(org.onap.portalsdk.core.logging.aspect.AuditLog)" +
+            "  || @annotation(org.onap.portalsdk.core.logging.aspect.AuditLog)" +
+            "  || @annotation(org.springframework.web.bind.annotation.RequestMapping)" +
+            ")")
+    public Object logAuditMethodClassAround(ProceedingJoinPoint joinPoint) throws Throwable {
+        return logAroundMethod(joinPoint, SystemProperties.SecurityEventTypeEnum.INCOMING_REST_MESSAGE);
+    }
+
+    private Object logAroundMethod(ProceedingJoinPoint joinPoint, SystemProperties.SecurityEventTypeEnum securityEventType) throws Throwable {
+        //Before
+        Object[] passOnArgs = new Object[] {joinPoint.getSignature().getDeclaringType().getName(),joinPoint.getSignature().getName()};
+        Object[] returnArgs = advice.before(securityEventType, joinPoint.getArgs(), passOnArgs);
+
+        fixServerFqdnInMDC();
+
+        //Execute the actual method
+        Object result;
+        String restStatus = "COMPLETE";
+        try {
+            result = joinPoint.proceed();
+        } catch(Exception e) {
+            restStatus = "ERROR";
+            throw e;
+        } finally {
+            fixStatusCodeInMDC(restStatus);
+            advice.after(securityEventType, restStatus, joinPoint.getArgs(), returnArgs, passOnArgs);
+        }
+
+        return result;
+    }
+
+    // Set the status code into MDC *before* the metrics log is written by advice.after()
+    private void fixStatusCodeInMDC(String restStatus) {
+        EELFLoggerDelegate.mdcPut(SystemProperties.STATUS_CODE, restStatus);
+    }
+
+    // Override the non-canonical hostname set by EELFLoggerDelegate::setGlobalLoggingContext()
+    // that was invoked by advice.before() (and some other SDK cases)
+    private void fixServerFqdnInMDC() {
+        if (!StringUtils.isBlank(canonicalHostName)) {
+            EELFLoggerDelegate.mdcPut(MDC_SERVER_FQDN, canonicalHostName);
+        }
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/CategoryParameter.java b/onap-enabler-be/src/main/java/org/onap/osam/model/CategoryParameter.java
new file mode 100644
index 0000000..d05a75c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/CategoryParameter.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+//import org.hibernate.annotations.Table;
+
+import javax.persistence.*;
+import java.util.HashSet;
+import java.util.Set;
+
+//import javax.persistence.*;
+
+@Entity
+@Table(name = "vid_category_parameter", uniqueConstraints = @UniqueConstraint(columnNames = "name"))
+public class CategoryParameter extends VidBaseEntity {
+
+    public enum Family {
+        PARAMETER_STANDARDIZATION,
+        TENANT_ISOLATION
+    }
+
+    private String name;
+    private boolean idSupported;
+
+    @Column(name = "FAMILY")
+    @Enumerated(EnumType.STRING)
+    private String family;
+
+    public String getFamily() {
+        return family;
+    }
+
+    public void setFamily(String family) {
+        this.family = family;
+    }
+
+    private Set<CategoryParameterOption> options = new HashSet<>(0);
+
+    @Override
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "CATEGORY_ID")
+    public Long getId() {
+        return super.getId();
+    }
+
+    @Column(name = "NAME", unique = true, nullable = false, length=50)
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @OneToMany(fetch = FetchType.EAGER, mappedBy = "categoryParameter")
+    public Set<CategoryParameterOption> getOptions() {
+        return options;
+    }
+
+    public void setOptions(Set<CategoryParameterOption> options) {
+        this.options = options;
+    }
+
+    public boolean addOption(CategoryParameterOption option) {
+        return options.add(option);
+    }
+
+    @Column(name = "ID_SUPPORTED")
+    public boolean isIdSupported() {
+        return idSupported;
+    }
+
+    public void setIdSupported(boolean idSupported) {
+        this.idSupported = idSupported;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/CategoryParameterOption.java b/onap-enabler-be/src/main/java/org/onap/osam/model/CategoryParameterOption.java
new file mode 100644
index 0000000..3a665b1
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/CategoryParameterOption.java
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.onap.portalsdk.core.domain.support.DomainVo;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+@Entity
+@Table(name = "vid_category_parameter_option")
+public class CategoryParameterOption extends DomainVo {
+
+    private String appId;
+    private String name;
+
+    private CategoryParameter categoryParameter;
+
+    public CategoryParameterOption() {
+    }
+
+    public CategoryParameterOption(String appId, String name, CategoryParameter categoryParameter) {
+        setAppId(appId);
+        setName(name);
+        setCategoryParameter(categoryParameter);
+    }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "CATEGORY_OPT_DB_ID")
+    public Long getId() {
+        return id;
+    }
+
+    @Column(name = "CATEGORY_OPT_APP_ID")
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    @Column(name = "NAME")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @ManyToOne
+    @JoinColumn(name="CATEGORY_ID", nullable=false)
+    public CategoryParameter getCategoryParameter() {
+        return categoryParameter;
+    }
+
+    public void setCategoryParameter(CategoryParameter categoryParameter) {
+        this.categoryParameter = categoryParameter;
+    }
+
+    @Override
+    @Column(name = "CREATED_DATE")
+    public Date getCreated() {
+        return super.getCreated();
+    }
+
+    @Override
+    @Column(name = "MODIFIED_DATE")
+    public Date getModified() {
+        return super.getModified();
+    }
+
+    @Override
+    @Transient
+    public Long getCreatedId() {
+        return super.getCreatedId();
+    }
+
+    @Override
+    @Transient
+    public Long getModifiedId() {
+        return super.getModifiedId();
+    }
+
+    @Override
+    @Transient
+    public Serializable getAuditUserId() {
+        return super.getAuditUserId();
+    }
+
+    @Override
+    @Transient
+    public Long getRowNum() {
+        return super.getRowNum();
+    }
+
+    @Override
+    @Transient
+    public Set getAuditTrail() {
+        return super.getAuditTrail();
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        CategoryParameterOption that = (CategoryParameterOption) o;
+
+        if (getAppId() != null ? !getAppId().equals(that.getAppId()) : that.getAppId() != null) return false;
+        if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
+        return getCategoryParameter() != null ? getCategoryParameter().equals(that.getCategoryParameter()) : that.getCategoryParameter() == null;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = getAppId() != null ? getAppId().hashCode() : 0;
+        result = 31 * result + (getName() != null ? getName().hashCode() : 0);
+        result = 31 * result + (getCategoryParameter() != null ? getCategoryParameter().hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "CategoryParameterOption{" +
+                "id=" + id +
+                ", key='" + appId + '\'' +
+                ", value='" + name + '\'' +
+                ", categoryParameterId=" + categoryParameter.getId() +
+                '}';
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/CommandProperty.java b/onap-enabler-be/src/main/java/org/onap/osam/model/CommandProperty.java
new file mode 100644
index 0000000..85c3f85
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/CommandProperty.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class CommandProperty {
+	
+	private String displayName;
+	
+	/** The command, "get_input" */
+	private String command;
+	
+	/** The input name we refer to back under the inputs section */
+	private String inputName;
+
+	/**
+	 * Gets the display name.
+	 *
+	 * @return the displayName
+	 */
+	public String getDisplayName() {
+		return displayName;
+	}
+	/**
+	 * Gets the command.
+	 *
+	 * @return the command
+	 */
+	public String getCommand() {
+		return command;
+	}
+	/**
+	 * Gets the inputName.
+	 *
+	 * @return the inputName
+	 */
+	public String getInputName() {
+		return inputName;
+	}
+	/**
+	 * Sets the display name value.
+	 *
+	 * @param i the new get_input value
+	 */
+	public void setDisplayName(String i) {
+		this.displayName = i;
+	}
+	/**
+	 * Sets the command value.
+	 *
+	 * @param i the new command value
+	 */
+	public void setCommand(String i) {
+		this.command = i;
+	}
+	
+	/**
+	 * Sets the input name value.
+	 *
+	 * @param i the new input name value
+	 */
+	public void setInputName(String i) {
+		this.inputName=i;
+	}
+	
+	public String toString () {
+		String result = "displayName=" + displayName + " command=" + command + " inputName" + inputName;
+		return result;
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ExceptionResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ExceptionResponse.java
new file mode 100644
index 0000000..7d7db23
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ExceptionResponse.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.slf4j.MDC;
+
+import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
+
+public class ExceptionResponse {
+
+	public ExceptionResponse() {
+	}
+
+	private String exception;
+	
+	/** The message. */
+	private String message;
+
+	public ExceptionResponse(String exception, String message) {
+		this.exception = exception;
+		this.message = message;
+	}
+
+	public ExceptionResponse(Exception exception) {
+		setException(exception);
+	}
+
+	/**
+	 * Gets the exception.
+	 *
+	 * @return the exception
+	 */
+	public String getException() {
+		return exception;
+	}
+
+	/**
+	 * Sets the exception.
+	 *
+	 * @param exception the new exception
+	 */
+	public void setException(String exception) {
+		this.exception = exception;
+	}
+
+	public void setException(Exception exception) {
+		setException(exception.getClass().toString().replaceFirst("^.*[\\.$]", ""));
+		setMessage(exception.getMessage() + " (Request id: " + MDC.get(MDC_KEY_REQUEST_ID) + ")");
+	}
+
+	/**
+	 * Gets the message.
+	 *
+	 * @return the message
+	 */
+	public String getMessage() {
+		return message;
+	}
+
+	/**
+	 * Sets the message.
+	 *
+	 * @param message the new message
+	 */
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ExceptionTranslator.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ExceptionTranslator.java
new file mode 100644
index 0000000..7ba9959
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ExceptionTranslator.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.exception.ExceptionUtils;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
+
+import static org.onap.osam.utils.Logging.getMethodCallerName;
+
+@ControllerAdvice
+public class ExceptionTranslator {
+
+    EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExceptionTranslator.class);
+
+    @ExceptionHandler(MethodArgumentTypeMismatchException.class)
+    @ResponseBody
+    public ExceptionResponse handleMethodArgumentTypeMismatchException(MethodArgumentTypeMismatchException e) {
+        logger.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodCallerName(), ExceptionUtils.getMessage(e), e);
+        Class<?> type = e.getRequiredType();
+        String message;
+        if (type.isEnum()) {
+            message = "The parameter " + e.getName() + " must have a value among : " + StringUtils.join(type.getEnumConstants(), ", ");
+        }
+        else {
+            message = "The parameter " + e.getName() + " must be of type " + type.getTypeName();
+        }
+        return new  ExceptionResponse(new ArgumentTypeMismatchException(message));
+    }
+
+    public static class ArgumentTypeMismatchException extends RuntimeException {
+        public ArgumentTypeMismatchException(String message) {
+            super(message);
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/GitRepositoryState.java b/onap-enabler-be/src/main/java/org/onap/osam/model/GitRepositoryState.java
new file mode 100644
index 0000000..bc07da7
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/GitRepositoryState.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.Properties;
+
+public class GitRepositoryState {
+
+    private final String commitId;
+    private final String commitMessageShort;
+    private final String commitTime;
+
+    public GitRepositoryState(Properties properties) {
+        this.commitId = String.valueOf(properties.get("git.commit.id"));
+        this.commitMessageShort = String.valueOf(properties.get("git.commit.message.short"));
+        this.commitTime = String.valueOf(properties.get("git.commit.time"));
+    }
+
+    public String getCommitId() {
+        return commitId;
+    }
+
+    public String getCommitMessageShort() {
+        return commitMessageShort;
+    }
+
+    public String getCommitTime() {
+        return commitTime;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/GroupProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/model/GroupProperties.java
new file mode 100644
index 0000000..55aa7f4
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/GroupProperties.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class GroupProperties {
+    private Integer minCountInstances;
+    private Integer maxCountInstances;
+    private Integer initialCount;
+    private String vfModuleLabel;
+
+    public String getVfModuleLabel() {
+        return vfModuleLabel;
+    }
+
+    public void setVfModuleLabel(String vfModuleLabel) {
+        this.vfModuleLabel = vfModuleLabel;
+    }
+
+    public Integer getMinCountInstances() {
+        return minCountInstances;
+    }
+
+    public void setMinCountInstances(Integer minCountInstances) {
+        this.minCountInstances = minCountInstances;
+    }
+
+    public Integer getMaxCountInstances() {
+        return maxCountInstances;
+    }
+
+    public void setMaxCountInstances(Integer maxCountInstances) {
+        this.maxCountInstances = maxCountInstances;
+    }
+
+    public Integer getInitialCount() {
+        return initialCount;
+    }
+
+    public void setInitialCount(Integer initialCount) {
+        this.initialCount = initialCount;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/JobAuditStatus.java b/onap-enabler-be/src/main/java/org/onap/osam/model/JobAuditStatus.java
new file mode 100644
index 0000000..153851d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/JobAuditStatus.java
@@ -0,0 +1,181 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.hibernate.annotations.Type;
+import org.onap.osam.job.Job.JobStatus;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+import javax.persistence.*;
+import java.util.Date;
+import java.util.UUID;
+
+@Entity
+@Table(name = "vid_job_audit_status")
+public class JobAuditStatus extends VidBaseEntity {
+
+    static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JobAuditStatus.class);
+
+    public JobAuditStatus(){}
+
+    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source){
+        this.jobId = jobId;
+        this.jobStatus = jobStatus;
+        this.source = source;
+    }
+
+    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source, Date date){
+        this(jobId, jobStatus, source);
+        this.created = date;
+    }
+
+    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source, UUID requestId, String additionalInfo) {
+        this(jobId, jobStatus, source);
+        this.requestId = requestId;
+        this.additionalInfo = additionalInfo;
+    }
+
+    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source, UUID requestId, String additionalInfo, Date date){
+        this(jobId, jobStatus, source, requestId, additionalInfo);
+        this.created = date;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+
+        if (o == null || getClass() != o.getClass()) return false;
+
+        JobAuditStatus that = (JobAuditStatus) o;
+
+        return new EqualsBuilder()
+                .append(jobId, that.jobId)
+                .append(jobStatus, that.jobStatus)
+                .append(source, that.source)
+                .append(requestId, that.requestId)
+                .append(additionalInfo, that.additionalInfo)
+                .isEquals();
+    }
+
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder(17, 37)
+                .append(jobId)
+                .append(jobStatus)
+                .append(source)
+                .append(requestId)
+                .append(additionalInfo)
+                .toHashCode();
+    }
+
+    public enum SourceStatus {
+        MSO,
+        VID
+    }
+
+    private UUID jobId;
+    private String jobStatus;
+    private SourceStatus source;
+    private UUID requestId;
+    private String additionalInfo;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Override
+    @Column(name = "ID", columnDefinition = "INT(11)")
+    public Long getId() {
+        return this.id;
+    }
+
+    @Column(name = "JOB_ID", columnDefinition = "CHAR(36)")
+    @Type(type="org.hibernate.type.UUIDCharType")
+    public UUID getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(UUID jobId) {
+        this.jobId = jobId;
+    }
+
+
+    @Column(name = "JOB_STATUS")
+    public String getJobStatus() {
+        return jobStatus;
+    }
+
+    public void setJobStatus(String jobStatus) {
+        this.jobStatus = jobStatus;
+    }
+
+
+    @Enumerated(EnumType.STRING)
+    @Column(name = "SOURCE")
+    public SourceStatus getSource() {
+        return source;
+    }
+
+    public void setSource(SourceStatus source) {
+        this.source = source;
+    }
+
+    @Column(name = "REQUEST_ID", columnDefinition = "CHAR(36)")
+    @Type(type="org.hibernate.type.UUIDCharType")
+    public UUID getRequestId() {
+        return requestId;
+    }
+
+    public void setRequestId(UUID requestId) {
+        this.requestId = requestId;
+    }
+
+    @Column(name = "ADDITIONAL_INFO")
+    public String getAdditionalInfo() {
+        return additionalInfo;
+    }
+
+    public void setAdditionalInfo(String additionalInfo) {
+        this.additionalInfo = additionalInfo;
+    }
+
+    @Transient
+    public Boolean isFinal(){
+        try {
+            if (getSource() == SourceStatus.VID) {
+                return JobStatus.valueOf(getJobStatus()).isFinal();
+            }
+        }
+        catch (IllegalArgumentException e){
+            logger.error("JobStatus: " + getJobStatus() + " from vid isn't a value of JobStatus enum" + e.getMessage());
+            return false;
+        }
+        return false;
+    }
+
+    @Transient
+    public Date getCreatedDate() {
+        return getCreated();
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/JobBulk.java b/onap-enabler-be/src/main/java/org/onap/osam/model/JobBulk.java
new file mode 100644
index 0000000..0c2637b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/JobBulk.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.List;
+
+public class JobBulk {
+
+    private List<JobModel> jobs;
+
+    public JobBulk(List<JobModel> jobs) {
+        this.jobs = jobs;
+    }
+
+    public List<JobModel> getJobs() {
+        return jobs;
+    }
+
+    public void setJobs(List<JobModel> jobs) {
+        this.jobs = jobs;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/JobModel.java b/onap-enabler-be/src/main/java/org/onap/osam/model/JobModel.java
new file mode 100644
index 0000000..2520b01
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/JobModel.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobType;
+
+import java.util.UUID;
+
+public class JobModel {
+
+    private UUID uuid;
+    private Job.JobStatus status;
+    private UUID templateId;
+    private JobType type;
+
+    public UUID getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(UUID uuid) {
+        this.uuid = uuid;
+    }
+
+    public Job.JobStatus getStatus() {
+        return status;
+    }
+
+    public void setStatus(Job.JobStatus status) {
+        this.status = status;
+    }
+
+    public UUID getTemplateId() {
+        return templateId;
+    }
+
+    public void setTemplateId(UUID templateId) {
+        this.templateId = templateId;
+    }
+
+    public JobType getType() {
+        return type;
+    }
+
+    public void setType(JobType type) {
+        this.type = type;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ListOfErrorsResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ListOfErrorsResponse.java
new file mode 100644
index 0000000..5732389
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ListOfErrorsResponse.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ListOfErrorsResponse {
+    protected List<String> errors;
+
+    public ListOfErrorsResponse() {
+        this.errors = new ArrayList<>();
+    }
+
+    public ListOfErrorsResponse(List<String> errors) {
+        this.errors = errors;
+    }
+
+    public List<String> getErrors() {
+        return errors;
+    }
+
+    public void setErrors(List<String> errors) {
+        this.errors = errors;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ModelConstants.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ModelConstants.java
new file mode 100644
index 0000000..799e10d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ModelConstants.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+public class ModelConstants {
+	
+	public final static String GET_INPUT_TAG = "get_input";
+	
+	public static final String ASDC_MODEL_NAMESPACE = "asdc.model.namespace";
+	public static final String ASDC_SVC_API_PATH = "sdc.svc.api.path";
+	public static final String ASDC_RESOURCE_API_PATH = "sdc.resource.api.path";
+	
+	public static final String DEFAULT_ASDC_MODEL_NAMESPACE = "org.onap.";
+	public static final String DEFAULT_ASDC_SVC_API_PATH = "sdc/v1/catalog/services";
+	public static final String DEFAULT_ASDC_RESOURCE_API_PATH = "sdc/v1/catalog/resources";
+	
+	public final static String VF_MODULE = "groups.VfModule";
+	public final static String VNF = "resource.vf";
+	public final static String NETWORK = "resource.vl";
+
+	public final static String ROLE_DELIMITER = "___";
+	
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ModelUtil.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ModelUtil.java
new file mode 100644
index 0000000..821d318
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ModelUtil.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class ModelUtil {
+	/**
+	 * Gets the tags for the given element according to the configured namespace
+	 * @param namespaces the namespace list from the configuration
+	 * @param constantValue the constant portion of the tag name, i.e. resource.vf...
+	 * @return the tags
+	 */
+	public static String[] getTags ( String[] namespaces, String constantValue ) {
+		String[] tags;
+		if ( namespaces == null || namespaces.length == 0 ) {
+			return null;
+		}
+		int le = namespaces.length;
+		tags = new String[le];
+		for ( int i = 0; i < le; i++ ) {
+			tags[i] = namespaces[i] + constantValue;
+		}
+		return (tags);
+	}
+	/**
+	 * Determine if a note template type matches a set of configurable tags
+	 * @param type the node template type
+	 * @param tags the model configurable namespaces
+	 * @return true if type starts with a tag in the array, false otherwise
+	 */
+	public static boolean isType ( String type, String[] tags ) {
+		if ( (tags != null) && (tags.length > 0) ) {
+			for ( int i = 0; i < tags.length; i++ ) {
+				if ( type.startsWith (tags[i]) ) {
+					return (true);
+				}
+			}
+		}
+		return (false);
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/MsoExceptionResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/model/MsoExceptionResponse.java
new file mode 100644
index 0000000..099f027
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/MsoExceptionResponse.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class MsoExceptionResponse {
+
+    public static class ServiceException {
+
+        public ServiceException(String messageId, String text) {
+            this.messageId = messageId;
+            this.text = text;
+        }
+
+        public ServiceException() {
+        }
+
+        public String messageId;
+        public String text;
+    }
+
+    public ServiceException serviceException;
+
+    public MsoExceptionResponse() {
+    }
+
+    public MsoExceptionResponse(String messageId, String text) {
+        this.serviceException = new ServiceException(messageId, text);
+    }
+
+    public MsoExceptionResponse(Exception exception) {
+        ExceptionResponse exceptionResponse = new ExceptionResponse(exception);
+        this.serviceException = new ServiceException(exceptionResponse.getException(), exceptionResponse.getMessage());
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/NameCounter.java b/onap-enabler-be/src/main/java/org/onap/osam/model/NameCounter.java
new file mode 100644
index 0000000..5df0da4
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/NameCounter.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "vid_name_counter")
+public class NameCounter {
+
+    private String name;
+    private Integer counter;
+
+    public NameCounter() {
+    }
+
+    public NameCounter(String name) {
+        this.name = name;
+        this.counter = 1;
+    }
+
+    @Id
+    @Column(name = "name", columnDefinition = "VARCHAR(100)")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Column(name = "counter", columnDefinition = "INT")
+    public Integer getCounter() {
+        return counter;
+    }
+
+    public void setCounter(Integer counter) {
+        this.counter = counter;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/NetworkCollection.java b/onap-enabler-be/src/main/java/org/onap/osam/model/NetworkCollection.java
new file mode 100644
index 0000000..8804f25
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/NetworkCollection.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class NetworkCollection {
+
+    private String uuid;
+
+    private String invariantUuid;
+
+    private String name;
+
+    private String version;
+
+    private NetworkCollectionProperties networkCollectionProperties;
+
+    public NetworkCollection(){
+        this.networkCollectionProperties = new NetworkCollectionProperties();
+    }
+
+    public String getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    public String getInvariantUuid() {
+        return invariantUuid;
+    }
+
+    public void setInvariantUuid(String invariantUuid) {
+        this.invariantUuid = invariantUuid;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public NetworkCollectionProperties getNetworkCollectionProperties() {
+        return networkCollectionProperties;
+    }
+
+    public void setNetworkCollectionProperties(NetworkCollectionProperties networkCollectionProperties) {
+        this.networkCollectionProperties = networkCollectionProperties;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/NetworkCollectionProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/model/NetworkCollectionProperties.java
new file mode 100644
index 0000000..78fc945
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/NetworkCollectionProperties.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class NetworkCollectionProperties {
+    private String networkCollectionFunction;
+    private String networkCollectionDescription;
+
+    public String getNetworkCollectionFunction() {
+        return networkCollectionFunction;
+    }
+
+    public void setNetworkCollectionFunction(String networkCollectionFunction) {
+        this.networkCollectionFunction = networkCollectionFunction;
+    }
+
+    public String getNetworkCollectionDescription() {
+        return networkCollectionDescription;
+    }
+
+    public void setNetworkCollectionDescription(String networkCollectionDescription) {
+        this.networkCollectionDescription = networkCollectionDescription;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/PombaInstance/PombaRequest.java b/onap-enabler-be/src/main/java/org/onap/osam/model/PombaInstance/PombaRequest.java
new file mode 100644
index 0000000..6a7b887
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/PombaInstance/PombaRequest.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.PombaInstance;
+
+import java.util.List;
+
+public class PombaRequest {
+    public List<ServiceInstance> serviceInstanceList;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/PombaInstance/ServiceInstance.java b/onap-enabler-be/src/main/java/org/onap/osam/model/PombaInstance/ServiceInstance.java
new file mode 100644
index 0000000..c97a5cd
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/PombaInstance/ServiceInstance.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.PombaInstance;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ServiceInstance {
+
+    @JsonProperty
+    public String serviceInstanceId;
+
+    @JsonProperty
+    public String modelVersionId;
+
+    @JsonProperty
+    public String modelInvariantId;
+
+    @JsonProperty
+    public String customerId;
+
+    @JsonProperty
+    public String serviceType;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ProxyResponse.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ProxyResponse.java
new file mode 100644
index 0000000..e6b83e1
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ProxyResponse.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import com.google.common.base.MoreObjects;
+
+public class ProxyResponse {
+
+    protected String errorMessage;
+
+    protected int httpCode;
+
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+
+    public int getHttpCode() {
+        return httpCode;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("httpCode", httpCode)
+                .add("errorMessage", errorMessage)
+                .toString();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/RequestReferencesContainer.java b/onap-enabler-be/src/main/java/org/onap/osam/model/RequestReferencesContainer.java
new file mode 100644
index 0000000..a4bc8f2
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/RequestReferencesContainer.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import com.fasterxml.jackson.annotation.*;
+import com.google.common.base.MoreObjects;
+import org.onap.osam.domain.mso.RequestReferences;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class RequestReferencesContainer {
+    private final RequestReferences requestReferences;
+
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    public RequestReferencesContainer(@JsonProperty("requestReferences") RequestReferences requestReferences) {
+        this.requestReferences = requestReferences;
+    }
+
+    public RequestReferences getRequestReferences() {
+        return requestReferences;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("requestReferences", requestReferences)
+                .add("additionalProperties", additionalProperties)
+                .toString();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/Resource.java b/onap-enabler-be/src/main/java/org/onap/osam/model/Resource.java
new file mode 100644
index 0000000..44e1855
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/Resource.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class Resource {
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/Result.java b/onap-enabler-be/src/main/java/org/onap/osam/model/Result.java
new file mode 100644
index 0000000..ae8e480
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/Result.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class Result {
+	
+	private String result;
+	
+	/**
+	 * Instantiates a new result.
+	 *
+	 * @param result the result
+	 */
+	public Result(String result) {
+		this.result = result;
+	}
+
+	/**
+	 * Gets the result.
+	 *
+	 * @return the result
+	 */
+	public String getResult() {
+		return result;
+	}
+
+	/**
+	 * Sets the result.
+	 *
+	 * @param result the new result
+	 */
+	public void setResult(String result) {
+		this.result = result;
+	}
+	
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ServiceInfo.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ServiceInfo.java
new file mode 100644
index 0000000..a39d75c
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ServiceInfo.java
@@ -0,0 +1,417 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+
+ import org.hibernate.annotations.Type;
+ import org.onap.osam.job.Job;
+ import org.onap.portalsdk.core.domain.support.DomainVo;
+
+ import javax.persistence.*;
+ import java.io.Serializable;
+ import java.util.Date;
+ import java.util.Objects;
+ import java.util.Set;
+ import java.util.UUID;
+
+@Entity
+@Table(name = "vid_service_info")
+public class ServiceInfo extends DomainVo {
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    private UUID jobId;
+    private UUID templateId;
+    private String userId;
+    private Job.JobStatus jobStatus;
+    private Date statusModifiedDate;
+    private boolean hidden;
+    private boolean pause;
+    private Date deletedAt;
+    private String owningEntityId;
+    private String owningEntityName;
+    private String project;
+    private String aicZoneId;
+    private String aicZoneName;
+    private String tenantId;
+    private String tenantName;
+    private String regionId;
+    private String regionName;
+    private String serviceType;
+    private String subscriberName;
+    private String serviceInstanceId;
+    private String serviceInstanceName;
+    private String serviceModelId;
+    private String serviceModelName;
+    private String serviceModelVersion;
+    private Date createdBulkDate;
+
+    public ServiceInfo(){
+
+    }
+
+    public ServiceInfo(String userId, Job.JobStatus jobStatus, boolean pause, UUID jobId, UUID templateId, String owningEntityId, String owningEntityName, String project, String aicZoneId, String aicZoneName, String tenantId, String tenantName, String regionId, String regionName, String serviceType, String subscriberName, String serviceInstanceId, String serviceInstanceName, String serviceModelId, String serviceModelName, String serviceModelVersion, Date createdBulkDate) {
+        this.userId = userId;
+        this.jobStatus = jobStatus;
+        this.jobId = jobId;
+        this.templateId = templateId;
+        this.pause = pause;
+        this.owningEntityId = owningEntityId;
+        this.owningEntityName = owningEntityName;
+        this.project = project;
+        this.aicZoneId = aicZoneId;
+        this.aicZoneName = aicZoneName;
+        this.tenantId = tenantId;
+        this.tenantName = tenantName;
+        this.regionId = regionId;
+        this.regionName = regionName;
+        this.serviceType = serviceType;
+        this.subscriberName = subscriberName;
+        this.serviceInstanceId = serviceInstanceId;
+        this.serviceInstanceName = serviceInstanceName;
+        this.serviceModelId = serviceModelId;
+        this.serviceModelName = serviceModelName;
+        this.serviceModelVersion = serviceModelVersion;
+        this.createdBulkDate = createdBulkDate;
+    }
+
+    @Column(name = "JOB_ID", columnDefinition = "CHAR(36)")
+    @Type(type="org.hibernate.type.UUIDCharType")
+    public UUID getJobId() {
+        return jobId;
+    }
+
+    @Column(name = "TEMPLATE_ID", columnDefinition = "CHAR(36)")
+    @Type(type="org.hibernate.type.UUIDCharType")
+    public UUID getTemplateId() {
+        return templateId;
+    }
+
+    @Column(name="USER_ID")
+    public String getUserId() {
+        return userId;
+    }
+
+    @Column(name="JOB_STATUS")
+    @Enumerated(EnumType.STRING)
+    public Job.JobStatus getJobStatus() {
+        return jobStatus;
+    }
+
+    @Column(name="STATUS_MODIFIED_DATE")
+    public Date getStatusModifiedDate() {
+        return statusModifiedDate;
+    }
+
+    @Column(name="IS_HIDDEN")
+    public boolean isHidden() {
+        return hidden;
+    }
+
+    @Column(name="IS_PAUSE")
+    public boolean isPause() {
+        return pause;
+    }
+
+    @Column(name="OWNING_ENTITY_ID")
+    public String getOwningEntityId() {
+        return owningEntityId;
+    }
+
+    @Column(name="OWNING_ENTITY_NAME")
+    public String getOwningEntityName() {
+        return owningEntityName;
+    }
+
+    @Column(name="PROJECT")
+    public String getProject() {
+        return project;
+    }
+
+    @Column(name="AIC_ZONE_ID")
+    public String getAicZoneId() {
+        return aicZoneId;
+    }
+
+    @Column(name="AIC_ZONE_NAME")
+    public String getAicZoneName() {
+        return aicZoneName;
+    }
+
+    @Column(name="TENANT_ID")
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    @Column(name="TENANT_NAME")
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    @Column(name="REGION_ID")
+    public String getRegionId() {
+        return regionId;
+    }
+
+    @Column(name="REGION_NAME")
+    public String getRegionName() {
+        return regionName;
+    }
+
+    @Column(name="SERVICE_TYPE")
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    @Column(name="SUBSCRIBER_NAME")
+    public String getSubscriberName() {
+        return subscriberName;
+    }
+
+    @Column(name="SERVICE_INSTANCE_ID")
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    @Column(name="SERVICE_INSTANCE_NAME")
+    public String getServiceInstanceName() {
+        return serviceInstanceName;
+    }
+
+    @Column(name="SERVICE_MODEL_ID")
+    public String getServiceModelId() {
+        return serviceModelId;
+    }
+
+    @Column(name="SERVICE_MODEL_NAME")
+    public String getServiceModelName() {
+        return serviceModelName;
+    }
+
+    @Column(name="SERVICE_MODEL_VERSION")
+    public String getServiceModelVersion() {
+        return serviceModelVersion;
+    }
+
+    @Column(name="CREATED_BULK_DATE")
+    public Date getCreatedBulkDate() {
+        return createdBulkDate;
+    }
+
+    @Column(name="DELETED_AT")
+    public Date getDeletedAt() {
+         return deletedAt;
+     }
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Override
+    @Column(name = "ID", columnDefinition = "INT(11)")
+    public Long getId() {
+        return this.id;
+    }
+
+    @Override
+    @Column(name = "CREATED_DATE")
+    public Date getCreated() {
+        return super.getCreated();
+    }
+
+    @Override
+    @Column(name = "MODIFIED_DATE")
+    public Date getModified() {
+        return super.getModified();
+    }
+
+    @Override
+    @Transient
+    public Long getCreatedId() {
+        return super.getCreatedId();
+    }
+
+    @Override
+    @Transient
+    public Long getModifiedId() {
+        return super.getModifiedId();
+    }
+
+    @Override
+    @Transient
+    public Serializable getAuditUserId() {
+        return super.getAuditUserId();
+    }
+
+    @Override
+    @Transient
+    public Long getRowNum() {
+        return super.getRowNum();
+    }
+
+    @Override
+    @Transient
+    public Set getAuditTrail() {
+        return super.getAuditTrail();
+    }
+
+    public void setJobId(UUID jobId) {
+        this.jobId = jobId;
+    }
+
+    public void setTemplateId(UUID templateId) {
+        this.templateId = templateId;
+    }
+
+    public void setJobStatus(Job.JobStatus jobStatus) {
+        this.jobStatus = jobStatus;
+    }
+
+    public void setStatusModifiedDate(Date statusModifiedDate) {
+        this.statusModifiedDate = statusModifiedDate;
+    }
+
+    public void setHidden(boolean isHidden) {
+        hidden = isHidden;
+    }
+
+    public void setPause(boolean pause) {
+        this.pause = pause;
+    }
+
+    public void setOwningEntityId(String owningEntityId) {
+        this.owningEntityId = owningEntityId;
+    }
+
+    public void setOwningEntityName(String owningEntityName) {
+        this.owningEntityName = owningEntityName;
+    }
+
+    public void setProject(String project) {
+        this.project = project;
+    }
+
+    public void setAicZoneId(String aicZoneId) {
+        this.aicZoneId = aicZoneId;
+    }
+
+    public void setAicZoneName(String aicZoneName) {
+        this.aicZoneName = aicZoneName;
+    }
+
+    public void setTenantId(String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    public void setRegionId(String regionId) {
+        this.regionId = regionId;
+    }
+
+    public void setRegionName(String regionName) {
+        this.regionName = regionName;
+    }
+
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    public void setSubscriberName(String subscriberName) {
+        this.subscriberName = subscriberName;
+    }
+
+    public void setServiceInstanceId(String serviceInstanceId) {
+        this.serviceInstanceId = serviceInstanceId;
+    }
+
+    public void setServiceInstanceName(String serviceInstanceName) {
+        this.serviceInstanceName = serviceInstanceName;
+    }
+
+    public void setServiceModelId(String serviceModelId) {
+        this.serviceModelId = serviceModelId;
+    }
+
+    public void setServiceModelName(String serviceModelName) {
+        this.serviceModelName = serviceModelName;
+    }
+
+    public void setServiceModelVersion(String serviceModelVersion) {
+        this.serviceModelVersion = serviceModelVersion;
+    }
+
+    public void setCreatedBulkDate(Date createdBulkDate) {
+        this.createdBulkDate = createdBulkDate;
+    }
+
+    public void setDeletedAt(Date deletedAt) {
+         this.deletedAt = deletedAt;
+     }
+
+
+     @Override
+     public boolean equals(Object o) {
+         if (this == o) return true;
+         if (!(o instanceof ServiceInfo)) return false;
+         ServiceInfo that = (ServiceInfo) o;
+         return isHidden() == that.isHidden() &&
+                 isPause() == that.isPause() &&
+                 Objects.equals(getDeletedAt(), that.getDeletedAt()) &&
+                 Objects.equals(getJobId(), that.getJobId()) &&
+                 Objects.equals(getTemplateId(), that.getTemplateId()) &&
+                 Objects.equals(getUserId(), that.getUserId()) &&
+                 getJobStatus() == that.getJobStatus() &&
+                 Objects.equals(getStatusModifiedDate(), that.getStatusModifiedDate()) &&
+                 Objects.equals(getOwningEntityId(), that.getOwningEntityId()) &&
+                 Objects.equals(getOwningEntityName(), that.getOwningEntityName()) &&
+                 Objects.equals(getProject(), that.getProject()) &&
+                 Objects.equals(getAicZoneId(), that.getAicZoneId()) &&
+                 Objects.equals(getAicZoneName(), that.getAicZoneName()) &&
+                 Objects.equals(getTenantId(), that.getTenantId()) &&
+                 Objects.equals(getTenantName(), that.getTenantName()) &&
+                 Objects.equals(getRegionId(), that.getRegionId()) &&
+                 Objects.equals(getRegionName(), that.getRegionName()) &&
+                 Objects.equals(getServiceType(), that.getServiceType()) &&
+                 Objects.equals(getSubscriberName(), that.getSubscriberName()) &&
+                 Objects.equals(getServiceInstanceId(), that.getServiceInstanceId()) &&
+                 Objects.equals(getServiceInstanceName(), that.getServiceInstanceName()) &&
+                 Objects.equals(getServiceModelId(), that.getServiceModelId()) &&
+                 Objects.equals(getServiceModelName(), that.getServiceModelName()) &&
+                 Objects.equals(getServiceModelVersion(), that.getServiceModelVersion()) &&
+                 Objects.equals(getCreatedBulkDate(), that.getCreatedBulkDate());
+     }
+
+     @Override
+     public int hashCode() {
+
+         return Objects.hash(getJobId(), getTemplateId(), getUserId(), getJobStatus(), getStatusModifiedDate(),
+                 isHidden(), isPause(), getDeletedAt(), getOwningEntityId(), getOwningEntityName(), getProject(),
+                 getAicZoneId(), getAicZoneName(), getTenantId(), getTenantName(), getRegionId(),
+                 getRegionName(), getServiceType(), getSubscriberName(), getServiceInstanceId(),
+                 getServiceInstanceName(), getServiceModelId(), getServiceModelName(),
+                 getServiceModelVersion(), getCreatedBulkDate());
+     }
+ }
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/ServiceInstanceSearchResult.java b/onap-enabler-be/src/main/java/org/onap/osam/model/ServiceInstanceSearchResult.java
new file mode 100644
index 0000000..c8aab29
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/ServiceInstanceSearchResult.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class ServiceInstanceSearchResult {
+
+	private String serviceInstanceId;
+
+	private String globalCustomerId;
+
+	private String serviceType;
+
+	private String serviceInstanceName;
+
+	private String subscriberName;
+
+	private String aaiModelInvariantId;
+
+	private String aaiModelVersionId;
+
+	private boolean isPermitted;
+
+	public ServiceInstanceSearchResult(){
+
+	}
+	public ServiceInstanceSearchResult(String serviceInstanceId, String globalCustomerId, String serviceType,
+									   String serviceInstanceName, String subscriberName, String aaiModelInvariantId,
+									   String aaiModelVersionId, boolean isPermitted) {
+		this.serviceInstanceId = serviceInstanceId;
+		this.globalCustomerId = globalCustomerId;
+		this.serviceType = serviceType;
+		this.serviceInstanceName = serviceInstanceName;
+		this.subscriberName = subscriberName;
+		this.aaiModelInvariantId = aaiModelInvariantId;
+		this.aaiModelVersionId = aaiModelVersionId;
+		this.isPermitted = isPermitted;
+	}
+
+	public String getServiceInstanceId() {
+		return serviceInstanceId;
+	}
+
+	public void setServiceInstanceId(String serviceInstanceId) {
+		this.serviceInstanceId = serviceInstanceId;
+	}
+
+	public String getGlobalCustomerId() {
+		return globalCustomerId;
+	}
+
+	public void setGlobalCustomerId(String globalCustomerId) {
+		this.globalCustomerId = globalCustomerId;
+	}
+
+	public String getServiceType() {
+		return serviceType;
+	}
+
+	public void setServiceType(String serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public String getServiceInstanceName() {
+		return serviceInstanceName;
+	}
+
+	public void setServiceInstanceName(String serviceInstanceName) {
+		this.serviceInstanceName = serviceInstanceName;
+	}
+
+	public String getSubscriberName() {
+		return subscriberName;
+	}
+
+	public void setSubscriberName(String subscriberName) {
+		this.subscriberName = subscriberName;
+	}
+
+	public String getAaiModelInvariantId() {
+		return aaiModelInvariantId;
+	}
+
+	public void setAaiModelInvariantId(String aaiModelInvariantId) {
+		this.aaiModelInvariantId = aaiModelInvariantId;
+	}
+
+	public String getAaiModelVersionId() {
+		return aaiModelVersionId;
+	}
+
+	public void setAaiModelVersionId(String aaiModelVersionId) {
+		this.aaiModelVersionId = aaiModelVersionId;
+	}
+
+	public boolean getIsPermitted() {
+		return isPermitted;
+	}
+
+	public void setIsPermitted(boolean isPermitted) {
+		this.isPermitted = isPermitted;
+	}
+
+	@Override
+	public boolean equals(Object other){
+		if (other instanceof ServiceInstanceSearchResult) {
+			ServiceInstanceSearchResult serviceInstanceSearchResultOther = (ServiceInstanceSearchResult) other;
+			if (this.getServiceInstanceId().equals(serviceInstanceSearchResultOther.getServiceInstanceId())) {
+				return true;
+			}
+		}
+		return false;
+
+	}
+
+	@Override
+	public int hashCode() {
+		int result = 17;
+		result = 31 * result + serviceInstanceId.hashCode();
+		return result;
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/Subscriber.java b/onap-enabler-be/src/main/java/org/onap/osam/model/Subscriber.java
new file mode 100644
index 0000000..1afe8cc
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/Subscriber.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Subscriber {
+
+    @JsonProperty("global-customer-id")
+    public String globalCustomerId;
+
+    @JsonProperty("subscriber-name")
+    public String subscriberName;
+
+    @JsonProperty("subscriber-type")
+    public String subscriberType;
+
+    @JsonProperty("resource-version")
+    public String resourceVersion;
+
+
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/SubscriberList.java b/onap-enabler-be/src/main/java/org/onap/osam/model/SubscriberList.java
new file mode 100644
index 0000000..8e4830e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/SubscriberList.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.List;
+
+public class SubscriberList {
+    public SubscriberList(List<Subscriber> customer) {
+        this.customer = customer;
+    }
+
+    public SubscriberList(){}
+
+    public List<Subscriber> customer;
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/VNFDao.java b/onap-enabler-be/src/main/java/org/onap/osam/model/VNFDao.java
new file mode 100644
index 0000000..1f0d56d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/VNFDao.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onap.portalsdk.core.domain.support.DomainVo;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+@Entity
+@Table(name = "vid_vnf")
+public class VNFDao extends DomainVo {
+
+    private String vnfUUID;
+    private String vnfInvariantUUID;
+    private Set<VidWorkflow> workflows = new HashSet<>(0);
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "VNF_DB_ID")
+    @JsonIgnore
+    public Long getId() {
+        return id;
+    }
+
+    @Override
+    @Column(name = "CREATED_DATE")
+    @JsonIgnore
+    public Date getCreated() {
+        return super.getCreated();
+    }
+
+    @Override
+    @Column(name = "MODIFIED_DATE")
+    @JsonIgnore
+    public Date getModified() {
+        return super.getModified();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Long getCreatedId() {
+        return super.getCreatedId();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Long getModifiedId() {
+        return super.getModifiedId();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Serializable getAuditUserId() {
+        return super.getAuditUserId();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Long getRowNum() {
+        return super.getRowNum();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Set getAuditTrail() {
+        return super.getAuditTrail();
+    }
+
+    @Column(name = "VNF_APP_UUID")
+    public String getVnfUUID() {
+        return vnfUUID;
+    }
+    
+    @Column(name = "VNF_APP_INVARIANT_UUID")
+    public String getVnfInvariantUUID() {
+        return vnfInvariantUUID;
+    }
+    
+
+    public void setVnfUUID(String vnfUUID) {
+        this.vnfUUID = vnfUUID;
+    }
+    
+    public void setVnfInvariantUUID(String vnfInvariantUUID) {
+		this.vnfInvariantUUID = vnfInvariantUUID;
+	}
+
+    @ManyToMany(cascade = CascadeType.ALL, fetch =FetchType.EAGER )
+    @JoinTable(name = "vid_vnf_workflow", joinColumns = { @JoinColumn(name = "VNF_DB_ID") }, inverseJoinColumns = { @JoinColumn(name = "WORKFLOW_DB_ID") })
+    public Set<VidWorkflow> getWorkflows() {
+        return workflows;
+    }
+
+    public void setWorkflows(Set<VidWorkflow> workflows) {
+        this.workflows = workflows;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/VersionByInvariantIdsRequest.java b/onap-enabler-be/src/main/java/org/onap/osam/model/VersionByInvariantIdsRequest.java
new file mode 100644
index 0000000..9cde397
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/VersionByInvariantIdsRequest.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.List;
+
+public class VersionByInvariantIdsRequest {
+
+    public List<String> versions;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/VfcInstanceGroup.java b/onap-enabler-be/src/main/java/org/onap/osam/model/VfcInstanceGroup.java
new file mode 100644
index 0000000..21e8593
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/VfcInstanceGroup.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class VfcInstanceGroup {
+
+    private String uuid;
+    private String invariantUuid;
+    private String name;
+    private String version;
+    private VfcInstanceGroupProperties vfcInstanceGroupProperties;
+
+    public String getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    public String getInvariantUuid() {
+        return invariantUuid;
+    }
+
+    public void setInvariantUuid(String invariantUuid) {
+        this.invariantUuid = invariantUuid;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public VfcInstanceGroupProperties getVfcInstanceGroupProperties() {
+        return vfcInstanceGroupProperties;
+    }
+
+    public void setVfcInstanceGroupProperties(VfcInstanceGroupProperties vfcInstanceGroupProperties) {
+        this.vfcInstanceGroupProperties = vfcInstanceGroupProperties;
+    }
+
+
+
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/VfcInstanceGroupProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/model/VfcInstanceGroupProperties.java
new file mode 100644
index 0000000..0fb0e51
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/VfcInstanceGroupProperties.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+public class VfcInstanceGroupProperties {
+
+    private String vfcParentPortRole;
+    private String networkCollectionFunction;
+    private String vfcInstanceGroupFunction;
+    private String subinterfaceRole;
+
+    public String getVfcParentPortRole() {
+        return vfcParentPortRole;
+    }
+
+    public void setVfcParentPortRole(String vfcParentPortRole) {
+        this.vfcParentPortRole = vfcParentPortRole;
+    }
+
+    public String getNetworkCollectionFunction() {
+        return networkCollectionFunction;
+    }
+
+    public void setNetworkCollectionFunction(String networkCollectionFunction) {
+        this.networkCollectionFunction = networkCollectionFunction;
+    }
+
+    public String getVfcInstanceGroupFunction() {
+        return vfcInstanceGroupFunction;
+    }
+
+    public void setVfcInstanceGroupFunction(String vfcInstanceGroupFunction) {
+        this.vfcInstanceGroupFunction = vfcInstanceGroupFunction;
+    }
+
+    public String getSubinterfaceRole() {
+        return subinterfaceRole;
+    }
+
+    public void setSubinterfaceRole(String subinterfaceRole) {
+        this.subinterfaceRole = subinterfaceRole;
+    }
+
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/VidBaseEntity.java b/onap-enabler-be/src/main/java/org/onap/osam/model/VidBaseEntity.java
new file mode 100644
index 0000000..1d511a3
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/VidBaseEntity.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.onap.portalsdk.core.domain.support.DomainVo;
+
+import javax.persistence.Column;
+import javax.persistence.MappedSuperclass;
+import javax.persistence.Transient;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+@MappedSuperclass
+public class VidBaseEntity extends DomainVo {
+
+    @Override
+    @Column(name = "CREATED_DATE")
+    @JsonIgnore
+    public Date getCreated() {
+        return super.getCreated();
+    }
+
+    @Override
+    @Column(name = "MODIFIED_DATE")
+    @JsonIgnore
+    public Date getModified() {
+        return super.getModified();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Long getCreatedId() {
+        return super.getCreatedId();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Long getModifiedId() {
+        return super.getModifiedId();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Serializable getAuditUserId() {
+        return super.getAuditUserId();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Long getRowNum() {
+        return super.getRowNum();
+    }
+
+    @Override
+    @Transient
+    @JsonIgnore
+    public Set getAuditTrail() {
+        return super.getAuditTrail();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/VidWorkflow.java b/onap-enabler-be/src/main/java/org/onap/osam/model/VidWorkflow.java
new file mode 100644
index 0000000..3bd93e7
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/VidWorkflow.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "vid_workflow")
+public class VidWorkflow extends VidBaseEntity {
+
+    private String wokflowName;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "WORKFLOW_DB_ID")
+    @JsonIgnore
+    public Long getId() {
+        return id;
+    }
+
+    @Column(name = "WORKFLOW_APP_NAME")
+    public String getWokflowName() {
+        return wokflowName;
+    }
+
+    public void setWokflowName(String wokflowName) {
+        this.wokflowName = wokflowName;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/Workflow.java b/onap-enabler-be/src/main/java/org/onap/osam/model/Workflow.java
new file mode 100644
index 0000000..8ba781f
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/Workflow.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+
+import java.util.Collection;
+
+public class Workflow {
+    //Private members:
+    private int id;
+    private String workflowName;
+    private Collection<String> vnfNames;
+
+
+    //Constructors:
+    public Workflow() {}
+
+    public Workflow(int id, String workflowName, Collection<String> vnfNames) {
+        this.id = id;
+        this.workflowName = workflowName;
+        this.vnfNames = vnfNames;
+    }
+
+
+    //Setters and getters:
+    public int getId() {
+        return id;
+    }
+
+    public String getWorkflowName() {
+        return workflowName;
+    }
+
+    public Collection<String> getVnfNames() {
+        return this.vnfNames;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public void setWorkflowName(String workflowName) {
+        this.workflowName = workflowName;
+    }
+
+    public void setVnfName(Collection<String> vnfNames) {
+        this.vnfNames = vnfNames;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/probes/ErrorMetadata.java b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/ErrorMetadata.java
new file mode 100644
index 0000000..3fb8d58
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/ErrorMetadata.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.probes;
+
+public class ErrorMetadata extends StatusMetadata {
+    public ErrorMetadata(String description, long duration) {
+        super(description, duration);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/probes/ExternalComponentStatus.java b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/ExternalComponentStatus.java
new file mode 100644
index 0000000..149bc79
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/ExternalComponentStatus.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.probes;
+
+public class ExternalComponentStatus {
+    public enum Component {AAI, MSO}
+    private final Component component;
+    private final boolean available;
+    private final StatusMetadata metadata;
+
+    public ExternalComponentStatus(Component component, boolean isAvailable, StatusMetadata metadata) {
+        this.component = component;
+        this.available = isAvailable;
+        this.metadata = metadata;
+    }
+
+    public Component getComponent() {
+        return component;
+    }
+
+    public boolean isAvailable() {
+        return available;
+    }
+
+    public StatusMetadata getMetadata() {
+        return metadata;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/probes/HttpRequestMetadata.java b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/HttpRequestMetadata.java
new file mode 100644
index 0000000..ba9c15f
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/HttpRequestMetadata.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.probes;
+
+import org.springframework.http.HttpMethod;
+
+public class HttpRequestMetadata extends StatusMetadata {
+    private final HttpMethod httpMethod;
+    private final int httpCode;
+    private final String url;
+    private final String rawData;
+
+    public HttpRequestMetadata(HttpMethod httpMethod, int httpCode, String url, String rawData, String description, long duration) {
+        super(description, duration);
+        this.httpMethod = httpMethod;
+        this.url = url;
+        this.httpCode = httpCode;
+        this.rawData = rawData;
+    }
+
+    public HttpMethod getHttpMethod() {
+        return httpMethod;
+    }
+
+    public int getHttpCode() {
+        return httpCode;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public String getRawData() {
+        return rawData;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/probes/StatusMetadata.java b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/StatusMetadata.java
new file mode 100644
index 0000000..a2b8d90
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/probes/StatusMetadata.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.probes;
+
+public abstract class StatusMetadata {
+    protected final long duration;
+    protected final String description;
+
+    public StatusMetadata(String description, long duration) {
+        this.description = description;
+        this.duration = duration;
+    }
+
+    public long getDuration() {
+        return duration;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/ServiceInstantiation.java b/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/ServiceInstantiation.java
new file mode 100644
index 0000000..b1282a4
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/ServiceInstantiation.java
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.serviceInstantiation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.domain.mso.ModelInfo;
+import org.onap.osam.job.JobAdapter;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public class ServiceInstantiation implements JobAdapter.AsyncJobRequest {
+
+    private final ModelInfo modelInfo;
+
+    private final String owningEntityId;
+
+    private final String owningEntityName;
+
+    private final String projectName;
+
+    private final String subscriberName;
+
+    private final String globalSubscriberId;
+
+    private final String productFamilyId;
+
+    private final String instanceName;
+
+    private final Boolean isUserProvidedNaming;
+
+    private final String subscriptionServiceType;
+
+    private final String lcpCloudRegionId;
+
+    private final String tenantId;
+
+    private final String tenantName;
+
+    private final String aicZoneId;
+
+    private final String aicZoneName;
+
+    private final Map<String, Vnf> vnfs;
+
+    private final List<Map<String,String>> instanceParams;
+
+    private final boolean isPause;
+
+    private final int bulkSize;
+
+    private final boolean rollbackOnFailure;
+
+    public ServiceInstantiation(@JsonProperty("modelInfo") ModelInfo modelInfo,
+                                @JsonProperty("owningEntityId") String owningEntityId,
+                                @JsonProperty("owningEntityName") String owningEntityName,
+                                @JsonProperty("projectName") String projectName,
+                                @JsonProperty("globalSubscriberId") String globalSubscriberId,
+                                @JsonProperty("subscriberName") String subscriberName,
+                                @JsonProperty("productFamilyId") String productFamilyId,
+                                @JsonProperty("instanceName") String instanceName,
+                                @JsonProperty("isUserProvidedNaming") Boolean isUserProvidedNaming,
+                                @JsonProperty("subscriptionServiceType") String subscriptionServiceType,
+                                @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+                                @JsonProperty("tenantId") String tenantId,
+                                @JsonProperty("tenantName") String tenantName,
+                                @JsonProperty("aicZoneId") String aicZoneId,
+                                @JsonProperty("aicZoneName") String aicZoneName,
+                                @JsonProperty("vnfs") Map<String, Vnf> vnfs,
+                                @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+                                @JsonProperty("pause") boolean isPause,
+                                @JsonProperty("bulkSize") int bulkSize,
+                                @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure
+                               ) {
+
+        this.modelInfo = modelInfo;
+        this.modelInfo.setModelType("service");
+        this.owningEntityId = owningEntityId;
+        this.owningEntityName = owningEntityName;
+        this.projectName = projectName;
+        this.globalSubscriberId = globalSubscriberId;
+        this.subscriberName = subscriberName;
+        this.productFamilyId = productFamilyId;
+        this.instanceName = instanceName;
+        this.isUserProvidedNaming = isUserProvidedNaming;
+        this.subscriptionServiceType = subscriptionServiceType;
+        this.lcpCloudRegionId = lcpCloudRegionId;
+        this.tenantId = tenantId;
+        this.tenantName = tenantName;
+        this.aicZoneId = aicZoneId;
+        this.aicZoneName = aicZoneName;
+        this.vnfs = vnfs;
+        this.instanceParams = instanceParams;
+        this.isPause = isPause;
+        this.bulkSize = bulkSize;
+        this.rollbackOnFailure = rollbackOnFailure;
+    }
+
+    public ModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    public String getOwningEntityId() {
+        return owningEntityId;
+    }
+
+    public String getOwningEntityName() {
+        return owningEntityName;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public String getGlobalSubscriberId() {
+        return globalSubscriberId;
+    }
+
+    public String getSubscriberName() {
+        return subscriberName;
+    }
+
+    public String getProductFamilyId() {
+        return productFamilyId;
+    }
+
+    public String getInstanceName() {
+        return instanceName;
+    }
+
+    @JsonProperty("isUserProvidedNaming")
+    public Boolean isUserProvidedNaming() { return isUserProvidedNaming; }
+
+    public String getSubscriptionServiceType() {
+        return subscriptionServiceType;
+    }
+
+    public String getLcpCloudRegionId() {
+        return lcpCloudRegionId;
+    }
+
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    public String getAicZoneId() {
+        return aicZoneId;
+    }
+
+    public String getAicZoneName() {
+        return aicZoneName;
+    }
+
+    public Map<String, Vnf> getVnfs() {
+        return vnfs;
+    }
+
+    public List<Map<String, String>> getInstanceParams() {
+        return instanceParams == null ? Collections.emptyList() : instanceParams;
+    }
+
+    public boolean isPause() {
+        return isPause;
+    }
+
+    public int getBulkSize() { return bulkSize; }
+
+    public boolean isRollbackOnFailure() {
+        return rollbackOnFailure;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/VfModule.java b/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/VfModule.java
new file mode 100644
index 0000000..dec47cd
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/VfModule.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.serviceInstantiation;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.domain.mso.ModelInfo;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
+
+public class VfModule {
+
+
+
+	private final ModelInfo modelInfo;
+
+	@JsonInclude(NON_NULL) private final String instanceName;
+
+	private final List<Map<String, String>> instanceParams;
+	@JsonInclude(NON_NULL) private final String volumeGroupInstanceName;
+
+	public VfModule(@JsonProperty("modelInfo") ModelInfo modelInfo,
+					@JsonProperty("instanceName") String instanceName,
+					@JsonProperty(value = "volumeGroupName") String volumeGroupInstanceName,
+					@JsonProperty("instanceParams") List<Map<String, String>> instanceParams) {
+		this.modelInfo = modelInfo;
+		this.modelInfo.setModelType("vfModule");
+		this.instanceName = instanceName;
+		this.instanceParams = instanceParams;
+		this.volumeGroupInstanceName = volumeGroupInstanceName;
+	}
+
+	public ModelInfo getModelInfo() {
+		return modelInfo;
+	}
+
+	public String getInstanceName() {
+		return instanceName;
+	}
+
+	public String getVolumeGroupInstanceName() {
+		return volumeGroupInstanceName;
+	}
+
+	public List<Map<String, String>> getInstanceParams() {
+		return instanceParams == null ? Collections.emptyList() : instanceParams;
+	}
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/Vnf.java b/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/Vnf.java
new file mode 100644
index 0000000..1fb61da
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/model/serviceInstantiation/Vnf.java
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model.serviceInstantiation;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.onap.osam.domain.mso.ModelInfo;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public class Vnf  {
+	private final ModelInfo modelInfo;
+
+	private final String productFamilyId;
+
+	private final String instanceName;
+
+	private final String platformName;
+
+	private final String lcpCloudRegionId;
+
+	private final String tenantId;
+
+	private final Boolean isUserProvidedNaming;
+
+	private final List<Map<String, String>> instanceParams;
+
+	private final String lineOfBusiness;
+
+
+	private final Map<String, Map<String, VfModule>> vfModules;
+
+	public Vnf(@JsonProperty("modelInfo") ModelInfo modelInfo,
+			   @JsonProperty("productFamilyId") String productFamilyId,
+			   @JsonProperty("instanceName") String instanceName,
+			   @JsonProperty("isUserProvidedNaming") Boolean isUserProvidedNaming,
+			   @JsonProperty("platformName") String platformName,
+			   @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+			   @JsonProperty("tenantId") String tenantId,
+			   @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+			   @JsonProperty("lineOfBusinessName") String lineOfBusiness,
+			   @JsonProperty("vfModules") Map<String, Map<String, VfModule>> vfModules) {
+		this.modelInfo = modelInfo;
+		this.modelInfo.setModelType("vnf");
+		this.productFamilyId = productFamilyId;
+		this.instanceName = instanceName;
+		this.isUserProvidedNaming = isUserProvidedNaming;
+		this.platformName = platformName;
+		this.lcpCloudRegionId = lcpCloudRegionId;
+		this.tenantId = tenantId;
+		this.instanceParams = instanceParams;
+		this.vfModules = vfModules;
+		this.lineOfBusiness = lineOfBusiness;
+	}
+
+	public ModelInfo getModelInfo() {
+		return modelInfo;
+	}
+
+	public String getProductFamilyId() {
+		return productFamilyId;
+	}
+
+	public String getInstanceName() {
+		return instanceName;
+	}
+
+	@JsonProperty("isUserProvidedNaming")
+	public Boolean isUserProvidedNaming() {
+		return isUserProvidedNaming;
+	}
+
+	public String getPlatformName() {
+		return platformName;
+	}
+
+	public String getLcpCloudRegionId() {
+		return lcpCloudRegionId;
+	}
+
+	public String getTenantId() {
+		return tenantId;
+	}
+
+	public List<Map<String, String>> getInstanceParams() {
+		return instanceParams == null ? Collections.emptyList() : instanceParams;
+	}
+
+	public  Map<String, Map<String, VfModule>> getVfModules() {
+		return vfModules;
+	}
+
+	public String getLineOfBusiness() {
+		return lineOfBusiness;
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoBusinessLogic.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoBusinessLogic.java
new file mode 100644
index 0000000..d63f1e7
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoBusinessLogic.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import org.onap.osam.mso.rest.Request;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.onap.osam.mso.rest.Task;
+
+import java.util.List;
+
+public interface MsoBusinessLogic {
+
+    // this function should get params from tosca and send them to instance at mso, then return success response.
+    MsoResponseWrapper createSvcInstance(RequestDetails msoRequest);
+
+    MsoResponseWrapper createE2eSvcInstance(Object msoRequest);
+    
+    MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String serviceInstanceId);
+    
+    MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId);
+
+    MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId);
+
+    MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    MsoResponseWrapper scaleOutVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    MsoResponseWrapper createConfigurationInstance(org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String serviceInstanceId);
+
+    MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String serviceInstanceId, String serviceStatus);
+
+    MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String vfModuleId);
+
+    MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String volumeGroupId);
+
+    MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String serviceInstanceId, String networkInstanceId);
+
+    MsoResponseWrapper getOrchestrationRequest(String requestId);
+
+    MsoResponseWrapper getOrchestrationRequests(String filterString);
+
+    List<Request> getOrchestrationRequestsForDashboard();
+
+    List<Task> getManualTasksByRequestId(String originalRequestId);
+
+    MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String taskId);
+
+    MsoResponseWrapper activateServiceInstance(RequestDetails requestDetails, String serviceInstanceId);
+
+    //MsoResponseWrapperInterface updateVnf(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    //MsoResponseWrapperInterface replaceVnf(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    MsoResponseWrapperInterface updateVnfSoftware(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    MsoResponseWrapperInterface updateVnfConfig(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId);
+
+    MsoResponseWrapper deleteConfiguration(
+            org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper,
+            String serviceInstanceId,
+            String configurationId);
+
+    MsoResponseWrapper setConfigurationActiveStatus(
+            RequestDetails requestDetails,
+            String serviceInstanceId,
+            String configurationId,
+            boolean isActivate);
+
+    MsoResponseWrapper setPortOnConfigurationStatus(
+            RequestDetails requestDetails,
+            String serviceInstanceId,
+            String configurationId,
+            boolean isEnable);
+
+    String getCloudResourcesRequestsStatusPath(String requestId);
+
+    MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String serviceInstanceId);
+
+    MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String serviceInstanceId);
+
+    MsoResponseWrapper setServiceInstanceStatus(RequestDetails requestDetails , String serviceInstanceId, boolean isActivate);
+
+    RequestDetailsWrapper generateInPlaceMsoRequest(RequestDetails requestDetails);
+
+    RequestDetailsWrapper generateConfigMsoRequest(RequestDetails requestDetails);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoBusinessLogicImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoBusinessLogicImpl.java
new file mode 100644
index 0000000..cfe0bad
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoBusinessLogicImpl.java
@@ -0,0 +1,799 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableList;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.mso.rest.Request;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.onap.osam.mso.rest.RequestList;
+import org.onap.osam.mso.rest.RequestWrapper;
+import org.onap.osam.mso.rest.Task;
+import org.onap.osam.mso.rest.TaskList;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.togglz.core.manager.FeatureManager;
+
+import javax.ws.rs.BadRequestException;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import static org.apache.commons.lang.StringUtils.upperCase;
+import static org.onap.osam.controllers.MsoController.*;
+import static org.onap.osam.mso.MsoProperties.*;
+import static org.onap.osam.properties.Features.FLAG_UNASSIGN_SERVICE;
+
+public class MsoBusinessLogicImpl implements MsoBusinessLogic {
+
+    public static final String START = " start";
+    public static final String RESOURCE_TYPE = "resourceType";
+    FeatureManager featureManager;
+
+    private static final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+    private static final Pattern SOFTWARE_VERSION_PATTERN = Pattern.compile("^[A-Za-z0-9.\\-]+$");
+    private static final Pattern NUMBER_PATTERN = Pattern.compile("^[0-9]+$");
+    private static final String ACTIVATE = "/activate";
+    private static final String DEACTIVATE = "/deactivate";
+    private static final String ENABLE_PORT = "/enablePort";
+    private static final String DISABLE_PORT = "/disablePort";
+    private static final String RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT = "operationalEnvironment";
+    private static final String SOURCE_OPERATIONAL_ENVIRONMENT = "VID";
+    private static final ObjectMapper objectMapper = new ObjectMapper();
+    private final MsoInterface msoClientInterface;
+
+    /**
+     * The logger.
+     */
+    private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoBusinessLogicImpl.class);
+    
+    @Autowired
+    public MsoBusinessLogicImpl(MsoInterface msoClientInterface, FeatureManager featureManager) {
+        this.msoClientInterface = msoClientInterface;
+        this.featureManager = featureManager;
+    }
+
+    public static String validateEndpointPath(String endpointEnvVariable) {
+        String endpoint = SystemProperties.getProperty(endpointEnvVariable);
+        if (endpoint == null || endpoint.isEmpty()) {
+            throw new GenericUncheckedException(endpointEnvVariable + " env variable is not defined");
+        }
+        return endpoint;
+    }
+
+    // this function should get params from tosca and send them to instance at mso, then return success response.
+    @Override
+    public MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) {
+        String methodName = "createSvcInstance ";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+
+        return msoClientInterface.createSvcInstance(msoRequest, endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper createE2eSvcInstance(Object msoRequest){
+        String methodName = "createE2eSvcInstance ";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_E2E_SVC_INSTANCE);
+
+
+        return msoClientInterface.createE2eSvcInstance(msoRequest, endpoint);
+    } 
+
+    @Override
+    public MsoResponseWrapper createVnf(RequestDetails requestDetails, String serviceInstanceId) {
+        String methodName = "createVnf";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE);
+
+        String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        return msoClientInterface.createVnf(requestDetails, vnf_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) {
+        String methodName = "createNwInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
+
+        String nw_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        return msoClientInterface.createNwInstance(requestDetails, nw_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
+        String methodName = "createVolumeGroupInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
+
+        String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        vnf_endpoint = vnf_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+
+        return msoClientInterface.createVolumeGroupInstance(requestDetails, vnf_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
+        String methodName = "createVfModuleInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
+
+        String partial_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+
+        return msoClientInterface.createVfModuleInstance(requestDetails, vf_module_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper scaleOutVfModuleInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
+        String methodName = "scaleOutVfModuleInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_SCALE_OUT);
+
+        String partial_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+        RequestDetailsWrapper wrapper = new RequestDetailsWrapper();
+        //requestDetails.setVnfName(null);
+        //requestDetails.setVnfInstanceId(null);
+        wrapper.requestDetails = requestDetails;
+
+        return msoClientInterface.scaleOutVFModuleInstance(wrapper, vf_module_endpoint);
+    }
+    @Override
+    public MsoResponseWrapper createConfigurationInstance(org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String serviceInstanceId) {
+        String methodName = "createConfigurationInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATIONS);
+        endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId);
+
+        return msoClientInterface.createConfigurationInstance(requestDetailsWrapper, endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String serviceInstanceId) {
+        String methodName = "deleteE2eSvcInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+	 	endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_E2E_SVC_INSTANCE) + "/" + serviceInstanceId;
+
+        return msoClientInterface.deleteE2eSvcInstance(requestDetails, endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String serviceInstanceId, String serviceStatus) {
+        String methodName = "deleteSvcInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String endpoint;
+
+        if (featureManager.isActive(FLAG_UNASSIGN_SERVICE)){
+            endpoint = validateEndpointPath(MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE);
+            if (shouldUnassignService(serviceStatus)){
+                logger.debug(EELFLoggerDelegate.debugLogger, "unassign service");
+                String svc_endpoint = endpoint + "/" + serviceInstanceId + "/unassign";
+                return msoClientInterface.unassignSvcInstance(requestDetails, svc_endpoint);
+            }
+        } else {
+            endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        }
+
+        String svc_endpoint = endpoint + "/" + serviceInstanceId;
+        return msoClientInterface.deleteSvcInstance(requestDetails, svc_endpoint);
+    }
+
+    private boolean shouldUnassignService(String serviceStatus) {
+            return ImmutableList.of("created","pendingdelete","pending-delete", "assigned").contains(serviceStatus.toLowerCase());
+    }
+
+    @Override
+    public MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
+        String methodName = "deleteVnf";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE);
+        String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        vnf_endpoint = vnf_endpoint + '/' + vnfInstanceId;
+
+        return msoClientInterface.deleteVnf(requestDetails, vnf_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String vfModuleId) {
+        String methodName = "deleteVfModule";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
+
+        String vf__modules_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId).replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+
+        String delete_vf_endpoint = vf__modules_endpoint + '/' + vfModuleId;
+
+        return msoClientInterface.deleteVfModule(requestDetails, delete_vf_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId, String volumeGroupId) {
+        String methodName = "deleteVolumeGroupInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
+
+        String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        String vnf_endpoint = svc_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+        String delete_volume_group_endpoint = vnf_endpoint + "/" + volumeGroupId;
+
+        return msoClientInterface.deleteVolumeGroupInstance(requestDetails, delete_volume_group_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String serviceInstanceId, String networkInstanceId) {
+        String methodName = "deleteNwInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
+
+        String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        String delete_nw_endpoint = svc_endpoint + "/" + networkInstanceId;
+
+        return msoClientInterface.deleteNwInstance(requestDetails, delete_nw_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper getOrchestrationRequest(String requestId) {
+        String methodName = "getOrchestrationRequest";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        try {
+            String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQ);
+            String path = p + "/" + requestId;
+
+            return msoClientInterface.getOrchestrationRequest(path);
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper getOrchestrationRequests(String filterString) {
+        String methodName = "getOrchestrationRequest";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        try {
+            String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQS);
+            String path = p + filterString;
+
+            return msoClientInterface.getOrchestrationRequest(path);
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public List<Request> getOrchestrationRequestsForDashboard() {
+        String methodName = "getOrchestrationRequestsForDashboard";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        List<Request> filteredOrchestrationRequests = new ArrayList<>();
+        try {
+            String path = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQS);
+            path += "filter=modelType:EQUALS:vnf";
+            RestObject<String> restObjStr = new RestObject<>();
+            String str = new String();
+            restObjStr.set(str);
+
+            MsoResponseWrapper msoResponseWrapper = msoClientInterface.getOrchestrationRequestsForDashboard(str, "", path, restObjStr);
+            List<RequestWrapper> allOrchestrationRequests = deserializeOrchestrationRequestsJson(msoResponseWrapper.getEntity());
+
+            final ImmutableList<String> suppoertedRequestTypes = ImmutableList.of(
+                    RequestType.REPLACE_INSTANCE.toString().toUpperCase(),
+                    RequestType.UPDATE_INSTANCE.toString().toUpperCase(),
+                    RequestType.APPLY_UPDATED_CONFIG.toString().toUpperCase(),
+                    RequestType.IN_PLACE_SOFTWARE_UPDATE.toString().toUpperCase()
+            );
+
+            for (RequestWrapper currentRequest : allOrchestrationRequests) {
+                if (currentRequest.getRequest() != null
+                        && "vnf".equalsIgnoreCase(currentRequest.getRequest().getRequestScope())
+                        && suppoertedRequestTypes.contains(upperCase(currentRequest.getRequest().getRequestType()))
+                ) {
+                    filteredOrchestrationRequests.add(currentRequest.getRequest());
+                }
+            }
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+        }
+        return filteredOrchestrationRequests;
+    }
+
+    private List<RequestWrapper> deserializeOrchestrationRequestsJson(String orchestrationRequestsJson) {
+        String methodName = "deserializeOrchestrationRequestsJson";
+        logger.debug(dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        mapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true);
+        RequestList requestList = null;
+        try {
+            requestList = mapper.readValue(orchestrationRequestsJson, RequestList.class);
+        } catch (IOException e) {
+            throw new GenericUncheckedException(e);
+        }
+        return requestList.getRequestList();
+    }
+
+
+    @Override
+    public List<Task> getManualTasksByRequestId(String originalRequestId) {
+        String methodName = "getManualTasksByRequestId";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_MAN_TASKS);
+            String path = p + "?originalRequestId=" + originalRequestId;
+
+            RestObject<String> restObjStr = new RestObject<>();
+            String str = new String();
+            restObjStr.set(str);
+
+            MsoResponseWrapper msoResponseWrapper = msoClientInterface.getManualTasksByRequestId(str, "", path, restObjStr);
+            return deserializeManualTasksJson(msoResponseWrapper.getEntity());
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    private List<Task> deserializeManualTasksJson(String manualTasksJson) {
+        String methodName = "deserializeManualTasksJson";
+        logger.debug(dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        ObjectMapper mapper = new ObjectMapper();
+        try {
+            TaskList taskList = mapper.readValue(manualTasksJson, TaskList.class);
+            return taskList.getTaskList();
+        } catch (IOException e) {
+            throw new GenericUncheckedException(e);
+        }
+    }
+
+
+    @Override
+    public MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String taskId) {
+        String methodName = "completeManualTask";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        try {
+            String p = SystemProperties.getProperty(MsoProperties.MSO_REST_API_GET_MAN_TASKS);
+            String path = p + "/" + taskId + "/complete";
+
+            RestObject<String> restObjStr = new RestObject<>();
+            String str = new String();
+            restObjStr.set(str);
+
+            msoClientInterface.completeManualTask(requestDetails, str, "", path, restObjStr);
+
+            return MsoUtil.wrapResponse(restObjStr);
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper activateServiceInstance(RequestDetails requestDetails, String serviceInstanceId) {
+        String methodName = "activateServiceInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        try {
+            String serviceEndpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+            String activateServicePath = serviceEndpoint + "/" + serviceInstanceId + ACTIVATE;
+
+            RestObject<String> restObjStr = new RestObject<>();
+            String str = "";
+            restObjStr.set(str);
+
+            msoClientInterface.setServiceInstanceStatus(requestDetails, str, "", activateServicePath, restObjStr);
+
+            return MsoUtil.wrapResponse(restObjStr);
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    public RequestDetailsWrapper generateInPlaceMsoRequest(RequestDetails requestDetails) {
+        validateUpdateVnfSoftwarePayload(requestDetails);
+        RequestDetails inPlaceSoftwareUpdateRequest = new RequestDetails();
+        inPlaceSoftwareUpdateRequest.setCloudConfiguration(requestDetails.getCloudConfiguration());
+        inPlaceSoftwareUpdateRequest.setRequestParameters(requestDetails.getRequestParameters());
+        inPlaceSoftwareUpdateRequest.setRequestInfo(requestDetails.getRequestInfo());
+        RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper();
+        requestDetailsWrapper.requestDetails = inPlaceSoftwareUpdateRequest;
+        return requestDetailsWrapper;
+    }
+
+    @Override
+    public RequestDetailsWrapper generateConfigMsoRequest(RequestDetails requestDetails) {
+        validateUpdateVnfConfig(requestDetails);
+        RequestDetails ConfigUpdateRequest = new RequestDetails();
+        ConfigUpdateRequest.setRequestParameters(requestDetails.getRequestParameters());
+        ConfigUpdateRequest.setRequestInfo(requestDetails.getRequestInfo());
+        RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper();
+        requestDetailsWrapper.requestDetails = ConfigUpdateRequest;
+        return requestDetailsWrapper;
+    }
+
+
+   @Override
+    public MsoResponseWrapperInterface updateVnfSoftware(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
+        String methodName = "updateVnfSoftware";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        //String vnf_endpoint = getChangeManagementEndpoint(serviceInstanceId, vnfInstanceId, MsoChangeManagementRequest.SOFTWARE_UPDATE); //workflow name in mso is different than workflow name in vid UI
+        String vnf_endpoint = "";
+
+        RequestDetailsWrapper finalRequestDetails = generateInPlaceMsoRequest(requestDetails);
+        return msoClientInterface.changeManagementUpdate(finalRequestDetails, vnf_endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapperInterface updateVnfConfig(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
+        String methodName = "updateVnfConfig";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        RequestDetailsWrapper finalRequestDetails = generateConfigMsoRequest(requestDetails);
+        //String vnf_endpoint = getChangeManagementEndpoint(serviceInstanceId, vnfInstanceId, MsoChangeManagementRequest.CONFIG_UPDATE);
+        String vnf_endpoint = "";
+
+
+        return msoClientInterface.changeManagementUpdate(finalRequestDetails, vnf_endpoint);
+    }
+
+    private String getChangeManagementEndpoint(String serviceInstanceId, String vnfInstanceId, String vnfRequestType) {
+        String endpoint  = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE);
+        String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        vnf_endpoint = vnf_endpoint.replace(VNF_INSTANCE_ID, vnfInstanceId);
+        vnf_endpoint = vnf_endpoint.replace(REQUEST_TYPE, vnfRequestType);
+        return vnf_endpoint;
+    }
+
+    private Map getChangeManagementPayload(RequestDetails requestDetails, String message){
+        if(requestDetails.getRequestParameters()==null||requestDetails.getRequestParameters().getAdditionalProperties()==null){
+            throw new BadRequestException(message);
+        }
+        Object payloadRaw=requestDetails.getRequestParameters().getAdditionalProperties().get("payload");
+        try{
+            return objectMapper.readValue((String)payloadRaw,Map.class);
+        }
+        catch(Exception exception){
+            throw new BadRequestException(message);
+        }
+    }
+
+    private void validateUpdateVnfSoftwarePayload(RequestDetails requestDetails) {
+        //final String noValidPayloadMsg = "No valid payload in " + ChangeManagementRequest.VNF_IN_PLACE_SOFTWARE_UPDATE + " request";
+        final String noValidPayloadMsg = "";
+
+        Map payload = getChangeManagementPayload(requestDetails, noValidPayloadMsg);
+        validateUpdateVnfSoftwarePayloadProperty(payload, noValidPayloadMsg, "existing_software_version", SOFTWARE_VERSION_PATTERN);
+        validateUpdateVnfSoftwarePayloadProperty(payload, noValidPayloadMsg, "new_software_version", SOFTWARE_VERSION_PATTERN);
+
+        //if "operations_timeout" is not integer, trying to read it as String that represent a number
+        if (!(payload.get("operations_timeout") instanceof Integer)) {
+            validateUpdateVnfSoftwarePayloadProperty(payload, noValidPayloadMsg, "operations_timeout", NUMBER_PATTERN);
+        }
+    }
+
+    private void validateUpdateVnfSoftwarePayloadProperty(Map payload, String noValidPayloadMsg, String propertyName, Pattern pattern) {
+        Object forValidation = payload.get(propertyName);
+        final String noValidPayloadPropertyMsg = noValidPayloadMsg + ", " + propertyName + " property is not valid";
+        if (!(forValidation instanceof String)) {
+            throw new BadRequestException(noValidPayloadPropertyMsg);
+        }
+        if (!pattern.matcher((String) forValidation).matches()) {
+            throw new BadRequestException(noValidPayloadPropertyMsg);
+        }
+    }
+
+    private void validateUpdateVnfConfig(RequestDetails requestDetails) {
+        //final String noValidPayloadMsg = "No valid payload in " + ChangeManagementRequest.CONFIG_UPDATE + " request";
+        final String noValidPayloadMsg = "";
+
+        Map payload = getChangeManagementPayload(requestDetails, noValidPayloadMsg);
+        validateConfigUpdateVnfPayloadProperty(payload, noValidPayloadMsg, "request-parameters");
+        validateConfigUpdateVnfPayloadProperty(payload, noValidPayloadMsg, "configuration-parameters");
+    }
+
+    private void validateConfigUpdateVnfPayloadProperty(Map payload, String noValidPayloadMsg, String propertyName) {
+        final String noValidPayloadPropertyMsg = noValidPayloadMsg+ ", "+ propertyName + " property is not valid";
+        if(!payload.containsKey(propertyName)) {
+            throw new BadRequestException( noValidPayloadPropertyMsg);
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper deleteConfiguration(
+            org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper,
+            String serviceInstanceId,
+            String configurationId) {
+
+        String methodName = "deleteConfiguration";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATION_INSTANCE);
+        endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId);
+        endpoint = endpoint.replace(CONFIGURATION_ID, configurationId);
+
+        return msoClientInterface.deleteConfiguration(requestDetailsWrapper, endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper setConfigurationActiveStatus(
+            RequestDetails requestDetails,
+            String serviceInstanceId,
+            String configurationId,
+            boolean isActivate) {
+
+        String methodName = "setConfigurationActiveStatus";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATION_INSTANCE);
+        endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId);
+        endpoint = endpoint.replace(CONFIGURATION_ID, configurationId);
+
+        String isActivateState = (isActivate ? ACTIVATE : DEACTIVATE);
+        endpoint = endpoint + isActivateState;
+
+        return msoClientInterface.setConfigurationActiveStatus(requestDetails, endpoint);
+    }
+
+    @Override
+    public MsoResponseWrapper setServiceInstanceStatus(RequestDetails requestDetails , String serviceInstanceId, boolean isActivate) {
+        String methodName = "setServiceInstanceStatus";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        try {
+            String serviceEndpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+            String endpoint = serviceEndpoint + "/" + serviceInstanceId;
+
+            String isActivateState = (isActivate ? ACTIVATE : DEACTIVATE);
+            endpoint = endpoint + isActivateState;
+
+
+            RestObject<String> restObjStr = new RestObject<>();
+            String str = "";
+            restObjStr.set(str);
+
+            msoClientInterface.setServiceInstanceStatus(requestDetails , str, "", endpoint, restObjStr);
+
+            return MsoUtil.wrapResponse(restObjStr);
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper setPortOnConfigurationStatus(
+            RequestDetails requestDetails,
+            String serviceInstanceId,
+            String configurationId,
+            boolean isEnable) {
+        String methodName = "setPortOnConfigurationStatus";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_CONFIGURATION_INSTANCE);
+        endpoint = endpoint.replace(SVC_INSTANCE_ID, serviceInstanceId);
+        endpoint = endpoint.replace(CONFIGURATION_ID, configurationId);
+
+        String isEnablePortStatus = (isEnable ? ENABLE_PORT : DISABLE_PORT);
+        endpoint = endpoint + isEnablePortStatus;
+
+        return msoClientInterface.setPortOnConfigurationStatus(requestDetails, endpoint);
+    }
+
+
+   /* @Override
+    public  RequestDetailsWrapper<RequestDetails> createOperationalEnvironmentActivationRequestDetails(OperationalEnvironmentActivateInfo details) {
+        RequestDetails requestDetails = new RequestDetails();
+        RequestInfo requestInfo = new RequestInfo();
+        requestInfo.setAdditionalProperty(RESOURCE_TYPE, RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT);
+        requestInfo.setSource(SOURCE_OPERATIONAL_ENVIRONMENT);
+        requestInfo.setRequestorId(details.getUserId());
+        requestDetails.setRequestInfo(requestInfo);
+
+        org.onap.vid.domain.mso.RelatedInstance relatedInstance = new org.onap.vid.domain.mso.RelatedInstance();
+        relatedInstance.setAdditionalProperty(RESOURCE_TYPE, RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT);
+        relatedInstance.setInstanceId(details.getRelatedInstanceId());
+        relatedInstance.setInstanceName(details.getRelatedInstanceName());
+        requestDetails.setAdditionalProperty("relatedInstanceList", Collections.singletonList(ImmutableMap.of("relatedInstance", relatedInstance)));
+
+        org.onap.vid.domain.mso.RequestParameters requestParameters = new org.onap.vid.domain.mso.RequestParameters();
+        requestParameters.setUserParams(null);
+        requestParameters.setAdditionalProperty("operationalEnvironmentType", "VNF");
+        requestParameters.setAdditionalProperty("workloadContext", details.getWorkloadContext());
+        requestParameters.setAdditionalProperty("manifest", details.getManifest());
+        requestDetails.setRequestParameters(requestParameters);
+
+        RequestDetailsWrapper<RequestDetails> requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails);
+
+        debugRequestDetails(requestDetailsWrapper, logger);
+
+        return requestDetailsWrapper;
+    }*/
+
+   /* @Override
+    public RequestDetailsWrapper<RequestDetails> createOperationalEnvironmentDeactivationRequestDetails(OperationalEnvironmentDeactivateInfo details) {
+        RequestDetails requestDetails = new RequestDetails();
+
+        RequestInfo requestInfo = new RequestInfo();
+        requestInfo.setAdditionalProperty(RESOURCE_TYPE, RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT);
+        requestInfo.setSource(SOURCE_OPERATIONAL_ENVIRONMENT);
+        requestInfo.setRequestorId(details.getUserId());
+        requestDetails.setRequestInfo(requestInfo);
+
+        org.onap.vid.domain.mso.RequestParameters requestParameters = new org.onap.vid.domain.mso.RequestParameters();
+        requestParameters.setUserParams(null);
+        requestParameters.setAdditionalProperty("operationalEnvironmentType", "VNF");
+        requestDetails.setRequestParameters(requestParameters);
+        RequestDetailsWrapper<RequestDetails> requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails);
+        debugRequestDetails(requestDetailsWrapper, logger);
+        return requestDetailsWrapper;
+    }*/
+
+    @Override
+    public String getCloudResourcesRequestsStatusPath(String requestId) {
+        String path = validateEndpointPath(MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS);
+        path = path.replace("<request_id>", requestId);
+        return path;
+    }
+
+    /*@Override
+    public RequestDetailsWrapper<OperationEnvironmentRequestDetails> convertParametersToRequestDetails(OperationalEnvironmentController.OperationalEnvironmentCreateBody input, String userId) {
+        OperationEnvironmentRequestDetails.RequestInfo requestInfo = new OperationEnvironmentRequestDetails.RequestInfo(
+                RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT,
+                input.getInstanceName(),
+                SOURCE_OPERATIONAL_ENVIRONMENT,
+                userId);
+
+        OperationEnvironmentRequestDetails.RelatedInstance relatedInstance = new OperationEnvironmentRequestDetails.RelatedInstance(
+                RESOURCE_TYPE_OPERATIONAL_ENVIRONMENT,
+                input.getEcompInstanceId(),
+                input.getEcompInstanceName());
+
+        List<OperationEnvironmentRequestDetails.RelatedInstance> relatedInstanceList = Collections.singletonList((relatedInstance));
+
+        OperationEnvironmentRequestDetails.RequestParameters requestParameters = new OperationEnvironmentRequestDetails.RequestParameters(
+                input.getOperationalEnvironmentType(),
+                input.getTenantContext(),
+                input.getWorkloadContext());
+
+        OperationEnvironmentRequestDetails requestDetails = new OperationEnvironmentRequestDetails(requestInfo, relatedInstanceList, requestParameters);
+        RequestDetailsWrapper<OperationEnvironmentRequestDetails> requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails);
+        debugRequestDetails(requestDetailsWrapper, logger);
+        return requestDetailsWrapper;
+    }*/
+
+    @Override
+    public MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String serviceInstanceId) {
+        String methodName = "removeRelationshipFromServiceInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String serviceEndpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        String removeRelationshipsPath = serviceEndpoint + "/" + serviceInstanceId + "/removeRelationships";
+
+        return msoClientInterface.removeRelationshipFromServiceInstance(requestDetails, removeRelationshipsPath);
+    }
+
+    @Override
+    public MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String serviceInstanceId) {
+        String methodName = "addRelationshipToServiceInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        String serviceEndpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        String addRelationshipsPath = serviceEndpoint + "/" + serviceInstanceId + "/addRelationships";
+
+        return msoClientInterface.addRelationshipToServiceInstance(requestDetails, addRelationshipsPath);
+    }
+
+
+    public enum RequestType {
+
+        CREATE_INSTANCE("createInstance"),
+        DELETE_INSTANCE("deleteInstance"),
+        REPLACE_INSTANCE("replaceInstance"),
+        UPDATE_INSTANCE("updateInstance"),
+        ACTIVATE_INSTANCE("activateInstance"),
+        DEACTIVATE_INSTANCE("deactivateInstance"),
+        APPLY_UPDATED_CONFIG("applyUpdatedConfig"),
+        IN_PLACE_SOFTWARE_UPDATE("inPlaceSoftwareUpdate"),
+        UNKNOWN("unknown"),
+        NOT_PROVIDED("not provided");
+        private final String value;
+        private static final Map<String, RequestType> CONSTANTS = new HashMap<>();
+
+        static {
+            for (RequestType c: values()) {
+                CONSTANTS.put(c.value, c);
+            }
+        }
+
+        RequestType(String value) {
+            this.value = value;
+        }
+
+        @JsonValue
+        @Override
+        public String toString() {
+            return this.value;
+        }
+
+        @JsonCreator
+        public static RequestType fromValue(String value) {
+            RequestType constant = CONSTANTS.get(value);
+            if (constant == null) {
+                throw new IllegalArgumentException(value);
+            } else {
+                return constant;
+            }
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoInterface.java
new file mode 100644
index 0000000..3e78814
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoInterface.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import io.joshworks.restclient.http.HttpResponse;
+import io.joshworks.restclient.http.mapper.ObjectMapper;
+import lombok.SneakyThrows;
+import org.onap.osam.aai.util.CustomJacksonJaxBJsonProvider;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+
+public interface MsoInterface {
+
+    MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint);
+    
+    //For VoLTE E2E services
+    MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint);
+    MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String endpoint);
+
+    /**
+     * will create a virtual network function using MSO service.
+     * @param requestDetails - information about the vnf to create
+     * @return - the response body recived from MSO
+     * @throws Exception
+     */
+    MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint);
+    /**
+     *
+     * @param requestDetails
+     * @param path
+     * @return
+     * @throws Exception
+     */
+    MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String path);
+
+    /**
+     *
+     * @param requestDetails
+     * @return
+     * @throws Exception
+     */
+    MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper createConfigurationInstance(org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String endpoint);
+
+    MsoResponseWrapper scaleOutVFModuleInstance(RequestDetailsWrapper requestDetailsWrapper, String endpoint);
+
+    MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper unassignSvcInstance(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper getOrchestrationRequest(String endpoint);
+
+    MsoResponseWrapper getOrchestrationRequestsForDashboard(String t , String sourceId , String endpoint , RestObject restObject);
+
+    MsoResponseWrapper getManualTasksByRequestId(String t , String sourceId , String endpoint , RestObject restObject);
+
+    MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject);
+
+	//MsoResponseWrapper updateVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String vnf_endpoint);
+
+	//MsoResponseWrapper replaceVnf(org.onap.vid.changeManagement.RequestDetails requestDetails, String vnf_endpoint);
+
+    MsoResponseWrapper deleteConfiguration(org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String pmc_endpoint);
+
+    MsoResponseWrapper setConfigurationActiveStatus(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper setPortOnConfigurationStatus(RequestDetails requestDetails, String endpoint);
+
+    void setServiceInstanceStatus(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject<String> restObject);
+
+    MsoResponseWrapperInterface changeManagementUpdate(RequestDetailsWrapper requestDetails, String endpoint);
+
+    MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String endpoint);
+
+    MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String addRelationshipsPath);
+
+    <T> HttpResponse<T> get(String path, Class<T> responseClass);
+
+    <T> HttpResponse<T> post(String path, RequestDetailsWrapper requestDetailsWrapper,
+      Class<T> responseClass);
+
+    static ObjectMapper objectMapper() {
+      return new ObjectMapper() {
+        CustomJacksonJaxBJsonProvider mapper = new CustomJacksonJaxBJsonProvider();
+
+        @SneakyThrows
+        @Override
+        public <T> T readValue(String s, Class<T> aClass) {
+          return mapper.getMapper().readValue(s, aClass);
+        }
+
+        @SneakyThrows
+        @Override
+        public String writeValue(Object o) {
+          return mapper.getMapper().writeValueAsString(o);
+        }
+      };
+    }
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoProperties.java
new file mode 100644
index 0000000..674ac08
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoProperties.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+public class MsoProperties extends SystemProperties {
+
+	//VID Properties related to MSO
+	public static final String MSO_SERVER_URL = "mso.server.url";
+
+	/** The Constant MSO_DME2_SERVER_URL. */
+	public static final String MSO_DME2_SERVER_URL = "mso.dme2.server.url";
+
+	/** The Constant MSO_DME2_CLIENT_TIMEOUT. */
+	public static final String MSO_DME2_CLIENT_TIMEOUT = "mso.dme2.client.timeout";
+	
+	/** The Constant MSO_DME2_CLIENT_READ_TIMEOUT. */
+	public static final String MSO_DME2_CLIENT_READ_TIMEOUT = "mso.dme2.client.read.timeout";
+	
+	/** The Constant MSO_SERVER_URL_DEFAULT. */
+	public static final String MSO_SERVER_URL_DEFAULT= "";
+	
+	/** The Constant MSO_POLLING_INTERVAL_MSECS. */
+	// number of msecs to wait between polling requests
+	public static final String MSO_POLLING_INTERVAL_MSECS = "mso.polling.interval.msecs";
+
+	/** The Constant MSO_POLLING_INTERVAL_MSECS_DEFAULT. */
+	public static final String MSO_POLLING_INTERVAL_MSECS_DEFAULT = "60000";
+	
+	/** The Constant MSO_DME2_ENABLED. */
+	public static final String MSO_DME2_ENABLED = "mso.dme2.enabled";
+	
+	/** The Constant MSO_MAX_POLLS. */
+	public static final String MSO_MAX_POLLS = "mso.max.polls";
+	
+	/** The Constant MSO_MAX_POLLS_DEFAULT. */
+	public static final String MSO_MAX_POLLS_DEFAULT = "10"; //10
+	
+	/** The Constant MSO_USER_NAME. */
+	public static final String MSO_USER_NAME = "mso.user.name"; //m03346
+	
+	/** The Constant MSO_PASSWORD. */
+	public static final String MSO_PASSWORD = "mso.password.x";
+	
+	/** The Constant MSO_REST_API_SVC_INSTANCE. */
+    public static final String MSO_REST_API_E2E_SVC_INSTANCE = "mso.restapi.svc.e2einstance"; // /e2eServiceInstances/v3
+	
+	/** The Constant MSO_REST_API_SVC_INSTANCE. */
+	public static final String MSO_REST_API_SVC_INSTANCE = "mso.restapi.svc.instance"; // /serviceInstances/v2
+
+	/** The Constant MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE. */
+	public static final String MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE = "mso.restapi.svc.instance.deleteAndUnassign";
+
+	/** The Constant MSO_REST_API_VNF_INSTANCE. */
+	public static final String MSO_REST_API_VNF_INSTANCE = "mso.restapi.vnf.instance"; // /serviceInstances/v2/{service_instance_id}/vnfs
+	
+	/** The Constant MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE. */
+	public static final String MSO_REST_API_VNF_CHANGE_MANAGEMENT_INSTANCE = "mso.restapi.vnf.changemanagement.instance"; // /serviceInstances/v2/{service_instance_id}/vnfs/{request_type}
+	
+	/** The Constant MSO_REST_API_NETWORK_INSTANCE. */
+	public static final String MSO_REST_API_NETWORK_INSTANCE = "mso.restapi.network.instance"; // /serviceInstances/v2/{serviceInstanceId}/networks
+	
+	/** The Constant MSO_REST_API_GET_ORC_REQ. */
+	public static final String MSO_REST_API_GET_ORC_REQ = "mso.restapi.get.orc.req";
+	
+	/** The Constant MSO_REST_API_GET_ORC_REQS. */
+	public static final String MSO_REST_API_GET_ORC_REQS = "mso.restapi.get.orc.reqs";
+
+	/** The Constant MSO_REST_API_GET_MAN_TASK. */
+	public static final String MSO_REST_API_GET_MAN_TASKS = "mso.restapi.get.man.tasks";
+
+	/** The Constant MSO_REST_API_VF_MODULE_INSTANCE. */
+	public static final String MSO_REST_API_VF_MODULE_INSTANCE = "mso.restapi.vf.module.instance";
+
+	public static final String MSO_REST_API_VF_MODULE_SCALE_OUT = "mso.restapi.vf.module.scaleout";
+
+	/** The Constant MSO_REST_API_VOLUME_GROUP_INSTANCE. */
+	public static final String MSO_REST_API_VOLUME_GROUP_INSTANCE = "mso.restapi.volume.group.instance"; //serviceInstances/v2/{serviceInstanceId}/volumeGroups
+
+	/** The Constant MSO_REST_API_CONFIGURATION_INSTANCE. */
+	public static final String MSO_REST_API_CONFIGURATIONS = "mso.restapi.configurations"; //serviceInstances/v5/{serviceInstanceId}/configurations
+	public static final String MSO_REST_API_CONFIGURATION_INSTANCE = "mso.restapi.configuration.instance"; //serviceInstances/v5/{serviceInstanceId}/configurations/{configurationId}
+
+	/** The Constant MSO_REST_API_OPERATIONAL_ENVIRONMENT */
+	public static final String MSO_REST_API_OPERATIONAL_ENVIRONMENT_ACTIVATE = "mso.restapi.operationalEnvironment.activate";
+	public static final String MSO_REST_API_OPERATIONAL_ENVIRONMENT_DEACTIVATE = "mso.restapi.operationalEnvironment.deactivate";
+
+	/** The Constant MSO_REST_API_OPERATIONAL_ENVIRONMENT_CREATE */
+	public static final String MSO_REST_API_OPERATIONAL_ENVIRONMENT_CREATE = "mso.restapi.operationalEnvironment.create";
+
+	/** The Constant MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS */
+	public static final String MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS = "mso.restapi.operationalEnvironment.cloudResourcesRequests.status";
+
+	/** The logger. */
+	public EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoProperties.class);
+	
+	/** The Constant dateFormat. */
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapper.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapper.java
new file mode 100644
index 0000000..1723c44
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapper.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+import javax.ws.rs.core.Response;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+	    "status",
+	    "entity"
+})
+
+public class MsoResponseWrapper implements MsoResponseWrapperInterface {
+
+
+    public MsoResponseWrapper() {
+    }
+
+    public MsoResponseWrapper(Response response) {
+        setEntity(response.readEntity(String.class));
+        setStatus(response.getStatus());
+    }
+
+
+	@JsonProperty("status")
+	private int status;
+	
+	/** The entity. */
+	@JsonProperty("entity")
+	private String entity;
+
+	/**
+	 * Gets the entity.
+	 *
+	 * @return the entity
+	 */
+	@Override
+	@JsonProperty("entity")
+    public String getEntity() {
+        return entity;
+    }
+
+	/**
+	 * Gets the status.
+	 *
+	 * @return the status
+	 */
+	@Override
+	@JsonProperty("status")
+    public int getStatus() {
+        return status;
+    }
+	
+	/**
+	 * Sets the status.
+	 *
+	 * @param v the new status
+	 */
+	@JsonProperty("status")
+    public void setStatus(int v) {
+        this.status = v;
+    }
+	
+	/**
+	 * Sets the entity.
+	 *
+	 * @param v the new entity
+	 */
+	@JsonProperty("entity")
+    public void setEntity(String v) {
+        this.entity = v;
+    }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+    
+    /**
+     * Gets the response.
+     *
+     * @return the response
+     */
+    @JsonIgnore
+    public String getResponse () {
+    	
+    	StringBuilder b = new StringBuilder ("{ \"status\": ");
+        b.append(getStatus()).append(", \"entity\": " );
+        if (this.getEntity() == null || this.getEntity().isEmpty()) {
+        	b.append("\"\"");
+		} else {
+			b.append(this.getEntity());
+		}
+        b.append("}");
+        return (b.toString());
+    }
+    
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapper2.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapper2.java
new file mode 100644
index 0000000..f23fd42
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapper2.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.joshworks.restclient.http.HttpResponse;
+
+@JsonPropertyOrder({
+	    "status",
+	    "entity"
+})
+
+public class MsoResponseWrapper2<T> implements MsoResponseWrapperInterface {
+
+    final static ObjectMapper objectMapper = new ObjectMapper();
+
+	private final int status;
+	private final T entity;
+    private final String raw;
+
+    public MsoResponseWrapper2(RestObject<T> msoResponse) {
+        this.status = msoResponse.getStatusCode();
+        this.entity = msoResponse.get();
+        this.raw = msoResponse.getRaw();
+    }
+
+  public MsoResponseWrapper2(HttpResponse<T> msoResponse) {
+    this.status = msoResponse.getStatus();
+    this.entity = msoResponse.getBody();
+    this.raw = msoResponse.getBody().toString();
+  }
+
+    public MsoResponseWrapper2(
+            @JsonProperty(value = "status", required = true) int status,
+            @JsonProperty(value = "entity", required = true) T entity) {
+        this.status = status;
+        this.entity = entity;
+        this.raw = null;
+    }
+
+    public int getStatus() {
+		return status;
+	}
+
+    @Override
+    @JsonIgnore
+    public String getResponse() {
+        try {
+            return objectMapper.writeValueAsString(this);
+        } catch (JsonProcessingException e) {
+            return getEntity() != null ? getEntity().toString() : null;
+        }
+    }
+
+    @JsonProperty
+	public Object getEntity() {
+		return entity != null ? entity : raw;
+	}
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapperInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapperInterface.java
new file mode 100644
index 0000000..e0b542b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoResponseWrapperInterface.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public interface MsoResponseWrapperInterface {
+    @JsonProperty("entity")
+    Object getEntity();
+
+    @JsonProperty("status")
+    int getStatus();
+
+    @JsonIgnore
+    String getResponse();
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoUtil.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoUtil.java
new file mode 100644
index 0000000..d4ec72e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/MsoUtil.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.joshworks.restclient.http.HttpResponse;
+import org.apache.commons.lang3.ObjectUtils;
+import org.glassfish.jersey.client.ClientResponse;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+import static org.onap.osam.utils.Logging.getMethodName;
+
+public class MsoUtil {
+	
+	private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoUtil.class);
+	
+	/** The Constant dateFormat. */
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+	
+	/**
+	 * Wrap response.
+	 *
+	 * @param body the body
+	 * @param statusCode the status code
+	 * @return the mso response wrapper
+	 */
+	public static MsoResponseWrapper wrapResponse ( String body, int statusCode ) {
+		
+		MsoResponseWrapper w = new MsoResponseWrapper();
+		w.setStatus (statusCode);
+		w.setEntity(body);
+		
+		return w;
+	}
+
+	/**
+	 * Wrap response.
+	 *
+	 * @param cres the cres
+	 * @return the mso response wrapper
+	 */
+	public static MsoResponseWrapper wrapResponse (ClientResponse cres) {	
+		String resp_str = "";
+		if ( cres != null ) {
+			resp_str = cres.readEntity(String.class);
+		}
+		int statuscode = cres.getStatus();
+		MsoResponseWrapper w = MsoUtil.wrapResponse ( resp_str, statuscode );
+		return (w);
+	}
+	
+	/**
+	 * Wrap response.
+	 *
+	 * @param rs the rs
+	 * @return the mso response wrapper
+	 */
+	public static MsoResponseWrapper wrapResponse (RestObject<String> rs) {
+		String resp_str = null;
+		int status = 0;
+		if ( rs != null ) {
+			resp_str = rs.get() != null ? rs.get() : rs.getRaw();
+			status = rs.getStatusCode();
+		}
+		MsoResponseWrapper w = MsoUtil.wrapResponse ( resp_str, status );
+		return (w);
+	}
+
+	public static <T> MsoResponseWrapper wrapResponse (HttpResponse<T> rs) {
+		MsoResponseWrapper w = new MsoResponseWrapper();
+		w.setStatus (rs.getStatus());
+		if(rs.getRawBody() != null) {
+			w.setEntity(ObjectUtils.toString(rs.getBody()));
+		}
+		return w;
+	}
+
+	/**
+	 * Convert pojo to string.
+	 *
+	 * @param <T> the generic type
+	 * @param t the t
+	 * @return the string
+	 * @throws JsonProcessingException the json processing exception
+	 */
+	public static <T> String convertPojoToString ( T t ) {
+		
+		String methodName = "convertPojoToString";
+		ObjectMapper mapper = new ObjectMapper();
+		String r_json_str = "";
+	    if ( t != null ) {
+		    try {
+		    	r_json_str = mapper.writeValueAsString(t);
+		    }
+		    catch ( com.fasterxml.jackson.core.JsonProcessingException j ) {
+		    	logger.debug(EELFLoggerDelegate.debugLogger,getMethodName() + " Unable to parse object of type " + t.getClass().getName() + " as json", j);
+		    }
+	    }
+	    return (r_json_str);
+	}
+	
+	/**
+	 * The main method.
+	 *
+	 * @param args the arguments
+	 */
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub
+
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/RestMsoImplementation.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/RestMsoImplementation.java
new file mode 100644
index 0000000..be9ff9b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/RestMsoImplementation.java
@@ -0,0 +1,406 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.codec.binary.Base64;
+import org.eclipse.jetty.util.security.Password;
+import org.onap.osam.aai.util.HttpClientMode;
+import org.onap.osam.aai.util.HttpsAuthClient;
+import org.onap.osam.client.HttpBasicClient;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.onap.osam.mso.rest.RestInterface;
+import org.onap.osam.utils.Logging;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.Response;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collections;
+import java.util.Date;
+import java.util.UUID;
+
+import static org.onap.osam.utils.Logging.*;
+
+public class RestMsoImplementation implements RestInterface {
+
+    public static final String START_LOG = " start";
+    public static final String APPLICATION_JSON = "application/json";
+    public static final String WITH_STATUS = " with status=";
+    public static final String URL_LOG = ", url=";
+    public static final String NO_RESPONSE_ENTITY_LOG = " No response entity, this is probably ok, e=";
+    public static final String WITH_URL_LOG = " with url=";
+    public static final String EXCEPTION_LOG = ", Exception: ";
+    public static final String REST_API_SUCCESSFULL_LOG = " REST api was successfull!";
+    public static final String REST_API_POST_WAS_SUCCESSFUL_LOG = " REST api POST was successful!";
+    EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RestMsoImplementation.class);
+    private final EELFLogger outgoingRequestsLogger = Logging.getRequestsLogger("mso");
+
+    /**
+     * The Constant dateFormat.
+     */
+    static final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+    /** The client. */
+    private Client client = null;
+
+    @Autowired
+    HttpsAuthClient httpsAuthClient;
+
+    /** The common headers. */
+    /**
+     * Instantiates a new mso rest interface.
+     */
+
+    @SuppressWarnings("Duplicates")
+    @Override
+    public MultivaluedHashMap<String, Object> initMsoClient()
+    {
+        final String methodname = "initRestClient()";
+
+        final String username = SystemProperties.getProperty(MsoProperties.MSO_USER_NAME);
+        final String password = SystemProperties.getProperty(MsoProperties.MSO_PASSWORD);
+        final String mso_url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL);
+        final String decrypted_password = Password.deobfuscate(password);
+
+        String authString = username + ":" + decrypted_password;
+
+        byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
+        String authStringEnc = new String(authEncBytes);
+
+        MultivaluedHashMap<String, Object> commonHeaders = new MultivaluedHashMap();
+        commonHeaders.put("Authorization",  Collections.singletonList(("Basic " + authStringEnc)));
+		//Pass calling application identifier to SO
+  		commonHeaders.put("X-FromAppId", Collections.singletonList(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME)));
+        try {
+            commonHeaders.put(REQUEST_ID_HEADER_KEY, Collections.singletonList(Logging.extractOrGenerateRequestId()));
+        }
+        catch (IllegalStateException e){
+            //in async jobs we don't have any HttpServletRequest
+            commonHeaders.put(REQUEST_ID_HEADER_KEY, Collections.singletonList(UUID.randomUUID().toString()));
+        }
+
+
+        boolean useSsl = true;
+        if ( (mso_url != null) && ( !(mso_url.isEmpty()) ) ) {
+            useSsl = mso_url.startsWith("https");
+        }
+        if (client == null) {
+
+            try {
+                if ( useSsl ) {
+                    client = httpsAuthClient.getClient(HttpClientMode.WITHOUT_KEYSTORE);
+                }
+                else {
+                    client = HttpBasicClient.getClient();
+                }
+            } catch (Exception e) {
+                logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) +  methodname + " Unable to get the SSL client");
+            }
+        }
+
+        return commonHeaders;
+    }
+
+    public <T> void  Get (T t, String sourceId, String path, RestObject<T> restObject ) {
+        String methodName = "Get";
+
+        logger.debug(EELFLoggerDelegate.debugLogger, methodName + START_LOG);
+
+        String url="";
+        restObject.set(t);
+
+        url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path;
+
+        MultivaluedHashMap<String, Object> commonHeaders = initMsoClient();
+        Logging.logRequest(outgoingRequestsLogger, HttpMethod.GET, url);
+        final Response cres = client.target(url)
+                .request()
+                .accept(APPLICATION_JSON)
+                .headers(commonHeaders)
+                .get();
+        Logging.logResponse(outgoingRequestsLogger, HttpMethod.GET, url, cres);
+        int status = cres.getStatus();
+        restObject.setStatusCode (status);
+
+        if (status == 200 || status == 202) {
+            t = (T) cres.readEntity(t.getClass());
+            restObject.set(t);
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + REST_API_SUCCESSFULL_LOG);
+
+        } else {
+            throw new GenericUncheckedException(methodName + WITH_STATUS + status + ", url= " + url );
+        }
+
+        logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status );
+
+        return;
+    }
+
+    public <T> RestObject<T> GetForObject(String sourceID, String path, Class<T> clazz) {
+        final String methodName = getMethodName();
+        logger.debug(EELFLoggerDelegate.debugLogger, "start {}->{}({}, {}, {})", getMethodCallerName(), methodName, sourceID, path, clazz);
+
+        String url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path;
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " +  methodName + " sending request to url= " + url);
+
+        MultivaluedHashMap<String, Object> commonHeaders = initMsoClient();
+        Logging.logRequest(outgoingRequestsLogger, HttpMethod.GET, url);
+        final Response cres = client.target(url)
+                .request()
+                .accept(APPLICATION_JSON)
+                .headers(commonHeaders)
+                .get();
+        Logging.logResponse(outgoingRequestsLogger, HttpMethod.GET, url, cres);
+        final RestObject<T> restObject = cresToRestObject(cres, clazz);
+        int status = cres.getStatus();
+
+        if (status == 200 || status == 202) {
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + REST_API_SUCCESSFULL_LOG);
+        } else {
+            logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + WITH_STATUS +status+ URL_LOG +url);
+        }
+
+        logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status );
+
+        return restObject;
+    }
+
+    @Override
+    public <T> void Delete(T t, Object r, String sourceID, String path, RestObject<T> restObject) {
+
+        String methodName = "Delete";
+        String url="";
+        Response cres = null;
+
+        logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " +  methodName + START_LOG);
+
+        try {
+            MultivaluedHashMap<String, Object> commonHeaders = initMsoClient();
+
+            url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path;
+            Logging.logRequest(outgoingRequestsLogger, HttpMethod.DELETE, url, r);
+            cres = client.target(url)
+                    .request()
+
+                    .accept(APPLICATION_JSON)
+                    .headers(commonHeaders)
+                    //.entity(r)
+                    .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke();
+            Logging.logResponse(outgoingRequestsLogger, HttpMethod.DELETE, url, cres);
+            int status = cres.getStatus();
+            restObject.setStatusCode (status);
+
+            if (status == 404) { // resource not found
+                String msg = "Resource does not exist...: " + cres.getStatus();
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+            } else if (status == 200  || status == 204){
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted");
+            } else if (status == 202) {
+                String msg = "Delete in progress: " + status;
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+            }
+            else {
+                String msg = "Deleting Resource failed: " + status;
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+            }
+
+            try {
+                t = (T) cres.readEntity(t.getClass());
+                restObject.set(t);
+            }
+            catch ( Exception e ) {
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + NO_RESPONSE_ENTITY_LOG
+                        + e.getMessage());
+            }
+
+        }
+        catch (Exception e)
+        {
+            logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + WITH_URL_LOG +url+ EXCEPTION_LOG + e.toString());
+            throw e;
+
+        }
+    }
+
+    public <T> RestObject<T> PostForObject(Object requestDetails, String sourceID, String path, Class<T> clazz) {
+        logger.debug(EELFLoggerDelegate.debugLogger, "start {}->{}({}, {}, {}, {})", getMethodCallerName(), getMethodName(), requestDetails, sourceID, path, clazz);
+        RestObject<T> restObject = new RestObject<>();
+        Post(clazz, requestDetails, path, restObject);
+        return restObject;
+    }
+
+    @Override
+    public <T> void Post(T t, Object r, String sourceID, String path, RestObject<T> restObject) {
+        logger.debug(EELFLoggerDelegate.debugLogger, "start {}->{}({}, {}, {}, {})", getMethodCallerName(), getMethodName(), t.getClass(), r, sourceID, path);
+        Post(t.getClass(), r, path, restObject);
+    }
+
+    public Invocation.Builder prepareClient(String path, String methodName) {
+        MultivaluedHashMap<String, Object> commonHeaders = initMsoClient();
+
+        String url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path;
+        logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " +  methodName + " sending request to url= " + url);
+        // Change the content length
+        return client.target(url)
+                .request()
+                .accept(APPLICATION_JSON)
+                .headers(commonHeaders);
+    }
+
+
+
+    public <T> void Post(Class<?> tClass, Object requestDetails, String path, RestObject<T> restObject)  {
+        String methodName = "Post";
+        String url="";
+
+        try {
+
+            MultivaluedHashMap<String, Object> commonHeaders = initMsoClient();
+
+            url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path;
+            Logging.logRequest(outgoingRequestsLogger, HttpMethod.POST, url, requestDetails);
+            // Change the content length
+            final Response cres = client.target(url)
+                    .request()
+                    .accept(APPLICATION_JSON)
+                    .headers(commonHeaders)
+                    .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON));
+            Logging.logResponse(outgoingRequestsLogger, HttpMethod.POST, url, cres);
+            final RestObject<T> cresToRestObject = cresToRestObject(cres, tClass);
+            restObject.set(cresToRestObject.get());
+            restObject.setStatusCode(cresToRestObject.getStatusCode());
+            restObject.setRaw(cresToRestObject.getRaw());
+
+            int status = cres.getStatus();
+            restObject.setStatusCode (status);
+
+            if ( status >= 200 && status <= 299 ) {
+                logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + REST_API_POST_WAS_SUCCESSFUL_LOG);
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + REST_API_POST_WAS_SUCCESSFUL_LOG);
+
+            } else {
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + WITH_STATUS +status+ URL_LOG +url);
+            }
+
+        } catch (Exception e)
+        {
+            logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + WITH_URL_LOG +url+ EXCEPTION_LOG + e.toString());
+            throw e;
+
+        }
+
+        logger.debug(EELFLoggerDelegate.debugLogger, "end {}() => ({}){}", getMethodName(), tClass, restObject);
+    }
+
+    private <T> RestObject<T> cresToRestObject(Response cres, Class<?> tClass) {
+        RestObject<T> restObject = new RestObject<>();
+
+        String rawEntity = null;
+        try {
+            cres.bufferEntity();
+            rawEntity = cres.readEntity(String.class);
+            restObject.setRaw(rawEntity);
+            T t = (T) new ObjectMapper().readValue(rawEntity, tClass);
+            restObject.set(t);
+        }
+        catch ( Exception e ) {
+            try {
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + " Error reading response entity as " + tClass + ": , e="
+                        + e.getMessage() + ", Entity=" + rawEntity);
+            } catch (Exception e2) {
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + NO_RESPONSE_ENTITY_LOG
+                        + e.getMessage());
+            }
+        }
+
+        int status = cres.getStatus();
+        restObject.setStatusCode (status);
+
+        return restObject;
+
+    }
+
+    @Override
+    public <T> void Put(T t, RequestDetailsWrapper r, String sourceID, String path, RestObject<T> restObject) {
+
+        String methodName = "Put";
+        String url="";
+
+        logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " +  methodName + START_LOG);
+
+        try {
+
+            MultivaluedHashMap<String, Object> commonHeaders = initMsoClient();
+
+            url = SystemProperties.getProperty(MsoProperties.MSO_SERVER_URL) + path;
+            Logging.logRequest(outgoingRequestsLogger, HttpMethod.PUT, url, r);
+            // Change the content length
+            final Response cres = client.target(url)
+                    .request()
+                    .accept(APPLICATION_JSON)
+                    .headers(commonHeaders)
+                    //.header("content-length", 201)
+                    //.header("X-FromAppId",  sourceID)
+                    .put(Entity.entity(r, MediaType.APPLICATION_JSON));
+
+            Logging.logResponse(outgoingRequestsLogger, HttpMethod.PUT, url, cres);
+
+            try {
+                t = (T) cres.readEntity(t.getClass());
+                restObject.set(t);
+            }
+            catch ( Exception e ) {
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + NO_RESPONSE_ENTITY_LOG
+                        + e.getMessage());
+            }
+
+            int status = cres.getStatus();
+            restObject.setStatusCode (status);
+
+            if ( status >= 200 && status <= 299 ) {
+                logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + methodName + REST_API_POST_WAS_SUCCESSFUL_LOG);
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + REST_API_POST_WAS_SUCCESSFUL_LOG);
+
+            } else {
+                logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + WITH_STATUS +status+ URL_LOG +url);
+            }
+
+        } catch (Exception e)
+        {
+            logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + WITH_URL_LOG +url+ EXCEPTION_LOG + e.toString());
+            throw e;
+
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/RestObject.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/RestObject.java
new file mode 100644
index 0000000..aa38226
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/RestObject.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.MoreObjects;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+import javax.ws.rs.core.Response;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import static org.onap.osam.utils.Logging.getMethodCallerName;
+
+public class RestObject<T> {
+
+    final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+    final static ObjectMapper objectMapper = new ObjectMapper();
+
+    // T stands for "Type"
+    private T t;
+    
+    // The string source of t, if available
+    private String rawT;
+
+    /** The status code. */
+    private int statusCode= 0;
+
+    public RestObject() {
+    }
+
+    public RestObject(Response cres, Class<?> tClass, EELFLoggerDelegate logger) {
+
+        String rawEntity = null;
+        try {
+            cres.bufferEntity();
+            rawEntity = cres.readEntity(String.class);
+            T t = (T) objectMapper.readValue(rawEntity, tClass);
+            this.set(t);
+        }
+        catch ( Exception e ) {
+            try {
+                this.setRaw(rawEntity);
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + " Error reading response entity as " + tClass + ": , e="
+                        + e.getMessage() + ", Entity=" + rawEntity);
+            } catch (Exception e2) {
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + getMethodCallerName() + " No response entity, this is probably ok, e="
+                        + e.getMessage());
+            }
+        }
+
+        int status = cres.getStatus();
+        this.setStatusCode (status);
+    }
+
+
+    /**
+     * Sets the.
+     *
+     * @param t the t
+     */
+    public void set(T t) { this.t = t; }
+    
+    /**
+     * Gets the.
+     *
+     * @return the t
+     */
+    public T get() { return t; }
+	
+    /**
+     * Sets the status code.
+     *
+     * @param v the new status code
+     */
+    public void setStatusCode(int v) { this.statusCode = v; }
+    
+    /**
+     * Gets the status code.
+     *
+     * @return the status code
+     */
+    public int getStatusCode() { return this.statusCode; }
+
+    public String getRaw() {
+        return rawT;
+    }
+
+    public void setRaw(String rawT) {
+        this.rawT = rawT;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("t", t)
+                .add("rawT", rawT)
+                .add("statusCode", statusCode)
+                .toString();
+    }
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/model/ServiceInstantiationRequestDetails.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/model/ServiceInstantiationRequestDetails.java
new file mode 100644
index 0000000..cd67cbd
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/model/ServiceInstantiationRequestDetails.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import org.onap.osam.domain.mso.CloudConfiguration;
+import org.onap.osam.domain.mso.ModelInfo;
+import org.onap.osam.domain.mso.SubscriberInfo;
+import org.onap.osam.model.serviceInstantiation.VfModule;
+
+import java.util.List;
+import java.util.Map;
+
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY;
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
+
+public class ServiceInstantiationRequestDetails {
+
+    @JsonProperty("modelInfo")
+    private ModelInfo modelInfo;
+
+    @JsonProperty("owningEntity")
+    private ServiceInstantiationOwningEntity owningEntity;
+
+    @JsonProperty("subscriberInfo")
+    private SubscriberInfo subscriberInfo;
+
+    @JsonProperty("project")
+    private Project project;
+
+    @JsonProperty("requestParameters")
+    private RequestParameters requestParameters;
+
+    @JsonProperty("requestInfo")
+    private RequestInfo requestInfo;
+
+    public ServiceInstantiationRequestDetails(@JsonProperty(value = "modelInfo", required = true) ModelInfo modelInfo,
+                                              @JsonProperty(value = "owningEntity", required = true) ServiceInstantiationOwningEntity owningEntity,
+                                              @JsonProperty(value = "subscriberInfo", required = true) SubscriberInfo subscriberInfo,
+                                              @JsonProperty(value = "project", required = true) Project project,
+                                              @JsonProperty(value = "requestInfo", required = true) RequestInfo requestInfo,
+                                              @JsonProperty(value = "requestParameters", required = true) RequestParameters requestParameters) {
+        this.modelInfo = modelInfo;
+        this.owningEntity = owningEntity;
+        this.subscriberInfo = subscriberInfo;
+        this.project = project;
+        this.requestInfo = requestInfo;
+        this.requestParameters = requestParameters;
+    }
+
+    public static class  ServiceInstantiationOwningEntity{
+        public final String owningEntityId;
+        public final String owningEntityName;
+
+        public ServiceInstantiationOwningEntity(String owningEntityId, String owningEntityName) {
+            this.owningEntityId = owningEntityId;
+            this.owningEntityName = owningEntityName;
+        }
+    }
+
+    public static class RequestInfo {
+
+        @JsonInclude(NON_NULL) public final String instanceName;
+        public final String productFamilyId;
+        public final String source;
+        public final boolean suppressRollback;
+        public final String requestorId;
+
+        public RequestInfo(String instanceName, String productFamilyId, String source, boolean rollbackOnFailure, String requestorId) {
+            this.instanceName = instanceName;
+            this.productFamilyId = productFamilyId;
+            this.source = source;
+            this.requestorId = requestorId;
+            // in the FE we are asking for "RollbackOnFailure" but to MSO we are passing the negative value "suppressRollback"
+            this.suppressRollback = !rollbackOnFailure;
+        }
+    }
+
+    public static class Project{
+        public final String projectName;
+
+        public Project(String projectName) {
+            this.projectName = projectName;
+        }
+    }
+
+    public static class RequestParameters {
+
+        public final String subscriptionServiceType;
+        public final boolean aLaCarte;
+        public final List<ServiceInstantiationService> userParams;
+
+        public RequestParameters(String subscriptionServiceType, boolean aLaCarte, List<ServiceInstantiationService> userParams) {
+            this.subscriptionServiceType = subscriptionServiceType;
+            this.aLaCarte = aLaCarte;
+            this.userParams = userParams;
+        }
+    }
+
+    @JsonTypeName("service")
+    @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
+    public static class ServiceInstantiationService{
+        public ModelInfo modelInfo = new ModelInfo();
+        @JsonInclude(NON_NULL) public String instanceName;
+        public List<Map<String,String>> instanceParams;
+        public ServiceInstantiationVnfList resources;
+
+        public ServiceInstantiationService (ModelInfo modelInfo, String instanceName, List<Map<String,String>> instanceParams, ServiceInstantiationVnfList vnfs){
+            this.modelInfo.setModelType(modelInfo.getModelType());
+            this.modelInfo.setModelName(modelInfo.getModelName());
+            this.modelInfo.setModelVersionId(modelInfo.getModelVersionId());
+            this.instanceName = instanceName;
+            this.instanceParams = instanceParams;
+            this.resources = vnfs;
+        }
+    }
+
+    public static class ServiceInstantiationVnfList{
+        public final List<ServiceInstantiationVnf> vnfs;
+
+        public ServiceInstantiationVnfList(List<ServiceInstantiationVnf> vnfList) {
+            this.vnfs = vnfList;
+        }
+    }
+
+    public static class ServiceInstantiationVnf{
+        public final ModelInfo modelInfo;
+        public final CloudConfiguration cloudConfiguration;
+        public final Platform platform;
+        public final LineOfBusiness lineOfBusiness;
+        public final String productFamilyId;
+        public final List<Map<String, String>>  instanceParams;
+        @JsonInclude(NON_EMPTY) public final List<VfModule> vfModules;
+        @JsonInclude(NON_NULL) public final String instanceName;
+
+        public ServiceInstantiationVnf(ModelInfo modelInfo, CloudConfiguration cloudConfiguration, String platform, String lineOfBusiness, String productFamilyId, List<Map<String, String>>  instanceParams, List<VfModule> vfModules, String instanceName) {
+            this.modelInfo = modelInfo;
+            this.cloudConfiguration = cloudConfiguration;
+            this.platform = new Platform(platform);
+            this.lineOfBusiness = new LineOfBusiness(lineOfBusiness);
+            this.productFamilyId = productFamilyId;
+            this.instanceParams = instanceParams;
+            this.vfModules = vfModules;
+            this.instanceName = instanceName;
+        }
+    }
+
+    public static class Platform{
+        public final String platformName;
+
+        public Platform(String platformName) {
+            this.platformName = platformName;
+        }
+    }
+
+    public static class LineOfBusiness{
+        public final String lineOfBusinessName;
+
+        public LineOfBusiness(String lineOfBusiness) {
+            this.lineOfBusinessName = lineOfBusiness;
+        }
+    }
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/AsyncRequestStatus.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/AsyncRequestStatus.java
new file mode 100644
index 0000000..722e7dc
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/AsyncRequestStatus.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import org.onap.osam.domain.mso.RequestStatus;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AsyncRequestStatus  {
+
+    public Request request;
+
+    public AsyncRequestStatus(Request request) {
+        this.request = request;
+    }
+
+    public AsyncRequestStatus() {
+
+    }
+
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class Request {
+
+        public Request(RequestStatus requestStatus) {
+            this.requestStatus = requestStatus;
+        }
+
+        public Request() {
+        }
+
+        public String requestId;
+
+        public InstanceReferences instanceReferences;
+
+        /**
+         * The request status.
+         */
+        public RequestStatus requestStatus;
+    }
+
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class InstanceReferences {
+
+        public String serviceInstanceId;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/MsoRestClientNew.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/MsoRestClientNew.java
new file mode 100644
index 0000000..3964f3e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/MsoRestClientNew.java
@@ -0,0 +1,515 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.google.common.collect.ImmutableMap;
+import io.joshworks.restclient.http.HttpResponse;
+import java.util.HashMap;
+import java.util.Map;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import org.apache.commons.codec.binary.Base64;
+import org.eclipse.jetty.util.security.Password;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.client.SyncRestClient;
+import org.onap.osam.model.RequestReferencesContainer;
+import org.onap.osam.mso.*;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import org.onap.osam.utils.Logging;
+
+
+public class MsoRestClientNew implements MsoInterface {
+
+    public static final String X_FROM_APP_ID = "X-FromAppId";
+    final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+    private static final String START = " start";
+    private final SyncRestClient client;
+    private final String baseUrl;
+    private final Map<String, String> commonHeaders;
+    /**
+     * The logger.
+     */
+    EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoRestClientNew.class);
+
+    public MsoRestClientNew(SyncRestClient client, String baseUrl) {
+        this.client = client;
+        this.baseUrl = baseUrl;
+        this.commonHeaders = initCommonHeaders();
+    }
+
+    @Override
+    public MsoResponseWrapper createSvcInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "createSvcInstance ";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return createInstance(requestDetails, path);
+    }
+    
+    @Override
+    public MsoResponseWrapper createE2eSvcInstance(Object requestDetails, String endpoint) {
+        String methodName = "createE2eSvcInstance ";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return createInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper createVnf(RequestDetails requestDetails, String endpoint) {
+
+        String methodName = "createVnf";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return createInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String endpoint) {
+
+        String methodName = "createNwInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return createInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "createVolumeGroupInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return createInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper createVfModuleInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "createVfModuleInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return createInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper scaleOutVFModuleInstance(RequestDetailsWrapper requestDetailsWrapper, String endpoint) {
+        String methodName = "scaleOutVFModuleInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+        return createInstance(requestDetailsWrapper, path);
+    }
+
+    @Override
+    public MsoResponseWrapper createConfigurationInstance(org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String endpoint) {
+        String methodName = "createConfigurationInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return createInstance(requestDetailsWrapper, path);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteE2eSvcInstance(Object requestDetails, String endpoint) {
+        String methodName = "deleteE2eSvcInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+        return deleteInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteSvcInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "deleteSvcInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+        return deleteInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper unassignSvcInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "unassignSvcInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        HttpResponse<String> response = client.post(endpoint, commonHeaders, requestDetails, String.class);
+        return MsoUtil.wrapResponse(response);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteVnf(RequestDetails requestDetails, String endpoint) {
+        String methodName = "deleteVnf";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return deleteInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteVfModule(RequestDetails requestDetails, String endpoint) {
+        String methodName = "deleteVfModule";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return deleteInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteVolumeGroupInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "deleteVolumeGroupInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return deleteInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper deleteNwInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "deleteNwInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        return deleteInstance(requestDetails, path);
+    }
+
+    @Override
+    public MsoResponseWrapper getOrchestrationRequest(String endpoint) {
+        String path = baseUrl + endpoint;
+
+        HttpResponse<String> response = client.get(path, commonHeaders, new HashMap<>(), String.class);
+        return MsoUtil.wrapResponse(response);
+    }
+
+    public MsoResponseWrapper getManualTasks(String endpoint) {
+        String path = baseUrl + endpoint;
+
+        HttpResponse<String> response = client.get(path, commonHeaders, new HashMap<>(), String.class);
+        return MsoUtil.wrapResponse(response);
+    }
+
+    public MsoResponseWrapper getOrchestrationRequestsForDashboard(String t, String sourceId, String path, RestObject restObject) {
+        String methodName = "getOrchestrationRequestsForDashboard";
+        logger.debug(dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            MsoResponseWrapper w = getOrchestrationRequest(path);
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse());
+
+            return w;
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    public MsoResponseWrapper getManualTasksByRequestId(String t, String sourceId, String endpoint, RestObject restObject) {
+        String methodName = "getManualTasksByRequestId";
+        logger.debug(dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            String path = baseUrl + endpoint;
+
+            MsoResponseWrapper w =getManualTasks(path);
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse());
+
+            return w;
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper completeManualTask(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject restObject) {
+        String methodName = "completeManualTask";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Complete ");
+        try {
+            String path = baseUrl + endpoint;
+
+            HttpResponse<String> response = client.post(path, commonHeaders, requestDetails, String.class);
+            MsoResponseWrapper w = MsoUtil.wrapResponse(response);
+
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse());
+            return w;
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+   /* @Override
+    public MsoResponseWrapper replaceVnf(RequestDetails requestDetails, String endpoint) {
+        String methodName = "replaceVnf";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+        return replaceInstance(requestDetails, path);
+    }*/
+
+    @Override
+    public MsoResponseWrapper deleteConfiguration(org.onap.osam.mso.rest.RequestDetailsWrapper requestDetailsWrapper, String pmc_endpoint) {
+        String methodName = "deleteConfiguration";
+        logger.debug(EELFLoggerDelegate.debugLogger,
+                dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + pmc_endpoint;
+
+        return deleteInstance(requestDetailsWrapper, path);
+    }
+
+    @Override
+    public MsoResponseWrapper setConfigurationActiveStatus(RequestDetails request, String endpoint) {
+        String methodName = "setConfigurationActiveStatus";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            String path = baseUrl + endpoint;
+
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== "
+                  + methodName + " calling change configuration active status, path =[" + path + "]");
+            HttpResponse<String> response = client.post(path, commonHeaders, request, String.class);
+            return MsoUtil.wrapResponse(response);
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper setPortOnConfigurationStatus(RequestDetails request, String endpoint) {
+        String methodName = "setPortOnConfigurationStatus";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            String path = baseUrl + endpoint;
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== "
+                + methodName + " calling change port configuration status, path =[" + path + "]");
+            HttpResponse<String> response = client.post(path, commonHeaders, request, String.class);
+            return MsoUtil.wrapResponse(response);
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapperInterface changeManagementUpdate(RequestDetailsWrapper requestDetails, String endpoint) {
+        String path = baseUrl + endpoint;
+        HttpResponse<RequestReferencesContainer> response = client.post(path, commonHeaders, requestDetails, RequestReferencesContainer.class);
+        return MsoUtil.wrapResponse(response);
+    }
+
+    public MsoResponseWrapper replaceInstance(RequestDetails request, String path) {
+        String methodName = "replaceInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Replace VNF, path =[" + path + "]");
+
+            HttpResponse<String> response = client.post(path, commonHeaders, request, String.class);
+            MsoResponseWrapper msoResponseWrapperObject = MsoUtil.wrapResponse(response);
+            int status = msoResponseWrapperObject.getStatus();
+            if (status == 202) {
+                logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +
+                        ",post succeeded, msoResponseWrapperObject response:" + msoResponseWrapperObject.getResponse());
+            } else {
+                logger.error(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName +
+                        ": post failed, msoResponseWrapperObject status" + status + ", response:" + msoResponseWrapperObject.getResponse());
+
+                // TODO
+            }
+            return msoResponseWrapperObject;
+
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+
+    }
+
+    /*@Override
+    public MsoResponseWrapper updateVnf(RequestDetails requestDetails, String endpoint) {
+        String methodName = "updateVnf";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+        String path = baseUrl + endpoint;
+
+        RequestDetailsWrapper wrapper = new RequestDetailsWrapper();
+        wrapper.requestDetails = new MsoRequestDetails(requestDetails);
+        return updateInstance(requestDetails, path);
+    }*/
+
+    public MsoResponseWrapper updateInstance(RequestDetails request, String path) {
+        String methodName = "updateInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Delete, path =[" + path + "]");
+
+            HttpResponse<String> response = client.post(path, commonHeaders, request, String.class);
+            MsoResponseWrapper w = MsoUtil.wrapResponse(response);
+
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse());
+            return w;
+
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+
+    }
+
+    public void setServiceInstanceStatus(RequestDetails requestDetails, String t, String sourceId, String endpoint, RestObject<String> restObject) {
+        String methodName = "activateServiceInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start ");
+        try {
+            String path = baseUrl + endpoint;
+            HttpResponse<String> response = client.post(path, commonHeaders, requestDetails, String.class);
+            MsoResponseWrapper w = MsoUtil.wrapResponse(response);
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w =" + w.getResponse());
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper removeRelationshipFromServiceInstance(RequestDetails requestDetails, String endpoint) {
+        String methodName = "removeRelationshipFromServiceInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Remove relationship from service instance, path =[" + endpoint + "]");
+            String path = baseUrl + endpoint;
+            HttpResponse<String> response = client.post(path, commonHeaders, requestDetails, String.class);
+            return MsoUtil.wrapResponse(response);
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public MsoResponseWrapper addRelationshipToServiceInstance(RequestDetails requestDetails, String addRelationshipsPath) {
+        String methodName = "addRelationshipToServiceInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Add relationship to service instance, path =[" + addRelationshipsPath + "]");
+            String path = baseUrl + addRelationshipsPath;
+
+            HttpResponse<String> response = client.post(path, commonHeaders, requestDetails, String.class);
+            return MsoUtil.wrapResponse(response);
+        } catch (Exception e) {
+            logger.info(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    @Override
+    public <T> HttpResponse<T> get(String path, Class<T> responseClass) {
+        return client.get(path, commonHeaders, new HashMap<>(), responseClass);
+    }
+
+    @Override
+    public <T> HttpResponse<T> post(String path, RequestDetailsWrapper requestDetailsWrapper,
+        Class<T> responseClass) {
+        return client.post(path, commonHeaders, requestDetailsWrapper, responseClass);
+    }
+
+
+    private MsoResponseWrapper createInstance(Object request, String endpoint) {
+        String methodName = "createInstance";
+        logger.debug(dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            HttpResponse<String> response = client.post(endpoint, commonHeaders, request, String.class);
+            return MsoUtil.wrapResponse(response);
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+    }
+
+    /**
+     * Delete instance.
+     *
+     * @param request the request
+     * @param path    the path
+     * @return the mso response wrapper
+     * @throws Exception the exception
+     */
+    private MsoResponseWrapper deleteInstance(Object request, String path) {
+        String methodName = "deleteInstance";
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + START);
+
+        try {
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " calling Delete, path =[" + path + "]");
+
+            HttpResponse<String> response = client.delete(path, commonHeaders, String.class);
+            MsoResponseWrapper w = MsoUtil.wrapResponse(response);
+
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " w=" + w.getResponse());
+            return w;
+
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + "." + methodName + e.toString());
+            throw e;
+        }
+
+    }
+
+    private Map<String, String> initCommonHeaders() {
+        String username = SystemProperties.getProperty(MsoProperties.MSO_USER_NAME);
+        String password = SystemProperties.getProperty(MsoProperties.MSO_PASSWORD);
+        String decrypted_password = Password.deobfuscate(password);
+
+        String authString = username + ":" + decrypted_password;
+
+        byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
+        String authStringEnc = new String(authEncBytes);
+
+        Map<String, String> map = new HashMap<>();
+        map.put(HttpHeaders.AUTHORIZATION,  "Basic " + authStringEnc);
+        map.put(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
+        map.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+        map.put(X_FROM_APP_ID, SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME));
+        map.put(SystemProperties.ECOMP_REQUEST_ID, Logging.extractOrGenerateRequestId());
+        return ImmutableMap.copyOf(map);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/OperationalEnvironment/OperationEnvironmentRequestDetails.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/OperationalEnvironment/OperationEnvironmentRequestDetails.java
new file mode 100644
index 0000000..0a26b3b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/OperationalEnvironment/OperationEnvironmentRequestDetails.java
@@ -0,0 +1,142 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest.OperationalEnvironment;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+import java.util.List;
+
+public class OperationEnvironmentRequestDetails {
+    private final RequestInfo requestInfo;
+    private final List<RelatedInstance> relatedInstanceList;
+    private final RequestParameters requestParameters;
+
+    public OperationEnvironmentRequestDetails(@JsonProperty(value = "requestInfo", required = true) RequestInfo requestInfo,
+                                              @JsonProperty(value = "relatedInstanceList", required = true) List<RelatedInstance> relatedInstanceList,
+                                              @JsonProperty(value = "requestParameters", required = true) RequestParameters requestParameters) {
+        this.requestInfo = requestInfo;
+        this.relatedInstanceList = relatedInstanceList;
+        this.requestParameters = requestParameters;
+    }
+
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    public List<RelatedInstance> getRelatedInstanceList() {
+        return relatedInstanceList;
+    }
+
+    public RequestParameters getRequestParameters() {
+        return requestParameters;
+    }
+
+    public static class RequestInfo {
+        private final String resourceType;
+        private final String instanceName;
+        private final String source;
+        private final String requestorId;
+
+        public RequestInfo(@JsonProperty(value = "resourceType", required = true) String resourceType,
+                           @JsonProperty(value = "instanceName", required = true) String instanceName,
+                           @JsonProperty(value = "source", required = true) String source,
+                           @JsonProperty(value = "requestorId", required = true) String requestorId) {
+            this.resourceType = resourceType;
+            this.instanceName = instanceName;
+            this.source = source;
+            this.requestorId = requestorId;
+        }
+
+        public String getResourceType() {
+            return resourceType;
+        }
+
+        public String getInstanceName() {
+            return instanceName;
+        }
+
+        public String getSource() {
+            return source;
+        }
+
+        public String getRequestorId() {
+            return requestorId;
+        }
+    }
+
+    public static class RequestParameters {
+        private final String operationalEnvironmentType;
+        private final String tenantContext;
+        private final String workloadContext;
+
+        public RequestParameters(@JsonProperty(value = "operationalEnvironmentType", required = true) String operationalEnvironmentType,
+                                 @JsonProperty(value = "tenantContext", required = true) String tenantContext,
+                                 @JsonProperty(value = "workloadContext", required = true) String workloadContext) {
+            this.operationalEnvironmentType = operationalEnvironmentType;
+            this.tenantContext = tenantContext;
+            this.workloadContext = workloadContext;
+        }
+        public String getOperationalEnvironmentType() {
+            return operationalEnvironmentType;
+        }
+
+        public String getTenantContext() {
+            return tenantContext;
+        }
+
+        public String getWorkloadContext() {
+            return workloadContext;
+        }
+    }
+
+    @JsonTypeName("relatedInstance")
+    @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
+    public static class RelatedInstance {
+        private final String resourceType;
+        private final String instanceId;
+        private final String instanceName;
+
+        public String getResourceType() {
+            return resourceType;
+        }
+
+        public String getInstanceId() {
+            return instanceId;
+        }
+
+        public String getInstanceName() {
+            return instanceName;
+        }
+
+        public RelatedInstance(@JsonProperty(value = "instanceName", required = true) String resourceType,
+                               @JsonProperty(value = "instanceId", required = true) String instanceId,
+                               @JsonProperty(value = "instanceName", required = true) String instanceName) {
+            this.resourceType = resourceType;
+            this.instanceId = instanceId;
+            this.instanceName = instanceName;
+        }
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedInstance.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedInstance.java
new file mode 100644
index 0000000..4bcacc9
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedInstance.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+    "instanceName",
+    "instanceId",
+    "modelInfo"
+})
+public class RelatedInstance extends org.onap.osam.domain.mso.RelatedInstance{
+
+
+    @JsonProperty("modelInfo")
+    private org.onap.osam.domain.mso.ModelInfo modelInfo;
+    
+    /** The additional properties. */
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    /**
+     * (Required).
+     *
+     * @return     The modelInfo
+     */
+    @JsonProperty("modelInfo")
+    public org.onap.osam.domain.mso.ModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    /**
+     * (Required).
+     *
+     * @param modelInfo     The modelInfo
+     */
+    @JsonProperty("modelInfo")
+    public void setModelInfo(org.onap.osam.domain.mso.ModelInfo modelInfo) {
+        this.modelInfo = modelInfo;
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedInstance#toString()
+     */
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedInstance#getAdditionalProperties()
+     */
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedInstance#setAdditionalProperty(java.lang.String, java.lang.Object)
+     */
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedInstance#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder().append(getInstanceName()).append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode();
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedInstance#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if ((other instanceof RelatedInstance) == false) {
+            return false;
+        }
+        RelatedInstance rhs = ((RelatedInstance) other);
+        return new EqualsBuilder().append(getInstanceName(), rhs.getInstanceName()).append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.getModelInfo()).append(additionalProperties, rhs.additionalProperties).isEquals();
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedInstanceWrapper.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedInstanceWrapper.java
new file mode 100644
index 0000000..d32b8a5
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedInstanceWrapper.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+public class RelatedInstanceWrapper {
+    public RelatedInstance relatedInstance;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedModel.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedModel.java
new file mode 100644
index 0000000..4a400bb
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RelatedModel.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.HashMap;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "instanceId",
+    "modelInfo"
+})
+public class RelatedModel extends org.onap.osam.domain.mso.RelatedModel {
+    
+    @JsonProperty("modelInfo")
+    private org.onap.osam.domain.mso.ModelInfo modelInfo;
+
+//    /** The related model object instance list. */
+//    @JsonProperty("instanceId")
+//    private org.onap.vid.domain.mso.InstanceIds instanceId;
+    
+    /** The additional properties. */
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    /**
+     * (Required).
+     *
+     * @return     The modelInfo
+     */
+    @JsonProperty("modelInfo")
+    public org.onap.osam.domain.mso.ModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    /**
+     * (Required).
+     *
+     * @param modelInfo     The modelInfo
+     */
+    @JsonProperty("modelInfo")
+    public void setModelInfo(org.onap.osam.domain.mso.ModelInfo modelInfo) {
+        this.modelInfo = modelInfo;
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedModel#toString()
+     */
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedModel#getAdditionalProperties()
+     */
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedModel#setAdditionalProperty(java.lang.String, java.lang.Object)
+     */
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedModel#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder().append(getInstanceId()).append(modelInfo).append(additionalProperties).toHashCode();
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RelatedModel#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if ((other instanceof RelatedModel) == false) {
+            return false;
+        }
+        RelatedModel rhs = ((RelatedModel) other);
+        return new EqualsBuilder().append(getInstanceId(), rhs.getInstanceId()).append(modelInfo, rhs.modelInfo).append(additionalProperties, rhs.additionalProperties).isEquals();
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Request.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Request.java
new file mode 100644
index 0000000..831f0c5
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Request.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+//import java.util.HashMap;
+//import java.util.Map;
+//import javax.annotation.Generated;
+
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.onap.osam.domain.mso.InstanceIds;
+import org.onap.osam.domain.mso.RequestStatus;
+//import com.fasterxml.jackson.annotation.JsonAnyGetter;
+//import com.fasterxml.jackson.annotation.JsonAnySetter;
+//import com.fasterxml.jackson.annotation.JsonCreator;
+//import com.fasterxml.jackson.annotation.JsonIgnore;
+//import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+//import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+//import com.fasterxml.jackson.annotation.JsonValue;
+import org.apache.commons.lang.builder.EqualsBuilder;
+//import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+public class Request extends org.onap.osam.domain.mso.Request {
+
+ 
+    private InstanceIds instanceIds;
+    
+    /** The request details. */
+    private RequestDetails requestDetails;
+    
+    /** The request status. */
+    private RequestStatus requestStatus;
+ 
+    
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.Request#getInstanceIds()
+     */
+    @JsonProperty("instanceIds")
+    public InstanceIds getInstanceIds() {
+        return instanceIds;
+    }
+
+    /**
+     * Sets the instance ids.
+     *
+     * @param instanceIds     The instanceIds
+     */
+    @JsonProperty("instanceIds")
+    public void setInstanceIds(InstanceIds instanceIds) {
+        this.instanceIds = instanceIds;
+    }
+
+    /**
+     * (Required).
+     *
+     * @return     The requestDetails
+     */
+    @JsonProperty("requestDetails")
+    public RequestDetails getRequestDetails() {
+        return requestDetails;
+    }
+
+    /**
+     * (Required).
+     *
+     * @param requestDetails     The requestDetails
+     */
+    @JsonProperty("requestDetails")
+    public void setRequestDetails(RequestDetails requestDetails) {
+        this.requestDetails = requestDetails;
+    }
+
+    
+    /**
+     * Gets the request status.
+     *
+     * @return     The requestStatus
+     */
+    @JsonProperty("requestStatus")
+    public RequestStatus getRequestStatus() {
+        return requestStatus;
+    }
+
+    /**
+     * Sets the request status.
+     *
+     * @param requestStatus     The requestStatus
+     */
+    @JsonProperty("requestStatus")
+    public void setRequestStatus(RequestStatus requestStatus) {
+        this.requestStatus = requestStatus;
+    }
+
+  
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.Request#toString()
+     */
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.Request#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if ((other instanceof Request) == false) {
+            return false;
+        }
+        Request rhs = ((Request) other);
+        return new EqualsBuilder().append(getFinishTime(), rhs.getFinishTime()).append(getInstanceIds(), rhs.getInstanceIds()).append(getRequestDetails(), rhs.getRequestDetails()).append(getRequestId(), rhs.getRequestId()).append(getRequestScope(), rhs.getRequestScope()).append(getRequestStatus(), rhs.getRequestStatus()).append(getRequestType(), rhs.getRequestType()).append(getStartTime(), rhs.getStartTime()).append(getAdditionalProperties(), rhs.getAdditionalProperties()).isEquals();
+    }
+
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder(17, 37).append(getFinishTime()).append(getInstanceIds()).append(getRequestDetails()).append(getRequestId()).append(getRequestScope()).append(getRequestStatus()).append(getRequestType()).append(getStartTime()).append(getAdditionalProperties()).toHashCode();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestDetails.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestDetails.java
new file mode 100644
index 0000000..35496cb
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestDetails.java
@@ -0,0 +1,270 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.onap.osam.domain.mso.CloudConfiguration;
+import org.onap.osam.domain.mso.ModelInfo;
+import org.onap.osam.domain.mso.RequestInfo;
+import org.onap.osam.domain.mso.RequestParameters;
+import org.onap.osam.domain.mso.SubscriberInfo;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+        "cloudConfiguration",
+        "modelInfo",
+        "relatedModelList",
+        "requestInfo",
+        "subscriberInfo",
+        "requestParameters",
+        "configurationParameters"
+})
+public class RequestDetails{
+
+
+
+    @JsonProperty("cloudConfiguration")
+    private CloudConfiguration cloudConfiguration;
+
+    /** The model info. */
+    @JsonProperty("modelInfo")
+    private ModelInfo modelInfo;
+
+    /** The related model list. */
+    @JsonProperty("relatedInstanceList")
+    private List<RelatedInstanceWrapper> relatedInstanceList;
+
+    /** The request info. */
+    @JsonProperty("requestInfo")
+    private RequestInfo requestInfo;
+
+    /** The subscriber info. */
+    @JsonProperty("subscriberInfo")
+    private SubscriberInfo subscriberInfo;
+
+    /** The request parameters. */
+    @JsonProperty("requestParameters")
+    private RequestParameters requestParameters;
+
+    @JsonProperty("configurationParameters")
+    protected List<Map<String, String>> configurationParameters;
+
+    /** The additional properties. */
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    /**
+     * Gets the cloud configuration.
+     *
+     * @return     The cloudConfiguration
+     */
+    @JsonProperty("cloudConfiguration")
+    public CloudConfiguration getCloudConfiguration() {
+        return cloudConfiguration;
+    }
+
+    /**
+     * Sets the cloud configuration.
+     *
+     * @param cloudConfiguration     The cloudConfiguration
+     */
+    @JsonProperty("cloudConfiguration")
+    public void setCloudConfiguration(CloudConfiguration cloudConfiguration) {
+        this.cloudConfiguration = cloudConfiguration;
+    }
+
+    /**
+     * Gets the model info.
+     *
+     * @return     The modelInfo
+     */
+    @JsonProperty("modelInfo")
+    public ModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    /**
+     * Sets the model info.
+     *
+     * @param modelInfo     The modelInfo
+     */
+    @JsonProperty("modelInfo")
+    public void setModelInfo(ModelInfo modelInfo) {
+        this.modelInfo = modelInfo;
+    }
+    /**
+     * Gets the related instance list.
+     *
+     * @return     The relatedInstanceList
+     */
+    @JsonProperty("relatedInstanceList")
+    public List<RelatedInstanceWrapper> getRelatedInstanceList() {
+        return relatedInstanceList;
+    }
+
+    /**
+     * Sets the related model list.
+     *
+     * @param relatedInstanceList     The relatedInstanceList
+     */
+    @JsonProperty("relatedInstanceList")
+    public void setRelatedInstanceList(List<RelatedInstanceWrapper> relatedInstanceList) {
+        this.relatedInstanceList = relatedInstanceList;
+    }
+
+    /**
+     * Gets the request info.
+     *
+     * @return     The requestInfo
+     */
+    @JsonProperty("requestInfo")
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    /**
+     * Sets the request info.
+     *
+     * @param requestInfo     The requestInfo
+     */
+    @JsonProperty("requestInfo")
+    public void setRequestInfo(RequestInfo requestInfo) {
+        this.requestInfo = requestInfo;
+    }
+
+    /**
+     * Gets the subscriber info.
+     *
+     * @return     The subscriberInfo
+     */
+    @JsonProperty("subscriberInfo")
+    public SubscriberInfo getSubscriberInfo() {
+        return subscriberInfo;
+    }
+
+    /**
+     * Sets the subscriber info.
+     *
+     * @param subscriberInfo     The subscriberInfo
+     */
+    @JsonProperty("subscriberInfo")
+    public void setSubscriberInfo(SubscriberInfo subscriberInfo) {
+        this.subscriberInfo = subscriberInfo;
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RequestDetails#toString()
+     */
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RequestDetails#getAdditionalProperties()
+     */
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RequestDetails#setAdditionalProperty(java.lang.String, java.lang.Object)
+     */
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    @JsonProperty("configurationParameters")
+    public List<Map<String, String>> getConfigurationParameters() {
+        return configurationParameters;
+    }
+
+    @JsonProperty("configurationParameters")
+    public void setConfigurationParameters(List<Map<String, String>> configurationParameters) {
+        this.configurationParameters = configurationParameters;
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RequestDetails#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder()
+                .append(cloudConfiguration)
+                .append(modelInfo)
+                .append(relatedInstanceList)
+                .append(requestInfo)
+                .append(getRequestParameters())
+                .append(subscriberInfo)
+                .append(additionalProperties)
+                .append(configurationParameters)
+                .toHashCode();
+    }
+
+    /* (non-Javadoc)
+     * @see org.onap.vid.domain.mso.RequestDetails#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if (!(other instanceof RequestDetails)) {
+            return false;
+        }
+        RequestDetails rhs = ((RequestDetails) other);
+        return new EqualsBuilder()
+                .append(cloudConfiguration, rhs.cloudConfiguration)
+                .append(modelInfo, rhs.modelInfo)
+                .append(relatedInstanceList, rhs.relatedInstanceList)
+                .append(requestInfo, rhs.requestInfo)
+                .append(getRequestParameters(), rhs.getRequestParameters())
+                .append(subscriberInfo, rhs.subscriberInfo)
+                .append(additionalProperties, rhs.additionalProperties)
+                .append(configurationParameters, rhs.configurationParameters)
+                .isEquals();
+    }
+
+    public RequestParameters getRequestParameters() {
+        return requestParameters;
+    }
+
+    public void setRequestParameters(RequestParameters requestParameters) {
+        this.requestParameters = requestParameters;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestDetailsWrapper.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestDetailsWrapper.java
new file mode 100644
index 0000000..d5a36a4
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestDetailsWrapper.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+public class RequestDetailsWrapper {
+    public RequestDetails requestDetails;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestList.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestList.java
new file mode 100644
index 0000000..79f7055
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestList.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+//import com.fasterxml.jackson.annotation.JsonInclude;
+//import com.fasterxml.jackson.annotation.JsonProperty;
+//import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import java.util.List;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+    "finishTime",
+    "instanceIds",
+    "requestDetails",
+    "requestId",
+    "requestScope",
+    "requestStatus",
+    "requestType",
+    "startTime"
+})
+
+public class RequestList {
+    
+    private List<RequestWrapper> requestList;
+    
+    /** The additional properties. */
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    /**
+     * (Required).
+     *
+     * @return     The RelatedModel List
+     */
+    public List<RequestWrapper> getRequestList() {
+        return requestList;
+    }
+
+    /**
+     * Sets the request list.
+     *
+     * @param l the new request list
+     */
+    public void setRequestList(List<RequestWrapper> l) {
+        this.requestList = l;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    /**
+     * Gets the additional properties.
+     *
+     * @return the additional properties
+     */
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    /**
+     * Sets the additional property.
+     *
+     * @param name the name
+     * @param value the value
+     */
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder().append(getRequestList()).append(additionalProperties).toHashCode();
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if ((other instanceof RequestList) == false) {
+            return false;
+        }
+        RequestList rhs = ((RequestList) other);
+        return new EqualsBuilder().append(getRequestList(), rhs.getRequestList()).append(additionalProperties, rhs.additionalProperties).isEquals();
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestParameters.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestParameters.java
new file mode 100644
index 0000000..4d1b402
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestParameters.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.onap.osam.domain.mso.UserParam;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "subscriptionServiceType",
+    "userParams"
+})
+public class RequestParameters {
+
+    @JsonProperty("subscriptionServiceType")
+    private String subscriptionServiceType;
+    @JsonProperty("userParams")
+    private List<UserParam> userParams = new ArrayList<UserParam>();
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+    @JsonProperty("subscriptionServiceType")
+    public String getSubscriptionServiceType() {
+        return subscriptionServiceType;
+    }
+
+    @JsonProperty("subscriptionServiceType")
+    public void setSubscriptionServiceType(String subscriptionServiceType) {
+        this.subscriptionServiceType = subscriptionServiceType;
+    }
+
+    /**
+     * 
+     * @return
+     *     The userParams
+     */
+    @JsonProperty("userParams")
+    public List<UserParam> getUserParams() {
+        return userParams;
+    }
+
+    /**
+     * 
+     * @param userParams
+     *     The userParams
+     */
+    @JsonProperty("userParams")
+    public void setUserParams(List<UserParam> userParams) {
+        this.userParams = userParams;
+    }
+
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder().append(subscriptionServiceType).append(userParams).append(additionalProperties).toHashCode();
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if ((other instanceof RequestParameters) == false) {
+            return false;
+        }
+        RequestParameters rhs = ((RequestParameters) other);
+        return new EqualsBuilder().append(subscriptionServiceType, rhs.subscriptionServiceType).append(userParams, rhs.userParams).append(additionalProperties, rhs.additionalProperties).isEquals();
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestWrapper.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestWrapper.java
new file mode 100644
index 0000000..d8e9eaa
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RequestWrapper.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class RequestWrapper {
+
+
+    private Request request;
+
+
+    /**
+     * Gets the request.
+     *
+     * @return     The requestDetails
+     */
+    @JsonProperty("request")
+    public Request getRequest() {
+        return request;
+    }
+
+    /**
+     * Sets the request.
+     *
+     * @param request     The request
+     */
+    @JsonProperty
+    public void setRequest(Request request) {
+        this.request = request;
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Response.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Response.java
new file mode 100644
index 0000000..ba20228
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Response.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Response {
+
+    private int status;
+
+    private RequestList entity;
+
+    /**
+     * Gets the status.
+     *
+     * @return     The status
+     */
+    @JsonProperty("status")
+    public int getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the status.
+     *
+     * @param status     The status
+     */
+    @JsonProperty("status")
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    /**
+     * Gets the entity.
+     *
+     * @return     The entity
+     */
+    @JsonProperty("entity")
+    public RequestList getEntity() {
+        return entity;
+    }
+
+    /**
+     * Sets the entity.
+     *
+     * @param entity     The entity
+     */
+    @JsonProperty("entity")
+    public void setEntity(RequestList entity) {
+        this.entity = entity;
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RestInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RestInterface.java
new file mode 100644
index 0000000..c3fe880
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/RestInterface.java
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import org.onap.osam.mso.RestObject;
+
+import javax.ws.rs.core.MultivaluedHashMap;
+
+public interface RestInterface {
+
+    MultivaluedHashMap<String, Object> initMsoClient();
+
+    /**
+     * Gets the.
+     *
+     * @param <T> the generic type
+     * @param t the t
+     * @param sourceId the source id
+     * @param path the path
+     * @param restObject the rest object
+     * @throws Exception the exception
+     */
+    <T> void Get (T t, String sourceId, String path, RestObject<T> restObject );
+
+    /**
+     * Delete.
+     *
+     * @param <T> the generic type
+     * @param t the t
+     * @param r the r
+     * @param sourceID the source ID
+     * @param path the path
+     * @param restObject the rest object
+     * @throws Exception the exception
+     */
+    <T> void Delete(T t, Object r, String sourceID, String path, RestObject<T> restObject);
+
+    /**
+     * Post.
+     *
+     * @param <T> the generic type
+     * @param t the t
+     * @param r the r
+     * @param sourceID the source ID
+     * @param path the path
+     * @param restObject the rest object
+     * @throws Exception the exception
+     */
+    <T> void Post(T t, Object r, String sourceID, String path, RestObject<T> restObject);
+
+    /**
+     * Put.
+     *
+     * @param <T> the generic type
+     * @param t the t
+     * @param r the r
+     * @param sourceID the source ID
+     * @param path the path
+     * @param restObject the rest object
+     * @throws Exception the exception
+     */
+    <T> void Put(T t, RequestDetailsWrapper r, String sourceID, String path, RestObject<T> restObject);
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Task.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Task.java
new file mode 100644
index 0000000..1848b08
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/Task.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.List;
+
+public class Task {
+
+    private String taskId;
+    private String type;
+    private String nfRole;
+    private String subscriptionServiceType;
+    private String originalRequestId;
+    private String originalRequestorId;
+    private String errorSource;
+    private String errorCode;
+    private String errorMessage;
+    private String buildingBlockName;
+    private String buildingBlockStep;
+    private List<String> validResponses;
+
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getNfRole() {
+        return nfRole;
+    }
+
+    public void setNfRole(String nfRole) {
+        this.nfRole = nfRole;
+    }
+
+    public String getSubscriptionServiceType() {
+        return subscriptionServiceType;
+    }
+
+    public void setSubscriptionServiceType(String subscriptionServiceType) {
+        this.subscriptionServiceType = subscriptionServiceType;
+    }
+
+    public String getOriginalRequestId() {
+        return originalRequestId;
+    }
+
+    public void setOriginalRequestId(String originalRequestId) {
+        this.originalRequestId = originalRequestId;
+    }
+
+    public String getOriginalRequestorId() {
+        return originalRequestorId;
+    }
+
+    public void setOriginalRequestorId(String originalRequestorId) {
+        this.originalRequestorId = originalRequestorId;
+    }
+
+    public String getErrorSource() {
+        return errorSource;
+    }
+
+    public void setErrorSource(String errorSource) {
+        this.errorSource = errorSource;
+    }
+
+    public String getErrorCode() {
+        return errorCode;
+    }
+
+    public void setErrorCode(String errorCode) {
+        this.errorCode = errorCode;
+    }
+
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    public void setErrorMessage(String errorMessage) {
+        this.errorMessage = errorMessage;
+    }
+
+    public String getBuildingBlockName() {
+        return buildingBlockName;
+    }
+
+    public void setBuildingBlockName(String buildingBlockName) {
+        this.buildingBlockName = buildingBlockName;
+    }
+
+    public String getBuildingBlockStep() {
+        return buildingBlockStep;
+    }
+
+    public void setBuildingBlockStep(String buildingBlockStep) {
+        this.buildingBlockStep = buildingBlockStep;
+    }
+
+    public List<String> getValidResponses() {
+        return validResponses;
+    }
+
+    public void setValidResponses(List<String> validResponses) {
+        this.validResponses = validResponses;
+    }
+
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/TaskList.java b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/TaskList.java
new file mode 100644
index 0000000..3e49238
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/mso/rest/TaskList.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.List;
+
+public class TaskList {
+
+    public List<Task> getTaskList() {
+        return taskList;
+    }
+
+    public void setTaskList(List<Task> taskList) {
+        this.taskList = taskList;
+    }
+
+    private List<Task> taskList;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyProperties.java
new file mode 100644
index 0000000..f509051
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyProperties.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.onap.portalsdk.core.util.SystemProperties;
+
+
+public class PolicyProperties extends SystemProperties {
+	
+	public static final String POLICY_CLIENTAUTH_VAL =  "policy.ClientAuth";
+	
+	public static final String POLICY_CLIENT_MECHID_VAL =  "policy.client.mechId";
+	
+	public static final String POLICY_CLIENT_PASSWORD_VAL =  "policy.client.password";
+	
+	public static final String POLICY_USERNAME_VAL =  "policy.username";
+	
+	public static final String POLICY_PASSWORD_VAL =  "policy.password";
+	
+	public static final String POLICY_AUTHORIZATION_VAL = "policy.Authorization";
+	
+	public static final String POLICY_SERVER_URL_VAL = "policy.server.url";
+	
+	public static final String POLICY_ENVIRONMENT_VAL = "policy.environment";
+	
+	public static final String POLICY_GET_CONFIG_VAL = "policy.get.config"; 
+	
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyResponseWrapper.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyResponseWrapper.java
new file mode 100644
index 0000000..0569e97
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyResponseWrapper.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+	    "status",
+	    "entity"
+})
+
+public class PolicyResponseWrapper {
+	
+	@JsonProperty("status")
+	private int status;
+
+	@JsonProperty("entity")
+	private String entity;
+
+	@JsonProperty("entity")
+    public String getEntity() {
+        return entity;
+    }
+	
+	@JsonProperty("status")
+    public int getStatus() {
+        return status;
+    }	
+	
+	@JsonProperty("status")
+    public void setStatus(int v) {
+        this.status = v;
+    }
+
+	@JsonProperty("entity")
+    public void setEntity(String v) {
+        this.entity = v;
+    }
+
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    public String getResponse () {
+    	
+    	StringBuilder b = new StringBuilder ("{ \"status\": ");
+        b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}");
+        return (b.toString());
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInt.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInt.java
new file mode 100644
index 0000000..29fd109
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInt.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.osam.policy.rest.RequestDetails;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class PolicyRestInt {
+	
+	private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInt.class);
+	
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+	
+	/** The request date format. */
+	public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z");
+	
+	public PolicyRestInt() {
+		requestDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));
+	}
+
+	/**
+	 * Log request.
+	 *
+	 * @param r the r
+	 */
+	public void logRequest ( RequestDetails r ) {
+    	String methodName = "logRequest";
+	    ObjectMapper mapper = new ObjectMapper();
+	    String r_json_str = "";
+	    if ( r != null ) {
+	    	r_json_str = r.toString();
+		    try {
+		    	r_json_str = mapper.writeValueAsString(r);
+		    }
+		    catch ( com.fasterxml.jackson.core.JsonProcessingException j ) {
+		    	logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " +  methodName + " Unable to parse request as json");
+		    }
+	    }
+	    logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " +  methodName + " Request=(" + r_json_str + ")");  
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterface.java
new file mode 100644
index 0000000..7773cc1
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterface.java
@@ -0,0 +1,250 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.apache.commons.codec.binary.Base64;
+import org.eclipse.jetty.util.security.Password;
+import org.json.simple.JSONObject;
+import org.onap.osam.client.HttpBasicClient;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.policy.rest.RequestDetails;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.Response;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collections;
+import java.util.Date;
+
+public class PolicyRestInterface extends PolicyRestInt implements PolicyRestInterfaceIfc {
+
+	private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInterface.class);
+	
+	public static final String APPLICATION_JSON = "application/json";
+
+	private static Client client = null;
+
+	/** The common headers. */
+	private MultivaluedHashMap<String, Object> commonHeaders;
+	public PolicyRestInterface() {
+		super();
+	}
+
+	/** The Constant dateFormat. */
+	static final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+	public void initRestClient()
+	{
+		final String methodname = "initRestClient()";
+		
+		final String mechId = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_MECHID_VAL);
+		final String clientPassword = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_PASSWORD_VAL);
+		final String username = SystemProperties.getProperty(PolicyProperties.POLICY_USERNAME_VAL);
+		final String password = SystemProperties.getProperty(PolicyProperties.POLICY_PASSWORD_VAL);
+		final String environment = SystemProperties.getProperty(PolicyProperties.POLICY_ENVIRONMENT_VAL);
+				
+		final String decrypted_client_password = Password.deobfuscate(clientPassword);		
+		String mechAuthString = mechId + ":" + decrypted_client_password;		
+		byte[] mechAuthEncBytes = Base64.encodeBase64(mechAuthString.getBytes());
+		String clientAuth = new String(mechAuthEncBytes);
+		
+		final String decrypted_password = Password.deobfuscate(password);		
+		String authString = username + ":" + decrypted_password;		
+		byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
+		String authorization = new String(authEncBytes);
+		
+		commonHeaders = new MultivaluedHashMap<> ();
+		commonHeaders.put("ClientAuth",  Collections.singletonList((Object) ("Basic " + clientAuth)));
+		commonHeaders.put("Authorization",  Collections.singletonList((Object) ("Basic " + authorization)));
+		commonHeaders.put("Environment",  Collections.singletonList((Object) (environment)));
+		
+		if (client == null) {
+			
+			try {
+				client = HttpBasicClient.getClient();
+			} catch (Exception e) {
+				System.out.println(  methodname + " Unable to get the SSL client");
+			}
+		}
+	}
+	
+	@SuppressWarnings("unchecked")
+	public <T> void  Get (T t, String sourceId, String path, RestObject<T> restObject ) {
+		String methodName = "Get";
+		
+		logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start");
+		
+		String url="";
+		restObject.set(t);
+		
+		url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path;
+        logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " +  methodName + " sending request to url= " + url);
+		
+        initRestClient();
+		
+		final Response cres = client.target(url)
+			 .request()
+	         .accept(APPLICATION_JSON)
+	         .headers(commonHeaders)
+	         .get();
+		
+		int status = cres.getStatus();
+		restObject.setStatusCode (status);
+		
+		if (status == 200) {
+			 t = (T) cres.readEntity(t.getClass());
+			 restObject.set(t);
+			 logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!");
+		    
+		 } else {
+		     throw new GenericUncheckedException(methodName + " with status="+ status + ", url= " + url );
+		 }
+
+		logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status );
+		
+		return;
+	}
+   
+   @SuppressWarnings("unchecked")
+   	public <T> void Delete(T t, RequestDetails r, String sourceID, String path, RestObject<T> restObject) {
+	 
+		String methodName = "Delete";
+		String url="";
+		Response cres = null;
+		
+		logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " +  methodName + " start");
+		logRequest (r);
+
+		try {
+			initRestClient();
+			
+			url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path;
+			logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + " methodName sending request to: " + url);
+	
+			cres = client.target(url)
+					 .request()
+			         .accept(APPLICATION_JSON)
+	        		 .headers(commonHeaders)
+			         //.entity(r)
+			         .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke();
+
+			int status = cres.getStatus();
+	    	restObject.setStatusCode (status);
+	    	
+			if (status == 404) { // resource not found
+				String msg = "Resource does not exist...: " + cres.getStatus();
+				logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+			} else if (status == 200  || status == 204){
+				logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted");
+			} else if (status == 202) {
+				String msg = "Delete in progress: " + status;
+				logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+			}
+			else {
+				String msg = "Deleting Resource failed: " + status;
+					logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+			}
+			
+			try {
+	   			t = (T) cres.readEntity(t.getClass());
+	   			restObject.set(t);
+            }
+            catch ( Exception e ) {
+            	logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e="
+            			+ e.getMessage());
+            }
+   
+        } 
+		catch (Exception e)
+        {
+        	 logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString());
+        	 throw e;
+        
+        }
+	}
+	
+	@SuppressWarnings("unchecked")
+	public <T> void Post(T t, JSONObject requestDetails, String uuid, String path, RestObject<T> restObject) {
+		
+        String methodName = "Post";
+        String url="";
+
+        System.out.println( "POST policy rest interface");
+       
+        try {
+            
+            initRestClient();    
+    
+            url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path;
+            System.out.println( "<== " +  methodName + " sending request to url= " + url);
+            // Change the content length
+            final Response cres = client.target(url)
+            	 .request()
+                 .accept(APPLICATION_JSON)
+	        	 .headers(commonHeaders)
+                 //.header("content-length", 201)
+                 //.header("X-FromAppId",  sourceID)
+                 .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON));
+            
+            try {
+	   			t = (T) cres.readEntity(t.getClass());
+	   			restObject.set(t);
+            }
+            catch ( Exception e ) {
+            	
+            	System.out.println("<== " + methodName + " No response entity, this is probably ok, e=" + e.getMessage());
+            }
+
+            int status = cres.getStatus();
+    		restObject.setStatusCode (status);
+    		
+    		if ( status >= 200 && status <= 299 ) {
+    			System.out.println( "<== " + methodName + " REST api POST was successful!");
+    		
+             } else {
+            	 System.out.println( "<== " + methodName + " with status="+status+", url="+url);
+             }    
+   
+        } catch (Exception e)
+        {
+        	System.out.println( "<== " + methodName + " with url="+url+ ", Exception: " + e.toString());
+        	 throw e;
+        
+        }
+    }
+	
+	public <T> T getInstance(Class<T> clazz) throws IllegalAccessException, InstantiationException
+	{
+		return clazz.newInstance();
+	}
+
+	@Override
+	public void logRequest(RequestDetails r) {
+		// TODO Auto-generated method stub
+	} 	
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterfaceFactory.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterfaceFactory.java
new file mode 100644
index 0000000..104a573
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterfaceFactory.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+public class PolicyRestInterfaceFactory {
+
+	
+	public static PolicyRestInterfaceIfc getInstance () {
+		PolicyRestInterfaceIfc obj = null;
+
+		obj = new PolicyRestInterface();
+		
+		return ( obj );
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterfaceIfc.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterfaceIfc.java
new file mode 100644
index 0000000..cd39351
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyRestInterfaceIfc.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.json.simple.JSONObject;
+import org.onap.osam.policy.rest.RequestDetails;
+
+public interface PolicyRestInterfaceIfc {	
+	public void initRestClient();
+	
+	public <T> void Get (T t, String sourceId, String path, RestObject<T> restObject );
+	
+	/**
+	 * Delete.
+	 *
+	 * @param <T> the generic type
+	 * @param t the t
+	 * @param r the r
+	 * @param sourceID the source ID
+	 * @param path the path
+	 * @param restObject the rest object
+	 * @throws Exception the exception
+	 */
+	public <T> void Delete(T t, RequestDetails r, String sourceID, String path, RestObject<T> restObject);
+	
+	/**
+	 * Post.
+	 *
+	 * @param <T> the generic type
+	 * @param t the t
+	 * @param r the r
+	 * @param sourceID the source ID
+	 * @param path the path
+	 * @param restObject the rest object
+	 * @throws Exception the exception
+	 */
+	public <T> void Post(T t, JSONObject r, String sourceID, String path, RestObject<T> restObject);
+	
+	/***
+	 * Log request.
+	 *
+	 * @param r the r
+	 */
+	public void logRequest ( RequestDetails r  );
+	
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyUtil.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyUtil.java
new file mode 100644
index 0000000..c73d529
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/PolicyUtil.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.glassfish.jersey.client.ClientResponse;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class PolicyUtil {
+	
+	private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyUtil.class);
+	
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+	
+	public static PolicyResponseWrapper wrapResponse ( String body, int statusCode ) {
+		
+		PolicyResponseWrapper w = new PolicyResponseWrapper();
+		w.setStatus (statusCode);
+		w.setEntity(body);
+		
+		return w;
+	}
+	
+	public static PolicyResponseWrapper wrapResponse (ClientResponse cres) {	
+		String resp_str = "";
+		if ( cres != null ) {
+			resp_str = cres.readEntity(String.class);
+		}
+		int statuscode = cres.getStatus();
+		PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, statuscode );
+		return (w);
+	}
+	
+	public static PolicyResponseWrapper wrapResponse (RestObject<String> rs) {	
+		String resp_str = "";
+		int status = 0;
+		if ( rs != null ) {
+			resp_str = rs.get();
+			status = rs.getStatusCode();
+		}
+		PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, status );
+		return (w);
+	}
+	
+	public static <T> String convertPojoToString ( T t ) throws com.fasterxml.jackson.core.JsonProcessingException {
+		
+		String methodName = "convertPojoToString";
+		ObjectMapper mapper = new ObjectMapper();
+		String r_json_str = "";
+	    if ( t != null ) {
+		    try {
+		    	r_json_str = mapper.writeValueAsString(t);
+		    }
+		    catch ( com.fasterxml.jackson.core.JsonProcessingException j ) {
+		    	logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " +  methodName + " Unable to parse object as json");
+		    }
+	    }
+	    return (r_json_str);
+	}
+	
+	
+	public static void main(String[] args) {
+		// TODO Auto-generated method stub		
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/RestObject.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/RestObject.java
new file mode 100644
index 0000000..d098fe0
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/RestObject.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+public class RestObject<T> {
+
+    // T stands for "Type"
+    private T t;
+    
+    /** The status code. */
+    private int statusCode= 0;
+    
+    /**
+     * Sets the.
+     *
+     * @param t the t
+     */
+    public void set(T t) { this.t = t; }
+    
+    /**
+     * Gets the.
+     *
+     * @return the t
+     */
+    public T get() { return t; }
+	
+    /**
+     * Sets the status code.
+     *
+     * @param v the new status code
+     */
+    public void setStatusCode(int v) { this.statusCode = v; }
+    
+    /**
+     * Gets the status code.
+     *
+     * @return the status code
+     */
+    public int getStatusCode() { return this.statusCode; }
+    
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/policy/rest/RequestDetails.java b/onap-enabler-be/src/main/java/org/onap/osam/policy/rest/RequestDetails.java
new file mode 100644
index 0000000..9c2997a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/policy/rest/RequestDetails.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy.rest;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/*
+	[
+	  {
+	    "policyConfigMessage": "Config Retrieved! ",
+	    "policyConfigStatus": "CONFIG_RETRIEVED",
+	    "type": "JSON",
+	    "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_zone_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_zone\"}}",
+	    "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_zone_localTime.1.xml",
+	    "policyVersion": "1",
+	    "matchingConditions": {
+	      "ECOMPName": "SNIRO-Placement",
+	      "ConfigName": "",
+	      "service": "TimeLimitAndVerticalTopology",
+	      "uuid": "",
+	      "Location": ""
+	    },
+	    "responseAttributes": {},
+	    "property": null
+	  },
+	  {
+	    "policyConfigMessage": "Config Retrieved! ",
+	    "policyConfigStatus": "CONFIG_RETRIEVED",
+	    "type": "JSON",
+	    "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_pserver_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_pserver\"}}",
+	    "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_pserver_localTime.1.xml",
+	    "policyVersion": "1",
+	    "matchingConditions": {
+	      "ECOMPName": "SNIRO-Placement",
+	      "ConfigName": "",
+	      "service": "TimeLimitAndVerticalTopology",
+	      "uuid": "",
+	      "Location": ""
+	    },
+	    "responseAttributes": {},
+	    "property": null
+	  },
+	  {
+	    "policyConfigMessage": "Config Retrieved! ",
+	    "policyConfigStatus": "CONFIG_RETRIEVED",
+	    "type": "JSON",
+	    "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_vnf_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf\"}}",
+	    "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_vnf_localTime.1.xml",
+	    "policyVersion": "1",
+	    "matchingConditions": {
+	      "ECOMPName": "SNIRO-Placement",
+	      "ConfigName": "",
+	      "service": "TimeLimitAndVerticalTopology",
+	      "uuid": "",
+	      "Location": ""
+	    },
+	    "responseAttributes": {},
+	    "property": null
+	  }
+	]
+*/
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "policyConfigMessage",
+    "policyConfigStatus",
+    "type",
+    "config",
+    "policyName",
+    "policyVersion",
+    "matchingConditions"
+})
+public class RequestDetails {
+	
+	@JsonProperty("policyName")
+    private String policyName;	 
+    
+	@JsonProperty("policyName")
+    public String getPolicyName() {
+        return policyName;
+    }
+
+    @JsonProperty("policyName")
+    public void setPolicyName(String policyName) {
+        this.policyName = policyName;
+    }
+    
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/properties/AsdcClientConfiguration.java b/onap-enabler-be/src/main/java/org/onap/osam/properties/AsdcClientConfiguration.java
new file mode 100644
index 0000000..625587a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/properties/AsdcClientConfiguration.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.properties;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.annotation.PropertySources;
+import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
+
+@Configuration
+
+@PropertySources({
+		@PropertySource(value="asdc.properties",  ignoreResourceNotFound = true),
+		@PropertySource(value="${container.classpath:}/WEB-INF/conf/asdc.properties", ignoreResourceNotFound = true)
+})
+public class AsdcClientConfiguration {
+
+    @Bean
+    public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
+        return new PropertySourcesPlaceholderConfigurer();
+    }
+
+	@Value("${asdc.client.type}")
+	private AsdcClientType asdcClientType;
+
+	@Value("${asdc.client.rest.host}")
+	private String asdcClientHost;
+
+	/** The asdc client port. */
+	@Value("${asdc.client.rest.port}")
+	private int asdcClientPort;
+
+	/** The asdc client auth. */
+	@Value("${asdc.client.rest.auth}")
+	public String asdcClientAuth;
+
+	/** The asdc client protocol. */
+	@Value("${asdc.client.rest.protocol}")
+	public String asdcClientProtocol;
+
+	/**
+	 * Gets the asdc client type.
+	 *
+	 * @return the asdc client type
+	 */
+	public AsdcClientType getAsdcClientType() {
+		return asdcClientType;
+	}
+
+	/**
+	 * Gets the asdc client host.
+	 *
+	 * @return the asdc client host
+	 */
+	public String getAsdcClientHost() {
+		return asdcClientHost;
+	}
+
+	/**
+	 * Gets the asdc client port.
+	 *
+	 * @return the asdc client port
+	 */
+	public int getAsdcClientPort() {
+		return asdcClientPort;
+	}
+
+	/**
+	 * Gets the asdc client auth.
+	 *
+	 * @return the asdc client auth
+	 */
+	public String getAsdcClientAuth() {
+		return asdcClientAuth;
+	}
+
+	/**
+	 * Gets the asdc client protocol.
+	 *
+	 * @return the asdc client protocol
+	 */
+	public String getAsdcClientProtocol() {
+		return asdcClientProtocol;
+	}
+
+	/**
+	 * The Enum AsdcClientType.
+	 */
+	public enum AsdcClientType {
+
+		/** The in memory. */
+		IN_MEMORY,
+
+		/** The rest. */
+		REST,
+
+		/** The local. */
+		LOCAL
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/properties/Features.java b/onap-enabler-be/src/main/java/org/onap/osam/properties/Features.java
new file mode 100644
index 0000000..995e608
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/properties/Features.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.properties;
+
+import org.togglz.core.Feature;
+import org.togglz.core.context.FeatureContext;
+
+public enum Features implements Feature {
+
+
+    FLAG_ASYNC_JOBS,
+    FLAG_REGION_ID_FROM_REMOTE,
+    CREATE_INSTANCE_TEST,
+    EMPTY_DRAWING_BOARD_TEST,
+    FLAG_ADVANCED_PORTS_FILTER,
+    FLAG_ADD_MSO_TESTAPI_FIELD,
+    FLAG_ASYNC_INSTANTIATION,
+    FLAG_SERVICE_MODEL_CACHE,
+    FLAG_UNASSIGN_SERVICE,
+    FLAG_NETWORK_TO_ASYNC_INSTANTIATION,
+    FLAG_COLLECTION_RESOURCE_SUPPORT,
+    FLAG_SHOW_ASSIGNMENTS,
+    FLAG_SHOW_VERIFY_SERVICE,
+    FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD,
+    FLAG_PNP_INSTANTIATION;
+
+    public boolean isActive() {
+        return FeatureContext.getFeatureManager().isActive(this);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/properties/FeaturesTogglingConfiguration.java b/onap-enabler-be/src/main/java/org/onap/osam/properties/FeaturesTogglingConfiguration.java
new file mode 100644
index 0000000..86761a8
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/properties/FeaturesTogglingConfiguration.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.properties;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.Environment;
+import org.togglz.core.manager.FeatureManager;
+import org.togglz.core.manager.FeatureManagerBuilder;
+import org.togglz.core.repository.file.FileBasedStateRepository;
+import org.togglz.spring.listener.TogglzApplicationContextBinderApplicationListener;
+
+import javax.servlet.ServletContext;
+import java.io.File;
+
+@Configuration
+public class FeaturesTogglingConfiguration {
+    @Bean
+    public ApplicationListener getApplicationListener() {
+        return new TogglzApplicationContextBinderApplicationListener();
+    }
+
+    @Bean
+    public FeatureManager featureManager(ServletContext servletContext, Environment environment) {
+        final String defaultFilename = "features.properties";
+
+        String filename = environment.getProperty("featureFlags.filename");
+
+        if (StringUtils.isBlank(filename)) {
+            filename = defaultFilename;
+        }
+
+        return new FeatureManagerBuilder()
+                .featureEnum(Features.class)
+                .stateRepository(new FileBasedStateRepository(
+                        new File(servletContext.getRealPath("/WEB-INF/conf/" + filename))
+                ))
+                .build();
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/properties/VidProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/properties/VidProperties.java
new file mode 100644
index 0000000..1dedd29
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/properties/VidProperties.java
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.properties;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.model.ModelConstants;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+public class VidProperties extends SystemProperties {
+
+	//VID General Properties
+	public static final String MSO_DISPLAY_TEST_API_ON_SCREEN="mso.displayTestAPIOnScreen";
+	public static final String MSO_DEFAULT_TEST_API="mso.defaultTestAPI";
+	public static final String MSO_MAX_OPENED_INSTANTIATION_REQUESTS="mso.maxOpenedInstantiationRequests";
+	public static final String MSO_ASYNC_POLLING_INTERVAL_SECONDS="mso.asyncPollingIntervalSeconds";
+
+	public static final String VID_TRUSTSTORE_FILENAME = "vid.truststore.filename";
+	
+	/** The Constant VID_TRUSTSTORE_PASSWD_X. */
+	public static final String VID_TRUSTSTORE_PASSWD_X = "vid.truststore.passwd.x";
+	
+	/** The Constant FILESEPARATOR. */
+	public static final String FILESEPARATOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
+	
+	/** The Constant LOG. */
+	private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidProperties.class);
+	
+	/** The Constant dateFormat. */
+	final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+	/**
+	 * Gets the asdc model namespace prefix property
+	 * 
+	 * @return the property value or a default value
+	 */
+	public static String getAsdcModelNamespace() {
+		String methodName = "getAsdcModelNamespace ";
+		String asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+	    try {
+	        asdcModelNamespace = SystemProperties.getProperty(ModelConstants.ASDC_MODEL_NAMESPACE);
+	        if ( asdcModelNamespace == null || asdcModelNamespace.isEmpty()) {
+		    	asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+		    }
+	    }
+	    catch ( Exception e ) {
+	    	LOG.error (EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + "unable to find the value, using the default "
+	    			+ ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE);
+	    	asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+	    }
+	    return (asdcModelNamespace);
+	}
+	/**
+	 * Gets the specified property value. If the property is not defined, returns a default value.
+	 * 
+	 * @return the property value or a default value
+	 */
+	public static String getPropertyWithDefault ( String propName, String defaultValue ) {
+		String methodName = "getPropertyWithDefault ";
+		String propValue = defaultValue;
+	    try {
+	        propValue = SystemProperties.getProperty(propName);
+	        if ( propValue == null || propValue.isEmpty()) {
+		    	propValue = defaultValue;
+		    }
+	    }
+	    catch ( Exception e ) {
+	    	LOG.error (EELFLoggerDelegate.errorLogger, dateFormat.format(new Date()) + methodName + "unable to find the value, using the default "
+	    			+ defaultValue);
+	    	propValue = defaultValue;
+	    }
+	    return (propValue);
+	}
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/roles/EcompRole.java b/onap-enabler-be/src/main/java/org/onap/osam/roles/EcompRole.java
new file mode 100644
index 0000000..5a6ec35
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/roles/EcompRole.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.roles;
+
+public enum EcompRole {
+	READ;
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/roles/Role.java b/onap-enabler-be/src/main/java/org/onap/osam/roles/Role.java
new file mode 100644
index 0000000..e24eb6e
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/roles/Role.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.roles;
+
+
+public class Role {
+
+    private EcompRole ecompRole;
+
+    private String subscribeName;
+
+    private String serviceType;
+
+    private String tenant;
+
+    public Role(EcompRole ecompRole, String subscribeName, String serviceType, String tenant) {
+        this.ecompRole = ecompRole;
+        this.subscribeName = subscribeName;
+        this.serviceType = serviceType;
+        this.tenant = tenant;
+    }
+
+    public EcompRole getEcompRole() {
+        return ecompRole;
+    }
+
+
+    public String getSubscribeName() {
+        return subscribeName;
+    }
+
+    public void setSubscribeName(String subscribeName) {
+        this.subscribeName = subscribeName;
+    }
+
+    public String getServiceType() {
+        return serviceType;
+    }
+
+
+    public String getTenant() {
+        return tenant;
+    }
+
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/roles/RoleProvider.java b/onap-enabler-be/src/main/java/org/onap/osam/roles/RoleProvider.java
new file mode 100644
index 0000000..e6b503a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/roles/RoleProvider.java
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.roles;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.web.support.UserUtils;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.exceptions.RoleParsingException;
+import org.onap.osam.model.ModelConstants;
+import org.onap.osam.model.Subscriber;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.services.IAaiService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+//import org.codehaus.jackson.map.ObjectMapper;
+
+
+@Component
+public class RoleProvider {
+
+    private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(RoleProvider.class);
+    final String readPermissionString = "read";
+    SubscriberList subscribers;
+    ObjectMapper om = new ObjectMapper();
+    @Autowired
+    private IAaiService aaiService;
+
+    public static List<String> extractRoleFromSession(HttpServletRequest request) {
+
+        return new ArrayList<String>();
+
+    }
+
+    public void init() {
+        LOG.debug(EELFLoggerDelegate.debugLogger, "Role provider => init method started");
+        AaiResponse<SubscriberList> subscribersResponse = aaiService.getFullSubscriberList();
+        subscribers = subscribersResponse.getT();
+        LOG.debug(EELFLoggerDelegate.debugLogger, "Role provider => init method finished");
+    }
+
+    public List<Role> getUserRoles(HttpServletRequest request) throws JsonProcessingException {
+        String logPrefix = "Role Provider (" + UserUtils.getUserId(request) + ") ==>";
+
+        LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Entering to get user role for user " + UserUtils.getUserId(request));
+
+        List<Role> roleList = new ArrayList<>();
+        //Disable roles until AAF integration finishes
+        /*HashMap roles = UserUtils.getRoles(request);
+        for (Object role : roles.keySet()) {
+            org.openecomp.portalsdk.core.domain.Role sdkRol = (org.openecomp.portalsdk.core.domain.Role) roles.get(role);
+
+            LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Role " + sdkRol.getName() + " is being proccessed");
+            try {
+                if (sdkRol.getName().contains(readPermissionString)) {
+                    LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + " Role " + sdkRol.getName() + " contain " + readPermissionString);
+
+                    continue;
+                }
+                String[] roleParts = splitRole((sdkRol.getName()), logPrefix);
+                roleList.add(createRoleFromStringArr(roleParts, logPrefix));
+                String msg = String.format(logPrefix + " User %s got permissions %s", UserUtils.getUserId(request), Arrays.toString(roleParts));
+                LOG.debug(EELFLoggerDelegate.debugLogger, msg);
+            } catch (RoleParsingException e) {
+                LOG.error(logPrefix + " Failed to parse permission");
+
+            }
+        }*/
+
+        return roleList;
+    }
+
+    public String[] splitRole(String roleAsString, String logPrefix) {
+        LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Spliting role = " + roleAsString + "With delimeter = " + ModelConstants.ROLE_DELIMITER);
+        return roleAsString.split(ModelConstants.ROLE_DELIMITER);
+    }
+
+    public boolean userPermissionIsReadOnly(List<Role> roles) {
+
+        return (!(roles.size() > 0));
+    }
+
+    public boolean userPermissionIsReadLogs(List<Role> roles){
+        for(Role role: roles){
+            if(role.getServiceType().equals("LOGS")){
+                if(role.getTenant().equals("PERMITTED")){
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private String replaceSubscriberNameToGlobalCustomerID(String subscriberName, String logPrefix) throws JsonProcessingException {
+        if (subscribers == null) {
+            LOG.debug(EELFLoggerDelegate.debugLogger, "replaceSubscriberNameToGlobalCustomerID calling init method");
+            init();
+        }
+        LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "subscribers list size is  " + subscribers.customer.size() + " with the values " + om.writeValueAsString(subscribers.customer));
+        LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "subscribers list size is  " + subscribers.customer.size() + " with the values " + om.writeValueAsString(subscribers.customer));
+
+
+        Optional<Subscriber> s = subscribers.customer.stream().filter(x -> x.subscriberName.equals(subscriberName)).findFirst();
+        //Fixing bug of logging "optional get" before isPresent
+        String replacement = s.isPresent() ? s.get().globalCustomerId : "";
+        LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Subscribername " + subscriberName + " changed to  " + replacement);
+        return replacement;
+    }
+
+    public Role createRoleFromStringArr(String[] roleParts, String rolePrefix) throws JsonProcessingException, RoleParsingException {
+        String globalCustomerID = replaceSubscriberNameToGlobalCustomerID(roleParts[0], rolePrefix);
+        try {
+            if (roleParts.length > 2) {
+                return new Role(EcompRole.READ, globalCustomerID, roleParts[1], roleParts[2]);
+            } else {
+                return new Role(EcompRole.READ, globalCustomerID, roleParts[1], null);
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            if (roleParts.length > 0)
+                LOG.debug(EELFLoggerDelegate.debugLogger, "Could not parse role ", roleParts[0]);
+            else {
+                LOG.debug(EELFLoggerDelegate.debugLogger, "Got empty role, Could not parse it ");
+
+            }
+            throw new RoleParsingException();
+        }
+
+    }
+
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/roles/RoleValidator.java b/onap-enabler-be/src/main/java/org/onap/osam/roles/RoleValidator.java
new file mode 100644
index 0000000..deddcee
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/roles/RoleValidator.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.roles;
+
+import org.onap.osam.mso.rest.RequestDetails;
+
+import java.util.List;
+import java.util.Map;
+
+public class RoleValidator {
+
+    private boolean disableRoles = true;
+    private List<Role> userRoles;
+
+    public RoleValidator(List<Role> roles) {
+        this.userRoles = roles;
+    }
+
+    public boolean isSubscriberPermitted(String subscriberName) {
+        if(this.disableRoles) return true;
+        
+        for (Role role : userRoles) {
+            if (role.getSubscribeName().equals(subscriberName))
+                return true;
+        }
+        return false;
+    }
+
+    public boolean isServicePermitted(String subscriberName, String serviceType) {
+        if(this.disableRoles) return true;
+        
+        for (Role role : userRoles) {
+            if (role.getSubscribeName().equals(subscriberName) && role.getServiceType().equals(serviceType))
+                return true;
+        }
+        return false;
+    }
+
+    public boolean isMsoRequestValid(RequestDetails mso_request) {
+        if(this.disableRoles) return true;
+        
+        try {
+            String globalSubscriberIdRequested = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("subscriberInfo")).get("globalSubscriberId");
+            String serviceType = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("requestParameters")).get("subscriptionServiceType");
+            return isServicePermitted(globalSubscriberIdRequested, serviceType);
+        } catch (Exception e) {
+            //Until we'll get the exact information regarding the tenants and the global customer id, we'll return true on unknown requests to mso
+            return true;
+        }
+//        return false;
+    }
+
+    public boolean isTenantPermitted(String globalCustomerId, String serviceType, String tenantName) {
+        if(this.disableRoles) return true;
+        
+        for (Role role : userRoles) {
+            if (role.getSubscribeName().equals(globalCustomerId)
+                    && role.getServiceType().equals(serviceType)
+                    && (role.getTenant() == null || role.getTenant().equalsIgnoreCase(tenantName))) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/scheduler/RestObject.java b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/RestObject.java
new file mode 100644
index 0000000..6bee4e4
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/RestObject.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler;
+
+
+public class RestObject<T> {
+	
+    private T t;
+   
+    private int statusCode= 0;
+    
+    public String uuid;
+    
+    public void set(T t) { this.t = t; }
+    
+    public T get() { return t; }
+	   
+    public void setStatusCode(int v) { this.statusCode = v; }
+       
+    public int getStatusCode() { return this.statusCode; }
+        
+    public void setUUID(String uuid) { this.uuid = uuid; }
+    
+    public String getUUID() { return this.uuid; }
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/scheduler/RestObjects/RestObject.java b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/RestObjects/RestObject.java
new file mode 100644
index 0000000..fd01133
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/RestObjects/RestObject.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler.RestObjects;
+
+
+public class RestObject<T> {
+	
+    private T t;
+   
+    private int statusCode= 0;
+        
+    public void set(T t) { this.t = t; }
+    
+    public T get() { return t; }
+	   
+    public void setStatusCode(int v) { this.statusCode = v; }
+       
+    public int getStatusCode() { return this.statusCode; }
+        
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerProperties.java b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerProperties.java
new file mode 100644
index 0000000..e313d93
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerProperties.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler;
+
+import org.onap.portalsdk.core.util.SystemProperties;
+
+
+public class SchedulerProperties extends SystemProperties { 
+	
+	public static final String SCHEDULER_USER_NAME_VAL =  "scheduler.user.name";
+		
+	public static final String SCHEDULER_PASSWORD_VAL = "scheduler.password";
+	
+	public static final String SCHEDULER_SERVER_URL_VAL = "scheduler.server.url";
+
+	public static final String SCHEDULER_GET_SCHEDULES = "scheduler.get.schedules";
+
+	public static final String SCHEDULER_DELETE_SCHEDULE = "scheduler.delete.schedule";
+
+	public static final String SCHEDULER_BASIC_AUTH =  "scheduler.basic.auth";
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerRestInterface.java b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerRestInterface.java
new file mode 100644
index 0000000..c764108
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerRestInterface.java
@@ -0,0 +1,133 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
+import io.joshworks.restclient.http.HttpResponse;
+import org.eclipse.jetty.util.security.Password;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.client.SyncRestClient;
+import org.onap.osam.client.SyncRestClientInterface;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.utils.Logging;
+import org.springframework.http.HttpMethod;
+import org.springframework.stereotype.Service;
+
+import java.util.Base64;
+import java.util.Collections;
+import java.util.Map;
+import java.util.function.Function;
+
+import static org.onap.osam.utils.Logging.REQUEST_ID_HEADER_KEY;
+
+@Service
+public class SchedulerRestInterface implements SchedulerRestInterfaceIfc {
+
+    final private static EELFLogger outgoingRequestsLogger = Logging.getRequestsLogger("scheduler");
+    private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerRestInterface.class);
+    private SyncRestClientInterface syncRestClient;
+    private Function<String, String> propertyGetter;
+    private Map<String, String> commonHeaders;
+
+    public SchedulerRestInterface() {
+        this.propertyGetter = SystemProperties::getProperty;
+    }
+
+    public SchedulerRestInterface(Function<String, String> propertyGetter) {
+        this.propertyGetter = propertyGetter;
+    }
+
+    public void initRestClient() {
+        logger.info("Starting to initialize rest client ");
+        String authStringEnc = calcEncodedAuthString();
+
+        commonHeaders = Maps.newHashMap();
+        commonHeaders.put("Authorization", "Basic " + authStringEnc);
+
+        syncRestClient = new SyncRestClient();
+
+        logger.info("\t<== Client Initialized \n");
+    }
+
+    public <T> void Get(T t, String sourceId, String path, org.onap.osam.scheduler.RestObject<T> restObject) {
+        initRestClient();
+        String methodName = "Get";
+        String url = String.format("%s%s", propertyGetter.apply(SchedulerProperties.SCHEDULER_SERVER_URL_VAL), path);
+        Logging.logRequest(outgoingRequestsLogger, HttpMethod.GET, url);
+        Map<String, String> requestHeaders = ImmutableMap.<String, String>builder()
+                .putAll(commonHeaders)
+                .put(REQUEST_ID_HEADER_KEY, Logging.extractOrGenerateRequestId()).build();
+        final HttpResponse<T> response = ((HttpResponse<T>) syncRestClient.get(url, requestHeaders,
+                Collections.emptyMap(), t.getClass()));
+        Logging.logResponse(outgoingRequestsLogger, HttpMethod.GET, url, response);
+        int status = response.getStatus();
+        restObject.setStatusCode(status);
+
+        if (status == 200) {
+            t = response.getBody();
+            restObject.set(t);
+
+        } else {
+            throw new GenericUncheckedException(String.format("%s with status=%d, url=%s", methodName, status, url));
+        }
+    }
+
+    public <T> void Delete(T t, String sourceID, String path, org.onap.osam.scheduler.RestObject<T> restObject) {
+        initRestClient();
+        String url = String.format("%s%s", propertyGetter.apply(SchedulerProperties.SCHEDULER_SERVER_URL_VAL), path);
+        Logging.logRequest(outgoingRequestsLogger, HttpMethod.DELETE, url);
+        Map<String, String> requestHeaders = ImmutableMap.<String, String>builder()
+                .putAll(commonHeaders)
+                .put(REQUEST_ID_HEADER_KEY, Logging.extractOrGenerateRequestId()).build();
+        final HttpResponse<T> response = (HttpResponse<T>) syncRestClient.delete(url, requestHeaders, t.getClass());
+
+        Logging.logResponse(outgoingRequestsLogger, HttpMethod.DELETE, url, response);
+
+        int status = response.getStatus();
+        restObject.setStatusCode(status);
+
+        t = response.getBody();
+        restObject.set(t);
+    }
+
+    public <T> T getInstance(Class<T> clazz) throws IllegalAccessException, InstantiationException {
+        return clazz.newInstance();
+    }
+
+    private String calcEncodedAuthString() {
+        String retrievedUsername = propertyGetter.apply(SchedulerProperties.SCHEDULER_USER_NAME_VAL);
+        final String username = retrievedUsername.isEmpty() ? "" : retrievedUsername;
+
+        String retrievedPassword = propertyGetter.apply(SchedulerProperties.SCHEDULER_PASSWORD_VAL);
+        final String password = retrievedPassword.isEmpty() ? "" : getDeobfuscatedPassword(retrievedPassword);
+
+        return Base64.getEncoder().encodeToString((username + ":" + password).getBytes());
+    }
+
+    private static String getDeobfuscatedPassword(String password) {
+        return password.contains("OBF:") ? Password.deobfuscate(password) : password;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerRestInterfaceIfc.java b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerRestInterfaceIfc.java
new file mode 100644
index 0000000..dbb5f67
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/scheduler/SchedulerRestInterfaceIfc.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler;
+
+import org.springframework.stereotype.Service;
+
+@Service
+public interface SchedulerRestInterfaceIfc {
+
+	void initRestClient();
+
+	<T> void Get(T t, String sourceId, String path, org.onap.osam.scheduler.RestObject<T> restObject);
+
+	<T> void Delete(T t, String sourceID, String path, org.onap.osam.scheduler.RestObject<T> restObject)
+			throws Exception;
+
+}
+
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/AaiServiceImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/AaiServiceImpl.java
new file mode 100644
index 0000000..01de375
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/AaiServiceImpl.java
@@ -0,0 +1,480 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.apache.http.HttpStatus;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.ServiceInstance;
+import org.onap.osam.aai.ServiceInstancesSearchResults;
+import org.onap.osam.aai.ServiceSubscription;
+import org.onap.osam.aai.ServiceSubscriptions;
+import org.onap.osam.aai.Services;
+import org.onap.osam.aai.SubscriberFilteredResults;
+import org.onap.osam.aai.model.AaiGetAicZone.AicZones;
+import org.onap.osam.aai.model.AaiGetInstanceGroupsByCloudRegion;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.AaiGetNetworkCollectionDetails;
+import org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.AaiGetRelatedInstanceGroupsByVnfId;
+import org.onap.osam.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
+import org.onap.osam.aai.model.AaiGetPnfs.Pnf;
+import org.onap.osam.aai.model.AaiGetServicesRequestModel.GetServicesAAIRespone;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.aai.model.AaiRelationResponse;
+import org.onap.osam.aai.model.InstanceGroupInfo;
+import org.onap.osam.aai.model.LogicalLinkResponse;
+import org.onap.osam.aai.model.Model;
+import org.onap.osam.aai.model.OwningEntity;
+import org.onap.osam.aai.model.OwningEntityResponse;
+import org.onap.osam.aai.model.PortDetailsTranslator;
+import org.onap.osam.aai.model.Project;
+import org.onap.osam.aai.model.ProjectResponse;
+import org.onap.osam.aai.model.RelatedToProperty;
+import org.onap.osam.aai.model.Relationship;
+import org.onap.osam.aai.model.RelationshipData;
+import org.onap.osam.aai.model.RelationshipList;
+import org.onap.osam.aai.model.ServiceRelationships;
+import org.onap.osam.model.ServiceInstanceSearchResult;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.roles.RoleValidator;
+import org.onap.osam.utils.Intersection;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import javax.ws.rs.core.Response;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class AaiServiceImpl implements IAaiService {
+    private static final String SERVICE_INSTANCE_ID = "service-instance.service-instance-id";
+    private static final String SERVICE_TYPE = "service-subscription.service-type";
+    private static final String CUSTOMER_ID = "customer.global-customer-id";
+    private static final String SERVICE_INSTANCE_NAME = "service-instance.service-instance-name";
+    private int indexOfSubscriberName = 6;
+
+    @Autowired
+    private AaiClientInterface aaiClient;
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(AaiServiceImpl.class);
+
+    private boolean validateModel(Model model){
+        if (model == null) {
+            return false;
+        } else {
+            return model.getModelVers() != null && model.getModelVers().getModelVer() != null && model.getModelVers().getModelVer().get(0).getModelVersionId() != null;
+        }
+    }
+
+    private List<ServiceInstanceSearchResult> getServicesByOwningEntityId(List<String> owningEntities, RoleValidator roleValidator) {
+        AaiResponse<OwningEntityResponse> owningEntityResponse = aaiClient.getServicesByOwningEntityId(owningEntities);
+        List<ServiceInstanceSearchResult> serviceInstanceSearchResultList = new ArrayList<>();
+        if (owningEntityResponse.getT() != null) {
+            for (OwningEntity owningEntity : owningEntityResponse.getT().getOwningEntity()) {
+                if (owningEntity.getRelationshipList() != null) {
+                    serviceInstanceSearchResultList = convertRelationshipToSearchResult(owningEntity, serviceInstanceSearchResultList, roleValidator);
+                }
+            }
+        }
+        return serviceInstanceSearchResultList;
+    }
+
+    private List<ServiceInstanceSearchResult> getServicesByProjectNames(List<String> projectNames, RoleValidator roleValidator) {
+        AaiResponse<ProjectResponse> projectByIdResponse = aaiClient.getServicesByProjectNames(projectNames);
+        List<ServiceInstanceSearchResult> serviceInstanceSearchResultList = new ArrayList<>();
+        if (projectByIdResponse.getT() != null) {
+            for (Project project : projectByIdResponse.getT().getProject()) {
+                if (project.getRelationshipList() != null) {
+                    serviceInstanceSearchResultList = convertRelationshipToSearchResult(project, serviceInstanceSearchResultList, roleValidator);
+                }
+            }
+        }
+        return serviceInstanceSearchResultList;
+    }
+
+    private List<ServiceInstanceSearchResult> convertRelationshipToSearchResult(AaiRelationResponse owningEntityResponse, List<ServiceInstanceSearchResult> serviceInstanceSearchResultList, RoleValidator roleValidator) {
+        if (owningEntityResponse.getRelationshipList().getRelationship() != null) {
+            List<Relationship> relationshipList = owningEntityResponse.getRelationshipList().getRelationship();
+            for (Relationship relationship : relationshipList) {
+                ServiceInstanceSearchResult serviceInstanceSearchResult = new ServiceInstanceSearchResult();
+                extractRelationshipData(relationship, serviceInstanceSearchResult, roleValidator);
+                extractRelatedToProperty(relationship, serviceInstanceSearchResult);
+                serviceInstanceSearchResultList.add(serviceInstanceSearchResult);
+            }
+        }
+        return serviceInstanceSearchResultList;
+    }
+
+    private void extractRelationshipData(Relationship relationship, ServiceInstanceSearchResult serviceInstanceSearchResult, RoleValidator roleValidator) {
+        List<RelationshipData> relationshipDataList = relationship.getRelationDataList();
+        if (relationshipDataList != null) {
+            setSubscriberName(relationship, serviceInstanceSearchResult);
+            for (RelationshipData relationshipData : relationshipDataList) {
+                String key = relationshipData.getRelationshipKey();
+                if (key.equals(SERVICE_INSTANCE_ID)) {
+                    serviceInstanceSearchResult.setServiceInstanceId(relationshipData.getRelationshipValue());
+                } else if (key.equals(SERVICE_TYPE)) {
+                    serviceInstanceSearchResult.setServiceType(relationshipData.getRelationshipValue());
+                } else if (key.equals(CUSTOMER_ID)) {
+                    serviceInstanceSearchResult.setGlobalCustomerId(relationshipData.getRelationshipValue());
+                }
+            }
+
+            boolean isPermitted = roleValidator.isServicePermitted(serviceInstanceSearchResult.getSubscriberName(), serviceInstanceSearchResult.getServiceType());
+            serviceInstanceSearchResult.setIsPermitted(isPermitted);
+        }
+    }
+
+    private void setSubscriberName(Relationship relationship, ServiceInstanceSearchResult serviceInstanceSearchResult) {
+        String relatedLink = relationship.getRelatedLink();
+        String[] subsciber = relatedLink.split("/");
+        serviceInstanceSearchResult.setSubscriberName(subsciber[indexOfSubscriberName]);
+    }
+
+    private void extractRelatedToProperty(Relationship relationship, ServiceInstanceSearchResult serviceInstanceSearchResult) {
+        List<RelatedToProperty> relatedToPropertyList = relationship.getRelatedToPropertyList();
+        if (relatedToPropertyList != null) {
+            for (RelatedToProperty relatedToProperty : relatedToPropertyList) {
+                if (relatedToProperty.getPropertyKey().equals(SERVICE_INSTANCE_NAME)) {
+                    serviceInstanceSearchResult.setServiceInstanceName(relatedToProperty.getPropertyValue());
+                }
+            }
+        }
+    }
+
+    @Override
+    public SubscriberFilteredResults getFullSubscriberList(RoleValidator roleValidator) {
+        AaiResponse<SubscriberList> subscriberResponse = aaiClient.getAllSubscribers();
+
+        return new SubscriberFilteredResults(roleValidator, subscriberResponse.getT(),
+                subscriberResponse.getErrorMessage(),
+                subscriberResponse.getHttpCode());
+    }
+
+    @Override
+    public AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus) {
+        return aaiClient.getOperationalEnvironments(operationalEnvironmentType, operationalEnvironmentStatus);
+    }
+
+    @Override
+    public AaiResponse<SubscriberList> getFullSubscriberList() {
+        return aaiClient.getAllSubscribers();
+    }
+
+    @Override
+    public AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator) {
+        AaiResponse<Services> subscriberResponse = aaiClient.getSubscriberData(subscriberId);
+        String subscriberGlobalId = subscriberResponse.getT().globalCustomerId;
+        for (ServiceSubscription serviceSubscription : subscriberResponse.getT().serviceSubscriptions.serviceSubscription) {
+            String serviceType = serviceSubscription.serviceType;
+            serviceSubscription.isPermitted = roleValidator.isServicePermitted(subscriberGlobalId, serviceType);
+        }
+        return subscriberResponse;
+
+    }
+
+    @Override
+    public AaiResponse getServiceInstanceSearchResults(String subscriberId, String instanceIdentifier, RoleValidator roleValidator, List<String> owningEntities, List<String> projects) {
+        List<List<ServiceInstanceSearchResult>> resultList = new ArrayList<>();
+        ServiceInstancesSearchResults serviceInstancesSearchResults = new ServiceInstancesSearchResults();
+
+        if (subscriberId != null || instanceIdentifier != null) {
+            resultList.add(getServicesBySubscriber(subscriberId, instanceIdentifier, roleValidator));
+        }
+        if (owningEntities != null) {
+            resultList.add(getServicesByOwningEntityId(owningEntities, roleValidator));
+        }
+        if (projects != null) {
+            resultList.add(getServicesByProjectNames(projects, roleValidator));
+        }
+        if (!resultList.isEmpty()) {
+            Intersection<ServiceInstanceSearchResult> intersection = new Intersection<>();
+            serviceInstancesSearchResults.serviceInstances = intersection.intersectMultipileArray(resultList);
+        }
+
+        return new AaiResponse<>(serviceInstancesSearchResults, null, HttpStatus.SC_OK);
+    }
+
+
+    private List<ServiceInstanceSearchResult> getServicesBySubscriber(String subscriberId, String instanceIdentifier, RoleValidator roleValidator) {
+        AaiResponse<Services> subscriberResponse = aaiClient.getSubscriberData(subscriberId);
+        String subscriberGlobalId = subscriberResponse.getT().globalCustomerId;
+        String subscriberName = subscriberResponse.getT().subscriberName;
+        ServiceSubscriptions serviceSubscriptions = subscriberResponse.getT().serviceSubscriptions;
+
+        return getSearchResultsForSubscriptions(serviceSubscriptions, subscriberId, instanceIdentifier, roleValidator, subscriberGlobalId, subscriberName);
+
+    }
+
+
+    private ArrayList<ServiceInstanceSearchResult> getSearchResultsForSubscriptions(ServiceSubscriptions serviceSubscriptions, String subscriberId, String instanceIdentifier, RoleValidator roleValidator, String subscriberGlobalId, String subscriberName) {
+        ArrayList<ServiceInstanceSearchResult> results = new ArrayList<>();
+
+        if (serviceSubscriptions != null) {
+            for (ServiceSubscription serviceSubscription : serviceSubscriptions.serviceSubscription) {
+                String serviceType = serviceSubscription.serviceType;
+                serviceSubscription.isPermitted = roleValidator.isServicePermitted(subscriberGlobalId, serviceType);
+                ArrayList<ServiceInstanceSearchResult> resultsForSubscription = getSearchResultsForSingleSubscription(serviceSubscription, subscriberId, instanceIdentifier, subscriberName, serviceType);
+                results.addAll(resultsForSubscription);
+            }
+        }
+
+        return results;
+    }
+
+    private ArrayList<ServiceInstanceSearchResult> getSearchResultsForSingleSubscription(ServiceSubscription serviceSubscription, String subscriberId, String instanceIdentifier, String subscriberName, String serviceType) {
+        ArrayList<ServiceInstanceSearchResult> results = new ArrayList<>();
+
+        if (serviceSubscription.serviceInstances != null) {
+            for (ServiceInstance serviceInstance : serviceSubscription.serviceInstances.serviceInstance) {
+                ServiceInstanceSearchResult serviceInstanceSearchResult =
+                        new ServiceInstanceSearchResult(serviceInstance.serviceInstanceId, subscriberId, serviceType, serviceInstance.serviceInstanceName,
+                                subscriberName, serviceInstance.modelInvariantId, serviceInstance.modelVersionId, serviceSubscription.isPermitted);
+
+                if (instanceIdentifier == null) {
+                    results.add(serviceInstanceSearchResult);
+                } else if (serviceInstanceMatchesIdentifier(instanceIdentifier, serviceInstance)) {
+                    results.add(serviceInstanceSearchResult);
+                }
+            }
+        }
+
+        return results;
+    }
+
+    private boolean serviceInstanceMatchesIdentifier(String instanceIdentifier, ServiceInstance serviceInstance) {
+        return instanceIdentifier.equals(serviceInstance.serviceInstanceId) || instanceIdentifier.equals(serviceInstance.serviceInstanceName);
+    }
+
+    @Override
+    public Response getVersionByInvariantId(List<String> modelInvariantId) {
+        try {
+            return aaiClient.getVersionByInvariantId(modelInvariantId);
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to getVersionByInvariantId from A&AI", e);
+        }
+        return null;
+    }
+
+    @Override
+    public AaiResponse<Pnf> getSpecificPnf(String pnfId) {
+        return aaiClient.getSpecificPnf(pnfId);
+    }
+
+    @Override
+    public AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel) {
+        return aaiClient.getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor, equipModel);
+    }
+
+
+
+    @Override
+    public AaiResponse getServices(RoleValidator roleValidator) {
+        AaiResponse<GetServicesAAIRespone> subscriberResponse = aaiClient.getServices();
+        if (subscriberResponse.getT() != null) {
+            for (org.onap.osam.aai.model.AaiGetServicesRequestModel.Service service : subscriberResponse.getT().service) {
+                service.isPermitted = true;
+            }
+        }
+        return subscriberResponse;
+    }
+
+    @Override
+    public AaiResponse<GetTenantsResponse[]> getTenants(String globalCustomerId, String serviceType, RoleValidator roleValidator) {
+        AaiResponse<GetTenantsResponse[]> aaiGetTenantsResponse = aaiClient.getTenants(globalCustomerId, serviceType);
+        GetTenantsResponse[] tenants = aaiGetTenantsResponse.getT();
+        if (tenants != null) {
+            for (int i = 0; i < tenants.length; i++) {
+                tenants[i].isPermitted = roleValidator.isTenantPermitted(globalCustomerId, serviceType, tenants[i].tenantName);
+            }
+        }
+        return aaiGetTenantsResponse;
+
+
+    }
+
+    @Override
+    public AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId) {
+        return aaiClient.getVNFData(globalSubscriberId, serviceType, serviceInstanceId);
+    }
+
+    @Override
+    public Response getVNFData(String globalSubscriberId, String serviceType) {
+        return aaiClient.getVNFData(globalSubscriberId, serviceType);
+    }
+
+    @Override
+    public AaiResponse getAaiZones() {
+        return (AaiResponse<AicZones>) aaiClient.getAllAicZones();
+    }
+
+    @Override
+    public AaiResponse getAicZoneForPnf(String globalCustomerId, String serviceType, String serviceId) {
+        String aicZone = "";
+
+        AaiResponse<ServiceRelationships> serviceInstanceResp = aaiClient.getServiceInstance(globalCustomerId, serviceType, serviceId);
+        if (serviceInstanceResp.getT() != null) {
+            List<String> aicZoneList = getRelationshipDataByType(serviceInstanceResp.getT().getRelationshipList(), "zone", "zone.zone-id");
+            if (!aicZoneList.isEmpty()) {
+                aicZone = aicZoneList.get(0);
+            } else {
+                LOGGER.warn("aic zone not found for service instance " + serviceId);
+            }
+        } else {
+            if (serviceInstanceResp.getErrorMessage() != null) {
+                LOGGER.error("get service instance {} return error {}", serviceId, serviceInstanceResp.getErrorMessage());
+                return new AaiResponse(aicZone , serviceInstanceResp.getErrorMessage() ,serviceInstanceResp.getHttpCode());
+            } else {
+                LOGGER.warn("get service instance {} return empty body", serviceId);
+                return new AaiResponse(aicZone , "get service instance " + serviceId + " return empty body" ,serviceInstanceResp.getHttpCode());
+            }
+        }
+
+        return new AaiResponse(aicZone , null ,HttpStatus.SC_OK);
+    }
+
+    @Override
+    public AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion) {
+        return aaiClient.getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion);
+    }
+
+    @Override
+    public AaiResponse getNetworkCollectionDetails(String serviceInstanceId){
+        AaiResponse<AaiGetNetworkCollectionDetails> getNetworkCollectionDetailsAaiResponse = aaiClient.getNetworkCollectionDetails(serviceInstanceId);
+        return getNetworkCollectionDetailsAaiResponse;
+    }
+
+    @Override
+    public AaiResponse<AaiGetInstanceGroupsByCloudRegion> getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction){
+        AaiResponse<AaiGetInstanceGroupsByCloudRegion> getInstanceGroupsByCloudRegionResponse = aaiClient.getInstanceGroupsByCloudRegion(cloudOwner, cloudRegionId, networkFunction);
+        return getInstanceGroupsByCloudRegionResponse;
+    }
+
+     @Override
+    public List<String> getServiceInstanceAssociatedPnfs(String globalCustomerId, String serviceType, String serviceInstanceId) {
+        List<String> pnfs = new ArrayList<>();
+
+        AaiResponse<ServiceRelationships> serviceInstanceResp = aaiClient.getServiceInstance(globalCustomerId, serviceType, serviceInstanceId);
+        if (serviceInstanceResp.getT() != null) {
+
+            addPnfsToListViaLogicalLinks(pnfs, serviceInstanceResp);
+            addPnfsToListViaDirectRelations(pnfs, serviceInstanceResp);
+
+            if (pnfs.isEmpty()) {
+                LOGGER.warn("no pnf direct relation found for service id:" + serviceInstanceId+
+                        " name: "+serviceInstanceResp.getT().getServiceInstanceName());
+            }
+        } else {
+            if (serviceInstanceResp.getErrorMessage() != null) {
+                LOGGER.error("get service instance {} return error {}", serviceInstanceId, serviceInstanceResp.getErrorMessage());
+            } else {
+                LOGGER.warn("get service instance {} return empty body", serviceInstanceId);
+            }
+        }
+
+        return pnfs.stream().distinct().collect(Collectors.toList());
+    }
+
+    @Override
+    public AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId){
+        AaiResponse<AaiGetRelatedInstanceGroupsByVnfId> aaiResponse = aaiClient.getInstanceGroupsByVnfInstanceId(vnfInstanceId);
+        if(aaiResponse.getHttpCode() == HttpStatus.SC_OK){
+            return new AaiResponse(convertGetInstanceGroupsResponseToSimpleResponse(aaiResponse.getT()), aaiResponse.getErrorMessage(), aaiResponse.getHttpCode());
+        }
+        return aaiClient.getInstanceGroupsByVnfInstanceId(vnfInstanceId);
+    }
+
+    private List<InstanceGroupInfo> convertGetInstanceGroupsResponseToSimpleResponse(AaiGetRelatedInstanceGroupsByVnfId response) {
+        List<InstanceGroupInfo> instanceGroupInfoList = new ArrayList<>();
+        for(org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship: response.getRelationshipList().getRelationship()){
+            getInstanceGroupInfoFromRelationship(relationship, instanceGroupInfoList);
+        }
+        return instanceGroupInfoList;
+    }
+
+    private void getInstanceGroupInfoFromRelationship(org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship, List<InstanceGroupInfo> instanceGroupInfoList) {
+        if(relationship.getRelatedTo().equals("instance-group")){
+            for(org.onap.osam.aai.model.AaiGetNetworkCollectionDetails.RelatedToProperty relatedToProperty: relationship.getRelatedToPropertyList()){
+                if(relatedToProperty.getPropertyKey().equals("instance-group.instance-group-name")){
+                    instanceGroupInfoList.add(new InstanceGroupInfo(relatedToProperty.getPropertyValue()));
+                }
+            }
+        }
+    }
+
+    @Override
+    public  List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationId){
+        return aaiClient.getPortMirroringSourcePorts(configurationId);
+    }
+
+    private void addPnfsToListViaDirectRelations(List<String> pnfs, AaiResponse<ServiceRelationships> serviceInstanceResp) {
+        pnfs.addAll(getRelationshipDataByType(serviceInstanceResp.getT().getRelationshipList(), "pnf", "pnf.pnf-name"));
+    }
+
+    private void addPnfsToListViaLogicalLinks(List<String> pnfs, AaiResponse<ServiceRelationships> serviceInstanceResp) {
+        List<String> logicalLinks = getRelationshipDataByType(serviceInstanceResp.getT().getRelationshipList(), "logical-link", "logical-link.link-name");
+        for (String logicalLink : logicalLinks) {
+            String link;
+            try {
+                link = URLEncoder.encode(logicalLink, "UTF-8");
+            } catch (UnsupportedEncodingException e) {
+                LOGGER.error("Failed to encode logical link: " + logicalLink, e);
+                continue;
+            }
+
+            AaiResponse<LogicalLinkResponse> logicalLinkResp = aaiClient.getLogicalLink(link);
+            if (logicalLinkResp.getT() != null) {
+                //lag-interface is the key for pnf - approved by Bracha
+                List<String> linkPnfs = getRelationshipDataByType(logicalLinkResp.getT().getRelationshipList(), "lag-interface", "pnf.pnf-name");
+                if (!linkPnfs.isEmpty()) {
+                    pnfs.addAll(linkPnfs);
+                } else {
+                    LOGGER.warn("no pnf found for logical link " + logicalLink);
+                }
+            } else {
+                if (logicalLinkResp.getErrorMessage() != null) {
+                    LOGGER.error("get logical link " + logicalLink + " return error", logicalLinkResp.getErrorMessage());
+                } else {
+                    LOGGER.warn("get logical link " + logicalLink + " return empty body");
+                }
+            }
+        }
+    }
+
+    private List<String> getRelationshipDataByType(RelationshipList relationshipList, String relationshipType, String relationshipDataKey) {
+        List<String> relationshipValues = new ArrayList<>();
+        for (Relationship relationship : relationshipList.getRelationship()) {
+            if (relationship.getRelatedTo().equals(relationshipType)) {
+                relationshipValues.addAll( relationship.getRelationDataList().stream()
+                        .filter(rel -> rel.getRelationshipKey().equals(relationshipDataKey))
+                        .map(RelationshipData::getRelationshipValue)
+                        .collect(Collectors.toList())
+                );
+            }
+        }
+
+
+        return relationshipValues;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/AsyncInstantiationBusinessLogicImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/AsyncInstantiationBusinessLogicImpl.java
new file mode 100644
index 0000000..71be06a
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/AsyncInstantiationBusinessLogicImpl.java
@@ -0,0 +1,506 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import com.google.common.collect.ImmutableMap;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.hibernate.SessionFactory;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.exceptions.InvalidAAIResponseException;
+import org.onap.osam.aai.model.AaiNodeQueryResponse;
+import org.onap.osam.aai.model.ResourceType;
+import org.onap.osam.domain.mso.CloudConfiguration;
+import org.onap.osam.exceptions.DbFailureUncheckedException;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.exceptions.MaxRetriesException;
+import org.onap.osam.exceptions.OperationNotAllowedException;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.Job.JobStatus;
+import org.onap.osam.job.JobAdapter;
+import org.onap.osam.job.JobType;
+import org.onap.osam.job.JobsBrokerService;
+import org.onap.osam.model.JobAuditStatus;
+import org.onap.osam.model.NameCounter;
+import org.onap.osam.model.ServiceInfo;
+import org.onap.osam.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.osam.model.serviceInstantiation.VfModule;
+import org.onap.osam.model.serviceInstantiation.Vnf;
+import org.onap.osam.mso.MsoBusinessLogicImpl;
+import org.onap.osam.mso.MsoProperties;
+import org.onap.osam.mso.model.ServiceInstantiationRequestDetails;
+import org.onap.osam.mso.rest.AsyncRequestStatus;
+import org.onap.osam.utils.DaoUtils;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.*;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+@Service
+public class AsyncInstantiationBusinessLogicImpl implements IAsyncInstantiationBusinessLogic {
+
+    private static final int MAX_RETRIES_GETTING_COUNTER = 100;
+    private static final int MAX_RETRIES_GETTING_FREE_NAME_FROM_AAI = 10000;
+    public static final String NAME_FOR_CHECK_AAI_STATUS = "NAME_FOR_CHECK_AAI_STATUS";
+
+    private final DataAccessService dataAccessService;
+
+    private final JobAdapter jobAdapter;
+
+    private final JobsBrokerService jobService;
+
+    private SessionFactory sessionFactory;
+
+    private AaiClientInterface aaiClient;
+
+    private int maxRetriesGettingFreeNameFromAai = MAX_RETRIES_GETTING_FREE_NAME_FROM_AAI;
+
+    private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AsyncInstantiationBusinessLogicImpl.class);
+    private Map<String, JobStatus> msoStateToJobStatusMap = ImmutableMap.<String, JobStatus>builder()
+            .put("inprogress", JobStatus.IN_PROGRESS)
+            .put("failed", JobStatus.FAILED)
+            .put("pause", JobStatus.PAUSE)
+            .put("paused", JobStatus.PAUSE)
+            .put("complete", JobStatus.COMPLETED)
+            .put("pending", JobStatus.IN_PROGRESS)
+            .put("pendingmanualtask", JobStatus.PAUSE)
+            .put("unlocked", JobStatus.IN_PROGRESS)
+            .build();
+
+
+    @Autowired
+    public AsyncInstantiationBusinessLogicImpl(DataAccessService dataAccessService,
+                                               JobAdapter jobAdapter,
+                                               JobsBrokerService jobService,
+                                               SessionFactory sessionFactory,
+                                               AaiClientInterface aaiClient) {
+        this.dataAccessService = dataAccessService;
+        this.jobAdapter = jobAdapter;
+        this.jobService = jobService;
+        this.sessionFactory = sessionFactory;
+        this.aaiClient = aaiClient;
+    }
+
+    @Override
+    public List<ServiceInfo> getAllServicesInfo() {
+        return dataAccessService.getList(ServiceInfo.class, filterByCreationDateAndNotDeleted(), orderByCreatedDateAndStatus(), null);
+    }
+
+    private String filterByCreationDateAndNotDeleted() {
+        LocalDateTime minus3Months = LocalDateTime.now().minusMonths(3);
+        Timestamp filterDate = Timestamp.valueOf(minus3Months);
+        return " where" +
+                "   hidden = false" +
+                "   and deleted_at is null" +  // don't fetch deleted
+                "   and created >= '" + filterDate + "' ";
+    }
+
+    private String orderByCreatedDateAndStatus() {
+        return " createdBulkDate DESC ,\n" +
+                "  (CASE jobStatus\n" +
+                "   WHEN 'COMPLETED' THEN 0\n" +
+                "   WHEN 'FAILED' THEN 0\n" +
+                "   WHEN 'IN_PROGRESS' THEN 1\n" +
+                "   WHEN 'PAUSE' THEN 2\n" +
+                "   WHEN 'PENDING' THEN 3\n" +
+                "   WHEN 'STOPPED' THEN 3 END),\n" +
+                "  statusModifiedDate ";
+    }
+
+    @Override
+    public List<UUID> pushBulkJob(ServiceInstantiation request, String userId) {
+        List<UUID> uuids = new ArrayList<>();
+        Date createdBulkDate = Calendar.getInstance().getTime();
+        int bulkSize = request.getBulkSize();
+        UUID templateId = UUID.randomUUID();
+        for (int i = 0; i < bulkSize; i++) {
+            //Job job = jobAdapter.createJob(JobType.ServiceInstantiation, request, templateId, userId, i);
+            Job job = jobAdapter.createJob(JobType.NoOp, request, templateId, userId, i);//should be some instatiation, this was changed as part of code cleaning
+
+            UUID jobId = jobService.add(job);
+            auditVidStatus(jobId,job.getStatus());
+            uuids.add(jobId);
+            dataAccessService.saveDomainObject(createServiceInfo(userId, request, jobId, templateId, createdBulkDate), DaoUtils.getPropsMap());
+        }
+        return uuids;
+    }
+
+    private ServiceInfo createServiceInfo(String userId, ServiceInstantiation serviceInstantiation, UUID jobId, UUID templateId, Date createdBulkDate) {
+        return new ServiceInfo(
+                userId, Job.JobStatus.PENDING, serviceInstantiation.isPause(), jobId, templateId,
+                serviceInstantiation.getOwningEntityId(),
+                serviceInstantiation.getOwningEntityName(),
+                serviceInstantiation.getProjectName(),
+                serviceInstantiation.getAicZoneId(),
+                serviceInstantiation.getAicZoneName(),
+                serviceInstantiation.getTenantId(),
+                serviceInstantiation.getTenantName(),
+                serviceInstantiation.getLcpCloudRegionId(),
+                null,
+                serviceInstantiation.getSubscriptionServiceType(),
+                serviceInstantiation.getSubscriberName(),
+                null,
+                serviceInstantiation.getInstanceName(),
+                serviceInstantiation.getModelInfo().getModelInvariantId(),
+                serviceInstantiation.getModelInfo().getModelName(),
+                serviceInstantiation.getModelInfo().getModelVersion(),
+                createdBulkDate
+        );
+    }
+
+
+    /*//@Override
+    public RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateServiceInstantiationRequest(UUID jobId, ServiceInstantiation payload, String userId) {
+
+           ServiceInstantiationRequestDetails.ServiceInstantiationOwningEntity owningEntity = new ServiceInstantiationRequestDetails.ServiceInstantiationOwningEntity(payload.getOwningEntityId(), payload.getOwningEntityName());
+
+        SubscriberInfo subscriberInfo = new SubscriberInfo();
+        subscriberInfo.setGlobalSubscriberId(payload.getGlobalSubscriberId());
+
+        String serviceInstanceName = null;
+        if(payload.isUserProvidedNaming()) {
+            serviceInstanceName = getUniqueName(payload.getInstanceName(), ResourceType.SERVICE_INSTANCE);
+            String finalServiceInstanceName = serviceInstanceName;
+            updateServiceInfo(jobId, x -> x.setServiceInstanceName(finalServiceInstanceName));
+        }
+        ServiceInstantiationRequestDetails.RequestInfo requestInfo = new ServiceInstantiationRequestDetails.RequestInfo(
+                serviceInstanceName,
+                payload.getProductFamilyId(),
+                "VID",
+                payload.isRollbackOnFailure(),
+                userId);
+
+        List<ServiceInstantiationRequestDetails.ServiceInstantiationService> serviceInstantiationService = new LinkedList<>();
+        List<Map<String, String>> unFilteredInstanceParams = payload.getInstanceParams() != null ? payload.getInstanceParams() : new LinkedList<>();
+        List<Map<String, String>> filteredInstanceParams = removeUnNeededParams(unFilteredInstanceParams);
+        ServiceInstantiationRequestDetails.ServiceInstantiationService serviceInstantiationService1 = new ServiceInstantiationRequestDetails.ServiceInstantiationService(
+                payload.getModelInfo(),
+                serviceInstanceName,
+                filteredInstanceParams,
+                createServiceInstantiationVnfList(payload)
+        );
+        serviceInstantiationService.add(serviceInstantiationService1);
+
+        ServiceInstantiationRequestDetails.RequestParameters requestParameters = new ServiceInstantiationRequestDetails.RequestParameters(payload.getSubscriptionServiceType(), false, serviceInstantiationService);
+
+        ServiceInstantiationRequestDetails.Project project = payload.getProjectName() != null ?  new ServiceInstantiationRequestDetails.Project(payload.getProjectName()) : null;
+
+        ServiceInstantiationRequestDetails requestDetails = new ServiceInstantiationRequestDetails(payload.getModelInfo(), owningEntity, subscriberInfo,
+                project, requestInfo, requestParameters);
+
+        RequestDetailsWrapper<ServiceInstantiationRequestDetails> requestDetailsWrapper = new RequestDetailsWrapper(requestDetails);
+        debugRequestDetails(requestDetailsWrapper, logger);
+        return requestDetailsWrapper;
+    }*/
+
+    private List<Map<String, String>> removeUnNeededParams(List<Map<String, String>> instanceParams) {
+        List<String> keysToRemove = new ArrayList<>();
+        if (instanceParams != null && !instanceParams.isEmpty()) {
+            for (String key : instanceParams.get(0).keySet()) {
+                for (String paramToIgnore : PARAMS_TO_IGNORE)
+                    if ((key.equalsIgnoreCase(paramToIgnore))) {
+                        keysToRemove.add(key);
+                    }
+            }
+            for (String key : keysToRemove) {
+                instanceParams.get(0).remove(key);
+            }
+            //TODO will be removed on once we stop using List<Map<String, String>>
+            if (instanceParams.get(0).isEmpty()) {
+                return Collections.emptyList();
+            }
+        }
+        return instanceParams;
+    }
+
+    private ServiceInstantiationRequestDetails.ServiceInstantiationVnfList createServiceInstantiationVnfList(ServiceInstantiation payload) {
+        CloudConfiguration cloudConfiguration = new CloudConfiguration();
+        cloudConfiguration.setTenantId(payload.getTenantId());
+        cloudConfiguration.setLcpCloudRegionId(payload.getLcpCloudRegionId());
+
+        Map<String, Vnf> vnfs = payload.getVnfs();
+        List<ServiceInstantiationRequestDetails.ServiceInstantiationVnf> vnfList = new ArrayList<>();
+        for (Vnf vnf : vnfs.values()) {
+            Map<String, Map<String, VfModule>> vfModules = vnf.getVfModules();
+            List<VfModule> convertedUnFilteredVfModules = convertVfModuleMapToList(vfModules);
+            List<VfModule> filteredVfModules = filterInstanceParamsFromVfModuleAndUniqueNames(convertedUnFilteredVfModules, vnf.isUserProvidedNaming());
+            ServiceInstantiationRequestDetails.ServiceInstantiationVnf serviceInstantiationVnf = new ServiceInstantiationRequestDetails.ServiceInstantiationVnf(
+                    vnf.getModelInfo(),
+                    cloudConfiguration,
+                    vnf.getPlatformName(),
+                    vnf.getLineOfBusiness(),
+                    payload.getProductFamilyId(),
+                    removeUnNeededParams(vnf.getInstanceParams()),
+                    filteredVfModules,
+                    vnf.isUserProvidedNaming() ? getUniqueName(vnf.getInstanceName(), ResourceType.GENERIC_VNF) : null
+            );
+            vnfList.add(serviceInstantiationVnf);
+        }
+
+        return new ServiceInstantiationRequestDetails.ServiceInstantiationVnfList(vnfList);
+    }
+
+    private List<VfModule> convertVfModuleMapToList(Map<String, Map<String, VfModule>> vfModules) {
+        return vfModules.values().stream().flatMap(vfModule -> vfModule.values().stream()).collect(Collectors.toList());
+    }
+
+    private List<VfModule> filterInstanceParamsFromVfModuleAndUniqueNames(List<VfModule> unFilteredVfModules, boolean isUserProvidedNaming) {
+        return unFilteredVfModules.stream().map(vfModule ->
+                new VfModule(
+                        vfModule.getModelInfo(),
+                        getUniqueNameIfNeeded(isUserProvidedNaming, vfModule.getInstanceName(), ResourceType.VF_MODULE),
+                        getUniqueNameIfNeeded(isUserProvidedNaming, vfModule.getVolumeGroupInstanceName(), ResourceType.VOLUME_GROUP),
+                        removeUnNeededParams(vfModule.getInstanceParams())))
+                .collect(Collectors.toList());
+    }
+
+    private String getUniqueNameIfNeeded(boolean isUserProvidedNaming, String name, ResourceType resourceType) {
+        return isUserProvidedNaming && !StringUtils.isEmpty(name) ?
+                getUniqueName(name, resourceType) : null;
+    }
+
+    @Override
+    public String getServiceInstantiationPath(ServiceInstantiation serviceInstantiationRequest) {
+        //in case pause flag is true - use assign , else - use create.
+        return MsoBusinessLogicImpl.validateEndpointPath(
+                serviceInstantiationRequest.isPause() ?
+                        "mso.restapi.serviceInstanceAssign" : "mso.restapi.serviceInstanceCreate"
+        );
+    }
+
+    @Override
+    public String getOrchestrationRequestsPath() {
+        return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_GET_ORC_REQ);
+    }
+
+    @Override
+    public ServiceInfo updateServiceInfo(UUID jobUUID, Consumer<ServiceInfo> serviceUpdater) {
+        ServiceInfo serviceInfo = getServiceInfoByJobId(jobUUID);
+        serviceUpdater.accept(serviceInfo);
+        dataAccessService.saveDomainObject(serviceInfo, DaoUtils.getPropsMap());
+        return serviceInfo;
+    }
+
+    @Override
+    public ServiceInfo updateServiceInfoAndAuditStatus(UUID jobUuid, JobStatus jobStatus) {
+        auditVidStatus(jobUuid,jobStatus);
+        return updateServiceInfo(jobUuid, x -> setServiceInfoStatus(x, jobStatus));
+    }
+
+    private void setServiceInfoStatus(ServiceInfo serviceInfo, JobStatus jobStatus) {
+        serviceInfo.setJobStatus(jobStatus);
+        serviceInfo.setStatusModifiedDate(new Date());
+    }
+
+    public ServiceInfo getServiceInfoByJobId(UUID jobUUID) {
+        List<ServiceInfo> serviceInfoList = dataAccessService.getList(ServiceInfo.class, String.format(" where jobId = '%s' ", jobUUID), null, null);
+        if (serviceInfoList.size() != 1) {
+            throw new GenericUncheckedException("Failed to retrieve job with uuid " + jobUUID + " from ServiceInfo table. Instances found: " + serviceInfoList.size());
+        }
+        return serviceInfoList.get(0);
+    }
+
+    public List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source) {
+        return dataAccessService.getList(
+            JobAuditStatus.class,
+            String.format(" where SOURCE = '%s' and JOB_ID = '%s'",source, jobUUID),
+            " CREATED_DATE ", null);
+    }
+
+    private JobAuditStatus getLatestAuditStatus(UUID jobUUID, JobAuditStatus.SourceStatus source){
+        List<JobAuditStatus> list = getAuditStatuses(jobUUID,source);
+        return !list.isEmpty() ? list.get(list.size()-1) : null;
+    }
+
+    @Override
+    public void auditVidStatus(UUID jobUUID, JobStatus jobStatus){
+        JobAuditStatus vidStatus = new JobAuditStatus(jobUUID, jobStatus.toString(), JobAuditStatus.SourceStatus.VID);
+        auditStatus(vidStatus);
+    }
+
+    @Override
+    public void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus){
+        auditMsoStatus(jobUUID, msoRequestStatus.requestStatus.getRequestState(), msoRequestStatus.requestId, msoRequestStatus.requestStatus.getStatusMessage());
+    }
+
+    @Override
+    public void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo){
+        JobAuditStatus msoStatus = new JobAuditStatus(jobUUID, jobStatus, JobAuditStatus.SourceStatus.MSO,
+                requestId != null ? UUID.fromString(requestId) : null,
+                additionalInfo);
+        auditStatus(msoStatus);
+    }
+
+    private void auditStatus(JobAuditStatus jobAuditStatus){
+        JobAuditStatus latestStatus = getLatestAuditStatus(jobAuditStatus.getJobId(),jobAuditStatus.getSource());
+        if (latestStatus == null || !latestStatus.equals(jobAuditStatus))
+            dataAccessService.saveDomainObject(jobAuditStatus, DaoUtils.getPropsMap());
+
+    }
+
+    public Job.JobStatus calcStatus(AsyncRequestStatus asyncRequestStatus) {
+        String msoRequestState = asyncRequestStatus.request.requestStatus.getRequestState().toLowerCase().replaceAll("[^a-z]+", "");
+        JobStatus jobStatus = msoStateToJobStatusMap.get(msoRequestState);
+        return (jobStatus != null ? jobStatus : JobStatus.IN_PROGRESS);
+    }
+
+    @Override
+    public void handleFailedInstantiation(UUID jobUUID) {
+        ServiceInfo serviceInfo = updateServiceInfoAndAuditStatus(jobUUID, JobStatus.FAILED);
+        List<ServiceInfo> serviceInfoList = dataAccessService.getList(
+                ServiceInfo.class,
+                String.format(" where templateId = '%s' and jobStatus = '%s'",
+                        serviceInfo.getTemplateId(),
+                        JobStatus.PENDING),
+                null, null);
+        serviceInfoList.forEach(si -> updateServiceInfoAndAuditStatus(si.getJobId(), JobStatus.STOPPED));
+    }
+
+    @Override
+    public void deleteJob(UUID jobId) {
+        jobService.delete(jobId);
+        Date now = new Date();
+        updateServiceInfo(jobId, x -> x.setDeletedAt(now));
+    }
+
+    @Override
+    public void hideServiceInfo(UUID jobUUID) {
+        ServiceInfo serviceInfo = getServiceInfoByJobId(jobUUID);
+        if (!serviceInfo.getJobStatus().isFinal()) {
+            String message = String.format( "jobId %s: Service status does not allow hide service, status = %s",
+                    serviceInfo.getJobId(),
+                    serviceInfo.getJobStatus());
+            logger.error(EELFLoggerDelegate.errorLogger, message);
+            throw new OperationNotAllowedException(message);
+        }
+        serviceInfo.setHidden(true);
+        dataAccessService.saveDomainObject(serviceInfo, DaoUtils.getPropsMap());
+    }
+
+    @Override
+    public int
+
+
+    getCounterForName(String name) {
+
+        String hqlSelectNC = "from NameCounter where name = :name";
+        String hqlUpdateCounter = "update NameCounter set counter = :newCounter " +
+                "where name= :name " +
+                "and counter= :prevCounter";
+
+        Integer counter = null;
+        GenericUncheckedException lastException = null;
+        for (int i = 0; i< MAX_RETRIES_GETTING_COUNTER && counter==null; i++) {
+            try {
+                counter = calcCounter(name, hqlSelectNC, hqlUpdateCounter);
+            }
+            catch (GenericUncheckedException exception) {
+                lastException = exception; //do nothing, we will try again in the loop
+            }
+        }
+
+        if (counter!=null) {
+            return counter;
+        }
+
+        throw lastException!=null ? new DbFailureUncheckedException(lastException) :
+                new DbFailureUncheckedException("Failed to get counter for "+name+" due to unknown error");
+
+    }
+
+    private Integer calcCounter(String name, String hqlSelectNC, String hqlUpdateCounter) {
+        Integer counter;
+        counter = DaoUtils.tryWithSessionAndTransaction(sessionFactory, session -> {
+            NameCounter nameCounter = (NameCounter) session.createQuery(hqlSelectNC)
+                    .setText("name", name)
+                    .uniqueResult();
+            if (nameCounter != null) {
+                int updatedRows = session.createQuery(hqlUpdateCounter)
+                        .setText("name", nameCounter.getName())
+                        .setInteger("prevCounter", nameCounter.getCounter())
+                        .setInteger("newCounter", nameCounter.getCounter() + 1)
+                        .executeUpdate();
+                if (updatedRows == 1) {
+                    return nameCounter.getCounter() + 1;
+                }
+            } else {
+                Object nameAsId = session.save(new NameCounter(name));
+                //if save success
+                if (nameAsId != null) {
+                    return 1;
+                }
+            }
+            //in case of failure return null, in order to continue the loop
+            return null;
+        });
+        return counter;
+    }
+
+    @Override
+    public int getMaxRetriesGettingFreeNameFromAai() {
+        return maxRetriesGettingFreeNameFromAai;
+    }
+
+    @Override
+    public void setMaxRetriesGettingFreeNameFromAai(int maxRetriesGettingFreeNameFromAai) {
+        this.maxRetriesGettingFreeNameFromAai = maxRetriesGettingFreeNameFromAai;
+    }
+
+    @Override
+    public String getUniqueName(String name, ResourceType resourceType) {
+        //check that name aai response well before increasing counter from DB
+        //Prevents unnecessary increasing of the counter while AAI doesn't response
+        isNameFreeInAai(NAME_FOR_CHECK_AAI_STATUS, resourceType);
+
+        for (int i=0; i<getMaxRetriesGettingFreeNameFromAai(); i++) {
+            int counter = getCounterForName(name);
+            String newName = formatNameAndCounter(name, counter);
+            if (isNameFreeInAai(newName, resourceType)) {
+                return newName;
+            }
+        }
+
+        throw new MaxRetriesException("find unused name for "+name, getMaxRetriesGettingFreeNameFromAai());
+    }
+
+    //the method is protected so we can call it in the UT
+    protected String formatNameAndCounter(String name, int counter) {
+        return name + "_" + String.format("%03d", counter);
+    }
+
+    private boolean isNameFreeInAai(String name, ResourceType resourceType) throws InvalidAAIResponseException {
+        AaiResponse<AaiNodeQueryResponse> aaiResponse = aaiClient.searchNodeTypeByName(name, resourceType);
+        if (aaiResponse.getHttpCode() > 399 || aaiResponse.getT() == null) {
+            throw new InvalidAAIResponseException(aaiResponse);
+        }
+        return CollectionUtils.isEmpty(aaiResponse.getT().resultData);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/AuditServiceImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/AuditServiceImpl.java
new file mode 100644
index 0000000..b4c5a10
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/AuditServiceImpl.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.springframework.stereotype.Service;
+
+import javax.inject.Inject;
+import java.io.IOException;
+import java.util.UUID;
+
+
+@Service
+public class AuditServiceImpl implements IAuditService {
+
+    @Inject
+    private IAsyncInstantiationBusinessLogic asyncInstantiationBL;
+
+    @Override
+    public void setFailedAuditStatusFromMso(UUID jobUuid, String requestId, int statusCode, String msoResponse){
+        final String failedMsoRequestStatus = "FAILED";
+        String additionalInfo = formatExceptionAdditionalInfo(statusCode, msoResponse);
+        asyncInstantiationBL.auditMsoStatus(jobUuid, failedMsoRequestStatus, requestId, additionalInfo);
+    }
+
+    private String formatExceptionAdditionalInfo(int statusCode, String msoResponse) {
+        String errorMsg = "Http Code:" + statusCode;
+        if (!StringUtils.isEmpty(msoResponse)) {
+            String filteredJson;
+            try {
+                ObjectMapper objectMapper = new ObjectMapper();
+                filteredJson = StringUtils.defaultIfEmpty(
+                        objectMapper.readTree(msoResponse).path("serviceException").toString().replaceAll("[\\{\\}]","") ,
+                        msoResponse
+                );
+            } catch (JsonParseException e) {
+                filteredJson = msoResponse;
+            } catch (IOException e) {
+                throw new GenericUncheckedException(e);
+            }
+
+            errorMsg = errorMsg + ", " + filteredJson;
+        }
+        return errorMsg;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/BulkInstantiationServiceImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/BulkInstantiationServiceImpl.java
new file mode 100644
index 0000000..8e4ae76
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/BulkInstantiationServiceImpl.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobAdapter;
+import org.onap.osam.job.JobsBrokerService;
+import org.onap.osam.model.JobBulk;
+import org.onap.osam.model.JobModel;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.ws.rs.NotFoundException;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+@Service
+public class BulkInstantiationServiceImpl implements IBulkInstantiationService {
+
+    private JobsBrokerService jobsBrokerService;
+    private JobAdapter jobAdapter;
+
+    @Autowired
+    public BulkInstantiationServiceImpl(JobsBrokerService jobsBrokerService, JobAdapter jobAdapter) {
+        this.jobsBrokerService = jobsBrokerService;
+        this.jobAdapter = jobAdapter;
+    }
+
+    @Override
+    public JobBulk saveBulk(Map<String, Object> bulkRequest) {
+        List<Job> jobList = jobAdapter.createBulkOfJobs(bulkRequest);
+        jobList.forEach(jobsBrokerService::add);
+        return jobAdapter.toModelBulk(jobList);
+    }
+
+    @Override
+    public JobModel getJob(UUID uuid) {
+        Job job = jobsBrokerService.peek(uuid);
+
+        if (job == null || job.getUuid() == null) {
+            throw new NotFoundException("Job with uuid " + uuid + " not found");
+        }
+        return jobAdapter.toModel(job);
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/CsvServiceImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/CsvServiceImpl.java
new file mode 100644
index 0000000..e95ab28
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/CsvServiceImpl.java
@@ -0,0 +1,272 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import com.opencsv.CSVReader;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.ws.rs.BadRequestException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import static org.onap.osam.utils.Logging.getMethodName;
+
+@Service
+public class CsvServiceImpl implements ICsvService {
+
+
+    static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CsvServiceImpl.class);
+
+    private static final String ARRAY_REGEX = "\\[(.*?)\\]";
+
+
+    private String [] removeBOMFromCsv(String [] line){
+        if (line.length>0)
+            line[0] = line[0].replaceFirst("\uFEFF","").replaceFirst("ï»¿","");
+        return line;
+    }
+
+    /**
+     * read a csv file and puts its content in list of string arrays (without the empty lines)
+     * @param filePath - the path of file to read
+     * @return the content of file
+     * @throws IOException
+     */
+    @Override
+    public List<String[]> readCsv(String filePath) throws IOException {
+        CSVReader reader = new CSVReader(new FileReader(filePath));
+        return readCsv(reader);
+    }
+
+    @Override
+    public List<String[]> readCsv(MultipartFile file) throws IOException {
+        CSVReader reader = new CSVReader(new InputStreamReader(file.getInputStream()));
+        return readCsv(reader);
+    }
+
+    private List<String[]> addLineWithoutSpaces(List<String[]> myEntries, String [] line){
+        line = Arrays.stream(line).filter(x -> !"".equals(x)).toArray(String[]::new);
+        if(line.length > 0)
+            myEntries.add(line);
+        return myEntries;
+    }
+
+
+    private  List<String[]> readCsv(CSVReader reader) throws IOException {
+        try {
+            List<String[]> myEntries = new ArrayList<>() ;
+            String [] line;
+            Boolean firstLine = true;
+            while ((line = reader.readNext())!= null) {
+                if (firstLine) {
+                    line = removeBOMFromCsv(line);
+                    firstLine = false;
+                }
+                myEntries = addLineWithoutSpaces(myEntries, line);
+            }
+            return myEntries;
+        }
+        catch (Exception e){
+            logger.error("error during reading CSV file. exception:" + e.getMessage());
+            throw e;
+        }
+
+    }
+
+    /**
+     * main function that call to the recursive function with initial parameters
+     * @param myEntries - the matrix with file content
+     * @return the json
+     * @throws IOException
+     * @throws InstantiationException
+     * @throws IllegalAccessException
+     */
+    @Override
+    public JSONObject convertCsvToJson (List<String[]> myEntries) throws InstantiationException, IllegalAccessException {
+        try {
+            return buildJSON(myEntries, 0, 0, myEntries.size(), JSONObject.class);
+        }
+        catch (Exception e){
+            logger.error("error during parsing CSV file. exception:" + e.getMessage());
+            throw e;
+        }
+
+    }
+
+    /**
+     * it goes over the matrix column while the values are the same and returns the index of changed value
+     * @param myEntries the matrix
+     * @param i row index refer to the whole matrix
+     * @param j column index
+     * @param numLines the length of the current inner matrix
+     * @param startLine row index of inner matrix
+     * @return the index of changed line
+     */
+    private int findIndexOfChangedLine(List<String[]> myEntries, final int i, final int j, final int numLines, final int startLine) {
+        int k;
+        for(k = 0; k + i - startLine < numLines && myEntries.get(i)[j].equals(myEntries.get(k + i)[j]) ; k++);
+        return k;
+    }
+
+    /**
+     *  check in array if its first element or if the key already exist in the previous item
+     * @param jsonArray - the array to search in
+     * @param key - the key to check
+     * @return if exists or first element return true, otherwise- false
+     */
+    private Boolean keyExistsOrFirstElement( JSONArray jsonArray,String key){
+        Boolean exists = false;
+        Boolean first = false;
+        JSONObject lastItem = lastItemInArray(jsonArray);
+        if (lastItem == null) {
+            first = true;
+        }
+        else {
+            if (lastItem.has(key)) {
+                exists = true;
+            }
+        }
+        return exists||first;
+    }
+
+    /**
+     * return last json in json array
+     * @param jsonArray
+     * @return last item or null if the array is empty
+     */
+    private JSONObject lastItemInArray(JSONArray jsonArray){
+        JSONObject lastItem = null;
+        if(jsonArray.length()>0) {
+            lastItem = (JSONObject) jsonArray.get(jsonArray.length() - 1);
+        }
+        return lastItem;
+    }
+
+    /**
+     * append current json to the main json
+     * @param json - the main json to append to it
+     * @param key - key to append
+     * @param values - value(s) to append
+     * @param <T> can be JSONObject or JSONArray
+     * @param <E> string or jsonObject or jsonArray
+     * @return json after put
+     * @throws IllegalAccessException
+     * @throws InstantiationException
+     */
+    private <T, E> T putJson(T json, String key, E values) throws IllegalAccessException, InstantiationException {
+        if (json instanceof JSONArray){
+            JSONArray currentJson= ((JSONArray)json);
+            if (values == null) //array of strings (for last item)
+            {
+                currentJson.put(key);
+            }
+            else {
+                if (keyExistsOrFirstElement(currentJson, key)) {
+                    currentJson.put(new JSONObject().put(key, values));
+                } else {
+                    JSONObject lastItem = lastItemInArray(currentJson);
+                    if(lastItem != null){
+                        lastItem.put(key, values);
+                    }
+
+                }
+            }
+        }
+        if (json instanceof JSONObject){
+            if (values == null)
+                throw new BadRequestException("Invalid csv file");
+            ((JSONObject)json).put(key,values);
+        }
+        return json;
+    }
+
+
+    /**
+     *  recursive function to build JSON. Each time it counts the same values in left and send the smaller matrix
+     *  (until the changed value) to the next time.
+     *
+     * @param myEntries - the whole matrix
+     * @param i- row index of the whole matrix
+     * @param j - column index
+     * @param numLines - number of lines of inner matrix (num of same values in the left column)
+     * @param clazz JSONArray or JSONObject
+     * @param <T> JSONArray or JSONObject
+     * @return the json object
+     * @throws IllegalAccessException
+     * @throws InstantiationException
+     */
+    private <T> T buildJSON(List<String[]> myEntries, int i, final int j, final int numLines, Class<T> clazz) throws IllegalAccessException, InstantiationException {
+        logger.debug(EELFLoggerDelegate.debugLogger, "start {}({}, {}, {})", getMethodName(), i, j, numLines);
+        T json = clazz.newInstance();
+        int startLine = i;
+        while(i < numLines + startLine){
+            String[] currentRow = myEntries.get(i);
+            int length = currentRow.length;
+            int currentDuplicateRows = findIndexOfChangedLine(myEntries,i,j,numLines, startLine);
+            String key = currentRow[j];
+            if (j == length-1) {
+                json = putJson(json,currentRow[j],null);
+            }
+            else
+            {
+                json = buildJsonRow(myEntries, i, j, json, currentRow, length, currentDuplicateRows, key);
+            }
+            i += currentDuplicateRows;
+        }
+        logger.debug(EELFLoggerDelegate.debugLogger, "end {} json = {}", getMethodName(), json);
+        return json;
+    }
+
+    private <T> T buildJsonRow(List<String[]> myEntries, int i, int j, T json, String[] currentRow, int length, int currentDuplicateRows, String key) throws IllegalAccessException, InstantiationException {
+        if (key.matches(ARRAY_REGEX)){
+            JSONArray arrayObjects = buildJSON(myEntries, i, j + 1, currentDuplicateRows, JSONArray.class);
+            json = putJson(json,key.replaceAll("\\[","").replaceAll("]",""),arrayObjects);
+        }
+        else {
+            if (j < length - 2) {
+                json = putJson(json, currentRow[j], buildJSON(myEntries, i, j + 1, currentDuplicateRows, JSONObject.class));
+            }
+            else
+            {
+                if (j == length - 2)//last object
+                {
+                    if(currentDuplicateRows > 1) {
+                        throw new BadRequestException("Invalid csv file");
+                    }
+                    json = putJson(json, currentRow[j], currentRow[j + 1]);
+                }
+            }
+        }
+        return json;
+    }
+
+}
+
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IAaiService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IAaiService.java
new file mode 100644
index 0000000..b30d957
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IAaiService.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.SubscriberFilteredResults;
+import org.onap.osam.aai.model.AaiGetInstanceGroupsByCloudRegion;
+import org.onap.osam.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
+import org.onap.osam.aai.model.AaiGetPnfs.Pnf;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.aai.model.PortDetailsTranslator;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.roles.RoleValidator;
+
+import javax.ws.rs.core.Response;
+import java.util.List;
+
+public interface IAaiService {
+
+
+    SubscriberFilteredResults getFullSubscriberList(RoleValidator roleValidator);
+
+    AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator);
+
+    AaiResponse getServiceInstanceSearchResults(String subscriberId, String instanceIdentifier, RoleValidator roleProvider, List<String> owningEntities, List<String> projects);
+
+    AaiResponse<SubscriberList> getFullSubscriberList();
+
+    AaiResponse getServices(RoleValidator roleValidator);
+    
+    AaiResponse getAaiZones();
+
+    AaiResponse getNetworkCollectionDetails(String serviceInstanceId);
+
+    AaiResponse<AaiGetInstanceGroupsByCloudRegion> getInstanceGroupsByCloudRegion(String cloudOwner, String cloudRegionId, String networkFunction);
+
+    AaiResponse<OperationalEnvironmentList> getOperationalEnvironments(String operationalEnvironmentType, String operationalEnvironmentStatus);
+
+    AaiResponse getAicZoneForPnf(String globalCustomerId , String serviceType , String serviceId);
+
+    Response getVNFData(String globalSubscriberId, String serviceType);
+
+    AaiResponse<GetTenantsResponse[]> getTenants(String globalCustomerId, String serviceType, RoleValidator roleValidator);
+
+    AaiResponse getVNFData(String globalSubscriberId, String serviceType, String serviceInstanceId);
+
+    AaiResponse getNodeTemplateInstances(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion);
+
+    Response getVersionByInvariantId(List<String> modelInvariantId);
+
+    AaiResponse<Pnf> getSpecificPnf(String pnfId);
+
+    List<String> getServiceInstanceAssociatedPnfs(String globalCustomerId, String serviceType, String serviceInstanceId);
+
+    AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel);
+
+    List<PortDetailsTranslator.PortDetails> getPortMirroringSourcePorts(String configurationId);
+
+    AaiResponse getInstanceGroupsByVnfInstanceId(String vnfInstanceId);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IAsyncInstantiationBusinessLogic.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IAsyncInstantiationBusinessLogic.java
new file mode 100644
index 0000000..39e2b73
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IAsyncInstantiationBusinessLogic.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.aai.model.ResourceType;
+import org.onap.osam.job.Job;
+import org.onap.osam.model.JobAuditStatus;
+import org.onap.osam.model.ServiceInfo;
+import org.onap.osam.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.osam.mso.rest.AsyncRequestStatus;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+import java.util.function.Consumer;
+
+public interface IAsyncInstantiationBusinessLogic {
+
+    List<String> PARAMS_TO_IGNORE = Arrays.asList("vnf_name", "vf_module_name");
+
+    List<ServiceInfo> getAllServicesInfo();
+
+    List<UUID> pushBulkJob(ServiceInstantiation request, String userId);
+
+    String getServiceInstantiationPath(ServiceInstantiation serviceInstantiationRequest);
+
+    String getOrchestrationRequestsPath();
+
+    ServiceInfo getServiceInfoByJobId(UUID jobUUID);
+
+    List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source);
+
+    ServiceInfo updateServiceInfo(UUID jobUUID, Consumer<ServiceInfo> serviceUpdater);
+
+    ServiceInfo updateServiceInfoAndAuditStatus(UUID jobUuid, Job.JobStatus jobStatus);
+
+    void auditVidStatus(UUID jobUUID, Job.JobStatus jobStatus);
+
+    void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus);
+
+    void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo);
+
+    Job.JobStatus calcStatus(AsyncRequestStatus asyncRequestStatus);
+
+    void handleFailedInstantiation(UUID jobUUID);
+
+    void deleteJob(UUID jobId);
+
+    void hideServiceInfo(UUID jobUUID);
+
+    int getCounterForName(String name);
+
+    int getMaxRetriesGettingFreeNameFromAai();
+
+    void setMaxRetriesGettingFreeNameFromAai(int maxRetriesGettingFreeNameFromAai);
+
+    String getUniqueName(String name, ResourceType resourceType);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IAuditService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IAuditService.java
new file mode 100644
index 0000000..c806d88
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IAuditService.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import java.util.UUID;
+
+public interface IAuditService {
+
+    void setFailedAuditStatusFromMso(UUID jobUuid, String requestId, int statusCode, String msoResponse);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IBulkInstantiationService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IBulkInstantiationService.java
new file mode 100644
index 0000000..ede1a5d
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IBulkInstantiationService.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.model.JobBulk;
+import org.onap.osam.model.JobModel;
+
+import java.util.Map;
+import java.util.UUID;
+
+public interface IBulkInstantiationService {
+
+    JobBulk saveBulk(Map<String, Object> bulkRequest);
+
+    JobModel getJob(UUID uuid);
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/ICsvService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/ICsvService.java
new file mode 100644
index 0000000..dd6cdda
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/ICsvService.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.json.JSONObject;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.List;
+
+public interface ICsvService {
+    List<String[]> readCsv(String filePath) throws IOException;
+    JSONObject convertCsvToJson (List<String[]> myEntries) throws InstantiationException, IllegalAccessException;
+    List<String[]> readCsv(MultipartFile file) throws IOException;
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IPodService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IPodService.java
new file mode 100644
index 0000000..5e88f07
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IPodService.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+public interface IPodService {
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IPombaService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IPombaService.java
new file mode 100644
index 0000000..ef2fe04
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IPombaService.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.model.PombaInstance.PombaRequest;
+
+public interface IPombaService {
+    void verify(PombaRequest request);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IRoleGeneratorService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IRoleGeneratorService.java
new file mode 100644
index 0000000..a7f69bd
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IRoleGeneratorService.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+public interface IRoleGeneratorService {
+    String generateRoleScript(Boolean firstRun);
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/IWorkflowService.java b/onap-enabler-be/src/main/java/org/onap/osam/services/IWorkflowService.java
new file mode 100644
index 0000000..e756c15
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/IWorkflowService.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import java.util.Collection;
+
+public interface IWorkflowService {
+    Collection<String> getWorkflowsForVNFs(Collection<String> vnfNames);
+    Collection<String> getAllWorkflows();
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/PombaServiceImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/PombaServiceImpl.java
new file mode 100644
index 0000000..dea4d39
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/PombaServiceImpl.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.aai.PombaClientInterface;
+import org.onap.osam.model.PombaInstance.PombaRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class PombaServiceImpl implements IPombaService {
+
+    @Autowired
+    private PombaClientInterface pombaClientInterface;
+
+
+    @Override
+    public void verify(PombaRequest request) {
+        pombaClientInterface.verify(request);
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/RoleGenaratorServiceImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/RoleGenaratorServiceImpl.java
new file mode 100644
index 0000000..c2a18eb
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/RoleGenaratorServiceImpl.java
@@ -0,0 +1,189 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import jline.internal.Log;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.ServiceSubscription;
+import org.onap.osam.aai.Services;
+import org.onap.osam.model.ModelConstants;
+import org.onap.osam.model.Subscriber;
+import org.onap.osam.model.SubscriberList;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+
+@Service
+public class RoleGenaratorServiceImpl implements IRoleGeneratorService {
+
+    public static final String ROLE_ID_COLUMN = "ROLE_ID";
+    @Autowired
+    AaiClientInterface client;
+
+    public static final String DB_NAME =  "vid_portal";
+    public static final String TBL_NAME = "fn_role";
+    public static final String TEMP_DELIMITER ="***";
+    public static final String OLD_DELIMITER = "_";
+
+    @Override
+    public String generateRoleScript(Boolean firstRun) {
+        String query =  "USE " + DB_NAME + ";\r\n" +
+                "SET SQL_SAFE_UPDATES = 0;\r\n";
+        try {
+            AaiResponse<SubscriberList> subscribers = client.getAllSubscribers();
+            if (firstRun) {
+                query += replaceRolesToTempDelimiter("subscriber",buildSubscribersValuesForMappingsTable(subscribers.getT()));
+            }
+            query += addAvailableRolesCombination(firstRun, subscribers);
+
+        }
+        catch (Exception e) {
+            Log.error("There was an error in updating roles "+e.getMessage());
+        }
+        return query;
+    }
+
+    private String addAvailableRolesCombination(Boolean firstRun, AaiResponse<SubscriberList> subscribers) {
+        String query, availableRoles="";
+        HashMap<String,String> servicesNames = new HashMap<String,String>();
+        for (Subscriber subscriber: subscribers.getT().customer) {
+            AaiResponse<Services> subscriberResponse = client.getSubscriberData(subscriber.globalCustomerId);
+            for(ServiceSubscription service: subscriberResponse.getT().serviceSubscriptions.serviceSubscription) {
+                servicesNames.put(service.serviceType,"");
+                String roleName = "'" + subscriber.subscriberName + ModelConstants.ROLE_DELIMITER + service.serviceType + "'";
+                availableRoles += "("+roleName+"),";
+
+
+            }
+        }
+        availableRoles = availableRoles.substring(0,availableRoles.length()-1);
+        query = createTemporaryTableAvailableRoles(availableRoles);
+        if (firstRun){
+            query += replaceRolesToTempDelimiter("service",buildServicesValuesForMappingsTable(servicesNames));
+            query += replaceToNewDelimiter();
+            query += deleteWrongRecords();
+
+        }
+        query += insertAvailableRolesToFnRole();
+        query += dropTemporaryTable("available_roles");
+        return query;
+    }
+
+    private String buildSubscribersValuesForMappingsTable(SubscriberList subscribers){
+        String query="";
+        for (Subscriber subscriber : subscribers.customer) {
+            String subscriberName = subscriber.subscriberName.contains(OLD_DELIMITER) ? subscriber.subscriberName.replace(OLD_DELIMITER, TEMP_DELIMITER) : subscriber.subscriberName;
+            query = query + "('" + subscriber.globalCustomerId + "','" + subscriberName + "') ,";
+        }
+        if(query.length() > 0)
+            query = query.substring(0, query.length()-1) + ";\r\n";
+        return query;
+    }
+
+    private String buildServicesValuesForMappingsTable(HashMap<String,String> servicesNames){
+        final String[] query = {""};
+        servicesNames.forEach((k,v)->{
+            if (k.contains(OLD_DELIMITER)) {
+                query[0] += "('" + k + "' ,'" + k.replace(OLD_DELIMITER, TEMP_DELIMITER) +"'),";
+            }
+        });
+        if(query[0].length() > 0)
+            query[0] = query[0].substring(0, query[0].length()-1) + ";\r\n";
+        return query[0];
+    }
+
+    private String replaceRolesToTempDelimiter(String entityName, String valuesForMappingsTable ) {
+
+        AaiResponse<Services> services = client.getServices();
+        String query = "";
+        if (valuesForMappingsTable.length() > 0) {
+            query = "CREATE TEMPORARY TABLE IF NOT EXISTS " + entityName + "Mappings(mapKey VARCHAR(255),mapValue VARCHAR(255));\r\n" +
+                    "INSERT INTO " + entityName + "Mappings VALUES ";
+            query += valuesForMappingsTable;
+            query += "UPDATE " + TBL_NAME + "\r\n" +
+                    "INNER JOIN " + entityName + "Mappings ON role_name LIKE concat('%',mapKey, '%')\r\n" +
+                    "SET ROLE_NAME = REPLACE(ROLE_NAME, mapKey, mapValue) ;  \r\n" +
+                    dropTemporaryTable(entityName + "Mappings");
+        }
+        return query;
+    }
+
+    private String replaceToNewDelimiter(){
+        String query =  "UPDATE " + TBL_NAME + "\r\n" +
+                "SET ROLE_NAME = REPLACE(ROLE_NAME, '" + OLD_DELIMITER + "', '" + ModelConstants.ROLE_DELIMITER + "');\r\n" ;
+        query += "UPDATE fn_role\r\n" +
+                "SET ROLE_NAME = REPLACE(ROLE_NAME, '" + TEMP_DELIMITER + "', '" + OLD_DELIMITER + "');\r\n" ;
+        return query;
+    }
+
+    private String insertAvailableRolesToFnRole(){
+        String query="INSERT INTO fn_role (ROLE_NAME, ACTIVE_YN, PRIORITY)\r\n" +
+                "SELECT RNAME, 'Y', 5\r\n" +
+                "FROM available_roles\r\n" +
+                "WHERE NOT EXISTS (SELECT ROLE_NAME\r\n" +
+                "FROM fn_role \r\n" +
+                "where RNAME = ROLE_NAME);\r\n";
+        return query;
+    }
+
+
+
+    private String createTemporaryTableAvailableRoles(String availableRoles) {
+        String query = "CREATE TEMPORARY TABLE IF NOT EXISTS available_roles(rname VARCHAR(255));\r\n";
+        query += "INSERT INTO available_roles VALUES "+availableRoles+";\r\n";
+                return query;
+    }
+
+    private String deleteWrongRecords(){
+        String query ="CREATE TEMPORARY TABLE IF NOT EXISTS wrong_roles(roleID INT);\r\n" +
+                "INSERT INTO wrong_roles (roleID)\r\n" +
+                "SELECT ROLE_ID FROM fn_role LEFT JOIN available_roles ON role_name LIKE concat(rname, '%')\r\n" +
+                "WHERE available_roles.rname IS NULL AND ROLE_ID NOT IN (1,16);\r\n";
+        query += deleteCascade();
+        query += dropTemporaryTable("wrong_roles");
+        return query;
+    }
+
+    private String deleteCascade() {
+        String query = deleteFromTableByRoles("fn_role_composite", "PARENT_ROLE_ID");
+        query = query.substring(0, query.length()-1);
+        query += " OR wrong_roles.ROLEID = fn_role_composite.CHILD_ROLE_ID;\r\n";
+        query += deleteFromTableByRoles("fn_role_function", ROLE_ID_COLUMN)+ "\r\n";
+        query += deleteFromTableByRoles("fn_user_role", ROLE_ID_COLUMN)+ "\r\n";
+        query += deleteFromTableByRoles(TBL_NAME, ROLE_ID_COLUMN)+ "\r\n";
+        return query;
+    }
+
+    private String deleteFromTableByRoles(String table, String column) {
+        String query = "DELETE FROM " + table + "\r\n";
+        query += "using  " + table + " inner join wrong_roles\r\n" +
+                "where wrong_roles.ROLEID = " + table + "." + column + ";";
+        return query;
+    }
+
+    private String dropTemporaryTable(String table) {
+        return "DROP TEMPORARY TABLE IF EXISTS " + table + ";\r\n";
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/services/WorkflowServiceImpl.java b/onap-enabler-be/src/main/java/org/onap/osam/services/WorkflowServiceImpl.java
new file mode 100644
index 0000000..b84de5b
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/services/WorkflowServiceImpl.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.model.Workflow;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+@Service
+public class WorkflowServiceImpl implements IWorkflowService {
+    //TODO: Add the list of workflows hard coded or from DB.
+    private ArrayList<Workflow> workflows = new ArrayList<>(Arrays.asList(
+            new Workflow(0, "Upgrade", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3", "VNF4"))),
+            new Workflow(1, "Clean", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3"))),
+            new Workflow(2, "Reinstall", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF4"))),
+            new Workflow(3, "Dump", new ArrayList<>(Arrays.asList("VNF1", "VNF3", "VNF4"))),
+            new Workflow(4, "Flush", new ArrayList<>(Arrays.asList("VNF2", "VNF3", "VNF4")))
+    ));
+
+    @Override
+    public Collection<String> getWorkflowsForVNFs(Collection<String> vnfNames) {
+        Collection<String> result = workflows.stream()
+                .filter(workflow -> workflow.getVnfNames().containsAll(vnfNames))
+                .map(workflow -> workflow.getWorkflowName())
+                .distinct()
+                .collect(Collectors.toList());
+
+        return result;
+    }
+
+    @Override
+    public Collection<String> getAllWorkflows() {
+        return workflows.stream()
+                .map(workflow -> workflow.getWorkflowName())
+                .distinct()
+                .collect(Collectors.toList());
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/utils/DaoUtils.java b/onap-enabler-be/src/main/java/org/onap/osam/utils/DaoUtils.java
new file mode 100644
index 0000000..c5612dd
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/utils/DaoUtils.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.utils;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.portalsdk.core.domain.FusionObject;
+
+import java.util.HashMap;
+import java.util.function.Function;
+
+public class DaoUtils {
+
+    //all credit for this wonderful method go to is9613
+    public static<T> T tryWithSessionAndTransaction(SessionFactory sessionFactory, Function<Session, T> update) {
+        // opens a session and transactions, executes the input query.
+        // gracefully close session and transaction once error occurres.
+        Session session = null;
+        Transaction tx = null;
+        try {
+            session = sessionFactory.openSession();
+            tx = session.beginTransaction();
+
+            T res = update.apply(session);
+
+            tx.commit();
+
+            return res;
+        } catch (RuntimeException e) {
+            try {
+                if (tx != null) {
+                    tx.rollback();
+                }
+            } catch (RuntimeException e2) {
+                // e2 is ingnored; we would like to know the
+                // original failure reason, not only the reason
+                // for rollback's failure
+                throw new GenericUncheckedException("Failed rolling back transaction", e);
+            }
+            throw new GenericUncheckedException("Rolled back transaction", e);
+        } finally {
+            if (session != null) {
+                session.close();
+            }
+        }
+    }
+
+    public static HashMap<String, Object> getPropsMap() {
+        HashMap<String, Object> props = new HashMap<>();
+        props.put(FusionObject.Parameters.PARAM_USERID, 0);
+        return props;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/utils/Intersection.java b/onap-enabler-be/src/main/java/org/onap/osam/utils/Intersection.java
new file mode 100644
index 0000000..6fd9ff9
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/utils/Intersection.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.utils;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class Intersection<T> {
+    public List<T> intersectMultipileArray(List<List<T>> lists) {
+        if (lists.size() == 1) {
+            return lists.get(0);
+        } else {
+            List<T> intersectResult = intersectTwoArrays(lists.get(0),lists.get(1));
+
+            lists.remove(0);
+            lists.remove(0);
+            lists.add(0,intersectResult);
+            return intersectMultipileArray(lists);
+        }
+
+    }
+
+    public List<T> intersectTwoArrays(List<T> list1, List<T> list2) {
+
+        List<T> intersect = list1.stream()
+                .filter(list2::contains)
+                .collect(Collectors.toList());
+        return intersect;
+    }
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/utils/Logging.java b/onap-enabler-be/src/main/java/org/onap/osam/utils/Logging.java
new file mode 100644
index 0000000..ed30322
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/utils/Logging.java
@@ -0,0 +1,200 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.utils;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.google.common.collect.ImmutableList;
+import io.joshworks.restclient.http.HttpResponse;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.http.HttpMethod;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.ProcessingException;
+import javax.ws.rs.core.Response;
+import java.util.Arrays;
+import java.util.Optional;
+import java.util.UUID;
+
+import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
+import static org.apache.commons.lang3.exception.ExceptionUtils.getRootCause;
+import static org.apache.commons.lang3.exception.ExceptionUtils.getThrowableList;
+import static org.onap.osam.utils.Streams.not;
+
+public class Logging {
+
+    Logging() {
+    }
+
+    public static final String HTTP_REQUESTS_OUTGOING = "http.requests.outgoing.";
+
+    public static final String REQUEST_ID_HEADER_KEY = SystemProperties.ECOMP_REQUEST_ID;
+
+    private static ObjectMapper objectMapper = new ObjectMapper();
+
+    public static String getMethodName() {
+        return getMethodName(0);
+    }
+
+    public static String getMethodCallerName() {
+        return getMethodName(1);
+    }
+
+    private static String getMethodName(int depth) {
+        final StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
+        String thisClassName = stackTrace[1].getClassName();
+        final Optional<String> caller =
+                Arrays.stream(stackTrace)
+                        .skip(1)
+                        .filter(not(frame -> frame.getClassName().equals(thisClassName)))
+                        .skip(depth)
+                        .map(StackTraceElement::getMethodName)
+                        .findFirst();
+        return caller.orElse("<unknonwn method name>");
+    }
+
+    public static EELFLogger getRequestsLogger(String serverName) {
+        return EELFLoggerDelegate.getLogger(HTTP_REQUESTS_OUTGOING +serverName);
+    }
+
+    public static void logRequest(final EELFLogger logger, final HttpMethod method, final String url, final Object body) {
+        if (!logger.isDebugEnabled()) {
+            return;
+        }
+
+        if (body == null) {
+            logRequest(logger, method, url);
+            return;
+        }
+
+        try {
+            String bodyAsJson = objectMapper.writeValueAsString(body);
+            logger.debug("Sending  {} {} Body: {}", method.name(), url, bodyAsJson);
+        } catch (JsonProcessingException e) {
+            logRequest(logger, method, url);
+            logger.debug("Failed to parse object in logRequest. {}", body);
+        }
+    }
+
+    public static void logRequest(final EELFLogger logger, final HttpMethod method, final String url) {
+        logger.debug("Sending  {} {}", method.name(), url);
+    }
+
+    public static <T> void logResponse(final EELFLogger logger, final HttpMethod method, final String url, final Response response, final Class<T> entityClass) {
+        if (!logger.isDebugEnabled()) {
+            return;
+        }
+        if (response == null) {
+            logger.debug("Received {} {} response: null", method.name(), url);
+            return;
+        }
+        try {
+            response.bufferEntity();
+            logger.debug("Received {} {} Status: {} . Body: {}", method.name(), url, response.getStatus(), response.readEntity(entityClass));
+        }
+        catch (ProcessingException | IllegalStateException e) {
+            logger.debug("Received {} {} Status: {} . Failed to read response as {}", method.name(), url, response.getStatus(), entityClass.getName());
+        }
+    }
+
+    public static <T> void logResponse(final EELFLogger logger, final HttpMethod method, final String url, final HttpResponse<T> response) {
+        try {
+            logger.debug("Received {} {} Status: {} . Body: {}", method.name(), url, response.getStatus(), response.getBody());
+        }
+        catch (ProcessingException | IllegalStateException e) {
+            logger.debug("Received {} {} Status: {} . Failed to read response", method.name(), url, response.getStatus());
+        }
+    }
+
+    public static void logResponse(final EELFLogger logger, final HttpMethod method, final String url, final Response response) {
+        logResponse(logger, method, url, response, String.class);
+    }
+
+    public static HttpServletRequest getHttpServletRequest(){
+        return ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
+    }
+
+    public static String extractOrGenerateRequestId() {
+        try {
+            return getHttpServletRequest().getHeader(REQUEST_ID_HEADER_KEY);
+        }
+        catch (IllegalStateException e) {
+            //in async jobs we don't have any HttpServletRequest
+            return UUID.randomUUID().toString();
+        }
+    }
+
+    public static void debugRequestDetails(Object requestDetails, final EELFLogger logger) {
+        if (logger.isDebugEnabled()) {
+            String requestDetailsAsString;
+            try {
+                requestDetailsAsString = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT).writeValueAsString(requestDetails);
+            } catch (JsonProcessingException e) {
+                requestDetailsAsString = "error: cannot stringify RequestDetails";
+            }
+            logger.debug("requestDetailsAsString: {}", requestDetailsAsString);
+        }
+    }
+
+    public static String exceptionToDescription(Throwable exceptionToDescribe) {
+        // Ignore top-most GenericUnchecked or Runtime exceptions that has no added message
+        final Throwable top = getThrowableList(exceptionToDescribe).stream()
+                .filter(not(e -> ImmutableList.of(GenericUncheckedException.class, RuntimeException.class).contains(e.getClass())
+                        && StringUtils.equals(e.getMessage(), e.getCause() == null ? null : e.getCause().toString())))
+                .findFirst().orElse(exceptionToDescribe);
+
+        final Throwable root = defaultIfNull(getRootCause(top), top);
+
+        String rootToString = root.toString();
+
+        // nullPointer description will include some context
+        if (root.getClass().equals(NullPointerException.class) && root.getStackTrace().length > 0) {
+            rootToString = String.format("NullPointerException at %s:%d",
+                    root.getStackTrace()[0].getFileName(),
+                    root.getStackTrace()[0].getLineNumber());
+        }
+
+        // if input is a single exception, without cause: top.toString
+        // else: return top.toString + root.toString
+        //       but not if root is already described in top.toString
+        if (top.equals(root)) {
+            return rootToString;
+        } else {
+            final String topToString = top.toString();
+            if (topToString.contains(root.getClass().getName()) && topToString.contains(root.getLocalizedMessage())) {
+                return topToString;
+            } else {
+                return topToString + ": " + rootToString;
+            }
+        }
+    }
+
+
+}
diff --git a/onap-enabler-be/src/main/java/org/onap/osam/utils/Streams.java b/onap-enabler-be/src/main/java/org/onap/osam/utils/Streams.java
new file mode 100644
index 0000000..b9ee683
--- /dev/null
+++ b/onap-enabler-be/src/main/java/org/onap/osam/utils/Streams.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.utils;
+
+import java.util.Iterator;
+import java.util.Spliterator;
+import java.util.Spliterators;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
+
+public class Streams {
+    public static <R> Predicate<R> not(Predicate<R> predicate) {
+        return predicate.negate();
+    }
+
+    public static <T> Stream<T> fromIterator(final Iterator<T> iterator) {
+        Iterable<T> iterable = () -> iterator;
+        return StreamSupport.<T>stream(iterable.spliterator(), false);
+    }
+
+
+    // https://stackoverflow.com/questions/20746429/limit-a-stream-by-a-predicate
+    private static <T> Spliterator<T> takeWhile(
+            Spliterator<T> splitr, Predicate<? super T> predicate) {
+        return new Spliterators.AbstractSpliterator<T>(splitr.estimateSize(), 0) {
+            boolean stillGoing = true;
+            @Override public boolean tryAdvance(Consumer<? super T> consumer) {
+                if (stillGoing) {
+                    boolean hadNext = splitr.tryAdvance(elem -> {
+                        if (predicate.test(elem)) {
+                            consumer.accept(elem);
+                        } else {
+                            stillGoing = false;
+                        }
+                    });
+                    return hadNext && stillGoing;
+                }
+                return false;
+            }
+        };
+    }
+
+    public static <T> Stream<T> takeWhile(Stream<T> stream, Predicate<? super T> predicate) {
+        return StreamSupport.stream(takeWhile(stream.spliterator(), predicate), false);
+    }
+
+}
diff --git a/onap-enabler-be/src/main/resources/aai_config_instance_view_edit.json b/onap-enabler-be/src/main/resources/aai_config_instance_view_edit.json
new file mode 100644
index 0000000..3cd4506
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/aai_config_instance_view_edit.json
@@ -0,0 +1,81 @@
+{
+  "model-name":"Proxy-Config-Instance",
+  "configuration":{
+    "configuration-id": "9533-config-LB1113",
+    "configuration-name": "configuration-name-9533",
+    "configuration-type": "configuration-type-9533",
+    "configuration-sub-type": "configuration-sub-type-9533",
+    "model-invariant-id": "model-invariant-id-9533",
+    "model-version-id": "model-version-id-9533",
+    "orchestration-status": "Active",
+    "operational-status": "",
+    "configuration-selflink": "",
+    "model-customization-id": "model-customization-id-9533",
+    "resource-version": "1504038855716"
+  },
+  "extra-properties": {
+  },
+  "inventory-response-items":{
+    "inventory-response-item":[
+      {
+        "model-name":"VidPcrf051517..pcrf_nimbus_pcm..module-4",
+        "l-interface": {
+          "interface-name": "9533lInterface-LB1113",
+          "interface-role": "8ni",
+          "v6-wan-link-ip": "Pnr",
+          "selflink": "Un56B",
+          "interface-id": "o74n",
+          "macaddr": "8an6",
+          "network-name": "kjOn",
+          "management-option": "0Rn7",
+          "interface-description": "XPnLr",
+          "is-port-mirrored": true,
+          "resource-version": "1504038598348",
+          "in-maint": false,
+          "is-ip-unnumbered": false,
+          "relationship-list": {
+            "relationship": [
+              {
+                "related-to": "logical-link",
+                "related-link": "/aai/v11/network/logical-links/logical-link/logicallink-987654321-21-LB1113",
+                "relationship-data": [
+                  {
+                    "relationship-key": "logical-link.link-name",
+                    "relationship-value": "logicallink-987654321-21-LB1113"
+                  }
+                ]
+              }
+            ]
+          },
+          "l3-interface-ipv4-address-list": [
+            {
+              "l3-interface-ipv4-address": "112.121.144.16",
+              "l3-interface-ipv4-prefix-length": 59,
+              "vlan-id-inner": 917,
+              "vlan-id-outer": 519,
+              "is-floating": true,
+              "resource-version": "1504038598353",
+              "neutron-network-id": "HX6m54p1akX",
+              "neutron-subnet-id": "nbmX5okGg"
+            }
+          ],
+          "l3-interface-ipv6-address-list": [
+            {
+              "l3-interface-ipv6-address": "2001:232E:2333:2322:122C:CDD:2AE3:3E4",
+              "l3-interface-ipv6-prefix-length": 76,
+              "vlan-id-inner": 27,
+              "vlan-id-outer": 710,
+              "is-floating": true,
+              "resource-version": "1504038598364",
+              "neutron-network-id": "xBR0OOToQ",
+              "neutron-subnet-id": "4E0gZLH"
+            }
+          ]
+        },
+        "extra-properties":{
+
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/aai_get_node_template_instances.json b/onap-enabler-be/src/main/resources/aai_get_node_template_instances.json
new file mode 100644
index 0000000..f6e3d52
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/aai_get_node_template_instances.json
@@ -0,0 +1,101 @@
+{"results": [
+  {
+    "id": "1976357096",
+    "node-type": "generic-vnf",
+    "url": "/aai/v11/network/generic-vnfs/generic-vnf/VNF-1-9887-jc689q",
+    "properties":       {
+      "vnf-id": "0846287b-65bf-45a6-88f6-6a1af4149fac",
+      "vnf-name": "vnf9887-1jc689q",
+      "vnf-name2": "notused",
+      "vnf-type": "VRR",
+      "service-id": "VRRaaS",
+      "regional-resource-zone": "notusedforMobility",
+      "prov-status": "PREPROV",
+      "operational-status": "",
+      "license-key": "novalue",
+      "equipment-role": "VRR",
+      "orchestration-status": "Created",
+      "heat-stack-id": "1234",
+      "mso-catalog-key": "msokey",
+      "ipv4-oam-address": "135.60.77.25",
+      "ipv4-loopback0-address": "12.60.77.25",
+      "nm-lan-v6-address": "2001:1890:1F8:2075::1:4",
+      "management-v6-address": "2001:1890:1F8:2075::1:5",
+      "in-maint": false,
+      "is-closed-loop-disabled": false,
+      "resource-version": "1505337418309",
+      "model-invariant-id": "96129eb9-f0de-4e05-8af2-73146473f766",
+      "model-version-id": "5761e0a7-c6df-4d8a-9ebd-b8f445054dec",
+      "widget-model-id": "78789",
+      "widget-model-version": "7",
+      "nf-function": "nf-function in ASDC",
+      "nf-role": "nf-role in ASDC",
+      "nf-naming-code": "code in ASDC",
+      "selflink": "pathToController"
+    },
+    "related-to":       [
+      {
+        "id": "1689710648",
+        "node-type": "service-instance",
+        "url": "/aai/v11/business/customers/customer/customer-9887-jc689q/service-subscriptions/service-subscription/VRR/service-instances/service-instance/SI-9887-jc689q"
+      },
+      {
+        "id": "1362120784",
+        "node-type": "vserver",
+        "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-2-9887-jc689q"
+      },
+      {
+        "id": "2017317104",
+        "node-type": "vserver",
+        "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-1-9887-jc689q"
+      }
+    ]
+  },
+  {
+    "id": "2362269792",
+    "node-type": "generic-vnf",
+    "url": "/aai/v11/network/generic-vnfs/generic-vnf/VNF-2-9887-jc689q",
+    "properties":       {
+      "vnf-id": "c187e9fe-40c3-4862-b73e-84ff056205f6",
+      "vnf-name": "vnf9887-2jc689q",
+      "vnf-name2": "notused",
+      "vnf-type": "VRR",
+      "service-id": "VRRaaS",
+      "regional-resource-zone": "notusedforMobility",
+      "prov-status": "PREPROV",
+      "operational-status": "",
+      "license-key": "novalue",
+      "equipment-role": "VRR",
+      "orchestration-status": "Created",
+      "heat-stack-id": "1234",
+      "mso-catalog-key": "msokey",
+      "ipv4-oam-address": "135.60.77.25",
+      "ipv4-loopback0-address": "12.60.77.25",
+      "nm-lan-v6-address": "2001:1890:1F8:2075::1:4",
+      "management-v6-address": "2001:1890:1F8:2075::1:5",
+      "in-maint": false,
+      "is-closed-loop-disabled": false,
+      "resource-version": "1505337418754",
+      "model-invariant-id": "96129eb9-f0de-4e05-8af2-73146473f766",
+      "model-version-id": "5761e0a7-c6df-4d8a-9ebd-b8f445054dec",
+      "widget-model-id": "78789",
+      "widget-model-version": "7",
+      "nf-function": "nf-function in ASDC",
+      "nf-role": "nf-role in ASDC",
+      "nf-naming-code": "code in ASDC",
+      "selflink": "pathToController"
+    },
+    "related-to":       [
+      {
+        "id": "1689710648",
+        "node-type": "service-instance",
+        "url": "/aai/v11/business/customers/customer/customer-9887-jc689q/service-subscriptions/service-subscription/VRR/service-instances/service-instance/SI-9887-jc689q"
+      },
+      {
+        "id": "1689706552",
+        "node-type": "vserver",
+        "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/cloudOwner-id-9887-jc689q/cloudRegion-id-9887-jc689q/tenants/tenant/tenant-id-9887-jc689q/vservers/vserver/vserver-id-3-9887-jc689q"
+      }
+    ]
+  }
+]}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/catalog.json b/onap-enabler-be/src/main/resources/catalog.json
new file mode 100644
index 0000000..ae4d684
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/catalog.json
@@ -0,0 +1,174 @@
+{
+	"services": {
+		"0346aa9f-57b7-458a-9681-daf5b19d52b0": {
+			"uuid": "0346aa9f-57b7-458a-9681-daf5b19d52b0",
+			"name": "The Worst Service",
+			"version": "1.0",
+			"toscaModelURL": "sampleTosca.csar",
+			"category": "Bad Services",
+			"lifecycleState": "NOT_CERTIFIED_CHECKOUT",
+			"lastUpdaterUserId": "example@example.org",
+			"lastUpdaterFullName": "Example User",
+			"distributionStatus": "DISTRIBUTION_REJECTED",
+			"artifacts": [],
+			"resources": []
+		},
+		"1346aa9f-57b7-458a-9681-daf5b19d52b1": {
+			"uuid": "1346aa9f-57b7-458a-9681-daf5b19d52b1",
+			"name": "The Worst Service",
+			"version": "1.1",
+			"toscaModelURL": "sampleTosca.csar",
+			"category": "Bad Services",
+			"lifecycleState": "CERTIFIED",
+			"lastUpdaterUserId": "example@example.org",
+			"lastUpdaterFullName": "Example User",
+			"distributionStatus": "DISTRIBUTED",
+			"artifacts": [],
+			"resources": []
+		},
+		"3346aa9f-57b7-458a-9681-daf5b19d52b3": {
+			"uuid": "3346aa9f-57b7-458a-9681-daf5b19d52b3",
+			"name": "Bland Service",
+			"version": "1.9",
+			"toscaModelURL": "sampleTosca.csar",
+			"category": "Neutral Services",
+			"lifecycleState": "CERTIFIED",
+			"lastUpdaterUserId": "example@example.org",
+			"lastUpdaterFullName": "Example User",
+			"distributionStatus": "DISTRIBUTION_NOT_APPROVED",
+			"artifacts": [],
+			"resources": []
+		},
+		"2346aa9f-57b7-458a-9681-daf5b19d52b2": {
+			"uuid": "2346aa9f-57b7-458a-9681-daf5b19d52b2",
+			"name": "The Best Service",
+			"version": "1.3",
+			"toscaModelURL": "sampleTosca.csar",
+			"category": "Good Services",
+			"lifecycleState": "CERTIFIED",
+			"lastUpdaterUserId": "example@example.org",
+			"lastUpdaterFullName": "Example User",
+			"distributionStatus": "DISTRIBUTION_APPROVED",
+			"artifacts": [
+					{
+						"artifactUUID": "0cf78c81-1246-45e7-a190-eaa309ee5680",
+						"generatedFromUUID": "3cf78c81-1246-45e7-a190-eaa309ee5680",
+						"artifactName": "The Worst Artifact",
+						"artifactType": "HEAT",
+						"artifactDescription": "This is the worst artifact",
+						"artifactURL": "http://www.openecomp.org/",
+						"artifactTimeout": "60",
+						"artifactChecksum": "A worthy checksum",
+						"artifactVersion": "0.1"
+					},
+					{
+						"artifactUUID": "1cf78c81-1246-45e7-a190-eaa309ee5681",
+						"generatedFromUUID": "3cf78c81-1246-45e7-a190-eaa309ee5680",
+						"artifactName": "The Worst Artifact",
+						"artifactType": "HEAT",
+						"artifactDescription": "This is the worst artifact",
+						"artifactURL": "http://www.openecomp.org/",
+						"artifactTimeout": "60",
+						"artifactChecksum": "A worthy checksum",
+						"artifactVersion": "0.1"
+					},
+					{
+						"artifactUUID": "2cf78c81-1246-45e7-a190-eaa309ee5682",
+						"generatedFromUUID": "3cf78c81-1246-45e7-a190-eaa309ee5680",
+						"artifactName": "The Worst Artifact",
+						"artifactType": "HEAT",
+						"artifactDescription": "This is the worst artifact",
+						"artifactURL": "http://www.openecomp.org/",
+						"artifactTimeout": "60",
+						"artifactChecksum": "A worthy checksum",
+						"artifactVersion": "0.1"
+					}
+			],
+			"resources": []
+		}
+	},
+	"resources": {
+		"2f92b5b0-10ff-4cf4-9531-88546fe88a42": {
+			"uuid": "2f92b5b0-10ff-4cf4-9531-88546fe88a42",
+			"invariantUUID": "df92b5b0-10ff-4cf4-9531-88546fe88a4d",
+			"name": "The Worst Resource",
+			"version": "0.1",
+			"toscaModelURL": "sampleTosca.csar",
+			"toscaModel": "http://www.openecomp.org/",
+			"toscaResourceName": "The Worst Resource (TOSCA)",
+			"category": "Bad Resources",
+			"subCategory": "Really Bad Resources",
+			"resourceType": "VF",
+			"lifecycleState": "CERTIFIED",
+			"lastUpdaterUserId": "example@example.org",
+			"lastUpdaterFullName": "Example User",
+			"artifacts": [
+					{
+						"artifactUUID": "0cf78c81-1246-45e7-a190-eaa309ee5680",
+						"generatedFromUUID": "3cf78c81-1246-45e7-a190-eaa309ee5680",
+						"artifactName": "The Worst Artifact",
+						"artifactType": "HEAT",
+						"artifactDescription": "This is the worst artifact",
+						"artifactURL": "http://www.openecomp.org/",
+						"artifactTimeout": "60",
+						"artifactChecksum": "A worthy checksum",
+						"artifactVersion": "0.1"
+					},
+					{
+						"artifactUUID": "1cf78c81-1246-45e7-a190-eaa309ee5681",
+						"generatedFromUUID": "3cf78c81-1246-45e7-a190-eaa309ee5680",
+						"artifactName": "The Worst Artifact",
+						"artifactType": "HEAT",
+						"artifactDescription": "This is the worst artifact",
+						"artifactURL": "http://www.openecomp.org/",
+						"artifactTimeout": "60",
+						"artifactChecksum": "A worthy checksum",
+						"artifactVersion": "0.1"
+					},
+					{
+						"artifactUUID": "2cf78c81-1246-45e7-a190-eaa309ee5682",
+						"generatedFromUUID": "3cf78c81-1246-45e7-a190-eaa309ee5680",
+						"artifactName": "The Worst Artifact",
+						"artifactType": "HEAT",
+						"artifactDescription": "This is the worst artifact",
+						"artifactURL": "http://www.openecomp.org/",
+						"artifactTimeout": "60",
+						"artifactChecksum": "A worthy checksum",
+						"artifactVersion": "0.1"
+					}
+			]
+		},
+		"0f92b5b0-10ff-4cf4-9531-88546fe88a40": {
+			"uuid": "0f92b5b0-10ff-4cf4-9531-88546fe88a40",
+			"invariantUUID": "df92b5b0-10ff-4cf4-9531-88546fe88a4d",
+			"name": "The Worst Resource",
+			"version": "0.1",
+			"toscaModelURL": "sampleTosca.csar",
+			"toscaModel": "http://www.openecomp.org/",
+			"toscaResourceName": "The Worst Resource (TOSCA)",
+			"category": "Bad Resources",
+			"subCategory": "Really Bad Resources",
+			"resourceType": "VF",
+			"lifecycleState": "CERTIFIED",
+			"lastUpdaterUserId": "example@example.org",
+			"lastUpdaterFullName": "Example User",
+			"artifacts": []
+		},
+		"1f92b5b0-10ff-4cf4-9531-88546fe88a41": {
+			"uuid": "1f92b5b0-10ff-4cf4-9531-88546fe88a41",
+			"invariantUUID": "df92b5b0-10ff-4cf4-9531-88546fe88a4d",
+			"name": "The Worst Resource",
+			"version": "0.1",
+			"toscaModelURL": "sampleTosca.csar",
+			"toscaModel": "http://www.openecomp.org/",
+			"toscaResourceName": "The Worst Resource (TOSCA)",
+			"category": "Bad Resources",
+			"subCategory": "Really Bad Resources",
+			"resourceType": "VF",
+			"lifecycleState": "CERTIFIED",
+			"lastUpdaterUserId": "example@example.org",
+			"lastUpdaterFullName": "Example User",
+			"artifacts": []
+		}
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/cloudConfiguration b/onap-enabler-be/src/main/resources/json/mso/cloudConfiguration
new file mode 100644
index 0000000..eb62779
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/cloudConfiguration
@@ -0,0 +1,19 @@
+{
+    "$schema": "http://json-schema.org/draft-04/schema#",
+	"description": "fields communicating the cloud configuration in a standard way",
+	"type": "object",
+	"properties": {  
+		"nodeLocation": {
+			"description": "Location identifier for the node",
+			"type": "string"
+		},  
+		"lcpCloudRegionId": {
+			"description": "LCP Node Location identifier",
+			"type": "string"
+		},  
+		"tenantId": {
+			"description": "Openstack tenant id",
+			"type": "string"
+		}  
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/instanceIds b/onap-enabler-be/src/main/resources/json/mso/instanceIds
new file mode 100644
index 0000000..c20ea9a
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/instanceIds
@@ -0,0 +1,29 @@
+{
+    "$schema": "http://json-schema.org/draft-04/schema#",
+			"description": "instanceIds that may be associated with a particular request",
+			"type": "object",
+			"properties": {  
+				"networkInstanceId": {
+					"description": "UUID for the network instance (if any)",
+					"type": "string"
+				},  
+				"serviceInstanceId": {
+					"description": "UUID for the service instance",
+					"type": "string"
+				},  
+				"vfModuleInstanceId": {
+					"description": "UUID for the vfModule instance (if any)",
+					"type": "string"
+				},  
+				"vnfInstanceId": {
+					"description": "UUID for the vnf instance (if any)",
+					"type": "string"
+				},  
+				"volumeGroupInstanceId": {
+					"description": "UUID for the volume group instance (if any)",
+					"type": "string"
+				}  
+		}
+}
+
+			
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/modelInfo b/onap-enabler-be/src/main/resources/json/mso/modelInfo
new file mode 100644
index 0000000..56d268c
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/modelInfo
@@ -0,0 +1,42 @@
+{
+	"$schema": "http://json-schema.org/draft-04/schema#",
+	"description": "fields describing the SDC entity being operated on by the request",
+	"type": "object",
+	"properties": {
+		"modelCustomizationName": {
+			"description": "reference to the customized set of parameters associated with a model in a given service context",
+			"type": "string"
+		},
+		"modelCustomizationId": {
+			"description": "reference to the customized set of parameters associated with a model in a given service context",
+			"type": "string"
+		},
+		"modelInvariantId": {
+			"description": "Invariant UUID for the model name, irrespective of the version, as defined in SDC--authoritative",
+			"type": "string",
+			"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+		},
+        "modelVersionId": {
+                "description": "Version id for version",
+                "type": "string"
+            },
+		"modelName": {
+			"description": "name of the model as defined in SDC--not authoritative",
+			"type": "string"
+		},
+		"modelNameVersionId": {
+			"description": "UUID for the model name and version combination as defined in SDC--authoritative",
+			"type": "string",
+			"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+		},
+		"modelType": {
+			"description": "short description of the entity being operated on",
+			"type": "string"
+		},
+		"modelVersion": {
+			"description": "the version of the model as defined in SDC--not authoritative",
+			"type": "string"
+		}
+	},
+	"required": ["modelType"]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/relatedInstance b/onap-enabler-be/src/main/resources/json/mso/relatedInstance
new file mode 100644
index 0000000..89554a5
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/relatedInstance
@@ -0,0 +1,16 @@
+{
+	"description": "modelInfo and optional instanceId and instanceName for a model related to the modelInfo being operated on",
+	"type": "object",
+	"properties": {
+		"instanceName": {
+			"description": "optional name for the instance Id of the related model",
+			"type": "string"
+		},
+		"instanceId": {
+			"description": "instance Id for the related model",
+			"type": "string"
+		},
+		"modelInfo": {}
+	},
+	"required": ["modelInfo"]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/relatedModel b/onap-enabler-be/src/main/resources/json/mso/relatedModel
new file mode 100644
index 0000000..a70a171
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/relatedModel
@@ -0,0 +1,15 @@
+{
+	"$schema": "http://json-schema.org/draft-04/schema#",
+	"description": "modelInfo and optional instance id for a model related to the modelInfo being operated on",
+	"type": "object",
+	"properties": {			
+		"instanceId": {
+			"description": "instance Id for the related model",
+			"type": "string"
+		},
+		"modelInfo": {}
+	},
+	"required": [ "modelInfo" ]
+}
+
+
diff --git a/onap-enabler-be/src/main/resources/json/mso/request b/onap-enabler-be/src/main/resources/json/mso/request
new file mode 100644
index 0000000..61f1040
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/request
@@ -0,0 +1,32 @@
+{
+	"$schema": "http://json-schema.org/draft-04/schema#",
+	"description": "request structure",
+	"type": "object",
+	"properties": {
+		"finishTime": {
+			"description": "Date and time the request was finished in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT",
+			"type": "string"
+		},
+		"instanceIds": {},
+		"requestDetails": {},
+		"requestId": {
+			"description": "UUID for the request generated by the instantiation service",
+			"type": "string",
+			"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+		},
+		"requestScope": {
+			"description": "short description of the entity being operated on",
+			"type": "string"
+		},
+		"requestStatus": {},
+		"requestType": {
+			"description": "short description of the action being performed on the requestScope",
+			"type": "string"
+		},
+		"startTime": {
+			"description": "Date and time the request was created in GMT with the following sample format: Wed, 15 Oct 2014 13:01:52 GMT",
+			"type": "string"
+		}
+	},
+	"required": ["requestDetails", "requestId", "requestScope", "requestType", "startTime"]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/requestDetails b/onap-enabler-be/src/main/resources/json/mso/requestDetails
new file mode 100644
index 0000000..c0ef530
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/requestDetails
@@ -0,0 +1,13 @@
+{
+    "description": "aggregates the context, configuraiton and detailed parameters associated with the request into a single structure",
+    "properties": {
+        "cloudConfiguration": {},
+        "modelInfo": {},
+        "relatedModelList": {},
+        "requestInfo": {},
+        "requestParameters": {},
+        "subscriberInfo": {}
+    },
+    "type": "object"
+}
+
diff --git a/onap-enabler-be/src/main/resources/json/mso/requestError b/onap-enabler-be/src/main/resources/json/mso/requestError
new file mode 100644
index 0000000..497f671
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/requestError
@@ -0,0 +1,27 @@
+{
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "description": "standard request error data structure",
+    "properties": {
+        "messageId": {
+            "description": "Unique message identifier of the format ABCnnnn where ABC is either SVC for Service Exceptions or POL for Policy Exception",
+            "type": "string"
+        },
+        "text": {
+            "description": "Message text, with replacement variables marked with %n, where n is an index into the list of <variables> elements, starting at 1",
+            "type": "string"
+        },
+        "url": {
+            "description": "Hyperlink to a detailed error resource e.g., an HTML page for browser user agents",
+            "type": "string"
+        },
+        "variables": {
+            "description": "List of zero or more strings that represent the contents of the variables used by the message text",
+            "type": "string"
+        }
+    },
+    "required": [
+        "messageId",
+        "text"
+    ],
+    "type": "object"
+}
diff --git a/onap-enabler-be/src/main/resources/json/mso/requestInfo b/onap-enabler-be/src/main/resources/json/mso/requestInfo
new file mode 100644
index 0000000..5fcf74c
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/requestInfo
@@ -0,0 +1,52 @@
+{
+	"$schema": "http://json-schema.org/draft-04/schema#",
+	"description": "fields providing general context information for the request",
+	"properties": {
+		"billingAccountNumber": {
+			"description": "billing account associated with the model being operated on",
+			"type": "string"
+		},
+		"callbackUrl": {
+			"description": "client URL to use for asynchronous responses",
+			"type": "string"
+		},
+		"correlator": {
+			"description": "Optional correlationId for async callback requests",
+			"type": "string"
+		},
+		"instanceName": {
+			"description": "Client provided name for the instance being operated on by the operation (note: not guaranteed to be unique)",
+			"type": "string"
+		},
+		"orderNumber": {
+			"description": "reference to an order",
+			"type": "string"
+		},
+		"orderVersion": {
+			"description": "order version number",
+			"type": "number"
+		},
+		"productFamilyId": {
+			"description": "UUID for the product family associated with the model being operated on",
+			"type": "string"
+		},
+		"source": {
+			"description": "source of the request--not authoritative--actual source revealed via authentication",
+			"type": "string"
+		},
+		"suppressRollback": {
+			"description": "true or false boolean indicating whether rollbacks should be suppressed on failures",
+			"type": "boolean"
+		},
+		"responseValue": {
+			"description": "Is the user selected value based on the validResponses list provided to complete the manual task",
+			"type": "string"
+		},
+		"requestorId": {
+			"description": "The id of the person who initiated the completion request",
+			"type": "string"
+		}
+	},
+
+	"type": "object"
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/requestParameters b/onap-enabler-be/src/main/resources/json/mso/requestParameters
new file mode 100644
index 0000000..010d787
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/requestParameters
@@ -0,0 +1,23 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "type": "object",
+  "properties": {
+        "subscriptionServiceType": {
+          "type": "string"
+        },
+        "userParams": {
+          "type": "array",
+          "items": {
+            "type": "object",
+            "properties": {
+              "name": {
+                "type": "string"
+              },
+              "value": {
+                "type": "string"
+              }
+            }
+          }
+        }
+      }
+    }
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/requestReferences b/onap-enabler-be/src/main/resources/json/mso/requestReferences
new file mode 100644
index 0000000..30f6411
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/requestReferences
@@ -0,0 +1,18 @@
+{
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "description": "provides the instanceId and requestId associated with the request",
+			"type": "object",
+			"properties": { 
+		        "instanceId": {
+			        "description": "UUID for the service instance",
+			        "type": "string",
+					"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+				},
+		        "requestId": {
+			        "description": "UUID for the request",
+			        "type": "string",
+					"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
+				}
+			},
+			"required": [ "instanceId", "requestId" ]
+}
diff --git a/onap-enabler-be/src/main/resources/json/mso/requestStatus b/onap-enabler-be/src/main/resources/json/mso/requestStatus
new file mode 100644
index 0000000..75b7215
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/requestStatus
@@ -0,0 +1,32 @@
+{
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "description": "fields describing the status of a request",
+    "properties": {
+        "percentProgress": {
+            "description": "percentage complete estimate from 0 to 100",
+            "type": "number"
+        },
+        "requestState": {
+            "description": "short description of the instantiation state",
+            "type": "string"
+        },
+        "statusMessage": {
+            "description": "additional descriptive information about the status",
+            "type": "string"
+        },
+        "timestamp": {
+            "description": "GMT Datetime the requestStatus was created e.g.: Wed, 15 Oct 2014 13:01:52 GMT",
+            "type": "string"
+        },
+        "wasRolledBack": {
+			"description": "true or false boolean indicating whether the request was rolled back",
+			"type": "boolean"
+		}
+        
+    },
+    "required": [
+        "requestState",
+        "timestamp"
+    ],
+    "type": "object"
+}
diff --git a/onap-enabler-be/src/main/resources/json/mso/response b/onap-enabler-be/src/main/resources/json/mso/response
new file mode 100644
index 0000000..fa37d2d
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/response
@@ -0,0 +1,13 @@
+{
+	"$schema": "http://json-schema.org/draft-04/schema#",
+	"description": "response structure",
+	"type": "object",
+	"code": {
+			"description": "Return code",
+			"type": "string"
+	},
+	"message": {
+		"description": "Result message",
+			"type": "string"
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/json/mso/subscriberInfo b/onap-enabler-be/src/main/resources/json/mso/subscriberInfo
new file mode 100644
index 0000000..df78737
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/json/mso/subscriberInfo
@@ -0,0 +1,19 @@
+{
+	"$schema": "http://json-schema.org/draft-04/schema#",
+	"description": "fields providing information about the subscriber associated with the request",
+	"type": "object",
+	"properties": {
+		"globalSubscriberId": {
+			"description": "global Customer Id understood by A&AI",
+			"type": "string"
+		},
+		"subscriberCommonSiteId": {
+			"description": "id representing the location of the subscriber",
+			"type": "string"
+		},
+		"subscriberName": {
+			"description": "name of the customer or subscriber",
+			"type": "string"
+		}
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/mso_complete_manual_task.json b/onap-enabler-be/src/main/resources/mso_complete_manual_task.json
new file mode 100644
index 0000000..af6c1e1
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/mso_complete_manual_task.json
@@ -0,0 +1,5 @@
+{
+  "taskRequestReference": {
+     "taskId": "daf4dd84-b77a-42da-a051-3239b7a9392c"
+      }
+}
diff --git a/onap-enabler-be/src/main/resources/mso_create_instance_response.json b/onap-enabler-be/src/main/resources/mso_create_instance_response.json
new file mode 100644
index 0000000..8b0341f
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/mso_create_instance_response.json
@@ -0,0 +1,6 @@
+{
+  "requestReferences": {
+    "instanceId": "ba00de9b-3c3e-4b0a-a1ad-0c5489e711fb",
+    "requestId": "311cc766-b673-4a50-b9c5-471f68914586"
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/mso_get_manual_task_by_request_id.json b/onap-enabler-be/src/main/resources/mso_get_manual_task_by_request_id.json
new file mode 100644
index 0000000..ae8d511
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/mso_get_manual_task_by_request_id.json
@@ -0,0 +1,23 @@
+{  
+   "taskList":[  
+      {  
+         "taskId":"daf4dd84-b77a-42da-a051-3239b7a9392c",
+         "type":"fallout",
+         "nfRole":"vSCP",
+         "subscriptionServiceType":"Mobility",
+         "originalRequestId":"za1234d1-5a33-55df-13ab-12abad84e335",
+         "originalRequestorId":"ss835w",
+         "errorSource":"A&AI",
+         "errorCode":"404",
+         "errorMessage":"Failed in A&AI 404",
+         "buildingBlockName":"DoCreateVfModule",
+         "buildingBlockStep":"invokeA&AI:getTenant",
+         "validResponses":[  
+            "rollback",
+            "abort",
+            "skip",
+            "retry"
+         ]
+      }
+   ]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/mso_get_orchestration_requests.json b/onap-enabler-be/src/main/resources/mso_get_orchestration_requests.json
new file mode 100644
index 0000000..318945b
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/mso_get_orchestration_requests.json
@@ -0,0 +1,88 @@
+{  
+   "requestList":[  
+      {  
+         "request":{  
+            "requestId":"25272f7e-74c6-4afc-966a-4587f2c30bae",
+            "startTime":"Mon, 31 Jul 2017 23:25:30 GMT",
+            "requestScope":"vnf",
+            "requestType":"updateInstance",
+            "requestDetails":null,
+            "instanceReferences":{  
+               "serviceInstanceId":null,
+               "serviceInstanceName":null,
+               "vnfInstanceId":null,
+               "vnfInstanceName":null,
+               "vfModuleInstanceId":null,
+               "vfModuleInstanceName":null,
+               "volumeGroupInstanceId":null,
+               "volumeGroupInstanceName":null,
+               "networkInstanceId":null,
+               "networkInstanceName":null,
+               "requestorId":"md5621"
+            },
+            "requestStatus":{  
+               "requestState":"IN_PROGRESS",
+               "statusMessage":null,
+               "percentProgress":20,
+               "finishTime":null
+            }
+         }
+      },
+      {  
+         "request":{  
+            "requestId":"25272f7e-74c6-4afc-966a-4587f2c30bae",
+            "startTime":"Mon, 31 Jul 2017 23:25:30 GMT",
+            "requestScope":"service",
+            "requestType":"createInstance",
+            "requestDetails":null,
+            "instanceReferences":{  
+               "serviceInstanceId":null,
+               "serviceInstanceName":null,
+               "vnfInstanceId":null,
+               "vnfInstanceName":null,
+               "vfModuleInstanceId":null,
+               "vfModuleInstanceName":null,
+               "volumeGroupInstanceId":null,
+               "volumeGroupInstanceName":null,
+               "networkInstanceId":null,
+               "networkInstanceName":null,
+               "requestorId":"md5621"
+            },
+            "requestStatus":{  
+               "requestState":"IN_PROGRESS",
+               "statusMessage":null,
+               "percentProgress":20,
+               "finishTime":null
+            }
+         }
+      },
+      {  
+         "request":{  
+            "requestId":"9d6819e1-76e6-4e28-ad08-367632f41c7e",
+            "startTime":"Fri, 20 May 2016 19:07:57 GMT",
+            "requestScope":"vnf",
+            "requestType":"replaceInstance",
+            "requestDetails":null,
+            "instanceReferences":{  
+               "serviceInstanceId":null,
+               "serviceInstanceName":null,
+               "vnfInstanceId":null,
+               "vnfInstanceName":null,
+               "vfModuleInstanceId":null,
+               "vfModuleInstanceName":null,
+               "volumeGroupInstanceId":null,
+               "volumeGroupInstanceName":null,
+               "networkInstanceId":null,
+               "networkInstanceName":null,
+               "requestorId":null
+            },
+            "requestStatus":{  
+               "requestState":"FAILED",
+               "statusMessage":"Service request FAILED schema validation. No valid format for volume request is specified",
+               "percentProgress":100,
+               "finishTime":"Fri, 20 May 2016 19:07:57 GMT"
+            }
+         }
+      }
+   ]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/owning-entity-properties.JSON b/onap-enabler-be/src/main/resources/owning-entity-properties.JSON
new file mode 100644
index 0000000..12ee4cf
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/owning-entity-properties.JSON
@@ -0,0 +1,17 @@
+{
+	"owningEntityProperties" : {
+		"platform": {
+			"Platform-name": "Platform-name"
+		},
+		"project": {
+			"Project-name": "Project-name"
+		},
+		"lineOfBusiness": {
+			"Line-of-business-name": "Line-of-business-name"
+		},		
+		"owningEntity": {
+			"Owning-entity-id": "Owning-entity-name"
+		}	
+	}			
+}
+	
diff --git a/onap-enabler-be/src/main/resources/roles.json b/onap-enabler-be/src/main/resources/roles.json
new file mode 100644
index 0000000..db32392
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/roles.json
@@ -0,0 +1,8 @@
+{
+  "roles": [
+    "VID_Subscriber_serviceType1_Tenant1",
+    "VID_Subscriber_serviceType1_Tenant2",
+    "read_motorola_epost_tow",
+    "read_motorola_epost"
+  ]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/sdcservices.json b/onap-enabler-be/src/main/resources/sdcservices.json
new file mode 100644
index 0000000..91c2cc2
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/sdcservices.json
@@ -0,0 +1,172 @@
+{
+  "services": [
+    {
+      "uuid": "6bce7302-70bd-4057-b48e-8d5b99e686ca",
+      "invariantUUID": "9aa04749-c02c-432d-a90c-18caa361c833",
+      "name": "vDBE_srv",
+      "version": "1.0",
+      "toscaModelURL": "./service-VdbeSrv-csar.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "76f27dfe-33e5-472f-8e0b-acf524adc4f0",
+      "invariantUUID": "c3618e16-bb5b-433a-a6e0-565ca79d8b65",
+      "name": "4-27_vMME_Service",
+      "version": "1.0",
+      "toscaModelURL": "./service-MsoExampleService-csar.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "f4d84bb4-a416-4b4e-997e-0059973630b9",
+      "invariantUUID": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+      "name": "ADIOD vMX vPE_BV Service 488",
+      "version": "1.0",
+      "toscaModelURL": "./service-vf-with-annotations.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "48a52540-8772-4368-9cdb-1f124ea5c931",
+      "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef",
+      "name": "4-27_vMME_Service",
+      "version": "1.0",
+      "toscaModelURL": "./service-vf-csar.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "cb49608f-5a24-4789-b0f7-2595473cb997",
+      "invariantUUID": "0311f998-9268-4fd6-bbba-afff15087b72",
+      "name": "4-27_vMME_Service",
+      "version": "1.0",
+      "toscaModelURL": "./service-vl-csar.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "73e1322a-8a9a-49dc-9558-b0c5c5770e4a",
+      "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef",
+      "name": "4-27_vMME_Service",
+      "version": "1.0",
+      "toscaModelURL": "./pnf.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "240376de-870e-48df-915a-31f140eedd2c",
+      "invariantUUID": "709d1be4-9a3f-4a29-8c4d-a20465e808a3",
+      "name": "Demo Service",
+      "version": "1.0",
+      "toscaModelURL": "./service-DemoService1-csar.csar",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "32671332-a7ee-4df6-9609-db50ce5eaee7",
+      "invariantUUID": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+      "name": "ADIOD vMX vPE_BV Service 488",
+      "version": "1.0",
+      "toscaModelURL": "./adiod.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "55a48870-d99e-41a8-a3b4-a8d748333139",
+      "invariantUUID": "3d89efc0-19ca-4df7-9818-028e1fc6f708",
+      "name": "AMP PH SVC",
+      "version": "1.0",
+      "toscaModelURL": "./service-AmpPhSvc-csar.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
+      "invariantUUID": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+      "name": "action-data",
+      "version": "1.0",
+      "toscaModelURL": "./2f80c596.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "ee6d61be-4841-4f98-8f23-5de9da846ca7",
+      "invariantUUID": "b7d923c9-6175-41f1-91ba-4565c4953408",
+      "name": "Multiple pProbes",
+      "version": "1.0",
+      "toscaModelURL": "./service-Servicecontainermultiplepprobes-csar.zip",
+      "category": "Mobility",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "ee6d61be-4841-4f98-8f23-5de9da845544",
+      "invariantUUID": "b7d923c9-6175-41f1-91ba-4565c4955555",
+      "name": "ServiceContainerMultiplepProbes2",
+      "version": "2.0",
+      "toscaModelURL": "./service-ServicecontainerContainsPprobe.zip",
+      "category": "Network L1-3",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    }
+  ]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/resources/test.csv b/onap-enabler-be/src/main/resources/test.csv
new file mode 100644
index 0000000..e402c1e
--- /dev/null
+++ b/onap-enabler-be/src/main/resources/test.csv
@@ -0,0 +1,5 @@
+ee6d61be-4841-4f98-8f23-5de9da846ca7,95c75a48-6f86-498f-b1a6-e9179a83d9c7,Update
+ee6d61be-4841-4f98-8f23-5de9da846ca7,95c75a48-6f86-498f-b1a6-e9179a83d9c7,  VNF In Place Software Update
+418f32e5-484a-4073-8fa9-fab7d497459f,709d1be4-9a3f-4a29-8c4d-a20465e808a3,  VNF In Place Software Update
+fa06db34-f8e3-42d9-8e51-a76816eb0f0d,0ebfb706-a846-4715-b0d0-fe0be09458d7,  VNF In Place Software Update  
+fa06db34-f8e3-42d9-8e51-a76816eb0f0d, 87447b67-29e3-4244-8038-990a8c70259a,Replace
\ No newline at end of file
diff --git a/onap-enabler-be/src/main/webapp/META-INF/MANIFEST.MF b/onap-enabler-be/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5e94951
--- /dev/null
+++ b/onap-enabler-be/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
diff --git a/onap-enabler-be/src/main/webapp/WEB-INF/conf/dev.features.properties b/onap-enabler-be/src/main/webapp/WEB-INF/conf/dev.features.properties
new file mode 100644
index 0000000..d1f8ffa
--- /dev/null
+++ b/onap-enabler-be/src/main/webapp/WEB-INF/conf/dev.features.properties
@@ -0,0 +1,14 @@
+FLAG_ASYNC_INSTANTIATION = true
+FLAG_ASYNC_JOBS = true
+FLAG_REGION_ID_FROM_REMOTE = true
+CREATE_INSTANCE_TEST = false
+EMPTY_DRAWING_BOARD_TEST = false
+FLAG_ADVANCED_PORTS_FILTER = true
+FLAG_ADD_MSO_TESTAPI_FIELD = true
+FLAG_UNASSIGN_SERVICE = true
+FLAG_COLLECTION_RESOURCE_SUPPORT = true
+FLAG_NETWORK_TO_ASYNC_INSTANTIATION = true
+FLAG_SERVICE_MODEL_CACHE = true
+FLAG_SHOW_ASSIGNMENTS = true
+FLAG_SHOW_VERIFY_SERVICE=false
+FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD = false
diff --git a/onap-enabler-be/src/main/webapp/WEB-INF/conf/features.properties b/onap-enabler-be/src/main/webapp/WEB-INF/conf/features.properties
new file mode 100644
index 0000000..b9a640d
--- /dev/null
+++ b/onap-enabler-be/src/main/webapp/WEB-INF/conf/features.properties
@@ -0,0 +1,27 @@
+#    features.properties
+#    -------------------
+
+#    This file is, generally, empty.
+
+#    Configure `featureFlags.filename` in system.properties to use
+#    one of the ready-made sets:
+
+#    -  featureFlags.filename = ci.features.properties
+#    -  featureFlags.filename = ist.features.properties
+#    -  featureFlags.filename = e2e.features.properties
+
+FLAG_ASYNC_INSTANTIATION = true
+FLAG_ASYNC_JOBS = false
+FLAG_REGION_ID_FROM_REMOTE = true
+CREATE_INSTANCE_TEST = false
+EMPTY_DRAWING_BOARD_TEST = false
+FLAG_ADVANCED_PORTS_FILTER = true
+FLAG_ADD_MSO_TESTAPI_FIELD = true
+FLAG_UNASSIGN_SERVICE = true
+FLAG_COLLECTION_RESOURCE_SUPPORT = true
+FLAG_NETWORK_TO_ASYNC_INSTANTIATION = true
+FLAG_SERVICE_MODEL_CACHE = true
+FLAG_SHOW_ASSIGNMENTS = true
+FLAG_SHOW_VERIFY_SERVICE=false
+FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD = false
+FLAG_PNP_INSTANTIATION = true
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/java/org/onap/aai/util/JettyObfuscationConversionCommandLineUtilTest.java b/onap-enabler-be/src/test/java/org/onap/aai/util/JettyObfuscationConversionCommandLineUtilTest.java
new file mode 100644
index 0000000..45a4bcd
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/aai/util/JettyObfuscationConversionCommandLineUtilTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.aai.util;
+
+import org.junit.Test;
+import org.onap.osam.aai.util.JettyObfuscationConversionCommandLineUtil;
+
+public class JettyObfuscationConversionCommandLineUtilTest {
+
+	private JettyObfuscationConversionCommandLineUtil createTestSubject() {
+		return new JettyObfuscationConversionCommandLineUtil();
+	}
+
+	
+	@Test
+	public void testMain() throws Exception {
+		String[] args = new String[] { "" };
+
+		// default test
+		JettyObfuscationConversionCommandLineUtil.main(args);
+	}
+
+	
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/ecomp/vid/selenium/FirstClass.java b/onap-enabler-be/src/test/java/org/onap/ecomp/vid/selenium/FirstClass.java
new file mode 100644
index 0000000..b1db197
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/ecomp/vid/selenium/FirstClass.java
@@ -0,0 +1,604 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.ecomp.vid.selenium;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.ie.InternetExplorerDriver;
+import org.openqa.selenium.support.ui.Select;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import org.apache.log4j.Logger;
+import org.testng.Assert;
+import org.testng.asserts.*;
+
+public class FirstClass {
+	
+		WebElement loginButton;
+		
+		/** The eg. */
+		String eg;
+		
+		/** The login. */
+		WebElement login;
+		
+		/** The pwd. */
+		WebElement pwd;
+		
+		/** The log. */
+		Logger log;
+		
+		/** The errormessage. */
+		WebElement errormessage;
+		
+					
+		/** The driver. */
+		WebDriver driver=new FirefoxDriver();
+		
+		
+		
+		/** The config prop. */
+		private final Properties configProp = new Properties();
+		
+		
+		/**
+		 * Instantiates a new first class.
+		 */
+		private  FirstClass() {
+			// TODO Auto-generated constructor stub
+			//
+			try{
+			//	InputStream input =this.getClass().getClassLoader().getResourceAsStream("objectmap.properties");
+			//FileInputStream input1 = new FileInputStream("objectmap.properties");
+				
+			InputStream input =new FileInputStream("objectconfig.properties");
+			System.out.println("Read all properties from file");
+			configProp.load(input);
+			System.out.println("Read all properties from file completed");
+			}
+			catch(IOException e) {
+				
+				e.printStackTrace();
+			}
+		}
+		
+		
+		/*
+		
+		
+		@BeforeClass
+		public void setUp() {
+			System.out.println("*******************");
+			System.out.println("launching IE browser");
+			System.setProperty("webdriver.ie.driver", driverPath+"IEDriverServer.exe");
+			driver = new InternetExplorerDriver();
+			driver.findElement(By.className());
+			driver.manage().window().maximize();
+			
+
+			 login = driver.findElement(By.xpath("//input[@class='fn-ebz-text ng-pristine ng-valid']"));
+			 pwd = driver.findElement(By.xpath("//input[@class='span3 ng-pristine ng-valid']"));
+			 loginButton = driver.findElement(By.id("loginBtn"));
+		}
+		
+		
+	*/
+		/**
+		 * Sets the up.
+		 */
+		// TODO Auto-generated method stub
+		@BeforeClass
+		public void setUp()
+		{
+			
+						
+			//WebDriver driver=new FirefoxDriver();
+			
+			log = Logger.getLogger(FirstClass.class.getName());
+		
+		
+		
+		// Get url
+		driver.get(configProp.getProperty("baseURL"));
+		driver.manage().window().maximize();
+		
+		
+		 login = driver.findElement(By.xpath(configProp.getProperty("login")));
+		 
+		 pwd = driver.findElement(By.xpath(configProp.getProperty("pwd")));
+		 loginButton = driver.findElement(By.id(configProp.getProperty("loginButton")));
+		}
+		
+		
+		/**
+		 * Empty username password.
+		 */
+		@Test(priority=1)
+		public void emptyUsernamePassword()
+		{
+		
+			
+		//User Name and Password field is empty
+		log.info("-----VID-11 TC-8----Username and password empty");
+		loginButton.click();
+		errormessage=driver.findElement(By.xpath("//*[@id='errorInfo']/span"));
+		String errmsg= errormessage.getText();
+		//System.out.println("Error message is"+errmsg);
+		//String expected = "Invaild username or password, Please try again";
+		
+		//Assert.assertEquals(errmsg,expected);
+
+		Boolean str = driver.getPageSource().contains("Invalid username or password, Please try again");
+		System.out.println(driver.getPageSource().contains("Invalid username or password, Please try again"));
+		
+		if(str==true)
+		{
+			log.info("Error message validated");
+			log.info("VID-11 TC-8 PASSED");
+			
+		}else
+			log.error("Failed validation");
+		
+		}
+
+
+		
+		/**
+		 * Invalid user name.
+		 */
+		@Test(priority=2)
+		public void invalidUserName()
+		{
+		
+		log.info("-----VID-11 TC-6----Invalid Username and Valid Password");
+		
+		
+		login.sendKeys("xxx");
+		pwd.sendKeys("abc123");
+		loginButton.click();
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		String errmsg= errormessage.getText();
+		String expected = "Invalid username or password, Please try again";
+		Assert.assertEquals(errmsg,expected);
+		//Boolean str1 = driver.getPageSource().contains("Invalid username or password, Please try again");
+		//System.out.print(str1);
+		
+		log.info("VID-11 TC-6 PASSED");
+				
+		}
+		
+		
+		/**
+		 * Invalid password.
+		 */
+		@Test(priority=3)
+		public void invalidPassword()
+		{
+		log.info("-----VID-11 TC-7----Valid Username and Invalid Password");
+		//  Valid user name and Invalid password.
+				login.clear();
+				pwd.clear();
+				login.sendKeys("testuser");
+				pwd.sendKeys("xxx");
+				loginButton.click();
+				driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+				
+				String errmsg= errormessage.getText();
+				String expected = "Invalid username or password, Please try again";
+				Assert.assertEquals(errmsg,expected);
+				
+				//Boolean str2 = driver.getPageSource().contains("Invaild username or password, Please try again");
+				//System.out.print(str2);
+				
+				log.info("VID-11 TC-7 PASSED");
+		}
+		
+			
+		/**
+		 * Login successful.
+		 */
+		@Test(priority=4)
+		public void loginSuccessful()
+		{
+		log.info("-----VID-11 TC-1----Valid Username and Valid Password");
+		//Login with valid user name and password.
+		login.clear();
+		login.sendKeys("su");
+		pwd.clear();
+		pwd.sendKeys("fusion");
+		
+				
+		loginButton.click();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		try {
+			Thread.sleep(6000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		Assert.assertTrue(driver.getPageSource().contains("Search Existing Service Instances"));
+		log.info("VID-11 TC-1 PASSED");
+		
+		}
+		
+		
+		/**
+		 * Verify home page elements left pane.
+		 */
+		@Test(priority=5)
+		public void verifyHomePageElementsLeftPane()
+		
+		{
+			
+			
+			log.info("VID-10 TC 1 ");
+			//VID Home
+			log.info("VID 11 TC-2");
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[1]/a/span")).isDisplayed();
+			//Create New Service Instance
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[2]/a/span")).isDisplayed();
+			
+			//Browse Service Type
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[3]/a/span")).isDisplayed();
+			//View Log		
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[4]/a/span")).isDisplayed();
+			
+			//Profile
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[5]/a/span")).isDisplayed();
+			//Admin
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[6]/a/span")).isDisplayed();
+			//Logout
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[7]/a/span")).isDisplayed();
+			
+			//Infrastructure Subscriber Name
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[1]/div/label")).isDisplayed();
+			//Infrastructure Subscriber Name Select Drop down
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select")).isDisplayed();
+			//Infrastructure Service Type
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[1]/div/label")).isDisplayed();
+			//Infrastructure Service Type Select Drop down
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select")).isDisplayed();
+			//Submit button 
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[3]/td/div/button")).isDisplayed();
+			
+			//Login Snippet Icon
+			driver.findElement(By.xpath(".//*[@class='icon-user-small login-snippet-icon']")).isDisplayed();
+			
+			
+			//String bodyText = driver.findElement(By.tagName("body")).getText();
+			//Assert.assertTrue("Text not found!", bodyText.contains("Search Existing Service Instances"));
+			//Assert.IsTrue(driver.getPageSource.Contains("Search Existing Service Instances"));
+			 
+			log.info("VID-12 TC-1");
+			Assert.assertTrue(driver.getPageSource().contains("Search Existing Service Instances"));
+			Assert.assertTrue(driver.getPageSource().contains("Please search by the Subscriber name or Service Type from below:"));
+			log.info("VID-12 TC-1 PASSED");
+			log.info("VID-10 TC 1 PASSED");
+			log.info("VID-11 TC-2 PASSED");
+		}
+		
+		
+		/**
+		 * Disabled submit button.
+		 */
+		@Test(priority=6)
+		public void disabledSubmitButton()
+		{
+			log.info("VID-12 TC-13");
+			//Assert submit button disabled.
+			Assert.assertFalse(driver.findElement(By.xpath(configProp.getProperty("submitButton"))).isEnabled());
+			log.info("VID-12 TC-13 PASSED");
+
+		} 
+		
+		/**
+		 * Default list box value.
+		 */
+		@Test(priority=7)
+		public void defaultListBoxValue()
+		{
+			log.info("VID-12 TC-2");
+			
+			
+			//WebElement subscribername =driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select"));
+			
+			Select oSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown"))));
+			Select iSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("serviceTypeDropDown"))));
+			
+			
+			WebElement ielement=iSelect.getFirstSelectedOption();
+			WebElement oelement=oSelect.getFirstSelectedOption();
+			String defaultsubscribername=oelement.getText();
+			String defaultservicetype=ielement.getText();
+			
+			Assert.assertEquals(defaultsubscribername,"Select Subscriber Name");
+			Assert.assertEquals(defaultservicetype,"Select Service Type");
+			
+		
+			
+			
+		//Verify Select Subscriber Name isDisplayed.
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select/option[1]")).isSelected();
+				
+		//Verify Select Service Type isDisplayed.	
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select/option[1]")).isSelected();
+			
+			
+			log.info("VID-12 TC-2 PASSED");
+
+		}
+
+
+		
+		/**
+		 * Select subscriber name drop down.
+		 *
+		 * @throws InterruptedException the interrupted exception
+		 */
+		@Test(priority=8)
+		public void selectSubscriberNameDropDown() throws InterruptedException
+		{
+			log.info("------------------VID-10 TC-2,VID-12 TC-11, VID-12 TC-9, VID 12 TC-10,VID-12 TC-6, VID 12 TC-5--------------------");
+			
+			
+			driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown")));
+			
+			driver.findElement(By.xpath(configProp.getProperty("serviceTypeDropDown")));
+			Thread.sleep(5000);
+			
+			//Infrastructure Subscriber Name
+			Select oSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown"))));
+			
+			List <WebElement> elementCount = oSelect.getOptions();
+			log.info("Select Element Count of Service Name");
+			System.out.println(elementCount.size());
+			
+			
+			//Verifying getInfrastructureSubscribersList
+			log.info("VID-29 TC-1");
+			Assert.assertTrue(elementCount.size()>0);
+			log.info("VID-29 TC-1 PASSED");
+			
+			oSelect.selectByIndex(2);
+			String selectedOption = new Select(driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown")))).getFirstSelectedOption().getText();
+
+			System.out.println("Service Name selected is " +selectedOption);
+			log.info("VID-10 TC-2 PASSED");
+					
+			//Submit button is clicked
+			driver.findElement(By.xpath(configProp.getProperty("submitButton"))).click();
+			
+			
+			//Verify whether the page header is displayed "Selected Subscriber's Service Instance Details:"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/h1")).isDisplayed();
+			//Assert.assertTrue(driver.getPageSource().contains("Selected Subscriber's Service Instance Details:"))
+			
+			
+			//Verify whether the page header is displayed "Global Customer ID"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/div/table/thead/tr/th[2]/div")).isDisplayed();
+			Assert.assertTrue(driver.getPageSource().contains("Global Customer ID"));
+			Assert.assertTrue(driver.getPageSource().contains("Subscriber Name"));
+			Assert.assertTrue(driver.getPageSource().contains("Service Type"));
+			Assert.assertTrue(driver.getPageSource().contains("Service Instance ID"));
+			
+			log.info("VID-12 TC-5 PASSED");
+			log.info("VID-12 TC-11 PASSED");
+			
+			WebElement serviceinstancetable =driver.findElement(By.xpath("//table[@class='tablesorter tablesorter-default ng-isolate-scope']"));
+			
+			List<WebElement> rows_table = serviceinstancetable.findElements(By.tagName("tr"));
+			  //To calculate no of rows In table.
+			  int rows_count = rows_table.size();
+			  
+			  //Loop will execute till the last row of table.
+			  for (int row=0; row<rows_count; row++){
+			   //To locate columns(cells) of that specific row.
+			   List<WebElement> Columns_row = rows_table.get(row).findElements(By.tagName("td"));
+			   //To calculate no of columns(cells) In that specific row.
+			   int columns_count = Columns_row.size();
+			   //System.out.println("Number of cells In Row "+row+" are "+columns_count);
+			   
+			   //Loop will execute till the last cell of that specific row.
+			   for (int column=0; column<columns_count; column++){
+			    //To retrieve text from that specific cell.
+			    String celtext = Columns_row.get(column).getText();
+			    //System.out.println("Cell Value Of row number "+row+" and column number "+column+" Is "+celtext);
+			   
+			    
+			    
+			    //log.info("Testing Get column and row value");
+			    List <WebElement> exx= rows_table.get(1).findElements(By.tagName("td"));
+			     eg=Columns_row.get(2).getText();
+			   // System.out.println("Cell value of row 1 and column 2 is" +eg);
+			   }
+			  }
+		
+			  
+			
+			
+			//Verify View/Edit isDisplayed and Click
+			
+			driver.findElement(By.xpath("//a[@alt='View/Edit']")).isDisplayed();
+			
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/div/table/tbody/tr[1]/td[1]/div/a")).click();
+			
+			log.info("User clicked View/Edit");
+			
+			//Verify the Subscriber Name displayed.	
+			String header= driver.findElement(By.xpath("//h1[@class='heading1 ng-binding']")).getText();
+			//System.out.println(header);
+			
+			
+			if(header.contains(eg))
+			{
+				System.out.println("Header contains the subscriber name");
+			}else
+				System.out.println("Header does not contain the subscriber name");
+			
+			
+			
+			Assert.assertTrue(driver.getPageSource().contains("PerfTest Subscriber00020021"));
+			log.info("VID-12 TC-6 PASSED");
+			
+			
+				
+			driver.navigate().back();
+			//Cancel button isDisplayed
+			driver.findElement(By.xpath("//button[@class='button button--small button--primary']")).isDisplayed();
+			log.info("VID-12 TC-9 PASSED");
+			
+			//Cancel button is clicked
+			driver.findElement(By.xpath("//button[@class='button button--small button--primary']")).click();
+			log.info("Cancel button is clicked");
+			
+			//Verifying VID Home page is displayed
+			Assert.assertTrue(driver.getPageSource().contains("Search Existing Service Instances"));
+			log.info("VID-12 TC-10 PASSED");
+			
+			   }
+		
+		
+		/**
+		 * Refresh subscriber name.
+		 */
+		@Test(priority=9)
+		public void refreshSubscriberName()
+		{
+			log.info("VID-10 TC-4");
+			
+			
+			driver.findElement(By.xpath(configProp.getProperty("refreshButtonSubscriberName"))).isDisplayed();
+			
+			log.info("VID-10 TC-4 PASSED");
+			
+			
+		}
+
+		
+		/**
+		 * Select subscriber type drop down.
+		 *
+		 * @throws InterruptedException the interrupted exception
+		 */
+		@Test(priority=9)
+		public void selectSubscriberTypeDropDown() throws InterruptedException
+		{
+			Thread.sleep(5000);
+			log.info("------------------VID-10 TC-3, VID-12 TC-12,--------------------");
+			//Infrastructure Subscriber Type
+			Select iSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("serviceTypeDropDown"))));
+			
+			List <WebElement> ielementCount = iSelect.getOptions();
+			log.info("Select Element Count of Service type");
+			System.out.println(ielementCount.size());
+			iSelect.selectByIndex(1);
+			
+			log.info("VID-10 TC-3 PASSED");
+			
+						
+			//Submit button is clicked
+			driver.findElement(By.xpath(configProp.getProperty("submitButton"))).click();
+			
+			//Verify whether the page header is displayed "Selected Subscriber's Service Instance Details:"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/h1")).isDisplayed();
+			//Assert.assertTrue(driver.getPageSource().contains("Selected Subscriber's Service Instance Details:"))
+			log.info("Page Header: Selected Subscriber's Service Instance Details");
+			
+			
+			//Verify whether the page header is displayed "Global Customer ID"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/div/table/thead/tr/th[2]/div")).isDisplayed();
+			
+			//Assert.assertTrue(driver.getPageSource().contains("Global Customer ID"));
+			log.info("Table is displayed");
+			
+			log.info("VID-12 TC-12 PASSED");
+			
+		}
+		
+		
+		
+		/**
+		 * Logout under profile.
+		 */
+		@Test(priority=10)
+		public void logoutUnderProfile()
+		{
+			
+			log.info("-----------VID-11 TC-5---------------------");
+			//driver.findElement(By.partialLinkText("Click here to login")).click();
+			//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+			
+		
+			driver.findElement(By.xpath(".//*[@class='icon-user-small login-snippet-icon']")).click();			
+			driver.findElement(By.xpath(".//*[@id='reg-logout-div']/a")).click();
+			//Validate that the user has logged out of VID. Displays "Portal"
+			Assert.assertTrue(driver.getPageSource().contains("Portal"));
+			
+			log.info("VID-11 TC-5 PASSED");
+			
+		}
+
+		
+		
+		/**
+		 * Tear down.
+		 */
+		@AfterClass
+		public void tearDown()
+		{
+			driver.close();
+		
+		}
+		
+		
+		
+	}
+
+
+	
+
diff --git a/onap-enabler-be/src/test/java/org/onap/ecomp/vid/selenium/LogOutLeftPane.java b/onap-enabler-be/src/test/java/org/onap/ecomp/vid/selenium/LogOutLeftPane.java
new file mode 100644
index 0000000..1511c2d
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/ecomp/vid/selenium/LogOutLeftPane.java
@@ -0,0 +1,240 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.ecomp.vid.selenium;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.log4j.Logger;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.support.ui.Select;
+import org.testng.Assert;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+@Test(enabled=false)
+public class LogOutLeftPane {
+
+	WebElement loginButton;
+	
+	/** The login. */
+	WebElement login;
+	
+	/** The pwd. */
+	WebElement pwd;
+	
+	/** The log. */
+	Logger log;
+	
+	/** The errormessage. */
+	WebElement errormessage;
+	
+	/** The driver. */
+	WebDriver driver=new FirefoxDriver();
+	
+	
+	/** The config prop. */
+	private final Properties configProp = new Properties();
+	
+	
+	/**
+	 * Instantiates a new log out left pane.
+	 */
+	private  LogOutLeftPane() {
+		// TODO Auto-generated constructor stub
+		//
+		try{
+		//	InputStream input =this.getClass().getClassLoader().getResourceAsStream("objectmap.properties");
+		//FileInputStream input1 = new FileInputStream("objectmap.properties");
+			
+		InputStream input =new FileInputStream("objectconfig.properties");
+		System.out.println("Read all properties from file");
+		configProp.load(input);
+		System.out.println("Read all properties from file completed");
+		}
+		catch(IOException e) {
+			
+			e.printStackTrace();
+		}
+	}
+	
+	
+	   
+	   
+	/**
+	 * Do before test.
+	 */
+	// TODO Auto-generated method stub
+	@BeforeTest
+	public void doBeforeTest()
+	{
+		//WebDriver driver=new FirefoxDriver();
+		
+		log = Logger.getLogger(LogOutLeftPane.class.getName());
+	
+	
+	
+	// Get url
+	driver.get("http://vid.onap.org:9080/vid/login_external.htm");
+	driver.manage().window().maximize();
+	
+	
+	 login = driver.findElement(By.xpath("//input[@class='fn-ebz-text ng-pristine ng-valid']"));
+	 pwd = driver.findElement(By.xpath("//input[@class='span3 ng-pristine ng-valid']"));
+	 loginButton = driver.findElement(By.id("loginBtn"));
+	}
+	
+	
+	/**
+	 * Expand collapse panel.
+	 *
+	 * @throws InterruptedException the interrupted exception
+	 */
+	@Test(priority=1)
+	public void expandCollapsePanel() throws InterruptedException
+	{
+
+		
+		
+		login.clear();
+		login.sendKeys("su");
+		pwd.clear();
+		pwd.sendKeys("fusion");
+		//driver.findElement(By.partialLinkText("Click here to login")).click();
+		//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		loginButton.click();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		
+		log.info("Clicking Profile link from left pane");
+		Thread.sleep(3000);
+		System.out.println("properties file details --->"+configProp.getProperty("profilelink"));
+		driver.findElement(By.xpath(configProp.getProperty("profilelink"))).click();
+		Thread.sleep(3000);
+		
+		//Verify whether the sub panel is displayed
+		//To verify the following :Search import from webphone and Self 
+		driver.findElement(By.xpath(".//*[@id='panel4']")).isDisplayed();
+		log.info("Expand and collapse passed for Profile link");
+		
+		//For Admin
+		//Verify expand and collapse working for ADMIN
+		log.info("Clicking Admin link from left pane");
+		driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[6]/a/span")).click();
+		//To verify the following: Roles, Roles Functions, Usages
+		driver.findElement(By.xpath(".//*[@id='panel5']")).isDisplayed();
+		
+	
+		log.info("Expand and collapse passed for ADMIN link");
+
+		log.info("VID-11 TC-3 PASSED");
+		
+	}
+	
+	
+	/**
+	 * Drop down list.
+	 *
+	 * @throws InterruptedException the interrupted exception
+	 */
+	@Test(priority=2)
+	public void dropDownList() throws InterruptedException
+	{
+		//VID-12 TC-3
+		log.info("VID-12 TC-3");
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select"));
+		
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select"));
+		Thread.sleep(5000);
+		
+		//Infrastructure Subscriber Name
+		Select oSelect = new Select(driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select")));
+		Select iSelect = new Select(driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select")));
+		
+		List <WebElement> elementCount = oSelect.getOptions();
+		log.info("Subscriber Name Drop Down");
+		System.out.println(elementCount.size());
+		oSelect.selectByIndex(1);
+		log.info("Subscriber name selected");
+		//String selectedOption = new Select(driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select"))).getFirstSelectedOption().getText();
+		
+		
+		List <WebElement> count = iSelect.getOptions();
+		log.info("Subscriber type drop down");
+		System.out.println(count.size());
+		oSelect.selectByIndex(1);
+		log.info("Subscriber type selected");
+		
+
+				
+		//Submit button is clicked
+		driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[3]/td/div/button")).click();
+		
+		
+		//Verify whether the page header is displayed "Selected Subscriber's Service Instance Details:"
+		driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/h1")).isDisplayed();
+		log.info("VID-12 TC-3 PASSED");
+	}
+	
+	
+	
+	
+	/**
+	 * Logout left pane.
+	 */
+	@Test(priority=3)
+	public void logoutLeftPane()
+	{
+		//To Verify if the logout link redirects to Login page when clicked.
+		
+		
+		/*log.info("----------------VID-11 TC-4----------------");
+		login.clear();
+		login.sendKeys("testuser");
+		pwd.clear();
+		pwd.sendKeys("abc123");
+		//driver.findElement(By.partialLinkText("Click here to login")).click();
+		//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		loginButton.click();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);*/
+		log.info("----------------VID-11 TC-4----------------");
+		driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[7]/a")).click();
+		//Validate that the user has logged out of VID. Displays "Portal"
+		Assert.assertTrue(driver.getPageSource().contains("Portal"));
+		
+		log.info("VID 11 TC-4 PASSED");
+		
+		driver.close();
+		
+	}
+	
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/fusion/core/MockApplicationContextTestSuite.java b/onap-enabler-be/src/test/java/org/onap/fusion/core/MockApplicationContextTestSuite.java
new file mode 100644
index 0000000..09a0b43
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/fusion/core/MockApplicationContextTestSuite.java
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.fusion.core;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.AnnotationConfigWebContextLoader;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.testng.annotations.Test;
+import org.onap.portalsdk.core.conf.AppConfig;
+import org.onap.portalsdk.core.objectcache.AbstractCacheManager;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.util.CacheManager;
+
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@WebAppConfiguration
+@ContextConfiguration(loader = AnnotationConfigWebContextLoader.class, classes = {MockAppConfig.class})
+@ActiveProfiles(value="test")
+@Test(enabled=false)
+public class MockApplicationContextTestSuite {
+		
+    	@Autowired
+	    public WebApplicationContext wac;
+
+	    /** The mock mvc. */
+    	private MockMvc mockMvc;
+
+	    /**
+    	 * Setup.
+    	 */
+    	@Before
+	    public void setup() {
+	    	if(mockMvc == null) {
+	    		this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+	    		
+	    	}
+	    }
+	    
+	    /**
+    	 * Gets the bean.
+    	 *
+    	 * @param name the name
+    	 * @return the bean
+    	 */
+    	public Object getBean(String name) {
+			return this.wac.getBean(name);
+		}
+
+
+		/**
+		 * Gets the mock mvc.
+		 *
+		 * @return the mock mvc
+		 */
+		public MockMvc getMockMvc() {
+			return mockMvc;
+		}
+
+		/**
+		 * Sets the mock mvc.
+		 *
+		 * @param mockMvc the new mock mvc
+		 */
+		public void setMockMvc(MockMvc mockMvc) {
+			this.mockMvc = mockMvc;
+		}
+		
+		/**
+		 * Gets the web application context.
+		 *
+		 * @return the web application context
+		 */
+		public WebApplicationContext getWebApplicationContext() {
+			return wac;
+		}
+		
+		
+		
+		
+}
+		
+
+		@Configuration
+		@ComponentScan(basePackages = "org.onap", 
+				 excludeFilters = {
+								 	// the following source configurations should not be scanned; instead of using Exclusion filter, we can use the @Profile annotation to exclude them
+									// see AppConfig class
+									//@ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.onap.portalsdk.core.*AppConfig*")//,
+								 	//@ComponentScan.Filter(type = FilterType.REGEX, pattern = org.onap.*.*AppConfig*")
+								  }
+		    	)
+		@Profile("test")
+		class MockAppConfig extends AppConfig {
+			
+			@Bean 
+		    public SystemProperties systemProperties(){
+		    	return new MockSystemProperties();
+		    }
+			
+			@Bean
+		    public AbstractCacheManager cacheManager() {
+		        return new CacheManager() {
+		        	
+		        	public void configure() throws IOException {
+		        		 
+		        	}
+		        };
+		    }
+			
+			protected String[] tileDefinitions() {
+				return new String[] {"classpath:/WEB-INF/fusion/defs/definitions.xml", "classpath:/WEB-INF/defs/definitions.xml"};
+			}
+			
+			 @Override
+			public void addInterceptors(InterceptorRegistry registry) {
+			    //registry.addInterceptor(new SessionTimeoutInterceptor()).excludePathPatterns(getExcludeUrlPathsForSessionTimeout());
+			    //registry.addInterceptor(resourceInterceptor());
+			}
+			 
+			 public static class MockSystemProperties extends SystemProperties {
+					
+					public MockSystemProperties() {
+					}
+					
+				}
+					
+		}
+		
+		
+
+
diff --git a/onap-enabler-be/src/test/java/org/onap/fusionapp/controller/NetMapTest.java b/onap-enabler-be/src/test/java/org/onap/fusionapp/controller/NetMapTest.java
new file mode 100644
index 0000000..98a715f
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/fusionapp/controller/NetMapTest.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.fusionapp.controller;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.test.web.servlet.ResultActions;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+
+import org.onap.fusion.core.MockApplicationContextTestSuite;
+
+
+public class NetMapTest extends MockApplicationContextTestSuite {
+	
+//	@Test
+	public void testGetNetMap() throws Exception {
+		ResultActions ra =getMockMvc().perform(MockMvcRequestBuilders.get("/net_map"));
+		//Assert.assertEquals(UrlAccessRestrictedException.class,ra.andReturn().getResolvedException().getClass());
+		Assert.assertEquals("net_map_int",ra.andReturn().getModelAndView().getModel().get("frame_int"));
+	}
+	
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/fusionapp/service/ProfileServiceTest.java b/onap-enabler-be/src/test/java/org/onap/fusionapp/service/ProfileServiceTest.java
new file mode 100644
index 0000000..c88348f
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/fusionapp/service/ProfileServiceTest.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.fusionapp.service;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import org.onap.fusion.core.MockApplicationContextTestSuite;
+import org.onap.portalsdk.core.domain.Profile;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.service.ProfileService;
+import org.onap.portalsdk.core.service.UserProfileService;
+
+
+
+public class ProfileServiceTest extends MockApplicationContextTestSuite {
+	
+	@Autowired
+	ProfileService service;
+	
+	/** The user profile service. */
+	@Autowired
+	UserProfileService userProfileService;
+	
+	/**
+	 * Test find all.
+	 */
+	//@Test
+	public void testFindAll() {
+		try {
+		List<Profile> profiles = service.findAll();
+		Assert.assertTrue(profiles.size() > 0);
+
+		}
+		catch (Exception e) {
+			// TODO: handle exception
+		}
+	}
+
+	/**
+	 * Test find all active.
+	 */
+//	@Test
+	public void testFindAllActive() {
+				
+		List<User> users = userProfileService.findAllActive();
+		List<User> activeUsers = userProfileService.findAllActive();
+		Assert.assertTrue(users.size() - activeUsers.size() >= 0);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/RelatedToTest.java b/onap-enabler-be/src/test/java/org/onap/osam/RelatedToTest.java
new file mode 100644
index 0000000..d205abb
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/RelatedToTest.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+
+public class RelatedToTest {
+
+	private RelatedTo createTestSubject() {
+		return new RelatedTo();
+	}
+
+
+	@Test
+	public void testGetAdditionalProperties() throws Exception {
+		RelatedTo testSubject;
+		Map<String, Object> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getAdditionalProperties();
+	}
+
+
+	@Test
+	public void testSetAdditionalProperty() throws Exception {
+		RelatedTo testSubject;
+		String name = "";
+		Object value = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setAdditionalProperty(name, value);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/AaiClientTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/AaiClientTest.java
new file mode 100644
index 0000000..0a3536a
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/AaiClientTest.java
@@ -0,0 +1,469 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableList;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.commons.lang3.exception.ExceptionUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.commons.lang3.tuple.Pair;
+import org.mockito.Mockito;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.aai.model.AaiNodeQueryResponse;
+import org.onap.osam.aai.model.ResourceType;
+import org.onap.osam.aai.util.AAIRestInterface;
+import org.onap.osam.aai.util.HttpsAuthClient;
+import org.onap.osam.aai.util.ServletRequestHelper;
+import org.onap.osam.aai.util.SystemPropertyHelper;
+import org.onap.osam.controllers.LocalWebConfig;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.model.Subscriber;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.model.probes.ExternalComponentStatus;
+import org.onap.osam.model.probes.HttpRequestMetadata;
+import org.onap.osam.model.probes.StatusMetadata;
+import org.onap.osam.testUtils.TestUtils;
+import org.springframework.http.HttpMethod;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import sun.security.provider.certpath.SunCertPathBuilderException;
+import sun.security.validator.ValidatorException;
+
+import javax.crypto.BadPaddingException;
+import javax.net.ssl.SSLHandshakeException;
+import javax.servlet.ServletContext;
+import javax.ws.rs.ProcessingException;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.core.Response;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.security.cert.CertificateException;
+import java.util.ArrayList;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.equalToIgnoringCase;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.testng.Assert.*;
+
+@ContextConfiguration(classes = {LocalWebConfig.class, SystemProperties.class})
+@WebAppConfiguration
+public class AaiClientTest {
+
+    private AaiClient aaiClientMock;
+    private ServletContext servletContext;
+
+    @BeforeMethod
+    public void initMocks(){
+        aaiClientMock = mock(AaiClient.class);
+        aaiClientMock.logger = mock(EELFLoggerDelegate.class);
+        servletContext = mock(ServletContext.class);
+
+        when(servletContext.getRealPath(any(String.class))).thenReturn("");
+
+        when(aaiClientMock.doAaiGet(any(String.class),any(Boolean.class))).thenReturn(null);
+    }
+
+    @DataProvider
+    public static Object[][] logicalLinkData() {
+        return new Object[][] {
+                {"", "network/logical-links/logical-link/"},
+                {"link", "network/logical-links/logical-link/link"}
+        };
+    }
+
+    @Test(dataProvider = "logicalLinkData")
+    public void getLogicalLink_Link_Is_Empty(String link, String expectedUrl) {
+
+        when(aaiClientMock.getLogicalLink(any(String.class))).thenCallRealMethod();
+        aaiClientMock.getLogicalLink(link);
+        Mockito.verify(aaiClientMock).doAaiGet(argThat(equalToIgnoringCase(expectedUrl)),any(Boolean.class));
+    }
+
+    @DataProvider
+    public static Object[][] subscribersResults() {
+        return new Object[][] {
+                {new SubscriberList(new ArrayList<Subscriber>() {{ add(new Subscriber());  add(new Subscriber()); }}), true},
+                {new SubscriberList(new ArrayList<Subscriber>() {{ add(new Subscriber()); }}), true},
+                {new SubscriberList(new ArrayList<Subscriber>()), false}
+        };
+    }
+
+    @Test(dataProvider = "subscribersResults")
+    public void testProbeAaiGetAllSubscribers_returnsTwoToZeroSubscribers_ResultsAsExpected(SubscriberList subscribers, boolean isAvailable){
+        ExternalComponentStatus expectedStatus = new ExternalComponentStatus(ExternalComponentStatus.Component.AAI,isAvailable, new HttpRequestMetadata(
+                HttpMethod.GET,
+                200,
+                "url",
+                "rawData",
+                isAvailable ? "OK" : "No subscriber received",
+                0
+        ));
+        Mockito.when(aaiClientMock.getAllSubscribers(true)).thenReturn(
+                new AaiResponseWithRequestInfo<>(
+                        HttpMethod.GET, "url", new AaiResponse<>(subscribers, null, 200),
+                        "rawData"));
+        Mockito.when(aaiClientMock.probeAaiGetAllSubscribers()).thenCallRealMethod();
+        ExternalComponentStatus result  = aaiClientMock.probeAaiGetAllSubscribers();
+        assertThat(statusDataReflected(result),is(statusDataReflected(expectedStatus)));
+        assertThat(requestMetadataReflected(result.getMetadata()),is(requestMetadataReflected(expectedStatus.getMetadata())));
+    }
+
+    //serialize fields except of fields we cannot know ahead of time
+    private static String requestMetadataReflected(StatusMetadata metadata) {
+        return new ReflectionToStringBuilder(metadata, ToStringStyle.SHORT_PREFIX_STYLE)
+                .setExcludeFieldNames("duration")
+                .toString();
+    }
+
+    private static String statusDataReflected(ExternalComponentStatus status) {
+        return new ReflectionToStringBuilder(status, ToStringStyle.SHORT_PREFIX_STYLE)
+                .setExcludeFieldNames("metadata")
+                .toString();
+    }
+
+    @DataProvider
+    public static Object[][] rawData() {
+        return new Object[][]{
+                {"errorMessage", }, {""}, {null}
+        };
+    }
+
+    @Test(dataProvider = "rawData")
+    public void testProbeAaiGetFullSubscribersWithNullResponse_returnsNotAvailableWithErrorRawData(String rawData){
+        Mockito.when(aaiClientMock.getAllSubscribers(true)).thenReturn(
+                new AaiResponseWithRequestInfo<>(HttpMethod.GET, "url", null,
+                        rawData));
+        ExternalComponentStatus result = callProbeAaiGetAllSubscribersAndAssertNotAvailable();
+        assertThat(result.getMetadata(), instanceOf(HttpRequestMetadata.class));
+        assertEquals(((HttpRequestMetadata) result.getMetadata()).getRawData(), rawData);
+    }
+
+    @DataProvider
+    public static Object[][] exceptions() {
+        return new Object[][] {
+                {"NullPointerException", "errorMessage",
+                        new ExceptionWithRequestInfo(HttpMethod.GET, "url",
+                                "errorMessage", null, new NullPointerException())},
+                {"RuntimeException", null,
+                        new ExceptionWithRequestInfo(HttpMethod.GET, "url",
+                                null, null, new RuntimeException())},
+                {"RuntimeException", null,
+                        new RuntimeException()},
+        };
+    }
+
+    @Test(dataProvider = "exceptions")
+    public void testProbeAaiGetFullSubscribersWithNullResponse_returnsNotAvailableWithErrorRawData(String description, String expectedRawData, Exception exception){
+        Mockito.when(aaiClientMock.getAllSubscribers(true)).thenThrow(exception);
+        ExternalComponentStatus result = callProbeAaiGetAllSubscribersAndAssertNotAvailable();
+        if (exception instanceof ExceptionWithRequestInfo) {
+            assertThat(result.getMetadata(), instanceOf(HttpRequestMetadata.class));
+            assertEquals(((HttpRequestMetadata) result.getMetadata()).getRawData(), expectedRawData);
+        }
+        assertThat(result.getMetadata().getDescription(), containsString(description));
+    }
+
+    private ExternalComponentStatus callProbeAaiGetAllSubscribersAndAssertNotAvailable() {
+        Mockito.when(aaiClientMock.probeAaiGetAllSubscribers()).thenCallRealMethod();
+        ExternalComponentStatus result  = aaiClientMock.probeAaiGetAllSubscribers();
+        assertFalse(result.isAvailable());
+        return result;
+    }
+
+
+    @Test
+    public void getTenants_Arguments_Are_Null_Or_Empty() {
+
+        when(aaiClientMock.getTenants(any(String.class), any(String.class))).thenCallRealMethod();
+
+        AaiResponse response = aaiClientMock.getTenants("", "");
+
+        assertEquals(response.getErrorMessage(), "{\"statusText\":\" Failed to retrieve LCP Region & Tenants from A&AI, Subscriber ID or Service Type is missing.\"}");
+
+
+        response = aaiClientMock.getTenants(null, null);
+
+        assertEquals(response.getErrorMessage(), "{\"statusText\":\" Failed to retrieve LCP Region & Tenants from A&AI, Subscriber ID or Service Type is missing.\"}");
+    }
+
+    @Test
+    public void getTenants_Arguments_Are_Valid_But_Tenants_Not_Exist() {
+
+        when(aaiClientMock.getTenants(any(String.class), any(String.class))).thenCallRealMethod();
+
+        Response generalEmptyResponse = mock(Response.class);
+        when(aaiClientMock.doAaiGet(any(String.class),any(Boolean.class))).thenReturn(generalEmptyResponse);
+
+        AaiResponse response = aaiClientMock.getTenants("subscriberId", "serviceType");
+
+        assertEquals(response.getErrorMessage(), "{\"statusText\":\" A&AI has no LCP Region & Tenants associated to subscriber 'subscriberId' and service type 'serviceType'\"}");
+
+    }
+
+    @Test
+    public void getTenants_Arguments_Are_Valid_Get_The_Tenanats() {
+
+        when(aaiClientMock.getTenants(any(String.class), any(String.class))).thenCallRealMethod();
+
+
+        Response generalEmptyResponse = mock(Response.class);
+
+        when(generalEmptyResponse.readEntity(String.class)).thenReturn(tenantResponseRaw);
+        when(generalEmptyResponse.getStatus()).thenReturn(200);
+        when(generalEmptyResponse.getStatusInfo()).thenReturn(new Response.StatusType() {
+            @Override
+            public int getStatusCode() {
+                return 200;
+            }
+
+            @Override
+            public Response.Status.Family getFamily() {
+                return Response.Status.Family.SUCCESSFUL;
+            }
+
+            @Override
+            public String getReasonPhrase() {
+                return null;
+            }
+        });
+
+
+        when(aaiClientMock.doAaiGet(any(String.class),any(Boolean.class))).thenReturn(generalEmptyResponse);
+
+        AaiResponse<GetTenantsResponse[]> response = aaiClientMock.getTenants("subscriberId", "serviceType");
+
+        Assert.assertTrue(response.t.length> 0);
+    }
+
+    final String tenantResponseRaw ="" +
+            "{" +
+            "\"service-type\": \"VIRTUAL USP\"," +
+            "\"resource-version\": \"1494001841964\"," +
+            "\"relationship-list\": {" +
+            "\"relationship\": [{" +
+            "\"related-to\": \"tenant\"," +
+            "\"related-link\": \"/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/092eb9e8e4b7412e8787dd091bc58e86\"," +
+            "\"relationship-data\": [{" +
+            "\"relationship-key\": \"cloud-region.cloud-owner\"," +
+            "\"relationship-value\": \"att-aic\"" +
+            "}," +
+            "{" +
+            "\"relationship-key\": \"cloud-region.cloud-region-id\"," +
+            "\"relationship-value\": \"AAIAIC25\"" +
+            "}," +
+            "{" +
+            "\"relationship-key\": \"tenant.tenant-id\"," +
+            "\"relationship-value\": \"092eb9e8e4b7412e8787dd091bc58e86\"" +
+            "}" +
+            "]," +
+            "\"related-to-property\": [{" +
+            "\"property-key\": \"tenant.tenant-name\"," +
+            "\"property-value\": \"USP-SIP-IC-24335-T-01\"" +
+            "}]" +
+            "}]" +
+            "}" +
+            "}";
+
+    @DataProvider
+    public static Object[][] resourceTypesProvider() {
+        return new Object[][] {
+                {"service-instance", ResourceType.SERVICE_INSTANCE},
+                {"generic-vnf", ResourceType.GENERIC_VNF},
+                {"vf-module", ResourceType.VF_MODULE}
+        };
+    }
+
+    @Test(dataProvider = "resourceTypesProvider")
+    public void aaiNodeQueryResponseDeserializationTest(String resourceType, ResourceType expectedResourceType) throws IOException {
+        String link = "/aai/v12/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/Nimbus/service-instances/service-instance/7131d483-b450-406f-8e30-0c650645fc67";
+        String json =
+                "{\"result-data\": [{" +
+                    "\"resource-type\": \""+resourceType+"\"," +
+                    "\"resource-link\": \""+ link+ "\"" +
+                "}]}";
+
+        AaiNodeQueryResponse nodeQueryResponse = new ObjectMapper().readValue(json, AaiNodeQueryResponse.class);
+        assertThat(nodeQueryResponse.resultData.get(0).resourceLink, equalTo(link));
+        assertThat(nodeQueryResponse.resultData.get(0).resourceType, is(expectedResourceType));
+    }
+
+    @Test
+    public void aaiNodeQueryEmptyResponseDeserializationTest() throws IOException{
+        String json = "{}";
+        AaiNodeQueryResponse nodeQueryResponse = new ObjectMapper().readValue(json, AaiNodeQueryResponse.class);
+        assertNull(nodeQueryResponse.resultData);
+    }
+
+    @DataProvider
+    public static Object[][] nameAndResourceTypeProvider() {
+        return new Object[][] {
+                {"SRIOV_SVC", ResourceType.SERVICE_INSTANCE, "search/nodes-query?search-node-type=service-instance&filter=service-instance-name:EQUALS:SRIOV_SVC"},
+                {"b1707vidnf", ResourceType.GENERIC_VNF, "search/nodes-query?search-node-type=generic-vnf&filter=vnf-name:EQUALS:b1707vidnf"},
+                {"connectivity_test", ResourceType.VF_MODULE, "search/nodes-query?search-node-type=vf-module&filter=vf-module-name:EQUALS:connectivity_test"},
+                {"MjVg1234", ResourceType.VOLUME_GROUP, "search/nodes-query?search-node-type=volume-group&filter=volume-group-name:EQUALS:MjVg1234"}
+        };
+    }
+
+    @Test(dataProvider = "nameAndResourceTypeProvider")
+    public void whenSearchNodeTypeByName_callRightAaiPath(String name, ResourceType type, String expectedUrl) {
+        when(aaiClientMock.searchNodeTypeByName(any(String.class), any(ResourceType.class))).thenCallRealMethod();
+        aaiClientMock.searchNodeTypeByName(name, type);
+        Mockito.verify(aaiClientMock).doAaiGet(eq(expectedUrl), eq(false));
+    }
+
+    @DataProvider
+    public static Object[][] aaiClientInternalExceptions() {
+        return Stream.<Pair<Class<? extends Throwable>, UncheckedBiConsumer<HttpsAuthClient, Client>>>of(
+
+                // Exception out of httpsAuthClientMock
+                Pair.of(CertificateException.class, (httpsAuthClientMock, javaxClientMock) -> {
+                    final CertificateException e0 = new CertificateException("No X509TrustManager implementation available");
+                    SSLHandshakeException e = new SSLHandshakeException(e0.toString());
+                    e.initCause(e0);
+
+                    when(httpsAuthClientMock.getClient(any())).thenThrow(e);
+                }),
+
+                Pair.of(StringIndexOutOfBoundsException.class, mockExceptionOnClientProvider(new StringIndexOutOfBoundsException(4))),
+
+                Pair.of(NullPointerException.class, mockExceptionOnClientProvider(new NullPointerException("null"))),
+
+                Pair.of(FileNotFoundException.class, mockExceptionOnClientProvider(new FileNotFoundException("vid/WEB-INF/cert/aai-client-cert.p12"))),
+
+                Pair.of(BadPaddingException.class, mockExceptionOnClientProvider(
+                        new IOException("keystore password was incorrect", new BadPaddingException("Given final block not properly padded")))
+                ),
+                Pair.of(GenericUncheckedException.class, mockExceptionOnClientProvider(new GenericUncheckedException("basa"))),
+
+                Pair.of(NullPointerException.class, (httpsAuthClientMock, javaxClientMock) ->
+                        when(httpsAuthClientMock.getClient(any())).thenReturn(null)),
+
+
+                // Exception out of javax's Client
+                Pair.of(SSLHandshakeException.class, (httpsAuthClientMock, javaxClientMock) -> {
+                    when(javaxClientMock.target(anyString())).thenThrow(
+                            new ProcessingException(new SSLHandshakeException("Received fatal alert: certificate_expired"))
+                    );
+                }),
+
+                Pair.of(SunCertPathBuilderException.class, (httpsAuthClientMock, javaxClientMock) -> {
+                    SunCertPathBuilderException e0 = new SunCertPathBuilderException("unable to find valid certification path to requested target");
+                    when(javaxClientMock.target(anyString())).thenThrow(
+                            new ProcessingException(new ValidatorException("PKIX path building failed: " + e0.toString(), e0))
+                    );
+                }),
+
+                Pair.of(GenericUncheckedException.class, (httpsAuthClientMock, javaxClientMock) ->
+                        when(javaxClientMock.target(anyString())).thenThrow(new GenericUncheckedException("basa")))
+
+        ).flatMap(l -> Stream.of(
+                // double each case to propagateExceptions = true/false, to verify that "don't propagate" really still work
+                ImmutableList.of(l.getLeft(), l.getRight(), true).toArray(),
+                ImmutableList.of(l.getLeft(), l.getRight(), false).toArray()
+        )).collect(Collectors.toList()).toArray(new Object[][]{});
+    }
+
+    private static UncheckedBiConsumer<HttpsAuthClient, Client> mockExceptionOnClientProvider(Exception e) {
+        return (httpsAuthClientMock, javaxClientMock) ->
+                when(httpsAuthClientMock.getClient(any())).thenThrow(e);
+    }
+
+    @Test(dataProvider = "aaiClientInternalExceptions")
+    public void propagateExceptions_internalsThrowException_ExceptionRethrown(Class<? extends Throwable> expectedType, BiConsumer<HttpsAuthClient, Client> setupMocks, boolean propagateExceptions) throws Exception {
+
+        // prepare mocks
+        HttpsAuthClient httpsAuthClientMock = mock(HttpsAuthClient.class);
+        TestUtils.JavaxRsClientMocks mocks = new TestUtils.JavaxRsClientMocks();
+        Client javaxClientMock = mocks.getFakeClient();
+        Response responseMock = mocks.getFakeResponse();
+
+        // prepare real AAIRestInterface and AaiClient, and wire mocks
+        AAIRestInterface aaiRestInterface = new AAIRestInterface(httpsAuthClientMock, new ServletRequestHelper(), new SystemPropertyHelper());
+        final AaiClient aaiClient = new AaiClient(aaiRestInterface, null);
+        when(httpsAuthClientMock.getClient(any())).thenReturn(javaxClientMock);
+
+        // define atomic method under test, including reset of "aaiRestInterface.client"
+        final Function<Boolean, Response> doAaiGet = (propagateExceptions1) -> {
+            try {
+                FieldUtils.writeField(aaiRestInterface, "client", null, true);
+                return aaiClient.doAaiGet("uri", false, propagateExceptions1).getResponse();
+            } catch (IllegalAccessException e) {
+                throw new RuntimeException(e);
+            }
+        };
+
+        // verify setup again
+        assertThat("mocks setup should make doAaiGet return our responseMock", doAaiGet.apply(true), is(sameInstance(responseMock)));
+
+
+        /// TEST:
+        setupMocks.accept(httpsAuthClientMock, javaxClientMock);
+
+        try {
+            final Response response = doAaiGet.apply(propagateExceptions);
+        } catch (Exception e) {
+            if (propagateExceptions) {
+                assertThat("root cause incorrect for " + ExceptionUtils.getStackTrace(e), ExceptionUtils.getRootCause(e), instanceOf(expectedType));
+                return; // ok, done
+            } else {
+                // Verify that "don't propagate" really still work
+                Assert.fail("calling doAaiGet when propagateExceptions is false must result with no exception", e);
+            }
+        }
+
+        // If no exception caught
+        // We're asserting that the legacy behaviour is still in place. Hopefully
+        // one day we will remove the non-propagateExceptions case
+        assertFalse(propagateExceptions, "calling doAaiGet when propagateExceptions is 'true' must result with an exception (in this test)");
+    }
+
+    @FunctionalInterface
+    public interface UncheckedBiConsumer<T, U> extends BiConsumer<T, U> {
+        @Override
+        default void accept(T t, U u) {
+            try {
+                acceptThrows(t, u);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        void acceptThrows(T t, U u) throws Exception;
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/AaiGetVnfResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/AaiGetVnfResponseTest.java
new file mode 100644
index 0000000..78509b5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/AaiGetVnfResponseTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+public class AaiGetVnfResponseTest {
+
+	private AaiGetVnfResponse createTestSubject() {
+		return new AaiGetVnfResponse();
+	}
+
+	@Test
+	public void testGetAdditionalProperties() throws Exception {
+		AaiGetVnfResponse testSubject;
+		Map<String, Object> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getAdditionalProperties();
+	}
+
+	@Test
+	public void testSetAdditionalProperty() throws Exception {
+		AaiGetVnfResponse testSubject;
+		String name = "";
+		Object value = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setAdditionalProperty(name, value);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/OperationalEnvironmentTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/OperationalEnvironmentTest.java
new file mode 100644
index 0000000..b358eb8
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/OperationalEnvironmentTest.java
@@ -0,0 +1,211 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.junit.Test;
+import org.onap.osam.aai.model.RelationshipList;
+
+public class OperationalEnvironmentTest {
+
+    private OperationalEnvironment createTestSubject() {
+        return new OperationalEnvironment();
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentId() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentId();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentId() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentId(operationalEnvironmentId);
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentName() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentName();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentName() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentName(operationalEnvironmentName);
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentType() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentType();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentType() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentType(operationalEnvironmentType);
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentStatus() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentStatus();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentStatus() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentStatus = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentStatus(operationalEnvironmentStatus);
+    }
+
+    @Test
+    public void testGetTenantContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTenantContext();
+    }
+
+    @Test
+    public void testSetTenantContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String tenantContext = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setTenantContext(tenantContext);
+    }
+
+    @Test
+    public void testGetWorkloadContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkloadContext();
+    }
+
+    @Test
+    public void testSetWorkloadContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String workloadContext = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkloadContext(workloadContext);
+    }
+
+    @Test
+    public void testGetResourceVersion() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResourceVersion();
+    }
+
+    @Test
+    public void testSetResourceVersion() throws Exception {
+        OperationalEnvironment testSubject;
+        String resourceVersion = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setResourceVersion(resourceVersion);
+    }
+
+    @Test
+    public void testGetRelationshipList() throws Exception {
+        OperationalEnvironment testSubject;
+        RelationshipList result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRelationshipList();
+    }
+
+    @Test
+    public void testSetRelationshipList() throws Exception {
+        OperationalEnvironment testSubject;
+        RelationshipList relationshipList = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRelationshipList(relationshipList);
+    }
+
+    @Test
+    public void testOperationalEnvironment() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentId = "";
+        String operationalEnvironmentName = "";
+        String operationalEnvironmentType = "";
+        String operationalEnvironmentStatus = "";
+        String tenantContext = "";
+        String workloadContext = "";
+        String resourceVersion = "";
+        RelationshipList relationshipList = null;
+
+        // default test
+        testSubject = new OperationalEnvironment(operationalEnvironmentId, operationalEnvironmentName,
+                operationalEnvironmentType, operationalEnvironmentStatus, tenantContext, workloadContext,
+                resourceVersion, relationshipList);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/ServicePropertiesTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/ServicePropertiesTest.java
new file mode 100644
index 0000000..b651049
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/ServicePropertiesTest.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.osam.aai.model.ServiceProperties;
+
+public class ServicePropertiesTest {
+
+	private ServiceProperties createTestSubject() {
+		return new ServiceProperties();
+	}
+
+	@Test
+	public void testGetAdditionalProperties() throws Exception {
+		ServiceProperties testSubject;
+		Map<String, Object> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getAdditionalProperties();
+	}
+
+	@Test
+	public void testSetAdditionalProperty() throws Exception {
+		ServiceProperties testSubject;
+		String name = "";
+		Object value = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setAdditionalProperty(name, value);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberAaiResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberAaiResponseTest.java
new file mode 100644
index 0000000..8adf9c2
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberAaiResponseTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.junit.Test;
+import org.onap.osam.model.SubscriberList;
+
+public class SubscriberAaiResponseTest {
+
+	private SubscriberAaiResponse createTestSubject() {
+		return new SubscriberAaiResponse(new SubscriberList(), "", 0);
+	}
+
+	
+	@Test
+	public void testGetSubscriberList() throws Exception {
+		SubscriberAaiResponse testSubject;
+		SubscriberList result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getSubscriberList();
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberFilteredResultsTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberFilteredResultsTest.java
new file mode 100644
index 0000000..e7cf380
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberFilteredResultsTest.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import java.util.ArrayList;
+
+import org.junit.Test;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.roles.EcompRole;
+import org.onap.osam.roles.Role;
+import org.onap.osam.roles.RoleValidator;
+
+public class SubscriberFilteredResultsTest {
+
+    private SubscriberFilteredResults createTestSubject() {
+        ArrayList<Role> list = new ArrayList<Role>();
+        list.add(new Role(EcompRole.READ, "a", "a", "a"));
+        RoleValidator rl=new RoleValidator(list);
+        SubscriberList sl = new SubscriberList();
+        sl.customer = new ArrayList<org.onap.osam.model.Subscriber>();
+        sl.customer.add(new org.onap.osam.model.Subscriber());
+        return new SubscriberFilteredResults(rl, sl, "OK", 200);
+    }
+
+    @Test
+    public void testGetSubscriberList() throws Exception {
+        SubscriberFilteredResults testSubject;
+        SubscriberListWithFilterData result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSubscriberList();
+    }
+
+    @Test
+    public void testSetSubscriberList() throws Exception {
+        SubscriberFilteredResults testSubject;
+        SubscriberListWithFilterData subscriberList = null;
+
+        // default test
+        testSubject = createTestSubject();
+        //testSubject.setSubscriberList(subscriberList);
+        testSubject.getSubscriberList();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberWithFilterTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberWithFilterTest.java
new file mode 100644
index 0000000..5b6ddcc
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/SubscriberWithFilterTest.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import org.junit.Test;
+
+public class SubscriberWithFilterTest {
+
+	private SubscriberWithFilter createTestSubject() {
+		return new SubscriberWithFilter();
+	}
+
+	@Test
+	public void testGetIsPermitted() throws Exception {
+		SubscriberWithFilter testSubject;
+		boolean result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getIsPermitted();
+	}
+
+	@Test
+	public void testSetIsPermitted() throws Exception {
+		SubscriberWithFilter testSubject;
+		boolean isPermitted = false;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setIsPermitted(isPermitted);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/VnfResultTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/VnfResultTest.java
new file mode 100644
index 0000000..3f06e6c
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/VnfResultTest.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai;
+
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.osam.aai.model.VnfResult;
+
+public class VnfResultTest {
+
+	private VnfResult createTestSubject() {
+		return new VnfResult();
+	}
+
+	@Test
+	public void testGetAdditionalProperties() throws Exception {
+		VnfResult testSubject;
+		Map<String, Object> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getAdditionalProperties();
+	}
+
+	@Test
+	public void testSetAdditionalProperty() throws Exception {
+		VnfResult testSubject;
+		String name = "";
+		Object value = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setAdditionalProperty(name, value);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentListTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentListTest.java
new file mode 100644
index 0000000..4bc64ab
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetOperationalEnvironments/OperationalEnvironmentListTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetOperationalEnvironments;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+import org.junit.Test;
+
+public class OperationalEnvironmentListTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(OperationalEnvironmentList.class, hasValidGettersAndSetters());
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetPnfResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetPnfResponseTest.java
new file mode 100644
index 0000000..c74fe37
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetPnfResponseTest.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringContains.containsString;
+import static org.hamcrest.core.IsEqual.equalTo;
+
+public class AaiGetPnfResponseTest {
+
+    private AaiGetPnfResponse aaiGetPnfResponse;
+
+    @Before
+    public void setUp(){
+        aaiGetPnfResponse = new AaiGetPnfResponse();
+        aaiGetPnfResponse.results = new ArrayList<>();
+        aaiGetPnfResponse.setAdditionalProperty("key1", "value1");
+        aaiGetPnfResponse.setAdditionalProperty("key2", "value2");
+    }
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() throws IOException {
+        String result = new ObjectMapper().writeValueAsString(aaiGetPnfResponse);
+        assertThat(result, containsString("key1"));
+        assertThat(result, containsString("value2"));
+        assertThat(result, containsString("key2"));
+        assertThat(result, containsString("value2"));
+    }
+
+    @Test
+    public void shouldHaveValidToString(){
+        assertThat(aaiGetPnfResponse.toString(),
+                equalTo("AaiGetPnfResponse{results=[], additionalProperties={key1=value1, key2=value2}}"));
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetPnfs/PnfTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetPnfs/PnfTest.java
new file mode 100644
index 0000000..ec25225
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiGetPnfs/PnfTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model.AaiGetPnfs;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class PnfTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(Pnf.class, hasValidGettersAndSetters());
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiRelationResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiRelationResponseTest.java
new file mode 100644
index 0000000..d139936
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/AaiRelationResponseTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class AaiRelationResponseTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(AaiRelationResponse.class, hasValidGettersAndSetters());
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/GetServiceModelsByDistributionStatusResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/GetServiceModelsByDistributionStatusResponseTest.java
new file mode 100644
index 0000000..a0b4ac2
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/GetServiceModelsByDistributionStatusResponseTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class GetServiceModelsByDistributionStatusResponseTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(GetServiceModelsByDistributionStatusResponse.class, hasValidGettersAndSetters());
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/LogicalLinkResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/LogicalLinkResponseTest.java
new file mode 100644
index 0000000..607ea78
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/LogicalLinkResponseTest.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class LogicalLinkResponseTest {
+
+    private LogicalLinkResponse createTestSubject() {
+        return new LogicalLinkResponse();
+    }
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(LogicalLinkResponse.class, hasValidGettersAndSetters());
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelTest.java
new file mode 100644
index 0000000..13d6ea2
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ModelTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(Model.class, hasValidGettersAndSetters());
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelVerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelVerTest.java
new file mode 100644
index 0000000..d0944c1
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelVerTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ModelVerTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(ModelVer.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelVersTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelVersTest.java
new file mode 100644
index 0000000..3d32f87
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ModelVersTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ModelVersTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(ModelVers.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/OwningEntityTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/OwningEntityTest.java
new file mode 100644
index 0000000..a38bdc6
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/OwningEntityTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class OwningEntityTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(OwningEntity.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/PnfPropertiesTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/PnfPropertiesTest.java
new file mode 100644
index 0000000..80989ef
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/PnfPropertiesTest.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringContains.containsString;
+
+public class PnfPropertiesTest {
+
+    private PnfProperties pnfProperties;
+
+    @Before
+    public void setUp(){
+        pnfProperties = new PnfProperties();
+        pnfProperties.setAdditionalProperty("key1", "value1");
+        pnfProperties.setAdditionalProperty("key2", "value2");
+    }
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() throws IOException {
+        String result = new ObjectMapper().writeValueAsString(pnfProperties);
+        assertThat(result, containsString("key1"));
+        assertThat(result, containsString("value2"));
+        assertThat(result, containsString("key2"));
+        assertThat(result, containsString("value2"));
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/PnfResultTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/PnfResultTest.java
new file mode 100644
index 0000000..027c47e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/PnfResultTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import java.io.IOException;
+
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringContains.containsString;
+
+public class PnfResultTest {
+
+    private PnfResult pnfResult;
+
+    @Before
+    public void setUp(){
+        pnfResult = new PnfResult();
+        pnfResult.setAdditionalProperty("key1", "value1");
+        pnfResult.setAdditionalProperty("key2", "value2");
+    }
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() throws IOException {
+        String result = new ObjectMapper().writeValueAsString(pnfResult);
+        assertThat(result, containsString("key1"));
+        assertThat(result, containsString("value2"));
+        assertThat(result, containsString("key2"));
+        assertThat(result, containsString("value2"));
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ProjectResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ProjectResponseTest.java
new file mode 100644
index 0000000..85719b7
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ProjectResponseTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ProjectResponseTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(ProjectResponse.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ProjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ProjectTest.java
new file mode 100644
index 0000000..15d5ad4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ProjectTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ProjectTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters(){
+        assertThat(Project.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelatedToPropertyTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelatedToPropertyTest.java
new file mode 100644
index 0000000..9f7358c
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelatedToPropertyTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class RelatedToPropertyTest {
+
+	@Test
+	public void shouldHaveValidGettersAndSetters(){
+		assertThat(RelatedToProperty.class, hasValidGettersAndSetters());
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelationshipDataTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelationshipDataTest.java
new file mode 100644
index 0000000..401e2f5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelationshipDataTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+
+public class RelationshipDataTest {
+
+	@Test
+	public void shouldHaveValidGettersAndSetters(){
+		assertThat(RelationshipData.class, hasValidGettersAndSetters());
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelationshipTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelationshipTest.java
new file mode 100644
index 0000000..6ec55e5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/RelationshipTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+
+public class RelationshipTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Relationship.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ResultTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ResultTest.java
new file mode 100644
index 0000000..f5e8a24
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ResultTest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ResultTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(Result.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ServiceRelationshipsTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ServiceRelationshipsTest.java
new file mode 100644
index 0000000..3b3f616
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/model/ServiceRelationshipsTest.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.model;
+
+import org.junit.Test;
+
+import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+
+public class ServiceRelationshipsTest {
+
+    @Test
+    public void shouldHaveValidGettersAndSetters() {
+        assertThat(ServiceRelationships.class, hasValidGettersAndSetters());
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/util/AAIRestInterfaceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/AAIRestInterfaceTest.java
new file mode 100644
index 0000000..ce038c3
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/AAIRestInterfaceTest.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+public class AAIRestInterfaceTest {
+
+    /*
+    TO BE IMPLEMENTED
+    
+    private AAIRestInterface createTestSubject() {
+        return new AAIRestInterface("");
+    }
+
+    @Test
+    public void testEncodeURL() throws Exception {
+        AAIRestInterface testSubject;
+        String nodeKey = "";
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.encodeURL(nodeKey);
+    }
+
+    @Test
+    public void testSetRestSrvrBaseURL() throws Exception {
+        AAIRestInterface testSubject;
+        String baseURL = "";
+
+        // test 1
+        testSubject = createTestSubject();
+        baseURL = null;
+        testSubject.SetRestSrvrBaseURL(baseURL);
+
+        // test 2
+        testSubject = createTestSubject();
+        baseURL = "";
+        testSubject.SetRestSrvrBaseURL(baseURL);
+    }
+
+    @Test
+    public void testGetRestSrvrBaseURL() throws Exception {
+        AAIRestInterface testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRestSrvrBaseURL();
+    }
+
+
+    @Test
+    public void testRestPut() throws Exception {
+        AAIRestInterface testSubject;
+        String fromAppId = "";
+        String transId = "";
+        String path = "";
+        String payload = "";
+        boolean xml = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.RestPut(fromAppId, transId, path, payload, xml);
+    }
+
+    @Test
+    public void testRestPost() throws Exception {
+        AAIRestInterface testSubject;
+        String fromAppId = "";
+        String transId = "";
+        String path = "";
+        String payload = "";
+        boolean xml = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.RestPost(fromAppId, transId, path, payload, xml);
+    }*/
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/util/CustomJacksonJaxBJsonProviderTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/CustomJacksonJaxBJsonProviderTest.java
new file mode 100644
index 0000000..6b1029e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/CustomJacksonJaxBJsonProviderTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationConfig;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.SerializationConfig;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CustomJacksonJaxBJsonProviderTest {
+
+    private CustomJacksonJaxBJsonProvider createTestSubject() {
+        return new CustomJacksonJaxBJsonProvider();
+    }
+
+    @Test
+    public void testMapperHasCorrectConfig() throws Exception {
+        CustomJacksonJaxBJsonProvider testSubject = createTestSubject();
+        DeserializationConfig deserializationConfig = testSubject.getMapper().getDeserializationConfig();
+        SerializationConfig serializationConfig = testSubject.getMapper().getSerializationConfig();
+
+        Assert.assertFalse(serializationConfig.hasSerializationFeatures(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS.getMask()));
+        Assert.assertFalse(serializationConfig.hasSerializationFeatures(SerializationFeature.INDENT_OUTPUT.getMask()));
+        Assert.assertFalse(serializationConfig.hasSerializationFeatures(SerializationFeature.WRAP_ROOT_VALUE.getMask()));
+        Assert.assertFalse(serializationConfig.hasSerializationFeatures(SerializationFeature.CLOSE_CLOSEABLE.getMask()));
+
+        Assert.assertFalse(deserializationConfig.hasDeserializationFeatures(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES.getMask()));
+        Assert.assertFalse(deserializationConfig.hasDeserializationFeatures(DeserializationFeature.UNWRAP_ROOT_VALUE.getMask()));
+
+        Assert.assertEquals(serializationConfig.getSerializationInclusion(), JsonInclude.Include.NON_NULL);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/util/HttpsAuthClientTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/HttpsAuthClientTest.java
new file mode 100644
index 0000000..9883e11
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/HttpsAuthClientTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.net.ssl.SSLContext;
+
+import static org.mockito.Mockito.verify;
+
+@RunWith(MockitoJUnitRunner.class)
+public class HttpsAuthClientTest {
+    @Mock
+    private SystemPropertyHelper systemPropertyHelper;
+    @Mock
+    private SSLContextProvider sslContextProvider;
+    @Mock
+    private SSLContext sslContext;
+
+    public static final String CERT_FILE_PATH = "any_path";
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/util/ParametrizedAAIRestInterfaceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/ParametrizedAAIRestInterfaceTest.java
new file mode 100644
index 0000000..b33aacf
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/ParametrizedAAIRestInterfaceTest.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.osam.aai.exceptions.InvalidPropertyException;
+import org.testng.Assert;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Response;
+import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Optional;
+import java.util.UUID;
+
+import static javax.ws.rs.core.Response.Status.NO_CONTENT;
+import static javax.ws.rs.core.Response.Status.OK;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(Parameterized.class)
+public class ParametrizedAAIRestInterfaceTest {
+
+    private static final String PATH = "path";
+    private static final String HTTP_LOCALHOST = "http://localhost/";
+    @Mock
+    private Client client;
+    @Mock
+    private WebTarget webTarget;
+    @Mock
+    private Invocation.Builder builder;
+    @Mock
+    private ServletRequestHelper servletRequestHelper;
+    @Mock
+    private HttpsAuthClient httpsAuthClient;
+    @Mock
+    private HttpServletRequest httpServletRequest;
+    @Mock
+    private Response response;
+    @Mock
+    private SystemPropertyHelper systemPropertyHelper;
+
+    private AAIRestInterface testSubject;
+    private Response.Status status;
+
+    @Parameterized.Parameters
+    public static Collection<Object> data() {
+        return Arrays.asList(OK, NO_CONTENT);
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        mockSystemProperties();
+        testSubject = createTestSubject();
+        when(client.target(HTTP_LOCALHOST+PATH)).thenReturn(webTarget);
+        when(webTarget.request()).thenReturn(builder);
+        when(builder.accept(Mockito.anyString())).thenReturn(builder);
+        when(builder.header(Mockito.anyString(), Mockito.anyString())).thenReturn(builder);
+        when(servletRequestHelper.extractOrGenerateRequestId()).thenReturn(UUID.randomUUID().toString());
+    }
+
+    public ParametrizedAAIRestInterfaceTest(Response.Status status) {
+        this.status = status;
+    }
+
+    private AAIRestInterface createTestSubject() {
+        return new AAIRestInterface(Optional.of(client), httpsAuthClient, servletRequestHelper, systemPropertyHelper);
+    }
+
+    @Test
+    public void testRestDeleteWithValidResponse() throws Exception {
+        // given
+        String methodName = "Delete";
+
+        // when
+        when(builder.delete()).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(status);
+        boolean finalResponse = testSubject.Delete("", "", PATH);
+
+        // then
+        verify(builder).delete();
+        Assert.assertTrue(finalResponse);
+    }
+
+    private void mockSystemProperties() throws UnsupportedEncodingException, InvalidPropertyException {
+        when(systemPropertyHelper.getAAIServerUrl()).thenReturn(Optional.of(HTTP_LOCALHOST));
+        when(systemPropertyHelper.getAAIUseClientCert()).thenReturn(Optional.of("cert"));
+        when(systemPropertyHelper.getAAIVIDPasswd()).thenReturn(Optional.of("passwd"));
+        when(systemPropertyHelper.getAAIVIDUsername()).thenReturn(Optional.of("user"));
+        when(systemPropertyHelper.getEncodedCredentials()).thenReturn("someCredentials");
+        when(systemPropertyHelper.getFullServicePath(Mockito.anyString())).thenReturn("http://localhost/path");
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/aai/util/SingleAAIRestInterfaceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/SingleAAIRestInterfaceTest.java
new file mode 100644
index 0000000..5ec9b9e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/aai/util/SingleAAIRestInterfaceTest.java
@@ -0,0 +1,310 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.aai.util;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.osam.aai.exceptions.InvalidPropertyException;
+import org.testng.Assert;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.io.UnsupportedEncodingException;
+import java.util.Optional;
+import java.util.UUID;
+
+import static javax.ws.rs.core.Response.Status.*;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.class)
+public class SingleAAIRestInterfaceTest {
+
+    private static final String PATH = "path";
+    private static final String HTTP_LOCALHOST = "http://localhost/";
+    @Mock
+    private Client client;
+    @Mock
+    private WebTarget webTarget;
+    @Mock
+    private Invocation.Builder builder;
+    @Mock
+    private ServletRequestHelper servletRequestHelper;
+    @Mock
+    private HttpsAuthClient httpsAuthClient;
+    @Mock
+    private HttpServletRequest httpServletRequest;
+    @Mock
+    private Response response;
+    @Mock
+    private SystemPropertyHelper systemPropertyHelper;
+
+    private AAIRestInterface testSubject;
+
+    @Before
+    public void setUp() throws Exception {
+        mockSystemProperties();
+        testSubject = createTestSubject();
+        when(client.target(HTTP_LOCALHOST+PATH)).thenReturn(webTarget);
+        when(webTarget.request()).thenReturn(builder);
+        when(builder.accept(Mockito.anyString())).thenReturn(builder);
+        when(builder.header(Mockito.anyString(), Mockito.anyString())).thenReturn(builder);
+        when(servletRequestHelper.extractOrGenerateRequestId()).thenReturn(UUID.randomUUID().toString());
+    }
+
+    private AAIRestInterface createTestSubject() {
+        return new AAIRestInterface(Optional.of(client), httpsAuthClient, servletRequestHelper, systemPropertyHelper);
+    }
+
+    @Test
+    public void testEncodeURL() throws Exception {
+        String nodeKey = "some unusual uri";
+        Assert.assertEquals(testSubject.encodeURL(nodeKey), "some%20unusual%20uri");
+    }
+
+    @Test
+    public void testSetRestSrvrBaseURLWithNullValue() throws Exception {
+        testSubject.SetRestSrvrBaseURL(null);
+    }
+
+    @Test
+    public void testSetRestSrvrBaseURL() throws Exception {
+        String baseUrl = "anything";
+        testSubject.SetRestSrvrBaseURL(baseUrl);
+        Assert.assertEquals(testSubject.getRestSrvrBaseURL(), baseUrl);
+    }
+
+    @Test
+    public void testRestJsonPutWithResponse200() throws Exception {
+        // given
+        String methodName = "RestPut";
+        String payload = "{\"id\": 1}";
+        Entity<String> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
+
+        // when
+        when(builder.put(Mockito.any(Entity.class))).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(OK);
+        Response finalResponse = testSubject.RestPut("", PATH, payload, false);
+
+        // then
+        verify(builder).put(entity);
+        Assert.assertEquals(response, finalResponse);
+    }
+
+    @Test
+    public void testFailedRestJsonPut() throws Exception {
+        // given
+        String methodName = "RestPut";
+        String payload = "{\"id\": 1}";
+        Entity<String> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
+
+        // when
+        when(builder.put(Mockito.any(Entity.class))).thenThrow(new RuntimeException());
+        Response finalResponse = testSubject.RestPut("", PATH, payload, false);
+
+        // then
+        verify(builder).put(entity);
+        Assert.assertEquals(finalResponse, null);
+    }
+
+    @Test
+    public void testRestJsonPutWithResponse400() throws Exception {
+        // given
+        String methodName = "RestPut";
+        String payload = "{\"id\": 1}";
+        Entity<String> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
+
+        // when
+        when(builder.put(Mockito.any(Entity.class))).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(BAD_REQUEST);
+        when(response.getStatus()).thenReturn(BAD_REQUEST.getStatusCode());
+        Response finalResponse = testSubject.RestPut("", PATH, payload, false);
+
+        // then
+        verify(builder).put(entity);
+        Assert.assertEquals(response, finalResponse);
+    }
+
+    @Test
+    public void testRestPostWithResponse200() throws Exception {
+        // given
+        String methodName = "RestPost";
+        String payload = "{\"id\": 1}";
+        Entity<String> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
+
+        // when
+        when(builder.post(Mockito.any(Entity.class))).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(OK);
+        Response finalResponse = testSubject.RestPost("", PATH, payload, false);
+
+        // then
+        verify(builder).post(entity);
+        Assert.assertEquals(response, finalResponse);
+    }
+
+    @Test
+    public void testRestPostWithResponse400() throws Exception {
+        // given
+        String methodName = "RestPost";
+        String payload = "{\"id\": 1}";
+        Entity<String> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
+
+        // when
+        when(builder.post(Mockito.any(Entity.class))).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(BAD_REQUEST);
+        when(response.getStatus()).thenReturn(BAD_REQUEST.getStatusCode());
+        Response finalResponse = testSubject.RestPost("", PATH, payload, false);
+
+        // then
+        verify(builder).post(entity);
+        Assert.assertEquals(response, finalResponse);
+    }
+
+    @Test
+    public void testFailedRestPost() throws Exception {
+        // given
+        String methodName = "RestPost";
+        String payload = "{\"id\": 1}";
+        Entity<String> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
+
+        // when
+        when(builder.post(Mockito.any(Entity.class))).thenThrow(new RuntimeException());
+        Response finalResponse = testSubject.RestPost("", PATH, payload, false);
+
+        // then
+        verify(builder).post(entity);
+        Assert.assertEquals(finalResponse, null);
+    }
+
+    @Test
+    public void testRestDeleteWithResponse400() throws Exception {
+        // given
+        String methodName = "Delete";
+
+        // when
+        when(builder.delete()).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(BAD_REQUEST);
+        String reason = "Any reason";
+        when(response.readEntity(String.class)).thenReturn(reason);
+        when(response.getStatus()).thenReturn(BAD_REQUEST.getStatusCode());
+        boolean finalResponse = testSubject.Delete("", "", PATH);
+
+        // then
+        verify(builder).delete();
+        Assert.assertFalse(finalResponse);
+    }
+
+    @Test
+    public void testRestDeleteWithResponse404() throws Exception {
+        // given
+        String methodName = "Delete";
+
+        // when
+        when(builder.delete()).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(NOT_FOUND);
+        String reason = "Any reason";
+        when(response.readEntity(String.class)).thenReturn(reason);
+        when(response.getStatus()).thenReturn(NOT_FOUND.getStatusCode());
+        boolean finalResponse = testSubject.Delete("", "", PATH);
+
+        // then
+        verify(builder).delete();
+        Assert.assertFalse(finalResponse);
+    }
+
+    @Test
+    public void testFailedRestDelete() throws Exception {
+        // given
+        String methodName = "Delete";
+
+        // when
+        when(builder.delete()).thenThrow(new RuntimeException());
+        boolean finalResponse = testSubject.Delete("", "", PATH);
+
+        // then
+        verify(builder).delete();
+        Assert.assertFalse(finalResponse);
+    }
+
+    @Test
+    public void testRestJsonGetWithResponse200() throws Exception {
+        // given
+        String methodName = "RestGet";
+
+        // when
+        when(builder.get()).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(OK);
+        Response finalResponse = testSubject.RestGet("", "", PATH, false).getResponse();
+
+        // then
+        Assert.assertEquals(response, finalResponse);
+    }
+
+    @Test
+    public void testRestJsonGetWithResponse400() throws Exception {
+        // given
+        String methodName = "RestGet";
+
+        // when
+        when(builder.get()).thenReturn(response);
+        when(response.getStatusInfo()).thenReturn(BAD_REQUEST);
+        when(response.getStatus()).thenReturn(BAD_REQUEST.getStatusCode());
+        Response finalResponse = testSubject.RestGet("", "", PATH, false).getResponse();
+
+        // then
+        Assert.assertEquals(response, finalResponse);
+    }
+
+    @Test
+    public void testFailedRestGet() throws Exception {
+        // given
+        String methodName = "RestGet";
+
+        // when
+        when(builder.get()).thenThrow(new RuntimeException());
+        Response finalResponse = testSubject.RestGet("", "", PATH, false).getResponse();
+
+        // then
+        Assert.assertEquals(finalResponse, null);
+    }
+
+    private void mockSystemProperties() throws UnsupportedEncodingException, InvalidPropertyException {
+        when(systemPropertyHelper.getAAIServerUrl()).thenReturn(Optional.of(HTTP_LOCALHOST));
+        when(systemPropertyHelper.getAAIUseClientCert()).thenReturn(Optional.of("cert"));
+        when(systemPropertyHelper.getAAIVIDPasswd()).thenReturn(Optional.of("passwd"));
+        when(systemPropertyHelper.getAAIVIDUsername()).thenReturn(Optional.of("user"));
+        when(systemPropertyHelper.getEncodedCredentials()).thenReturn("someCredentials");
+        when(systemPropertyHelper.getFullServicePath(Mockito.anyString())).thenReturn("http://localhost/path");
+        when(systemPropertyHelper.getServiceBasePath(Mockito.anyString())).thenReturn("http://localhost/path");
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/bl/AaiServiceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/bl/AaiServiceTest.java
new file mode 100644
index 0000000..ce5d632
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/bl/AaiServiceTest.java
@@ -0,0 +1,176 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.bl;
+
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.model.*;
+import org.onap.osam.aai.model.AaiGetPnfs.Pnf;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.roles.Role;
+import org.onap.osam.roles.RoleValidator;
+import org.onap.osam.services.AaiServiceImpl;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import static org.hamcrest.Matchers.arrayWithSize;
+import static org.hamcrest.Matchers.equalTo;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class AaiServiceTest {
+
+    @InjectMocks
+    private AaiServiceImpl aaiService;
+
+    @Mock
+    private AaiClientInterface aaiClientInterface;
+
+
+
+    @BeforeMethod
+    public void initMocks(){
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @Test
+    public void testGetSpecificPnf(){
+        Pnf pnf = new Pnf();
+        pnf.setPnfId("11111");
+        AaiResponse<Pnf> aaiResponse = new AaiResponse<>(pnf, "aaaa", 200);
+        Mockito.doReturn(aaiResponse).when(aaiClientInterface).getSpecificPnf(Mockito.anyString());
+        AaiResponse<Pnf> specificPnf = aaiService.getSpecificPnf("1345667");
+        assertNotNull(specificPnf);
+        pnf = specificPnf.getT();
+        assertNotNull(pnf);
+        assertEquals("11111",pnf.getPnfId());
+        assertEquals("aaaa",specificPnf.getErrorMessage());
+        assertEquals(200,specificPnf.getHttpCode());
+    }
+
+    @Test
+    public void testPnfByRegion(){
+        AaiGetPnfResponse aaiGetPnfResponse = new AaiGetPnfResponse();
+        AaiResponse<AaiGetPnfResponse> aaiResponse = new AaiResponse<>(aaiGetPnfResponse, "", 200);
+        Mockito.doReturn(aaiResponse).when(aaiClientInterface).getPNFData(Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.anyString());
+        AaiResponse<AaiGetPnfResponse> aaiGetPnfResponseWrapper = aaiService.getPNFData("1345667", "1345667", "1345667", "1345667", "1345667", "1345667", "1345667");
+        assertNotNull(aaiGetPnfResponseWrapper);
+        aaiGetPnfResponse = aaiGetPnfResponseWrapper.getT();
+        assertNotNull(aaiGetPnfResponse);
+    }
+
+    @Test
+    public void testGetAssociatedPnfs(){
+        ServiceRelationships serviceRelationships = createServiceRelationships();
+        AaiResponse<ServiceRelationships> aaiResponse = new AaiResponse<>(serviceRelationships, null, 200);
+        Mockito.doReturn(aaiResponse).when(aaiClientInterface).getServiceInstance(Mockito.anyString(), Mockito.anyString(), Mockito.anyString());
+
+        LogicalLinkResponse logicalLinkResponse = createLogicalLinkResponse();
+        AaiResponse<LogicalLinkResponse> aaiResponse1 = new AaiResponse<>(logicalLinkResponse, null, 200);
+        Mockito.doReturn(aaiResponse1).when(aaiClientInterface).getLogicalLink("SANITY6758cce9%3ALAG1992%7CSANITY6785cce9%3ALAG1961");
+
+        List<String> pnfList = aaiService.getServiceInstanceAssociatedPnfs("123", "456", "789");
+        assertNotNull(pnfList);
+        assertEquals(1, pnfList.size());
+        assertEquals("SANITY6785cce9", pnfList.get(0));
+    }
+
+    private ServiceRelationships createServiceRelationships() {
+        ServiceRelationships serviceRelationships = new ServiceRelationships();
+        serviceRelationships.setServiceInstanceName("test service");
+
+        RelationshipData logicalLinksRelationshipData = new RelationshipData();
+        logicalLinksRelationshipData.setRelationshipKey("logical-link.link-name");
+        logicalLinksRelationshipData.setRelationshipValue("SANITY6758cce9:LAG1992|SANITY6785cce9:LAG1961");
+
+        Relationship logicalLinksRelationship = new Relationship();
+        logicalLinksRelationship.setRelatedTo("logical-link");
+        logicalLinksRelationship.setRelationDataList(Arrays.asList(logicalLinksRelationshipData));
+
+        RelationshipList logicalLinksRelationshipsList = new RelationshipList();
+        logicalLinksRelationshipsList.setRelationship(Arrays.asList(logicalLinksRelationship));
+
+        serviceRelationships.setRelationshipList(logicalLinksRelationshipsList);
+        return serviceRelationships;
+    }
+
+    private LogicalLinkResponse createLogicalLinkResponse() {
+        LogicalLinkResponse logicalLinkResponse = new LogicalLinkResponse();
+        logicalLinkResponse.setLinkName("SANITY6758cce9:LAG1992|SANITY6785cce9:LAG1961");
+
+        RelationshipData lagInterfaceRelationshipData = new RelationshipData();
+        lagInterfaceRelationshipData.setRelationshipKey("pnf.pnf-name");
+        lagInterfaceRelationshipData.setRelationshipValue("SANITY6785cce9");
+
+        Relationship lagInterfaceRelationship = new Relationship();
+        lagInterfaceRelationship.setRelatedTo("lag-interface");
+        lagInterfaceRelationship.setRelationDataList(Arrays.asList(lagInterfaceRelationshipData));
+
+        RelationshipList lagInterfaceRelationshipsList = new RelationshipList();
+        lagInterfaceRelationshipsList.setRelationship(Arrays.asList(lagInterfaceRelationship));
+
+        logicalLinkResponse.setRelationshipList(lagInterfaceRelationshipsList);
+
+        return logicalLinkResponse;
+    }
+
+    @DataProvider
+    public static Object[][] getTenantsData() {
+        return new Object[][] {
+                {"customer1", "serviceType1", "tenant1", "customer1", "serviceType1", "tenant1", "id-1", true},
+                {"customer1", "serviceType1", "TeNant1", "customer1", "serviceType1", "tenant1", "id-1", true},
+                {"customer1", "serviceType1", "TENANT1", "customer1", "serviceType1", "tenant1", "id-1", true},
+                {"customer1", "serviceType1", "tenant2", "customer1", "serviceType1", "tenant1", "tenant2", false},
+                {"customer1", "serviceType1", null, "customer1", "serviceType1", "tenant1", "tenant2", true},
+                {"customer2", "serviceType1", "tenant1", "customer1", "serviceType1", "tenant1", "id-1", false},
+                {"customer1", "serviceType2", "tenant1", "customer1", "serviceType1", "tenant1", "id-1", false},
+                {"customer2", "serviceType1", null, "customer1", "serviceType1", "tenant1", "id-1", false},
+                {"customer1", "serviceType2", null, "customer1", "serviceType1", "tenant1", "id-1", false},
+        };
+    }
+
+    @Test(dataProvider = "getTenantsData")
+    public void testGetTenants(String userGlobalCustomerId, String userServiceType, String userTenantName, String serviceGlobalCustomerId,
+                               String serviceServiceType, String serviceTenantName, String serviceTenantId, boolean expectedIsPermitted) {
+        GetTenantsResponse[] getTenantsResponses = new GetTenantsResponse[] {new GetTenantsResponse(null, null, serviceTenantName, serviceTenantId, expectedIsPermitted)};
+        AaiResponse<GetTenantsResponse[]> aaiResponse = new AaiResponse<>(getTenantsResponses, null, 200);
+        Mockito.doReturn(aaiResponse).when(aaiClientInterface).getTenants(serviceGlobalCustomerId, serviceServiceType);
+        Role role = new Role(null, userGlobalCustomerId, userServiceType, userTenantName);
+        RoleValidator roleValidator = new RoleValidator(Collections.singletonList(role));
+        AaiResponse<GetTenantsResponse[]> actualTenants = aaiService.getTenants(serviceGlobalCustomerId, serviceServiceType, roleValidator);
+
+        assertThat(actualTenants.getT(), arrayWithSize(1));
+        assertThat(actualTenants.getT()[0].tenantName, equalTo(serviceTenantName));
+        //assertThat(actualTenants.getT()[0].isPermitted, equalTo(expectedIsPermitted));
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/client/HttpBasicClientTest.java b/onap-enabler-be/src/test/java/org/onap/osam/client/HttpBasicClientTest.java
new file mode 100644
index 0000000..3b29cf3
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/client/HttpBasicClientTest.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+import org.junit.Test;
+
+public class HttpBasicClientTest {
+
+    private HttpBasicClient createTestSubject() {
+        return new HttpBasicClient();
+    }
+
+    @Test
+    public void testGetClient() throws Exception {
+        // default test
+        HttpBasicClient.getClient();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/client/HttpsBasicClientTest.java b/onap-enabler-be/src/test/java/org/onap/osam/client/HttpsBasicClientTest.java
new file mode 100644
index 0000000..048dd8b
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/client/HttpsBasicClientTest.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+import org.junit.Test;
+
+public class HttpsBasicClientTest {
+
+    private HttpsBasicClient createTestSubject() {
+        return new HttpsBasicClient();
+    }
+
+    @Test
+    public void testGetClient() throws Exception {
+
+        // default test
+        HttpsBasicClient.getClient();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientForHttpServerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientForHttpServerTest.java
new file mode 100644
index 0000000..28e899e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientForHttpServerTest.java
@@ -0,0 +1,270 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableMap;
+import com.xebialabs.restito.semantics.Condition;
+import com.xebialabs.restito.server.StubServer;
+import io.joshworks.restclient.http.HttpResponse;
+import io.joshworks.restclient.http.JsonNode;
+import org.glassfish.grizzly.http.util.HttpStatus;
+import com.xebialabs.restito.semantics.Action;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.AfterMethod;
+import org.glassfish.grizzly.http.Method;
+import org.testng.annotations.Test;
+
+import java.util.Collections;
+import java.util.Map;
+
+import static com.xebialabs.restito.builder.verify.VerifyHttp.verifyHttp;
+import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp;
+import static com.xebialabs.restito.semantics.Action.stringContent;
+import static com.xebialabs.restito.semantics.Action.contentType;
+import static com.xebialabs.restito.semantics.Action.status;
+import static com.xebialabs.restito.semantics.Action.ok;
+import static org.testng.Assert.assertEquals;
+
+public class SyncRestClientForHttpServerTest {
+
+    private static final SyncRestClientModel.TestModel testObject = new SyncRestClientModel.TestModel(1, "test");
+    private static final String NOT_EXISTING_OBJECT = "NOT EXISTING OBJECT";
+
+    private StubServer stubServer;
+    private ObjectMapper objectMapper = new ObjectMapper();
+    private SyncRestClient syncRestClient;
+
+    @BeforeMethod
+    public void setUp() {
+        stubServer = new StubServer();
+        stubServer.run();
+        syncRestClient = new SyncRestClient();
+    }
+
+    @AfterMethod
+    public void tearDown() {
+        stubServer.stop();
+        syncRestClient.destroy();
+    }
+
+    @Test
+    public void testJsonResponseFromGet() throws JsonProcessingException {
+        // given
+        stubGetCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient
+            .get(url, Collections.emptyMap(), Collections.emptyMap());
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.GET), Condition.url(url));
+        assertEquals(jsonNodeHttpResponse.getStatus(), 200);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("key"), 1);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("value"), "test");
+    }
+
+    @Test
+    public void testObjectResponseFromGet() throws JsonProcessingException {
+        // given
+        stubGetCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<SyncRestClientModel.TestModel> testModelHttpResponse = syncRestClient
+            .get(url, Collections.emptyMap(), Collections.emptyMap(), SyncRestClientModel.TestModel.class);
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.GET), Condition.url(url));
+        assertEquals(testModelHttpResponse.getStatus(), 200);
+        assertEquals(testModelHttpResponse.getBody().getKey(), 1);
+        assertEquals(testModelHttpResponse.getBody().getValue(), "test");
+    }
+
+    @Test
+    public void testJsonResponseFromPost() throws JsonProcessingException {
+        // given
+        stubPostCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient.post(url, Collections.emptyMap(), testObject);
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.POST), Condition.url(url));
+        assertEquals(jsonNodeHttpResponse.getStatus(), 200);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("key"), 1);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("value"), "test");
+    }
+
+    @Test
+    public void test404JsonResponseFromPost() throws JsonProcessingException {
+        // given
+        stubPostCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient
+            .post(url, Collections.emptyMap(), NOT_EXISTING_OBJECT);
+        // then
+        assertEquals(jsonNodeHttpResponse.getStatus(), 404);
+        assertEquals(jsonNodeHttpResponse.getStatusText(), "Not Found");
+    }
+
+    @Test
+    public void testHeadersWerePassedToPost() throws JsonProcessingException {
+        // given
+        stubPostCall();
+        Map headers = ImmutableMap.<String, String>builder().put("Authorization", "Basic anyHash").build();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient.post(url, headers, testObject);
+        // then
+        verifyHttp(stubServer).once(Condition.withHeader("Authorization"));
+        assertEquals(jsonNodeHttpResponse.getStatus(), 200);
+    }
+
+    @Test(expectedExceptions = {Exception.class})
+    public void testFailedJsonResponseFromPost() throws JsonProcessingException {
+        // given
+        stubPostCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        stubServer.stop();
+        syncRestClient.post(url, Collections.emptyMap(), testObject);
+    }
+
+    @Test
+    public void testObjectResponseFromPost() throws JsonProcessingException {
+        // given
+        stubPostCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<SyncRestClientModel.TestModel> objectHttpResponse = syncRestClient
+            .post(url, Collections.emptyMap(), testObject, SyncRestClientModel.TestModel.class);
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.POST), Condition.url(url));
+        assertEquals(objectHttpResponse.getStatus(), 200);
+        assertEquals(objectHttpResponse.getBody().getKey(), 1);
+        assertEquals(objectHttpResponse.getBody().getValue(), "test");
+    }
+
+    @Test
+    public void testJsonResponseFromPut() throws JsonProcessingException {
+        // given
+        stubPutCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient.put(url, Collections.emptyMap(), testObject);
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.PUT), Condition.url(url));
+        assertEquals(jsonNodeHttpResponse.getStatus(), 201);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("key"), 1);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("value"), "test");
+    }
+
+    @Test
+    public void testObjectResponseFromPut() throws JsonProcessingException {
+        // given
+        stubPutCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<SyncRestClientModel.TestModel> modelHttpResponse = syncRestClient
+            .put(url, Collections.emptyMap(), testObject, SyncRestClientModel.TestModel.class);
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.PUT), Condition.url(url));
+        assertEquals(modelHttpResponse.getStatus(), 201);
+        assertEquals(modelHttpResponse.getBody().getKey(), 1);
+        assertEquals(modelHttpResponse.getBody().getValue(), "test");
+    }
+
+    @Test
+    public void testJsonResponseFromDelete() throws JsonProcessingException {
+        // given
+        stubDeleteCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient.delete(url, Collections.emptyMap());
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.DELETE), Condition.url(url));
+        assertEquals(jsonNodeHttpResponse.getStatus(), 200);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("key"), 1);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("value"), "test");
+    }
+
+    @Test
+    public void testObjectResponseFromDelete() throws JsonProcessingException {
+        // given
+        stubDeleteCall();
+        String url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<SyncRestClientModel.TestModel> modelHttpResponse = syncRestClient
+            .delete(url, Collections.emptyMap(),  SyncRestClientModel.TestModel.class);
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.DELETE), Condition.url(url));
+        assertEquals(modelHttpResponse.getStatus(), 200);
+        assertEquals(modelHttpResponse.getBody().getKey(), 1);
+        assertEquals(modelHttpResponse.getBody().getValue(), "test");
+    }
+
+    @Test
+    public void testRedirectToHttp() throws JsonProcessingException {
+        // given
+        stubGetCall();
+        String secured_url = "https://0.0.0.0:" + stubServer.getPort() + "/test";
+        String available_url = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient
+            .get(secured_url, Collections.emptyMap(), Collections.emptyMap());
+        // then
+        verifyHttp(stubServer).once(Condition.method(Method.GET), Condition.url(available_url),
+            Condition.not(Condition.url(secured_url)));
+        assertEquals(jsonNodeHttpResponse.getStatus(), 200);
+    }
+
+    private void stubGetCall() throws JsonProcessingException {
+        whenHttp(stubServer)
+            .match(Condition.get("/test"))
+            .then(ok(), jsonContent(), contentType("application/json"));
+    }
+
+    private void stubDeleteCall() throws JsonProcessingException {
+        whenHttp(stubServer)
+            .match(Condition.delete("/test"))
+            .then(ok(), jsonContent(), contentType("application/json"));
+    }
+
+    private void stubPostCall() throws JsonProcessingException {
+        whenHttp(stubServer)
+            .match(Condition.post("/test"),
+                Condition.withPostBodyContaining(objectMapper.writeValueAsString(testObject)))
+            .then(ok(), jsonContent(), contentType("application/json"));
+    }
+
+    private void stubPutCall() throws JsonProcessingException {
+        whenHttp(stubServer)
+            .match(Condition.put("/test"),
+                Condition.withPostBodyContaining(objectMapper.writeValueAsString(testObject)))
+            .then(status(HttpStatus.CREATED_201), jsonContent(), contentType("application/json"));
+    }
+
+    private Action jsonContent() throws JsonProcessingException {
+        return stringContent(objectMapper.writeValueAsString(testObject));
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientForHttpsServerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientForHttpsServerTest.java
new file mode 100644
index 0000000..9450f27
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientForHttpsServerTest.java
@@ -0,0 +1,140 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+import io.joshworks.restclient.http.HttpResponse;
+import io.joshworks.restclient.http.JsonNode;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.conn.ssl.SSLContextBuilder;
+import com.xebialabs.restito.semantics.Condition;
+import com.xebialabs.restito.server.StubServer;
+import com.xebialabs.restito.semantics.Action;
+import org.apache.http.config.RegistryBuilder;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.AfterMethod;
+import org.glassfish.grizzly.http.Method;
+import org.apache.http.config.Registry;
+import org.testng.annotations.Test;
+
+import java.security.GeneralSecurityException;
+import javax.net.ssl.SSLContext;
+import java.util.Collections;
+
+import static com.xebialabs.restito.builder.verify.VerifyHttp.verifyHttp;
+import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp;
+import static com.xebialabs.restito.semantics.Action.stringContent;
+import static com.xebialabs.restito.semantics.Action.contentType;
+import static org.apache.http.client.config.RequestConfig.custom;
+import static com.xebialabs.restito.semantics.Action.ok;
+import static org.testng.Assert.assertEquals;
+
+public class SyncRestClientForHttpsServerTest {
+
+    private static final SyncRestClientModel.TestModel testObject = new SyncRestClientModel.TestModel(1, "test");
+    private static final String[] SUPPORTED_PROTOCOLS = {"TLSv1", "TLSv1.2"};
+    private StubServer stubServer;
+    private ObjectMapper objectMapper = new ObjectMapper();
+
+    private SyncRestClient syncRestClient;
+
+    @BeforeMethod
+    public void setUp() throws GeneralSecurityException {
+        stubServer = new StubServer();
+        stubServer.secured().run();
+        syncRestClient = new SyncRestClient(createNaiveHttpClient());
+    }
+
+    @AfterMethod
+    public void tearDown() {
+        stubServer.stop();
+    }
+
+    @Test
+    public void testJsonResponseFromGet() throws JsonProcessingException {
+        // given
+        stubGetCall();
+        String securedUrl = "https://0.0.0.0:" + stubServer.getPort() + "/test";
+        String notSecuredUrl = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<JsonNode> jsonNodeHttpResponse = syncRestClient
+            .get(securedUrl, Collections.emptyMap(), Collections.emptyMap());
+        // then
+        verifyHttp(stubServer)
+            .once(Condition.method(Method.GET), Condition.url(securedUrl), Condition.not(Condition.url(notSecuredUrl)));
+        assertEquals(jsonNodeHttpResponse.getStatus(), 200);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("key"), 1);
+        assertEquals(jsonNodeHttpResponse.getBody().getObject().get("value"), "test");
+    }
+
+    @Test
+    public void testObjectResponseFromGet() throws JsonProcessingException {
+        // given
+        stubServer.run();
+        stubGetCall();
+        String securedUrl = "https://0.0.0.0:" + stubServer.getPort() + "/test";
+        String notSecuredUrl = "http://0.0.0.0:" + stubServer.getPort() + "/test";
+        // when
+        HttpResponse<SyncRestClientModel.TestModel> testModelHttpResponse = syncRestClient
+            .get(securedUrl, Collections.emptyMap(), Collections.emptyMap(), SyncRestClientModel.TestModel.class);
+        // then
+        verifyHttp(stubServer)
+            .once(Condition.method(Method.GET), Condition.url(securedUrl), Condition.not(Condition.url(notSecuredUrl)));
+        assertEquals(testModelHttpResponse.getStatus(), 200);
+        assertEquals(testModelHttpResponse.getBody().getKey(), 1);
+        assertEquals(testModelHttpResponse.getBody().getValue(), "test");
+    }
+
+    private Action jsonContent() throws JsonProcessingException {
+        return stringContent(objectMapper.writeValueAsString(testObject));
+    }
+
+    private void stubGetCall() throws JsonProcessingException {
+        whenHttp(stubServer)
+            .match(Condition.get("/test"))
+            .then(ok(), jsonContent(), contentType("application/json"));
+    }
+
+    private CloseableHttpClient createNaiveHttpClient() throws GeneralSecurityException {
+        final SSLContext context = new SSLContextBuilder().loadTrustMaterial(null, new TrustSelfSignedStrategy())
+            .build();
+
+        final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(context, SUPPORTED_PROTOCOLS,
+            null, SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+        Registry<ConnectionSocketFactory> registry = RegistryBuilder.<ConnectionSocketFactory>create()
+            .register("https", socketFactory)
+            .build();
+
+        return HttpClientBuilder.create()
+            .setDefaultRequestConfig(custom().setConnectionRequestTimeout(10000).build())
+            .setConnectionManager(new PoolingHttpClientConnectionManager(registry))
+            .setSSLSocketFactory(socketFactory).build();
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientModel.java b/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientModel.java
new file mode 100644
index 0000000..94f5ac2
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/client/SyncRestClientModel.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.client;
+
+class SyncRestClientModel {
+
+    static class TestModel{
+
+        public TestModel() {
+            // needed by the object mappers
+        }
+
+        public TestModel(long key, String value) {
+            this.key = key;
+            this.value = value;
+        }
+
+        private long key;
+        private String value;
+
+        public void setKey(long key) {
+            this.key = key;
+        }
+
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        public long getKey() {
+            return key;
+        }
+
+        public String getValue() {
+            return value;
+        }
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/config/DataSourceConfig.java b/onap-enabler-be/src/test/java/org/onap/osam/config/DataSourceConfig.java
new file mode 100644
index 0000000..46f2b0e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/config/DataSourceConfig.java
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.config;
+
+
+import org.hibernate.SessionFactory;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.DataAccessServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jdbc.datasource.DriverManagerDataSource;
+import org.springframework.orm.hibernate4.HibernateTransactionManager;
+import org.springframework.orm.hibernate4.LocalSessionFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.sql.DataSource;
+import java.util.Properties;
+
+@Configuration
+@EnableTransactionManagement
+public class DataSourceConfig {
+
+    @Bean
+    @Autowired
+    public LocalSessionFactoryBean sessionFactory(DataSource dataSource) {
+        LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
+        sessionFactory.setDataSource(dataSource);
+        //I used this class org.openecomp.portalsdk.core.conf.HibernateConfiguration to learn how to config the session factory
+        // and use the following url for actual h2 properties
+        //https://github.com/levi-putna/Hibernate-H2-Example/blob/master/hibernate-h2-example/src/hibernate.cfg.xml
+        Properties properties = getH2Properties();
+
+        properties.put("hibernate.default_schema", "PUBLIC");
+        properties.put("connection.pool_size", 10);
+        properties.put("cache.provider_class", "org.hibernate.cache.internal.NoCacheProvider");
+        properties.put("hibernate.show_sql", false);
+        properties.put("hbm2ddl.auto", "create");
+        properties.put("hibernate.hbm2ddl.auto", "create");
+
+        sessionFactory.setHibernateProperties(properties);
+        sessionFactory.setPackagesToScan("org.onap");
+        return sessionFactory;
+    }
+
+    @Bean
+    public DataSource getDataSource() {
+        DriverManagerDataSource dataSource = new DriverManagerDataSource();
+        dataSource.setDriverClassName("org.h2.Driver");
+        dataSource.setUrl("jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1");
+        dataSource.setUsername("sa");
+        dataSource.setPassword("");
+        return dataSource;
+    }
+
+    public Properties getH2Properties() {
+        Properties properties = new Properties();
+        properties.put("dialect", "org.hibernate.dialect.H2Dialect");
+        return properties;
+    }
+
+    public Properties getSqliteProperties() {
+        Properties properties = new Properties();
+        properties.put("connection.driver_class", "org.sqlite.JDBC");
+        properties.put("connection.url", "jdbc:sqlite:memory:myDb");
+        properties.put("connection.username", "sa");
+        properties.put("connection.password", "sa");
+        properties.put("dialect", "com.enigmabridge.hibernate.dialect.SQLiteDialect");
+        return properties;
+    }
+
+    @Bean
+    public DataAccessService dataAccessService() {
+        return new DataAccessServiceImpl();
+    }
+
+    @Bean
+    @Autowired
+    public PlatformTransactionManager transactionManager(SessionFactory sessionFactory) {
+        return new HibernateTransactionManager(sessionFactory);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/config/JobAdapterConfig.java b/onap-enabler-be/src/test/java/org/onap/osam/config/JobAdapterConfig.java
new file mode 100644
index 0000000..754b114
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/config/JobAdapterConfig.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.config;
+
+
+import org.hibernate.SessionFactory;
+import org.onap.osam.job.JobAdapter;
+import org.onap.osam.job.JobsBrokerService;
+import org.onap.osam.job.impl.JobAdapterImpl;
+import org.onap.osam.job.impl.JobsBrokerServiceInDatabaseImpl;
+import org.onap.osam.properties.VidProperties;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@Configuration
+@EnableTransactionManagement
+public class JobAdapterConfig {
+
+    @Bean
+    public JobAdapter jobAdapter() {
+        return new JobAdapterImpl();
+    }
+
+    @Bean
+    public JobsBrokerService jobsBrokerService(DataAccessService dataAccessService, SessionFactory sessionFactory) {
+        int maxOpenedInstantiationRequestsToMso = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_MAX_OPENED_INSTANTIATION_REQUESTS));
+        int pollingIntervalSeconds = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_ASYNC_POLLING_INTERVAL_SECONDS));
+
+        return new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, maxOpenedInstantiationRequestsToMso, pollingIntervalSeconds);
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/config/JobCommandsConfigWithMockedMso.java b/onap-enabler-be/src/test/java/org/onap/osam/config/JobCommandsConfigWithMockedMso.java
new file mode 100644
index 0000000..8f88b1e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/config/JobCommandsConfigWithMockedMso.java
@@ -0,0 +1,113 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.config;
+
+import org.hibernate.SessionFactory;
+import org.mockito.Mockito;
+import org.onap.osam.services.IAsyncInstantiationBusinessLogic;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.util.HttpsAuthClient;
+import org.onap.osam.aai.util.SSLContextProvider;
+import org.onap.osam.aai.util.SystemPropertyHelper;
+import org.onap.osam.job.JobAdapter;
+import org.onap.osam.job.JobsBrokerService;
+import org.onap.osam.job.command.InProgressStatusCommand;
+import org.onap.osam.job.command.JobCommandFactory;
+import org.onap.osam.job.command.ServiceInstantiationCommand;
+import org.onap.osam.job.impl.JobAdapterImpl;
+import org.onap.osam.job.impl.JobWorker;
+import org.onap.osam.job.impl.JobsBrokerServiceInDatabaseImpl;
+import org.onap.osam.mso.RestMsoImplementation;
+import org.onap.osam.services.AsyncInstantiationBusinessLogicImpl;
+import org.onap.osam.services.IAuditService;
+import org.onap.osam.services.AuditServiceImpl;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
+
+@Configuration
+public class JobCommandsConfigWithMockedMso {
+
+    @Bean
+    public RestMsoImplementation restMso() {
+        return Mockito.mock(RestMsoImplementation.class);
+    }
+
+    @Bean
+    public JobsBrokerService jobsBrokerService(DataAccessService dataAccessService, SessionFactory sessionFactory) {
+        return new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, 200, 0);
+    }
+
+    @Bean
+    public HttpsAuthClient httpsAuthClientFactory(){
+        return new HttpsAuthClient("some random path", new SystemPropertyHelper(), new SSLContextProvider());
+    }
+
+    @Bean
+    public JobAdapter jobAdapter() {
+        return new JobAdapterImpl();
+    }
+
+    @Bean
+    public JobCommandFactory jobCommandFactory(ApplicationContext applicationContext) {
+        return new JobCommandFactory(applicationContext);
+    }
+
+    @Bean
+    public JobWorker jobWorker(JobsBrokerService jobsBrokerService, JobCommandFactory jobCommandFactory) {
+        JobWorker jobWorker = new JobWorker();
+        jobWorker.setJobsBrokerService(jobsBrokerService);
+        jobWorker.setJobCommandFactory(jobCommandFactory);
+        return jobWorker;
+    }
+
+    @Bean
+    public IAsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic(DataAccessService dataAccessService,
+                                                                            JobAdapter jobAdapter,
+                                                                            JobsBrokerService jobsBrokerService,
+                                                                            SessionFactory sessionFactory,
+                                                                            AaiClientInterface aaiClient) {
+        return new AsyncInstantiationBusinessLogicImpl(dataAccessService, jobAdapter, jobsBrokerService, sessionFactory, aaiClient);
+    }
+
+    @Bean
+    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+    public ServiceInstantiationCommand serviceInstantiationCommand() {
+        return new ServiceInstantiationCommand();
+    }
+
+    @Bean
+    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+    public InProgressStatusCommand inProgressStatusCommand() {
+        return new InProgressStatusCommand();
+    }
+
+    @Bean
+    public IAuditService auditService() {
+        return new AuditServiceImpl();
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/config/MockedAaiClientAndFeatureManagerConfig.java b/onap-enabler-be/src/test/java/org/onap/osam/config/MockedAaiClientAndFeatureManagerConfig.java
new file mode 100644
index 0000000..c1a0f68
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/config/MockedAaiClientAndFeatureManagerConfig.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.config;
+
+import org.mockito.Mockito;
+import org.onap.osam.aai.AaiClientInterface;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.togglz.core.manager.FeatureManager;
+
+@Configuration
+public class MockedAaiClientAndFeatureManagerConfig {
+
+    @Bean
+    public FeatureManager featureManager() {
+        return Mockito.mock(FeatureManager.class);
+    }
+
+    @Bean
+    public AaiClientInterface aaiClient() {
+        return Mockito.mock(AaiClientInterface.class);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controller/ClientCredentialsFilterTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controller/ClientCredentialsFilterTest.java
new file mode 100644
index 0000000..6ef2fcc
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controller/ClientCredentialsFilterTest.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controller;
+
+
+import org.junit.Assert;
+import org.mockito.Mockito;
+import org.onap.osam.filters.ClientCredentialsFilter;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+import static org.mockito.Matchers.any;
+
+
+@Test
+public class ClientCredentialsFilterTest {
+
+    @DataProvider
+    public static Object[][] authorizedData() {
+        return new Object[][] {
+                {"Basic 123==", null},
+                {null, null},
+                {null, ""},
+                {"Basic 123==", ""},
+                {"Basic 123==", "Basic 123=="}
+        };
+    }
+
+    @DataProvider
+    public static Object[][] notAuthorizedData() {
+        return new Object[][] {
+                {null, "Basic 123=="},
+                {"", "Basic 123=="},
+                {"not null but not as expected", "Basic 123=="},
+                {"basic 123==", "Basic 123=="}
+        };
+    }
+
+    @DataProvider
+    public static Object[][] clientVerified() {
+        return new Object[][] {
+                {true},
+                {false}
+        };
+    }
+
+    @Test(dataProvider = "authorizedData")
+    public void givenAuthorizationHeader_Authorized(String actualAuth, String expectedAuth){
+        ClientCredentialsFilter filter = new ClientCredentialsFilter();
+        Assert.assertTrue(filter.verifyClientCredentials(actualAuth, expectedAuth));
+    }
+
+    @Test(dataProvider = "notAuthorizedData")
+    public void givenAuthorizationHeader_NotAuthorized(String actualAuth, String expectedAuth){
+        ClientCredentialsFilter filter = new ClientCredentialsFilter();
+        Assert.assertFalse(filter.verifyClientCredentials(actualAuth, expectedAuth));
+    }
+
+    //@Test(dataProvider = "clientVerified")
+    public void notAuthorized_return401(Boolean clientVerified) throws IOException, ServletException {
+        ClientCredentialsFilter filter = Mockito.mock(ClientCredentialsFilter.class);
+        HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
+        HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
+        FilterChain chain = Mockito.mock(FilterChain.class);
+
+
+        Mockito.when(filter.verifyClientCredentials(any(String.class),any(String.class))).thenReturn(clientVerified);
+        Mockito.doNothing().when(response).sendError(401);
+
+        Mockito.doCallRealMethod().when(filter).doFilter(request,response,chain);
+        filter.doFilter(request,response,chain);
+
+        if (clientVerified)
+        {
+            Mockito.verify(chain).doFilter(request,response);
+
+        }
+        else {
+            Mockito.verify(response).sendError(401);
+        }
+
+    }
+
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controller/LocalWebConfig.java b/onap-enabler-be/src/test/java/org/onap/osam/controller/LocalWebConfig.java
new file mode 100644
index 0000000..97fe380
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controller/LocalWebConfig.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controller;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.osam.aai.AaiClient;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.model.PortDetailsTranslator;
+import org.onap.osam.aai.util.AAIRestInterface;
+import org.onap.osam.aai.util.HttpsAuthClient;
+import org.onap.osam.aai.util.SSLContextProvider;
+import org.onap.osam.aai.util.ServletRequestHelper;
+import org.onap.osam.aai.util.SystemPropertyHelper;
+import org.onap.osam.services.AaiServiceImpl;
+import org.onap.osam.services.IAaiService;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.ServletContext;
+import java.io.File;
+
+@Configuration
+public class LocalWebConfig {
+
+    @Bean
+    public ObjectMapper getObjectMapper() {
+        return new ObjectMapper();
+    }
+
+
+    @Bean
+    public IAaiService getAaiService() {
+        return new AaiServiceImpl();
+    }
+
+    @Bean
+    public SSLContextProvider sslContextProvider() {
+        return new SSLContextProvider();
+    }
+
+    @Bean
+    public SystemPropertyHelper systemPropertyHelper() {
+        return new SystemPropertyHelper();
+    }
+
+    @Bean
+    public ServletRequestHelper servletRequestHelper() {
+        return new ServletRequestHelper();
+    }
+
+    @Bean
+    public HttpsAuthClient httpsAuthClientFactory(ServletContext servletContext, SystemPropertyHelper systemPropertyHelper, SSLContextProvider sslContextProvider) {
+        final String certFilePath = new File(servletContext.getRealPath("/WEB-INF/cert/")).getAbsolutePath();
+        return new HttpsAuthClient(certFilePath, systemPropertyHelper, sslContextProvider);
+    }
+
+    @Bean(name = "aaiRestInterface")
+    public AAIRestInterface aaiRestInterface(HttpsAuthClient httpsAuthClientFactory, ServletRequestHelper servletRequestHelper, SystemPropertyHelper systemPropertyHelper) {
+        return new AAIRestInterface(httpsAuthClientFactory, servletRequestHelper, systemPropertyHelper);
+    }
+
+    @Bean
+    public AaiClientInterface getAaiClientInterface(@Qualifier("aaiRestInterface")AAIRestInterface aaiRestInterface, PortDetailsTranslator portDetailsTranslator) {
+        return new AaiClient(aaiRestInterface, portDetailsTranslator);
+    }
+
+    @Bean
+    public PortDetailsTranslator portDetailsTranslator(){
+        return new PortDetailsTranslator();
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controller/MsoControllerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controller/MsoControllerTest.java
new file mode 100644
index 0000000..141a78b
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controller/MsoControllerTest.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controller;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.controllers.MsoConfig;
+import org.onap.osam.controllers.MsoController;
+import org.onap.osam.domain.mso.RequestInfo;
+import org.onap.osam.factories.MsoRequestFactory;
+import org.onap.osam.mso.rest.Request;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.Task;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.List;
+
+
+@WebAppConfiguration
+@ContextConfiguration(classes = {SystemProperties.class, MsoConfig.class})
+public class MsoControllerTest extends AbstractTestNGSpringContextTests {
+
+    @Autowired
+    MsoRequestFactory msoRequestFactory;
+
+    @Test(enabled = false)
+    public void testInstanceCreationNew() throws Exception {
+
+        RequestDetails requestDetails = msoRequestFactory.createMsoRequest("msoRequest.json");
+        MsoController msoController = new MsoController(null);
+        //TODO: make ths test to really test something
+        //ResponseEntity<String> responseEntityNew = msoController.createSvcInstanceNew(null, requestDetails);
+        ResponseEntity<String> responseEntity = msoController.createSvcInstance(null, requestDetails);
+        //Assert.assertEquals(responseEntityNew, responseEntity);
+
+    }
+
+    @Test(enabled = false)
+    public void testInstanceCreationLocalWithRest() throws Exception {
+
+        RequestDetails requestDetails = msoRequestFactory.createMsoRequest("msoRequest.json");
+        MsoController msoController = new MsoController(null);
+        ResponseEntity<String> responseEntityNew = msoController.createSvcInstance(null, requestDetails);
+        //TODO: make ths test to really test something
+//        ResponseEntity<String> responseEntityRest = msoController.createSvcInstanceNewRest(null, requestDetails);
+//
+//        Assert.assertEquals(responseEntityNew.getBody(), responseEntityRest.getBody());
+
+    }
+
+    @Test(enabled = false)
+    public void testInstanceCreation() throws Exception {
+
+        RequestDetails requestDetails = msoRequestFactory.createMsoRequest("msoRequest.json");
+        MsoController msoController = new MsoController(null);
+        ResponseEntity<String> responseEntity = msoController.createSvcInstance(null, requestDetails);
+
+
+        Assert.assertEquals(responseEntity.getBody(), "{ \"status\": 200, \"entity\": {\n" +
+                "  \"requestReferences\": {\n" +
+                "    \"instanceId\": \"ba00de9b-3c3e-4b0a-a1ad-0c5489e711fb\",\n" +
+                "    \"requestId\": \"311cc766-b673-4a50-b9c5-471f68914586\"\n" +
+                "  }\n" +
+                "}}");
+
+    }
+
+    @Test(enabled = false)
+    public void testGetOrchestrationRequestsForDashboard() throws Exception {
+        MsoController msoController = new MsoController(null);
+        List<Request> orchestrationRequestsForDashboard = msoController.getOrchestrationRequestsForDashboard();
+
+        Assert.assertEquals(orchestrationRequestsForDashboard.size(), 2);
+    }
+
+    @Test(enabled = false)
+    public void testGetManualTasksByRequestId() throws Exception {
+        MsoController msoController = new MsoController(null);
+        List<Task> orchestrationRequestsForDashboard = msoController.getManualTasksByRequestId("za1234d1-5a33-55df-13ab-12abad84e335");
+
+        Assert. assertEquals(orchestrationRequestsForDashboard.get(0).getTaskId(), "daf4dd84-b77a-42da-a051-3239b7a9392c");
+    }
+
+
+    public void testCompleteManualTask() throws Exception { // TODO not done yet
+        RequestInfo requestInfo = new RequestInfo();
+        requestInfo.setResponseValue("rollback");
+        requestInfo.setRequestorId("abc");
+        requestInfo.setSource("VID");
+        RequestDetails requestDetails = new RequestDetails();
+        requestDetails.setRequestInfo(requestInfo);
+        MsoController msoController = new MsoController(null);
+        ResponseEntity<String> responseEntity = msoController.manualTaskComplete("daf4dd84-b77a-42da-a051-3239b7a9392c", requestDetails);
+        String assertString = "{ \\\"status\\\": 200, \\\"entity\\\": {\\n\" +\n" +
+                "                \"  \\\"taskRequestReference\\\": {\\n\" +\n" +
+                "                \"     \\\"taskId\\\": \\\"daf4dd84-b77a-42da-a051-3239b7a9392c\\\"\\n\" +\n" +
+                "                \"      }\\n\" +\n" +
+                "                \"}\\n\" +\n" +
+                "                \"}";
+        Assert.assertEquals(responseEntity.getBody(), StringEscapeUtils.unescapeJava(assertString));
+    }
+
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controller/PromiseEcompRequestIdFilterTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controller/PromiseEcompRequestIdFilterTest.java
new file mode 100644
index 0000000..2c43cf4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controller/PromiseEcompRequestIdFilterTest.java
@@ -0,0 +1,184 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controller;
+
+import com.google.common.collect.ImmutableMap;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mockito;
+import org.mockito.stubbing.Answer;
+import org.onap.portalsdk.core.web.support.UserUtils;
+import org.onap.osam.filters.PromiseEcompRequestIdFilter;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.testng.annotations.Test;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.*;
+import java.util.function.Function;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.argThat;
+import static org.onap.portalsdk.core.util.SystemProperties.ECOMP_REQUEST_ID;
+
+@Test
+public class PromiseEcompRequestIdFilterTest {
+
+    private final String anotherHeader = "ANDREI_RUBLEV";
+    private final String anotherValue = "foo value";
+    private final String mixedCaseHeader = "x-ecomp-REQUESTID";
+
+    @Test
+    public void givenRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
+
+        final String someTxId = "863850e2-8545-4efd-94b8-afba5f52b3d5";
+
+        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
+                anotherHeader, anotherValue,
+                ECOMP_REQUEST_ID, someTxId
+        );
+
+        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, specificTxId(someTxId));
+    }
+
+    @Test
+    public void givenMixedCaseRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
+
+        final String someTxId = "729bbd8d-b0c2-4809-a794-dcccd9cda2c0";
+
+        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
+                mixedCaseHeader, someTxId,
+                anotherHeader, anotherValue
+        );
+
+        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, specificTxId(someTxId));
+    }
+
+    @Test
+    public void givenNoRequestIdHeader_headerValueWasGenerated() throws IOException, ServletException {
+
+        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
+                anotherHeader, anotherValue
+        );
+
+        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, UserUtils::getRequestId);
+    }
+
+    
+    private void buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(
+            ImmutableMap<String, String> originalRequestHeaders,
+            Function<HttpServletRequest, String> txIdExtractor
+    ) throws IOException, ServletException {
+        HttpServletRequest servletRequest = createMockedHttpServletRequest(originalRequestHeaders);
+        HttpServletResponse servletResponse = createMockedHttpServletResponse();
+
+        final FilterChain capturingFilterChain = Mockito.mock(FilterChain.class);
+
+        //////////////////
+        //
+        // doFilter() is the function under test
+        //
+        new PromiseEcompRequestIdFilter().doFilter(servletRequest, servletResponse, capturingFilterChain);
+        //
+        //////////////////
+
+        final ServletRequest capturedServletRequest = extractCapturedServletRequest(capturingFilterChain);
+        final ServletResponse capturedServletResponse = extractCapturedServletResponse(capturingFilterChain);
+        final String expectedTxId = txIdExtractor.apply((HttpServletRequest) capturedServletRequest);
+
+        assertRequestObjectHeaders(capturedServletRequest, expectedTxId);
+        assertResponseObjectHeaders(capturedServletResponse, expectedTxId);
+    }
+
+
+    private void assertRequestObjectHeaders(ServletRequest request, String expectedTxId) {
+        final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+
+        assertThat(Collections.list(httpServletRequest.getHeaderNames()),
+                containsInAnyOrder(equalToIgnoringCase(ECOMP_REQUEST_ID), equalToIgnoringCase(anotherHeader)));
+
+        assertThat(httpServletRequest.getHeader(anotherHeader), is(anotherValue));
+
+        assertThat(httpServletRequest.getHeader(ECOMP_REQUEST_ID), is(expectedTxId));
+        assertThat(httpServletRequest.getHeader(mixedCaseHeader), is(expectedTxId));
+
+        assertThat(UserUtils.getRequestId(httpServletRequest), is(expectedTxId));
+        assertThat(UserUtils.getRequestId(httpServletRequest), is(not(emptyOrNullString())));
+    }
+
+    private void assertResponseObjectHeaders(ServletResponse response, String txId) {
+        final String REQUEST_ID_HEADER_NAME_IN_RESPONSE = mixedCaseHeader + "-echo";
+        final HttpServletResponse httpServletResponse = (HttpServletResponse) response;
+
+        assertThat("header " + REQUEST_ID_HEADER_NAME_IN_RESPONSE.toLowerCase() + " in response must be provided",
+                httpServletResponse.getHeader(REQUEST_ID_HEADER_NAME_IN_RESPONSE), is(txId));
+    }
+
+
+
+    private HttpServletRequest createMockedHttpServletRequest(Map<String, String> requestHeaders) {
+        HttpServletRequest servletRequest = Mockito.mock(HttpServletRequest.class);
+        requestHeaders.forEach((k, v) -> {
+            Mockito.when(servletRequest.getHeader(argThat(equalToIgnoringCase(k)))).thenReturn(v);
+            Mockito.when(servletRequest.getHeaders(argThat(equalToIgnoringCase(k)))).then(returnEnumerationAnswer(v));
+        });
+        Mockito.when(servletRequest.getHeaderNames()).then(returnEnumerationAnswer(requestHeaders.keySet()));
+        return servletRequest;
+    }
+
+    private HttpServletResponse createMockedHttpServletResponse() {
+        return new MockHttpServletResponse();
+    }
+
+    private static Answer<Enumeration<String>> returnEnumerationAnswer(String ... items) {
+        return returnEnumerationAnswer(Arrays.asList(items));
+    }
+
+    private static Answer<Enumeration<String>> returnEnumerationAnswer(Collection<String> items) {
+        return invocation -> Collections.enumeration(items);
+    }
+
+    private Function<HttpServletRequest, String> specificTxId(String someTxId) {
+        return r -> someTxId;
+    }
+
+    private ServletRequest extractCapturedServletRequest(FilterChain capturingFilterChain) throws IOException, ServletException {
+        ArgumentCaptor<ServletRequest> captor = ArgumentCaptor.forClass(ServletRequest.class);
+        Mockito.verify(capturingFilterChain).doFilter(captor.capture(), any());
+        return captor.getValue();
+    }
+
+    private ServletResponse extractCapturedServletResponse(FilterChain capturingFilterChain) throws IOException, ServletException {
+        ArgumentCaptor<ServletResponse> captor = ArgumentCaptor.forClass(ServletResponse.class);
+        Mockito.verify(capturingFilterChain).doFilter(any(), captor.capture());
+        return captor.getValue();
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/AaiControllerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/AaiControllerTest.java
new file mode 100644
index 0000000..442a5e4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/AaiControllerTest.java
@@ -0,0 +1,459 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
+import org.onap.osam.model.VersionByInvariantIdsRequest;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.servlet.ModelAndView;
+import java.util.*;
+
+public class AaiControllerTest {
+
+    private AaiController createTestSubject() {
+        return new AaiController();
+    }
+
+    @Test
+    public void testWelcome() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        ModelAndView result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.welcome(request);
+    }
+
+    @Test
+    public void testGetTargetProvStatus() throws Exception {
+        AaiController testSubject;
+        ResponseEntity<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTargetProvStatus();
+    }
+
+    @Test
+    public void testViewEditGetTenantsFromServiceType() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        String globalCustomerId = "";
+        String serviceType = "";
+        ResponseEntity<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.viewEditGetTenantsFromServiceType(request, globalCustomerId, serviceType);
+    }
+
+    
+    
+    
+    
+    /*@Test
+    public void testGetAicZones() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getAicZones(request);
+        } catch (Exception e) {
+        }
+    }*/
+
+    @Test
+    public void testGetAicZoneForPnf() throws Exception {
+        AaiController testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String serviceId = "";
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getAicZoneForPnf(globalCustomerId, serviceType, serviceId, request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetUserID() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getUserID(request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDoGetServices() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.doGetServices(request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetVersionByInvariantId() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        VersionByInvariantIdsRequest versions = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getVersionByInvariantId(request, versions);
+        } catch (Exception e) {
+        }
+    }
+
+    // @Test
+    // public void testAaiResponseToResponseEntity() throws Exception {
+    // AaiController testSubject;AaiResponse aaiResponseData = null;
+    // ResponseEntity<String> result;
+    //
+    // // default test
+    // }
+
+    @Test
+    public void testDoGetServiceInstance() throws Exception {
+        AaiController testSubject;
+        String serviceInstanceId = "";
+        String serviceInstanceType = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.doGetServiceInstance(serviceInstanceId, serviceInstanceType);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDoGetServices_1() throws Exception {
+        AaiController testSubject;
+        String globalCustomerId = "";
+        String serviceSubscriptionId = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.doGetServices(globalCustomerId, serviceSubscriptionId);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDoGetSubscriberList() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        String fullSet = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.doGetSubscriberList(request, fullSet);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetOperationalEnvironments() throws Exception {
+        AaiController testSubject;
+        String operationalEnvironmentType = "";
+        String operationalEnvironmentStatus = "";
+        AaiResponse<OperationalEnvironmentList> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getOperationalEnvironments(operationalEnvironmentType, operationalEnvironmentStatus);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetFullSubscriberList() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getFullSubscriberList(request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetVnfDataByGlobalIdAndServiceType() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        String globalCustomerId = "";
+        String serviceType = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getVnfDataByGlobalIdAndServiceType(request, globalCustomerId, serviceType);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDoRefreshSubscriberList() throws Exception {
+        AaiController testSubject;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.doRefreshSubscriberList();
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDoRefreshFullSubscriberList() throws Exception {
+        AaiController testSubject;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.doRefreshFullSubscriberList();
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetSubscriberDetails() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        String subscriberId = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.GetSubscriberDetails(request, subscriberId);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testSearchServiceInstances() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        String subscriberId = "";
+        String instanceIdentifier = "";
+        List<String> projects = null;
+        List<String> owningEntities = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.SearchServiceInstances(request, subscriberId, instanceIdentifier, projects,
+                    owningEntities);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testViewEditGetComponentList() throws Exception {
+        AaiController testSubject;
+        String namedQueryId = "";
+        String globalCustomerId = "";
+        String serviceType = "";
+        String serviceInstance = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.viewEditGetComponentList(namedQueryId, globalCustomerId, serviceType, serviceInstance);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetVnfData() throws Exception {
+        AaiController testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String serviceInstanceId = "";
+        AaiResponse<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getVnfData(globalCustomerId, serviceType, serviceInstanceId);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testViewEditGetComponentList_1() throws Exception {
+        AaiController testSubject;
+        String namedQueryId = "";
+        String globalCustomerId = "";
+        String serviceType = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.viewEditGetComponentList(namedQueryId, globalCustomerId, serviceType);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetNodeTemplateInstances() throws Exception {
+        AaiController testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String modelVersionId = "";
+        String modelInvariantId = "";
+        String cloudRegion = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId,
+                    modelInvariantId, cloudRegion);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetByUri() throws Exception {
+        AaiController testSubject;
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getByUri(request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetSpecificConfiguration() throws Exception {
+        AaiController testSubject;
+        String configurationId = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getSpecificConfiguration(configurationId);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetServiceInstanceAssociatedPnfs() throws Exception {
+        AaiController testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String serviceInstanceId = "";
+        List<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getServiceInstanceAssociatedPnfs(globalCustomerId, serviceType, serviceInstanceId);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetSpecificPnf() throws Exception {
+        AaiController testSubject;
+        String pnfId = "";
+        ResponseEntity result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getSpecificPnf(pnfId);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetPnfInstances() throws Exception {
+        AaiController testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String modelVersionId = "";
+        String modelInvariantId = "";
+        String cloudRegion = "";
+        String equipVendor = "";
+        String equipModel = "";
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getPnfInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId,
+                    cloudRegion, equipVendor, equipModel);
+        } catch (Exception e) {
+        }
+
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/HealthCheckControllerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/HealthCheckControllerTest.java
new file mode 100644
index 0000000..45edaa5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/HealthCheckControllerTest.java
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import org.apache.log4j.BasicConfigurator;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.osam.controllers.PodDemoController.HealthStatus;
+import org.springframework.http.MediaType;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+
+public class HealthCheckControllerTest {
+
+	private PodDemoController testSubject;
+	private MockMvc mockMvc;
+
+	@Before
+	public void setUp() {
+		testSubject = new PodDemoController();
+		BasicConfigurator.configure();
+		mockMvc = MockMvcBuilders.standaloneSetup(testSubject).build();
+	}
+
+	@Test
+	public void testGetProfileCount() throws Exception {
+		String driver = "";
+		String URL = "";
+		String username = "";
+		String password = "";
+		int result;
+
+		// default test
+		result = testSubject.getProfileCount(driver, URL, username, password);
+	}
+
+	@Test
+	public void testGethealthCheckStatusforIDNS() throws Exception {
+		HealthStatus result;
+
+		// default test
+		result = testSubject.gethealthCheckStatusforIDNS();
+	}
+
+	@Test
+	public void testCommitInfoEndpoint() throws Exception {
+		mockMvc.perform(get("/commitInfo")
+				.accept(MediaType.APPLICATION_JSON))
+				.andExpect(status().isOk())
+				.andExpect(jsonPath("$.commitId").value("123987"))
+				.andExpect(jsonPath("$.commitMessageShort").value("Test short commit message"))
+				.andExpect(jsonPath("$.commitTime").value("1999-09-12T13:48:55+0200"));
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/LocalWebConfig.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/LocalWebConfig.java
new file mode 100644
index 0000000..538846b
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/LocalWebConfig.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.osam.aai.AaiClient;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.services.IAaiService;
+import org.onap.osam.services.AaiServiceImpl;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class LocalWebConfig {
+
+    @Bean
+    public ObjectMapper getObjectMapper() {
+        return new ObjectMapper();
+    }
+
+
+    @Bean
+    public IAaiService getAaiService() {
+        return new AaiServiceImpl();
+    }
+
+    @Bean
+    public AaiClientInterface getAaiClientInterface() {
+        return new AaiClient(null,null);
+    }
+
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/LoggerControllerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/LoggerControllerTest.java
new file mode 100644
index 0000000..ab6fb4a
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/LoggerControllerTest.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import javax.ws.rs.NotAuthorizedException;
+
+import org.junit.Test;
+
+
+public class LoggerControllerTest {
+
+    private LoggerController createTestSubject() {
+        return new LoggerController();
+    }
+
+    /*@Test
+    public void testGetLog() throws Exception {
+        LoggerController testSubject;
+        String loggerName = "";
+        HttpServletRequest request = null;
+        Integer limit = 0;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getLog(loggerName, request, limit);
+    }*/
+
+   
+    @Test
+    public void testNotAuthorizedHandler() throws Exception {
+        LoggerController testSubject;
+        NotAuthorizedException e = null;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.notAuthorizedHandler(e);
+    }
+
+    /*@Test
+    public void testIoExceptionHandler() throws Exception {
+        LoggerController testSubject;
+        Exception e = null;
+        ExceptionResponse result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.ioExceptionHandler(e);
+    }*/
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/MsoControllerNewTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/MsoControllerNewTest.java
new file mode 100644
index 0000000..87a0fc5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/MsoControllerNewTest.java
@@ -0,0 +1,411 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
+import org.onap.osam.mso.MsoBusinessLogicImpl;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.springframework.http.ResponseEntity;
+
+public class MsoControllerNewTest {
+
+    private MsoController createTestSubject() {
+        try {
+            return new MsoController(new MsoBusinessLogicImpl(null,null));
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+    @Test
+    public void testCreateSvcInstance() throws Exception {
+        MsoController testSubject;
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.createSvcInstance(request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testCreateVnf() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.createVnf(serviceInstanceId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testCreateNwInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.createNwInstance(serviceInstanceId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testCreateVolumeGroupInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String vnfInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.createVolumeGroupInstance(serviceInstanceId, vnfInstanceId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testCreateVfModuleInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String vnfInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.createVfModuleInstance(serviceInstanceId, vnfInstanceId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testCreateConfigurationInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetailsWrapper mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.createConfigurationInstance(serviceInstanceId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteSvcInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        String result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deleteSvcInstance(serviceInstanceId, request, mso_request, "");
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteVnf() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String vnfInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deleteVnf(serviceInstanceId, vnfInstanceId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteConfiguration() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String configurationId = "";
+        RequestDetailsWrapper mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deleteConfiguration(serviceInstanceId, configurationId, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testActivateConfiguration() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String configurationId = "";
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.activateConfiguration(serviceInstanceId, configurationId, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeactivateConfiguration() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String configurationId = "";
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deactivateConfiguration(serviceInstanceId, configurationId, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDisablePortOnConfiguration() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String configurationId = "";
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.disablePortOnConfiguration(serviceInstanceId, configurationId, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testEnablePortOnConfiguration() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String configurationId = "";
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.enablePortOnConfiguration(serviceInstanceId, configurationId, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteVfModule() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String vnfInstanceId = "";
+        String vfModuleId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deleteVfModule(serviceInstanceId, vnfInstanceId, vfModuleId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteVolumeGroupInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String vnfInstanceId = "";
+        String volumeGroupId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deleteVolumeGroupInstance(serviceInstanceId, vnfInstanceId, volumeGroupId, request,
+                    mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteNwInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        String networkInstanceId = "";
+        HttpServletRequest request = null;
+        RequestDetails mso_request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deleteNwInstance(serviceInstanceId, networkInstanceId, request, mso_request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetOrchestrationRequest() throws Exception {
+        MsoController testSubject;
+        String requestId = "";
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getOrchestrationRequest(requestId, request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetOrchestrationRequests() throws Exception {
+        MsoController testSubject;
+        String filterString = "";
+        HttpServletRequest request = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getOrchestrationRequests(filterString, request);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testActivateServiceInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        RequestDetails requestDetails = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.activateServiceInstance(serviceInstanceId, requestDetails);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeactivateServiceInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        RequestDetails requestDetails = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deactivateServiceInstance(serviceInstanceId, requestDetails);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testManualTaskComplete() throws Exception {
+        MsoController testSubject;
+        String taskId = "";
+        RequestDetails requestDetails = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.manualTaskComplete(taskId, requestDetails);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testRemoveRelationshipFromServiceInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        RequestDetails requestDetails = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.removeRelationshipFromServiceInstance(serviceInstanceId, requestDetails);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testAddRelationshipToServiceInstance() throws Exception {
+        MsoController testSubject;
+        String serviceInstanceId = "";
+        RequestDetails requestDetails = null;
+        ResponseEntity<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.addRelationshipToServiceInstance(serviceInstanceId, requestDetails);
+        } catch (Exception e) {
+        }
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/MsoControllerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/MsoControllerTest.java
new file mode 100644
index 0000000..b25e095
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/MsoControllerTest.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.domain.mso.RequestInfo;
+import org.onap.osam.factories.MsoRequestFactory;
+import org.onap.osam.mso.rest.Request;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.Task;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.util.List;
+
+
+@WebAppConfiguration
+@ContextConfiguration(classes = {SystemProperties.class, MsoConfig.class})
+public class MsoControllerTest extends AbstractTestNGSpringContextTests {
+
+    @Autowired
+    MsoRequestFactory msoRequestFactory;
+
+    @Test(enabled = false)
+    public void testInstanceCreationNew() throws Exception {
+
+        RequestDetails requestDetails = msoRequestFactory.createMsoRequest("msoRequest.json");
+        MsoController msoController = new MsoController(null);
+        //TODO: make ths test to really test something
+        //ResponseEntity<String> responseEntityNew = msoController.createSvcInstanceNew(null, requestDetails);
+        ResponseEntity<String> responseEntity = msoController.createSvcInstance(null, requestDetails);
+        //Assert.assertEquals(responseEntityNew, responseEntity);
+
+    }
+
+    @Test(enabled = false)
+    public void testInstanceCreationLocalWithRest() throws Exception {
+
+        RequestDetails requestDetails = msoRequestFactory.createMsoRequest("msoRequest.json");
+        MsoController msoController = new MsoController(null);
+        ResponseEntity<String> responseEntityNew = msoController.createSvcInstance(null, requestDetails);
+        //TODO: make ths test to really test something
+//        ResponseEntity<String> responseEntityRest = msoController.createSvcInstanceNewRest(null, requestDetails);
+//
+//        Assert.assertEquals(responseEntityNew.getBody(), responseEntityRest.getBody());
+
+    }
+
+    @Test(enabled = false)
+    public void testInstanceCreation() throws Exception {
+
+        RequestDetails requestDetails = msoRequestFactory.createMsoRequest("msoRequest.json");
+        MsoController msoController = new MsoController(null);
+        ResponseEntity<String> responseEntity = msoController.createSvcInstance(null, requestDetails);
+
+
+        Assert.assertEquals(responseEntity.getBody(), "{ \"status\": 200, \"entity\": {\n" +
+                "  \"requestReferences\": {\n" +
+                "    \"instanceId\": \"ba00de9b-3c3e-4b0a-a1ad-0c5489e711fb\",\n" +
+                "    \"requestId\": \"311cc766-b673-4a50-b9c5-471f68914586\"\n" +
+                "  }\n" +
+                "}}");
+
+    }
+
+    @Test(enabled = false)
+    public void testGetOrchestrationRequestsForDashboard() throws Exception {
+        MsoController msoController = new MsoController(null);
+        List<Request> orchestrationRequestsForDashboard = msoController.getOrchestrationRequestsForDashboard();
+
+        Assert.assertEquals(orchestrationRequestsForDashboard.size(), 2);
+    }
+
+    @Test(enabled = false)
+    public void testGetManualTasksByRequestId() throws Exception {
+        MsoController msoController = new MsoController(null);
+        List<Task> orchestrationRequestsForDashboard = msoController.getManualTasksByRequestId("za1234d1-5a33-55df-13ab-12abad84e335");
+
+        Assert. assertEquals(orchestrationRequestsForDashboard.get(0).getTaskId(), "daf4dd84-b77a-42da-a051-3239b7a9392c");
+    }
+
+
+    public void testCompleteManualTask() throws Exception { // TODO not done yet
+        RequestInfo requestInfo = new RequestInfo();
+        requestInfo.setResponseValue("rollback");
+        requestInfo.setRequestorId("abc");
+        requestInfo.setSource("VID");
+        RequestDetails requestDetails = new RequestDetails();
+        requestDetails.setRequestInfo(requestInfo);
+        MsoController msoController = new MsoController(null);
+        ResponseEntity<String> responseEntity = msoController.manualTaskComplete("daf4dd84-b77a-42da-a051-3239b7a9392c", requestDetails);
+        String assertString = "{ \\\"status\\\": 200, \\\"entity\\\": {\\n\" +\n" +
+                "                \"  \\\"taskRequestReference\\\": {\\n\" +\n" +
+                "                \"     \\\"taskId\\\": \\\"daf4dd84-b77a-42da-a051-3239b7a9392c\\\"\\n\" +\n" +
+                "                \"      }\\n\" +\n" +
+                "                \"}\\n\" +\n" +
+                "                \"}";
+        Assert.assertEquals(responseEntity.getBody(), StringEscapeUtils.unescapeJava(assertString));
+    }
+
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/PromiseEcompRequestIdFilterTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/PromiseEcompRequestIdFilterTest.java
new file mode 100644
index 0000000..2b64031
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/PromiseEcompRequestIdFilterTest.java
@@ -0,0 +1,184 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+import com.google.common.collect.ImmutableMap;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mockito;
+import org.mockito.stubbing.Answer;
+import org.onap.portalsdk.core.web.support.UserUtils;
+import org.onap.osam.filters.PromiseEcompRequestIdFilter;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.testng.annotations.Test;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.*;
+import java.util.function.Function;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.argThat;
+import static org.onap.portalsdk.core.util.SystemProperties.ECOMP_REQUEST_ID;
+
+@Test
+public class PromiseEcompRequestIdFilterTest {
+
+    private final String anotherHeader = "ANDREI_RUBLEV";
+    private final String anotherValue = "foo value";
+    private final String mixedCaseHeader = "x-ecomp-REQUESTID";
+
+    @Test
+    public void givenRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
+
+        final String someTxId = "863850e2-8545-4efd-94b8-afba5f52b3d5";
+
+        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
+                anotherHeader, anotherValue,
+                ECOMP_REQUEST_ID, someTxId
+        );
+
+        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, specificTxId(someTxId));
+    }
+
+    @Test
+    public void givenMixedCaseRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
+
+        final String someTxId = "729bbd8d-b0c2-4809-a794-dcccd9cda2c0";
+
+        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
+                mixedCaseHeader, someTxId,
+                anotherHeader, anotherValue
+        );
+
+        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, specificTxId(someTxId));
+    }
+
+    @Test
+    public void givenNoRequestIdHeader_headerValueWasGenerated() throws IOException, ServletException {
+
+        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
+                anotherHeader, anotherValue
+        );
+
+        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, UserUtils::getRequestId);
+    }
+
+    
+    private void buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(
+            ImmutableMap<String, String> originalRequestHeaders,
+            Function<HttpServletRequest, String> txIdExtractor
+    ) throws IOException, ServletException {
+        HttpServletRequest servletRequest = createMockedHttpServletRequest(originalRequestHeaders);
+        HttpServletResponse servletResponse = createMockedHttpServletResponse();
+
+        final FilterChain capturingFilterChain = Mockito.mock(FilterChain.class);
+
+        //////////////////
+        //
+        // doFilter() is the function under test
+        //
+        new PromiseEcompRequestIdFilter().doFilter(servletRequest, servletResponse, capturingFilterChain);
+        //
+        //////////////////
+
+        final ServletRequest capturedServletRequest = extractCapturedServletRequest(capturingFilterChain);
+        final ServletResponse capturedServletResponse = extractCapturedServletResponse(capturingFilterChain);
+        final String expectedTxId = txIdExtractor.apply((HttpServletRequest) capturedServletRequest);
+
+        assertRequestObjectHeaders(capturedServletRequest, expectedTxId);
+        assertResponseObjectHeaders(capturedServletResponse, expectedTxId);
+    }
+
+
+    private void assertRequestObjectHeaders(ServletRequest request, String expectedTxId) {
+        final HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+
+        assertThat(Collections.list(httpServletRequest.getHeaderNames()),
+                containsInAnyOrder(equalToIgnoringCase(ECOMP_REQUEST_ID), equalToIgnoringCase(anotherHeader)));
+
+        assertThat(httpServletRequest.getHeader(anotherHeader), is(anotherValue));
+
+        assertThat(httpServletRequest.getHeader(ECOMP_REQUEST_ID), is(expectedTxId));
+        assertThat(httpServletRequest.getHeader(mixedCaseHeader), is(expectedTxId));
+
+        assertThat(UserUtils.getRequestId(httpServletRequest), is(expectedTxId));
+        assertThat(UserUtils.getRequestId(httpServletRequest), is(not(emptyOrNullString())));
+    }
+
+    private void assertResponseObjectHeaders(ServletResponse response, String txId) {
+        final String REQUEST_ID_HEADER_NAME_IN_RESPONSE = mixedCaseHeader + "-echo";
+        final HttpServletResponse httpServletResponse = (HttpServletResponse) response;
+
+        assertThat("header " + REQUEST_ID_HEADER_NAME_IN_RESPONSE.toLowerCase() + " in response must be provided",
+                httpServletResponse.getHeader(REQUEST_ID_HEADER_NAME_IN_RESPONSE), is(txId));
+    }
+
+
+
+    private HttpServletRequest createMockedHttpServletRequest(Map<String, String> requestHeaders) {
+        HttpServletRequest servletRequest = Mockito.mock(HttpServletRequest.class);
+        requestHeaders.forEach((k, v) -> {
+            Mockito.when(servletRequest.getHeader(argThat(equalToIgnoringCase(k)))).thenReturn(v);
+            Mockito.when(servletRequest.getHeaders(argThat(equalToIgnoringCase(k)))).then(returnEnumerationAnswer(v));
+        });
+        Mockito.when(servletRequest.getHeaderNames()).then(returnEnumerationAnswer(requestHeaders.keySet()));
+        return servletRequest;
+    }
+
+    private HttpServletResponse createMockedHttpServletResponse() {
+        return new MockHttpServletResponse();
+    }
+
+    private static Answer<Enumeration<String>> returnEnumerationAnswer(String ... items) {
+        return returnEnumerationAnswer(Arrays.asList(items));
+    }
+
+    private static Answer<Enumeration<String>> returnEnumerationAnswer(Collection<String> items) {
+        return invocation -> Collections.enumeration(items);
+    }
+
+    private Function<HttpServletRequest, String> specificTxId(String someTxId) {
+        return r -> someTxId;
+    }
+
+    private ServletRequest extractCapturedServletRequest(FilterChain capturingFilterChain) throws IOException, ServletException {
+        ArgumentCaptor<ServletRequest> captor = ArgumentCaptor.forClass(ServletRequest.class);
+        Mockito.verify(capturingFilterChain).doFilter(captor.capture(), any());
+        return captor.getValue();
+    }
+
+    private ServletResponse extractCapturedServletResponse(FilterChain capturingFilterChain) throws IOException, ServletException {
+        ArgumentCaptor<ServletResponse> captor = ArgumentCaptor.forClass(ServletResponse.class);
+        Mockito.verify(capturingFilterChain).doFilter(any(), captor.capture());
+        return captor.getValue();
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/VidControllerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/VidControllerTest.java
new file mode 100644
index 0000000..4b02752
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/VidControllerTest.java
@@ -0,0 +1,211 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+
+//import com.fasterxml.jackson.databind.ObjectMapper;
+//import net.javacrumbs.jsonunit.JsonAssert;
+//import org.apache.commons.io.IOUtils;
+//import org.onap.vid.asdc.AsdcCatalogException;
+//import org.onap.vid.asdc.AsdcClient;
+//import org.onap.vid.asdc.parser.ToscaParserImpl2;
+//import org.onap.vid.model.*;
+//import org.onap.portalsdk.core.util.SystemProperties;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.mock.web.MockServletContext;
+//import org.springframework.test.context.ContextConfiguration;
+//import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+//import org.springframework.test.context.web.WebAppConfiguration;
+//import org.testng.Assert;
+//import org.testng.annotations.Test;
+//
+//import static org.onap.vid.testUtils.TestUtils.assertJsonStringEqualsIgnoreNulls;
+//
+//import java.io.IOException;
+//import java.io.InputStream;
+//import java.nio.file.Path;
+//import java.util.Map;
+//import java.util.UUID;
+//
+////import org.junit.Assert;
+////import org.junit.Ignore;
+////import org.junit.Test;
+////import org.junit.runner.RunWith;
+////import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+//
+//@ContextConfiguration(classes = {LocalWebConfig.class, SystemProperties.class})
+////@RunWith(SpringJUnit4ClassRunner.class)
+//@WebAppConfiguration
+//
+//public class VidControllerTest extends AbstractTestNGSpringContextTests {
+//
+//    @Autowired
+//    MockServletContext context;
+//    @Autowired
+//    private AsdcClient asdcClient;
+//    private ToscaParserImpl2 p2 = new ToscaParserImpl2();
+//    private ObjectMapper om = new ObjectMapper();
+//
+//
+//    @Test
+//    public void assertEqualsBetweenServices() throws Exception {
+//        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+//            Service expectedService = mockHelper.getNewServiceModel().getService();
+//            Service actualService = p2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getService();
+//            assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedService), om.writeValueAsString(actualService));
+//        }
+//    }
+//
+////    @Test
+////    public void assertEqualBetweenObjects() throws Exception {
+////        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+////            final Path csarPath = getCsarPath(mockHelper.getUuid());
+////            System.out.println("Comparing for csar " + csarPath);
+////            ServiceModel actualServiceModel = p2.makeServiceModel(csarPath, getServiceByUuid(mockHelper.getUuid()));
+////            assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(mockHelper.getNewServiceModel()), om.writeValueAsString(actualServiceModel));
+////        }
+////    }
+//
+////    @Test
+////    public void assertEqualsBetweenNetworkNodes() throws Exception {
+////        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+////            Map<String, Network> expectedNetworksMap = mockHelper.getNewServiceModel().getNetworks();
+////            Map<String, Network> actualNetworksMap = p2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getNetworks();
+////            for (Map.Entry<String, Network> entry : expectedNetworksMap.entrySet()) {
+////                Network expectedNetwork = entry.getValue();
+////                Network actualNetwork = actualNetworksMap.get(entry.getKey());
+////                Assert.assertEquals(expectedNetwork.getModelCustomizationName(), actualNetwork.getModelCustomizationName());
+////                verifyBaseNodeProperties(expectedNetwork, actualNetwork);
+////                compareProperties(expectedNetwork.getProperties(), actualNetwork.getProperties());
+////            }
+////        }
+////    }
+//
+//    //Because we are not supporting the old flow, the JSON are different by definition.
+//    @Test
+//    public void assertEqualsBetweenVnfsOfTosca() throws Exception {
+//        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+//            Map<String, VNF> expectedVnfsMap = mockHelper.getNewServiceModel().getVnfs();
+//            Map<String, VNF> actualVnfsMap = p2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getVnfs();
+//            for (Map.Entry<String, VNF> entry : expectedVnfsMap.entrySet()) {
+//                VNF expectedVnf = entry.getValue();
+//                VNF actualVnf = actualVnfsMap.get(entry.getKey());
+//                //need to uncomment these after 1806 merge
+//                //verifyBaseNodeProperties(expectedVnf, actualVnf);
+//                Assert.assertEquals(expectedVnf.getModelCustomizationName(), actualVnf.getModelCustomizationName());
+//                //compareProperties(expectedVnf.getProperties(), actualVnf.getProperties());
+//                //assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedVnf), om.writeValueAsString(actualVnf));
+//            }
+//        }
+//    }
+//
+//    @Test
+//    public void assertEqualsBetweenVolumeGroups() throws Exception {
+//        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+//            Map<String, VolumeGroup> actualVolumeGroups = p2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getVolumeGroups();
+//            Map<String, VolumeGroup> expectedVolumeGroups = mockHelper.getNewServiceModel().getVolumeGroups();
+//            JsonAssert.assertJsonEquals(actualVolumeGroups, expectedVolumeGroups);
+//        }
+//    }
+//
+//    @Test
+//    public void assertEqualsBetweenVfModules() throws Exception {
+//        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+//            Map<String, VfModule> actualVfModules = p2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getVfModules();
+//            Map<String, VfModule> expectedVfModules = mockHelper.getNewServiceModel().getVfModules();
+//            //need to uncomment after 1906 merge
+//            //JsonAssert.assertJsonEquals(actualVfModules, expectedVfModules);
+//        }
+//    }
+//
+//    /*@Test
+//    public void assertEqualsBetweenPolicyConfigurationNodes() throws Exception {
+//        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+//            Map<String, PortMirroringConfig> actualConfigurations = p2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getConfigurations();
+//            Map<String, PortMirroringConfig> expectedConfigurations = mockHelper.getNewServiceModel().getConfigurations();
+//            JsonAssert.assertJsonEquals(actualConfigurations, expectedConfigurations);
+//        }
+//    }*/
+//
+//    @Test
+//    public void assertEqualsBetweenServiceProxyNodes() throws Exception {
+//        for (ToscaParserMockHelper mockHelper : getExpectedServiceModel()) {
+//            Map<String, ServiceProxy> actualServiceProxies = p2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getServiceProxies();
+//            Map<String, ServiceProxy> expectedServiceProxies = mockHelper.getNewServiceModel().getServiceProxies();
+//            JsonAssert.assertJsonEquals(actualServiceProxies, expectedServiceProxies);
+//        }
+//    }
+//
+//    private void verifyBaseNodeProperties(Node expectedNode, Node actualNode) {
+//        Assert.assertEquals(expectedNode.getName(), actualNode.getName());
+//        Assert.assertEquals(expectedNode.getCustomizationUuid(), actualNode.getCustomizationUuid());
+//        Assert.assertEquals(expectedNode.getDescription(), actualNode.getDescription());
+//        Assert.assertEquals(expectedNode.getInvariantUuid(), actualNode.getInvariantUuid());
+//        Assert.assertEquals(expectedNode.getUuid(), actualNode.getUuid());
+//        Assert.assertEquals(expectedNode.getVersion(), actualNode.getVersion());
+//    }
+//
+//    private void compareProperties(Map<String, String> expectedProperties, Map<String, String> actualProperties) {
+//        for (Map.Entry<String, String> property : expectedProperties.entrySet()) {
+//            String expectedValue = property.getValue();
+//            String key = property.getKey();
+//            String actualValue = actualProperties.get(key);
+//            Assert.assertEquals(expectedValue, actualValue);
+//        }
+//    }
+//
+//    private ToscaParserMockHelper[] getExpectedServiceModel() throws IOException {
+//        ToscaParserMockHelper[] mockHelpers = {
+//                new ToscaParserMockHelper(Constants.vlUuid, Constants.vlFilePath),
+//                new ToscaParserMockHelper(Constants.vfUuid, Constants.vfFilePath),
+//                new ToscaParserMockHelper(Constants.configurationUuid, Constants.configurationFilePath),
+//        };
+//        for (ToscaParserMockHelper mockHelper : mockHelpers) {
+//            InputStream jsonFile = VidControllerTest.class.getClassLoader().getResourceAsStream(mockHelper.getFilePath());
+//            String expectedJsonAsString = IOUtils.toString(jsonFile);
+//            NewServiceModel newServiceModel1 = om.readValue(expectedJsonAsString, NewServiceModel.class);
+//            mockHelper.setNewServiceModel(newServiceModel1);
+//        }
+//        return mockHelpers;
+//    }
+//
+//    private Path getCsarPath(String uuid) throws AsdcCatalogException {
+//        return asdcClient.getServiceToscaModel(UUID.fromString(uuid));
+//    }
+//
+//    private org.onap.vid.asdc.beans.Service getServiceByUuid(String uuid) throws AsdcCatalogException {
+//        return asdcClient.getService(UUID.fromString(uuid));
+//    }
+//
+//    public class Constants {
+//        public static final String configurationUuid = "ee6d61be-4841-4f98-8f23-5de9da846ca7";
+//        public static final String configurationFilePath = "policy-configuration-csar.JSON";
+//        static final String vfUuid = "48a52540-8772-4368-9cdb-1f124ea5c931";
+//        static final String vlUuid = "cb49608f-5a24-4789-b0f7-2595473cb997";
+//        //        public static final String PNFUuid = "68101369-6f08-4e99-9a28-fa6327d344f3";
+//        static final String vfFilePath = "vf-csar.JSON";
+//        static final String vlFilePath = "vl-csar.JSON";
+////        public static final String PNFFilePath = "/Users/Oren/Git/Att/vid_internal/vid-app-common/src/main/resources/pnf.csar";
+//
+//    }
+//
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/controllers/ViewEditSubControllerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/controllers/ViewEditSubControllerTest.java
new file mode 100644
index 0000000..3067eef
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/controllers/ViewEditSubControllerTest.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.controllers;
+//package org.onap.vid.controller;
+//
+//import javax.servlet.http.HttpServletRequest;
+//
+//import org.junit.Test;
+//import org.springframework.web.servlet.ModelAndView;
+//
+//public class ViewEditSubControllerTest {
+//
+//	private ViewEditSubController createTestSubject() {
+//		return new ViewEditSubController();
+//	}
+//
+//	@Test
+//	public void testWelcome() throws Exception {
+//		ViewEditSubController testSubject;
+//		HttpServletRequest request = null;
+//		ModelAndView result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.welcome(request);
+//	}
+//
+//
+//	@Test
+//	public void testGetViewName() throws Exception {
+//		ViewEditSubController testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getViewName();
+//	}
+//
+//	@Test
+//	public void testSetViewName() throws Exception {
+//		ViewEditSubController testSubject;
+//		String viewName = "";
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setViewName(viewName);
+//	}
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/dao/FnAppDoaImplTest.java b/onap-enabler-be/src/test/java/org/onap/osam/dao/FnAppDoaImplTest.java
new file mode 100644
index 0000000..c958a2f
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/dao/FnAppDoaImplTest.java
@@ -0,0 +1,119 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.dao;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class FnAppDoaImplTest {
+
+    private FnAppDoaImpl createTestSubject() {
+        return new FnAppDoaImpl();
+    }
+
+    @Test
+    public void testGetConnection() throws Exception {
+        String driver2 = "";
+        String url = "";
+        String username = "";
+        String password = "";
+        Connection result;
+
+        // test 1
+        url = null;
+        username = null;
+        password = null;
+        result = FnAppDoaImpl.getConnection(driver2, url, username);
+        Assert.assertEquals(null, result);
+
+        // test 2
+        url = "";
+        username = null;
+        password = null;
+        result = FnAppDoaImpl.getConnection(driver2, url, username);
+        Assert.assertEquals(null, result);
+
+        // test 3
+        username = null;
+        url = null;
+        password = null;
+        result = FnAppDoaImpl.getConnection(driver2, url, username);
+        Assert.assertEquals(null, result);
+
+        // test 4
+        username = "";
+        url = null;
+        password = null;
+        result = FnAppDoaImpl.getConnection(driver2, url, username);
+        Assert.assertEquals(null, result);
+
+        // test 5
+        password = null;
+        url = null;
+        username = null;
+        result = FnAppDoaImpl.getConnection(driver2, url, username);
+        Assert.assertEquals(null, result);
+
+        // test 6
+        password = "";
+        url = null;
+        username = null;
+        result = FnAppDoaImpl.getConnection(driver2, url, username);
+        Assert.assertEquals(null, result);
+    }
+
+    @Test
+    public void testCleanup() throws Exception {
+        ResultSet rs = null;
+        PreparedStatement st = null;
+
+        // test 1
+        rs = null;
+        FnAppDoaImpl.cleanup(rs, st, null);
+
+        // test 2
+        st = null;
+        FnAppDoaImpl.cleanup(rs, st, null);
+
+        // test 3
+        FnAppDoaImpl.cleanup(rs, st, null);
+    }
+
+    @Test
+    public void testGetProfileCount() throws Exception {
+        FnAppDoaImpl testSubject;
+        String driver = "";
+        String URL = "";
+        String username = "";
+        String password = "";
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getProfileCount(driver, URL, username, password);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/factories/MsoRequestFactoryTest.java b/onap-enabler-be/src/test/java/org/onap/osam/factories/MsoRequestFactoryTest.java
new file mode 100644
index 0000000..60e7d2b
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/factories/MsoRequestFactoryTest.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.factories;
+
+import org.junit.Test;
+
+public class MsoRequestFactoryTest {
+
+    private MsoRequestFactory createTestSubject() {
+        return new MsoRequestFactory();
+    }
+
+    @Test
+    public void testCreateMsoRequest() throws Exception {
+        MsoRequestFactory testSubject;
+        String path = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.createMsoRequest(path);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/integrationTest/AaiIntegrationTest.java b/onap-enabler-be/src/test/java/org/onap/osam/integrationTest/AaiIntegrationTest.java
new file mode 100644
index 0000000..16b4f1c
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/integrationTest/AaiIntegrationTest.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.integrationTest;
+
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.model.GetServiceModelsByDistributionStatusResponse;
+import org.onap.osam.aai.model.Result;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+@ContextConfiguration(classes = {SystemProperties.class})
+
+
+@WebAppConfiguration
+public class AaiIntegrationTest extends AbstractTestNGSpringContextTests {
+
+
+    @Autowired
+    AaiClientInterface aaiClient;
+
+    @Test(enabled = false)
+    public void testGetServiceModelsFromAai() {
+        AaiResponse<GetServiceModelsByDistributionStatusResponse> serviceModelsByDistributionStatusResponse = aaiClient.getServiceModelsByDistributionStatus();
+        GetServiceModelsByDistributionStatusResponse response = serviceModelsByDistributionStatusResponse.getT();
+        for(Result result: response.getResults()){
+            Assert.assertNotNull(result.getModel().getModelInvariantId());
+            Assert.assertNotNull(result.getModel().getModelVers().getModelVer().get(0).getModelVersionId());
+            Assert.assertNotNull(result.getModel().getModelVers().getModelVer().get(0).getModelName());
+            Assert.assertNotNull(result.getModel().getModelVers().getModelVer().get(0).getModelVersion());
+        }
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/job/command/JobCommandFactoryTest.java b/onap-enabler-be/src/test/java/org/onap/osam/job/command/JobCommandFactoryTest.java
new file mode 100644
index 0000000..9c82b45
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/job/command/JobCommandFactoryTest.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.command;
+
+import com.google.common.collect.ImmutableMap;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.onap.osam.job.Job;
+import org.onap.osam.job.JobCommand;
+import org.onap.osam.job.JobType;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class JobCommandFactoryTest {
+
+    private JobCommandFactory jobCommandFactory;
+
+    @Mock
+    private Job job;
+
+    @Mock
+    private JobCommand mockCommand;
+
+    @BeforeMethod
+    public void initMocks() {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @BeforeMethod
+    public void setUp() {
+        jobCommandFactory = new JobCommandFactory(any -> mockCommand);
+    }
+
+    @DataProvider
+    public Object[][] jobTypes() {
+        return Arrays.stream(
+                JobType.values()
+        ).map(v -> new Object[]{v}).collect(Collectors.toList()).toArray(new Object[][]{});
+
+    }
+
+    @Test(dataProvider = "jobTypes")
+    public void givenJob_createCommandCallsTheInitAndReturnsTheInstance(JobType jobType) {
+
+        final UUID uuid = UUID.randomUUID();
+        final Map<String, Object> data = ImmutableMap.of("foo", "bar");
+
+        when(job.getType()).thenReturn(jobType);
+        when(job.getUuid()).thenReturn(uuid);
+        when(job.getData()).thenReturn(data);
+
+        final JobCommand command = jobCommandFactory.toCommand(job);
+
+        verify(mockCommand).init(uuid, data);
+
+        assertThat(command, equalTo(mockCommand));
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/job/impl/JobWorkerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/job/impl/JobWorkerTest.java
new file mode 100644
index 0000000..0c4dc2d
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/job/impl/JobWorkerTest.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.job.impl;
+
+import com.google.common.collect.ImmutableMap;
+import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.hamcrest.Matcher;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.onap.osam.job.*;
+import org.onap.osam.job.command.HttpCallCommand;
+import org.onap.osam.job.command.JobCommandFactory;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.util.Map;
+import java.util.UUID;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class JobWorkerTest {
+
+    @InjectMocks
+    private JobWorker jobWorker = new JobWorker();
+
+    @Mock
+    private JobCommandFactory jobCommandFactory;
+
+    private final JobCommand jobCommand = mock(JobCommand.class);
+    private Job jobUnderTest;
+    private JobAdapter.AsyncJobRequest originalData;
+    private JobType originalType;
+
+    @BeforeMethod
+    public void initMocks() {
+        MockitoAnnotations.initMocks(this);
+
+        when(jobCommandFactory.toCommand(any())).thenReturn(jobCommand);
+
+        originalData = new JobAdapter.AsyncJobRequest() {
+            public final Map datum = ImmutableMap.of("some", "data");
+            public final String foobar = "aux";
+        };
+
+        originalType = JobType.ServiceInstantiation;
+        jobUnderTest = new JobAdapterImpl().createJob(
+                originalType,
+                originalData,
+                UUID.randomUUID(),
+                "my user id",
+                RandomUtils.nextInt()
+        );
+    }
+
+    @Test
+    public void executeJobAndStepToNext_givenNull_onlyStatusModified() {
+
+        assertNextJobAfterExecuteJob(null, new String[]{"status"}, allOf(
+                hasProperty("status", is(Job.JobStatus.STOPPED)),
+                hasProperty("data", hasEntry("request", originalData)),
+                hasProperty("type", is(originalType)))
+        );
+    }
+
+    @Test
+    public void executeJobAndStepToNext_givenNextJob_jobDataIsModified() {
+
+        final Job.JobStatus nextStatus = Job.JobStatus.IN_PROGRESS;
+
+        final UUID jobUuid = UUID.randomUUID();
+        final NextCommand nextCommand = new NextCommand(nextStatus, new HttpCallCommand("my strange url", jobUuid));
+
+        String[] excludedFields = {"status", "data", "type"};
+
+        assertNextJobAfterExecuteJob(nextCommand, excludedFields, allOf(
+                hasProperty("status", is(nextStatus)),
+                hasProperty("data", is(nextCommand.getCommand().getData())),
+                hasProperty("type", is(nextCommand.getCommand().getType())))
+        );
+    }
+
+    private void assertNextJobAfterExecuteJob(NextCommand nextCommand, String[] excludedFields, Matcher<Job> jobMatcher) {
+        when(jobCommand.call()).thenReturn(nextCommand);
+
+        String jobBefore = new ReflectionToStringBuilder(jobUnderTest, ToStringStyle.SHORT_PREFIX_STYLE).setExcludeFieldNames(excludedFields).toString();
+
+        ////// FUNCTION UNDER TEST /////
+        Job nextJob = jobWorker.executeJobAndGetNext(jobUnderTest);
+        ////////////////////////////////
+
+        String jobAfter = new ReflectionToStringBuilder(nextJob, ToStringStyle.SHORT_PREFIX_STYLE).setExcludeFieldNames(excludedFields).toString();
+
+        assertThat(nextJob, jobMatcher);
+        assertThat(jobAfter, equalTo(jobBefore));
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/logging/VidLoggerAspectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/logging/VidLoggerAspectTest.java
new file mode 100644
index 0000000..c10ef96
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/logging/VidLoggerAspectTest.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.logging;
+
+import org.junit.Test;
+
+
+public class VidLoggerAspectTest {
+
+    private VidLoggerAspect createTestSubject() {
+        return new VidLoggerAspect();
+    }
+
+    @Test
+    public void testVidControllers() throws Exception {
+        VidLoggerAspect testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.vidControllers();
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/CategoryParameterOptionTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/CategoryParameterOptionTest.java
new file mode 100644
index 0000000..1e3b6d5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/CategoryParameterOptionTest.java
@@ -0,0 +1,211 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CategoryParameterOptionTest {
+
+    private CategoryParameterOption createTestSubject() {
+        return new CategoryParameterOption();
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testSetId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long id = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setId(id);
+    }
+
+    @Test
+    public void testGetAppId() throws Exception {
+        CategoryParameterOption testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAppId();
+    }
+
+    @Test
+    public void testSetAppId() throws Exception {
+        CategoryParameterOption testSubject;
+        String appId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAppId(appId);
+    }
+
+    @Test
+    public void testGetName() throws Exception {
+        CategoryParameterOption testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getName();
+    }
+
+    @Test
+    public void testSetName() throws Exception {
+        CategoryParameterOption testSubject;
+        String name = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setName(name);
+    }
+
+    @Test
+    public void testGetCategoryParameter() throws Exception {
+        CategoryParameterOption testSubject;
+        CategoryParameter result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCategoryParameter();
+    }
+
+    @Test
+    public void testSetCategoryParameter() throws Exception {
+        CategoryParameterOption testSubject;
+        CategoryParameter categoryParameter = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setCategoryParameter(categoryParameter);
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        CategoryParameterOption testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        CategoryParameterOption testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        CategoryParameterOption testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        CategoryParameterOption testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        CategoryParameterOption testSubject;
+        Object o = null;
+        boolean result;
+
+        // test 1
+        testSubject = createTestSubject();
+        o = null;
+        result = testSubject.equals(o);
+        Assert.assertEquals(false, result);
+    }
+
+    @Test
+    public void testHashCode() throws Exception {
+        CategoryParameterOption testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.hashCode();
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/CategoryParameterTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/CategoryParameterTest.java
new file mode 100644
index 0000000..3b57f06
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/CategoryParameterTest.java
@@ -0,0 +1,207 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Test;
+
+public class CategoryParameterTest {
+
+    private CategoryParameter createTestSubject() {
+        return new CategoryParameter();
+    }
+
+    @Test
+    public void testGetFamily() throws Exception {
+        CategoryParameter testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getFamily();
+    }
+
+    @Test
+    public void testSetFamily() throws Exception {
+        CategoryParameter testSubject;
+        String family = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setFamily(family);
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        CategoryParameter testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        CategoryParameter testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetName() throws Exception {
+        CategoryParameter testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getName();
+    }
+
+    @Test
+    public void testSetName() throws Exception {
+        CategoryParameter testSubject;
+        String name = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setName(name);
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        CategoryParameter testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        CategoryParameter testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testGetOptions() throws Exception {
+        CategoryParameter testSubject;
+        Set<CategoryParameterOption> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOptions();
+    }
+
+    @Test
+    public void testSetOptions() throws Exception {
+        CategoryParameter testSubject;
+        Set<CategoryParameterOption> options = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOptions(options);
+    }
+
+    @Test
+    public void testAddOption() throws Exception {
+        CategoryParameter testSubject;
+        CategoryParameterOption option = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.addOption(option);
+    }
+
+    @Test
+    public void testIsIdSupported() throws Exception {
+        CategoryParameter testSubject;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.isIdSupported();
+    }
+
+    @Test
+    public void testSetIdSupported() throws Exception {
+        CategoryParameter testSubject;
+        boolean idSupported = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setIdSupported(idSupported);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/ExceptionResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/ExceptionResponseTest.java
new file mode 100644
index 0000000..68e2ae1
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/ExceptionResponseTest.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.junit.Test;
+
+public class ExceptionResponseTest {
+
+    private ExceptionResponse createTestSubject() {
+        return new ExceptionResponse();
+    }
+
+    @Test
+    public void testGetException() throws Exception {
+        ExceptionResponse testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getException();
+    }
+
+    @Test
+    public void testSetException() throws Exception {
+        ExceptionResponse testSubject;
+        String exception = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setException(exception);
+    }
+
+    @Test
+    public void testGetMessage() throws Exception {
+        ExceptionResponse testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getMessage();
+    }
+
+    @Test
+    public void testSetMessage() throws Exception {
+        ExceptionResponse testSubject;
+        String message = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setMessage(message);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/ListOfErrorsResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/ListOfErrorsResponseTest.java
new file mode 100644
index 0000000..0fcd266
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/ListOfErrorsResponseTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class ListOfErrorsResponseTest {
+
+    private ListOfErrorsResponse createTestSubject() {
+        return new ListOfErrorsResponse();
+    }
+
+    @Test
+    public void testGetErrors() throws Exception {
+        ListOfErrorsResponse testSubject;
+        List<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrors();
+    }
+
+    @Test
+    public void testSetErrors() throws Exception {
+        ListOfErrorsResponse testSubject;
+        List<String> errors = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrors(errors);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/ModelUtilTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/ModelUtilTest.java
new file mode 100644
index 0000000..0c7fcb1
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/ModelUtilTest.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+public class ModelUtilTest {
+
+	private ModelUtil createTestSubject() {
+		return new ModelUtil();
+	}
+
+	
+	@Test
+	public void testGetTags() throws Exception {
+		String[] namespaces;
+		String constantValue = "test";
+		String[] result;
+
+		// test 1
+		namespaces = null;
+		result = ModelUtil.getTags(namespaces, constantValue);
+		Assert.assertNull(result);
+
+		// test 2
+		namespaces = new String[] { "" };
+		result = ModelUtil.getTags(namespaces, constantValue);
+		Assert.assertArrayEquals(new String[] { constantValue }, result);
+	}
+
+	
+	@Test
+	public void testIsType() throws Exception {
+		String type = "a";
+		String[] tags;
+		boolean result;
+
+		// test 1
+		tags = null;
+		result = ModelUtil.isType(type, tags);
+		Assert.assertEquals(false, result);
+
+		// test 2
+		tags = new String[] { "a" };
+		result = ModelUtil.isType(type, tags);
+		Assert.assertEquals(true, result);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/RequestReferencesContainerTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/RequestReferencesContainerTest.java
new file mode 100644
index 0000000..83611c5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/RequestReferencesContainerTest.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.osam.domain.mso.RequestReferences;
+
+public class RequestReferencesContainerTest {
+
+    private RequestReferencesContainer createTestSubject() {
+        return new RequestReferencesContainer(new RequestReferences());
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        RequestReferencesContainer testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        RequestReferencesContainer testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+
+    @Test
+    public void testGetRequestReferences() throws Exception {
+        RequestReferencesContainer testSubject;
+        RequestReferences result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestReferences();
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        RequestReferencesContainer testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/ResultTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/ResultTest.java
new file mode 100644
index 0000000..9b1f3f4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/ResultTest.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.junit.Test;
+
+public class ResultTest {
+
+    private Result createTestSubject() {
+        return new Result("");
+    }
+
+    @Test
+    public void testGetResult() throws Exception {
+        Result testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResult();
+    }
+
+    @Test
+    public void testSetResult() throws Exception {
+        Result testSubject;
+        String result = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setResult(result);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/ServiceInstanceSearchResultTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/ServiceInstanceSearchResultTest.java
new file mode 100644
index 0000000..bfb3e4b
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/ServiceInstanceSearchResultTest.java
@@ -0,0 +1,204 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import org.junit.Test;
+
+public class ServiceInstanceSearchResultTest {
+
+    private ServiceInstanceSearchResult createTestSubject() {
+        return new ServiceInstanceSearchResult();
+    }
+
+    @Test
+    public void testGetServiceInstanceId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getServiceInstanceId();
+    }
+
+    @Test
+    public void testSetServiceInstanceId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String serviceInstanceId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setServiceInstanceId(serviceInstanceId);
+    }
+
+    @Test
+    public void testGetGlobalCustomerId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getGlobalCustomerId();
+    }
+
+    @Test
+    public void testSetGlobalCustomerId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String globalCustomerId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setGlobalCustomerId(globalCustomerId);
+    }
+
+    @Test
+    public void testGetServiceType() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getServiceType();
+    }
+
+    @Test
+    public void testSetServiceType() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String serviceType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setServiceType(serviceType);
+    }
+
+    @Test
+    public void testGetServiceInstanceName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getServiceInstanceName();
+    }
+
+    @Test
+    public void testSetServiceInstanceName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String serviceInstanceName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setServiceInstanceName(serviceInstanceName);
+    }
+
+    @Test
+    public void testGetSubscriberName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSubscriberName();
+    }
+
+    @Test
+    public void testSetSubscriberName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String subscriberName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setSubscriberName(subscriberName);
+    }
+
+    @Test
+    public void testGetAaiModelInvariantId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAaiModelInvariantId();
+    }
+
+    @Test
+    public void testSetAaiModelInvariantId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String aaiModelInvariantId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAaiModelInvariantId(aaiModelInvariantId);
+    }
+
+    @Test
+    public void testGetAaiModelVersionId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAaiModelVersionId();
+    }
+
+    @Test
+    public void testSetAaiModelVersionId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String aaiModelVersionId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAaiModelVersionId(aaiModelVersionId);
+    }
+
+    @Test
+    public void testGetIsPermitted() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getIsPermitted();
+    }
+
+    @Test
+    public void testSetIsPermitted() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        boolean isPermitted = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setIsPermitted(isPermitted);
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        Object other = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.equals(other);
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/VNFDaoTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/VNFDaoTest.java
new file mode 100644
index 0000000..1182a0f
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/VNFDaoTest.java
@@ -0,0 +1,176 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Test;
+
+public class VNFDaoTest {
+
+    private VNFDao createTestSubject() {
+        return new VNFDao();
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        VNFDao testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        VNFDao testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        VNFDao testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        VNFDao testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testGetVnfUUID() throws Exception {
+        VNFDao testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfUUID();
+    }
+
+    @Test
+    public void testGetVnfInvariantUUID() throws Exception {
+        VNFDao testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfInvariantUUID();
+    }
+
+    @Test
+    public void testSetVnfUUID() throws Exception {
+        VNFDao testSubject;
+        String vnfUUID = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfUUID(vnfUUID);
+    }
+
+    @Test
+    public void testSetVnfInvariantUUID() throws Exception {
+        VNFDao testSubject;
+        String vnfInvariantUUID = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfInvariantUUID(vnfInvariantUUID);
+    }
+
+    @Test
+    public void testGetWorkflows() throws Exception {
+        VNFDao testSubject;
+        Set<VidWorkflow> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflows();
+    }
+
+    @Test
+    public void testSetWorkflows() throws Exception {
+        VNFDao testSubject;
+        Set<VidWorkflow> workflows = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkflows(workflows);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/VidWorkflowTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/VidWorkflowTest.java
new file mode 100644
index 0000000..6a85cd4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/VidWorkflowTest.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Test;
+
+public class VidWorkflowTest {
+
+    private VidWorkflow createTestSubject() {
+        return new VidWorkflow();
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        VidWorkflow testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        VidWorkflow testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        VidWorkflow testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        VidWorkflow testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testGetWokflowName() throws Exception {
+        VidWorkflow testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWokflowName();
+    }
+
+    @Test
+    public void testSetWokflowName() throws Exception {
+        VidWorkflow testSubject;
+        String wokflowName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWokflowName(wokflowName);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/WorkflowTest.java b/onap-enabler-be/src/test/java/org/onap/osam/model/WorkflowTest.java
new file mode 100644
index 0000000..10a66c5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/WorkflowTest.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.Collection;
+
+import org.junit.Test;
+
+public class WorkflowTest {
+
+	private Workflow createTestSubject() {
+		return new Workflow();
+	}
+
+	@Test
+	public void testGetId() throws Exception {
+		Workflow testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getId();
+	}
+
+	@Test
+	public void testGetWorkflowName() throws Exception {
+		Workflow testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getWorkflowName();
+	}
+
+	@Test
+	public void testGetVnfNames() throws Exception {
+		Workflow testSubject;
+		Collection<String> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getVnfNames();
+	}
+
+	@Test
+	public void testSetId() throws Exception {
+		Workflow testSubject;
+		int id = 0;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setId(id);
+	}
+
+	@Test
+	public void testSetWorkflowName() throws Exception {
+		Workflow testSubject;
+		String workflowName = "";
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setWorkflowName(workflowName);
+	}
+
+	@Test
+	public void testSetVnfName() throws Exception {
+		Workflow testSubject;
+		Collection<String> vnfNames = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setVnfName(vnfNames);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/model/oeModel.java b/onap-enabler-be/src/test/java/org/onap/osam/model/oeModel.java
new file mode 100644
index 0000000..46757b3
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/model/oeModel.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class oeModel {
+    public Map<String,List<Map<String,String>>> categoryParameters;
+}
+
+
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoBusinessLogicImplTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoBusinessLogicImplTest.java
new file mode 100644
index 0000000..743d218
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoBusinessLogicImplTest.java
@@ -0,0 +1,195 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.controllers.MsoController;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.onap.osam.properties.Features;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.testng.Assert;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import org.togglz.core.manager.FeatureManager;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.onap.osam.controllers.MsoController.SVC_INSTANCE_ID;
+import static org.onap.osam.mso.MsoBusinessLogicImpl.validateEndpointPath;
+
+@ContextConfiguration(classes = {SystemProperties.class})
+@WebAppConfiguration
+public class MsoBusinessLogicImplTest extends AbstractTestNGSpringContextTests {
+
+    private static final String SERVICE_INSTANCE_ID = "1";
+    private static final String VNF_INSTANCE_ID = "1";
+    private static final String EXPECTED_SCALE_OUT_PATH = "/serviceInstantiation/v7/serviceInstances/1/vnfs/1/vfModules/scaleOut";
+    private static final Path PATH_TO_NOT_PROCESSED_SCALE_OUT_REQUEST = Paths.get("src", "test", "resources", "payload_jsons", "scaleOutVfModulePayload.json");
+    private static final Path PATH_TO_FINAL_SCALE_OUT_REQUEST = Paths.get("src", "test", "resources", "payload_jsons", "scaleOutVfModulePayloadToMso.json");
+    private static final ObjectMapper OBJECT_MAPPER=new ObjectMapper();
+
+    @InjectMocks
+    private MsoBusinessLogicImpl msoBusinessLogic;
+
+    @Mock
+    private FeatureManager featureManagerMock;
+
+    @Mock
+    private MsoInterface msoInterfaceMock;
+
+
+    @BeforeTest
+    public void initMocks() {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @Test
+    public void validateEndpointPath_endPointIsNotEmptyAndVaild_returnProperty() {
+        System.setProperty("TestEnv", "123");
+        String foundEndPoint = validateEndpointPath("TestEnv");
+        Assert.assertEquals("123", foundEndPoint);
+    }
+
+    @Test(expectedExceptions = RuntimeException.class)
+    public void validateEndpointPath_endPointIsNull_throwRuntimeException() {
+        validateEndpointPath("NotExists");
+    }
+
+    @Test(expectedExceptions = RuntimeException.class)
+    public void validateEndpointPath_endPointIsNotEmptyButDoesntExists_throwRuntimeException() {
+        System.setProperty("EmptyEndPoint", "");
+        validateEndpointPath("EmptyEndPoint");
+    }
+
+
+    //@Test(dataProvider = "unAssignOrDeleteParams")
+    public void deleteSvcInstance_verifyEndPointPathConstructing_unAssignFeatureOffOrUnAssignFlagIsFalse(boolean isAssignFlag, String status) {
+        Mockito.reset(msoInterfaceMock);
+        String endpoint = validateEndpointPath(isAssignFlag ? MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE : MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        RequestDetails requestDetails = new RequestDetails();
+
+        when(featureManagerMock.isActive(Features.FLAG_UNASSIGN_SERVICE)).thenReturn(isAssignFlag);
+
+        msoBusinessLogic.deleteSvcInstance(requestDetails, "tempId", status);
+
+        verify(msoInterfaceMock).deleteSvcInstance(requestDetails, endpoint + "/tempId");
+    }
+
+    @DataProvider
+    public Object[][] unAssignOrDeleteParams() {
+        return new Object[][]{
+                {Boolean.FALSE, "active"},
+                {Boolean.FALSE, "created"},
+                {Boolean.TRUE, "Active"},
+                {Boolean.TRUE, "unexpected-status"},
+        };
+    }
+
+    //@Test(dataProvider = "unAssignStatus")
+    public void deleteSvcInstance_verifyEndPointPathConstructing_unAssignFeatureOnAndUnAssignFlagIsTrue(String status) {
+        Mockito.reset(msoInterfaceMock);
+        // in the test Features.FLAG_UNASSIGN_SERVICE is active so the endpoint should be MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE
+        String endpoint = validateEndpointPath(MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE);
+        RequestDetails requestDetails = new RequestDetails();
+
+        when(featureManagerMock.isActive(Features.FLAG_UNASSIGN_SERVICE)).thenReturn(true);
+
+        msoBusinessLogic.deleteSvcInstance(requestDetails, "tempId", status);
+
+        verify(msoInterfaceMock).unassignSvcInstance(requestDetails, endpoint + "/tempId/unassign");
+    }
+
+    @DataProvider
+    public Object[][] unAssignStatus() {
+        return new Object[][]{
+                {"Created"},
+                {"Pendingdelete"},
+                {"pending-Delete"},
+                {"Assigned"}
+        };
+    }
+
+    @Test
+    public void deleteVnf_verifyEndPointPathConstructing() {
+        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE);
+        RequestDetails requestDetails = new RequestDetails();
+
+        String vnf_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, "serviceInstanceTempId");
+
+        msoBusinessLogic.deleteVnf(requestDetails, "serviceInstanceTempId", "vnfInstanceTempId");
+        verify(msoInterfaceMock).deleteVnf(requestDetails, vnf_endpoint + "/vnfInstanceTempId");
+    }
+
+    @Test
+    public void deleteVfModule_verifyEndPointPathConstructing() {
+        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
+        RequestDetails requestDetails = new RequestDetails();
+
+        String vf__modules_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, "serviceInstanceTempId").replaceFirst(MsoController.VNF_INSTANCE_ID, "vnfInstanceTempId");
+
+        msoBusinessLogic.deleteVfModule(requestDetails, "serviceInstanceTempId", "vnfInstanceTempId", "vfModuleTempId");
+        verify(msoInterfaceMock).deleteVfModule(requestDetails, vf__modules_endpoint + "/vfModuleTempId");
+    }
+
+
+    //@Test - fails after code cutting - TBD later
+    public void shouldSendProperScaleOutRequest() throws IOException {
+        ArgumentCaptor<RequestDetailsWrapper> requestDetailsWrapperArgumentCaptor = ArgumentCaptor.forClass(RequestDetailsWrapper.class);
+        RequestDetails requestDetails = getScaleOutRequest();
+        RequestDetailsWrapper expectedRequestWrapper = getExpectedRequestWrapper();
+
+        msoBusinessLogic.scaleOutVfModuleInstance(requestDetails, SERVICE_INSTANCE_ID, VNF_INSTANCE_ID);
+
+        verify(msoInterfaceMock).scaleOutVFModuleInstance(requestDetailsWrapperArgumentCaptor.capture(), eq(EXPECTED_SCALE_OUT_PATH));
+        RequestDetailsWrapper actual = requestDetailsWrapperArgumentCaptor.getAllValues().get(0);
+
+        assertThat(expectedRequestWrapper.requestDetails).isEqualTo(actual.requestDetails);
+    }
+
+    private RequestDetails getScaleOutRequest() throws IOException {
+        return OBJECT_MAPPER.readValue(PATH_TO_NOT_PROCESSED_SCALE_OUT_REQUEST.toFile(), RequestDetails.class);
+    }
+
+    private RequestDetailsWrapper getExpectedRequestWrapper() throws IOException {
+        return OBJECT_MAPPER.readValue(PATH_TO_FINAL_SCALE_OUT_REQUEST.toFile(), new TypeReference<RequestDetailsWrapper>() {
+        });
+    }
+}
+
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoBusinessLogicTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoBusinessLogicTest.java
new file mode 100644
index 0000000..b1347d0
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoBusinessLogicTest.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.osam.mso.rest.RequestDetails;
+import org.onap.osam.mso.rest.RequestDetailsWrapper;
+import org.testng.annotations.Test;
+
+import java.net.URL;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MsoBusinessLogicTest {
+
+    @InjectMocks
+    private MsoBusinessLogicImpl msoBusinessLogic;
+
+    @Mock
+    private MsoInterface msoClient;
+
+    @Test
+    public void testCreateInstance() throws Exception {
+        String instanceId = "3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
+        final RequestDetailsWrapper requestDetailsWrapper = new RequestDetailsWrapper();
+        requestDetailsWrapper.requestDetails = setRequestDetails("mso_request_create_configuration.json");
+        Mockito.doReturn(getOkResponse(instanceId)).when(msoClient).createConfigurationInstance(requestDetailsWrapper, "/serviceInstances/v6/3f93c7cb-2fd0-4557-9514-e189b7b04f9d/configurations");
+        final MsoResponseWrapper msoResponseWrapper = msoBusinessLogic.createConfigurationInstance(requestDetailsWrapper, instanceId);
+
+        assertNotNull(msoResponseWrapper);
+        assertEquals(202, msoResponseWrapper.getStatus());
+    }
+
+    private MsoResponseWrapper getOkResponse(String instanceId){
+        MsoResponseWrapper responseWrapper = new MsoResponseWrapper();
+        String entity = " \"body\": {\n" +
+                "      \"requestReferences\": {\n" +
+                "        \"instanceId\": \""+instanceId+"\",\n" +
+                "        \"requestId\": \"b6dc9806-b094-42f7-9386-a48de8218ce8\"\n" +
+                "      }";
+        responseWrapper.setEntity(entity);
+        responseWrapper.setStatus(202);
+        return responseWrapper;
+    }
+
+    private RequestDetails setRequestDetails(String bodyFileName)throws Exception {
+        final URL resource = this.getClass().getResource("/payload_jsons/" + bodyFileName);
+        ObjectMapper mapper = new ObjectMapper();
+        RequestDetails requestDetails = mapper.readValue(resource, RequestDetails.class);
+        return requestDetails;
+
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoResponseWrapper2Test.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoResponseWrapper2Test.java
new file mode 100644
index 0000000..4ec0f98
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoResponseWrapper2Test.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import org.junit.Test;
+
+public class MsoResponseWrapper2Test {
+
+    private MsoResponseWrapper2 createTestSubject() {
+        return new MsoResponseWrapper2(new RestObject());
+    }
+
+    @Test
+    public void testGetStatus() throws Exception {
+        MsoResponseWrapper2 testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatus();
+    }
+
+    @Test
+    public void testGetResponse() throws Exception {
+        MsoResponseWrapper2 testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResponse();
+    }
+
+    @Test
+    public void testGetEntity() throws Exception {
+        MsoResponseWrapper2 testSubject;
+        Object result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getEntity();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoResponseWrapperTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoResponseWrapperTest.java
new file mode 100644
index 0000000..9124d5f
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoResponseWrapperTest.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import org.junit.Test;
+
+public class MsoResponseWrapperTest {
+
+    private MsoResponseWrapper createTestSubject() {
+        return new MsoResponseWrapper();
+    }
+
+    @Test
+    public void testGetEntity() throws Exception {
+        MsoResponseWrapper testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getEntity();
+    }
+
+    @Test
+    public void testGetStatus() throws Exception {
+        MsoResponseWrapper testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatus();
+    }
+
+    @Test
+    public void testSetStatus() throws Exception {
+        MsoResponseWrapper testSubject;
+        int v = 0;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setStatus(v);
+    }
+
+    @Test
+    public void testSetEntity() throws Exception {
+        MsoResponseWrapper testSubject;
+        String v = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setEntity(v);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        MsoResponseWrapper testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+
+    @Test
+    public void testGetResponse() throws Exception {
+        MsoResponseWrapper testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResponse();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoUtilTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoUtilTest.java
new file mode 100644
index 0000000..93230e6
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/MsoUtilTest.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MsoUtilTest {
+
+	private MsoUtil createTestSubject() {
+		return new MsoUtil();
+	}
+
+	@Test
+	public void testWrapResponse() throws Exception {
+		String body = "";
+		int statusCode = 0;
+		MsoResponseWrapper result;
+
+		// default test
+		result = MsoUtil.wrapResponse(body, statusCode);
+	}
+
+
+	@Test
+	public void testWrapResponse_2() throws Exception {
+		RestObject<String> rs = null;
+		MsoResponseWrapper result;
+
+		// test 1
+		result = MsoUtil.wrapResponse(rs);
+		Assert.assertNotNull(result);
+	}
+
+	@Test
+	public void testConvertPojoToString() throws Exception {
+		String result;
+
+		// test 1
+		result = MsoUtil.convertPojoToString(null);
+		Assert.assertEquals("", result);
+	}
+
+	@Test
+	public void testMain() throws Exception {
+		String[] args = new String[] { "" };
+
+		// default test
+		MsoUtil.main(args);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/RestMsoImplementationTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/RestMsoImplementationTest.java
new file mode 100644
index 0000000..03f8446
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/RestMsoImplementationTest.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import org.junit.Test;
+
+import javax.ws.rs.core.MultivaluedHashMap;
+
+public class RestMsoImplementationTest {
+
+    private RestMsoImplementation createTestSubject() {
+        return new RestMsoImplementation();
+    }
+
+    @Test
+    public void testInitMsoClient() throws Exception {
+        RestMsoImplementation testSubject;
+        MultivaluedHashMap<String, Object> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.initMsoClient();
+        } catch (Exception e) {
+        }
+    }
+
+
+    @Test
+    public void testGetForObject() throws Exception {
+        RestMsoImplementation testSubject;
+        String sourceID = "";
+        String path = "";
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            testSubject.GetForObject(sourceID, path, null);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDelete() throws Exception {
+        RestMsoImplementation testSubject;
+        String sourceID = "";
+        String path = "";
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            testSubject.Delete(null, null, sourceID, path, null);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testPostForObject() throws Exception {
+        RestMsoImplementation testSubject;
+        Object requestDetails = null;
+        String sourceID = "";
+        String path = "";
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            testSubject.PostForObject(requestDetails, sourceID, path, null);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+
+
+    @Test
+    public void testPrepareClient() throws Exception {
+        RestMsoImplementation testSubject;
+        String path = "";
+        String methodName = "";
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            testSubject.prepareClient(path, methodName);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+
+
+
+    // @Test
+    // public void testInitMsoClient() throws Exception {
+    // RestMsoImplementation testSubject;
+    //
+    // // default test
+    // testSubject = createTestSubject();
+    // testSubject.initMsoClient();
+    // }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/RestObjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/RestObjectTest.java
new file mode 100644
index 0000000..60420d2
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/RestObjectTest.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso;
+
+import org.junit.Test;
+
+public class RestObjectTest {
+
+    private RestObject createTestSubject() {
+        return new RestObject();
+    }
+
+    @Test
+    public void testSet() throws Exception {
+        RestObject testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.set(null);
+    }
+
+    @Test
+    public void testGet() throws Exception {
+        RestObject testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.get();
+    }
+
+    @Test
+    public void testSetStatusCode() throws Exception {
+        RestObject testSubject;
+        int v = 0;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setStatusCode(v);
+    }
+
+    @Test
+    public void testGetStatusCode() throws Exception {
+        RestObject testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatusCode();
+    }
+
+    @Test
+    public void testGetRaw() throws Exception {
+        RestObject testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRaw();
+    }
+
+    @Test
+    public void testSetRaw() throws Exception {
+        RestObject testSubject;
+        String rawT = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRaw(rawT);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        RestObject testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/AsyncRequestStatusTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/AsyncRequestStatusTest.java
new file mode 100644
index 0000000..3d94f03
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/AsyncRequestStatusTest.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import org.junit.Test;
+
+
+public class AsyncRequestStatusTest {
+
+	private AsyncRequestStatus createTestSubject() {
+		return new AsyncRequestStatus();
+	}
+
+	
+	@Test
+	public void testToString() throws Exception {
+		AsyncRequestStatus testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.toString();
+	}
+
+	
+	@Test
+	public void testHashCode() throws Exception {
+		AsyncRequestStatus testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.hashCode();
+	}
+
+	
+	@Test
+	public void testEquals() throws Exception {
+		AsyncRequestStatus testSubject;
+		Object other = null;
+		boolean result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.equals(other);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientNewTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientNewTest.java
new file mode 100644
index 0000000..16024bb
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientNewTest.java
@@ -0,0 +1,471 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.xebialabs.restito.server.StubServer;
+import org.glassfish.grizzly.http.util.HttpStatus;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.client.SyncRestClient;
+import org.onap.osam.controllers.MsoController;
+import org.onap.osam.mso.MsoInterface;
+import org.onap.osam.mso.MsoProperties;
+import org.onap.osam.mso.MsoResponseWrapper;
+import org.onap.osam.mso.MsoResponseWrapperInterface;
+import org.onap.osam.mso.RestObject;
+import org.springframework.test.context.ContextConfiguration;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Properties;
+import java.util.UUID;
+
+import static org.onap.osam.controllers.MsoController.SVC_INSTANCE_ID;
+import static org.onap.osam.controllers.MsoController.VNF_INSTANCE_ID;
+
+@ContextConfiguration(classes = {SystemProperties.class})
+public class MsoRestClientNewTest {
+
+    private static StubServer server;
+    private static StubServer securedServer;
+    private static Properties props = new Properties();
+    private static String msoCreateServiceInstanceJson;
+    private static String msoScaleOutVfModule;
+    private final static String CREATE_INSTANCE_RESPONSE_STR =
+            "{\"requestReferences\":{\"instanceId\":\"baa13544-0e95-4644-9565-9a198a29a294\","
+                    + "\"requestId\":\"a42a1a35-3d63-4629-bbe0-4989fa7414cb\"}}";
+    private final static String SERVICE_INSTANCE_ID = "12345";
+    private static final String SAMPLE_VNF_INSTANCE_ID = "111";
+    private static final String SAMPLE_VNF_MODULE_ID = "987";
+    private static final String SAMPLE_NETWORK_INSTANCE_ID = "666";
+    private static final String SAMPLE_CONFIGURATION_ID = "997";
+    private static final String SAMPLE_REQUEST_ID = "7777";
+
+
+    @BeforeClass
+    public static void start() throws IOException {
+        server = new StubServer().run();
+        securedServer = new StubServer().secured().run();
+
+        Path resourceDirectory =
+                Paths.get("src", "test", "resources", "WEB-INF", "conf", "system.properties");
+        try (InputStream is = Files.newInputStream(resourceDirectory)) {
+            props.load(is);
+        }
+
+        Path msoServiceInstantiationJsonFilePath =
+                Paths.get("src", "test", "resources", "payload_jsons", "mso_service_instantiation.json");
+
+        Path scaleOutJsonFilePath = Paths.get("src", "test", "resources", "payload_jsons", "scaleOutVfModulePayloadToMso.json");
+        msoCreateServiceInstanceJson =
+                String.join("\n", Files.readAllLines(msoServiceInstantiationJsonFilePath));
+        msoScaleOutVfModule = String.join("\n", Files.readAllLines(scaleOutJsonFilePath));
+
+    }
+
+    @AfterClass
+    public static void stop() {
+        server.stop();
+        securedServer.stop();
+    }
+
+
+    private String baseUrl() {
+        return String.format("http://localhost:%d", server.getPort());
+    }
+
+    @Test
+    public void testCreateSvcInstance() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_CONFIGURATIONS);
+        endpoint = endpoint.replace(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                endpoint,
+                HttpStatus.ACCEPTED_202,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executePost(msoCreateServiceInstanceJson, msoRestClient()::createSvcInstance);
+        }
+    }
+
+    @Test
+    public void testCreateVnf() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VNF_INSTANCE);
+        endpoint = endpoint.replace(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                endpoint,
+                HttpStatus.ACCEPTED_202,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+
+            closure.executePost(msoCreateServiceInstanceJson, msoRestClient()::createVnf);
+        }
+    }
+
+    @Test
+    public void testCreateNwInstance() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
+        String nw_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                nw_endpoint,
+                HttpStatus.ACCEPTED_202,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executePost(msoCreateServiceInstanceJson, msoRestClient()::createNwInstance);
+        }
+    }
+
+    @Test
+    public void testCreateVolumeGroupInstance() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
+        String vnf_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        vnf_endpoint = vnf_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                vnf_endpoint,
+                HttpStatus.ACCEPTED_202,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executePost(msoCreateServiceInstanceJson, msoRestClient()::createVolumeGroupInstance);
+        }
+    }
+
+    @Test
+    public void testCreateVfModuleInstance() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
+        String partial_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        String vf_module_endpoint =
+                partial_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
+
+
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                vf_module_endpoint,
+                HttpStatus.ACCEPTED_202,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executePost(msoCreateServiceInstanceJson, msoRestClient()::createVfModuleInstance);
+        }
+    }
+
+    @Test
+    public void testCreateConfigurationInstance() throws Exception {
+        MsoRestClientNew testSubject;
+        RequestDetailsWrapper requestDetails = null;
+        String endpoint = "";
+        MsoResponseWrapper result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.createConfigurationInstance(requestDetails, endpoint);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteSvcInstance() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+
+
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                endpoint,
+                HttpStatus.NO_CONTENT_204,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executeDelete(msoCreateServiceInstanceJson, msoRestClient()::deleteSvcInstance);
+        }
+    }
+
+    @Test
+    public void testDeleteVnf() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VNF_INSTANCE);
+        endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                endpoint,
+                HttpStatus.NO_CONTENT_204,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executeDelete(msoCreateServiceInstanceJson, msoRestClient()::deleteVnf);
+        }
+    }
+
+    @Test
+    public void testDeleteVfModule() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
+        String part_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        String vf_modules_endpoint = part_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
+        String delete_vf_endpoint = vf_modules_endpoint + '/' + SAMPLE_VNF_MODULE_ID;
+
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                delete_vf_endpoint,
+                HttpStatus.NO_CONTENT_204,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executeDelete(msoCreateServiceInstanceJson, msoRestClient()::deleteVfModule);
+        }
+    }
+
+    @Test
+    public void testDeleteVolumeGroupInstance() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
+        String svc_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        String vnf_endpoint = svc_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
+        String delete_volume_group_endpoint = vnf_endpoint + "/" + SAMPLE_VNF_MODULE_ID;
+
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                delete_volume_group_endpoint,
+                HttpStatus.NO_CONTENT_204,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executeDelete(msoCreateServiceInstanceJson, msoRestClient()::deleteVolumeGroupInstance);
+        }
+    }
+
+    @Test
+    public void testDeleteNwInstance() throws Exception {
+        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
+        String svc_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        String delete_nw_endpoint = svc_endpoint + "/" + SAMPLE_NETWORK_INSTANCE_ID;
+
+        try(MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+            server,
+            delete_nw_endpoint,
+            HttpStatus.NO_CONTENT_204,
+            CREATE_INSTANCE_RESPONSE_STR,CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executeDelete(msoCreateServiceInstanceJson, msoRestClient()::deleteNwInstance);
+        }
+    }
+
+    @Test
+    public void testGetOrchestrationRequest() {
+        String p = props.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQ);
+        String path = p + "/" + SAMPLE_REQUEST_ID;
+
+        try(MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+            server,
+            path,
+            HttpStatus.OK_200,
+            CREATE_INSTANCE_RESPONSE_STR,CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executeGet(msoRestClient()::getOrchestrationRequest);
+        }
+    }
+
+    @Test
+    public void testGetManualTasks() {
+        String p = props.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQ);
+        String path = p + "/" + UUID.randomUUID();
+
+        try(MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+            server,
+            path,
+            HttpStatus.OK_200,
+            CREATE_INSTANCE_RESPONSE_STR,CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executeGet(msoRestClient()::getManualTasks);
+        }
+    }
+
+    @Test
+    public void testGetOrchestrationRequestsForDashboard() throws Exception {
+        MsoRestClientNew testSubject;
+        String t = "";
+        String sourceId = "";
+        String endpoint = "";
+        RestObject restObject = null;
+        MsoResponseWrapper result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getOrchestrationRequestsForDashboard(t, sourceId, endpoint, restObject);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetManualTasksByRequestId() throws Exception {
+        MsoRestClientNew testSubject;
+        String t = "";
+        String sourceId = "";
+        String endpoint = "";
+        RestObject restObject = null;
+        MsoResponseWrapper result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getManualTasksByRequestId(t, sourceId, endpoint, restObject);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testCompleteManualTask() throws Exception {
+        MsoRestClientNew testSubject;
+        RequestDetails requestDetails = null;
+        String t = "";
+        String sourceId = "";
+        String endpoint = "";
+        RestObject restObject = null;
+        MsoResponseWrapper result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.completeManualTask(requestDetails, t, sourceId, endpoint, restObject);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testDeleteConfiguration() throws Exception {
+        MsoRestClientNew testSubject;
+        RequestDetailsWrapper requestDetails = null;
+        String pmc_endpoint = "";
+        MsoResponseWrapper result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.deleteConfiguration(requestDetails, pmc_endpoint);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testSetConfigurationActiveStatus() throws Exception {
+        String endpoint = "/serviceInstances/v5/<service_instance_id>/configurations/<configuration_id>";
+        endpoint = endpoint.replace(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        endpoint = endpoint.replace(MsoController.CONFIGURATION_ID, SAMPLE_CONFIGURATION_ID);
+        endpoint = endpoint + "/activate";
+
+        try(MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+            server,
+            endpoint,
+            HttpStatus.ACCEPTED_202,
+            CREATE_INSTANCE_RESPONSE_STR,CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executePost(msoCreateServiceInstanceJson, msoRestClient()::setConfigurationActiveStatus);
+        }
+    }
+
+    @Test
+    public void testSetPortOnConfigurationStatus() throws Exception {
+        MsoRestClientNew testSubject;
+        RequestDetails request = null;
+        String path = "";
+        MsoResponseWrapper result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.setPortOnConfigurationStatus(request, path);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testChangeManagementUpdate() throws Exception {
+        MsoRestClientNew testSubject;
+        RequestDetailsWrapper requestDetails = null;
+        String endpoint = "";
+        MsoResponseWrapperInterface result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.changeManagementUpdate(requestDetails, endpoint);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testSetServiceInstanceStatus() throws Exception {
+        MsoRestClientNew testSubject;
+        RequestDetails requestDetails = null;
+        String t = "";
+        String sourceId = "";
+        String endpoint = "";
+        RestObject<String> restObject = null;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            testSubject.setServiceInstanceStatus(requestDetails, t, sourceId, endpoint, restObject);
+        } catch (Exception e) {
+        }
+    }
+
+    @Test
+    public void testRemoveRelationshipFromServiceInstance() throws Exception {
+        String serviceEndpoint = props.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        String removeRelationshipsPath = serviceEndpoint + "/" + SERVICE_INSTANCE_ID + "/removeRelationships";
+
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                removeRelationshipsPath,
+                HttpStatus.ACCEPTED_202,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executePost(msoCreateServiceInstanceJson, msoRestClient()::removeRelationshipFromServiceInstance);
+        }
+    }
+
+    @Test
+    public void testAddRelationshipToServiceInstance() throws Exception {
+        MsoRestClientNew testSubject;
+        RequestDetails requestDetails = null;
+        String addRelationshipsPath = "";
+        MsoResponseWrapper result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.addRelationshipToServiceInstance(requestDetails, addRelationshipsPath);
+        } catch (Exception e) {
+        }
+    }
+    @Test
+    public void testScaleOutVfModule() throws IOException {
+        String serviceEndpoint = props.getProperty(MsoProperties.MSO_REST_API_VF_MODULE_SCALE_OUT);
+        String partial_endpoint = serviceEndpoint.replaceFirst(SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
+        String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
+        try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
+                server,
+                vf_module_endpoint,
+                HttpStatus.ACCEPTED_202,
+                CREATE_INSTANCE_RESPONSE_STR, CREATE_INSTANCE_RESPONSE_STR)) {
+            closure.executePostCall(msoScaleOutVfModule, msoRestClient()::scaleOutVFModuleInstance);
+        }
+
+    }
+
+    private MsoRestClientNew msoRestClient() {
+        return new MsoRestClientNew(new SyncRestClient(MsoInterface.objectMapper()), baseUrl());
+    }
+
+    private MsoRestClientNew createTestSubject() {
+        return new MsoRestClientNew(null, "");
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientTest.java
new file mode 100644
index 0000000..ffe65cc
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientTest.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.json.JSONObject;
+import org.junit.Assert;
+import org.onap.osam.client.SyncRestClient;
+import org.onap.osam.domain.mso.CloudConfiguration;
+import org.onap.osam.domain.mso.ModelInfo;
+import org.onap.osam.domain.mso.RequestInfo;
+import org.onap.osam.domain.mso.RequestParameters;
+import org.onap.osam.mso.MsoBusinessLogic;
+import org.onap.osam.mso.MsoBusinessLogicImpl;
+import org.onap.osam.controllers.LocalWebConfig;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.testng.annotations.Test;
+
+
+@ContextConfiguration(classes = {LocalWebConfig.class, SystemProperties.class})
+@WebAppConfiguration
+public class MsoRestClientTest {
+
+
+    private MsoBusinessLogic msoBusinessLogic = new MsoBusinessLogicImpl(new MsoRestClientNew(new SyncRestClient(), ""), null);
+    private ObjectMapper om = new ObjectMapper();
+
+    @Test
+    public void createInPlaceMsoRequest() {
+        String result = null;
+        try {
+            RequestDetails requestDetails = generateMockMsoRequest();
+            result = om.writeValueAsString(msoBusinessLogic.generateInPlaceMsoRequest(requestDetails));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (result == null) {
+            Assert.fail("Failed to create mso request");
+        }
+        JSONObject jsonObj = new JSONObject(result);
+        Assert.assertNotNull(jsonObj.getJSONObject("requestDetails"));
+    }
+
+    private RequestDetails generateMockMsoRequest() {
+        RequestDetails requestDetails = new RequestDetails();
+        //requestDetails.setVnfInstanceId("vnf-instance-id");
+        //requestDetails.setVnfName("vnf-name");
+        CloudConfiguration cloudConfiguration = new CloudConfiguration();
+        cloudConfiguration.setTenantId("tenant-id");
+        cloudConfiguration.setLcpCloudRegionId("lcp-region");
+        requestDetails.setCloudConfiguration(cloudConfiguration);
+        ModelInfo modelInfo = new ModelInfo();
+        modelInfo.setModelInvariantId("model-invarient-id");
+        modelInfo.setModelCustomizationName("modelCustomizationName");
+        requestDetails.setModelInfo(modelInfo);
+        RequestInfo requestInfo = new RequestInfo();
+        requestInfo.setRequestorId("ok883e");
+        requestInfo.setSource("VID");
+        requestDetails.setRequestInfo(requestInfo);
+        RequestParameters requestParameters = new RequestParameters();
+        requestParameters.setSubscriptionServiceType("subscriber-service-type");
+        requestParameters.setAdditionalProperty("a", 1);
+        requestParameters.setAdditionalProperty("b", 2);
+        requestParameters.setAdditionalProperty("c", 3);
+        requestParameters.setAdditionalProperty("d", 4);
+        String payload = "{\"existing_software_version\": \"3.1\",\"new_software_version\": \"3.2\", \"operations_timeout\": \"3600\"}";
+        requestParameters.setAdditionalProperty("payload", payload);
+
+        requestDetails.setRequestParameters(requestParameters);
+        return requestDetails;
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientTestUtil.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientTestUtil.java
new file mode 100644
index 0000000..1066be4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/MsoRestClientTestUtil.java
@@ -0,0 +1,146 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp;
+import static com.xebialabs.restito.builder.verify.VerifyHttp.verifyHttp;
+import static com.xebialabs.restito.semantics.Action.contentType;
+import static com.xebialabs.restito.semantics.Action.status;
+import static com.xebialabs.restito.semantics.Action.stringContent;
+import static com.xebialabs.restito.semantics.Condition.delete;
+import static com.xebialabs.restito.semantics.Condition.get;
+import static com.xebialabs.restito.semantics.Condition.method;
+import static com.xebialabs.restito.semantics.Condition.post;
+import static com.xebialabs.restito.semantics.Condition.uri;
+import static com.xebialabs.restito.semantics.Condition.withHeader;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.xebialabs.restito.semantics.Action;
+import com.xebialabs.restito.server.StubServer;
+import java.io.IOException;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+
+import org.glassfish.grizzly.http.Method;
+import org.glassfish.grizzly.http.util.HttpStatus;
+import org.json.JSONObject;
+import org.junit.Assert;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.osam.mso.MsoResponseWrapper;
+
+class MsoRestClientTestUtil implements AutoCloseable {
+  private final StubServer server;
+  private final String endpoint;
+  private final String responsePayload;
+  private final HttpStatus expectedStatus;
+  private final String expectedResponseStr;
+
+  MsoRestClientTestUtil(StubServer server, String endpoint, HttpStatus expectedStatus,
+      String responsePayload,
+      String expectedResponseStr) {
+    this.server = server;
+    this.endpoint = endpoint;
+    this.responsePayload = responsePayload;
+    this.expectedStatus = expectedStatus;
+    this.expectedResponseStr = expectedResponseStr;
+  }
+
+  void executePost(String jsonPayload, BiFunction<RequestDetails, String, MsoResponseWrapper> func) throws IOException {
+    whenHttp(server)
+        .match(post(endpoint))
+        .then(status(expectedStatus), jsonContent(responsePayload), contentType(MediaType.APPLICATION_JSON));
+
+    RequestDetails sampleRequestDetails =
+        new ObjectMapper().readValue(jsonPayload, RequestDetails.class);
+
+    MsoResponseWrapper response = func.apply(sampleRequestDetails, endpoint);
+    JSONObject actualJson = new JSONObject(response.getEntity());
+
+    Assert.assertEquals(expectedStatus.getStatusCode(), response.getStatus());
+    Assert.assertEquals(expectedResponseStr, actualJson.toString());
+    verifyServer(server, endpoint, Method.POST);
+
+  }
+  void executePostCall(String jsonPayload, BiFunction<RequestDetailsWrapper, String, MsoResponseWrapper> func) throws IOException {
+    whenHttp(server)
+            .match(post(endpoint))
+            .then(status(expectedStatus), jsonContent(responsePayload), contentType(MediaType.APPLICATION_JSON));
+
+    RequestDetailsWrapper  sampleRequestDetails =
+            new ObjectMapper().readValue(jsonPayload, RequestDetailsWrapper.class);
+
+    MsoResponseWrapper response = func.apply(sampleRequestDetails, endpoint);
+    JSONObject actualJson = new JSONObject(response.getEntity());
+
+    Assert.assertEquals(expectedStatus.getStatusCode(), response.getStatus());
+    Assert.assertEquals(expectedResponseStr, actualJson.toString());
+    verifyServer(server, endpoint, Method.POST);
+  }
+
+  void executeDelete(String jsonPayload, BiFunction<RequestDetails, String, MsoResponseWrapper> func)
+      throws IOException {
+    whenHttp(server)
+        .match(delete(endpoint))
+        .then(status(expectedStatus), jsonContent(responsePayload), contentType(MediaType.APPLICATION_JSON));
+
+    RequestDetails sampleRequestDetails =
+        new ObjectMapper().readValue(jsonPayload, RequestDetails.class);
+    MsoResponseWrapper response = func.apply(sampleRequestDetails, endpoint);
+
+    Assert.assertEquals(expectedStatus.getStatusCode(), response.getStatus());
+    verifyServer(server, endpoint, Method.DELETE);
+  }
+
+  void executeGet(Function<String, MsoResponseWrapper> func) {
+    whenHttp(server)
+        .match(get(endpoint))
+        .then(status(expectedStatus), jsonContent(responsePayload), contentType(MediaType.APPLICATION_JSON));
+
+    MsoResponseWrapper response = func.apply(endpoint);
+
+    Assert.assertEquals(expectedStatus.getStatusCode(), response.getStatus());
+    verifyServer(server, endpoint, Method.GET);
+  }
+
+  private void verifyServer(StubServer server, String endpoint, Method httpMethod) {
+    verifyHttp(server).once(
+        method(httpMethod),
+        uri(endpoint),
+        withHeader(HttpHeaders.AUTHORIZATION),
+        withHeader(HttpHeaders.ACCEPT),
+        withHeader(HttpHeaders.CONTENT_TYPE),
+        withHeader(MsoRestClientNew.X_FROM_APP_ID),
+        withHeader(SystemProperties.ECOMP_REQUEST_ID));
+  }
+
+  private Action jsonContent(String str) {
+    return stringContent(str);
+  }
+
+  @Override
+  public void close() {
+  }
+}
+
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/OutgoingRequestIdTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/OutgoingRequestIdTest.java
new file mode 100644
index 0000000..5c42a31
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/OutgoingRequestIdTest.java
@@ -0,0 +1,212 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import com.google.common.collect.ImmutableList;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.osam.aai.util.AAIRestInterface;
+import org.onap.osam.filters.PromiseEcompRequestIdFilter;
+import org.onap.osam.mso.RestMsoImplementation;
+import org.onap.osam.mso.RestObject;
+import org.onap.osam.testUtils.TestUtils;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.core.MultivaluedMap;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.equalToIgnoringCase;
+import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.Matchers.hasToString;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.hamcrest.Matchers.matchesPattern;
+
+
+public class OutgoingRequestIdTest {
+
+
+    @InjectMocks
+    private RestMsoImplementation restMsoImplementation;
+
+    @InjectMocks
+    private AAIRestInterface aaiRestInterface;
+
+
+    @Captor
+    private ArgumentCaptor<MultivaluedMap<String, Object>> multivaluedMapArgumentCaptor;
+
+    @BeforeClass
+    public void initMocks() {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @BeforeMethod
+    private void putRequestInSpringContext() {
+        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes((HttpServletRequest) PromiseEcompRequestIdFilter.wrapIfNeeded(new MockHttpServletRequest())));
+    }
+
+    @DataProvider
+    public Object[][] msoMethods() {
+        return Stream.<ThrowingConsumer<RestMsoImplementation>>of(
+
+                client -> client.Get(new Object(), "whatever source id", "/any path", new RestObject<>()),
+                client -> client.GetForObject("whatever source id", "/any path", Object.class),
+                client -> client.Post(new Object(), "some payload", "whatever source id", "/any path", new RestObject<>()),
+                client -> client.PostForObject("some payload", "whatever source id", "/any path", Object.class),
+                client -> client.Put(Object.class, new RequestDetailsWrapper(), "whatever source id", "/any path", new RestObject<>())
+
+        ).map(l -> ImmutableList.of(l).toArray()).collect(Collectors.toList()).toArray(new Object[][]{});
+    }
+
+    @Test(dataProvider = "msoMethods")
+    public void mso(Consumer<RestMsoImplementation> f) throws Exception {
+        final TestUtils.JavaxRsClientMocks mocks = setAndGetMocksInsideRestImpl(restMsoImplementation);
+
+        f.accept(restMsoImplementation);
+
+        verifyRequestIdHeaderWasAdded(mocks.getFakeBuilder());
+    }
+
+    @DataProvider
+    public Object[][] aaiMethods() {
+        return Stream.<ThrowingConsumer<AAIRestInterface>>of(
+
+                client -> client.RestGet("from app id", "some transId", "/any path", false),
+                client -> client.Delete("whatever source id", "some transId", "/any path"),
+                client -> client.RestPost("from app id", "/any path", "some payload", false),
+                client -> client.RestPut("from app id", "/any path", "some payload", false)
+
+        ).map(l -> ImmutableList.of(l).toArray()).collect(Collectors.toList()).toArray(new Object[][]{});
+    }
+
+    //@Test(dataProvider = "aaiMethods")
+    public void aai(Consumer<AAIRestInterface> f) throws Exception {
+        final TestUtils.JavaxRsClientMocks mocks = setAndGetMocksInsideRestImpl(aaiRestInterface);
+
+        f.accept(aaiRestInterface);
+
+        verifyRequestIdHeaderWasAdded(mocks.getFakeBuilder());
+    }
+
+//    @Test(dataProvider = "schedulerMethods")
+//    public void scheduler(Consumer<AAIRestInterface> f) throws Exception {
+//
+//        This test os not feasible in the wat acheduler is implemented today,
+//        as Scheduler's client is rewritten in every call.
+//
+//        :-(
+//
+//    }
+
+    private void verifyRequestIdHeaderWasAdded(Invocation.Builder fakeBuilder) {
+        final String requestIdHeader = "x-ecomp-requestid";
+        final String uuidRegex = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
+
+        // Checks that the builder was called with either one of header("x-ecomp-requestid", uuid)
+        // or the plural brother: headers(Map.of("x-ecomp-requestid", Set.of(uuid))
+
+        Object requestId;
+        // The 'verify()' will capture the request id. If no match -- AssertionError will
+        // catch for a second chance -- another 'verify()'.
+        try {
+            ArgumentCaptor<Object> argumentCaptor = ArgumentCaptor.forClass(Object.class);
+            Mockito.verify(fakeBuilder)
+                    .header(
+                            Matchers.argThat(equalToIgnoringCase(requestIdHeader)),
+                            argumentCaptor.capture()
+                    );
+            requestId = argumentCaptor.getValue();
+
+        } catch (AssertionError e) {
+            Mockito.verify(fakeBuilder).headers(multivaluedMapArgumentCaptor.capture());
+
+            final MultivaluedMap<String, Object> headersMap = multivaluedMapArgumentCaptor.getValue();
+            final String thisRequestIdHeader = getFromSetCaseInsensitive(headersMap.keySet(), requestIdHeader);
+
+            assertThat(headersMap.keySet(), hasItem(thisRequestIdHeader));
+            requestId = headersMap.getFirst(thisRequestIdHeader);
+        }
+
+        assertThat("header '" + requestIdHeader + "' should be a uuid", requestId,
+                allOf(instanceOf(String.class), hasToString(matchesPattern(uuidRegex))));
+    }
+
+    private String getFromSetCaseInsensitive(Set<String> set, String key) {
+        return set.stream()
+                .filter(anotherString -> anotherString.equalsIgnoreCase(key))
+                .findFirst()
+                .orElse(key);
+    }
+
+    private TestUtils.JavaxRsClientMocks setAndGetMocksInsideRestImpl(Class<?> clazz) throws IllegalAccessException {
+        TestUtils.JavaxRsClientMocks mocks = new TestUtils.JavaxRsClientMocks();
+        Client fakeClient = mocks.getFakeClient();
+
+        FieldUtils.writeStaticField(clazz, "client", fakeClient, true);
+
+        return mocks;
+    }
+
+    private TestUtils.JavaxRsClientMocks setAndGetMocksInsideRestImpl(Object instance) throws IllegalAccessException {
+        TestUtils.JavaxRsClientMocks mocks = new TestUtils.JavaxRsClientMocks();
+        Client fakeClient = mocks.getFakeClient();
+
+        FieldUtils.writeField(instance, "client", fakeClient, true);
+
+        return mocks;
+    }
+
+    @FunctionalInterface
+    public interface ThrowingConsumer<T> extends Consumer<T> {
+        @Override
+        default void accept(T t) {
+            try {
+                acceptThrows(t);
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        void acceptThrows(T t) throws Exception;
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RelatedInstanceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RelatedInstanceTest.java
new file mode 100644
index 0000000..63f4bca
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RelatedInstanceTest.java
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.osam.domain.mso.ModelInfo;
+
+
+public class RelatedInstanceTest {
+
+	private RelatedInstance createTestSubject() {
+		return new RelatedInstance();
+	}
+
+	
+	@Test
+	public void testGetModelInfo() throws Exception {
+		RelatedInstance testSubject;
+		ModelInfo result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getModelInfo();
+	}
+
+	
+	@Test
+	public void testSetModelInfo() throws Exception {
+		RelatedInstance testSubject;
+		ModelInfo modelInfo = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setModelInfo(modelInfo);
+	}
+
+	
+	@Test
+	public void testToString() throws Exception {
+		RelatedInstance testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.toString();
+	}
+
+	
+	@Test
+	public void testGetAdditionalProperties() throws Exception {
+		RelatedInstance testSubject;
+		Map<String, Object> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getAdditionalProperties();
+	}
+
+	
+	@Test
+	public void testSetAdditionalProperty() throws Exception {
+		RelatedInstance testSubject;
+		String name = "";
+		Object value = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setAdditionalProperty(name, value);
+	}
+
+	
+	@Test
+	public void testHashCode() throws Exception {
+		RelatedInstance testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.hashCode();
+	}
+
+	
+	@Test
+	public void testEquals() throws Exception {
+		RelatedInstance testSubject;
+		Object other = null;
+		boolean result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.equals(other);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RelatedModelTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RelatedModelTest.java
new file mode 100644
index 0000000..545d76a
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RelatedModelTest.java
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.osam.domain.mso.ModelInfo;
+
+
+public class RelatedModelTest {
+
+	private RelatedModel createTestSubject() {
+		return new RelatedModel();
+	}
+
+	
+	@Test
+	public void testGetModelInfo() throws Exception {
+		RelatedModel testSubject;
+		ModelInfo result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getModelInfo();
+	}
+
+	
+	@Test
+	public void testSetModelInfo() throws Exception {
+		RelatedModel testSubject;
+		ModelInfo modelInfo = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setModelInfo(modelInfo);
+	}
+
+	
+	@Test
+	public void testToString() throws Exception {
+		RelatedModel testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.toString();
+	}
+
+	
+	@Test
+	public void testGetAdditionalProperties() throws Exception {
+		RelatedModel testSubject;
+		Map<String, Object> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getAdditionalProperties();
+	}
+
+	
+	@Test
+	public void testSetAdditionalProperty() throws Exception {
+		RelatedModel testSubject;
+		String name = "";
+		Object value = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setAdditionalProperty(name, value);
+	}
+
+	
+	@Test
+	public void testHashCode() throws Exception {
+		RelatedModel testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.hashCode();
+	}
+
+	
+	@Test
+	public void testEquals() throws Exception {
+		RelatedModel testSubject;
+		Object other = null;
+		boolean result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.equals(other);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestDetailsTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestDetailsTest.java
new file mode 100644
index 0000000..696b2d5
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestDetailsTest.java
@@ -0,0 +1,204 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.osam.domain.mso.*;
+
+
+public class RequestDetailsTest {
+
+	private RequestDetails createTestSubject() {
+		return new RequestDetails();
+	}
+
+	
+	@Test
+	public void testGetCloudConfiguration() throws Exception {
+		RequestDetails testSubject;
+		CloudConfiguration result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getCloudConfiguration();
+	}
+
+	
+	@Test
+	public void testSetCloudConfiguration() throws Exception {
+		RequestDetails testSubject;
+		CloudConfiguration cloudConfiguration = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setCloudConfiguration(cloudConfiguration);
+	}
+
+	
+	@Test
+	public void testGetModelInfo() throws Exception {
+		RequestDetails testSubject;
+		ModelInfo result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getModelInfo();
+	}
+
+	
+	@Test
+	public void testSetModelInfo() throws Exception {
+		RequestDetails testSubject;
+		ModelInfo modelInfo = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setModelInfo(modelInfo);
+	}
+
+	
+	@Test
+	public void testGetRelatedInstanceList() throws Exception {
+		RequestDetails testSubject;
+		List<RelatedInstanceWrapper> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getRelatedInstanceList();
+	}
+
+	
+	@Test
+	public void testSetRelatedInstanceList() throws Exception {
+		RequestDetails testSubject;
+		List<RelatedInstanceWrapper> relatedInstanceList = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setRelatedInstanceList(relatedInstanceList);
+	}
+
+	
+	@Test
+	public void testGetRequestInfo() throws Exception {
+		RequestDetails testSubject;
+		RequestInfo result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getRequestInfo();
+	}
+
+	
+	@Test
+	public void testSetRequestInfo() throws Exception {
+		RequestDetails testSubject;
+		RequestInfo requestInfo = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setRequestInfo(requestInfo);
+	}
+
+	
+	@Test
+	public void testGetSubscriberInfo() throws Exception {
+		RequestDetails testSubject;
+		SubscriberInfo result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getSubscriberInfo();
+	}
+
+	
+	@Test
+	public void testSetSubscriberInfo() throws Exception {
+		RequestDetails testSubject;
+		SubscriberInfo subscriberInfo = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setSubscriberInfo(subscriberInfo);
+	}
+
+	
+	@Test
+	public void testToString() throws Exception {
+		RequestDetails testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.toString();
+	}
+
+	
+	@Test
+	public void testGetAdditionalProperties() throws Exception {
+		RequestDetails testSubject;
+		Map<String, Object> result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getAdditionalProperties();
+	}
+
+	
+	@Test
+	public void testSetAdditionalProperty() throws Exception {
+		RequestDetails testSubject;
+		String name = "";
+		Object value = null;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setAdditionalProperty(name, value);
+	}
+
+	
+	@Test
+	public void testHashCode() throws Exception {
+		RequestDetails testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.hashCode();
+	}
+
+	
+	@Test
+	public void testEquals() throws Exception {
+		RequestDetails testSubject;
+		Object other = null;
+		boolean result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.equals(other);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestListTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestListTest.java
new file mode 100644
index 0000000..0a1c109
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestListTest.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class RequestListTest {
+
+    private RequestList createTestSubject() {
+        return new RequestList();
+    }
+
+    @Test
+    public void testGetRequestList() throws Exception {
+        RequestList testSubject;
+        List<RequestWrapper> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestList();
+    }
+
+    @Test
+    public void testSetRequestList() throws Exception {
+        RequestList testSubject;
+        List<RequestWrapper> l = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestList(l);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        RequestList testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        RequestList testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        RequestList testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+
+    @Test
+    public void testHashCode() throws Exception {
+        RequestList testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.hashCode();
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        RequestList testSubject;
+        Object other = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.equals(other);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestTest.java
new file mode 100644
index 0000000..65b2433
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestTest.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import org.junit.Test;
+import org.onap.osam.domain.mso.InstanceIds;
+import org.onap.osam.domain.mso.RequestStatus;
+
+public class RequestTest {
+
+    private Request createTestSubject() {
+        return new Request();
+    }
+
+    @Test
+    public void testGetInstanceIds() throws Exception {
+        Request testSubject;
+        InstanceIds result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getInstanceIds();
+    }
+
+    @Test
+    public void testSetInstanceIds() throws Exception {
+        Request testSubject;
+        InstanceIds instanceIds = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setInstanceIds(instanceIds);
+    }
+
+    @Test
+    public void testGetRequestDetails() throws Exception {
+        Request testSubject;
+        RequestDetails result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestDetails();
+    }
+
+    @Test
+    public void testSetRequestDetails() throws Exception {
+        Request testSubject;
+        RequestDetails requestDetails = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestDetails(requestDetails);
+    }
+
+    @Test
+    public void testGetRequestStatus() throws Exception {
+        Request testSubject;
+        RequestStatus result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestStatus();
+    }
+
+    @Test
+    public void testSetRequestStatus() throws Exception {
+        Request testSubject;
+        RequestStatus requestStatus = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestStatus(requestStatus);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        Request testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        Request testSubject;
+        Object other = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.equals(other);
+    }
+
+    @Test
+    public void testHashCode() throws Exception {
+        Request testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.hashCode();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestWrapperTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestWrapperTest.java
new file mode 100644
index 0000000..b75a308
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/RequestWrapperTest.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import org.junit.Test;
+
+public class RequestWrapperTest {
+
+    private RequestWrapper createTestSubject() {
+        return new RequestWrapper();
+    }
+
+    @Test
+    public void testGetRequest() throws Exception {
+        RequestWrapper testSubject;
+        Request result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequest();
+    }
+
+    @Test
+    public void testSetRequest() throws Exception {
+        RequestWrapper testSubject;
+        Request request = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequest(request);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/ResponseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/ResponseTest.java
new file mode 100644
index 0000000..36f1cb8
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/ResponseTest.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import org.junit.Test;
+
+public class ResponseTest {
+
+    private Response createTestSubject() {
+        return new Response();
+    }
+
+    @Test
+    public void testGetStatus() throws Exception {
+        Response testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatus();
+    }
+
+    @Test
+    public void testSetStatus() throws Exception {
+        Response testSubject;
+        int status = 0;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setStatus(status);
+    }
+
+    @Test
+    public void testGetEntity() throws Exception {
+        Response testSubject;
+        RequestList result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getEntity();
+    }
+
+    @Test
+    public void testSetEntity() throws Exception {
+        Response testSubject;
+        RequestList entity = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setEntity(entity);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/TaskListTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/TaskListTest.java
new file mode 100644
index 0000000..92858b1
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/TaskListTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class TaskListTest {
+
+    private TaskList createTestSubject() {
+        return new TaskList();
+    }
+
+    @Test
+    public void testGetTaskList() throws Exception {
+        TaskList testSubject;
+        List<Task> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTaskList();
+    }
+
+    @Test
+    public void testSetTaskList() throws Exception {
+        TaskList testSubject;
+        List<Task> taskList = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setTaskList(taskList);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/TaskTest.java b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/TaskTest.java
new file mode 100644
index 0000000..71533c7
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/mso/rest/TaskTest.java
@@ -0,0 +1,274 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.mso.rest;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class TaskTest {
+
+    private Task createTestSubject() {
+        return new Task();
+    }
+
+    @Test
+    public void testGetTaskId() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTaskId();
+    }
+
+    @Test
+    public void testSetTaskId() throws Exception {
+        Task testSubject;
+        String taskId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setTaskId(taskId);
+    }
+
+    @Test
+    public void testGetType() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getType();
+    }
+
+    @Test
+    public void testSetType() throws Exception {
+        Task testSubject;
+        String type = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setType(type);
+    }
+
+    @Test
+    public void testGetNfRole() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getNfRole();
+    }
+
+    @Test
+    public void testSetNfRole() throws Exception {
+        Task testSubject;
+        String nfRole = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setNfRole(nfRole);
+    }
+
+    @Test
+    public void testGetSubscriptionServiceType() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSubscriptionServiceType();
+    }
+
+    @Test
+    public void testSetSubscriptionServiceType() throws Exception {
+        Task testSubject;
+        String subscriptionServiceType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setSubscriptionServiceType(subscriptionServiceType);
+    }
+
+    @Test
+    public void testGetOriginalRequestId() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOriginalRequestId();
+    }
+
+    @Test
+    public void testSetOriginalRequestId() throws Exception {
+        Task testSubject;
+        String originalRequestId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOriginalRequestId(originalRequestId);
+    }
+
+    @Test
+    public void testGetOriginalRequestorId() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOriginalRequestorId();
+    }
+
+    @Test
+    public void testSetOriginalRequestorId() throws Exception {
+        Task testSubject;
+        String originalRequestorId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOriginalRequestorId(originalRequestorId);
+    }
+
+    @Test
+    public void testGetErrorSource() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrorSource();
+    }
+
+    @Test
+    public void testSetErrorSource() throws Exception {
+        Task testSubject;
+        String errorSource = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrorSource(errorSource);
+    }
+
+    @Test
+    public void testGetErrorCode() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrorCode();
+    }
+
+    @Test
+    public void testSetErrorCode() throws Exception {
+        Task testSubject;
+        String errorCode = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrorCode(errorCode);
+    }
+
+    @Test
+    public void testGetErrorMessage() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrorMessage();
+    }
+
+    @Test
+    public void testSetErrorMessage() throws Exception {
+        Task testSubject;
+        String errorMessage = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrorMessage(errorMessage);
+    }
+
+    @Test
+    public void testGetBuildingBlockName() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getBuildingBlockName();
+    }
+
+    @Test
+    public void testSetBuildingBlockName() throws Exception {
+        Task testSubject;
+        String buildingBlockName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setBuildingBlockName(buildingBlockName);
+    }
+
+    @Test
+    public void testGetBuildingBlockStep() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getBuildingBlockStep();
+    }
+
+    @Test
+    public void testSetBuildingBlockStep() throws Exception {
+        Task testSubject;
+        String buildingBlockStep = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setBuildingBlockStep(buildingBlockStep);
+    }
+
+    @Test
+    public void testGetValidResponses() throws Exception {
+        Task testSubject;
+        List<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getValidResponses();
+    }
+
+    @Test
+    public void testSetValidResponses() throws Exception {
+        Task testSubject;
+        List<String> validResponses = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setValidResponses(validResponses);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyResponseWrapperTest.java b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyResponseWrapperTest.java
new file mode 100644
index 0000000..55a8201
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyResponseWrapperTest.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.junit.Test;
+
+public class PolicyResponseWrapperTest {
+
+	private PolicyResponseWrapper createTestSubject() {
+		return new PolicyResponseWrapper();
+	}
+
+	@Test
+	public void testGetEntity() throws Exception {
+		PolicyResponseWrapper testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getEntity();
+	}
+
+	@Test
+	public void testGetStatus() throws Exception {
+		PolicyResponseWrapper testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getStatus();
+	}
+
+	@Test
+	public void testSetStatus() throws Exception {
+		PolicyResponseWrapper testSubject;
+		int v = 0;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setStatus(v);
+	}
+
+	@Test
+	public void testSetEntity() throws Exception {
+		PolicyResponseWrapper testSubject;
+		String v = "";
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setEntity(v);
+	}
+
+	@Test
+	public void testToString() throws Exception {
+		PolicyResponseWrapper testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.toString();
+	}
+
+	@Test
+	public void testGetResponse() throws Exception {
+		PolicyResponseWrapper testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getResponse();
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestIntTest.java b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestIntTest.java
new file mode 100644
index 0000000..20a7da4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestIntTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.junit.Test;
+import org.onap.osam.policy.rest.RequestDetails;
+
+public class PolicyRestIntTest {
+
+	private PolicyRestInt createTestSubject() {
+		return new PolicyRestInt();
+	}
+
+	@Test
+	public void testLogRequest() throws Exception {
+		PolicyRestInt testSubject;
+		RequestDetails r = null;
+
+		// test 1
+		testSubject = createTestSubject();
+		r = null;
+		testSubject.logRequest(r);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestInterfaceFactoryTest.java b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestInterfaceFactoryTest.java
new file mode 100644
index 0000000..6f25540
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestInterfaceFactoryTest.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.junit.Test;
+
+public class PolicyRestInterfaceFactoryTest {
+
+    private PolicyRestInterfaceFactory createTestSubject() {
+        return new PolicyRestInterfaceFactory();
+    }
+
+    @Test
+    public void testGetInstance() throws Exception {
+        PolicyRestInterfaceIfc result;
+
+        // default test
+        result = PolicyRestInterfaceFactory.getInstance();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestInterfaceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestInterfaceTest.java
new file mode 100644
index 0000000..7b61e5d
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyRestInterfaceTest.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.junit.Test;
+import org.onap.osam.policy.rest.RequestDetails;
+
+public class PolicyRestInterfaceTest {
+
+    private PolicyRestInterface createTestSubject() {
+        return new PolicyRestInterface();
+    }
+
+    @Test
+    public void testLogRequest() throws Exception {
+        PolicyRestInterface testSubject;
+        RequestDetails r = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.logRequest(r);
+    }
+
+    /*@Test
+    public void testInitRestClient() throws Exception {
+        PolicyRestInterface testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.initRestClient();
+    }*/
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyUtilTest.java b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyUtilTest.java
new file mode 100644
index 0000000..3379e9b
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/policy/PolicyUtilTest.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PolicyUtilTest {
+
+	private PolicyUtil createTestSubject() {
+		return new PolicyUtil();
+	}
+
+	@Test
+	public void testWrapResponse() throws Exception {
+		String body = "";
+		int statusCode = 0;
+		PolicyResponseWrapper result;
+
+		// default test
+		result = PolicyUtil.wrapResponse(body, statusCode);
+	}
+
+
+	@Test
+	public void testWrapResponse_2() throws Exception {
+		RestObject<String> rs = null;
+		PolicyResponseWrapper result;
+
+		// test 1
+		rs = null;
+		result = PolicyUtil.wrapResponse(rs);
+		Assert.assertNotNull(result);
+	}
+
+	@Test
+	public void testConvertPojoToString() throws Exception {
+		String result;
+
+		// test 1
+		result = PolicyUtil.convertPojoToString(null);
+		Assert.assertEquals("", result);
+	}
+
+	@Test
+	public void testMain() throws Exception {
+		String[] args = new String[] { "" };
+
+		// default test
+		PolicyUtil.main(args);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/policy/RestObjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/policy/RestObjectTest.java
new file mode 100644
index 0000000..3d91f18
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/policy/RestObjectTest.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy;
+
+import org.junit.Test;
+
+public class RestObjectTest {
+
+	private RestObject createTestSubject() {
+		return new RestObject();
+	}
+
+	@Test
+	public void testSet() throws Exception {
+		RestObject testSubject;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.set(null);
+	}
+
+	@Test
+	public void testGet() throws Exception {
+		RestObject testSubject;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.get();
+	}
+
+	@Test
+	public void testSetStatusCode() throws Exception {
+		RestObject testSubject;
+		int v = 0;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setStatusCode(v);
+	}
+
+	@Test
+	public void testGetStatusCode() throws Exception {
+		RestObject testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getStatusCode();
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/policy/rest/RequestDetailsTest.java b/onap-enabler-be/src/test/java/org/onap/osam/policy/rest/RequestDetailsTest.java
new file mode 100644
index 0000000..78a8995
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/policy/rest/RequestDetailsTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.policy.rest;
+
+import org.junit.Test;
+
+
+public class RequestDetailsTest {
+
+	private RequestDetails createTestSubject() {
+		return new RequestDetails();
+	}
+
+
+	@Test
+	public void testGetPolicyName() throws Exception {
+		RequestDetails testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getPolicyName();
+	}
+
+
+	@Test
+	public void testSetPolicyName() throws Exception {
+		RequestDetails testSubject;
+		String policyName = "";
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setPolicyName(policyName);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/properties/VidPropertiesTest.java b/onap-enabler-be/src/test/java/org/onap/osam/properties/VidPropertiesTest.java
new file mode 100644
index 0000000..a0c726e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/properties/VidPropertiesTest.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.properties;
+
+import org.junit.Test;
+
+
+public class VidPropertiesTest {
+
+	private VidProperties createTestSubject() {
+		return new VidProperties();
+	}
+
+
+	@Test
+	public void testGetAsdcModelNamespace() throws Exception {
+		String result;
+
+		// default test
+		result = VidProperties.getAsdcModelNamespace();
+	}
+
+
+	@Test
+	public void testGetPropertyWithDefault() throws Exception {
+		String propName = "";
+		String defaultValue = "";
+		String result;
+
+		// default test
+		result = VidProperties.getPropertyWithDefault(propName, defaultValue);
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleProviderTest.java b/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleProviderTest.java
new file mode 100644
index 0000000..2272381
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleProviderTest.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.roles;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
+
+
+public class RoleProviderTest {
+
+	private RoleProvider createTestSubject() {
+		return new RoleProvider();
+	}
+
+	
+	@Test
+	public void testExtractRoleFromSession() throws Exception {
+		HttpServletRequest request = null;
+		List<String> result;
+
+		// default test
+		result = RoleProvider.extractRoleFromSession(request);
+	}
+
+	
+//	@Test
+//	public void testGetUserRoles() throws Exception {
+//		RoleProvider testSubject;
+//		HttpServletRequest request = null;
+//		List<Role> result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getUserRoles(request);
+//	}
+
+	
+	@Test
+	public void testSplitRole() throws Exception {
+		RoleProvider testSubject;
+		String roleAsString = "";
+		String[] result;
+
+		// default test
+		testSubject = createTestSubject();
+		//TODO:fix result = testSubject.splitRole(roleAsString);
+	}
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleTest.java b/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleTest.java
new file mode 100644
index 0000000..0d29853
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleTest.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.roles;
+
+import org.junit.Test;
+
+public class RoleTest {
+
+    private Role createTestSubject() {
+        return new Role(EcompRole.READ, "", "", "");
+    }
+
+    @Test
+    public void testGetEcompRole() throws Exception {
+        Role testSubject;
+        EcompRole result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getEcompRole();
+    }
+
+    @Test
+    public void testGetSubscribeName() throws Exception {
+        Role testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSubscribeName();
+    }
+
+    @Test
+    public void testSetSubscribeName() throws Exception {
+        Role testSubject;
+        String subscribeName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setSubscribeName(subscribeName);
+    }
+
+    @Test
+    public void testGetServiceType() throws Exception {
+        Role testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getServiceType();
+    }
+
+    @Test
+    public void testGetTenant() throws Exception {
+        Role testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTenant();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleValidatorTest.java b/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleValidatorTest.java
new file mode 100644
index 0000000..401af85
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/roles/RoleValidatorTest.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.roles;
+
+import org.junit.Test;
+import org.onap.osam.mso.rest.RequestDetails;
+
+public class RoleValidatorTest {
+
+    private RoleValidator createTestSubject() {
+        return new RoleValidator(null);
+    }
+
+    @Test
+    public void testIsMsoRequestValid() throws Exception {
+        RoleValidator testSubject;
+        RequestDetails mso_request = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.isMsoRequestValid(mso_request);
+    }
+
+    @Test
+    public void testIsServicePermitted() throws Exception {
+        RoleValidator testSubject;
+        String subscriberName = "";
+        String serviceType = "";
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.isServicePermitted(subscriberName, serviceType);
+    }
+
+    @Test
+    public void testIsSubscriberPermitted() throws Exception {
+        RoleValidator testSubject;
+        String subscriberName = "";
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.isSubscriberPermitted(subscriberName);
+    }
+
+    @Test
+    public void testIsTenantPermitted() throws Exception {
+        RoleValidator testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String tenantName = "";
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.isTenantPermitted(globalCustomerId, serviceType, tenantName);
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjectTest.java
new file mode 100644
index 0000000..41438e6
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjectTest.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler;
+
+import org.junit.Test;
+
+public class RestObjectTest {
+
+    private RestObject createTestSubject() {
+        return new RestObject();
+    }
+
+    @Test
+    public void testSet() throws Exception {
+        RestObject testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.set(null);
+    }
+
+    @Test
+    public void testGet() throws Exception {
+        RestObject testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.get();
+    }
+
+    @Test
+    public void testSetStatusCode() throws Exception {
+        RestObject testSubject;
+        int v = 0;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setStatusCode(v);
+    }
+
+    @Test
+    public void testGetStatusCode() throws Exception {
+        RestObject testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatusCode();
+    }
+
+    @Test
+    public void testSetUUID() throws Exception {
+        RestObject testSubject;
+        String uuid = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setUUID(uuid);
+    }
+
+    @Test
+    public void testGetUUID() throws Exception {
+        RestObject testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getUUID();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/GetTimeSlotsRestObjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/GetTimeSlotsRestObjectTest.java
new file mode 100644
index 0000000..f40a0e4
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/GetTimeSlotsRestObjectTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.vid.scheduler.RestObjects;
+//
+//import org.junit.Test;
+//
+//
+//public class GetTimeSlotsRestObjectTest {
+//
+//	private GetTimeSlotsRestObject createTestSubject() {
+//		return new GetTimeSlotsRestObject();
+//	}
+//
+//
+//	@Test
+//	public void testSetUUID() throws Exception {
+//		GetTimeSlotsRestObject testSubject;
+//		String uuid = "";
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setUUID(uuid);
+//	}
+//
+//
+//	@Test
+//	public void testGetUUID() throws Exception {
+//		GetTimeSlotsRestObject testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getUUID();
+//	}
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/PostCreateNewVnfRestObjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/PostCreateNewVnfRestObjectTest.java
new file mode 100644
index 0000000..24b472a
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/PostCreateNewVnfRestObjectTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.vid.scheduler.RestObjects;
+//
+//import org.junit.Test;
+//
+//
+//public class PostCreateNewVnfRestObjectTest {
+//
+//	private PostCreateNewVnfRestObject createTestSubject() {
+//		return new PostCreateNewVnfRestObject();
+//	}
+//
+//
+//	@Test
+//	public void testSetUUID() throws Exception {
+//		PostCreateNewVnfRestObject testSubject;
+//		String uuid = "";
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setUUID(uuid);
+//	}
+//
+//
+//	@Test
+//	public void testGetUUID() throws Exception {
+//		PostCreateNewVnfRestObject testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getUUID();
+//	}
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/PostSubmitVnfChangeRestObjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/PostSubmitVnfChangeRestObjectTest.java
new file mode 100644
index 0000000..04c3200
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/PostSubmitVnfChangeRestObjectTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.vid.scheduler.RestObjects;
+//
+//import org.junit.Test;
+//
+//
+//public class PostSubmitVnfChangeRestObjectTest {
+//
+//	private PostSubmitVnfChangeRestObject createTestSubject() {
+//		return new PostSubmitVnfChangeRestObject();
+//	}
+//
+//
+//	@Test
+//	public void testSetUUID() throws Exception {
+//		PostSubmitVnfChangeRestObject testSubject;
+//		String uuid = "";
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setUUID(uuid);
+//	}
+//
+//
+//	@Test
+//	public void testGetUUID() throws Exception {
+//		PostSubmitVnfChangeRestObject testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getUUID();
+//	}
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/RestObjectTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/RestObjectTest.java
new file mode 100644
index 0000000..4faa297
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/RestObjects/RestObjectTest.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler.RestObjects;
+
+import org.junit.Test;
+
+
+public class RestObjectTest {
+
+	private RestObject createTestSubject() {
+		return new RestObject();
+	}
+
+
+	@Test
+	public void testSet() throws Exception {
+		RestObject testSubject;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.set(null);
+	}
+
+
+	@Test
+	public void testGet() throws Exception {
+		RestObject testSubject;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.get();
+	}
+
+
+	@Test
+	public void testSetStatusCode() throws Exception {
+		RestObject testSubject;
+		int v = 0;
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setStatusCode(v);
+	}
+
+
+	@Test
+	public void testGetStatusCode() throws Exception {
+		RestObject testSubject;
+		int result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getStatusCode();
+	}
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java
new file mode 100644
index 0000000..20bd458
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.vid.scheduler.SchedulerResponseWrappers;
+//
+//import org.junit.Test;
+//
+//
+//public class PostCreateNewVnfWrapperTest {
+//
+//	private PostCreateNewVnfWrapper createTestSubject() {
+//		return new PostCreateNewVnfWrapper();
+//	}
+//
+//
+//	@Test
+//	public void testGetUuid() throws Exception {
+//		PostCreateNewVnfWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getUuid();
+//	}
+//
+//
+//	@Test
+//	public void testSetUuid() throws Exception {
+//		PostCreateNewVnfWrapper testSubject;
+//		String v = "";
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setUuid(v);
+//	}
+//
+//
+//	@Test
+//	public void testToString() throws Exception {
+//		PostCreateNewVnfWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.toString();
+//	}
+//
+//
+//	@Test
+//	public void testGetResponse() throws Exception {
+//		PostCreateNewVnfWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getResponse();
+//	}
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java
new file mode 100644
index 0000000..a8bfd3c
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.vid.scheduler.SchedulerResponseWrappers;
+//
+//import org.junit.Test;
+//
+//
+//public class PostSubmitVnfChangeTimeSlotsWrapperTest {
+//
+//	private PostSubmitVnfChangeTimeSlotsWrapper createTestSubject() {
+//		return new PostSubmitVnfChangeTimeSlotsWrapper();
+//	}
+//
+//
+//	@Test
+//	public void testGetUuid() throws Exception {
+//		PostSubmitVnfChangeTimeSlotsWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getUuid();
+//	}
+//
+//
+//	@Test
+//	public void testSetUuid() throws Exception {
+//		PostSubmitVnfChangeTimeSlotsWrapper testSubject;
+//		String v = "";
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setUuid(v);
+//	}
+//
+//
+//	@Test
+//	public void testToString() throws Exception {
+//		PostSubmitVnfChangeTimeSlotsWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.toString();
+//	}
+//
+//
+//	@Test
+//	public void testGetResponse() throws Exception {
+//		PostSubmitVnfChangeTimeSlotsWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getResponse();
+//	}
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java
new file mode 100644
index 0000000..b68570a
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.vid.scheduler.SchedulerResponseWrappers;
+//
+//import org.junit.Test;
+//
+//
+//public class SchedulerResponseWrapperTest {
+//
+//	private SchedulerResponseWrapper createTestSubject() {
+//		return new SchedulerResponseWrapper();
+//	}
+//
+//	
+//	@Test
+//	public void testGetEntity() throws Exception {
+//		SchedulerResponseWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getEntity();
+//	}
+//
+//	
+//	@Test
+//	public void testGetStatus() throws Exception {
+//		SchedulerResponseWrapper testSubject;
+//		int result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getStatus();
+//	}
+//
+//	
+//	@Test
+//	public void testSetStatus() throws Exception {
+//		SchedulerResponseWrapper testSubject;
+//		int v = 0;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setStatus(v);
+//	}
+//
+//	
+//	@Test
+//	public void testSetEntity() throws Exception {
+//		SchedulerResponseWrapper testSubject;
+//		String v = "";
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		testSubject.setEntity(v);
+//	}
+//
+//	
+//	@Test
+//	public void testToString() throws Exception {
+//		SchedulerResponseWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.toString();
+//	}
+//
+//	
+//	@Test
+//	public void testGetResponse() throws Exception {
+//		SchedulerResponseWrapper testSubject;
+//		String result;
+//
+//		// default test
+//		testSubject = createTestSubject();
+//		result = testSubject.getResponse();
+//	}
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerRestInterfaceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerRestInterfaceTest.java
new file mode 100644
index 0000000..23a4287
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/SchedulerRestInterfaceTest.java
@@ -0,0 +1,138 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.xebialabs.restito.semantics.Action;
+import org.glassfish.grizzly.http.util.HttpStatus;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.onap.osam.testUtils.StubServerUtil;
+import org.testng.annotations.AfterMethod;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+
+
+@RunWith(MockitoJUnitRunner.class)
+public class SchedulerRestInterfaceTest {
+
+    private static final String SAMPLE_USERNAME = "sample";
+    private static final String SAMPLE_PASSWORD = "paS$w0Rd";
+    private static final String SAMPLE_SCHEDULER_SERVER_URL = "http://localhost";
+    private static final String SAMPLE_SOURCE_ID = "AAI";
+    private static final JSONParser JSON_PARSER = new JSONParser();
+    private static final String RESPONSE_CONTENT = "\"schedules\": \"SAMPLE STRING\"";
+    private static final String ERROR_RESPONSE = "\"error\": \"Internal server error!\"";
+    private static Map<String, String> DUMMY_SYSTEM_PROPERTIES = new HashMap<String, String>() {{
+        put(SchedulerProperties.SCHEDULER_USER_NAME_VAL, SAMPLE_USERNAME);
+        put(SchedulerProperties.SCHEDULER_PASSWORD_VAL, SAMPLE_PASSWORD);
+        put(SchedulerProperties.SCHEDULER_SERVER_URL_VAL, SAMPLE_SCHEDULER_SERVER_URL);
+    }};
+    private static StubServerUtil serverUtil;
+    private static SchedulerRestInterface schedulerInterface = new SchedulerRestInterface((key) -> DUMMY_SYSTEM_PROPERTIES.get(key));
+
+    @BeforeClass
+    public static void setUpClass() {
+        serverUtil = new StubServerUtil();
+        serverUtil.runServer();
+    }
+
+    @AfterClass
+    public static void tearDownClass() {
+        serverUtil.stopServer();
+    }
+
+
+    @AfterMethod
+    public void tearDown() {
+        serverUtil.stopServer();
+    }
+
+    @Test
+    public void testShouldGetOKWhenStringIsExpected() throws JsonProcessingException, ParseException {
+        prepareEnvForTest();
+        RestObject<String> sampleRestObj = new RestObject<>();
+        serverUtil.prepareGetCall("/test", RESPONSE_CONTENT, Action.ok());
+
+        schedulerInterface.Get("", SAMPLE_SOURCE_ID, "", sampleRestObj);
+
+        assertResponseHasExpectedBodyAndStatus(sampleRestObj, RESPONSE_CONTENT, 200);
+    }
+
+    @Test(expected = GenericUncheckedException.class)
+    public void shouldRaiseExceptionWhenErrorOccursDuringGet() throws JsonProcessingException {
+        prepareEnvForTest();
+        RestObject<String> sampleRestObj = new RestObject<>();
+
+        serverUtil.prepareGetCall("/test", ERROR_RESPONSE, Action.status(HttpStatus.INTERNAL_SERVER_ERROR_500));
+
+        schedulerInterface.Get("", SAMPLE_SOURCE_ID, "", sampleRestObj);
+    }
+
+    @Test
+    public void shouldDeleteResourceSuccessfully() throws JsonProcessingException, ParseException {
+        prepareEnvForTest();
+        RestObject<String> sampleRestObj = new RestObject<>();
+        serverUtil.prepareDeleteCall("/test", RESPONSE_CONTENT, Action.ok());
+
+        schedulerInterface.Delete("", SAMPLE_SOURCE_ID, "", sampleRestObj);
+
+        assertResponseHasExpectedBodyAndStatus(sampleRestObj, RESPONSE_CONTENT, 200);
+    }
+
+    @Test
+    public void shouldRaiseExceptionWhenErrorOccursDuringDelete() throws JsonProcessingException, ParseException {
+        prepareEnvForTest();
+        RestObject<String> sampleRestObj = new RestObject<>();
+        serverUtil.prepareDeleteCall("/test", ERROR_RESPONSE, Action.status(HttpStatus.INTERNAL_SERVER_ERROR_500));
+
+        schedulerInterface.Delete("", SAMPLE_SOURCE_ID, "", sampleRestObj);
+
+        assertResponseHasExpectedBodyAndStatus(sampleRestObj, ERROR_RESPONSE, 500);
+    }
+
+
+    private void assertResponseHasExpectedBodyAndStatus(RestObject<String> sampleRestObj, String expectedResponse, int expectedStatusCode) throws ParseException {
+        Object parsedResult = JSON_PARSER.parse(sampleRestObj.get());
+
+        assertThat(sampleRestObj.getStatusCode()).isEqualTo(expectedStatusCode);
+        assertThat(parsedResult).isInstanceOf(String.class).isEqualTo(expectedResponse);
+        assertThat(sampleRestObj.getUUID()).isNull();
+
+    }
+
+    private void prepareEnvForTest() {
+        String targetUrl = serverUtil.constructTargetUrl("http", "test");
+        DUMMY_SYSTEM_PROPERTIES.put(SchedulerProperties.SCHEDULER_SERVER_URL_VAL, targetUrl);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/scheduler/rest/RequestDetailsTest.java b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/rest/RequestDetailsTest.java
new file mode 100644
index 0000000..d82f1d9
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/scheduler/rest/RequestDetailsTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.scheduler.rest;
+
+import org.onap.osam.mso.rest.RequestDetails;
+
+
+public class RequestDetailsTest {
+
+	private RequestDetails createTestSubject() {
+		return new RequestDetails();
+	}
+
+
+	/*@Test
+	public void testGetDomain() throws Exception {
+		RequestDetails testSubject;
+		String result;
+
+		// default test
+		testSubject = createTestSubject();
+		result = testSubject.getDomain();
+	}
+
+
+	@Test
+	public void testSetDomain() throws Exception {
+		RequestDetails testSubject;
+		String domain = "";
+
+		// default test
+		testSubject = createTestSubject();
+		testSubject.setDomain(domain);
+	}*/
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/selenium/FirstClass.java b/onap-enabler-be/src/test/java/org/onap/osam/selenium/FirstClass.java
new file mode 100644
index 0000000..188d27d
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/selenium/FirstClass.java
@@ -0,0 +1,597 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.selenium;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.support.ui.Select;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import org.apache.log4j.Logger;
+import org.testng.Assert;
+
+public class FirstClass {
+	
+		WebElement loginButton;
+		
+		/** The eg. */
+		String eg;
+		
+		/** The login. */
+		WebElement login;
+		
+		/** The pwd. */
+		WebElement pwd;
+		
+		/** The log. */
+		Logger log;
+		
+		/** The errormessage. */
+		WebElement errormessage;
+		
+					
+		/** The driver. */
+		WebDriver driver=new FirefoxDriver();
+		
+		
+		
+		/** The config prop. */
+		private final Properties configProp = new Properties();
+		
+		
+		/**
+		 * Instantiates a new first class.
+		 */
+		private  FirstClass() {
+			// TODO Auto-generated constructor stub
+			//
+			try{
+			//	InputStream input =this.getClass().getClassLoader().getResourceAsStream("objectmap.properties");
+			//FileInputStream input1 = new FileInputStream("objectmap.properties");
+				
+			InputStream input =new FileInputStream("objectconfig.properties");
+			System.out.println("Read all properties from file");
+			configProp.load(input);
+			System.out.println("Read all properties from file completed");
+			}
+			catch(IOException e) {
+				
+				e.printStackTrace();
+			}
+		}
+		
+		
+		/*
+		
+		
+		@BeforeClass
+		public void setUp() {
+			System.out.println("*******************");
+			System.out.println("launching IE browser");
+			System.setProperty("webdriver.ie.driver", driverPath+"IEDriverServer.exe");
+			driver = new InternetExplorerDriver();
+			driver.findElement(By.className());
+			driver.manage().window().maximize();
+			
+
+			 login = driver.findElement(By.xpath("//input[@class='fn-ebz-text ng-pristine ng-valid']"));
+			 pwd = driver.findElement(By.xpath("//input[@class='span3 ng-pristine ng-valid']"));
+			 loginButton = driver.findElement(By.id("loginBtn"));
+		}
+		
+		
+	*/
+		/**
+		 * Sets the up.
+		 */
+		// TODO Auto-generated method stub
+		@BeforeClass
+		public void setUp()
+		{
+			
+						
+			//WebDriver driver=new FirefoxDriver();
+			
+			log = Logger.getLogger(FirstClass.class.getName());
+		
+		
+		
+		// Get url
+		driver.get(configProp.getProperty("baseURL"));
+		driver.manage().window().maximize();
+		
+		
+		 login = driver.findElement(By.xpath(configProp.getProperty("login")));
+		 
+		 pwd = driver.findElement(By.xpath(configProp.getProperty("pwd")));
+		 loginButton = driver.findElement(By.id(configProp.getProperty("loginButton")));
+		}
+		
+		
+		/**
+		 * Empty username password.
+		 */
+		@Test(priority=1)
+		public void emptyUsernamePassword()
+		{
+		
+			
+		//User Name and Password field is empty
+		log.info("-----VID-11 TC-8----Username and password empty");
+		loginButton.click();
+		errormessage=driver.findElement(By.xpath("//*[@id='errorInfo']/span"));
+		String errmsg= errormessage.getText();
+		//System.out.println("Error message is"+errmsg);
+		//String expected = "Invaild username or password, Please try again";
+		
+		//Assert.assertEquals(errmsg,expected);
+
+		Boolean str = driver.getPageSource().contains("Invalid username or password, Please try again");
+		System.out.println(driver.getPageSource().contains("Invalid username or password, Please try again"));
+		
+		if(str==true)
+		{
+			log.info("Error message validated");
+			log.info("VID-11 TC-8 PASSED");
+			
+		}else
+			log.error("Failed validation");
+		
+		}
+
+
+		
+		/**
+		 * Invalid user name.
+		 */
+		@Test(priority=2)
+		public void invalidUserName()
+		{
+		
+		log.info("-----VID-11 TC-6----Invalid Username and Valid Password");
+		
+		
+		login.sendKeys("xxx");
+		pwd.sendKeys("abc123");
+		loginButton.click();
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		String errmsg= errormessage.getText();
+		String expected = "Invalid username or password, Please try again";
+		Assert.assertEquals(errmsg,expected);
+		//Boolean str1 = driver.getPageSource().contains("Invalid username or password, Please try again");
+		//System.out.print(str1);
+		
+		log.info("VID-11 TC-6 PASSED");
+				
+		}
+		
+		
+		/**
+		 * Invalid password.
+		 */
+		@Test(priority=3)
+		public void invalidPassword()
+		{
+		log.info("-----VID-11 TC-7----Valid Username and Invalid Password");
+		//  Valid user name and Invalid password.
+				login.clear();
+				pwd.clear();
+				login.sendKeys("testuser");
+				pwd.sendKeys("xxx");
+				loginButton.click();
+				driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+				
+				String errmsg= errormessage.getText();
+				String expected = "Invalid username or password, Please try again";
+				Assert.assertEquals(errmsg,expected);
+				
+				//Boolean str2 = driver.getPageSource().contains("Invaild username or password, Please try again");
+				//System.out.print(str2);
+				
+				log.info("VID-11 TC-7 PASSED");
+		}
+		
+			
+		/**
+		 * Login successful.
+		 */
+		@Test(priority=4)
+		public void loginSuccessful()
+		{
+		log.info("-----VID-11 TC-1----Valid Username and Valid Password");
+		//Login with valid user name and password.
+		login.clear();
+		login.sendKeys("su");
+		pwd.clear();
+		pwd.sendKeys("fusion");
+		
+				
+		loginButton.click();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		try {
+			Thread.sleep(6000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		Assert.assertTrue(driver.getPageSource().contains("Search Existing Service Instances"));
+		log.info("VID-11 TC-1 PASSED");
+		
+		}
+		
+		
+		/**
+		 * Verify home page elements left pane.
+		 */
+		@Test(priority=5)
+		public void verifyHomePageElementsLeftPane()
+		
+		{
+			
+			
+			log.info("VID-10 TC 1 ");
+			//VID Home
+			log.info("VID 11 TC-2");
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[1]/a/span")).isDisplayed();
+			//Create New Service Instance
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[2]/a/span")).isDisplayed();
+			
+			//Browse Service Type
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[3]/a/span")).isDisplayed();
+			//View Log		
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[4]/a/span")).isDisplayed();
+			
+			//Profile
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[5]/a/span")).isDisplayed();
+			//Admin
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[6]/a/span")).isDisplayed();
+			//Logout
+			driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[7]/a/span")).isDisplayed();
+			
+			//Infrastructure Subscriber Name
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[1]/div/label")).isDisplayed();
+			//Infrastructure Subscriber Name Select Drop down
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select")).isDisplayed();
+			//Infrastructure Service Type
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[1]/div/label")).isDisplayed();
+			//Infrastructure Service Type Select Drop down
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select")).isDisplayed();
+			//Submit button 
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[3]/td/div/button")).isDisplayed();
+			
+			//Login Snippet Icon
+			driver.findElement(By.xpath(".//*[@class='icon-user-small login-snippet-icon']")).isDisplayed();
+			
+			
+			//String bodyText = driver.findElement(By.tagName("body")).getText();
+			//Assert.assertTrue("Text not found!", bodyText.contains("Search Existing Service Instances"));
+			//Assert.IsTrue(driver.getPageSource.Contains("Search Existing Service Instances"));
+			 
+			log.info("VID-12 TC-1");
+			Assert.assertTrue(driver.getPageSource().contains("Search Existing Service Instances"));
+			Assert.assertTrue(driver.getPageSource().contains("Please search by the Subscriber name or Service Type from below:"));
+			log.info("VID-12 TC-1 PASSED");
+			log.info("VID-10 TC 1 PASSED");
+			log.info("VID-11 TC-2 PASSED");
+		}
+		
+		
+		/**
+		 * Disabled submit button.
+		 */
+		@Test(priority=6)
+		public void disabledSubmitButton()
+		{
+			log.info("VID-12 TC-13");
+			//Assert submit button disabled.
+			Assert.assertFalse(driver.findElement(By.xpath(configProp.getProperty("submitButton"))).isEnabled());
+			log.info("VID-12 TC-13 PASSED");
+
+		} 
+		
+		/**
+		 * Default list box value.
+		 */
+		@Test(priority=7)
+		public void defaultListBoxValue()
+		{
+			log.info("VID-12 TC-2");
+			
+			
+			//WebElement subscribername =driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select"));
+			
+			Select oSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown"))));
+			Select iSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("serviceTypeDropDown"))));
+			
+			
+			WebElement ielement=iSelect.getFirstSelectedOption();
+			WebElement oelement=oSelect.getFirstSelectedOption();
+			String defaultsubscribername=oelement.getText();
+			String defaultservicetype=ielement.getText();
+			
+			Assert.assertEquals(defaultsubscribername,"Select Subscriber Name");
+			Assert.assertEquals(defaultservicetype,"Select Service Type");
+			
+		
+			
+			
+		//Verify Select Subscriber Name isDisplayed.
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select/option[1]")).isSelected();
+				
+		//Verify Select Service Type isDisplayed.	
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select/option[1]")).isSelected();
+			
+			
+			log.info("VID-12 TC-2 PASSED");
+
+		}
+
+
+		
+		/**
+		 * Select subscriber name drop down.
+		 *
+		 * @throws InterruptedException the interrupted exception
+		 */
+		@Test(priority=8)
+		public void selectSubscriberNameDropDown() throws InterruptedException
+		{
+			log.info("------------------VID-10 TC-2,VID-12 TC-11, VID-12 TC-9, VID 12 TC-10,VID-12 TC-6, VID 12 TC-5--------------------");
+			
+			
+			driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown")));
+			
+			driver.findElement(By.xpath(configProp.getProperty("serviceTypeDropDown")));
+			Thread.sleep(5000);
+			
+			//Infrastructure Subscriber Name
+			Select oSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown"))));
+			
+			List <WebElement> elementCount = oSelect.getOptions();
+			log.info("Select Element Count of Service Name");
+			System.out.println(elementCount.size());
+			
+			
+			//Verifying getInfrastructureSubscribersList
+			log.info("VID-29 TC-1");
+			Assert.assertTrue(elementCount.size()>0);
+			log.info("VID-29 TC-1 PASSED");
+			
+			oSelect.selectByIndex(2);
+			String selectedOption = new Select(driver.findElement(By.xpath(configProp.getProperty("subscriberNameDropDown")))).getFirstSelectedOption().getText();
+
+			System.out.println("Service Name selected is " +selectedOption);
+			log.info("VID-10 TC-2 PASSED");
+					
+			//Submit button is clicked
+			driver.findElement(By.xpath(configProp.getProperty("submitButton"))).click();
+			
+			
+			//Verify whether the page header is displayed "Selected Subscriber's Service Instance Details:"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/h1")).isDisplayed();
+			//Assert.assertTrue(driver.getPageSource().contains("Selected Subscriber's Service Instance Details:"))
+			
+			
+			//Verify whether the page header is displayed "Global Customer ID"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/div/table/thead/tr/th[2]/div")).isDisplayed();
+			Assert.assertTrue(driver.getPageSource().contains("Global Customer ID"));
+			Assert.assertTrue(driver.getPageSource().contains("Subscriber Name"));
+			Assert.assertTrue(driver.getPageSource().contains("Service Type"));
+			Assert.assertTrue(driver.getPageSource().contains("Service Instance ID"));
+			
+			log.info("VID-12 TC-5 PASSED");
+			log.info("VID-12 TC-11 PASSED");
+			
+			WebElement serviceinstancetable =driver.findElement(By.xpath("//table[@class='tablesorter tablesorter-default ng-isolate-scope']"));
+			
+			List<WebElement> rows_table = serviceinstancetable.findElements(By.tagName("tr"));
+			  //To calculate no of rows In table.
+			  int rows_count = rows_table.size();
+			  
+			  //Loop will execute till the last row of table.
+			  for (int row=0; row<rows_count; row++){
+			   //To locate columns(cells) of that specific row.
+			   List<WebElement> Columns_row = rows_table.get(row).findElements(By.tagName("td"));
+			   //To calculate no of columns(cells) In that specific row.
+			   int columns_count = Columns_row.size();
+			   //System.out.println("Number of cells In Row "+row+" are "+columns_count);
+			   
+			   //Loop will execute till the last cell of that specific row.
+			   for (int column=0; column<columns_count; column++){
+			    //To retrieve text from that specific cell.
+			    String celtext = Columns_row.get(column).getText();
+			    //System.out.println("Cell Value Of row number "+row+" and column number "+column+" Is "+celtext);
+			   
+			    
+			    
+			    //log.info("Testing Get column and row value");
+			    List <WebElement> exx= rows_table.get(1).findElements(By.tagName("td"));
+			     eg=Columns_row.get(2).getText();
+			   // System.out.println("Cell value of row 1 and column 2 is" +eg);
+			   }
+			  }
+		
+			  
+			
+			
+			//Verify View/Edit isDisplayed and Click
+			
+			driver.findElement(By.xpath("//a[@alt='View/Edit']")).isDisplayed();
+			
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/div/table/tbody/tr[1]/td[1]/div/a")).click();
+			
+			log.info("User clicked View/Edit");
+			
+			//Verify the Subscriber Name displayed.	
+			String header= driver.findElement(By.xpath("//h1[@class='heading1 ng-binding']")).getText();
+			//System.out.println(header);
+			
+			
+			if(header.contains(eg))
+			{
+				System.out.println("Header contains the subscriber name");
+			}else
+				System.out.println("Header does not contain the subscriber name");
+			
+			
+			
+			Assert.assertTrue(driver.getPageSource().contains("PerfTest Subscriber00020021"));
+			log.info("VID-12 TC-6 PASSED");
+			
+			
+				
+			driver.navigate().back();
+			//Cancel button isDisplayed
+			driver.findElement(By.xpath("//button[@class='button button--small button--primary']")).isDisplayed();
+			log.info("VID-12 TC-9 PASSED");
+			
+			//Cancel button is clicked
+			driver.findElement(By.xpath("//button[@class='button button--small button--primary']")).click();
+			log.info("Cancel button is clicked");
+			
+			//Verifying VID Home page is displayed
+			Assert.assertTrue(driver.getPageSource().contains("Search Existing Service Instances"));
+			log.info("VID-12 TC-10 PASSED");
+			
+			   }
+		
+		
+		/**
+		 * Refresh subscriber name.
+		 */
+		@Test(priority=9)
+		public void refreshSubscriberName()
+		{
+			log.info("VID-10 TC-4");
+			
+			
+			driver.findElement(By.xpath(configProp.getProperty("refreshButtonSubscriberName"))).isDisplayed();
+			
+			log.info("VID-10 TC-4 PASSED");
+			
+			
+		}
+
+		
+		/**
+		 * Select subscriber type drop down.
+		 *
+		 * @throws InterruptedException the interrupted exception
+		 */
+		@Test(priority=9)
+		public void selectSubscriberTypeDropDown() throws InterruptedException
+		{
+			Thread.sleep(5000);
+			log.info("------------------VID-10 TC-3, VID-12 TC-12,--------------------");
+			//Infrastructure Subscriber Type
+			Select iSelect = new Select(driver.findElement(By.xpath(configProp.getProperty("serviceTypeDropDown"))));
+			
+			List <WebElement> ielementCount = iSelect.getOptions();
+			log.info("Select Element Count of Service type");
+			System.out.println(ielementCount.size());
+			iSelect.selectByIndex(1);
+			
+			log.info("VID-10 TC-3 PASSED");
+			
+						
+			//Submit button is clicked
+			driver.findElement(By.xpath(configProp.getProperty("submitButton"))).click();
+			
+			//Verify whether the page header is displayed "Selected Subscriber's Service Instance Details:"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/h1")).isDisplayed();
+			//Assert.assertTrue(driver.getPageSource().contains("Selected Subscriber's Service Instance Details:"))
+			log.info("Page Header: Selected Subscriber's Service Instance Details");
+			
+			
+			//Verify whether the page header is displayed "Global Customer ID"
+			driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/div/table/thead/tr/th[2]/div")).isDisplayed();
+			
+			//Assert.assertTrue(driver.getPageSource().contains("Global Customer ID"));
+			log.info("Table is displayed");
+			
+			log.info("VID-12 TC-12 PASSED");
+			
+		}
+		
+		
+		
+		/**
+		 * Logout under profile.
+		 */
+		@Test(priority=10)
+		public void logoutUnderProfile()
+		{
+			
+			log.info("-----------VID-11 TC-5---------------------");
+			//driver.findElement(By.partialLinkText("Click here to login")).click();
+			//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+			
+		
+			driver.findElement(By.xpath(".//*[@class='icon-user-small login-snippet-icon']")).click();			
+			driver.findElement(By.xpath(".//*[@id='reg-logout-div']/a")).click();
+			//Validate that the user has logged out of VID. Displays "Portal"
+			Assert.assertTrue(driver.getPageSource().contains("Portal"));
+			
+			log.info("VID-11 TC-5 PASSED");
+			
+		}
+
+		
+		
+		/**
+		 * Tear down.
+		 */
+		@AfterClass
+		public void tearDown()
+		{
+			driver.close();
+		
+		}
+		
+		
+		
+	}
+
+
+	
+
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/selenium/LogOutLeftPane.java b/onap-enabler-be/src/test/java/org/onap/osam/selenium/LogOutLeftPane.java
new file mode 100644
index 0000000..ca5c618
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/selenium/LogOutLeftPane.java
@@ -0,0 +1,240 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.selenium;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.log4j.Logger;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.support.ui.Select;
+import org.testng.Assert;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+@Test(enabled=false)
+public class LogOutLeftPane {
+
+	WebElement loginButton;
+	
+	/** The login. */
+	WebElement login;
+	
+	/** The pwd. */
+	WebElement pwd;
+	
+	/** The log. */
+	Logger log;
+	
+	/** The errormessage. */
+	WebElement errormessage;
+	
+	/** The driver. */
+	WebDriver driver=new FirefoxDriver();
+	
+	
+	/** The config prop. */
+	private final Properties configProp = new Properties();
+	
+	
+	/**
+	 * Instantiates a new log out left pane.
+	 */
+	private  LogOutLeftPane() {
+		// TODO Auto-generated constructor stub
+		//
+		try{
+		//	InputStream input =this.getClass().getClassLoader().getResourceAsStream("objectmap.properties");
+		//FileInputStream input1 = new FileInputStream("objectmap.properties");
+			
+		InputStream input =new FileInputStream("objectconfig.properties");
+		System.out.println("Read all properties from file");
+		configProp.load(input);
+		System.out.println("Read all properties from file completed");
+		}
+		catch(IOException e) {
+			
+			e.printStackTrace();
+		}
+	}
+	
+	
+	   
+	   
+	/**
+	 * Do before test.
+	 */
+	// TODO Auto-generated method stub
+	@BeforeTest
+	public void doBeforeTest()
+	{
+		//WebDriver driver=new FirefoxDriver();
+		
+		log = Logger.getLogger(LogOutLeftPane.class.getName());
+	
+	
+	
+	// Get url
+	driver.get("http://vid.onap.org:9080/vid/login_external.htm");
+	driver.manage().window().maximize();
+	
+	
+	 login = driver.findElement(By.xpath("//input[@class='fn-ebz-text ng-pristine ng-valid']"));
+	 pwd = driver.findElement(By.xpath("//input[@class='span3 ng-pristine ng-valid']"));
+	 loginButton = driver.findElement(By.id("loginBtn"));
+	}
+	
+	
+	/**
+	 * Expand collapse panel.
+	 *
+	 * @throws InterruptedException the interrupted exception
+	 */
+	@Test(priority=1)
+	public void expandCollapsePanel() throws InterruptedException
+	{
+
+		
+		
+		login.clear();
+		login.sendKeys("su");
+		pwd.clear();
+		pwd.sendKeys("fusion");
+		//driver.findElement(By.partialLinkText("Click here to login")).click();
+		//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		loginButton.click();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		
+		log.info("Clicking Profile link from left pane");
+		Thread.sleep(3000);
+		System.out.println("properties file details --->"+configProp.getProperty("profilelink"));
+		driver.findElement(By.xpath(configProp.getProperty("profilelink"))).click();
+		Thread.sleep(3000);
+		
+		//Verify whether the sub panel is displayed
+		//To verify the following :Search import from webphone and Self 
+		driver.findElement(By.xpath(".//*[@id='panel4']")).isDisplayed();
+		log.info("Expand and collapse passed for Profile link");
+		
+		//For Admin
+		//Verify expand and collapse working for ADMIN
+		log.info("Clicking Admin link from left pane");
+		driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[6]/a/span")).click();
+		//To verify the following: Roles, Roles Functions, Usages
+		driver.findElement(By.xpath(".//*[@id='panel5']")).isDisplayed();
+		
+	
+		log.info("Expand and collapse passed for ADMIN link");
+
+		log.info("VID-11 TC-3 PASSED");
+		
+	}
+	
+	
+	/**
+	 * Drop down list.
+	 *
+	 * @throws InterruptedException the interrupted exception
+	 */
+	@Test(priority=2)
+	public void dropDownList() throws InterruptedException
+	{
+		//VID-12 TC-3
+		log.info("VID-12 TC-3");
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select"));
+		
+		//driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select"));
+		Thread.sleep(5000);
+		
+		//Infrastructure Subscriber Name
+		Select oSelect = new Select(driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select")));
+		Select iSelect = new Select(driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select")));
+		
+		List <WebElement> elementCount = oSelect.getOptions();
+		log.info("Subscriber Name Drop Down");
+		System.out.println(elementCount.size());
+		oSelect.selectByIndex(1);
+		log.info("Subscriber name selected");
+		//String selectedOption = new Select(driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select"))).getFirstSelectedOption().getText();
+		
+		
+		List <WebElement> count = iSelect.getOptions();
+		log.info("Subscriber type drop down");
+		System.out.println(count.size());
+		oSelect.selectByIndex(1);
+		log.info("Subscriber type selected");
+		
+
+				
+		//Submit button is clicked
+		driver.findElement(By.xpath(".//*[@id='mContent']/div/div/table/tbody/tr[3]/td/div/button")).click();
+		
+		
+		//Verify whether the page header is displayed "Selected Subscriber's Service Instance Details:"
+		driver.findElement(By.xpath(".//*[@id='mContent']/div/div/div/h1")).isDisplayed();
+		log.info("VID-12 TC-3 PASSED");
+	}
+	
+	
+	
+	
+	/**
+	 * Logout left pane.
+	 */
+	@Test(priority=3)
+	public void logoutLeftPane()
+	{
+		//To Verify if the logout link redirects to Login page when clicked.
+		
+		
+		/*log.info("----------------VID-11 TC-4----------------");
+		login.clear();
+		login.sendKeys("testuser");
+		pwd.clear();
+		pwd.sendKeys("abc123");
+		//driver.findElement(By.partialLinkText("Click here to login")).click();
+		//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
+		
+		loginButton.click();
+		driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);*/
+		log.info("----------------VID-11 TC-4----------------");
+		driver.findElement(By.xpath("html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[7]/a")).click();
+		//Validate that the user has logged out of VID. Displays "Portal"
+		Assert.assertTrue(driver.getPageSource().contains("Portal"));
+		
+		log.info("VID 11 TC-4 PASSED");
+		
+		driver.close();
+		
+	}
+	
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/AaiServiceImplTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/AaiServiceImplTest.java
new file mode 100644
index 0000000..7034134
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/AaiServiceImplTest.java
@@ -0,0 +1,358 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.SubscriberFilteredResults;
+import org.onap.osam.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
+import org.onap.osam.aai.model.AaiGetPnfs.Pnf;
+import org.onap.osam.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.osam.model.SubscriberList;
+import org.onap.osam.roles.RoleValidator;
+
+public class AaiServiceImplTest {
+
+    private AaiServiceImpl createTestSubject() {
+        return new AaiServiceImpl();
+    }
+
+    @Test
+    public void testGetFullSubscriberList() throws Exception {
+        AaiServiceImpl testSubject;
+        RoleValidator roleValidator = null;
+        SubscriberFilteredResults result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getFullSubscriberList(roleValidator);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetOperationalEnvironments() throws Exception {
+        AaiServiceImpl testSubject;
+        String operationalEnvironmentType = "";
+        String operationalEnvironmentStatus = "";
+        AaiResponse<OperationalEnvironmentList> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getOperationalEnvironments(operationalEnvironmentType, operationalEnvironmentStatus);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetFullSubscriberList_1() throws Exception {
+        AaiServiceImpl testSubject;
+        AaiResponse<SubscriberList> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getFullSubscriberList();
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetSubscriberData() throws Exception {
+        AaiServiceImpl testSubject;
+        String subscriberId = "";
+        RoleValidator roleValidator = null;
+        AaiResponse result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getSubscriberData(subscriberId, roleValidator);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetServiceInstanceSearchResults() throws Exception {
+        AaiServiceImpl testSubject;
+        String subscriberId = "";
+        String instanceIdentifier = "";
+        RoleValidator roleValidator = null;
+        List<String> owningEntities = null;
+        List<String> projects = null;
+        AaiResponse result;
+
+        // test 1
+        testSubject = createTestSubject();
+        subscriberId = null;
+        instanceIdentifier = null;
+        result = testSubject.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator,
+                owningEntities, projects);
+        Assert.assertNotEquals(null, result);
+
+        /*/ test 2
+        testSubject = createTestSubject();
+        subscriberId = "";
+        instanceIdentifier = null;
+        result = testSubject.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator,
+                owningEntities, projects);
+        Assert.assertNotEquals(null, result);
+
+        // test 3
+        testSubject = createTestSubject();
+        instanceIdentifier = null;
+        subscriberId = null;
+        result = testSubject.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator,
+                owningEntities, projects);
+        Assert.assertEquals(null, result);
+
+        // test 4
+        testSubject = createTestSubject();
+        instanceIdentifier = "";
+        subscriberId = null;
+        result = testSubject.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator,
+                owningEntities, projects);
+        Assert.assertEquals(null, result);
+
+        // test 5
+        testSubject = createTestSubject();
+        owningEntities = null;
+        result = testSubject.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator,
+                owningEntities, projects);
+        Assert.assertEquals(null, result);
+
+        // test 6
+        testSubject = createTestSubject();
+        projects = null;
+        result = testSubject.getServiceInstanceSearchResults(subscriberId, instanceIdentifier, roleValidator,
+                owningEntities, projects);
+        Assert.assertEquals(null, result);*/
+    }
+
+    @Test
+    public void testGetVersionByInvariantId() throws Exception {
+        AaiServiceImpl testSubject;
+        List<String> modelInvariantId = null;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            testSubject.getVersionByInvariantId(modelInvariantId);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetSpecificPnf() throws Exception {
+        AaiServiceImpl testSubject;
+        String pnfId = "";
+        AaiResponse<Pnf> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getSpecificPnf(pnfId);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetPNFData() throws Exception {
+        AaiServiceImpl testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String modelVersionId = "";
+        String modelInvariantId = "";
+        String cloudRegion = "";
+        String equipVendor = "";
+        String equipModel = "";
+        AaiResponse result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId,
+                    cloudRegion, equipVendor, equipModel);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetServices() throws Exception {
+        AaiServiceImpl testSubject;
+        RoleValidator roleValidator = null;
+        AaiResponse result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getServices(roleValidator);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetTenants() throws Exception {
+        AaiServiceImpl testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        RoleValidator roleValidator = null;
+        AaiResponse<GetTenantsResponse[]> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getTenants(globalCustomerId, serviceType, roleValidator);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetVNFData() throws Exception {
+        AaiServiceImpl testSubject;
+        String globalSubscriberId = "";
+        String serviceType = "";
+        String serviceInstanceId = "";
+        AaiResponse result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getVNFData(globalSubscriberId, serviceType, serviceInstanceId);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetVNFData_1() throws Exception {
+        AaiServiceImpl testSubject;
+        String globalSubscriberId = "";
+        String serviceType = "";
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            testSubject.getVNFData(globalSubscriberId, serviceType);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetAaiZones() throws Exception {
+        AaiServiceImpl testSubject;
+        AaiResponse result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getAaiZones();
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetAicZoneForPnf() throws Exception {
+        AaiServiceImpl testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String serviceId = "";
+        AaiResponse result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getAicZoneForPnf(globalCustomerId, serviceType, serviceId);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetNodeTemplateInstances() throws Exception {
+        AaiServiceImpl testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String modelVersionId = "";
+        String modelInvariantId = "";
+        String cloudRegion = "";
+        AaiResponse result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId,
+                    modelInvariantId, cloudRegion);
+        } catch (
+
+        Exception e) {
+        }
+    }
+
+    @Test
+    public void testGetServiceInstanceAssociatedPnfs() throws Exception {
+        AaiServiceImpl testSubject;
+        String globalCustomerId = "";
+        String serviceType = "";
+        String serviceInstanceId = "";
+        List<String> result;
+
+        // default test
+        try {
+            testSubject = createTestSubject();
+            result = testSubject.getServiceInstanceAssociatedPnfs(globalCustomerId, serviceType, serviceInstanceId);
+        } catch (
+
+        Exception e) {
+        }
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/AsyncInstantiationBaseTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/AsyncInstantiationBaseTest.java
new file mode 100644
index 0000000..b8118d2
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/AsyncInstantiationBaseTest.java
@@ -0,0 +1,213 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import com.google.common.collect.ImmutableMap;
+import jersey.repackaged.com.google.common.collect.ImmutableList;
+import org.onap.osam.aai.AaiClientInterface;
+import org.onap.osam.aai.AaiResponse;
+import org.onap.osam.aai.model.AaiNodeQueryResponse;
+import org.onap.osam.aai.model.ResourceType;
+import org.onap.osam.domain.mso.ModelInfo;
+import org.onap.osam.domain.mso.RequestStatus;
+import org.onap.osam.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.osam.model.serviceInstantiation.VfModule;
+import org.onap.osam.model.serviceInstantiation.Vnf;
+import org.onap.osam.mso.RestObject;
+import org.onap.osam.mso.rest.AsyncRequestStatus;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.togglz.core.manager.FeatureManager;
+
+import javax.inject.Inject;
+import java.util.*;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
+
+public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests {
+
+    public static final String OWNING_ENTITY_ID = "038d99af-0427-42c2-9d15-971b99b9b489";
+    public static final String PACKET_CORE = "PACKET CORE";
+    public static final String PROJECT_NAME = "{some project name}";
+    public static final String SUBSCRIBER_ID = "{some subscriber id}";
+    public static final String SUBSCRIBER_NAME = "{some subscriber name}";
+    public static final String PRODUCT_FAMILY_ID = "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb";
+    public static final String INSTANCE_NAME = "vPE_Service";
+    public static final String SUBSCRIPTION_SERVICE_TYPE = "VMX";
+    public static final String LCP_CLOUD_REGION_ID = "mdt1";
+    public static final String A6CA3EE0394ADE9403F075DB23167E = "88a6ca3ee0394ade9403f075db23167e";
+    public static final String TENANT_NAME = "USP-SIP-IC-24335-T-01";
+    public static final String AIC_ZONE_ID = "NFT1";
+    public static final String AIC_ZONE_NAME = "NFTJSSSS-NFT1";
+
+    protected HashMap<String, String> instanceParamsMapWithoutParams;
+    protected HashMap<String, String> vfModuleInstanceParamsMapWithParamsToRemove;
+    protected HashMap<String, String> vnfInstanceParamsMapWithParamsToRemove;
+
+    @Inject
+    protected FeatureManager featureManager;
+
+    @Inject
+    protected AaiClientInterface aaiClient;
+
+    public ServiceInstantiation generateMockServiceInstantiationPayload(boolean isPause, Map<String, Vnf> vnfs, int bulkSize, boolean isUserProvidedNaming, String projectName, boolean rollbackOnFailure) {
+        ModelInfo modelInfo = createModelInfo();
+
+        List<Map<String,String>> instanceParams = createInstanceParams();
+
+        return new ServiceInstantiation (
+                modelInfo,
+                AsyncInstantiationBusinessLogicTest.OWNING_ENTITY_ID,
+                AsyncInstantiationBusinessLogicTest.PACKET_CORE,
+                projectName,
+                AsyncInstantiationBusinessLogicTest.SUBSCRIBER_ID,
+                AsyncInstantiationBusinessLogicTest.SUBSCRIBER_NAME,
+                AsyncInstantiationBusinessLogicTest.PRODUCT_FAMILY_ID,
+                isUserProvidedNaming ? AsyncInstantiationBusinessLogicTest.INSTANCE_NAME : ""  ,
+                isUserProvidedNaming,
+                AsyncInstantiationBusinessLogicTest.SUBSCRIPTION_SERVICE_TYPE,
+                AsyncInstantiationBusinessLogicTest.LCP_CLOUD_REGION_ID,
+                AsyncInstantiationBusinessLogicTest.A6CA3EE0394ADE9403F075DB23167E,
+                AsyncInstantiationBusinessLogicTest.TENANT_NAME,
+                AsyncInstantiationBusinessLogicTest.AIC_ZONE_ID,
+                AsyncInstantiationBusinessLogicTest.AIC_ZONE_NAME,
+                vnfs,
+                instanceParams,
+                isPause,
+                bulkSize,
+                rollbackOnFailure
+                );
+    }
+
+    private List<Map<String,String>> createInstanceParams() {
+        List<Map<String, String>> instanceParams = new ArrayList<>();
+        HashMap<String, String> map = new HashMap<>();
+        map.put("instanceParams_test1" , "some text");
+        map.put("instanceParams_test2" , "another text");
+        instanceParams.add(map);
+        return instanceParams;
+    }
+
+    private VfModule createVfModule(String modelName, String modelVersionId, String modelCustomizationId,
+                                    List<Map<String, String>> instanceParams, String instanceName, String volumeGroupInstanceName) {
+        ModelInfo vfModuleInfo = new ModelInfo();
+        vfModuleInfo.setModelType("vfModule");
+        vfModuleInfo.setModelName(modelName);
+        vfModuleInfo.setModelVersionId(modelVersionId);
+        vfModuleInfo.setModelCustomizationId(modelCustomizationId);
+        return new VfModule(vfModuleInfo , instanceName, volumeGroupInstanceName, instanceParams);
+    }
+
+    private ModelInfo createVnfModelInfo() {
+        ModelInfo vnfModelInfo = new ModelInfo();
+        vnfModelInfo.setModelType("vnf");
+        vnfModelInfo.setModelName("2016-73_MOW-AVPN-vPE-BV-L");
+        vnfModelInfo.setModelVersionId("7f40c192-f63c-463e-ba94-286933b895f8");
+        vnfModelInfo.setModelCustomizationName("2016-73_MOW-AVPN-vPE-BV-L 0");
+        vnfModelInfo.setModelCustomizationId("ab153b6e-c364-44c0-bef6-1f2982117f04");
+        return vnfModelInfo;
+    }
+
+    private ModelInfo createModelInfo() {
+        ModelInfo modelInfo = new ModelInfo();
+        modelInfo.setModelType("service");
+        modelInfo.setModelVersionId("3c40d244-808e-42ca-b09a-256d83d19d0a");
+        modelInfo.setModelVersion("10.0");
+        modelInfo.setModelInvariantId("5d48acb5-097d-4982-aeb2-f4a3bd87d31b");
+        modelInfo.setModelName("MOW AVPN vMX BV vPE 1 Service");
+        return modelInfo;
+    }
+
+    protected Map<String, Vnf> createVnfList(HashMap<String, String> vfModuleInstanceParamsMap, List vnfInstanceParams, boolean isUserProvidedNaming) {
+        Map<String, Vnf> vnfs = new HashMap<>();
+        ModelInfo vnfModelInfo = createVnfModelInfo();
+
+        Map<String, Map<String, VfModule>> vfModules = new HashMap<>();
+
+        List<Map<String, String>> instanceParams1 =ImmutableList.of((ImmutableMap.of("vmx_int_net_len", "24")));
+        VfModule vfModule1 = createVfModule("201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0", "4c75f813-fa91-45a4-89d0-790ff5f1ae79", "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f", instanceParams1, "vmxnjr001_AVPN_base_vPE_BV_base", null);
+        List<Map<String, String>> instanceParams2 = ImmutableList.of(vfModuleInstanceParamsMap);
+        VfModule vfModule2 = createVfModule("201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1", "56e2b103-637c-4d1a-adc8-3a7f4a6c3240", "72d9d1cd-f46d-447a-abdb-451d6fb05fa8", instanceParams2, "vmxnjr001_AVPN_base_vRE_BV_expansion", "myVgName");
+
+        String vfModuleModelName = vfModule1.getModelInfo().getModelName();
+        vfModules.put(vfModuleModelName, new LinkedHashMap<>());
+
+        vfModules.get(vfModuleModelName).put(vfModule1.getInstanceName(),vfModule1);
+        vfModules.get(vfModuleModelName).put(vfModule2.getInstanceName(), vfModule2);
+
+        Vnf vnf = new Vnf(vnfModelInfo, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", "vmxnjr001", isUserProvidedNaming,
+                "platformName", "mdt1", "88a6ca3ee0394ade9403f075db23167e", vnfInstanceParams,"lineOfBusinessName" ,vfModules);
+
+        vnfs.put(vnf.getInstanceName(), vnf);
+        return vnfs;
+    }
+
+    protected void createInstanceParamsMaps() {
+        instanceParamsMapWithoutParams = new HashMap<>();
+        instanceParamsMapWithoutParams.put("availability_zone_0" , "mtpocdv-kvm-az01");
+        instanceParamsMapWithoutParams.put("vre_a_volume_size_0" , "100");
+
+        vfModuleInstanceParamsMapWithParamsToRemove = new HashMap<>();
+        vfModuleInstanceParamsMapWithParamsToRemove.put(IAsyncInstantiationBusinessLogic.PARAMS_TO_IGNORE.get(0), "should be removed");
+        vfModuleInstanceParamsMapWithParamsToRemove.put("availability_zone_0" , "mtpocdv-kvm-az01");
+        vfModuleInstanceParamsMapWithParamsToRemove.put("vre_a_volume_size_0" , "100");
+
+        vnfInstanceParamsMapWithParamsToRemove = new HashMap<>();
+        vnfInstanceParamsMapWithParamsToRemove.put(IAsyncInstantiationBusinessLogic.PARAMS_TO_IGNORE.get(1), "should be removed");
+    }
+
+    protected AsyncRequestStatus asyncRequestStatusResponse(String msoStatus) {
+        AsyncRequestStatus asyncRequestStatus = new AsyncRequestStatus(new AsyncRequestStatus.Request(new RequestStatus()));
+        asyncRequestStatus.request.requestStatus.setRequestState(msoStatus);
+        asyncRequestStatus.request.requestId = UUID.randomUUID().toString();
+        return asyncRequestStatus;
+    }
+
+    protected RestObject<AsyncRequestStatus> asyncRequestStatusResponseAsRestObject(String msoStatus) {
+        return asyncRequestStatusResponseAsRestObject(msoStatus, 200);
+    }
+
+    protected RestObject<AsyncRequestStatus> asyncRequestStatusResponseAsRestObject(String msoStatus, int httpStatusCode) {
+        RestObject<AsyncRequestStatus> restObject = new RestObject<>();
+        restObject.set(asyncRequestStatusResponse(msoStatus));
+        restObject.setStatusCode(httpStatusCode);
+        return restObject;
+    }
+
+    protected void mockAaiClientAnyNameFree() {
+        when(aaiClient.searchNodeTypeByName(any(), any())).thenReturn(aaiNodeQueryResponseNameFree());
+    }
+
+    protected AaiResponse<AaiNodeQueryResponse> aaiNodeQueryResponseNameFree() {
+        return new AaiResponse<>(new AaiNodeQueryResponse(null),"", 200);
+    }
+
+    protected AaiResponse<AaiNodeQueryResponse> aaiNodeQueryBadResponse() {
+        return new AaiResponse<>(null,"", 404);
+    }
+
+    protected AaiResponse<AaiNodeQueryResponse> aaiNodeQueryResponseNameUsed(ResourceType type) {
+        AaiNodeQueryResponse mockAaiNodeQuery = new AaiNodeQueryResponse(ImmutableList.of(new AaiNodeQueryResponse.ResultData(type, "/some/mocked/link")));
+        return new AaiResponse<>(mockAaiNodeQuery,"", 200);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/AsyncInstantiationBusinessLogicTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/AsyncInstantiationBusinessLogicTest.java
new file mode 100644
index 0000000..0072018
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/AsyncInstantiationBusinessLogicTest.java
@@ -0,0 +1,845 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.onap.osam.config.DataSourceConfig;
+import org.onap.osam.config.MockedAaiClientAndFeatureManagerConfig;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.springframework.test.context.ContextConfiguration;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.contains;
+import static org.mockito.Matchers.any;
+
+@ContextConfiguration(classes = {DataSourceConfig.class, SystemProperties.class, MockedAaiClientAndFeatureManagerConfig.class})
+public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseTest {
+/*
+TO BE FIXED
+    @Inject
+    private DataAccessService dataAccessService;
+
+    @Mock
+    private JobAdapter jobAdapter;
+
+    @Mock
+    private JobsBrokerService jobsBrokerService;
+
+
+
+    @Autowired
+    private SessionFactory sessionFactory;
+
+    private IAsyncInstantiationBusinessLogic asyncInstantiationBL;
+
+    private int serviceCount = 0;
+
+    private static final String UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE =
+            "Failed to retrieve job with uuid .* from ServiceInfo table. Instances found: .*";
+
+    private static final String DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE =
+            "Service status does not allow deletion from the queue";
+
+    @BeforeClass
+    void initServicesInfoService() {
+        MockitoAnnotations.initMocks(this);
+        asyncInstantiationBL = new AsyncInstantiationBusinessLogicImpl(dataAccessService, jobAdapter, jobsBrokerService, sessionFactory, aaiClient);
+        createInstanceParamsMaps();
+    }
+
+    @BeforeMethod
+    void defineMocks() {
+        mockAaiClientAnyNameFree();
+    }
+
+    @BeforeMethod
+    void resetServiceCount() {
+        serviceCount = 0;
+    }
+
+    @AfterMethod
+    void clearDb() {
+        dataAccessService.deleteDomainObjects(JobDaoImpl.class, "1=1", getPropsMap());
+        dataAccessService.deleteDomainObjects(ServiceInfo.class, "1=1", getPropsMap());
+        dataAccessService.deleteDomainObjects(JobAuditStatus.class, "1=1", getPropsMap());
+        dataAccessService.deleteDomainObjects(NameCounter.class, "1=1", getPropsMap());
+    }
+
+
+    private void createNewTestServicesInfoForFilter(String userId) {
+        LocalDateTime createdDate, modifiedDate;
+        LocalDateTime NOW = LocalDateTime.now();
+        UUID uuid;
+
+        // Old job
+        uuid = UUID.randomUUID();
+        addNewJob(uuid);
+        createdDate = NOW.minusYears(1);
+        addNewServiceInfo(uuid, userId, "Old", createdDate, createdDate, COMPLETED, false);
+
+        uuid = UUID.randomUUID();
+        addNewJob(uuid);
+        createdDate = NOW.minusDays(20);
+        modifiedDate = NOW.minusDays(19);
+        addNewServiceInfo(uuid, userId, "Hidden", createdDate, modifiedDate, PAUSE, true);
+
+        createNewTestServicesInfo(String.valueOf(userId));
+    }
+
+    private void createNewTestServicesInfo(String userId) {
+
+        LocalDateTime createdDate, modifiedDate;
+        LocalDateTime NOW = LocalDateTime.now();
+        UUID uuid;
+
+        uuid = UUID.randomUUID();
+        addNewJob(uuid);
+
+        createdDate = NOW.minusDays(40);
+        addNewServiceInfo(uuid, userId, "service instance 5", createdDate, createdDate, COMPLETED, false);
+        addNewServiceInfo(uuid, userId, "service instance 6", createdDate, createdDate, STOPPED, false);
+
+        uuid = UUID.randomUUID();
+        addNewJob(uuid);
+
+        createdDate = NOW.minusDays(20);
+        modifiedDate = NOW.minusDays(10);
+        addNewServiceInfo(uuid, userId, "service instance 4", createdDate, modifiedDate, STOPPED, false);
+        addNewServiceInfo(uuid, userId, "service instance 2", createdDate, modifiedDate, COMPLETED, false);
+        addNewServiceInfo(uuid, userId, "service instance 3", createdDate, modifiedDate, PAUSE, false);
+
+        modifiedDate = NOW.minusDays(19);
+        addNewServiceInfo(uuid, userId, "service instance 1", createdDate, modifiedDate, FAILED, false);
+
+
+        // Job to a different user
+        uuid = UUID.randomUUID();
+        addNewJob(uuid);
+
+        createdDate = NOW.minusMonths(2);
+        addNewServiceInfo(uuid, "2221", "service instance 7", createdDate, createdDate, COMPLETED, false);
+
+    }
+
+    private UUID createServicesInfoWithDefaultValues(Job.JobStatus status) {
+
+        LocalDateTime NOW = LocalDateTime.now();
+        UUID uuid;
+
+        uuid = UUID.randomUUID();
+        addNewJob(uuid, status);
+
+        addNewServiceInfo(uuid, null, "service instance 1", NOW, NOW, status, false);
+
+        return uuid;
+
+    }
+
+    private List<ServiceInfo> getFullList() {
+        List<ServiceInfo> expectedOrderServiceInfo = dataAccessService.getList(ServiceInfo.class, getPropsMap());
+        assertThat("Failed to retrieve all predefined services", expectedOrderServiceInfo.size(), equalTo(serviceCount));
+        expectedOrderServiceInfo.sort(new ServiceInfoComparator());
+        return expectedOrderServiceInfo;
+    }
+
+    private static Date toDate(LocalDateTime localDateTime) {
+        return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
+    }
+
+    private LocalDateTime fromDate(Date date) {
+        return Instant.ofEpochMilli(date.getTime())
+                .atZone(ZoneId.systemDefault())
+                .toLocalDateTime();
+    }
+
+    private void addNewServiceInfo(UUID uuid, String userId, String serviceName, LocalDateTime createDate, LocalDateTime statusModifiedDate, Job.JobStatus status, boolean isHidden) {
+        ServiceInfo serviceInfo = new ServiceInfo();
+        serviceInfo.setJobId(uuid);
+        serviceInfo.setUserId(userId);
+        serviceInfo.setServiceInstanceName(serviceName);
+        serviceInfo.setStatusModifiedDate(toDate(statusModifiedDate));
+        serviceInfo.setJobStatus(status);
+        serviceInfo.setPause(false);
+        serviceInfo.setOwningEntityId("1234");
+        serviceInfo.setCreatedBulkDate(toDate(createDate));
+
+        serviceInfo.setHidden(isHidden);
+        dataAccessService.saveDomainObject(serviceInfo, getPropsMap());
+        setCreateDateToServiceInfo(uuid, createDate);
+        serviceCount++;
+
+    }
+
+    private void setCreateDateToServiceInfo(UUID jobUuid, LocalDateTime createDate) {
+        List<ServiceInfo> serviceInfoList = dataAccessService.getList(ServiceInfo.class, getPropsMap());
+        DaoUtils.tryWithSessionAndTransaction(sessionFactory, session -> {
+            serviceInfoList.stream()
+                    .filter(serviceInfo -> jobUuid.equals(serviceInfo.getJobId()))
+                    .forEach(serviceInfo -> {
+                        serviceInfo.setCreated(toDate(createDate));
+                        session.saveOrUpdate(serviceInfo);
+                    });
+            return 1;
+        });
+    }
+
+    private void addNewJob(UUID uuid) {
+        addNewJob(uuid, null);
+    }
+
+    private void addNewJob(UUID uuid, Job.JobStatus status) {
+        JobDaoImpl jobDao = new JobDaoImpl();
+        jobDao.setUuid(uuid);
+        jobDao.setStatus(status);
+        dataAccessService.saveDomainObject(jobDao, getPropsMap());
+    }
+
+    @Test
+    public void testServiceInfoAreOrderedAsExpected() {
+        int userId = 2222;
+        createNewTestServicesInfo(String.valueOf(userId));
+        List<ServiceInfo> expectedOrderServiceInfo = getFullList();
+        List<ServiceInfo> serviceInfoListResult = asyncInstantiationBL.getAllServicesInfo();
+        assertThat("Services aren't ordered as expected", serviceInfoListResult, equalTo(expectedOrderServiceInfo));
+    }
+
+    @Test
+    public void testServiceInfoAreFilteredAsExpected() {
+        int userId = 2222;
+        createNewTestServicesInfoForFilter(String.valueOf(userId));
+        List<ServiceInfo> expectedOrderServiceInfo = getFullList();
+
+        List<ServiceInfo> expectedFilterByUser = expectedOrderServiceInfo.stream().filter(x ->
+                !x.getServiceInstanceName().equals("Old") && !x.getServiceInstanceName().equals("Hidden")
+
+        ).collect(Collectors.toList());
+
+
+        List<ServiceInfo> serviceInfoFilteredByUser = asyncInstantiationBL.getAllServicesInfo();
+        assertThat("Services aren't ordered filtered as expected", serviceInfoFilteredByUser, equalTo(expectedFilterByUser));
+    }
+
+    @Test(dataProvider = "pauseAndInstanceParams", enabled = false) //Test is irrelevant with unique names feature
+    public void createServiceInstantiationMsoRequest(Boolean isPause, HashMap<String, String> vfModuleInstanceParamsMap, List vnfInstanceParams) throws Exception {
+        ServiceInstantiation serviceInstantiationPayload = generateMockServiceInstantiationPayload(isPause, createVnfList(vfModuleInstanceParamsMap, vnfInstanceParams, true));
+        final URL resource = this.getClass().getResource("/payload_jsons/bulk_service_request.json");
+            RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
+                    asyncInstantiationBL.generateServiceInstantiationRequest(null, serviceInstantiationPayload, "az2016");
+            String expected = IOUtils.toString(resource, "UTF-8");
+            MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
+    }
+
+    @Test(dataProvider = "pauseAndInstanceParams")
+    public void createServiceInstantiationMsoRequestUniqueName(Boolean isPause, HashMap<String, String> vfModuleInstanceParamsMap, List vnfInstanceParams) throws Exception {
+        Mockito.reset(aaiClient);
+        mockAaiClientAnyNameFree();
+        ServiceInstantiation serviceInstantiationPayload = generateMockServiceInstantiationPayload(isPause, createVnfList(vfModuleInstanceParamsMap, vnfInstanceParams, true));
+        final URL resource = this.getClass().getResource("/payload_jsons/bulk_service_request_unique_names.json");
+        List<UUID> uuids = new ArrayList<>();
+        for (int i = 0; i < 2; i++) {
+            UUID currentUuid = createJobAndServiceInfo();
+            uuids.add(currentUuid);
+            RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
+                    asyncInstantiationBL.generateServiceInstantiationRequest(currentUuid, serviceInstantiationPayload, "az2016");
+            String unique =  String.format("00%s", i + 1);
+            String expected = IOUtils.toString(resource, "UTF-8")
+                    .replace("{SERVICE_UNIQENESS}", unique)
+                    .replace("{VNF_UNIQENESS}", unique)
+                    .replace("{VF_MODULE_UNIQENESS}", unique)
+                    .replace("{VF_MODULE_2_UNIQENESS}", unique)
+                    .replace("{VG_UNIQUENESS}", unique);
+            MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
+            Optional<ServiceInfo> optionalServiceInfo = getJobById(currentUuid);
+            assertThat(optionalServiceInfo.get().getServiceInstanceName(), equalTo("vPE_Service_" + unique));
+            verifySearchNodeTypeByName(unique, "vPE_Service_", ResourceType.SERVICE_INSTANCE);
+            verifySearchNodeTypeByName(unique, "vmxnjr001_", ResourceType.GENERIC_VNF);
+            verifySearchNodeTypeByName(unique, "vmxnjr001_AVPN_base_vPE_BV_base_", ResourceType.VF_MODULE);
+            verifySearchNodeTypeByName(unique, "vmxnjr001_AVPN_base_vRE_BV_expansion_", ResourceType.VF_MODULE);
+            verifySearchNodeTypeByName(unique, "myVgName_", ResourceType.VOLUME_GROUP);
+        }
+    }
+
+    protected void verifySearchNodeTypeByName(String unique, String resourceName, ResourceType serviceInstance) {
+        verify(aaiClient, times(1)).searchNodeTypeByName(resourceName + unique, serviceInstance);
+    }
+
+    private HashMap<String, Object> getPropsMap() {
+        HashMap<String, Object> props = new HashMap<>();
+        props.put(FusionObject.Parameters.PARAM_USERID, 0);
+        return props;
+    }
+
+    @Test(enabled = false) //probably not needed with name uniqueness feature
+    public void pushBulkJob_bulkWithSize3_instancesNamesAreExactlyAsExpected() {
+        int bulkSize = 3;
+
+        final ServiceInstantiation request = generateMockServiceInstantiationPayload(
+                false,
+                createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true),
+                bulkSize, true,PROJECT_NAME, true
+        );
+
+        // in "createJob()" we will probe the service, with the generated names
+        final Job job = mock(Job.class);
+        when(job.getStatus()).thenReturn(PENDING);
+        when(jobAdapter.createJob(any(), any(), any(), any(), any())).thenReturn(job);
+
+
+        final List<UUID> uuids = asyncInstantiationBL.pushBulkJob(request, "myUserId");
+
+
+        ArgumentCaptor<ServiceInstantiation> serviceInstantiationCaptor = new ArgumentCaptor<ServiceInstantiation>();
+        verify(jobAdapter, times(bulkSize)).createJob(any(), serviceInstantiationCaptor.capture(), any(), any(), any());
+
+        assertThat(serviceInstantiationCaptor.getAllValues().stream().map(v -> v.getInstanceName()).collect(Collectors.toList()),
+                containsInAnyOrder("vPE_Service_001", "vPE_Service_002", "vPE_Service_003"));
+
+        assertThat(uuids, hasSize(bulkSize));
+    }
+
+    @Test
+    public void generateMockServiceInstantiationPayload_serializeBackAndForth_sourceShouldBeTheSame() throws IOException {
+        ServiceInstantiation serviceInstantiationPayload = generateMockServiceInstantiationPayload(
+                false,
+                createVnfList(instanceParamsMapWithoutParams, ImmutableList.of(vnfInstanceParamsMapWithParamsToRemove, vnfInstanceParamsMapWithParamsToRemove), true),
+                2, false,PROJECT_NAME, false);
+        ObjectMapper mapper = new ObjectMapper();
+        final String asString = mapper.writeValueAsString(serviceInstantiationPayload);
+
+        final ServiceInstantiation asObject = mapper.readValue(asString, ServiceInstantiation.class);
+        final String asString2 = mapper.writeValueAsString(asObject);
+
+        JsonAssert.assertJsonEquals(asString, asString2);
+    }
+
+    public static class ServiceInfoComparator implements Comparator<ServiceInfo> {
+
+        @Override
+        public int compare(ServiceInfo o1, ServiceInfo o2) {
+            int compare;
+
+            compare = o1.getCreatedBulkDate().compareTo(o2.getCreatedBulkDate());
+            if (compare != 0) {
+                return -compare;
+            }
+
+            // check jobStatus priority
+            int o1Priority = getPriority(o1);
+            int o2Priority = getPriority(o2);
+            compare = o1Priority - o2Priority;
+            if (compare != 0) {
+                return compare;
+            }
+
+            // check statusModifiedDate
+            return o1.getStatusModifiedDate().compareTo(o2.getStatusModifiedDate());
+        }
+
+        private int getPriority(ServiceInfo o) throws JSONException {
+            Job.JobStatus status = o.getJobStatus();
+            switch (status) {
+                case COMPLETED:
+                case FAILED:
+                    return 1;
+                case IN_PROGRESS:
+                    return 2;
+                case PAUSE:
+                    return 3;
+                case STOPPED:
+                case PENDING:
+                    return 4;
+                default:
+                    return 5;
+            }
+        }
+    }
+
+    @DataProvider
+    public Object[][] pauseAndInstanceParams() {
+        return new Object[][]{
+                {Boolean.TRUE, instanceParamsMapWithoutParams, Collections.EMPTY_LIST},
+                {Boolean.FALSE, instanceParamsMapWithoutParams, Collections.EMPTY_LIST},
+                {Boolean.TRUE, vfModuleInstanceParamsMapWithParamsToRemove, Collections.singletonList(vnfInstanceParamsMapWithParamsToRemove)}
+        };
+    }
+
+    private ServiceInstantiation generateMockServiceInstantiationPayload(boolean isPause, Map<String, Vnf> vnfs) {
+        return generateMockServiceInstantiationPayload(isPause, vnfs, 1, true, PROJECT_NAME, false);
+    }
+
+    @Test
+    public void testUpdateServiceInfo_WithExistingServiceInfo_ServiceInfoIsUpdated() {
+        UUID uuid = createJobAndServiceInfo();
+        final String STEPH_CURRY = "Steph Curry";
+        asyncInstantiationBL.updateServiceInfo(uuid, x -> {
+            x.setServiceInstanceName(STEPH_CURRY);
+            x.setJobStatus(Job.JobStatus.IN_PROGRESS);
+        });
+        Optional<ServiceInfo> optionalServiceInfo = getJobById(uuid);
+        assertThat(optionalServiceInfo.get().getServiceInstanceName(), equalTo(STEPH_CURRY));
+        assertThat(optionalServiceInfo.get().getJobStatus(), equalTo(Job.JobStatus.IN_PROGRESS));
+    }
+
+    private Optional<ServiceInfo> getJobById(UUID jobId) {
+        List<ServiceInfo> serviceInfoList = dataAccessService.getList(ServiceInfo.class, null);
+        return serviceInfoList.stream().filter(x -> jobId.equals(x.getJobId())).findFirst();
+    }
+
+    private UUID createJobAndServiceInfo() {
+        UUID uuid = UUID.randomUUID();
+        addNewJob(uuid);
+        ServiceInfo serviceInfo = new ServiceInfo();
+        serviceInfo.setServiceInstanceName("Lebron James");
+        serviceInfo.setJobId(uuid);
+        serviceInfo.setJobStatus(Job.JobStatus.PENDING);
+        dataAccessService.saveDomainObject(serviceInfo, getPropsMap());
+        return uuid;
+    }
+
+    @Test(expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE)
+    public void testUpdateServiceInfo_WithNonExisting_ThrowException() {
+        asyncInstantiationBL.updateServiceInfo(UUID.randomUUID(), x -> x.setServiceInstanceName("not matter"));
+    }
+
+    @Test(expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE)
+    public void testUpdateServiceInfo_WithDoubleServiceWithSameJobUuid_ThrowException() {
+        UUID uuid = createJobAndServiceInfo();
+        ServiceInfo serviceInfo = new ServiceInfo();
+        serviceInfo.setJobId(uuid);
+        dataAccessService.saveDomainObject(serviceInfo, getPropsMap());
+        asyncInstantiationBL.updateServiceInfo(UUID.randomUUID(), x -> x.setServiceInstanceName("not matter"));
+    }
+
+
+
+    @Test
+    public void testRequestPath_WithPauseFlagTrue_RequestPathIsAsExpected() {
+        ServiceInstantiation serviceInstantiationPauseFlagTrue = generateMockServiceInstantiationPayload(true, createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true));
+        String path = asyncInstantiationBL.getServiceInstantiationPath(serviceInstantiationPauseFlagTrue);
+        Assert.assertEquals(path, SystemProperties.getProperty("mso.restapi.serviceInstanceAssign"));
+    }
+
+    @Test
+    public void testRequestPath_WithPauseFlagFalse_RequestPathIsAsExpected() {
+        ServiceInstantiation serviceInstantiationPauseFlagFalse = generateMockServiceInstantiationPayload(false, createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true));
+        String path = asyncInstantiationBL.getServiceInstantiationPath(serviceInstantiationPauseFlagFalse);
+        Assert.assertEquals(path, SystemProperties.getProperty("mso.restapi.serviceInstanceCreate"));
+    }
+
+    @Test
+    public void createServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected() throws IOException {
+        createServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(true);
+    }
+
+    @Test
+    public void createServiceInfo_WithUserProvidedNamingFalseAndNoVfmodules_ServiceInfoIsAsExpected() throws IOException {
+        createServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(false);
+    }
+
+    private void createServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(boolean withVfmodules) throws IOException {
+        ServiceInstantiation serviceInstantiationPayload = generateMockServiceInstantiationPayload(true,
+                createVnfList(vfModuleInstanceParamsMapWithParamsToRemove, Collections.EMPTY_LIST, false),
+                1,
+                false,PROJECT_NAME, true);
+        URL resource;
+        if (withVfmodules) {
+            resource = this.getClass().getResource("/payload_jsons/bulk_service_request_ecomp_naming.json");
+        } else {
+            // remove the vf modules
+            serviceInstantiationPayload.getVnfs().values().forEach(vnf -> vnf.getVfModules().clear());
+            resource = this.getClass().getResource("/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json");
+        }
+
+        RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
+                asyncInstantiationBL.generateServiceInstantiationRequest(null, serviceInstantiationPayload, "az2016");
+
+        String expected = IOUtils.toString(resource, "UTF-8");
+        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
+    }
+
+    @Test
+    public void checkIfNullProjectNameSentToMso(){
+        ServiceInstantiation serviceInstantiationPayload = generateMockServiceInstantiationPayload(true,
+                createVnfList(vfModuleInstanceParamsMapWithParamsToRemove, Collections.EMPTY_LIST, false),
+                1,
+                false,null,false);
+        RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
+                asyncInstantiationBL.generateServiceInstantiationRequest(null, serviceInstantiationPayload, "az2016");
+        JsonNode jsonNode = new ObjectMapper().valueToTree(result.requestDetails);
+        Assert.assertTrue(jsonNode.get("project").isNull());
+        serviceInstantiationPayload = generateMockServiceInstantiationPayload(true,
+                createVnfList(vfModuleInstanceParamsMapWithParamsToRemove, Collections.EMPTY_LIST, false),
+                1,
+                false,"not null",false);
+        result = asyncInstantiationBL.generateServiceInstantiationRequest(null, serviceInstantiationPayload, "az2016");
+        jsonNode = new ObjectMapper().valueToTree(result.requestDetails);
+        Assert.assertTrue(jsonNode.get("project").get("projectName").asText().equalsIgnoreCase("not null"));
+
+
+
+    }
+
+    @Test
+    public void pushBulkJob_verifyCreatedDateBehavior_createdDateIsTheSameForAllServicesInSameBulk() {
+        LocalDateTime startTestDate = LocalDateTime.now().withNano(0);
+        final ServiceInstantiation request = generateMockServiceInstantiationPayload(
+                false,
+                createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true),
+                100, true,PROJECT_NAME, true
+        );
+
+        // in "createJob()" we will probe the service, with the generated names
+        final Job job = mock(Job.class);
+        when(job.getStatus()).thenReturn(PENDING);
+        when(jobAdapter.createJob(any(), any(), any(), any(), any())).thenReturn(job);
+
+        asyncInstantiationBL.pushBulkJob(request, "myUserId");
+        List<ServiceInfo> serviceInfoList = dataAccessService.getList(ServiceInfo.class, getPropsMap());
+
+        List<Date> creationDates = new ArrayList<>();
+        for (ServiceInfo serviceInfo : serviceInfoList) {
+            creationDates.add(serviceInfo.getCreatedBulkDate());
+        }
+        LocalDateTime endTestDate = LocalDateTime.now();
+
+        //creation date of all services is the same
+        Assert.assertTrue(creationDates.stream().distinct().count() <= 1);
+        LocalDateTime creationDate = fromDate(creationDates.get(0));
+        assertFalse(creationDate.isBefore(startTestDate));
+        assertFalse(creationDate.isAfter(endTestDate));
+    }
+
+    @DataProvider
+    public static Object[][] msoToJobStatusDataProvider() {
+        return new Object[][]{
+                {"IN_PROGRESS", JobStatus.IN_PROGRESS},
+                {"INPROGRESS", JobStatus.IN_PROGRESS},
+                {"IN ProGREsS", JobStatus.IN_PROGRESS},
+                {"JAMES_HARDEN", JobStatus.IN_PROGRESS},
+                {"FAILED", JobStatus.FAILED},
+                {"COMpleTE", JobStatus.COMPLETED},
+                {"PENDING", JobStatus.IN_PROGRESS},
+                {"Paused", JobStatus.PAUSE},
+                {"Pause", JobStatus.PAUSE},
+                {"PENDING_MANUAL_TASK", JobStatus.PAUSE},
+                {"UNLOCKED", JobStatus.IN_PROGRESS}
+        };
+    }
+
+    @Test(dataProvider = "msoToJobStatusDataProvider")
+    void whenGetStatusFromMso_calcRightJobStatus(String msoStatus, Job.JobStatus expectedJobStatus) {
+        AsyncRequestStatus asyncRequestStatus = asyncRequestStatusResponse(msoStatus);
+        assertThat(asyncInstantiationBL.calcStatus(asyncRequestStatus), equalTo(expectedJobStatus));
+    }
+
+    private void createNewAuditStatus(JobAuditStatus auditStatus)
+    {
+        Date createdDate= auditStatus.getCreated();
+        dataAccessService.saveDomainObject(auditStatus, getPropsMap());
+        setDateToStatus(auditStatus.getSource(), auditStatus.getJobStatus(), createdDate);
+    }
+
+
+
+    private static final String MSO_ARBITRARY_STATUS = "completed mso status";
+
+    @DataProvider
+    public static Object[][] auditStatuses(Method test) {
+        return new Object[][]{
+                {
+                        SourceStatus.VID,
+                        new String[]{ JobStatus.PENDING.toString(), JobStatus.IN_PROGRESS.toString()}
+                },
+                {       SourceStatus.MSO,
+                        new String[]{ JobStatus.IN_PROGRESS.toString(), MSO_ARBITRARY_STATUS }
+                }
+        };
+
+    }
+
+    private void setDateToStatus(SourceStatus source, String status, Date date) {
+        List<JobAuditStatus> jobAuditStatusList = dataAccessService.getList(JobAuditStatus.class, getPropsMap());
+        DaoUtils.tryWithSessionAndTransaction(sessionFactory, session -> {
+            jobAuditStatusList.stream()
+                    .filter(auditStatus -> source.equals(auditStatus.getSource()) && status.equals(auditStatus.getJobStatus()))
+                    .forEach(auditStatus -> {
+                        auditStatus.setCreated(date);
+                        session.saveOrUpdate(auditStatus);
+                    });
+            return 1;
+        });
+    }
+
+
+    @Test(dataProvider = "auditStatuses")
+    public void givenSomeAuditStatuses_getStatusesOfSpecificSourceAndJobId_getSortedResultsMatchingToParameters(SourceStatus expectedSource, String [] expectedSortedStatuses){
+        UUID jobUuid = UUID.randomUUID();
+        List<JobAuditStatus> auditStatusList = com.google.common.collect.ImmutableList.of(
+                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.VID, toDate(LocalDateTime.now().minusHours(2))),
+                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, UUID.randomUUID(),"",toDate(LocalDateTime.now().minusHours(30))),
+                new JobAuditStatus(jobUuid, MSO_ARBITRARY_STATUS, SourceStatus.MSO, UUID.randomUUID(),"",toDate(LocalDateTime.now().minusHours(3))),
+                new JobAuditStatus(jobUuid, PENDING.toString(), SourceStatus.VID, toDate(LocalDateTime.now().minusHours(3))),
+                new JobAuditStatus(UUID.randomUUID(), PENDING.toString(), SourceStatus.VID, toDate(LocalDateTime.now().minusHours(3))));
+        auditStatusList.forEach((auditStatus) -> createNewAuditStatus(auditStatus));
+        List<JobAuditStatus> statuses = asyncInstantiationBL.getAuditStatuses(jobUuid, expectedSource);
+        List<String> statusesList = statuses.stream().map(status -> status.getJobStatus()).collect(Collectors.toList());
+        Assert.assertTrue(statuses.stream().allMatch(status -> (status.getSource().equals(expectedSource)&& status.getJobId().equals(jobUuid))),"Only statuses of " + expectedSource + " for " + jobUuid + " should be returned. Returned statuses: " + String.join(",", statusesList ));
+        assertThat(statusesList, contains(expectedSortedStatuses));
+    }
+
+
+
+    @Test
+    public void addSomeVidStatuses_getThem_verifyGetInsertedWithoutDuplicates(){
+        ImmutableList<JobStatus> statusesToBeInserted = ImmutableList.of(PENDING, IN_PROGRESS, IN_PROGRESS, COMPLETED);
+        UUID jobUuid = UUID.randomUUID();
+        statusesToBeInserted.forEach(status->
+            {
+                asyncInstantiationBL.auditVidStatus(jobUuid, status);
+            });
+        List<String> statusesFromDB = asyncInstantiationBL.getAuditStatuses(jobUuid, SourceStatus.VID).stream().map(auditStatus -> auditStatus.getJobStatus()).collect(Collectors.toList());
+        List<String> statusesWithoutDuplicates = statusesToBeInserted.stream().distinct().map(x -> x.toString()).collect(Collectors.toList());
+        assertThat(statusesFromDB, is(statusesWithoutDuplicates));
+    }
+
+    @DataProvider
+    public static Object[][] msoAuditStatuses(Method test) {
+        UUID jobUuid = UUID.randomUUID();
+        UUID requestId = UUID.randomUUID();
+        return new Object[][]{
+                {
+                        jobUuid,
+                        ImmutableList.of(
+                                new JobAuditStatus(jobUuid, PENDING.toString(), SourceStatus.MSO, null, null),
+                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
+                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
+                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
+                                new JobAuditStatus(jobUuid, COMPLETED.toString(), SourceStatus.MSO, requestId, null)),
+                        ImmutableList.of(PENDING.toString(), IN_PROGRESS.toString(), COMPLETED.toString()),
+                        "All distinct statuses should be without duplicates"
+                },
+                {
+                        jobUuid,
+                        ImmutableList.of(
+                                new JobAuditStatus(jobUuid, PENDING.toString(), SourceStatus.MSO, null, null),
+                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
+                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, "aa"),
+                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, "aa"),
+                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, UUID.randomUUID(), "aa"),
+                                new JobAuditStatus(jobUuid, COMPLETED.toString(), SourceStatus.MSO, requestId, null)),
+                        ImmutableList.of(PENDING.toString(), IN_PROGRESS.toString(), IN_PROGRESS.toString(),IN_PROGRESS.toString(), COMPLETED.toString()),
+                        "Statuses should be without duplicates only with same requestId and additionalInfo"
+
+                }
+        };
+    }
+
+    @Test(dataProvider = "msoAuditStatuses")
+    public void addSomeMsoStatuses_getThem_verifyGetInsertedWithoutDuplicates(UUID jobUuid, ImmutableList<JobAuditStatus> msoStatuses, ImmutableList<String> expectedStatuses, String assertionReason) {
+        msoStatuses.forEach(status -> {
+            asyncInstantiationBL.auditMsoStatus(status.getJobId(), status.getJobStatus(), status.getRequestId() != null ? status.getRequestId().toString() : null, status.getAdditionalInfo());
+        });
+        List<String> statusesFromDB = asyncInstantiationBL.getAuditStatuses(jobUuid, SourceStatus.MSO).stream().map(auditStatus -> auditStatus.getJobStatus()).collect(Collectors.toList());
+        assertThat( assertionReason, statusesFromDB, is(expectedStatuses));
+    }
+
+    @Test
+    public void addSameStatusOfVidAndMso_verifyThatBothWereAdded(){
+        UUID jobUuid = UUID.randomUUID();
+        JobStatus sameStatus = IN_PROGRESS;
+        asyncInstantiationBL.auditMsoStatus(jobUuid, sameStatus.toString(),null,null);
+        asyncInstantiationBL.auditVidStatus(jobUuid, sameStatus);
+        List<JobAuditStatus> list = dataAccessService.getList(
+                JobAuditStatus.class,
+                String.format(" where JOB_ID = '%s'", jobUuid),
+                null, null);
+        Assert.assertEquals(list.size(),2);
+        assertThat(list,everyItem(hasProperty("jobStatus", is(sameStatus.toString()))));
+    }
+
+    @Test
+    public void verifyAsyncRequestStatus_canBeReadFromSample() throws IOException {
+        String body = "{" +
+                "  \"request\": {" +
+                "    \"requestId\": \"c0011670-0e1a-4b74-945d-8bf5aede1d9c\"," +
+                "    \"startTime\": \"Mon, 11 Dec 2017 07:27:49 GMT\"," +
+                "    \"requestScope\": \"service\"," +
+                "    \"requestType\": \"createInstance\"," +
+                "    \"instanceReferences\": {" +
+                "      \"serviceInstanceId\": \"f8791436-8d55-4fde-b4d5-72dd2cf13cfb\"," +
+                "      \"serviceInstanceName\": \"asdfasdf234234asdf\"," +
+                "      \"requestorId\": \"il883e\"" +
+                "    }," +
+                "    \"requestStatus\": {" +
+                "      \"requestState\": \"COMPLETE\"," +
+                "      \"statusMessage\": \"Service Instance was created successfully.\"," +
+                "      \"percentProgress\": 100," +
+                "      \"finishTime\": \"Mon, 11 Dec 2017 07:27:53 GMT\"" +
+                "    }" +
+                "  }" +
+                "}";
+        ObjectMapper objectMapper = new ObjectMapper();
+        AsyncRequestStatus asyncRequestStatus = objectMapper.readValue(body, AsyncRequestStatus.class);
+        assertThat(asyncRequestStatus.request.requestStatus.getRequestState(), equalTo("COMPLETE"));
+
+    }
+
+    @Test
+    public void deleteJobInfo_pending_deleted() {
+        doNothing().when(jobsBrokerService).delete(any());
+        UUID uuid = createServicesInfoWithDefaultValues(PENDING);
+        asyncInstantiationBL.deleteJob(uuid);
+        assertNotNull(asyncInstantiationBL.getServiceInfoByJobId(uuid).getDeletedAt(), "service info wasn't deleted");
+    }
+
+    @Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE)
+    public void deleteJobInfo_notAllowdStatus_shouldSendError() {
+        UUID uuid = createServicesInfoWithDefaultValues(COMPLETED);
+        doThrow(new IllegalStateException(DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE)).when(jobsBrokerService).delete(any());
+        try {
+            asyncInstantiationBL.deleteJob(uuid);
+        } catch (Exception e) {
+            assertNull(asyncInstantiationBL.getServiceInfoByJobId(uuid).getDeletedAt(), "service info shouldn't deleted");
+            throw e;
+        }
+    }
+
+    @DataProvider
+    public Object[][] jobStatusesFinal() {
+        return Arrays.stream(Job.JobStatus.values())
+                .filter(t -> ImmutableList.of(COMPLETED, FAILED, STOPPED).contains(t))
+                .map(v -> new Object[]{v}).collect(Collectors.toList()).toArray(new Object[][]{});
+    }
+
+    @Test(dataProvider = "jobStatusesFinal")
+    public void whenHideService_theServiceNotReturnedInServiceList(JobStatus jobStatus) {
+        UUID uuidToHide = createServicesInfoWithDefaultValues(jobStatus);
+        UUID uuidToShown = createServicesInfoWithDefaultValues(jobStatus);
+        List<UUID> serviceInfoList = listServicesUUID();
+        assertThat(serviceInfoList, hasItems(uuidToHide, uuidToShown));
+
+        asyncInstantiationBL.hideServiceInfo(uuidToHide);
+        serviceInfoList = listServicesUUID();
+        assertThat(serviceInfoList, hasItem(uuidToShown));
+        assertThat(serviceInfoList, not(hasItem(uuidToHide)));
+
+    }
+
+    protected List<UUID> listServicesUUID() {
+        return asyncInstantiationBL.getAllServicesInfo().stream().map(ServiceInfo::getJobId).collect(Collectors.toList());
+    }
+
+    @DataProvider
+    public Object[][] jobStatusesNotFinal() {
+        return Arrays.stream(Job.JobStatus.values())
+                .filter(t -> ImmutableList.of(PENDING, IN_PROGRESS, PAUSE).contains(t))
+                .map(v -> new Object[]{v}).collect(Collectors.toList()).toArray(new Object[][]{});
+    }
+
+    @Test(  dataProvider = "jobStatusesNotFinal",
+            expectedExceptions = OperationNotAllowedException.class,
+            expectedExceptionsMessageRegExp = "jobId.*Service status does not allow hide service, status = .*")
+    public void hideServiceInfo_notAllowedStatus_shouldSendError(JobStatus jobStatus) {
+        UUID uuid = createServicesInfoWithDefaultValues(jobStatus);
+        try {
+            asyncInstantiationBL.hideServiceInfo(uuid);
+        } catch (Exception e) {
+            assertFalse(asyncInstantiationBL.getServiceInfoByJobId(uuid).isHidden(), "service info shouldn't be hidden");
+            throw e;
+        }
+    }
+
+    @Test
+    public void whenUseGetCounterInMultiThreads_EachThreadGetDifferentCounter() throws InterruptedException {
+        int SIZE = 200;
+        ExecutorService executor = Executors.newFixedThreadPool(SIZE);
+        List<Callable<Integer>> tasks = IntStream.rangeClosed(1, SIZE)
+                .mapToObj(x-> ((Callable<Integer>)() -> asyncInstantiationBL.getCounterForName("a")))
+                .collect(Collectors.toList());
+        Set<Integer> expectedResults = IntStream.rangeClosed(1, SIZE).boxed().collect(Collectors.toSet());
+        executor.invokeAll(tasks)
+                .forEach(future -> {
+                    try {
+                        assertTrue( expectedResults.remove(future.get()), "got unexpected counter");
+                    }
+                    catch (Exception e) {
+                        throw new RuntimeException(e);
+                    }
+                });
+
+        assertThat(expectedResults.size(), is(0));
+    }
+
+    @Test
+    public void whenUseGetCounterForSameName_numbersReturnedByOrder() {
+
+        String name = UUID.randomUUID().toString();
+        int SIZE=10;
+        for (int i=1; i<=SIZE; i++) {
+            assertThat(asyncInstantiationBL.getCounterForName(name), is(i));
+        }
+    }
+
+    @Test
+    public void whenNamedInUsedInAai_getNextNumber() {
+        String name = someCommonStepsAndGetName();
+        ResourceType type = ResourceType.GENERIC_VNF;
+        when(aaiClient.searchNodeTypeByName(name+"_001", type)).thenReturn(aaiNodeQueryResponseNameUsed(type));
+        when(aaiClient.searchNodeTypeByName(name+"_002", type)).thenReturn(aaiNodeQueryResponseNameFree());
+        assertThat(asyncInstantiationBL.getUniqueName(name, type), equalTo(name+"_002"));
+    }
+
+    private String someCommonStepsAndGetName() {
+        mockAaiClientAaiStatusOK();
+        return UUID.randomUUID().toString();
+    }
+
+    private void mockAaiClientAaiStatusOK() {
+        when(aaiClient.searchNodeTypeByName(eq(AsyncInstantiationBusinessLogicImpl.NAME_FOR_CHECK_AAI_STATUS), any())).thenReturn(aaiNodeQueryResponseNameFree());
+    }
+
+    @Test(expectedExceptions=InvalidAAIResponseException.class)
+    public void whenAaiBadResponseCode_throwInvalidAAIResponseException() {
+        String name = someCommonStepsAndGetName();
+        ResourceType type = ResourceType.SERVICE_INSTANCE;
+        when(aaiClient.searchNodeTypeByName(name+"_001", type)).thenReturn(aaiNodeQueryBadResponse());
+        asyncInstantiationBL.getUniqueName(name, type);
+    }
+
+    @Test(expectedExceptions=MaxRetriesException.class)
+    public void whenAaiAlwaysReturnNameUsed_throwInvalidAAIResponseException() {
+        String name = someCommonStepsAndGetName();
+        ResourceType type = ResourceType.VF_MODULE;
+        when(aaiClient.searchNodeTypeByName(any(), eq(type))).thenReturn(aaiNodeQueryResponseNameUsed(type));
+        asyncInstantiationBL.setMaxRetriesGettingFreeNameFromAai(10);
+        asyncInstantiationBL.getUniqueName(name, type);
+    }
+
+    @Test
+    public void testFormattingOfNameAndCounter() {
+        AsyncInstantiationBusinessLogicImpl bl = (AsyncInstantiationBusinessLogicImpl) asyncInstantiationBL;
+        assertThat(bl.formatNameAndCounter("x", 3), equalTo("x_003"));
+        assertThat(bl.formatNameAndCounter("x", 99), equalTo("x_099"));
+        assertThat(bl.formatNameAndCounter("x", 100), equalTo("x_100"));
+        assertThat(bl.formatNameAndCounter("x", 1234), equalTo("x_1234"));
+    }*/
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/CsvServiceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/CsvServiceTest.java
new file mode 100644
index 0000000..1847e18
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/CsvServiceTest.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.vid.services;
+//import org.apache.commons.io.IOUtils;
+//import org.onap.vid.services.CsvServiceImpl;
+//import org.skyscreamer.jsonassert.JSONAssert;
+//import org.skyscreamer.jsonassert.JSONCompareMode;
+//import org.testng.Assert;
+//import org.testng.annotations.DataProvider;
+//import org.testng.annotations.Test;
+//import org.json.JSONObject;
+//
+//import javax.ws.rs.BadRequestException;
+//import java.io.IOException;
+//import java.lang.reflect.Method;
+//import java.net.URL;
+//import java.util.List;
+//
+//@Test
+//public class CsvServiceTest {
+//
+//    private CsvServiceImpl csvService = new CsvServiceImpl();
+//    private final static String CSV_FOLDER = "csv_files/{CSV_FILE}";
+//    private final static String VALID_CSV = "csv_to_json.csv";
+//    private final static String ONE_LINE_CSV = "one_line.csv";
+//    private final static String EMPTY_CSV = "empty_file.csv";
+//    private final static String MISSING_CONTENT_CSV = "missing_content.csv";
+//    private final static String MISSING_VALUES_CSV = "missing_values.csv";
+//
+//
+///*
+//    @Test
+//    public void parseValidCsv() throws IllegalAccessException, IOException, InstantiationException {
+//        String expectedJson = getExpectation("vnfConfigUpdatePayload.json");
+//        readAndParse(VALID_CSV,16,expectedJson);
+//
+//    }*/
+//
+//    private String getExpectation(String modelFileName) throws IOException {
+//        // load expected result
+//        final URL resource = this.getClass().getResource("/" + modelFileName);
+//        String expected = IOUtils.toString(resource, "UTF-8");
+//        return expected;
+//    }
+///*
+//    @Test
+//    public void parseOneLineCsv() throws IllegalAccessException, IOException, InstantiationException {
+//        String expectedJson ="{\"payload\":{\"request-parameters\":{\"vnf-name\":\"ibcx0099v\"}}}";
+//        readAndParse(ONE_LINE_CSV,1,expectedJson);
+//    }*/
+//
+//    @DataProvider
+//    public static Object[][] invalidFiles(Method test) {
+//        return new Object[][]{
+//                {MISSING_CONTENT_CSV}, {MISSING_VALUES_CSV}
+//        };
+//    }
+///*
+//    @Test(dataProvider = "invalidFiles", expectedExceptions = {BadRequestException.class}, expectedExceptionsMessageRegExp = "Invalid csv file")
+//    public void parseMissingContentCsv(String invalidFile) throws IllegalAccessException, IOException, InstantiationException {
+//        readAndParse(invalidFile, 2, null);
+//    }
+//
+//
+//    @Test
+//    public void parseEmptyCsv() throws IllegalAccessException, IOException, InstantiationException {
+//        String expectedJson ="{}";
+//        readAndParse(EMPTY_CSV,0,expectedJson);
+//    }
+//
+//    private void readAndParse(String fileName, int expectedNumRows, String expectedJson) throws IllegalAccessException, IOException, InstantiationException {
+//        final URL resource = CsvServiceTest.class.getClassLoader().getResource(CSV_FOLDER.replaceFirst("\\{CSV_FILE\\}", fileName));
+//        Assert.assertNotNull(resource, "The csv file was not found");
+//        List<String[]> content = csvService.readCsv(resource.getPath());
+//        Assert.assertEquals(content.size(), expectedNumRows, "The number of non-empty lines in file is wrong");
+//        JSONObject json = csvService.convertCsvToJson (content);
+//        JSONAssert.assertEquals(expectedJson, json, JSONCompareMode.STRICT);
+//
+//    }*/
+//
+//
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/JobsBrokerServiceTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/JobsBrokerServiceTest.java
new file mode 100644
index 0000000..e9f6f2a
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/JobsBrokerServiceTest.java
@@ -0,0 +1,625 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+//
+//import com.google.common.collect.ImmutableList;
+//import com.google.common.collect.ImmutableMap;
+//import org.apache.commons.lang.RandomStringUtils;
+//import org.apache.commons.lang3.RandomUtils;
+//import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+//import org.apache.commons.lang3.builder.ToStringStyle;
+//import org.hibernate.SessionFactory;
+//import org.onap.vid.exceptions.GenericUncheckedException;
+//import org.onap.vid.exceptions.OperationNotAllowedException;
+//import org.onap.vid.job.Job;
+//import org.onap.vid.job.JobAdapter;
+//import org.onap.vid.job.JobType;
+//import org.onap.vid.job.JobsBrokerService;
+//import org.onap.vid.job.impl.JobDaoImpl;
+//import org.onap.vid.job.impl.JobsBrokerServiceInDatabaseImpl;
+//import org.onap.vid.utils.DaoUtils;
+//import org.onap.vid.config.DataSourceConfig;
+//import org.onap.vid.config.JobAdapterConfig;
+//import org.onap.portalsdk.core.domain.support.DomainVo;
+//import org.onap.portalsdk.core.service.DataAccessService;
+//import org.onap.portalsdk.core.util.SystemProperties;
+//import org.springframework.test.context.ContextConfiguration;
+//import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+//import org.testng.Assert;
+//import org.testng.annotations.AfterMethod;
+//import org.testng.annotations.BeforeMethod;
+//import org.testng.annotations.DataProvider;
+//import org.testng.annotations.Test;
+//
+//import javax.inject.Inject;
+//import java.lang.reflect.Method;
+//import java.time.LocalDateTime;
+//import java.time.ZoneId;
+//import java.util.*;
+//import java.util.concurrent.*;
+//import java.util.stream.Collectors;
+//import java.util.stream.IntStream;
+//import java.util.stream.Stream;
+//
+//import static java.util.concurrent.TimeUnit.MILLISECONDS;
+//import static org.hamcrest.CoreMatchers.equalTo;
+//import static org.hamcrest.CoreMatchers.is;
+//import static org.hamcrest.MatcherAssert.assertThat;
+//import static org.hamcrest.Matchers.both;
+//import static org.hamcrest.Matchers.containsInAnyOrder;
+//import static org.onap.vid.job.Job.JobStatus.*;
+//import static org.onap.vid.utils.Streams.not;
+//import static org.testng.Assert.assertNotNull;
+//import static org.testng.AssertJUnit.assertEquals;
+//
+//@ContextConfiguration(classes = {DataSourceConfig.class, SystemProperties.class, JobAdapterConfig.class})
+//public class JobsBrokerServiceTest extends AbstractTestNGSpringContextTests {
+//
+//    private static final int JOBS_COUNT = 127;
+//    private static final boolean DELETED = true;
+//    private final ExecutorService executor = Executors.newFixedThreadPool(90);
+//
+//    private final Set<Long> threadsIds = new ConcurrentSkipListSet<>();
+//
+//    private final long FEW = 500;
+//
+//    private final String JOBS_SHOULD_MATCH = "the jobs that added and those that pulled must be the same";
+//    private final String JOBS_PEEKED_SHOULD_MATCH = "the jobs that added and those that peeked must be the same";
+//    private static final String DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE = "Service status does not allow deletion from the queue";
+//    private static final String DELETE_SERVICE_NOT_EXIST_EXCEPTION_MESSAGE = "Service does not exist";
+//    private JobsBrokerService broker;
+//
+//    @Inject
+//    JobAdapter jobAdapter;
+//    @Inject
+//    private DataAccessService dataAccessService;
+//    @Inject
+//    private SessionFactory sessionFactory;
+//
+//
+//    private class NoJobException extends RuntimeException {
+//    }
+//
+//    private Future<Job> newJobAsync(JobsBrokerService b) {
+//        return newJobAsync(b, createMockJob("user id"));
+//    }
+//
+//    private Future<Job> newJobAsync(JobsBrokerService b, Job.JobStatus status) {
+//        return newJobAsync(b, createMockJob("user id", status));
+//    }
+//
+//    private Job createMockJob(String userId) {
+//        return jobAdapter.createJob(
+//                JobType.NoOp,
+//                new JobAdapter.AsyncJobRequest() {
+//                    public int nothing = 42;
+//                },
+//                UUID.randomUUID(),
+//                userId,
+//                RandomUtils.nextInt());
+//    }
+//
+//    private Job createMockJob(String userId, Job.JobStatus jobStatus) {
+//        Job job = createMockJob(userId);
+//        job.setStatus(jobStatus);
+//        return job;
+//    }
+//
+//    private Future<Job> newJobAsync(JobsBrokerService b, Job job) {
+//        final Future<Job> jobFuture = executor.submit(() -> {
+//            accountThreadId();
+//
+//            b.add(job);
+//
+//            return job;
+//        });
+//        return jobFuture;
+//    }
+//
+//    private void pushBackJobAsync(JobsBrokerService b, Job job) {
+//        executor.submit(() -> {
+//            accountThreadId();
+//            b.pushBack(job);
+//            return job;
+//        });
+//    }
+//
+//    private Future<Optional<Job>> pullJobAsync(JobsBrokerService broker) {
+//        final Future<Optional<Job>> job = executor.submit(() -> {
+//            accountThreadId();
+//            // Pull only pending jobs, as H2 database does not support our SQL for in-progress jobs
+//            return broker.pull(Job.JobStatus.PENDING, UUID.randomUUID().toString());
+//        });
+//        return job;
+//    }
+//
+//    private Job waitForFutureOptionalJob(Future<Optional<Job>> retrievedOptionalJobFuture) {
+//        try {
+//            return retrievedOptionalJobFuture.get(FEW, MILLISECONDS).orElseThrow(NoJobException::new);
+//        } catch (TimeoutException | InterruptedException | ExecutionException e) {
+//            throw new RuntimeException(e);
+//        }
+//    }
+//
+//    private Job waitForFutureJob(Future<Job> retrievedJobFuture) {
+//        try {
+//            return retrievedJobFuture.get(FEW, MILLISECONDS);
+//        } catch (TimeoutException | InterruptedException | ExecutionException e) {
+//            throw new RuntimeException(e);
+//        }
+//    }
+//
+//    private List<Job> putAndGetALotOfJobs(JobsBrokerService broker) {
+//        final List<Job> originalJobs = putALotOfJobs(broker);
+//        final List<Job> retrievedJobs = getAlotOfJobs(broker);
+//
+//        assertThat(JOBS_SHOULD_MATCH, retrievedJobs, containsInAnyOrder(originalJobs.toArray()));
+//
+//        return retrievedJobs;
+//    }
+//
+//    private List<Job> putALotOfJobs(JobsBrokerService broker) {
+//        int n = JOBS_COUNT;
+//        return IntStream.range(0, n)
+//                .mapToObj(i -> newJobAsync(broker))
+//                .map(this::waitForFutureJob)
+//                .collect(Collectors.toList());
+//    }
+//
+//    private List<Job> getAlotOfJobs(JobsBrokerService broker) {
+//        int n = JOBS_COUNT;
+//        return IntStream.range(0, n)
+//                .mapToObj(i -> pullJobAsync(broker))
+//                .map(this::waitForFutureOptionalJob)
+//                .collect(Collectors.toList());
+//    }
+//
+//    private void pushBackJobs(List<Job> jobs, JobsBrokerService broker) {
+//        jobs.forEach(job -> pushBackJobAsync(broker, job));
+//    }
+//
+//    private void accountThreadId() {
+//        threadsIds.add(Thread.currentThread().getId());
+//    }
+//
+//    @AfterMethod
+//    public void threadsCounter() {
+//        System.out.println("participating threads count: " + threadsIds.size());
+//        threadsIds.clear();
+//    }
+//
+//    @BeforeMethod
+//    public void initializeBroker() {
+//        broker = new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, 200, 0);
+//        ((JobsBrokerServiceInDatabaseImpl) broker).deleteAll();
+//    }
+//
+//    @Test
+//    public void givenSingleJob_getIt_verifySameJob() {
+//        final Job originalJob = waitForFutureJob(newJobAsync(broker));
+//
+//        final Job retrievedJob = waitForFutureOptionalJob(pullJobAsync(broker));
+//        assertThat(JOBS_SHOULD_MATCH, retrievedJob, is(originalJob));
+//    }
+//
+//    @Test
+//    public void givenManyJobs_getJobsAndPushThemBack_alwaysSeeAllOfThemWithPeek() throws InterruptedException {
+//        final List<Job> originalJobs = putALotOfJobs(broker);
+//
+//        MILLISECONDS.sleep(FEW);
+//        assertThat(JOBS_PEEKED_SHOULD_MATCH, broker.peek(), containsInAnyOrder(originalJobs.toArray()));
+//
+//        final Job retrievedJob = waitForFutureOptionalJob(pullJobAsync(broker));
+//
+//        MILLISECONDS.sleep(FEW);
+//        assertThat(JOBS_PEEKED_SHOULD_MATCH, broker.peek(), containsInAnyOrder(originalJobs.toArray()));
+//
+//        pushBackJobAsync(broker, retrievedJob);
+//
+//        MILLISECONDS.sleep(FEW);
+//        assertThat(JOBS_PEEKED_SHOULD_MATCH, broker.peek(), containsInAnyOrder(originalJobs.toArray()));
+//    }
+//
+//    @Test
+//    public void givenManyJobs_getThemAll_verifySameJobs() {
+//        putAndGetALotOfJobs(broker);
+//    }
+//
+//    @Test
+//    public void givenManyJobs_getThemAllThenPushBackandGet_verifySameJobs() {
+//        final List<Job> retrievedJobs1 = putAndGetALotOfJobs(broker);
+//
+//        pushBackJobs(retrievedJobs1, broker);
+//        final List<Job> retrievedJobs2 = getAlotOfJobs(broker);
+//
+//        assertThat(JOBS_SHOULD_MATCH, retrievedJobs2, containsInAnyOrder(retrievedJobs1.toArray()));
+//    }
+//
+//    private static Date toDate(LocalDateTime localDateTime) {
+//        return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
+//    }
+//
+//    private void setModifiedDateToJob(UUID jobUuid, Date date) {
+//        DomainVo job = dataAccessService.getDomainObject(JobDaoImpl.class, jobUuid, DaoUtils.getPropsMap());
+//        job.setModified(date);
+//        DaoUtils.tryWithSessionAndTransaction(sessionFactory, session -> {
+//            session.saveOrUpdate(job);
+//            return 1;
+//        });
+//    }
+//
+//
+//    public static JobDaoImpl createNewJob(Integer indexInBulk, UUID templateId, String userId, Job.JobStatus status, String takenBy, LocalDateTime date) {
+//        return createNewJob(indexInBulk, templateId, userId, status, takenBy, date, false);
+//    }
+//
+//    public static JobDaoImpl createNewJob(Integer indexInBulk, UUID templateId, String userId, Job.JobStatus status, String takenBy, LocalDateTime date, boolean deleted){
+//        JobDaoImpl job = new JobDaoImpl();
+//        job.setTypeAndData(JobType.NoOp, ImmutableMap.of("x", RandomStringUtils.randomAlphanumeric(15)));
+//        job.setIndexInBulk(indexInBulk);
+//        job.setTemplateId(templateId);
+//        job.setType(JobType.NoOp);
+//        job.setStatus(status);
+//        job.setTakenBy(takenBy);
+//        job.setCreated(toDate(date));
+//        job.setModified(toDate(date));
+//        job.setUserId(userId);
+//        if (deleted) {
+//            job.setDeletedAt(new Date());
+//        }
+//        return job;
+//    }
+//
+//    @DataProvider
+//    public static Object[][] jobs(Method test) {
+//        LocalDateTime oldestDate = LocalDateTime.now().minusHours(30);
+//        UUID sameTemplate = UUID.randomUUID();
+//        return new Object[][]{
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", PENDING, null, oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userId", PENDING, null, oldestDate),
+//                        createNewJob(11, UUID.randomUUID(), "userId", PENDING, null, LocalDateTime.now().minusHours(2)),
+//                        createNewJob(44, UUID.randomUUID(), "userId", PENDING, null, LocalDateTime.now().minusHours(5))),
+//                        4,
+//                        0,
+//                        PENDING,
+//                        "Broker should pull the first pending job by oldest date then by job index"
+//                },
+//                { ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", COMPLETED,null, oldestDate),
+//                        createNewJob(11, UUID.randomUUID(), "userId", PENDING,null, oldestDate, DELETED),createNewJob(12, UUID.randomUUID(), "userId", FAILED,null, oldestDate),
+//                        createNewJob(13, UUID.randomUUID(), "userId", IN_PROGRESS,null, oldestDate),
+//                        createNewJob(14, UUID.randomUUID(), "userId", STOPPED,null, oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userId", PENDING,null, oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), "userId", PENDING,null, LocalDateTime.now().minusHours(2))),
+//                  6,
+//                  5,
+//                  PENDING,
+//                  "Broker should pull the only pending - first pending job by oldest job - ignore deleted,completed, failed, in-progress and stopped statuses"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userId", IN_PROGRESS, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), "userId", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        2,
+//                        -1,
+//                        PENDING,
+//                        "Broker should not pull any job when it exceeded mso limit with count (in-progress) statuses"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userId", PENDING, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), "userId", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        2,
+//                        -1,
+//                        PENDING,
+//                        "Broker should not pull any job when it exceeded mso limit with count(in-progress or pending && taken) statuses"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userId", PENDING, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), "userId", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        3,
+//                        2,
+//                        PENDING,
+//                        "Broker should pull first job when it doesn't exceeded mso limit with count(in-progress or pending && taken) statuses"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, sameTemplate, "userId", PENDING, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(22, sameTemplate, "userId", PENDING, null, oldestDate),
+//                        createNewJob(33, sameTemplate, "userId", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        3,
+//                        -1,
+//                        PENDING,
+//                        "Broker should not pull any job when there is another job from this template that was taken"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, sameTemplate, "userId", IN_PROGRESS, null, oldestDate),
+//                        createNewJob(22, sameTemplate, "userId", PENDING, null, oldestDate),
+//                        createNewJob(33, sameTemplate, "userId", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        3,
+//                        -1,
+//                        PENDING,
+//                        "Broker should not pull any job when there is another job from this template that in progress"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, sameTemplate, "userId", FAILED, null, oldestDate),
+//                        createNewJob(22, sameTemplate, "userId", STOPPED, null, oldestDate),
+//                        createNewJob(33, sameTemplate, "userId", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        3,
+//                        -1,
+//                        PENDING,
+//                        "Broker should not pull any job when there is another job from this template that was failed"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, sameTemplate, "userId", FAILED, null, oldestDate, DELETED),
+//                        createNewJob(22, sameTemplate, "userId", STOPPED,null, oldestDate),
+//                        createNewJob(33, sameTemplate, "userId", PENDING,null, LocalDateTime.now().minusHours(2))),
+//                   3,
+//                   2,
+//                   PENDING,
+//                   "Broker should pull pending job when there is another job from this template that was deleted, although failed"
+//                },
+//                { ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userA", IN_PROGRESS, null, oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userA", PENDING, null, oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), "userB", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        3,
+//                        2,
+//                        PENDING,
+//                        "Broker should prioritize jobs of user that has no in-progress jobs"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userA", PENDING, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userA", PENDING, null, oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), "userB", PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        3,
+//                        2,
+//                        PENDING,
+//                        "Broker should prioritize jobs of user that has no taken jobs"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userA", IN_PROGRESS, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userA", PENDING, null, LocalDateTime.now().minusHours(2)),
+//                        createNewJob(31, UUID.randomUUID(), "userB", IN_PROGRESS, null, LocalDateTime.now().minusHours(2)),
+//                        createNewJob(32, UUID.randomUUID(), "userB", IN_PROGRESS, null, LocalDateTime.now().minusHours(2)),
+//                        createNewJob(33, UUID.randomUUID(), "userB", PENDING, null, oldestDate)),
+//                        5,
+//                        4,
+//                        PENDING,
+//                        "Broker should take oldest job when there is one in-progress job to each user"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), UUID.randomUUID().toString(), IN_PROGRESS, null, oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), UUID.randomUUID().toString(), IN_PROGRESS, null, oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), UUID.randomUUID().toString(), PENDING, null, LocalDateTime.now().minusHours(2))),
+//                        2,
+//                        -1,
+//                        PENDING,
+//                        "Broker should not pull any job when it exceeded mso limit with count(in-progress or pending && taken) statuses"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS, UUID.randomUUID().toString(), oldestDate),
+//                        createNewJob(22, UUID.randomUUID(), "userId", IN_PROGRESS, null, oldestDate),
+//                        createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now().minusHours(2)),
+//                        createNewJob(44, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now().minusHours(5))),
+//                        20,
+//                        1,
+//                        IN_PROGRESS,
+//                        "Broker with in progress topic should pull the first in progress and not taken job by oldest date"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", COMPLETED, null, oldestDate),
+//                        createNewJob(12, UUID.randomUUID(), "userId", FAILED, null, oldestDate),
+//                        createNewJob(13, UUID.randomUUID(), "userId", PENDING,null, oldestDate),
+//                        createNewJob(14, UUID.randomUUID(), "userId", STOPPED,null, oldestDate),
+//                        createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS,null, oldestDate, DELETED),createNewJob(22, UUID.randomUUID(), "userId", IN_PROGRESS,null, oldestDate),
+//                        createNewJob(33, UUID.randomUUID(), "userId", IN_PROGRESS,null, LocalDateTime.now().minusHours(2))),
+//                  20,
+//                  5,
+//                  IN_PROGRESS,
+//                  "Broker with in progress topic should pull only in-progress jobs - first in-progress job by oldest date - ignore deleted,completed, failed, pending and stopped statuses"
+//                },
+//                {ImmutableList.of(
+//                        createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now()),
+//                        createNewJob(22, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now().minusSeconds(1)),
+//                        createNewJob(33, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now().minusSeconds(2))),
+//                        20,
+//                        -1,
+//                        IN_PROGRESS,
+//                        "Broker with in progress topic should not pull any job if its modified date is smaller than now-interval (20 seconds)"
+//                }
+//
+//        };
+//    }
+//
+//
+//    @Test(dataProvider = "jobs")
+//    public void givenSomeJobs_pullNextJob_returnNextOrNothingAsExpected(List<JobDaoImpl> jobs, int msoLimit, int expectedIndexSelected, Job.JobStatus topic, String assertionReason) {
+//        JobsBrokerServiceInDatabaseImpl broker = new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, msoLimit, 20);
+//        for (JobDaoImpl job : jobs) {
+//            Date modifiedDate = job.getModified();
+//            broker.add(job);
+//            setModifiedDateToJob(job.getUuid(), modifiedDate);
+//        }
+//        Optional<Job> nextJob = broker.pull(topic, UUID.randomUUID().toString());
+//        boolean shouldAnyBeSelected = expectedIndexSelected >= 0;
+//        Assert.assertEquals(nextJob.isPresent(), shouldAnyBeSelected, assertionReason);
+//        if (shouldAnyBeSelected) {
+//            Assert.assertEquals(jobs.get(expectedIndexSelected), nextJob.get(), assertionReason);
+//        }
+//    }
+//
+//    @DataProvider
+//    public Object[][] topics() {
+//        return Arrays.stream(Job.JobStatus.values())
+//                .filter(not(t -> ImmutableList.of(PENDING, IN_PROGRESS).contains(t)))
+//                .map(v -> new Object[]{v}).collect(Collectors.toList()).toArray(new Object[][]{});
+//    }
+//
+//    @Test(dataProvider = "topics", expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = "Unsupported topic.*")
+//    public void pullUnexpectedTopic_exceptionIsThrown(Job.JobStatus topic) {
+//        broker.pull(topic, UUID.randomUUID().toString());
+//    }
+//
+//    @Test(expectedExceptions = NoJobException.class)
+//    public void givenNonPendingJobs_getJobAsPendingTopic_verifyNothingRetrieved() {
+//        Stream.of(Job.JobStatus.values())
+//                .filter(not(s -> s.equals(PENDING)))
+//                .map(s -> createMockJob("some user id", s))
+//                .map(job -> newJobAsync(broker, job))
+//                .map(this::waitForFutureJob)
+//                .collect(Collectors.toList());
+//
+//        waitForFutureOptionalJob(pullJobAsync(broker));
+//    }
+//
+//    @Test
+//    public void givenPendingAndNonPendingJobs_getJobAsPendingTopic_verifyAJobRetrieved() {
+//        newJobAsync(broker); // this negated the expected result of the call below
+//        givenNonPendingJobs_getJobAsPendingTopic_verifyNothingRetrieved();
+//    }
+//
+//    @Test(expectedExceptions = NoJobException.class)
+//    public void givenManyJobs_pullThemAllAndAskOneMore_verifyFinallyNothingRetrieved() {
+//        putAndGetALotOfJobs(broker);
+//        waitForFutureOptionalJob(pullJobAsync(broker));
+//    }
+//
+//    @Test(expectedExceptions = NoJobException.class)
+//    public void givenNoJob_requestJob_verifyNothingRetrieved() throws InterruptedException, ExecutionException, TimeoutException {
+//        final Future<Optional<Job>> futureOptionalJob = pullJobAsync(broker);
+//        assertThat("job should not be waiting yet", futureOptionalJob.get(FEW, MILLISECONDS).isPresent(), is(false));
+//        waitForFutureOptionalJob(futureOptionalJob);
+//    }
+//
+//    @Test(expectedExceptions = IllegalStateException.class)
+//    public void givenSinglePulledJob_pushBackDifferentJob_verifyPushingRejected() {
+//        waitForFutureJob(newJobAsync(broker));
+//        waitForFutureJob(newJobAsync(broker));
+//        waitForFutureOptionalJob(pullJobAsync(broker));
+//
+//        Job myJob = createMockJob("user id");
+//        myJob.setUuid(UUID.randomUUID());
+//
+//        broker.pushBack(myJob); //Should fail
+//    }
+//
+//    @Test
+//    public void givenSingleJob_pushBackModifiedJob_verifyPulledIsVeryVeryTheSame() {
+//        final ImmutableMap<String, Object> randomDataForMostRecentJobType =
+//                ImmutableMap.of("42", 42, "complex", ImmutableList.of("a", "b", "c"));
+//
+//        waitForFutureJob(newJobAsync(broker));
+//        final Job job = waitForFutureOptionalJob(pullJobAsync(broker));
+//
+//        job.setStatus(Job.JobStatus.PENDING);
+//        job.setTypeAndData(JobType.NoOp, ImmutableMap.of("good", "morning"));
+//        job.setTypeAndData(JobType.HttpCall, ImmutableMap.of());
+//        job.setTypeAndData(JobType.ServiceInstantiation, randomDataForMostRecentJobType);
+//
+//        broker.pushBack(job);
+//        final Job retrievedJob = waitForFutureOptionalJob(pullJobAsync(broker));
+//
+//        assertThat(JOBS_SHOULD_MATCH, retrievedJob, is(job));
+//        assertThat(JOBS_SHOULD_MATCH, retrievedJob.getData(), both(equalTo(job.getData())).and(equalTo(randomDataForMostRecentJobType)));
+//        assertThat(JOBS_SHOULD_MATCH, jobDataReflected(retrievedJob), is(jobDataReflected(job)));
+//    }
+//
+//    private static String jobDataReflected(Job job) {
+//        return new ReflectionToStringBuilder(job, ToStringStyle.SHORT_PREFIX_STYLE)
+//                .setExcludeFieldNames("created", "modified", "takenBy")
+//                .toString();
+//    }
+//
+//    @Test(expectedExceptions = IllegalStateException.class)
+//    public void givenSingleJob_pushBackTwice_verifyPushingRejected() {
+//        waitForFutureJob(newJobAsync(broker));
+//        final Job job = waitForFutureOptionalJob(pullJobAsync(broker));
+//
+//        broker.pushBack(job);
+//        broker.pushBack(job); //Should fail
+//    }
+//
+//    @Test
+//    public void addJob_PeekItById_verifySameJobWasPeeked() {
+//        String userId = UUID.randomUUID().toString();
+//        Job myJob = createMockJob(userId);
+//        UUID uuid = broker.add(myJob);
+//        Job peekedJob = broker.peek(uuid);
+//        assertEquals("added testId is not the same as peeked TestsId",
+//                userId,
+//                peekedJob.getData().get("userId"));
+//    }
+//
+//    @Test(dataProvider = "jobStatusesForSuccessDelete", expectedExceptions = NoJobException.class)
+//       public void givenOneJob_deleteIt_canPeekOnItButCantPull(Job.JobStatus status) {
+//        final Job job = waitForFutureJob(newJobAsync(broker, status));
+//        broker.delete(job.getUuid());
+//        assertNotNull(((JobDaoImpl) broker.peek(job.getUuid())).getDeletedAt(), "job should be deleted");
+//        waitForFutureOptionalJob(pullJobAsync(broker));
+//    }
+//
+//    @DataProvider
+//    public static Object[][] jobStatusesForSuccessDelete() {
+//        return new Object[][]{
+//                {PENDING},
+//                {STOPPED}
+//        };
+//    }
+//
+//    @Test(
+//            dataProvider = "jobStatusesForFailedDelete",
+//            expectedExceptions = OperationNotAllowedException.class,
+//            expectedExceptionsMessageRegExp=DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE
+//    )
+//    public void deleteJob_notAllowedStatus_exceptionIsThrown(Job.JobStatus status, boolean taken) {
+//        final Job job = waitForFutureJob(newJobAsync(broker, createMockJob("some user id", status)));
+//
+//        if (taken) {
+//            waitForFutureOptionalJob(pullJobAsync(broker));
+//        }
+//
+//
+//        broker.delete(job.getUuid());
+//    }
+//
+//    @DataProvider
+//    public static Object[][] jobStatusesForFailedDelete() {
+//        return new Object[][]{
+//                {PENDING, true},
+//                {IN_PROGRESS, false},
+//                {COMPLETED, false},
+//                {PAUSE, false},
+//                {FAILED, false},
+//        };
+//    }
+//
+//    @Test(expectedExceptions = OperationNotAllowedException.class, expectedExceptionsMessageRegExp = DELETE_SERVICE_NOT_EXIST_EXCEPTION_MESSAGE)
+//    public void deleteJob_notExist_exceptionIsThrown() {
+//        waitForFutureJob(newJobAsync(broker, createMockJob("some user id", PENDING)));
+//        broker.delete(new UUID(111, 111));
+//    }
+//
+//}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/PortDetailsTranslatorTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/PortDetailsTranslatorTest.java
new file mode 100644
index 0000000..f9db3ce
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/PortDetailsTranslatorTest.java
@@ -0,0 +1,305 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableList;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.onap.osam.aai.model.AaiGetPortMirroringSourcePorts;
+import org.onap.osam.aai.model.PortDetailsTranslator;
+import org.onap.osam.aai.model.RelatedTo;
+import org.onap.osam.aai.model.SimpleResult;
+import org.onap.osam.properties.Features;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import org.togglz.core.manager.FeatureManager;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.hamcrest.collection.IsEmptyCollection.empty;
+import static org.mockito.Mockito.when;
+
+public class PortDetailsTranslatorTest {
+
+    private static final ObjectMapper om = new ObjectMapper();
+
+    @InjectMocks
+    private PortDetailsTranslator portDetailsTranslator = new PortDetailsTranslator();
+
+    @Mock
+    private FeatureManager featureManager;
+
+    @BeforeMethod
+    public void initMocks() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        when(featureManager.isActive(Features.FLAG_ADVANCED_PORTS_FILTER)).thenReturn(true);
+    }
+
+    @Test
+    public void extractPortDetailsFromProperties_givenValidAaiResponse() throws IOException {
+
+        final String aaiResponse  = "{\n" +
+                "    \"results\": [\n" +
+                "        {\n" +
+                "            \"id\": \"4876980240\",\n" +
+                "            \"node-type\": \"l-interface\",\n" +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "            \"properties\": {\n" +
+                "                \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" +
+                "                \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" +
+                "                \"is-port-mirrored\": false,\n" +
+                "                \"resource-version\": \"1519383879190\",\n" +
+                "                \"in-maint\": false,\n" +
+                "                \"is-ip-unnumbered\": false\n" +
+                "            }\n" +
+                "        }\n" +
+                "    ]\n" +
+                "}";
+
+        AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class);
+
+
+        PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(), aaiResponse);
+
+        assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsOk.class)));
+
+        PortDetailsTranslator.PortDetailsOk portDetailsOk = (PortDetailsTranslator.PortDetailsOk) portDetails;
+        assertThat(portDetailsOk.getInterfaceName(), is("zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib"));
+        assertThat(portDetailsOk.getInterfaceId(), is("6de7bf87-6faa-4984-9492-18d1188b3d4a"));
+        assertThat(portDetailsOk.getIsPortMirrored(), is(false));
+    }
+
+    @Test
+    public void extractPortDetailsFromProperties_givenAaiResponseWithInstanceNameNull_yieldException() throws IOException {
+        final String aaiResponse  = "{\n" +
+                "    \"results\": [\n" +
+                "        {\n" +
+                "            \"id\": \"4876980240\",\n" +
+                "            \"node-type\": \"l-interface\",\n" +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "            \"properties\": {\n" +
+                "                \"interface-name\": null,\n" +
+                "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" +
+                "                \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" +
+                "                \"is-port-mirrored\": false,\n" +
+                "                \"resource-version\": \"1519383879190\",\n" +
+                "                \"in-maint\": false,\n" +
+                "                \"is-ip-unnumbered\": false\n" +
+                "            }\n" +
+                "        }\n" +
+                "    ]\n" +
+                "}";
+
+        AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class);
+        PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse);
+
+        assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class)));
+
+        PortDetailsTranslator.PortDetailsError portDetailsError = (PortDetailsTranslator.PortDetailsError) portDetails;
+        assertThat(portDetailsError.getErrorDescription(), is("Value of 'interface-name' is missing."));
+        assertThat(portDetailsError.getRawAaiResponse(), is(aaiResponse));
+    }
+
+    @Test
+    public void extractPortDetailsFromProperties_givenAaiResponseWithInstanceIdNull_yieldException() throws IOException {
+        final String aaiResponse  = "{\n" +
+                "    \"results\": [\n" +
+                "        {\n" +
+                "            \"id\": \"4876980240\",\n" +
+                "            \"node-type\": \"l-interface\",\n" +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "            \"properties\": {\n" +
+                "                \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"interface-id\": null,\n" +
+                "                \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" +
+                "                \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" +
+                "                \"is-port-mirrored\": false,\n" +
+                "                \"resource-version\": \"1519383879190\",\n" +
+                "                \"in-maint\": false,\n" +
+                "                \"is-ip-unnumbered\": false\n" +
+                "            }\n" +
+                "        }\n" +
+                "    ]\n" +
+                "}";
+
+        AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class);
+        PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse);
+
+        assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class)));
+
+        PortDetailsTranslator.PortDetailsError portDetailsError = (PortDetailsTranslator.PortDetailsError) portDetails;
+        assertThat(portDetailsError.getErrorDescription(), is("Value of 'interface-id' is missing."));
+        assertThat(portDetailsError.getRawAaiResponse(), is(aaiResponse));
+    }
+
+    @Test
+    public void extractPortDetailsFromProperties_givenAaiResponseWithEmptyInstanceId_yieldException() throws IOException {
+        final String aaiResponse  = "{\n" +
+                "    \"results\": [\n" +
+                "        {\n" +
+                "            \"id\": \"4876980240\",\n" +
+                "            \"node-type\": \"l-interface\",\n" +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "            \"properties\": {\n" +
+                "                \"interface-name\": \"\",\n" +
+                "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" +
+                "                \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" +
+                "                \"is-port-mirrored\": false,\n" +
+                "                \"resource-version\": \"1519383879190\",\n" +
+                "                \"in-maint\": false,\n" +
+                "                \"is-ip-unnumbered\": false\n" +
+                "            }\n" +
+                "        }\n" +
+                "    ]\n" +
+                "}";
+
+        AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class);
+        PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse);
+
+        assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class)));
+
+        PortDetailsTranslator.PortDetailsError portDetailsError = (PortDetailsTranslator.PortDetailsError) portDetails;
+        assertThat(portDetailsError.getErrorDescription(), is("Value of 'interface-name' is empty."));
+        assertThat(portDetailsError.getRawAaiResponse(), is(aaiResponse));
+    }
+
+    @Test
+    public void extractPortDetailsFromProperties_givenAaiResponseWithIsPortMirroredNull_yieldException() throws IOException {
+        final String aaiResponse  = "{\n" +
+                "    \"results\": [\n" +
+                "        {\n" +
+                "            \"id\": \"4876980240\",\n" +
+                "            \"node-type\": \"l-interface\",\n" +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "            \"properties\": {\n" +
+                "                \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" +
+                "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" +
+                "                \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" +
+                "                \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" +
+                "                \"is-port-mirrored\": null,\n" +
+                "                \"resource-version\": \"1519383879190\",\n" +
+                "                \"in-maint\": false,\n" +
+                "                \"is-ip-unnumbered\": false\n" +
+                "            }\n" +
+                "        }\n" +
+                "    ]\n" +
+                "}";
+
+        AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class);
+        PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse);
+
+        assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class)));
+
+        PortDetailsTranslator.PortDetailsError portDetailsError = (PortDetailsTranslator.PortDetailsError) portDetails;
+        assertThat(portDetailsError.getErrorDescription(), is("Value of 'is-port-mirrored' is missing."));
+        assertThat(portDetailsError.getRawAaiResponse(), is(aaiResponse));
+    }
+
+    @Test
+    public void getFilteredPortList_givenEmptyList_ReturnEmptyList() {
+
+        final ImmutableList<SimpleResult> input = ImmutableList.of();
+
+        List<SimpleResult> result = portDetailsTranslator.getFilteredPortList(input);
+        assertThat("List size if different than expected", result, is(empty()));
+    }
+
+    @DataProvider
+    public static Object[][] trueAndFalse() {
+        return new Object[][]{
+                { Boolean.TRUE }, { Boolean.FALSE }
+        };
+    }
+
+    @Test(dataProvider = "trueAndFalse")
+    public void getFilteredPortList_givenFeatureFlagIsOff_returnAllLInterfaces(Boolean advancedPortsFilterFlag) throws IOException {
+        when(featureManager.isActive(Features.FLAG_ADVANCED_PORTS_FILTER)).thenReturn(advancedPortsFilterFlag);
+
+        final String relationshipLabelSource = "org.onap.relationships.inventory.Source";
+        final String nodeTypeLInterface = "l-interface";
+
+        SimpleResult lInterfaceWithSource =
+                buildSimpleResult(nodeTypeLInterface, relationshipLabelSource);
+        SimpleResult lInterfaceWithTwoSources =
+                buildSimpleResult(nodeTypeLInterface, relationshipLabelSource, relationshipLabelSource);
+        SimpleResult lInterfaceWithSourceAndMore =
+                buildSimpleResult(nodeTypeLInterface, relationshipLabelSource, "not a source");
+        SimpleResult lInterfaceWithoutSource =
+                buildSimpleResult(nodeTypeLInterface, "not a source");
+        SimpleResult lInterfaceWithoutRelations =
+                buildSimpleResult(nodeTypeLInterface);
+        SimpleResult fooTypeWithSource =
+                buildSimpleResult("not an l-interface", relationshipLabelSource);
+        SimpleResult fooTypeWithoutSource =
+                buildSimpleResult("not an l-interface", "not a source");
+
+        final ImmutableList<SimpleResult> input = ImmutableList.of(
+                fooTypeWithSource, fooTypeWithoutSource,
+                lInterfaceWithTwoSources, lInterfaceWithSourceAndMore,
+                lInterfaceWithoutSource, lInterfaceWithSource,
+                lInterfaceWithoutRelations);
+
+        List<SimpleResult> result = portDetailsTranslator.getFilteredPortList(input);
+
+        if (advancedPortsFilterFlag) {
+            assertThat("List should contain all l-interfaces with a related source", result, containsInAnyOrder(
+                    lInterfaceWithSource, lInterfaceWithSourceAndMore,
+                    lInterfaceWithTwoSources));
+        } else {
+            assertThat("List should contain all l-interfaces", result, containsInAnyOrder(
+                    lInterfaceWithSource, lInterfaceWithoutSource,
+                    lInterfaceWithoutRelations, lInterfaceWithSourceAndMore,
+                    lInterfaceWithTwoSources));
+        }
+    }
+
+    private SimpleResult buildSimpleResult(String nodeType, String... relationshipLabels) {
+        SimpleResult simpleResult = new SimpleResult();
+        simpleResult.setNodeType(nodeType);
+        simpleResult.setRelatedTo(Stream.of(relationshipLabels).map(label ->
+                new RelatedTo("my foo id", label, "logical-link", "foo url"))
+                .collect(Collectors.toList())
+        );
+        return simpleResult;
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/RoleGenaratorServiceImplTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/RoleGenaratorServiceImplTest.java
new file mode 100644
index 0000000..8e3f5b0
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/RoleGenaratorServiceImplTest.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import org.junit.Test;
+
+public class RoleGenaratorServiceImplTest {
+
+    private RoleGenaratorServiceImpl createTestSubject() {
+        return new RoleGenaratorServiceImpl();
+    }
+
+    @Test
+    public void testGenerateRoleScript() throws Exception {
+        RoleGenaratorServiceImpl testSubject;
+        Boolean firstRun = null;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.generateRoleScript(firstRun);
+    }
+
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/services/WorkflowServiceImplTest.java b/onap-enabler-be/src/test/java/org/onap/osam/services/WorkflowServiceImplTest.java
new file mode 100644
index 0000000..83e3652
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/services/WorkflowServiceImplTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.services;
+
+import java.util.*;
+
+import org.junit.Test;
+
+public class WorkflowServiceImplTest {
+
+    private WorkflowServiceImpl createTestSubject() {
+        return new WorkflowServiceImpl();
+    }
+
+    @Test
+    public void testGetWorkflowsForVNFs() throws Exception {
+        WorkflowServiceImpl testSubject;
+        Collection<String> vnfNames = new ArrayList<String>();
+        Collection<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflowsForVNFs(vnfNames);
+    }
+
+    @Test
+    public void testGetAllWorkflows() throws Exception {
+        WorkflowServiceImpl testSubject;
+        Collection<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAllWorkflows();
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/testUtils/IntersectionTest.java b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/IntersectionTest.java
new file mode 100644
index 0000000..a4d4f22
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/IntersectionTest.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.testUtils;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.osam.utils.Intersection;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class IntersectionTest {
+
+    @Test
+    public void testFourArrays(){
+        List<String> l1 = new ArrayList<String>();
+        l1.add("1");
+        l1.add("2");
+
+        List<String> l2 = new ArrayList<String>();
+        l2.add("2");
+        l2.add("3");
+
+        List<String> l3 = new ArrayList<String>();
+        l3.add("2");
+        l3.add("4");
+
+        List<String> l4 = new ArrayList<String>();
+        l4.add("2");
+        l4.add("5");
+
+        List<List<String>> all = new ArrayList<>();
+        all.add(l1);
+        all.add(l2);
+        all.add(l3);
+        all.add(l4);
+        Intersection<String> m = new Intersection<>();
+        List<String> ans = m.intersectMultipileArray(all);
+        Assert.assertEquals(1,ans.size());
+        Assert.assertEquals(ans.get(0),"2");
+
+    }
+
+
+
+    @Test
+    public void testTwoArrays(){
+        List<String> l1 = new ArrayList<String>();
+        l1.add("1");
+        l1.add("2");
+
+        List<String> l2 = new ArrayList<String>();
+        l2.add("2");
+        l2.add("3");
+
+        List<List<String>> all = new ArrayList<>();
+        all.add(l1);
+        all.add(l2);
+        Intersection<String> m = new Intersection<>();
+        List<String> l3 = m.intersectMultipileArray(all);
+        Assert.assertEquals(l3.size(),1);
+        Assert.assertEquals(l3.get(0),"2");
+
+    }
+
+
+    @Test
+    public void testNoIntersection(){
+        List<String> l1 = new ArrayList<String>();
+        l1.add("1");
+        l1.add("2");
+
+        List<String> l2 = new ArrayList<String>();
+        l2.add("3");
+        l2.add("4");
+
+        List<List<String>> all = new ArrayList<>();
+        all.add(l1);
+        all.add(l2);
+        Intersection<String> m = new Intersection<>();
+        List<String> l3 = m.intersectMultipileArray(all);
+        Assert.assertEquals(l3.size(),0);
+
+    }
+
+    @Test
+    public void testOneArrays(){
+        List<String> l1 = new ArrayList<String>();
+        l1.add("1");
+        l1.add("2");
+        List<List<String>> all = new ArrayList<>();
+        all.add(l1);
+        Intersection<String> m = new Intersection<>();
+        List<String> l3 = m.intersectMultipileArray(all);
+        Assert.assertEquals(l3.size(),2);
+        Assert.assertEquals(l3.get(0),"1");
+        Assert.assertEquals(l3.get(1),"2");
+
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/testUtils/RegExMatcher.java b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/RegExMatcher.java
new file mode 100644
index 0000000..be5702e
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/RegExMatcher.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.testUtils;
+
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
+
+public class RegExMatcher extends TypeSafeMatcher<String> {
+
+    private final String regEx;
+
+    public RegExMatcher(String regEx) {
+        this.regEx = regEx;
+    }
+
+
+    @Override
+    public void describeTo(Description description) {
+        description.appendText("matches regEx="+regEx);
+    }
+
+
+    @Override
+    protected boolean matchesSafely(String item) {
+        return item.matches(regEx);
+    }
+
+    public static RegExMatcher matchesRegEx(final String regEx) {
+        return new RegExMatcher(regEx);
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/testUtils/StubServerUtil.java b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/StubServerUtil.java
new file mode 100644
index 0000000..ea2f896
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/StubServerUtil.java
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.testUtils;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.xebialabs.restito.semantics.Action;
+import com.xebialabs.restito.semantics.Call;
+import com.xebialabs.restito.semantics.Condition;
+import com.xebialabs.restito.server.StubServer;
+
+import java.util.List;
+
+import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp;
+import static com.xebialabs.restito.semantics.Action.contentType;
+import static com.xebialabs.restito.semantics.Action.stringContent;
+
+public class StubServerUtil {
+
+    private static final String APPLICATION_JSON = "application/json";
+    private ObjectMapper objectMapper;
+
+
+    private StubServer stubServer;
+
+    public StubServerUtil() {
+        this.objectMapper = new ObjectMapper();
+        this.stubServer = new StubServer();
+    }
+
+
+    public void runServer() {
+        stubServer.run();
+    }
+
+    public void runSecuredServer(){
+        stubServer.secured().run();
+    }
+
+    public void stopServer() {
+        stubServer.stop();
+    }
+
+
+    public String constructTargetUrl(String protocol, String relativePath) {
+        return String.format("%s://localhost:%s/%s", protocol, stubServer.getPort(), relativePath);
+    }
+
+    public void prepareGetCall(String path, Action actionToReturn,Object returnObj, Action expectedAction, String contentType) throws JsonProcessingException {
+        whenHttp(stubServer)
+                .match(Condition.get(path))
+                .then(expectedAction, actionToReturn, contentType(contentType));
+    }
+
+
+    public void prepareGetCall(String path, Object returnObj, Action expectedAction) throws JsonProcessingException {
+        prepareGetCall(path, jsonContent(returnObj),returnObj, expectedAction, APPLICATION_JSON);
+    }
+
+    public void prepareDeleteCall(String path, Object returnObj, Action expectedAction) throws JsonProcessingException {
+        whenHttp(stubServer)
+                .match(Condition.delete(path))
+                .then(expectedAction, jsonContent(returnObj), contentType(APPLICATION_JSON));
+    }
+
+    public void preparePostCall(String path, Object returnObj, Action expectedAction) throws JsonProcessingException {
+        whenHttp(stubServer)
+                .match(Condition.post(path),
+                        Condition.withPostBodyContaining(objectMapper.writeValueAsString(returnObj)))
+                .then(expectedAction, jsonContent(returnObj), contentType(APPLICATION_JSON));
+    }
+
+    public void preparePutCall(String path, Object returnObj, Action expectedStatus) throws JsonProcessingException {
+        whenHttp(stubServer)
+                .match(Condition.put(path),
+                        Condition.withPostBodyContaining(objectMapper.writeValueAsString(returnObj)))
+                .then(expectedStatus, jsonContent(returnObj), contentType(APPLICATION_JSON));
+    }
+
+    public List<Call> getServerCalls() {
+        return stubServer.getCalls();
+    }
+
+    private Action jsonContent(Object returnObj) throws JsonProcessingException {
+        return stringContent(objectMapper.writeValueAsString(returnObj));
+    }
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/testUtils/TestUtils.java b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/TestUtils.java
new file mode 100644
index 0000000..64c985b
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/testUtils/TestUtils.java
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.testUtils;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableList;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.junit.Assert;
+import org.mockito.MockSettings;
+import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+
+import static fj.parser.Parser.fail;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.*;
+
+public class TestUtils {
+
+    public static void assertJsonStringEqualsIgnoreNulls(String expected, String actual) {
+        if (expected == null || expected == JSONObject.NULL) {return;}
+
+        JSONObject expectedJSON = new JSONObject(expected);
+        JSONObject actualJSON = new JSONObject(actual);
+        Iterator<?> keys = expectedJSON.keys();
+
+        while( keys.hasNext() ) {
+            String key = (String)keys.next();
+            Object expectedValue = expectedJSON.get(key);
+            if (expectedValue == JSONObject.NULL){
+                continue;
+            }
+
+            Object actualValue = actualJSON.get(key);
+
+            if (expectedValue instanceof JSONObject) {
+                String expectedVal = expectedValue.toString();
+                String actualVal = actualValue.toString();
+                assertJsonStringEqualsIgnoreNulls(expectedVal, actualVal);
+            }
+            else if (expectedValue instanceof JSONArray) {
+                if (actualValue instanceof JSONArray) {
+                    JSONArray expectedJSONArray = (JSONArray)expectedValue;
+                    JSONArray actualJSONArray = (JSONArray)actualValue;
+                    for (int i = 0; i < expectedJSONArray.length(); i++) {
+                        String expectedItem = expectedJSONArray.get(i).toString();
+                        String actualItem = actualJSONArray.get(i).toString();
+                        if (expectedValue instanceof JSONObject)
+                            assertJsonStringEqualsIgnoreNulls(expectedItem, actualItem);
+                    }
+                }
+                else {
+                    fail("expected: " + expectedValue + " got:" + actualValue);
+                }
+            }
+            else {
+                Assert.assertEquals(expectedValue, actualValue);
+            }
+        }
+    }
+
+    public static <T> T readJsonResourceFileAsObject(String pathInResource, Class<T> valueType) throws IOException {
+        return readJsonResourceFileAsObject(pathInResource, valueType, false);
+    }
+
+    public static <T> T readJsonResourceFileAsObject(String pathInResource, Class<T> valueType, boolean ignoreUnknownProperties)
+            throws IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, ignoreUnknownProperties);
+        return objectMapper.readValue(
+                TestUtils.class.getResource(pathInResource),
+                valueType);
+    }
+
+
+    public static class JavaxRsClientMocks {
+        private final javax.ws.rs.client.Client fakeClient;
+        private final javax.ws.rs.client.Invocation.Builder fakeBuilder;
+        private final Response fakeResponse;
+
+        public javax.ws.rs.client.Client getFakeClient() {
+            return fakeClient;
+        }
+
+        public javax.ws.rs.client.Invocation.Builder getFakeBuilder() {
+            return fakeBuilder;
+        }
+
+        public Response getFakeResponse() {
+            return fakeResponse;
+        }
+
+        public JavaxRsClientMocks() {
+            final MockSettings mockSettings = withSettings().defaultAnswer(new TriesToReturnMockByType());
+
+            fakeClient = mock(javax.ws.rs.client.Client.class, mockSettings);
+            fakeBuilder = mock(javax.ws.rs.client.Invocation.Builder.class, mockSettings);
+            fakeResponse = mock(Response.class, mockSettings);
+            final javax.ws.rs.client.WebTarget fakeWebTarget = mock(javax.ws.rs.client.WebTarget.class, mockSettings);
+
+            TriesToReturnMockByType.setAvailableMocks(
+                    fakeClient,
+                    fakeWebTarget,
+                    fakeBuilder,
+                    fakeResponse
+            );
+
+            Mockito.when(fakeBuilder.get(any(Class.class))).thenReturn(null);
+            Mockito.when(fakeBuilder.get(eq(InputStream.class))).thenReturn(new ByteArrayInputStream(new byte[]{}));
+            Mockito.when(fakeBuilder.get(any(GenericType.class))).thenReturn(null);
+
+            Mockito.when(fakeResponse.getStatus()).thenReturn(200);
+            Mockito.when(fakeResponse.getStatusInfo()).thenReturn(Response.Status.OK);
+        }
+    }
+
+    /*
+       inspired out from newer Mockito version
+        returns a mock from given list if it's a matching return-type
+    */
+    private static class TriesToReturnMockByType implements Answer<Object>, Serializable {
+        private final Answer<Object> defaultReturn = RETURNS_DEFAULTS;
+        private static List<Object> availableMocks = ImmutableList.of();
+
+        static void setAvailableMocks(Object... mocks) {
+            availableMocks = ImmutableList.copyOf(mocks);
+        }
+
+        public Object answer(InvocationOnMock invocation) throws Throwable {
+            Class<?> methodReturnType = invocation.getMethod().getReturnType();
+
+            return availableMocks.stream()
+                    .filter(mock -> methodReturnType.isAssignableFrom(mock.getClass()))
+                    //.peek(m -> System.out.println("found a mock: " + m.getClass().getName()))
+                    .findFirst()
+                    .orElse(defaultReturn.answer(invocation));
+        }
+    }
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/utils/LoggingTest.java b/onap-enabler-be/src/test/java/org/onap/osam/utils/LoggingTest.java
new file mode 100644
index 0000000..252a638
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/utils/LoggingTest.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.utils;
+
+import org.junit.Test;
+
+import com.att.eelf.configuration.EELFLogger;
+
+public class LoggingTest {
+
+    private Logging createTestSubject() {
+        return new Logging();
+    }
+
+    @Test
+    public void testGetMethodName() throws Exception {
+        String result;
+
+        // default test
+        result = Logging.getMethodName();
+    }
+
+    @Test
+    public void testGetMethodCallerName() throws Exception {
+        String result;
+
+        // default test
+        result = Logging.getMethodCallerName();
+    }
+
+    @Test
+    public void testGetRequestsLogger() throws Exception {
+        String serverName = "";
+        EELFLogger result;
+
+        // default test
+        result = Logging.getRequestsLogger(serverName);
+    }
+
+
+}
diff --git a/onap-enabler-be/src/test/java/org/onap/osam/utils/LoggingUtilsTest.java b/onap-enabler-be/src/test/java/org/onap/osam/utils/LoggingUtilsTest.java
new file mode 100644
index 0000000..6187cad
--- /dev/null
+++ b/onap-enabler-be/src/test/java/org/onap/osam/utils/LoggingUtilsTest.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OSAM
+ * ================================================================================
+ * Copyright (C) 2018 AT&T
+ * ================================================================================
+ * 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.osam.utils;
+
+import com.fasterxml.jackson.core.JsonLocation;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import org.onap.osam.exceptions.GenericUncheckedException;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import sun.security.provider.certpath.SunCertPathBuilderException;
+import sun.security.validator.ValidatorException;
+
+import javax.crypto.BadPaddingException;
+import javax.net.ssl.SSLHandshakeException;
+import javax.ws.rs.ProcessingException;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.onap.osam.testUtils.RegExMatcher.matchesRegEx;
+
+public class LoggingUtilsTest {
+
+    @DataProvider
+    public static Object[][] exceptions() {
+        Exception e0 = new CertificateException("No X509TrustManager implementation available");
+        Exception noTrustMngrImplException = new SSLHandshakeException(e0.toString());
+        noTrustMngrImplException.initCause(e0);
+
+        Exception e1 = new BadPaddingException("Given final block not properly padded");
+        Exception incorrectPasswordException = new IOException("keystore password was incorrect",
+                new UnrecoverableKeyException("failed to decrypt safe contents entry: " + e1));
+        String incorrectPasswordExceptionDescription = "" +
+                "java.io.IOException: keystore password was incorrect: " +
+                "java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: " +
+                "javax.crypto.BadPaddingException: Given final block not properly padded";
+
+        Exception e2 = new SunCertPathBuilderException("unable to find valid certification path to requested target");
+        Exception noValidCert = new ProcessingException(new ValidatorException("PKIX path building failed: " + e2.toString(), e2));
+        String noValidCertDescription = "" +
+                "javax.ws.rs.ProcessingException: " +
+                "sun.security.validator.ValidatorException: PKIX path building failed: " +
+                "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target";
+
+        RuntimeException fasterxmlMappingException = new RuntimeException(new JsonMappingException("Can not deserialize instance of java.lang.String out of START_ARRAY token",
+                new com.fasterxml.jackson.core.JsonLocation("{ example json }", 15, 1, 20)));
+        String fasterxmlMappingDescription = "" +
+                "com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token\n" +
+                " at [Source: { example json }; line: 1, column: 20]";
+
+        return new Object[][]{
+                {"javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available",
+                        noTrustMngrImplException},
+                {"java.lang.StringIndexOutOfBoundsException: String index out of range: 4",
+                        new StringIndexOutOfBoundsException(4)},
+                {"java.io.FileNotFoundException: osam/WEB-INF/cert/aai-client-cert.p12",
+                        new FileNotFoundException("osam/WEB-INF/cert/aai-client-cert.p12")},
+                {"NullPointerException at LoggingUtilsTest.java:[0-9]+",
+                        new NullPointerException("null")},
+                {incorrectPasswordExceptionDescription,
+                        incorrectPasswordException},
+                {incorrectPasswordExceptionDescription,
+                        new GenericUncheckedException(incorrectPasswordException)},
+                {"javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_expired",
+                        new ProcessingException(new SSLHandshakeException("Received fatal alert: certificate_expired"))},
+                {noValidCertDescription,
+                        noValidCert},
+                {escapeBrackets(fasterxmlMappingDescription),
+                        fasterxmlMappingException},
+                {"org.onap.osam.exceptions.GenericUncheckedException: top message: org.onap.osam.exceptions.GenericUncheckedException: root message",
+                        new GenericUncheckedException("top message", new IOException("sandwich message", new GenericUncheckedException("root message")))},
+                {"org.onap.osam.exceptions.GenericUncheckedException: basa",
+                        new GenericUncheckedException("basa")}
+        };
+
+    }
+
+    @Test(dataProvider = "exceptions")
+    public void testExceptionToDescription(String expectedDescription, Exception exceptionToDescribe) {
+        String expectedButDotsEscaped = expectedDescription.replace(".", "\\.");
+
+        assertThat(Logging.exceptionToDescription(exceptionToDescribe), matchesRegEx(expectedButDotsEscaped));
+    }
+
+    private static String escapeBrackets(String in) {
+        return in.replaceAll("[\\(\\[\\{\\)]", "\\\\$0");
+    }
+}
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/asdc.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/asdc.properties
new file mode 100644
index 0000000..970730b
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/asdc.properties
@@ -0,0 +1,17 @@
+asdc.client.type=REST
+#
+#asdc.client.rest.protocol=http
+#asdc.client.rest.host=135.21.125.36
+#asdc.client.rest.port=8080
+#asdc.client.rest.auth=Basic VklEOnZpbjNSaXBlbmVkSnVtYjBKZXRTcHJpbmtsZXM=
+#
+#dev
+#asdc.client.rest.protocol=http
+#asdc.client.rest.host=135.21.125.105
+#asdc.client.rest.port=8080
+#asdc.client.rest.auth=Basic VGVzdDoxMjM0NTY=
+#IST
+asdc.client.rest.protocol=https
+asdc.client.rest.host=asdcbe.mtsnjpw1.aic.cip.att.com
+asdc.client.rest.port=8443
+asdc.client.rest.auth=Basic dmlkOnZpZGlzdA==
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/quartz.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/quartz.properties
new file mode 100644
index 0000000..92ab425
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/quartz.properties
@@ -0,0 +1,36 @@
+#################################################################################
+# Quartz configurations for Quantum Work Flow									#
+#################################################################################
+
+org.quartz.scheduler.instanceId = AUTO
+
+#################################################################################
+# Main configurations
+org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+org.quartz.threadPool.threadCount = 30
+
+============================================================================
+# Configure JobStore  
+#============================================================================
+
+org.quartz.jobStore.misfireThreshold = 60000
+
+org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
+org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+org.quartz.jobStore.useProperties = false
+#org.quartz.jobStore.dataSource = myDS
+org.quartz.jobStore.tablePrefix = FN_QZ_
+
+org.quartz.jobStore.isClustered = true
+org.quartz.jobStore.clusterCheckinInterval = 20000
+
+#============================================================================
+# Configure Datasources  
+#============================================================================
+
+org.quartz.dataSource.myDS.driver = org.mariadb.jdbc.Driver
+org.quartz.dataSource.myDS.URL = jdbc:mariadb://localhost:3306/vid_openecomp_epsdk
+org.quartz.dataSource.myDS.user = euser
+org.quartz.dataSource.myDS.password = euser
+org.quartz.dataSource.myDS.maxConnections = 5
+org.quartz.dataSource.myDS.validationQuery=select 0 from dual
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor.properties
new file mode 100644
index 0000000..d0d01fd
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor.properties
@@ -0,0 +1,168 @@
+##C## Mention the name of the framework. At present RAPTOR supports FUSION
+system=fusion
+##C## Determines the priority for the debug message.
+debug_level=5
+##C## Determines the number of records can be downloaded in excel when you select "download all" option.
+download_limit=65000
+csv_download_limit=10
+##C## Determines the number of records to be displayed in a single page.
+default_page_size=50
+##C## Determines the list size in the form field.
+form_fields_list_size=99000
+##C## Determines the scheduler interval
+#scheduler_interval=0 => disabled
+scheduler_interval=0
+##C## System Name
+system_name=RAPTOR
+##C## This is used for Bread crumbs.
+base_title=ANALYSIS
+##C## whether to allow SQL-based report definition (security risk); super users are always allowed to create SQL-based reports
+allow_sql_based_reports=yes
+##C## Determines whether to include disclaimer page at the bottom of each screen
+show_disclaimer=yes
+disclaimer_positioned_top_in_csvexcel=yes
+##C## Determines whether to display the form page as a separate page before running the report
+display_form_before_run=yes
+##C## Determines whether to include the form page on the report data page
+include_form_with_data=yes
+##C## Determines whether to cache chart data in the session => faster re-display if the data volume does not get too large
+cache_chart_data=yes
+##C## Determines whether to cache report data for the currently displayed page in the session => faster re-display
+	##C## if the data volume does not get too large
+cache_cur_page_data=yes
+##C## Determines Chart width
+default_chart_width=700
+##C## Determines Chart height
+default_chart_height=420
+##C## Determines whether to permit report deletion only by report owner or by everyone with "write" access
+delete_only_by_owner=no
+##C## Determines whether to log each report execution and update time and user ID
+enable_report_log=yes
+##C## Determines whether to cache user roles info in memory (saves many DB reads, but does not account for roles
+	##C## assigned after the cache was loaded)
+cache_user_roles=yes
+##C## Determines whether to convert month formats (e.g. MM/YYYY) to the last day of the month (true) or
+        ##C## first day (false) - like 12/2003 is converted to either 12/31/2003 or 12/01/2003
+month_format_use_last_day=no
+##C## Determines whether to print the report title in the download files
+print_title_in_download=yes
+##C## Determines whether to show report description when the report is run and in the quick links
+show_descr_at_runtime=no
+##C## Determines whether to skip labels on the Line chart axis when they overlap
+#DEPRECATED skip_chart_labels_to_fit=no
+##C## Determines whether to show chart types that are purpose and/or data specific
+show_nonstandard_charts=yes
+##C## Determines whether to allow the user to change the chart type at runtime
+allow_runtime_chart_sel=yes
+##C## Determines whether to display the report title as chart title as well
+display_chart_title=yes
+##C## Determines whether to merge/blank multi-level row headings in cross-tab report
+merge_crosstab_row_headings=yes
+##C## Determines whether to display chart when displaying the report at first or just a "Show Chart" button
+display_chart_by_default=yes
+##C## Determines whether to print the form field values in the download files
+print_params_in_download=yes
+##C## Determines the limitation to the characters in chart label.
+skip_chart_labels_limit=30
+##C## Determines whether to users with read-only rights for a report can copy it
+can_copy_on_read_only=yes
+##C## Determines the no of decimals to be displayed in Totals column
+#max_decimals_on_totals=-1 => don't truncate, display all decimal digits
+max_decimals_on_totals=2
+##C## Determines which JFreeChart to use.
+jfree_version=latest
+#jfree_version=0.9.11
+# Added this restriction so that heavily used system which contain
+# more than 1000 users can enable this feature not to display whole
+# users in the drop down menu
+display_all_users=yes
+##Sheet name
+sheet_name=raptor
+#shell_script_name=/home/sundar/test.sh
+#download_query_folder=/titan/PROJECT3/RAPTOR/raptor/dwnld/query/
+## this directory is mentioned if the flat file is downloaded using shell script
+shell_script_dir=/titan/PROJECT3/RAPTOR/raptor/dwnld/
+flat_file_lower_limit=1
+flat_file_upper_limit=200000
+## whatever request mentioned here would be parsed in sql and request parameter would be filled
+request_get_params=isEmbedded
+print_footer_in_download=yes
+## footer mentioned here appears in downloaded excel
+footer_first_line=AT&T Proprietary
+footer_second_line=Use Pursuant to Company Instructions
+## to run report in popup window
+report_in_popup_window=yes
+## to run each report in new popup window if the above is selected
+popup_in_new_window=yes
+## "Yes" allows the request param to be passed to the drill down report
+pass_request_param_in_drilldown=yes
+## Show PDF download icon
+show_pdf_download=yes
+# Show Folder Tree
+show_folder_tree=no
+#Show folder tree only for Admin Users
+show_folder_tree_only_to_admin_users=no
+#folder tree should be minimized
+folder_tree_minimized=yes
+## whatever session mentioned here would be parsed in sql and session parameter would be filled
+session_params=login_id
+display_formfield_info=yes
+customize_formfield_info=yes
+#schedule limit for end users
+schedule_limit=10
+# customized query if you need any restrictions for schedule and security tab for fusion
+#schedule_custom_query_for_users=getAllUsersByCustomer
+#schedule_custom_query_for_roles=getAllRolesByCustomer
+# customized query if you need any restrictions for schedule and security tab for prisms example
+#schedule_custom_query_for_users=SELECT au.user_id, au.first_name||' '||au.last_name user_name FROM app_user au order by 2
+schedule_custom_query_for_users=SELECT au.user_id id, au.first_name||' '||au.last_name name FROM app_user au where user_id = 1 order by 2
+#schedule_custom_query_for_roles=SELECT ar.role_id, ar.descr role_name FROM app_role ar order by 2
+schedule_date_pattern=MM/dd/yyyy hh:mm:ss a
+## This is used to display in right format in chart timestamp axis as we give in the sql
+#chart_yearly_format=yyyy
+#chart_monthly_format=MMM-yyyy
+chart_daily_format=MM/dd/yyyy
+chart_hourly_format=MM/dd HH
+#chart_minute_format=HH:mm
+chart_minute_format=MM-dd-yyyy-HH:mm
+#chart_second_format=HH:mm:ss
+chart_second_format=MM-dd-yyyy
+#chart_millisecond_format=HH:mm:ss.S
+schedule_help_text=This form is used to schedule a specific Reporting Platform report to be delivered to one or more email addresses associated with your Company's Business Direct user logins.  Note that report output delivered via email does not include the capability to drill down/back up to additional data levels.  So, select the appropriate data level report for the scheduled report.  View the status of scheduled report requests in the My Schedules menu item.
+use_loginid_in_schedYN=Y
+session_params_for_scheduling=login_id
+session_date_formfield_auto_incr=yes
+display_session_param_pdfexcel=login_id;Login Id
+session_params_for_displaying_in_scheduling=login_id;Login Id
+application_server=tomcat
+#gmap properties
+gmap_key=ABQIAAAAToJSSetKBMjBJx8MiRw4ghQiU0SbbKnm8C5eu25cpyLwgkLzyRShrQTbgZtqnKAqZU9JwcSq1bKwiA
+PROJECT-FOLDER=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0
+# 
+MARKET-SHAPEFILE-FOLDER=resources/files
+# output folder for files generated on server side
+OUTPUT-FOLDER=resources/temp
+# tile size in pixel
+TILE-SIZE=256
+#check if map is disabled or not
+map_allowed=Y
+max_drilldown_level=2
+admin_role_equiv_to_super_role=N
+show_loading_during_formfield_chain=Y
+show_print_icon=N
+globally_nowrap=N
+calendar_output_date_format=MM/dd/yyyy
+memory_threshold_percentage=99
+print_params_in_csv_download=yes
+notitle_in_dashboard=yes
+generate_store_sched_reports=yes
+show_excel_2007_download=yes
+print_excel_in_landscape=yes
+show_animated_chart_option=yes
+show_animated_chart_only=no
+adjust_content_based_on_height=yes
+custom_submit_button_text=Run Button
+customize_formfield_layout=yes
+#db_type=postgresql
+#db_type=oracle
+db_type=mysql
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_app_fusion.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_app_fusion.properties
new file mode 100644
index 0000000..2c65ad8
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_app_fusion.properties
@@ -0,0 +1,20 @@
+temp_folder_path=/demeter/WebApps/dev/ECOMP_PORTAL/temp/
+upload_folder_path=/demeter/WebApps/dev/ECOMP_PORTAL/files/
+excel_template_path=/demeter/WebApps/dev/ECOMP_PORTAL/files/raptor_template/
+temp_folder_url=temp/
+upload_folder_url=upload/
+smtp_server=zeus.homer.att.com
+default_email_sender=dev-local@homer.att.com
+error_page=error_page.jsp
+jsp_context_path=raptor/
+img_folder_url=static/fusion/raptor/images/
+base_folder_url=static/fusion/raptor/
+direct_access_url=http://localhost:8080/quantum/raptor_email_attachment.htm?action=raptor&source_page=report_run&display_content=y
+#base_action_url=report.htm#/report_run/
+drill_action_url=report.htm#/report_run/c_master=
+base_action_url=report_wizard.htm?action=
+base_action_url_ng=report#/
+base_action_param=c_master=
+super_role_id=1
+admin_role_ids=1
+quick_links_menu_ids=HOME,CUSTOMER,REPORTS
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_db_fusion.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_db_fusion.properties
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_db_fusion.properties
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_pdf.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_pdf.properties
new file mode 100644
index 0000000..ffb42a7
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/raptor_pdf.properties
@@ -0,0 +1,30 @@
+## pdf file specific properties
+pdf_data_font_size=9
+pdf_data_font_family=Arial
+#reduce the font size from html config
+pdf_data_font_size_offset=2
+pdf_data_alternate_color=true
+#data row background(white), alternate(light light blue/gray)
+pdf_data_background_alternate_hex_code=#EDEDED
+pdf_data_default_background_hex_code=#FFFFFF
+#header font (white)  background (gray)
+pdf_data_table_header_font_hex_code=#FFFFFF
+pdf_data_table_header_background_hex_code=#8A9BB3
+#footer header
+pdf_footer_font_size=9
+pdf_footer_font_family=Arial
+pdf_att_proprietary=AT&T Proprietary\nUse Pursuant to Company Instructions
+pdf_att_proprierary_font_size=7
+pdf_date_timezone=GMT
+pdf_date_pattern=MM/dd/yyyy hh:mm:ss a
+##page number position at 1 - footer middle, 0 -- header right, 2 - both
+pdf_page_number_position=1
+pdf_word_before_page_number=Page
+pdf_word_after_page_number=
+pdf_coverpage_firstcolumn_size=0.3
+pdf_image_auto_rotate=false
+display_create_owner_info=true
+#session_info=customer,customerId
+display_loginid_for_downloaded_by=false
+# please use false if you want landscape to be default.
+is_default_orientation_portrait=true
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/sql.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/sql.properties
new file mode 100644
index 0000000..e0f89f0
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/sql.properties
@@ -0,0 +1,303 @@
+#SQL Statements for PostgreSQL
+
+#ReportLoader.java
+
+load.custom.report.xml = SELECT cr.report_xml FROM cr_report cr WHERE rep_id=?
+
+# need to copy to oracle
+load.remoteDB.schema = SELECT 'local' SCHEMA_ID, 'local' SCHEMA_DESC, null DATASOURCE_TYPE  FROM dual union SELECT a.SCHEMA_ID, a.SCHEMA_DESC, DATASOURCE_TYPE  FROM SCHEMA_INFO a  where schema_id <> 'local' order by schema_id
+load.remoteDB.schema.where = SELECT a.SCHEMA_ID, a.SCHEMA_DESC, DATASOURCE_TYPE  FROM SCHEMA_INFO a where schema_id = '[schema_id]'
+#formfield rendering
+
+formfield.id.name.sql.prefix=SELECT id, name FROM (
+formfield.id.name.sql=SELECT id, name
+
+formfield.id.name.sql.suffix=
+
+report.security.create= SELECT coalesce(cr.owner_id, cr.create_id) AS owner_id, cr.create_id,  DATE_FORMAT(cr.create_date, '%m/%d/%Y') create_date, maint_id,  DATE_FORMAT(cr.maint_date, '%m/%d/%Y')  update_date, cr.public_yn FROM cr_report cr WHERE cr.rep_id = [rw.getReportID()]
+
+db.update.report.xml = SELECT cr.rep_id, cr.report_xml FROM cr_report cr WHERE rep_id=? FOR UPDATE
+
+update.custom.report.rec = UPDATE cr_report SET title='[Utils.oracleSafe(rw.getReportName())]', descr='[Utils.oracleSafe(rw.getReportDescr())]', public_yn='[(rw.isPublic()]', menu_id='[rw.getMenuID()]', menu_approved_yn='[(rw.isMenuApproved()]', owner_id=[rw.getOwnerID()], maint_id=[rw.getUpdateID()], maint_date=STR_TO_DATE('[rw.getUpdateDate()]', '[Globals.getOracleTimeFormat()]'), dashboard_type_yn='[(rw.isDashboardType()]', dashboard_yn= '[(rw.getReportType().equals(AppConstants.RT_DASHBOARD)]' WHERE rep_id = [rw.getReportID()]
+
+is.report.already.scheduled = select rep_id from cr_report_schedule where rep_id = ?
+
+create.custom.report.rec = INSERT INTO cr_report(rep_id, title, descr, public_yn, menu_id, menu_approved_yn, report_xml, owner_id, create_id, create_date, maint_id, maint_date, dashboard_type_yn, dashboard_yn, folder_id) VALUES([rw.getReportID()], '[Utils.oracleSafe(rw.getReportName())]', '[Utils.oracleSafe(rw.getReportDescr())]', '[rw.isPublic()]', '[rw.getMenuID()]', '[rw.isMenuApproved()]', '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>', [rw.getOwnerID()], [rw.getCreateID()], STR_TO_DATE('[rw.getCreateDate()]', '[Globals.getOracleTimeFormat()]'), [rw.getUpdateID()], STR_TO_DATE('[rw.getUpdateDate()]', '[Globals.getOracleTimeFormat()]'), '[rw.isDashboardType()]', '[rw.getReportType().equals(AppConstants.RT_DASHBOARD)]',[rw.getFolderId()]) 
+
+get.user.report.names = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE coalesce(cr.owner_id, cr.create_id) = [userID]							
+								
+get.report.owner.id = SELECT coalesce(cr.owner_id, cr.create_id) AS owner FROM cr_report cr WHERE rep_id = ?						
+
+delete.report.record.log = DELETE FROM cr_report_log WHERE rep_id = [reportID]
+
+delete.report.record.users = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID]
+
+delete.report.record.schedule = DELETE FROM cr_report_schedule WHERE rep_id = [reportID]
+
+delete.report.record.access = DELETE FROM cr_report_access WHERE rep_id = [reportID]
+
+delete.report.record.email = DELETE FROM cr_report_email_sent_log WHERE rep_id = [reportID]
+
+delete.report.record.favorite = DELETE FROM cr_favorite_reports WHERE rep_id = [reportID]
+
+delete.report.record.report = DELETE FROM cr_report WHERE rep_id = [reportID]
+																						
+load.quick.links =  select finalcr.rep_id, finalcr.title, finalcr.descr from (SELECT cr.rep_id, cr.title, cr.descr FROM (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra LEFT JOIN cr_report cr ON cr.rep_id = ra.rep_id WHERE cr.menu_id LIKE '%[nvls(menuId)]%' AND cr.menu_approved_yn = 'Y' AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) UNION SELECT cr.rep_id, cr.title, cr.descr FROM cr_report cr WHERE cr.menu_id LIKE '%[nvls(menuId)]%' AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' or EXISTS (select * from fn_user_role where user_id=[userID] and role_id in (1)))) finalcr ORDER BY finalcr.title
+
+load.folder.reports = SELECT cr.rep_id, cr.rep_id report_id, concat([rep_title_sql] , (CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END),cr.title,'</a>') title, cr.descr, concat(au.first_name,' ',au.last_name) owner_name, DATE_FORMAT(cr.create_date, '%m/%d/%Y') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn FROM cr_report cr JOIN app_user au ON coalesce(cr.owner_id, cr.create_id) = au.user_id AND cr.folder_id= '[folderId]' LEFT JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL(SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id
+#If roleList.toString() is '' PostgreSQL returns an error - needs to be null instead of empty
+
+load.folder.reports.user = AND coalesce(cr.owner_id, cr.create_id) = [userID]	
+
+load.folder.reports.publicsql = AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL)
+
+load.quick.download.links = SELECT a.file_name, b.title,DATE_FORMAT(a.dwnld_start_time, '%W %d-%m-%Y %H:%i:%s') as time, a.dwnld_start_time FROM cr_report_dwnld_log a, cr_report b where a.user_id = [userID] and a.rep_id = b.rep_id and (a.dwnld_start_time) >= STR_TO_DATE(DATE_FORMAT(now() -  INTERVAL 1 DAY, '%m/%d/%Y'), '%m/%d/%Y') and a.record_ready_time is not null order by a.dwnld_start_time
+
+load.reports.to.schedule = SELECT cr.rep_id, Initcap(cr.title), cr.descr FROM cr_report cr LEFT OUTER JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id AND (cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL or cr.owner_id = [userID] )ORDER BY Initcap(cr.title)
+		
+load.reports.to.add.in.dashboard = SELECT cr.rep_id, cr.title, cr.descr FROM cr_report cr LEFT OUTER JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) AND (cr.dashboard_yn = 'N' or cr.dashboard_yn is null) ORDER BY cr.title
+
+load.my.recent.links = select rep_id, title, descr, form_fields from ( select rep_id, title, descr, form_fields from  (select cr.rep_id, cr.title, a.form_fields,  cr.descr, a.log_time, a.user_id, a.action, a.action_value from cr_report_log a, cr_report cr where user_id = [userID] AND action = 'Report Execution Time' and a.rep_id = cr.rep_id order by log_time desc) AS x) AS y where LIMIT 1, 6
+
+create.report.log.entry = INSERT INTO cr_report_log (rep_id, log_time, user_id, action, action_value, form_fields) VALUES([reportID], now(), [userID], '[action]' , '[executionTime]', '[form_fields]')
+
+create.report.log.entry.exec.time = INSERT INTO cr_report_log (rep_id, log_time, user_id, action, action_value, form_fields) VALUES([reportID], NOW() + INTERVAL 1 SECOND, [userID], '[action]' , '[executionTime]', '[formFields]')
+
+clear.report.log.entries = DELETE FROM cr_report_log WHERE rep_id = ? and user_id = ?
+
+load.report.log.entries = SELECT x.log_time, x.user_id, (CASE WHEN x.action = 'Report Execution Time' THEN  concat('<a href=\"[AppUtils.getRaptorActionURL()]report.run.container&c_master=',x.rep_id,'&',x.form_fields,'&fromReportLog=Y&display_content=Y&noFormFields=Y&refresh=Y\">',x.action,'</a>') ELSE x.action END) action, (CASE WHEN x.action = 'Report Execution Time' THEN  action_value  ELSE 'N/A' END) time_taken, (CASE WHEN x.action = 'Report Execution Time' THEN concat('<a href=\"[AppUtils.getRaptorActionURL()]report.run.container&c_master=',x.rep_id,'&',x.form_fields,'&fromReportLog=Y&display_content=Y&noFormFields=Y&refresh=Y\"><img src=\"[AppUtils.getImgFolderURL()]test_run.gif" width=\"12\" height=\"12\" border=0 alt=\"Run report\"/></a>') ELSE 'N/A' END) run_image, x.name FROM  (SELECT rl.rep_id, DATE_FORMAT(rl.log_time, '%m/%d/%Y %h:%i:%s %p') log_time, rl.action_value, concat(fuser.last_name ,', ',fuser.first_name) name, rl.user_id, rl.action, rl.form_fields FROM cr_report_log rl, fn_user fuser WHERE rl.rep_id = [nvls(reportId)] and rl.action != 'Report Run' and fuser.user_id = rl.user_id ORDER BY rl.log_time DESC) x  LIMIT 100
+
+does.user.can.schedule.report = select crs.sched_user_id, count(*) from cr_report_schedule crs where sched_user_id = [userId] group by crs.sched_user_id having count(*) >= [Globals.getScheduleLimit()]
+
+does.user.can.schedule = select crs.schedule_id from cr_report_schedule crs where schedule_id = [scheduleId]
+
+get.system.date.time = select DATE_FORMAT(now(),'%m/%d/%Y %H:%i:%s')
+
+get.next.day.date.time = select DATE_FORMAT(NOW() + INTERVAL 1 DAY,'%m/%d/%Y %H:%i:%s')
+
+get.next.fifteen.minutes.date.time = select DATE_FORMAT(NOW() + INTERVAL 15 MINUTES,'%m/%d/%Y %H:%i:%s')
+
+get.next.thirty.minutes.date.time = select DATE_FORMAT(NOW() + INTERVAL 30 MINUTES,'%m/%d/%Y %H:%i:%s')
+
+get.template.file = select template_file from cr_report_template_map where report_id = [reportId]
+
+load.pdf.img.lookup = select image_id, image_loc from cr_raptor_pdf_img
+
+load.action.img.lookup = select image_id, image_loc from cr_raptor_action_img
+
+
+#ActionHandler.java
+
+report.values.map.def.a = SELECT x FROM (SELECT DISTINCT 
+
+report.values.map.def.b = TO_CHAR([colName], '[nvl(displayFormat, AppConstants.DEFAULT_DATE_FORMAT)]')
+
+report.values.map.def.c = [colName] 
+
+report.values.map.def.d =  x FROM [rdef.getTableById(tableId).getTableName()] WHERE [colName] IS NOT NULL ORDER BY 1) xx LIMIT <= [Globals.getDefaultPageSize()]
+
+test.sched.cond.popup = SELECT 1 WHERE EXISTS ([sql])
+
+download.all.email.sent = Select user_id, rep_id from CR_REPORT_EMAIL_SENT_LOG where gen_key='[pdfAttachmentKey.trim()]' and log_id =[report_email_sent_log_id.trim()] and (now() - sent_date) < '1 day' limit 1
+
+download.all.gen.key = select schedule_id from cr_report_email_sent_log u where U.GEN_KEY = '[pdfAttachmentKey]'
+
+download.all.retrieve = SELECT au.user_id FROM (SELECT rs.schedule_id, rs.rep_id FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.run_date IS NOT NULL  AND rs.schedule_id = [scheduleId]) x, cr_report r, app_user au WHERE x.rep_id = r.rep_id  AND au.user_id IN (SELECT rsu.user_id FROM cr_report_schedule_users rsu WHERE rsu.schedule_id = x.schedule_id and rsu.schedule_id = [scheduleId]  UNION SELECT ur.user_id FROM fn_user_role ur WHERE ur.role_id IN (SELECT rsu2.role_id FROM cr_report_schedule_users rsu2 WHERE rsu2.schedule_id = x.schedule_id and  rsu2.schedule_id = [scheduleId]))
+
+download.all.insert = insert into cr_report_dwnld_log (user_id,rep_id,file_name,dwnld_start_time,filter_params) values (?,?,?,?,?)
+
+#ReportWrapper.java
+
+report.wrapper.format = SELECT coalesce(cr.owner_id, cr.create_id) owner_id, cr.create_id, DATE_FORMAT(cr.create_date, '[Globals.getOracleTimeFormat()]') create_date, maint_id, DATE_FORMAT(cr.maint_date, '[Globals.getOracleTimeFormat()]') update_date, cr.menu_id, cr.menu_approved_yn FROM cr_report cr WHERE cr.rep_id= [reportID]
+
+generate.subset.sql = SELECT [colNames.toString()] FROM (SELECT  [colNames.toString()] FROM ([reportSQL]) AS x ) AS y 
+
+report.sql.only.first.part = SELECT [colNames.toString()] FROM (SELECT [colNames.toString()] FROM (
+
+report.sql.only.second.part.a = [startRow] 
+
+report.sql.only.second.part.b = [pageSize]
+#MYSQL: LIMIT [startRow], [pageSize]
+#ORacle: rownum >= [startRow] and rownum <= ([startRow]+[pageSize])
+#Postgre: limit [pageSize] offset [startRow] 
+
+report.sql.only.second.part.b.noorderby =  LIMIT [startRow]
+
+generate.sql.visual.select = SELECT
+
+generate.sql.visual.count = COUNT(*) cnt
+
+generate.sql.visual.dual = 
+#No DUAL table in PostgreSQL so this is blank
+
+#ReportRuntime.java
+
+load.crosstab.report.data = SELECT  [colNames.toString()] FROM ( [reportSQL] 
+
+#RaptorRunHandler.java
+
+generate.sql.handler = SELECT  x.* from ([sql]) AS x LIMIT 2
+
+generate.sql.select = SELECT [colNames.toString()] FROM (SELECT  [colNames.toString()] FROM ([sql]) AS y) AS x 
+			
+#ReportSchedule.java
+
+load.schedule.data = SELECT rs.enabled_yn, DATE_FORMAT(rs.start_date, '%m/%d/%Y') start_date, DATE_FORMAT(rs.end_date, '%m/%d/%Y') end_date, DATE_FORMAT(rs.run_date, '%m/%d/%Y') run_date, coalesce(DATE_FORMAT(rs.run_date, '%h'), '12') run_hour, coalesce(DATE_FORMAT(rs.run_date, '%i'), '00') run_min, coalesce(DATE_FORMAT(rs.run_date, '%p'), 'AM') run_ampm, rs.recurrence, rs.conditional_yn, rs.notify_type, rs.max_row, rs.initial_formfields, rs.schedule_id, coalesce(DATE_FORMAT(rs.end_date, '%h'), '11') end_hour, coalesce(DATE_FORMAT(rs.end_date, '%i'), '45') end_min, coalesce(DATE_FORMAT(rs.end_date, '%p'), 'PM') end_ampm, encrypt_yn, attachment_yn FROM cr_report_schedule rs WHERE rs.rep_id = [reportID]
+
+load.schedule.getid = SELECT rsu.user_id, concat(fuser.last_name,', ',fuser.first_name), fuser.login_id FROM cr_report_schedule_users rsu, fn_user fuser WHERE rsu.rep_id = [reportID]  AND rsu.schedule_id = [getScheduleID()] and rsu.user_id IS NOT NULL and rsu.user_id = fuser.user_id
+
+load.schedule.users = SELECT rsu.role_id FROM cr_report_schedule_users rsu WHERE rsu.rep_id = [reportID] AND rsu.schedule_id = [getScheduleID()] AND rsu.role_id IS NOT NULL
+
+new.schedule.data = select coalesce(max(schedule_id),0)+1  AS sequence from cr_report_schedule
+
+new.report.data = select coalesce(max(rep_id),0)+1  AS rep_id from cr_report
+
+execute.update = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID] and schedule_id = [getScheduleID()]
+
+execute.update.users = INSERT INTO cr_report_schedule_users (schedule_id, rep_id, user_id, role_id, order_no) VALUES([getScheduleID()], [reportID], [emailToUsers.get(i)).getId()], NULL, [(i + 1)])
+
+execute.update.roles = INSERT INTO cr_report_schedule_users (schedule_id, rep_id, user_id, role_id, order_no) VALUES([getScheduleID()], [reportID], NULL, [emailToRoles.get(i)).getId()], [((emailToUsers.size() + i + 1)])
+
+execute.update.activity = INSERT into cr_schedule_activity_log (schedule_id, notes, run_time) values ([getScheduleID()],'Submitted:Schedule',TO_DATE('[getRunDate()] [getRunHour()]:[getRunMin()] [getRunAMPM()]', 'MM/DD/YYYY HH:MI AM'))
+ 
+delete.schedule.data = SELECT 1 FROM cr_report_schedule WHERE rep_id = [reportID] and sched_user_id = [getScheduleUserID()] and schedule_id = [getScheduleID()]
+ 
+delete.schedule.data.users = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID]  and schedule_id = [getScheduleID()]
+ 
+delete.schedule.data.id = DELETE FROM cr_report_schedule where rep_id = [reportID] and sched_user_id = [getScheduleUserID()] and schedule_id = [getScheduleID()]
+
+load.cond.sql = SELECT condition_large_sql FROM cr_report_schedule WHERE schedule_id=?
+
+load.cond.sql.select = SELECT condition_sql FROM cr_report_schedule WHERE schedule_id = [scheduleId]
+
+persist.cond.sql.update = update cr_report_schedule set condition_large_sql = '' where  schedule_id = [scheduleId]
+#EMPTY CLOB() changed to ''
+
+persist.cond.sql.large = SELECT condition_large_sql FROM cr_report_schedule cr WHERE schedule_id=? FOR UPDATE
+
+persist.cond.sql.set = update cr_report_schedule set condition_sql = ? where schedule_id = [scheduleId]
+
+#DataCache.java
+
+get.data.view.actions = SELECT ts.web_view_action FROM cr_table_source ts WHERE ts.web_view_action IS NOT NULL
+
+get.public.report.id.names = SELECT rep_id, title FROM cr_report WHERE public_yn = 'Y' ORDER BY title
+
+get.private.accessible.names.a = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE cr.rep_id not in (select rep_id from cr_report_access cra where user_id =  '[user_id]' 
+
+get.private.accessible.names.if =  OR role_id in (
+
+get.private.accessible.names.b =  ) AND public_yn = 'N' and cr.owner_id = '[user_id]' order by 2 
+
+get.group.accessible.names.a = SELECT cr.rep_id, cr.title FROM cr_report cr  WHERE cr.rep_id  in (select rep_id from cr_report_access cra where user_id =  '[user_id]'
+
+get.group.accessible.names.b =  )  AND public_yn = 'N' order by 2 
+
+get.report.table.sources.a = SELECT table_name, display_name, pk_fields, web_view_action, large_data_source_yn, filter_sql FROM cr_table_source 
+
+get.report.table.sources.where =  where SOURCE_DB= '[dBInfo]'
+
+get.report.table.sources.if =  where SOURCE_DB is null or SOURCE_DB = '[AppConstants.DB_LOCAL]'
+
+get.report.table.sources.else =  ORDER BY table_name
+
+grab.report.table.a = SELECT ts.table_name, ts.display_name, ts.pk_fields, ts.web_view_action, ts.large_data_source_yn, ts.filter_sql FROM cr_table_source ts  WHERE 
+
+grab.report.table.if = ts.SOURCE_DB= '[dBInfo]'
+
+grab.report.table.else = (ts.SOURCE_DB is null or ts.SOURCE_DB = '[AppConstants.DB_LOCAL]')
+
+grab.report.table.b =  except SELECT ts.table_name, ts.display_name, ts.pk_fields,  ts.web_view_action,  ts.large_data_source_yn, ts.filter_sql from cr_table_source ts where table_name in (select table_name from  cr_table_role where role_id not IN [sb.toString()]) and 
+
+grab.report.table.c =  ORDER BY 1 
+
+get.report.table.crjoin = SELECT src_table_name, dest_table_name, join_expr FROM cr_table_join
+
+get.report.table.joins = SELECT tj.src_table_name, tj.dest_table_name, tj.join_expr FROM cr_table_join tj WHERE ((EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name AND trs.role_id IN [sb.toString()])) OR (NOT EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name))) AND ((EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name AND trd.role_id IN [sb.toString()])) OR (NOT EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name)))
+
+generate.report.table.col = SELECT a.table_name, a.column_name, a.data_type, a.label FROM user_column_def a WHERE a.table_name = '[tableName.toUpperCase()]' ORDER BY a.column_id
+
+generate.db.user.sql.a = SELECT utc.table_name, utc.column_name, utc.data_type, 
+
+generate.db.user.sql.if = utc.column_name FROM user_tab_columns utc 
+
+generate.db.user.sql.else = coalesce(x.label, utc.column_name) FROM user_tab_columns utc 
+
+generate.db.user.sql.b = WHERE utc.table_name = '[tableName.toUpperCase()]' 
+
+generate.db.user.sql.c = AND utc.table_name = x.table_name AND utc.column_name = x.column_name 
+
+generate.db.user.sql.d = ORDER BY utc.column_id 
+
+#SearchHandler.java
+
+load.report.search.result = SELECT cr.rep_id, cr.rep_id report_id, [rep_title_sql] title, cr.descr, concat(au.first_name,' ',au.last_name) owner_name, DATE_FORMAT(cr.create_date, '%m/%d/%Y') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn, case when report_xml like '%<allowSchedule>N</allowSchedule>%' then 'N' when report_xml like '%<allowSchedule>Y</allowSchedule>%' or 1 = (select distinct 1 from cr_report_schedule where rep_id = cr.rep_id) then 'Y' else 'N' end FROM cr_report cr JOIN fn_user au ON coalesce (cr.owner_id, cr.create_id) = au.user_id [fReportID] [fReportName] LEFT JOIN(SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON ra.rep_id = cr.rep_id
+
+load.report.search.instr = WHERE cr.menu_id LIKE '%[menuId]%'
+
+load.report.search.result.user = WHERE coalesce(cr.owner_id, cr.create_id) = [userID]
+
+load.report.search.result.public = WHERE (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL)
+
+load.report.search.result.fav =  WHERE cr.rep_id in (select rep_id from cr_favorite_reports where user_id = [userID]
+
+load.report.search.result.sort = ORDER BY CASE coalesce(cr.owner_id, cr.create_id) WHEN [userID] THEN ' ' WHEN 'upper(concat(au.first_name,' ',au.last_name))' ELSE 'upper(cr.title)' END
+
+load.folder.report.result = SELECT cr.rep_id, cr.rep_id report_id, concat([rep_title_sql] , (CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END),cr.title,'</a>') title, cr.descr, concat(au.first_name,' ',au.last_name) owner_name, TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn FROM cr_report cr JOIN fn_user au ON coalesce (cr.owner_id, cr.create_id) = au.user_id AND TO_CHAR(cr.rep_id, 'FM99999999') like coalesce('%[fReportID]%', TO_CHAR(cr.rep_id, 'FM99999999')) AND UPPER(cr.title) LIKE UPPER('%[fReportName]%') LEFT JOIN(SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON ra.rep_id = cr.rep_id
+
+load.folder.report.result.sort =  ORDER BY CASE coalesce(cr.owner_id, cr.create_id) WHEN [userID] THEN ' ' WHEN '(concat(au.first_name,' ',au.last_name))' ELSE 'cr.title' END
+
+#WizardProcessor.java
+
+process.filter.add.edit = '[argValue]'
+
+#ReportDefinition.java
+
+persist.report.adhoc = SELECT nextval('[Globals.getAdhocReportSequence()]') AS sequence
+
+#Globals.java
+
+initialize.roles = SELECT 1 WHERE EXISTS (SELECT 1 FROM cr_table_role)
+
+initialize.version = SELECT cr_raptor.get_version
+
+# scheduler
+
+
+scheduler.available.schedules = SELECT x.rep_id, x.schedule_id, x.conditional_yn, x.condition_large_sql, x.notify_type, x.max_row, x.initial_formfields, x.processed_formfields, r.title, x.user_id FROM ( SELECT rs.rep_id, rs.schedule_id, rs.sched_user_id user_id, rs.conditional_yn, rs.condition_large_sql, rs.notify_type, rs.max_row, rs.initial_formfields, rs.processed_formfields  FROM cr_report_schedule rs  WHERE rs.enabled_yn='Y'  AND rs.start_date <= [currentDate]  AND  (rs.end_date >= [currentDate] or rs.end_date is null )  AND rs.run_date IS NOT NULL  ) x, cr_report r  WHERE x.rep_id = r.rep_id
+
+random.string = select ( concat('Z' , round(random() * 1000000000000) ) )
+
+
+scheduler.user.emails = SELECT au.user_id FROM (SELECT rs.schedule_id, rs.rep_id FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.start_date <= now() AND rs.end_date  >= now() AND rs.run_date IS NOT NULL AND rs.schedule_id = [p_schedule_id] ) x, cr_report r, fn_user au WHERE x.rep_id = r.rep_id AND au.user_id IN (SELECT rsu.user_id FROM cr_report_schedule_users rsu WHERE rsu.schedule_id = x.schedule_id and rsu.schedule_id = [p_schedule_id] UNION SELECT ur.user_id FROM fn_user_role ur WHERE ur.role_id IN (SELECT rsu2.role_id FROM cr_report_schedule_users rsu2 WHERE rsu2.schedule_id = x.schedule_id and rsu2.schedule_id = [p_schedule_id]))  
+
+
+# my logins
+
+app.query = SELECT APP_ID, ML_APP_NAME, MOTS_ID from fn_app
+
+user.log.query = SELECT DISTINCT  IFNULL(SBCID, '') CUID, '' AWID, CONCAT('"',IFNULL(SBCID, ''),'"') APPLICATIONUSERID,  CONCAT('"',IFNULL(FIRST_NAME, ''),'"') FIRST_NAME, CONCAT('"',substr(IFNULL(MIDDLE_NAME, ''), 0, 1),'"') MIDDLE_INITIAL, CONCAT('"',IFNULL(LAST_NAME, ''),'"') LAST_NAME, IFNULL(DATE_FORMAT(LAST_LOGIN_DATE, '%Y/%m/%d'), '') LAST_LOGON_DATE, DATE_FORMAT(CREATED_DATE, '%Y/%m/%d') ACCOUNT_ACTIVATION_DATE, IFNULL(DATE_FORMAT(MODIFIED_DATE, '%Y/%m/%d'), '') LAST_DATE_ACCOUNT_MODIFIED,  '' LAST_PASSWORD_CHANGE_DATE, CONCAT('"',IFNULL(FIRST_NAME, ''),' ',IFNULL(MIDDLE_NAME, ''),' ',IFNULL(LAST_NAME, ''),'"')  FULL_USER_NAME, '' NT_ID, IFNULL(EMAIL, '') EMAIL   FROM FN_USER FU, FN_USER_ROLE FUR WHERE FU.USER_ID \= FUR.USER_ID and FUR.app_id \= ? and ACTIVE_YN \= 'Y' and sbcid is not null order by 1
+
+profile.log.query = SELECT DISTINCT CONCAT('"' , ROLE_NAME , '"') PROFILE_NAME, '""' SECURITY_SETTINGS FROM FN_ROLE FR, FN_USER_ROLE FUR WHERE FUR.ROLE_ID \= FR.ROLE_ID and FR.ACTIVE_YN \= 'Y' and ((FUR.APP_ID \= 1 and FR.ROLE_NAME <> 'Standard User') or (FUR.APP_ID \= ? and FUR.APP_ID <> 1))  ORDER BY 1
+
+user.profile.log.query = SELECT DISTINCT IFNULL(SBCID, '') CUID, '' AWID, CONCAT('"' , IFNULL(SBCID, '') , '"') APPLICATIONUSERID , CONCAT('"' , ROLE_NAME , '"')  PROFILE_NAME  FROM FN_USER A, FN_USER_ROLE B, FN_ROLE C WHERE A.USER_ID \= B.USER_ID AND B.ROLE_ID \= C.ROLE_ID AND A.ACTIVE_YN \= 'Y' AND C.ACTIVE_YN \= 'Y' AND a.sbcid is not null  AND ((B.APP_ID \= 1 and C.ROLE_NAME <> 'Standard User') or (B.APP_ID \= ? and B.APP_ID <> 1)) ORDER BY 1
+
+all.accounts.log.query = SELECT DISTINCT IFNULL(SBCID, '') CUID, (case when A.ACTIVE_YN\='Y' then 'ACTIVE' else 'INACTIVE' end) ACTIVE_YN, CONCAT('"' , IFNULL(SBCID, '') , '"') APPLICATIONUSERID , IFNULL(DATE_FORMAT(LAST_LOGIN_DATE, '%Y/%m/%d'), '') LAST_LOGON_DATE, '' LAST_PASSWORD_CHANGE_DATE, CONCAT('"' , ROLE_NAME , '"')  PROFILE_NAME  FROM FN_USER A, FN_USER_ROLE B, FN_ROLE C WHERE A.USER_ID \= B.USER_ID AND B.ROLE_ID \= C.ROLE_ID AND a.sbcid is not null  AND ((B.APP_ID \= 1 and C.ROLE_NAME <> 'Standard User') or (B.APP_ID \= ? and B.APP_ID <> 1)) ORDER BY 1
+
+# basic sql
+
+seq.next.val = SELECT nextval('[sequenceName]') AS id
+
+current.date = now()
+
+nvl = IFNULL
+
+# report security
+report.user.access = SELECT ra.role_id, ra.user_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.rep_id = [reportID]
+add.user.access = INSERT INTO cr_report_access (rep_id, order_no, role_id, user_id, read_only_yn) VALUES([reportID], IFNULL((select order_no from (SELECT MAX(order_no) AS order_no FROM cr_report_access WHERE rep_id=[reportID]) AS temp), 0)+1, NULL, [userID], '[readOnlyAccess]')
+update.user.access = UPDATE cr_report_access SET read_only_yn='[readOnlyAccess]' WHERE rep_id=[reportID] AND user_id=[userID]
+remove.user.access = DELETE FROM cr_report_access WHERE rep_id=[reportID] AND user_id=[userID]
+add.role.access = INSERT INTO cr_report_access (rep_id, order_no, role_id, user_id, read_only_yn) VALUES([reportID], IFNULL((select order_no from (SELECT MAX(order_no) AS order_no FROM cr_report_access WHERE rep_id=[reportID]) AS temp), 0)+1, [roleID], NULL, '[readOnlyAccess]')
+update.role.access = UPDATE cr_report_access SET read_only_yn='[readOnlyAccess]' WHERE rep_id=[reportID] AND role_id=[roleID]
+remove.role.access = DELETE FROM cr_report_access WHERE rep_id=[reportID] AND role_id=[roleID]
+
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/system.properties b/onap-enabler-be/src/test/resources/WEB-INF/conf/system.properties
new file mode 100644
index 0000000..20ddc0f
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/system.properties
@@ -0,0 +1,190 @@
+# Properties read by ECOMP Core library, epsdk-core.jar
+
+##########################################################################
+# The following properties should NOT be changed by partner applications.
+##########################################################################
+
+application_user_id           = 30000
+post_default_role_id          = 16
+clustered                     = true
+
+#Enable Fusion Mobile capabilities for the application
+mobile_enable			  	  = false
+
+# Cache config file is needed on the classpath
+cache_config_file_path        = /WEB-INF/classes/cache.ccf
+cache_switch                  = 199
+cache_load_on_startup         = false
+
+user_name					  = fullName
+decryption_key				  = AGLDdG4D04BKm2IxIWEr8o==
+#db.userName=XXXX
+#db.password=XXXX
+#db.connectionURL=jdbc:oracle:thin:@XXXX/XX
+#db.hib.dialect=org.hibernate.dialect.Oracle10gDialect
+#db.driver=oracle.jdbc.driver.OracleDriver
+#Hibernate 
+#hb.dialect=org.hibernate.dialect.Oracle10gDialect
+#hb.show_sql=true
+
+#Postgre
+#db.userName=XXXX
+#db.password=XXXX
+#db.connectionURL=jdbc:postgresql://XXXX/XX
+#db.hib.dialect=org.hibernate.dialect.PostgreSQLDialect
+#db.driver=org.postgresql.Driver
+#hb.dialect=org.hibernate.dialect.PostgreSQLDialect
+#hb.show_sql=true
+
+#Mysql
+db.driver = com.mysql.jdbc.Driver
+#db.connectionURL = jdbc:mysql://demeter.homer.att.com:3306/ecomp_sdk_1707_att
+db.connectionURL = jdbc:mysql://localhost:3306/vid_portal
+db.userName = euser
+db.password = euser
+db.hib.dialect = org.hibernate.dialect.MySQLDialect
+db.min_pool_size = 5
+db.max_pool_size = 10
+hb.dialect = org.hibernate.dialect.MySQLDialect
+# SQL statements are logged to stdout
+hb.show_sql = true
+hb.idle_connection_test_period = 3600
+app_display_name					  = VID
+files_path = /opt/app/vid/license
+
+# menu settings
+#menu_query_name                      = menuData
+#menu_properties_file_location        = /WEB-INF/fusion/menu/
+#application_menu_set_name            = APP
+#application_menu_attribute_name      = applicationMenuData
+#application_menu_properties_name     = menu.properties
+#business_direct_menu_set_name        = BD
+#business_direct_menu_properties_name = bd.menu.properties
+#business_direct_menu_attribute_name  = businessDirectMenuData
+
+application_name              = Virtual Infrastructure Deployment
+
+
+#element map files
+#element_map_file_path = /tmp
+#element_map_icon_path = app/vid/icons/
+element_map_file_path = app/fusionapp/files/
+element_map_icon_path = app/fusionapp/icons/
+
+#aai related properties
+#dev server
+#aai.server.url.base=https://mtanjv9aaas40.aic.cip.att.com:8443/aai/
+#aai.server.url=https://mtanjv9aaas40.aic.cip.att.com:8443/aai/v10/
+#aai.oldserver.url.base=https://mtanjv9aaas40.aic.cip.att.com:8443/aai/servers/
+#aai.oldserver.url=https://mtanjv9aaas40.aic.cip.att.com:8443/aai/servers/v3/
+#ist servers
+aai.server.url.base=https://aai-ext1.test.att.com:8443/aai/
+#aai.server.url=https://aai-ext1.test.att.com:8443/aai/v12/
+aai.server.url=http://localhost:8080/vidSimulator/aai/v12/
+#aai.server.url=http://localhost:1080/aai
+#aai.server.url=https://aai-int2.test.att.com:8443/aai/v12/
+aai.vid.username=VID
+aai.vid.passwd.x=OBF:1jm91i0v1jl9
+
+
+
+
+
+
+
+
+aai.oldserver.url.base=https://aai-ext1.test.att.com:8443/aai/servers/
+aai.oldserver.url=https://aai-ext1.test.att.com:8443/aai/servers/v3/
+aai.truststore.filename=tomcat_keystore
+aai.truststore.passwd.x=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
+aai.keystore.filename=aai-client-cert.p12
+aai.keystore.passwd.x=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
+aai.use.client.cert=false
+aai.vnf.provstatus=PREPROV,NVTPROV,PROV,CAPPED
+
+#Cron Schedules have 6 required fields and 1 optional field:
+# Seconds Minutes Hours Day-of-Month Month Day-of-Week Year
+log_cron                      = 0 0/1 * * * ?;
+mylogins_feed_cron            = 0 0/60 * * * ?;
+#sessiontimeout_feed_cron	  = 0 * * * * ? *
+my_login_feed_output_dir      = /tmp/MyLogins
+
+# ECOMP Portal Shared Context REST API URL
+ecomp_shared_context_rest_url= https://www.ecomp.att.com:8080/ecompportal/context
+
+# Link shown in Help menu
+contact_us_link = https://wiki.web.att.com/display/EcompPortal/ECOMP+Portal+Home
+
+# Camunda cockpit link
+camunda_cockpit_link = https://cloopwf.client.research.att.com:8443/camunda/app/cockpit/default/#/dashboard
+# An Unique 128-bit value defined to identify a specific version
+# of an application deployed on a specific virtual machine.
+# This value must be generated and updated by the application 
+# which is using the ECOMP SDK at the time of its deployment.
+# Online Unique UUID generator - https://www.uuidgenerator.net/
+instance_uuid=8da691c9-987d-43ed-a358-00ac2f35685d
+
+#  R Cloud feature
+guard_notebook_url=https://rcloud.research.att.com/mini.html?notebook=a06a9cf14211012e221bf842c168849d&
+
+#ECOMP redirect url
+#ecomp_redirect_url = https://webtest.csp.att.com/ecomp_portal_dev_n1/ecompui/process_csp
+#ecomp_rest_url = https://webtest.csp.att.com/ecomp_portal_dev_n1/ecompui/auxapi
+# Replace these default values with the ones for your specific App.  Ecomp Portal admin obtains from EP website.
+#ueb_app_mailbox_name = ECOMP-PORTAL-OUTBOX-90
+#ueb_app_key = sYH0NJnsKmJC1B2A
+#ueb_app_secret = YOtknsT2wVFz9WISlSPDaAtd
+
+#MSO related properties
+#simulator
+#mso.server.url=http://localhost:8089
+#mso.server.url=https://msoapih-app.mtsnj.aic.cip.att.com:8443/ecomp/mso/infra
+#dev2dev
+#good
+#dev
+#mso.server.url=http://mtanjv9moah10-eth0.aic.cip.att.com:8080/ecomp/mso/infra
+#istScrum-Master
+mso.client.type=LOCAL
+mso.server.url=http://vm1.mso.simpledemo.openecomp.org:8080
+mso.polling.interval.msecs=10000
+mso.max.polls=10
+mso.user.name=infraportal
+mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz
+mso.restapi.svc.instance=/serviceInstances/v5
+mso.restapi.vnf.instance=/serviceInstances/v5/<service_instance_id>/vnfs
+mso.restapi.vnf.changemanagement.instance=/serviceInstances/v5/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
+mso.restapi.network.instance=/serviceInstances/v5/<service_instance_id>/networks
+mso.restapi.vf.module.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules
+mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
+mso.restapi.volume.group.instance=/serviceInstances/v5/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
+mso.restapi.get.orc.req=/orchestrationRequests/v5
+mso.restapi.get.orc.reqs=/orchestrationRequests/v5?
+mso.restapi.get.man.tasks=/tasks/v1
+mso.restapi.configurations=/serviceInstances/v6/<service_instance_id>/configurations
+mso.restapi.configuration.instance=${mso.restapi.configurations}<configuration_id>
+
+vid.truststore.filename=/opt/app/vid/etc/vid_keystore.jks
+mso.dme2.client.timeout=30000
+mso.dme2.client.read.timeout=120000
+
+scheduler.server.url=http://mtanjv9sdlg10.aic.cip.att.com:8989/scheduler
+scheduler.create.new.vnf.change.instance=/v1/ChangeManagement/schedules/
+scheduler.get.time.slots=/v1/ChangeManagement/schedules/
+scheduler.get.schedules=/v1/ChangeManagement/schedules/scheduleDetails/
+
+
+#vid.truststore.filename=/Users/Oren/Downloads/vid_keystore2.jks
+
+vid.truststore.passwd.x=OBF:1wgg1wfq1uus1uui1x131x0r1x1v1x1j1uvo1uve1wg81wfi
+#mso.dme2.server.url=http://mso-api-handler-anap-v1.mso.ecomp.att.com/services/ecomp/mso?
+mso.dme2.server.url=http://mso-api-handler-anap-v1.mso.ecomp.att.com/services/ecomp/mso?version=1607&envContext=TEST&routeOffer=st_mtsnj
+#mso.dme2.server.url=https://ActiveAndAvailableInventory-CloudNetwork-v1.aai.att.com/aai?version=1&envContext=DEV&routeOffer=devINT1
+mso.dme2.enabled=false
+asdc.model.namespace=org.openecomp.
+sdc.svc.api.path=sdc/v1/catalog/services
+sdc.resource.api.path=sdc/v1/catalog/resource
+
+# Application base URL has the host and app context only; a proper prefix of the on-boarded URL.
+# Only required for applications using WebJunction or FE/BE separation.  For example:
+# app_base_url = https://www.e-access.att.com/app_junction/app_context/
+
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/conf/system.properties.cml b/onap-enabler-be/src/test/resources/WEB-INF/conf/system.properties.cml
new file mode 100644
index 0000000..51e788e
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/conf/system.properties.cml
@@ -0,0 +1,93 @@
+# Properties read by ECOMP Core library, epsdk-core.jar
+
+##########################################################################
+# The following properties should NOT be changed by partner applications.
+##########################################################################
+
+application_user_id           = 30000
+post_default_role_id          = 16
+clustered                     = true
+
+#Enable Fusion Mobile capabilities for the application
+mobile_enable			  	  = false
+
+# Cache config file is needed on the classpath
+cache_config_file_path        = /WEB-INF/classes/cache.ccf
+cache_switch                  = 199
+cache_load_on_startup         = false
+
+user_name					  = fullName
+decryption_key				  = AGLDdG4D04BKm2IxIWEr8o==
+
+##########################################################################
+# The following properties REQUIRE changes by partner applications.
+##########################################################################
+
+#Oracle
+#db.userName=quantumbd
+#db.password=c1syn2yhmr
+#db.connectionURL=jdbc:oracle:thin:@dbhost.yourcompany.com:1527:mod112a
+#db.hib.dialect=org.hibernate.dialect.Oracle10gDialect
+#db.driver=oracle.jdbc.driver.OracleDriver
+#Hibernate 
+#hb.dialect=org.hibernate.dialect.Oracle10gDialect
+#hb.show_sql=true
+
+#Postgres
+#db.userName=quantumbd
+#db.password=c1syn2yhmr
+#db.connectionURL=jdbc:postgresql://dbhost.yourcompany.com:61382/quantum
+#db.hib.dialect=org.hibernate.dialect.PostgreSQLDialect
+#db.driver=org.postgresql.Driver
+#hb.dialect=org.hibernate.dialect.PostgreSQLDialect
+#hb.show_sql=true
+
+
+
+#Mysql
+db.driver = org.mariadb.jdbc.Driver
+#db.connectionURL = jdbc:mariadb://localhost:3306/vid_openecomp_epsdk
+#db.userName = ecomp_sdk_user
+#db.password = ecomp_sdk_pass
+db.hib.dialect = org.hibernate.dialect.MySQLDialect
+db.min_pool_size = 5
+db.max_pool_size = 10
+hb.dialect = org.hibernate.dialect.MySQLDialect
+# SQL statements are logged to stdout
+hb.show_sql = true
+hb.idle_connection_test_period = 3600
+
+app_display_name = EPSDK App ATT
+# license file area
+files_path = /tmp
+
+#element map files
+element_map_file_path = app/fusionapp/files/
+element_map_icon_path = app/fusionapp/icons/
+
+#Cron Schedules have 6 required fields and 1 optional field:
+# Seconds Minutes Hours Day-of-Month Month Day-of-Week Year
+log_cron                      = 0 0/1 * * * ?;
+
+# ECOMP Portal Shared Context REST API URL
+ecomp_shared_context_rest_url= https://www.ecomp.att.com:8080/ecompportal/context
+
+# Link shown in Help menu
+contact_us_link = https://wiki.web.att.com/display/EcompPortal/ECOMP+Portal+Home
+
+# Camunda cockpit link
+camunda_cockpit_link = https://cloopwf.client.research.att.com:8443/camunda/app/cockpit/default/#/dashboard
+
+# An Unique 128-bit value defined to identify a specific version
+# of an application deployed on a specific virtual machine.
+# This value must be generated and updated by the application 
+# which is using the ECOMP SDK at the time of its deployment.
+# Online Unique UUID generator - https://www.uuidgenerator.net/
+instance_uuid=8da691c9-987d-43ed-a358-00ac2f35685d
+
+#  R Cloud feature
+guard_notebook_url=https://rcloud.research.att.com/mini.html?notebook=a06a9cf14211012e221bf842c168849d&
+
+# Application base URL has the host and app context only; a proper prefix of the on-boarded URL.
+# Only required for applications using WebJunction or FE/BE separation.  For example:
+# app_base_url = https://www.e-access.att.com/app_junction/app_context/
diff --git a/onap-enabler-be/src/test/resources/WEB-INF/fusion/conf/fusion.properties b/onap-enabler-be/src/test/resources/WEB-INF/fusion/conf/fusion.properties
new file mode 100644
index 0000000..b482c21
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/WEB-INF/fusion/conf/fusion.properties
@@ -0,0 +1,69 @@
+# domain settings
+#domain_class_location = com.att.fusion.domain.
+
+# validator settings
+#default_error_message = Default error message
+
+# login settings
+login_method_csp            = csp
+login_method_web_junction   = web_junction
+login_method_backdoor       = backdoor
+login_method_attribute_name = login_method
+
+#login message
+login.error.hrid.empty = Login failed, please contact system administrator. 
+login.error.hrid.not-found = User not found, please contact system administrator.
+login.error.user.inactive = Account is disabled, please contact system administrator.
+
+# CSP settings
+csp_cookie_name          = attESSec
+csp_gate_keeper_data_key = MgmtSysCtr
+csp_gate_keeper_prod_key = PROD
+csp_login_url            = https://www.e-access.att.com/empsvcs/hrpinmgt/pagLogin/?sysName=MgmtSysCtr&retURL=
+csp_logout_url           = https://www.e-access.att.com/empsvcs/hrpinmgt/pagLogout/?retURL=
+
+authentication_mechanism = BOTH
+
+#csp_gate_keeper_prod_key = DEVL
+user_attribute_name      = user
+#csp_login_url = https://www.e-access.att.com/empsvcs/hrpinmgt/pagLogin/?sysName=MgmtSysCtr&retURL=
+#csp_logout_url = https://webtest.csp.att.com/empsvcs/hrpinmgt/pagLogout/?retURL=
+
+# Web Junction settings
+#web_junction_user_id_header_name = iv-user
+
+# User Session settings
+#user_attribute_name           = user
+roles_attribute_name          = roles
+role_functions_attribute_name = role_functions
+role_function_list            = role_function_list
+#client_device_attribute_name  = client_device
+#client_device_emulation       = false
+#client_device_type_to_emulate = com.att.fusion.web.clientdevice.mobile.IPhoneDevice
+
+# POST settings
+post_initial_context_factory = com.sun.jndi.ldap.LdapCtxFactory
+post_provider_url            = ldap://ldap.webphone.att.com:389
+post_security_principal      = ou=people,o=att,c=us
+post_max_result_size         = 499
+
+# menu settings
+menu_query_name                      = menuData
+#menu_properties_file_location        = /WEB-INF/fusion/menu/
+application_menu_set_name            = APP
+application_menu_attribute_name      = applicationMenuData
+#application_menu_properties_name     = menu.properties
+business_direct_menu_set_name        = BD
+#business_direct_menu_properties_name = bd.menu.properties
+business_direct_menu_attribute_name  = businessDirectMenuData
+
+# RAPTOR config settings
+#raptor_config_file_path = /WEB-INF/conf/
+
+# Role settings
+sys_admin_role_id = 1
+#sys_admin_role_function_delete_from_ui = true
+
+# Profile Search settings
+#profile_search_report_id=181
+#callable_profile_search_report_id=386
diff --git a/onap-enabler-be/src/test/resources/asdc.properties b/onap-enabler-be/src/test/resources/asdc.properties
new file mode 100644
index 0000000..bbe736d
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/asdc.properties
@@ -0,0 +1,6 @@
+asdc.client.type=LOCAL
+
+asdc.client.rest.protocol=http
+asdc.client.rest.host=c2.vm1.sdc.simpledemo.openecomp.org
+asdc.client.rest.port=8080
+asdc.client.rest.auth=Basic dmlkOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
diff --git a/onap-enabler-be/src/test/resources/cr-csar.JSON b/onap-enabler-be/src/test/resources/cr-csar.JSON
new file mode 100644
index 0000000..326ec16
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/cr-csar.JSON
@@ -0,0 +1,77 @@
+{
+  "service": {
+    "uuid": "76f27dfe-33e5-472f-8e0b-acf524adc4f0",
+    "invariantUuid": "c3618e16-bb5b-433a-a6e0-565ca79d8b65",
+    "name": "MSO_Example_Service",
+    "version": "1.0",
+    "toscaModelURL": null,
+    "category": "Network L4+",
+    "serviceType": "",
+    "serviceRole": "",
+    "description": "MSO_Example_Service",
+    "serviceEcompNaming": "true",
+    "instantiationType": "ClientConfig",
+    "inputs": {
+
+    }
+  },
+  "vnfs": {
+
+  },
+  "networks": {
+
+  },
+  "collectionResource": {
+    "MSO_Example 0": {
+      "uuid": "4f8068d9-fb13-49fc-9e39-634d2094b659",
+      "invariantUuid": "2fc1b3b8-b8ed-413e-add8-3d903cf2b458",
+      "description": "MSO_Example",
+      "name": "MSO_Example",
+      "version": "0.2",
+      "customizationUuid": "fffc356d-9e95-4d9c-aa64-7273f33aae84",
+      "inputs": null,
+      "commands": {
+
+      },
+      "properties": {
+        "MSO_Example..NetworkCollection..0_network_collection_function": "fffff",
+        "MSO_Example..NetworkCollection..0_network_collection_description": "ddd",
+        "MSO_Example..Fixed..0_quantity": "89"
+      },
+      "type": "CR",
+      "category": "Network L2-3",
+      "subcategory": "Infrastructure",
+      "resourceVendor": "cisco",
+      "customizationUUID": "fffc356d-9e95-4d9c-aa64-7273f33aae84",
+      "resourceVendorRelease": "1.0",
+      "resourceVendorModelNumber": "",
+      "networksCollection": {
+        "MSO_Example..NetworkCollection..0": {
+          "uuid": "f4cb3cb6-a45d-474d-9af8-f4ae2e733ef7",
+          "invariantUuid": "f3cf3727-f779-4721-b989-851722c64ca4",
+          "name": "MSO_Example..NetworkCollection..0",
+          "version": "1",
+          "networkCollectionProperties": {
+            "networkCollectionFunction": "fffff",
+            "networkCollectionDescription": "ddd"
+          }
+        }
+      }
+    }
+  },
+  "configurations": {
+
+  },
+  "serviceProxies": {
+
+  },
+  "vfModules": {
+
+  },
+  "volumeGroups": {
+
+  },
+  "pnfs": {
+
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/csv_files/csv_to_json.csv b/onap-enabler-be/src/test/resources/csv_files/csv_to_json.csv
new file mode 100644
index 0000000..2e0f41d
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/csv_files/csv_to_json.csv
@@ -0,0 +1,99 @@
+﻿payload,request-parameters,,,vnf-name,ibcx0099v
+payload,request-parameters,[vm],,vm-name,ibcx0001vm001
+payload,request-parameters,[vm],[vnfc],vnfc-name,ibcx0001vm001dbg001
+payload,request-parameters,[vm],[vnfc],vnfc-function-code,dbg
+payload,request-parameters,[vm],[vnfc],vnfc-type,DBE-VM #1
+payload,request-parameters,[vm],[vnfc],group-notation,ibcx0001vm001dbg001pair
+payload,request-parameters,[vm],[vnfc],ipaddress-v4-oam-vip,135.21.166.39
+payload,request-parameters,[vm],,vm-name,ibcx0001vm002
+payload,request-parameters,[vm],[vnfc],vnfc-name,ibcx0001vm002dbg001
+payload,request-parameters,[vm],[vnfc],vnfc-function-code,dbg
+payload,request-parameters,[vm],[vnfc],vnfc-type,DBE-VM #1
+payload,request-parameters,[vm],[vnfc],group-notation,ibcx0001vm001dbg001pair
+,,,,,
+payload,request-parameters,,,template-name,vdbe_template1
+payload,configuration,,,configuration-string,"   <configuration xmlns=""http://xml.juniper.net/xnm/1.1/xnm"" 
+    xmlns:a=""http://xml.juniper.net/junos/15.1X49/junos"" >
+            <version>15.1X49-D50.3</version>
+            <groups>
+                <name>node0</name>
+                <system>
+                    <host-name>$node0_hostname</host-name>
+                    <backup-router>
+                        <address>$node0_backup_router_address</address>
+                        <destination>0.0.0.0/0</destination>
+             </backup-router>
+                </system>
+     </groups>
+    </configuration>"
+payload,configuration,,,configuration-json,"{
+   ""version"": ""15.1X49-D50.3"",
+   ""groups"": {
+      ""name"": ""node0"",
+      ""system"": {
+         ""host-name"": ""$node0_hostname"",
+         ""backup-router"": {
+            ""address"": ""$node0_backup_router_address"",
+            ""destination"": ""0.0.0.0/0""
+         }
+      }
+   }
+}"
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+payload,configuration-parameters,nat_source_sp_v6rogerssnat_address1,2001:1890:fc45:f025:135:25:246:c806/128
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
diff --git a/onap-enabler-be/src/test/resources/csv_files/empty_file.csv b/onap-enabler-be/src/test/resources/csv_files/empty_file.csv
new file mode 100644
index 0000000..e7bc056
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/csv_files/empty_file.csv
@@ -0,0 +1,18 @@
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/csv_files/missing_content.csv b/onap-enabler-be/src/test/resources/csv_files/missing_content.csv
new file mode 100644
index 0000000..0c02fc8
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/csv_files/missing_content.csv
@@ -0,0 +1,2 @@
+payload,request-parameters,,,ibcx0099v
+payload,request-parameters,,aa,vv
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/csv_files/missing_values.csv b/onap-enabler-be/src/test/resources/csv_files/missing_values.csv
new file mode 100644
index 0000000..9a2a8d6
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/csv_files/missing_values.csv
@@ -0,0 +1,2 @@
+payload,,,,,
+payload,request-parameters,,aa,vv
diff --git a/onap-enabler-be/src/test/resources/csv_files/one_line.csv b/onap-enabler-be/src/test/resources/csv_files/one_line.csv
new file mode 100644
index 0000000..315e939
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/csv_files/one_line.csv
@@ -0,0 +1 @@
+payload,request-parameters,,,vnf-name,ibcx0099v
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/git.properties b/onap-enabler-be/src/test/resources/git.properties
new file mode 100644
index 0000000..ada0a47
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/git.properties
@@ -0,0 +1,3 @@
+git.commit.id=123987
+git.commit.message.short=Test short commit message
+git.commit.time=1999-09-12T13\:48\:55+0200
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/mso.properties b/onap-enabler-be/src/test/resources/mso.properties
new file mode 100644
index 0000000..b58ba56
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/mso.properties
@@ -0,0 +1,17 @@
+mso.server.url=http://mtanjv9moah01-eth0.aic.cip.att.com:8080/ecomp/mso/infra
+mso.polling.interval.msecs=2000
+mso.max.polls=3
+mso.user.name=infraportal
+mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz
+mso.restapi.svc.instance=/serviceInstances/v3
+mso.restapi.vnf.instance=/serviceInstances/v3/<service_instance_id>/vnfs
+mso.restapi.network.instance=/serviceInstances/v3/<service_instance_id>/networks
+mso.restapi.vf.module.instance=/serviceInstantiation/v7/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
+mso.restapi.volume.group.instance=/serviceInstances/v3/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
+mso.restapi.configurations=/serviceInstances/v6/<service_instance_id>/configurations
+mso.restapi.get.orc.req=/orchestrationRequests/v3
+mso.restapi.get.orc.reqs=/orchestrationRequests/v3?
+mso.restapi.get.man.tasks=/tasks/v1
+mso.dme2.client.timeout=30000
+mso.dme2.client.read.timeout=120000
+mso.dme2.server.url=http://mso-api-handler-anap-v1.mso.ecomp.att.com/services/ecomp/mso?version=1607&envContext=TEST&routeOffer=st_mtsnj
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/msoRequest.json b/onap-enabler-be/src/test/resources/msoRequest.json
new file mode 100644
index 0000000..f7f0a82
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/msoRequest.json
@@ -0,0 +1,25 @@
+{
+  "requestDetails": {
+    "requestInfo": {
+      "instanceName": "KLKLKL",
+      "source": "VID",
+      "suppressRollback": false,
+      "requestorId": "1"
+    },
+    "modelInfo": {
+      "modelType": "service",
+      "modelInvariantId": "709d1be4-9a3f-4a29-8c4d-a20465e808a3",
+      "modelVersionId": "1de57bcf-365a-4ba7-8a51-7377b7144586",
+      "modelName": "1707vidnf",
+      "modelVersion": "2.0"
+    },
+    "requestParameters": {
+      "userParams": [],
+      "subscriptionServiceType": "HNGATEWAY",
+      "aLaCarte": true
+    },
+    "subscriberInfo": {
+      "globalSubscriberId": "21014aa2-9e71128cae7-jl319x"
+    }
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/objectconfig.properties b/onap-enabler-be/src/test/resources/objectconfig.properties
new file mode 100644
index 0000000..0093129
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/objectconfig.properties
@@ -0,0 +1,18 @@
+baseURL=http://vid.onap.org:9080/vid/login_external.htm
+
+
+
+login=//input[@class='fn-ebz-text ng-pristine ng-valid']
+pwd=//input[@class='span3 ng-pristine ng-valid']
+loginButton=loginBtn
+
+
+profilelink=html/body/div[1]/div[1]/div/div/div[2]/div/div/div[1]/div/div/accordion/div/div[5]/a/span
+refreshButtonSubscriberName=//img[@src='static/fusion/images/refresh.jpg']
+
+subscriberNameDropDown=.//*[@id='mContent']/div/div/table/tbody/tr[1]/td[2]/div/select
+serviceTypeDropDown=.//*[@id='mContent']/div/div/table/tbody/tr[2]/td[2]/div/select
+submitButton=.//*[@id='mContent']/div/div/table/tbody/tr[3]/td/div/button
+
+test.loginId=2222
+test.loginPassword=2222
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json b/onap-enabler-be/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json
new file mode 100644
index 0000000..c6a8cf7
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/activateOperationalEnvironmentsPayloadToMso.json
@@ -0,0 +1,23 @@
+{
+  "requestDetails": {
+    "requestInfo": {
+      "resourceType": "operationalEnvironment",
+      "source": "VID",
+      "requestorId": "<userId>"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "resourceType": "operationalEnvironment",
+          "instanceId": "<relatedInstanceId>",
+          "instanceName": "<relatedInstanceName>"
+        }
+      }
+    ],
+    "requestParameters": {
+      "operationalEnvironmentType": "VNF",
+      "workloadContext": "<workloadContext>",
+      "manifest": <manifest>
+    }
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request.json b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request.json
new file mode 100644
index 0000000..e57c5a9
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request.json
@@ -0,0 +1,95 @@
+{
+	"requestDetails": {
+		"modelInfo": {
+			"modelType": "service",
+			"modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+			"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+			"modelName": "MOW AVPN vMX BV vPE 1 Service",
+			"modelVersion": "10.0"
+		},
+		"owningEntity": {
+			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+			"owningEntityName": "PACKET CORE"
+		},
+		"project": {
+			"projectName": "{some project name}"
+		},
+		"subscriberInfo": {
+			"globalSubscriberId": "{some subscriber id}"
+		},
+		"requestInfo": {
+			"instanceName": "vPE_Service",
+			"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+			"source": "VID",
+			"suppressRollback": true,
+			"requestorId": "az2016"
+		},
+		"requestParameters": {
+			"subscriptionServiceType": "VMX",
+			"aLaCarte": false,
+			"userParams": [{
+				"service": {
+					"modelInfo": {
+						"modelType": "service",
+						"modelName": "MOW AVPN vMX BV vPE 1 Service",
+						"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+					},
+					"instanceName": "vPE_Service",
+					"instanceParams": [{
+						"instanceParams_test1": "some text",
+						"instanceParams_test2": "another text"
+					}],
+					"resources": {
+						"vnfs": [{
+							"modelInfo": {
+								"modelType": "vnf",
+								"modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+								"modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+								"modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+								"modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+							},
+							"cloudConfiguration": {
+								"lcpCloudRegionId": "mdt1",
+								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+							},
+							"platform": {
+								"platformName": "platformName"
+							},
+							"lineOfBusiness": {
+								"lineOfBusinessName": "lineOfBusinessName"
+							},
+							"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+							"instanceName": "vmxnjr001",
+							"instanceParams": [],
+							"vfModules": [{
+                              "modelInfo": {
+                                "modelType": "vfModule",
+                                "modelName": "201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0",
+                                "modelVersionId": "4c75f813-fa91-45a4-89d0-790ff5f1ae79",
+                                "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+                              },
+                              "instanceName": "vmxnjr001_AVPN_base_vPE_BV_base_001",
+                              "instanceParams": [{
+                                "vmx_int_net_len": "24"
+                              }]
+                            },
+                              {
+                                "modelInfo": {
+                                  "modelType": "vfModule",
+                                  "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+                                  "modelVersionId": "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+                                  "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+                                },
+                                "instanceName": "vmxnjr001_AVPN_base_vRE_BV_expansion_001",
+                                "instanceParams": [{
+                                  "availability_zone_0": "mtpocdv-kvm-az01",
+                                  "vre_a_volume_size_0": "100"
+                                }]
+                              }]
+						}]
+					}
+				}
+			}]
+		}
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_ecomp_naming.json b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_ecomp_naming.json
new file mode 100644
index 0000000..52e9b54
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_ecomp_naming.json
@@ -0,0 +1,90 @@
+{
+	"requestDetails": {
+		"modelInfo": {
+			"modelType": "service",
+			"modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+			"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+			"modelName": "MOW AVPN vMX BV vPE 1 Service",
+			"modelVersion": "10.0"
+		},
+		"owningEntity": {
+			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+			"owningEntityName": "PACKET CORE"
+		},
+		"project": {
+			"projectName": "{some project name}"
+		},
+		"subscriberInfo": {
+			"globalSubscriberId": "{some subscriber id}"
+		},
+		"requestInfo": {
+			"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+			"source": "VID",
+			"suppressRollback": false,
+			"requestorId": "az2016"
+		},
+		"requestParameters": {
+			"subscriptionServiceType": "VMX",
+			"aLaCarte": false,
+			"userParams": [{
+				"service": {
+					"modelInfo": {
+						"modelType": "service",
+						"modelName": "MOW AVPN vMX BV vPE 1 Service",
+						"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+					},
+					"instanceParams": [{
+						"instanceParams_test1": "some text",
+						"instanceParams_test2": "another text"
+					}],
+					"resources": {
+						"vnfs": [{
+							"modelInfo": {
+								"modelType": "vnf",
+								"modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+								"modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+								"modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+								"modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+							},
+							"cloudConfiguration": {
+								"lcpCloudRegionId": "mdt1",
+								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+							},
+							"platform": {
+								"platformName": "platformName"
+							},
+							"lineOfBusiness": {
+								"lineOfBusinessName": "lineOfBusinessName"
+							},
+							"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+							"instanceParams": [],
+							"vfModules": [{
+                              "modelInfo": {
+                                "modelType": "vfModule",
+                                "modelName": "201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0",
+                                "modelVersionId": "4c75f813-fa91-45a4-89d0-790ff5f1ae79",
+                                "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+                              },
+                              "instanceParams": [{
+                                "vmx_int_net_len": "24"
+                              }]
+                            },
+                              {
+                                "modelInfo": {
+                                  "modelType": "vfModule",
+                                  "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+                                  "modelVersionId": "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+                                  "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+                                },
+                                "instanceParams": [{
+                                  "availability_zone_0": "mtpocdv-kvm-az01",
+                                  "vre_a_volume_size_0": "100"
+                                }]
+                              }]
+						}]
+					}
+				}
+			}]
+		}
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json
new file mode 100644
index 0000000..3640593
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json
@@ -0,0 +1,67 @@
+{
+	"requestDetails": {
+		"modelInfo": {
+			"modelType": "service",
+			"modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+			"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+			"modelName": "MOW AVPN vMX BV vPE 1 Service",
+			"modelVersion": "10.0"
+		},
+		"owningEntity": {
+			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+			"owningEntityName": "PACKET CORE"
+		},
+		"project": {
+			"projectName": "{some project name}"
+		},
+		"subscriberInfo": {
+			"globalSubscriberId": "{some subscriber id}"
+		},
+		"requestInfo": {
+			"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+			"source": "VID",
+			"suppressRollback": false,
+			"requestorId": "az2016"
+		},
+		"requestParameters": {
+			"subscriptionServiceType": "VMX",
+			"aLaCarte": false,
+			"userParams": [{
+				"service": {
+					"modelInfo": {
+						"modelType": "service",
+						"modelName": "MOW AVPN vMX BV vPE 1 Service",
+						"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+					},
+					"instanceParams": [{
+						"instanceParams_test1": "some text",
+						"instanceParams_test2": "another text"
+					}],
+					"resources": {
+						"vnfs": [{
+							"modelInfo": {
+								"modelType": "vnf",
+								"modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+								"modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+								"modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+								"modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+							},
+							"cloudConfiguration": {
+								"lcpCloudRegionId": "mdt1",
+								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+							},
+							"platform": {
+								"platformName": "platformName"
+							},
+							"lineOfBusiness": {
+								"lineOfBusinessName": "lineOfBusinessName"
+							},
+							"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+							"instanceParams": []
+						}]
+					}
+				}
+			}]
+		}
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_unique_names.json b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_unique_names.json
new file mode 100644
index 0000000..e6c58b9
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/bulk_service_request_unique_names.json
@@ -0,0 +1,96 @@
+{
+	"requestDetails": {
+		"modelInfo": {
+			"modelType": "service",
+			"modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+			"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+			"modelName": "MOW AVPN vMX BV vPE 1 Service",
+			"modelVersion": "10.0"
+		},
+		"owningEntity": {
+			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+			"owningEntityName": "PACKET CORE"
+		},
+		"project": {
+			"projectName": "{some project name}"
+		},
+		"subscriberInfo": {
+			"globalSubscriberId": "{some subscriber id}"
+		},
+		"requestInfo": {
+			"instanceName": "vPE_Service_{SERVICE_UNIQENESS}",
+			"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+			"source": "VID",
+			"suppressRollback": true,
+			"requestorId": "az2016"
+		},
+		"requestParameters": {
+			"subscriptionServiceType": "VMX",
+			"aLaCarte": false,
+			"userParams": [{
+				"service": {
+					"modelInfo": {
+						"modelType": "service",
+						"modelName": "MOW AVPN vMX BV vPE 1 Service",
+						"modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+					},
+					"instanceName": "vPE_Service_{SERVICE_UNIQENESS}",
+					"instanceParams": [{
+						"instanceParams_test1": "some text",
+						"instanceParams_test2": "another text"
+					}],
+					"resources": {
+						"vnfs": [{
+							"modelInfo": {
+								"modelType": "vnf",
+								"modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+								"modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+								"modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+								"modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+							},
+							"cloudConfiguration": {
+								"lcpCloudRegionId": "mdt1",
+								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+							},
+							"platform": {
+								"platformName": "platformName"
+							},
+							"lineOfBusiness": {
+								"lineOfBusinessName": "lineOfBusinessName"
+							},
+							"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+							"instanceName": "vmxnjr001_{VNF_UNIQENESS}",
+							"instanceParams": [],
+							"vfModules": [{
+                              "modelInfo": {
+                                "modelType": "vfModule",
+                                "modelName": "201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0",
+                                "modelVersionId": "4c75f813-fa91-45a4-89d0-790ff5f1ae79",
+                                "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+                              },
+                              "instanceName": "vmxnjr001_AVPN_base_vPE_BV_base_{VF_MODULE_UNIQENESS}",
+                              "instanceParams": [{
+                                "vmx_int_net_len": "24"
+                              }]
+                            },
+                              {
+                                "modelInfo": {
+                                  "modelType": "vfModule",
+                                  "modelName": "201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
+                                  "modelVersionId": "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+                                  "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+                                },
+                                "instanceName": "vmxnjr001_AVPN_base_vRE_BV_expansion_{VF_MODULE_2_UNIQENESS}",
+                                "volumeGroupInstanceName" : "myVgName_{VG_UNIQUENESS}",
+                                "instanceParams": [{
+                                  "availability_zone_0": "mtpocdv-kvm-az01",
+                                  "vre_a_volume_size_0": "100"
+                                }]
+                              }]
+						}]
+					}
+				}
+			}]
+		}
+	}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/createOperationalEnvironmentsPayloadToMso.json b/onap-enabler-be/src/test/resources/payload_jsons/createOperationalEnvironmentsPayloadToMso.json
new file mode 100644
index 0000000..3a96bb9
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/createOperationalEnvironmentsPayloadToMso.json
@@ -0,0 +1,24 @@
+{
+  "requestDetails": {
+    "requestInfo": {
+      "resourceType": "operationalEnvironment",
+      "instanceName": "<instanceName>",
+      "source": "VID",
+      "requestorId": "<userId>"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "resourceType": "operationalEnvironment",
+          "instanceId": "<ecompInstanceId>",
+          "instanceName": "<ecompInstanceName>"
+        }
+      }
+    ],
+    "requestParameters": {
+      "operationalEnvironmentType": "<operationalEnvType>",
+      "tenantContext": "<tenantContext>",
+      "workloadContext": "<workloadContext>"
+    }
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json b/onap-enabler-be/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json
new file mode 100644
index 0000000..38c2224
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/deactivateOperationalEnvironmentsPayloadToMso.json
@@ -0,0 +1,12 @@
+{
+  "requestDetails": {
+    "requestInfo": {
+      "resourceType": "operationalEnvironment",
+      "source": "VID",
+      "requestorId": "<userId>"
+    },
+    "requestParameters": {
+      "operationalEnvironmentType": "VNF"
+    }
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/mso_request_create_configuration.json b/onap-enabler-be/src/test/resources/payload_jsons/mso_request_create_configuration.json
new file mode 100644
index 0000000..5502e8f
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/mso_request_create_configuration.json
@@ -0,0 +1,62 @@
+
+{
+  "requestDetails": {
+    "modelInfo": {
+      "modelType": "configuration",
+      "modelInvariantId": "c30a024e-a6c6-4670-b73c-3df64eb57ff6",
+      "modelVersionId": "f58d039d-4cfc-40ec-bd75-1f05f0458a6c",
+      "modelName": "Port Mirroring Configuration By Policy",
+      "modelVersion": "1.0",
+      "modelCustomizationId": "4b7ebace-bad6-4526-9be6-bf248e20fc5f",
+      "modelCustomizationName": "Port Mirroring Configuration By Policy 1"
+    },
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "AAIAIC25"
+    },
+    "requestInfo": {
+      "instanceName":"test_sssdad",
+      "source": "VID",
+      "requestorId": "1"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "c187e9fe-40c3-4862-b73e-84ff056205f6 ",
+          "modelInfo": {
+            "modelType": "service",
+            "modelInvariantId": "b7d923c9-6175-41f1-91ba-4565c4953408",
+            "modelVersionId": "ee6d61be-4841-4f98-8f23-5de9da846ca7",
+            "modelName": "ServiceContainerMultiplepProbes",
+            "modelVersion": "1.0"
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": "9be14a4f-7367-4cf9-96a1-f08f10f485a7",
+          "instanceDirection": "source",
+          "modelInfo": {
+            "modelType": "vnf",
+            "modelInvariantId": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
+            "modelVersionId": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
+            "modelName": "vmmeService2",
+            "modelVersion": "1.0",
+            "modelCustomizationId": "060be63d-5f9c-4fd0-8ef7-830d5e8eca17"
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": "AS-pnf2-10219--as988q",
+          "instanceDirection": "destination",
+          "modelInfo": {
+            "modelType": "pnf"
+          }
+        }
+      }
+    ],
+    "requestParameters": {
+      "userParams": []
+    }
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/mso_service_instantiation.json b/onap-enabler-be/src/test/resources/payload_jsons/mso_service_instantiation.json
new file mode 100644
index 0000000..115a715
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/mso_service_instantiation.json
@@ -0,0 +1,95 @@
+{
+  "requestDetails": {
+    "modelInfo": {
+      "modelType": "service",
+      "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+      "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+      "modelName": "Test",
+      "modelVersion": "1.0"
+    },
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "mdt1",
+      "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+    },
+    "owningEntity": {
+      "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+      "owningEntityName": "PACKET CORE"
+    },
+    "project": {
+      "projectName": "TODO"
+    },
+    "subscriberInfo": {
+      "globalSubscriberId": "TODO",
+      "subscriberName": "TODO"
+    },
+    "requestInfo": {
+      "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+      "source": "VID",
+      "suppressRollback": true,
+      "requestorId": "az2016"
+    },
+    "requestParameters": {
+      "subscriptionServiceType":"MOG",
+      "aLaCarte": false,
+      "userParams": [{
+        "name": "TODO",
+        "value": "TODO"
+      }
+      ]
+    }
+  }
+}
+/*
+{
+  "modelInfo":{
+    "modelType":"service",
+    "modelInvariantId":"5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+    "modelVersionId":"3c40d244-808e-42ca-b09a-256d83d19d0a",
+    "modelName":"MOW AVPN vMX BV vPE 1 Service",
+    "modelVersion":"10.0"
+  },
+  "owningEntityId":"038d99af-0427-42c2-9d15-971b99b9b489",
+  "owningEntityName":"PACKET CORE",
+  "projectName":"{some project name}",
+  "globalSubscriberId":"{some subscriber id}",
+  "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+  "instanceName":"vPE_Service",
+  "subscriptionServiceType":"VMX",
+  "lcpCloudRegionId":"mdt1",
+  "tenantId":"88a6ca3ee0394ade9403f075db23167e",
+  "vnfs":[
+    {
+      "modelInfo":{
+        "modelName":"2016-73_MOW-AVPN-vPE-BV-L",
+        "modelVersionId":"7f40c192-f63c-463e-ba94-286933b895f8",
+        "modelCustomizationName":"2016-73_MOW-AVPN-vPE-BV-L 0",
+        "modelCustomizationId":"ab153b6e-c364-44c0-bef6-1f2982117f04"
+      },
+      "lcpCloudRegionId":"mdt1",
+      "tenantId":"88a6ca3ee0394ade9403f075db23167e",
+      "platformName":"test",
+      "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+      "instanceName":"vmxnjr001",
+      "instanceParams":[
+
+      ],
+      "vfModules":[
+        {
+          "modelInfo":{
+            "modelType":"vfModule",
+            "modelName":"201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0",
+            "modelVersionId":"4c75f813-fa91-45a4-89d0-790ff5f1ae79",
+            "modelCustomizationId":"a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+          },
+          "instanceName":"vmxnjr001_AVPN_base_vPE_BV_base_001",
+          "instanceParams":[
+            {
+              "vmx_int_net_len":"24"
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
+*/
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/scaleOutVfModulePayload.json b/onap-enabler-be/src/test/resources/payload_jsons/scaleOutVfModulePayload.json
new file mode 100644
index 0000000..5fde429
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/scaleOutVfModulePayload.json
@@ -0,0 +1,67 @@
+{
+    "vnfName":"test",
+    "vnfInstanceId":"123",
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "fd84f066-ea75-4b23-acd0-3cf3fce7a99b",
+          "modelInfo": {
+            "modelType": "service",
+            "modelInvariantId": "c9817f08-07b2-458b-a02f-cd5407ee7a7b",
+            "modelVersionId": "0e0bb964-e687-4439-9a9e-de9cd1ff5367",
+            "modelName": "ws-service",
+            "modelVersion": "1.0",
+            "additionalProperties": {}
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": "980fe98e-47f8-4164-862d-4ebb026cec75",
+          "modelInfo": {
+            "modelType": "vnf",
+            "modelInvariantId": "734f0952-6678-44e7-8918-f9aa4694b687",
+            "modelVersionId": "0e0bb964-e687-4439-9a9e-de9cd1ff5367",
+            "modelName": "ws-sp",
+            "modelVersion": "1.0",
+            "modelCustomizationName": "ws-sp 0",
+            "modelCustomizationId": "5815868c-35f8-4c5a-b899-e6eb49f52986",
+            "additionalProperties": {}
+          }
+        }
+      }
+    ],
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "RegionOne",
+      "tenantId": "1e097c6713e74fd7ac8e4295e605ee1e",
+      "additionalProperties": {}
+    },
+    "modelInfo": {
+      "modelCustomizationName": "WsSp..base_ws..module-0",
+      "modelCustomizationId": "bfcc8f57-7b56-4be8-a8f1-e44262c83318",
+      "modelInvariantId": "763b1172-b5f5-4062-9d79-2459710fa0bc",
+      "modelVersionId": "53f52586-236b-4d52-a94c-990883e054f0",
+      "modelName": "WsSp..base_ws..module-0",
+      "modelNameVersionId": null,
+      "modelType": "vfModule",
+      "modelVersion": "1",
+      "additionalProperties": {}
+    },
+    "requestInfo": {
+      "instanceName": "ws-test-0310-8_NaN",
+      "source": "VID",
+      "suppressRollback": false,
+      "requestorId": "demo",
+      "additionalProperties": {}
+    },
+    "requestParameters": {
+      "additionalProperties": {}
+    },
+    "configurationParameters": [
+      {
+        "availability-zone": "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
+        "xtz-123": "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/payload_jsons/scaleOutVfModulePayloadToMso.json b/onap-enabler-be/src/test/resources/payload_jsons/scaleOutVfModulePayloadToMso.json
new file mode 100644
index 0000000..5409f89
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/payload_jsons/scaleOutVfModulePayloadToMso.json
@@ -0,0 +1,66 @@
+{
+  "requestDetails": {
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "fd84f066-ea75-4b23-acd0-3cf3fce7a99b",
+          "modelInfo": {
+            "modelType": "service",
+            "modelInvariantId": "c9817f08-07b2-458b-a02f-cd5407ee7a7b",
+            "modelVersionId": "0e0bb964-e687-4439-9a9e-de9cd1ff5367",
+            "modelName": "ws-service",
+            "modelVersion": "1.0",
+            "additionalProperties": {}
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": "980fe98e-47f8-4164-862d-4ebb026cec75",
+          "modelInfo": {
+            "modelType": "vnf",
+            "modelInvariantId": "734f0952-6678-44e7-8918-f9aa4694b687",
+            "modelVersionId": "0e0bb964-e687-4439-9a9e-de9cd1ff5367",
+            "modelName": "ws-sp",
+            "modelVersion": "1.0",
+            "modelCustomizationName": "ws-sp 0",
+            "modelCustomizationId": "5815868c-35f8-4c5a-b899-e6eb49f52986",
+            "additionalProperties": {}
+          }
+        }
+      }
+    ],
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "RegionOne",
+      "tenantId": "1e097c6713e74fd7ac8e4295e605ee1e",
+      "additionalProperties": {}
+    },
+    "modelInfo": {
+      "modelCustomizationName": "WsSp..base_ws..module-0",
+      "modelCustomizationId": "bfcc8f57-7b56-4be8-a8f1-e44262c83318",
+      "modelInvariantId": "763b1172-b5f5-4062-9d79-2459710fa0bc",
+      "modelVersionId": "53f52586-236b-4d52-a94c-990883e054f0",
+      "modelName": "WsSp..base_ws..module-0",
+      "modelNameVersionId": null,
+      "modelType": "vfModule",
+      "modelVersion": "1",
+      "additionalProperties": {}
+    },
+    "requestInfo": {
+      "instanceName": "ws-test-0310-8_NaN",
+      "source": "VID",
+      "suppressRollback": false,
+      "requestorId": "demo",
+      "additionalProperties": {}
+    },
+    "requestParameters": {
+      "additionalProperties": {}
+    },
+    "configurationParameters": [
+      {
+        "availability-zone": "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
+        "xtz-123": "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/pnf.csar b/onap-enabler-be/src/test/resources/pnf.csar
new file mode 100644
index 0000000..eb42484
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/pnf.csar
Binary files differ
diff --git a/onap-enabler-be/src/test/resources/policy-configuration-by-policy-false.JSON b/onap-enabler-be/src/test/resources/policy-configuration-by-policy-false.JSON
new file mode 100644
index 0000000..648ff70
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/policy-configuration-by-policy-false.JSON
@@ -0,0 +1,166 @@
+{
+  "service": {
+    "uuid": "ee6d61be-4841-4f98-8f23-5de9da845544",
+    "invariantUuid": "b7d923c9-6175-41f1-91ba-4565c4955555",
+    "name": "ServiceContainerMultiplepProbes2",
+    "version": "2.0",
+    "toscaModelURL": null,
+    "category": "Network L1-3",
+    "serviceType": "portMirroring",
+    "serviceRole": "pProbe",
+    "description": "sdfsdfsdf",
+    "serviceEcompNaming": "true",
+    "inputs": {}
+  },
+  "vnfs": {},
+  "networks": {},
+  "configurations": {
+    "Port Mirroring Configuration By Policy 1": {
+      "uuid": "f58d039d-4cfc-40ec-bd75-1f05f0434567",
+      "invariantUuid": "c30a024e-a6c6-4670-b73c-3df64eb57ff6",
+      "description": "A port mirroring configuration by policy object",
+      "name": "Port Mirroring Configuration By Policy",
+      "version": "1.0",
+      "customizationUuid": "4b7ebace-bad6-4526-9be6-bf248e20fc5f",
+      "inputs": {},
+      "commands": {},
+      "properties": {
+        "collector_node": "pprobeservice_proxy 5",
+        "policy_name": "policy2",
+        "equip_vendor": "Cisco",
+        "equip_model": "Nexus 3048-TP"
+      },
+      "type": "Configuration",
+      "modelCustomizationName": "Port Mirroring Configuration By Policy 1",
+      "sourceNodes": [
+        "vmmeservice2_proxy 2",
+        "vmmeservice2_proxy 3"
+      ],
+      "collectorNodes": [
+        "pprobeservice_proxy 5"
+      ],
+      "configurationByPolicy": false
+    },
+    "Port Mirroring Configuration By Policy 0": {
+      "uuid": "f58d039d-4cfc-40ec-bd75-1f05f0458a6c",
+      "invariantUuid": "c30a024e-a6c6-4670-b73c-3df64eb57ff6",
+      "description": "A port mirroring configuration by policy object",
+      "name": "Port Mirroring Configuration By Policy",
+      "version": "1.0",
+      "customizationUuid": "08a181aa-72eb-435f-9593-e88a3ad0a86b",
+      "inputs": {},
+      "commands": {},
+      "properties": {
+        "collector_node": "pprobeservice_proxy 4",
+        "policy_name": "policy1",
+        "equip_vendor": "Cisco",
+        "equip_model": "Nexus 3048-TP"
+      },
+      "type": "Configuration",
+      "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
+      "sourceNodes": [
+        "vmmeservice2_proxy 2",
+        "vmmeservice_proxy 1",
+        "vmmeservice_proxy 0"
+      ],
+      "collectorNodes": [
+      ],
+      "configurationByPolicy": true
+    }
+  },
+  "serviceProxies": {
+    "vmmeservice_proxy 0": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService",
+      "name": "vmmeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "d7cfe338-eeda-4217-ba13-f24b0811fb17",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
+      "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
+      "sourceModelName": "vmmeService"
+    },
+    "vmmeservice_proxy 1": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService",
+      "name": "vmmeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "7a69f133-564c-4eb6-b93e-0a8281967efb",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
+      "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
+      "sourceModelName": "vmmeService"
+    },
+    "vmmeservice2_proxy 3": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService2",
+      "name": "vmmeService2 Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "9d81c21f-e29c-44f6-b5f6-caa974ee078a",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
+      "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
+      "sourceModelName": "vmmeService2"
+    },
+    "pprobeservice_proxy 4": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service pProbeService",
+      "name": "pProbeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "271efa3b-276e-4536-976a-cc9c9c014f1e",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "8a84e59b-45fe-4851-8ff1-34225a0b32c3",
+      "sourceModelInvariant": "83b458fd-5dd3-419b-a9e3-7335814a0911",
+      "sourceModelName": "pProbeService"
+    },
+    "pprobeservice_proxy 5": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service pProbeService",
+      "name": "pProbeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "d64623ae-5935-4afd-803e-c86e94d8e740",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "8a84e59b-45fe-4851-8ff1-34225a0b32c3",
+      "sourceModelInvariant": "83b458fd-5dd3-419b-a9e3-7335814a0911",
+      "sourceModelName": "pProbeService"
+    },
+    "vmmeservice2_proxy 2": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService2",
+      "name": "vmmeService2 Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "060be63d-5f9c-4fd0-8ef7-830d5e8eca17",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
+      "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
+      "sourceModelName": "vmmeService2"
+    }
+  },
+  "vfModules": {},
+  "volumeGroups": {},
+  "pnfs": {}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/policy-configuration-csar.JSON b/onap-enabler-be/src/test/resources/policy-configuration-csar.JSON
new file mode 100644
index 0000000..77f2685
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/policy-configuration-csar.JSON
@@ -0,0 +1,168 @@
+{
+  "service": {
+    "uuid": "ee6d61be-4841-4f98-8f23-5de9da846ca7",
+    "invariantUuid": "b7d923c9-6175-41f1-91ba-4565c4953408",
+    "name": "ServiceContainerMultiplepProbes",
+    "version": "1.0",
+    "toscaModelURL": null,
+    "category": "Network L1-3",
+    "serviceType": "portMirroring",
+    "serviceRole": "pProbe",
+    "description": "sdfsdfsdf",
+    "serviceEcompNaming": "true",
+    "inputs": {}
+  },
+  "vnfs": {},
+  "networks": {},
+  "configurations": {
+    "Port Mirroring Configuration By Policy 1": {
+      "uuid": "f58d039d-4cfc-40ec-bd75-1f05f0458a6c",
+      "invariantUuid": "c30a024e-a6c6-4670-b73c-3df64eb57ff6",
+      "description": "A port mirroring configuration by policy object",
+      "name": "Port Mirroring Configuration By Policy",
+      "version": "1.0",
+      "customizationUuid": "4b7ebace-bad6-4526-9be6-bf248e20fc5f",
+      "inputs": {},
+      "commands": {},
+      "properties": {
+        "collector_node": "pprobeservice_proxy 5",
+        "policy_name": "policy2",
+        "equip_vendor": "Cisco",
+        "equip_model": "Nexus 3048-TP"
+      },
+      "type": "Configuration",
+      "modelCustomizationName": "Port Mirroring Configuration By Policy 1",
+      "sourceNodes": [
+        "vmmeservice2_proxy 2",
+        "vmmeservice2_proxy 3",
+        "vmmeservice_proxy 1"
+      ],
+      "collectorNodes": [
+        "pprobeservice_proxy 5"
+      ],
+      "configurationByPolicy": true
+    },
+    "Port Mirroring Configuration By Policy 0": {
+      "uuid": "f58d039d-4cfc-40ec-bd75-1f05f0458a6c",
+      "invariantUuid": "c30a024e-a6c6-4670-b73c-3df64eb57ff6",
+      "description": "A port mirroring configuration by policy object",
+      "name": "Port Mirroring Configuration By Policy",
+      "version": "1.0",
+      "customizationUuid": "08a181aa-72eb-435f-9593-e88a3ad0a86b",
+      "inputs": {},
+      "commands": {},
+      "properties": {
+        "collector_node": "pprobeservice_proxy 4",
+        "policy_name": "policy1",
+        "equip_vendor": "Cisco",
+        "equip_model": "Nexus 3048-TP"
+      },
+      "type": "Configuration",
+      "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
+      "sourceNodes": [
+        "vmmeservice2_proxy 2",
+        "vmmeservice_proxy 1",
+        "vmmeservice_proxy 0"
+      ],
+      "collectorNodes": [
+        "pprobeservice_proxy 4"
+      ],
+      "configurationByPolicy": true
+    }
+  },
+  "serviceProxies": {
+    "vmmeservice_proxy 0": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService",
+      "name": "vmmeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "d7cfe338-eeda-4217-ba13-f24b0811fb17",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
+      "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
+      "sourceModelName": "vmmeService"
+    },
+    "vmmeservice_proxy 1": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService",
+      "name": "vmmeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "7a69f133-564c-4eb6-b93e-0a8281967efb",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
+      "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
+      "sourceModelName": "vmmeService"
+    },
+    "vmmeservice2_proxy 3": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService2",
+      "name": "vmmeService2 Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "9d81c21f-e29c-44f6-b5f6-caa974ee078a",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
+      "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
+      "sourceModelName": "vmmeService2"
+    },
+    "pprobeservice_proxy 4": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service pProbeService",
+      "name": "pProbeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "271efa3b-276e-4536-976a-cc9c9c014f1e",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "8a84e59b-45fe-4851-8ff1-34225a0b32c3",
+      "sourceModelInvariant": "83b458fd-5dd3-419b-a9e3-7335814a0911",
+      "sourceModelName": "pProbeService"
+    },
+    "pprobeservice_proxy 5": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service pProbeService",
+      "name": "pProbeService Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "d64623ae-5935-4afd-803e-c86e94d8e740",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "8a84e59b-45fe-4851-8ff1-34225a0b32c3",
+      "sourceModelInvariant": "83b458fd-5dd3-419b-a9e3-7335814a0911",
+      "sourceModelName": "pProbeService"
+    },
+    "vmmeservice2_proxy 2": {
+      "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
+      "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
+      "description": "A Proxy for Service vmmeService2",
+      "name": "vmmeService2 Service Proxy",
+      "version": "1.0",
+      "customizationUuid": "060be63d-5f9c-4fd0-8ef7-830d5e8eca17",
+      "inputs": {},
+      "commands": {},
+      "properties": {},
+      "type": "Service Proxy",
+      "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
+      "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
+      "sourceModelName": "vmmeService2"
+    }
+  },
+  "vfModules": {},
+  "volumeGroups": {},
+  "pnfs": {}
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/roles.json b/onap-enabler-be/src/test/resources/roles.json
new file mode 100644
index 0000000..db32392
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/roles.json
@@ -0,0 +1,8 @@
+{
+  "roles": [
+    "VID_Subscriber_serviceType1_Tenant1",
+    "VID_Subscriber_serviceType1_Tenant2",
+    "read_motorola_epost_tow",
+    "read_motorola_epost"
+  ]
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/sampleTosca.csar b/onap-enabler-be/src/test/resources/sampleTosca.csar
new file mode 100644
index 0000000..d9c469a
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/sampleTosca.csar
Binary files differ
diff --git a/onap-enabler-be/src/test/resources/services/change_management_software_update_expected_mso_request.json b/onap-enabler-be/src/test/resources/services/change_management_software_update_expected_mso_request.json
new file mode 100644
index 0000000..5bdc9ea
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/services/change_management_software_update_expected_mso_request.json
@@ -0,0 +1,15 @@
+{
+  "requestDetails": {
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "mdt1",
+      "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+    },
+    "requestInfo": {
+      "source": "VID",
+      "requestorId": "az2016"
+    },
+    "requestParameters": {
+      "payload": "{\"existing_software_version\": \"3.1\",\"new_software_version\": \"3.2\", \"operations_timeout\": \"3600\"}"
+    }
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/services/change_management_software_update_request.json b/onap-enabler-be/src/test/resources/services/change_management_software_update_request.json
new file mode 100644
index 0000000..2ce2a77
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/services/change_management_software_update_request.json
@@ -0,0 +1,26 @@
+{ "requestDetails": [
+    {
+      "cloudConfiguration": {
+        "lcpCloudRegionId": "mdt1",
+        "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+      },
+      "requestInfo": {
+        "source": "VID",
+        "requestorId": "az2016"
+      },
+      "requestParameters": {
+        "payload": "{\"existing_software_version\": \"3.1\",\"new_software_version\": \"3.2\", \"operations_timeout\": \"3600\"}"
+      },
+      "vnfName": "vidVnf",
+      "vnfInstanceId": "abe59ceb-6909-4a2c-ad6a-c46d90b18f0b",
+      "relatedInstanceList": [
+        {
+          "relatedInstance": {
+            "instanceId": "166b2c5b-6746-4613-bd38-faf46f7afb73"
+          }
+        }
+      ]
+    }
+  ],
+  "requestType": "VNF In Place Software Update"
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/vf-csar.JSON b/onap-enabler-be/src/test/resources/vf-csar.JSON
new file mode 100644
index 0000000..b07ff37
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/vf-csar.JSON
@@ -0,0 +1,178 @@
+{
+  "networks": {
+
+  },
+  "service": {
+    "category": "Mobility",
+    "description": "Bla bla",
+    "serviceRole": null,
+    "serviceType": null,
+    "inputs": {
+      "greatdefect0_availability_zone_max_count": {
+        "constraints": [
+
+        ],
+        "default": 1,
+        "description": "",
+        "entry_schema": null,
+        "required": true,
+        "type": "integer"
+      },
+      "greatdefect0_itc_name_0": {
+        "constraints": [
+
+        ],
+        "default": "ab",
+        "description": "ixla itc instance name",
+        "entry_schema": null,
+        "required": true,
+        "type": "string"
+      },
+      "greatdefect0_vf_module_id": {
+        "constraints": [
+
+        ],
+        "default": "abc",
+        "description": "Unique ID for this VF Module instance",
+        "entry_schema": null,
+        "required": true,
+        "type": "string"
+      }
+    },
+    "invariantUuid": "bd9bf71a-df22-4c95-8638-89f15d875395",
+    "name": "Moriya_new_test",
+    "serviceEcompNaming": "true",
+    "toscaModelURL": null,
+    "uuid": "48a52540-8772-4368-9cdb-1f124ea5c931",
+    "version": "1.0",
+    "instantiationType": null
+  },
+  "vfModules": {
+    "greatdefect0..Greatdefect..base_ixla..module-0": {
+      "customizationUuid": "316e323d-611d-4007-a647-b1d2ecdaee9e",
+      "description": null,
+      "invariantUuid": "80ff85fb-cb11-42cb-9737-e47095d42756",
+      "modelCustomizationName": "Greatdefect..base_ixla..module-0",
+      "name": "Greatdefect..base_ixla..module-0",
+      "uuid": "01166434-ef34-4969-aaf2-626203d72e48",
+      "version": "3",
+      "volumeGroupAllowed": false
+    },
+    "greatdefect0..Greatdefect..module_1_ixla..module-2": {
+      "customizationUuid": "1106fca3-235a-4f92-8d5a-960a7336b32f",
+      "description": null,
+      "invariantUuid": "e0297a51-c670-452e-b31c-c5b37c6ad40f",
+      "modelCustomizationName": "Greatdefect..module_1_ixla..module-2",
+      "name": "Greatdefect..module_1_ixla..module-2",
+      "uuid": "6f09e053-56a6-4fbb-8299-e1de616825cc",
+      "version": "3",
+      "volumeGroupAllowed": false
+    },
+    "greatdefect0..Greatdefect..module_2_ixla..module-1": {
+      "customizationUuid": "b52c1fda-fbbf-4de3-ad9b-190d4a14990c",
+      "description": null,
+      "invariantUuid": "23befc6e-aa97-4004-b215-4979c3f84913",
+      "modelCustomizationName": "Greatdefect..module_2_ixla..module-1",
+      "name": "Greatdefect..module_2_ixla..module-1",
+      "uuid": "dea8e41f-c996-4557-b521-263210d96baa",
+      "version": "3",
+      "volumeGroupAllowed": false
+    }
+  },
+  "vnfs": {
+    "greatdefect 0": {
+      "uuid": "3b25707a-d345-4a80-8744-73adf8f2e67b",
+      "invariantUuid": "d149c45a-b42f-419a-9fac-f9c359fc2034",
+      "description": "checl-IdanWithSecondFix",
+      "name": "greatdefect",
+      "version": "3.0",
+      "customizationUuid": "9123ced3-fbcd-42f7-b103-5965c54bbd66",
+      "inputs": {
+
+      },
+      "commands": {
+
+      },
+      "properties": {
+        "availability_zone_max_count": "get_input:greatdefect0_availability_zone_max_count",
+        "itc_flavor_name": "nv.c8r24d160",
+        "itc_image_name": "NIMBUS_IXLA-ITC_8.20_EA_KVM_210117.qcow2",
+        "itc_name_0": "get_input:greatdefect0_itc_name_0",
+        "itm_flavor_name": "nv.c2r4d50",
+        "itm_image_name": "NIMBUS_IXLA-ITM_8.20.EA_KVM.qcow2",
+        "vf_module_id": "get_input:greatdefect0_vf_module_id"
+      },
+      "type": "VF",
+      "modelCustomizationName": "greatdefect 0",
+      "vfModules": {
+        "greatdefect0..Greatdefect..module_1_ixla..module-2": {
+          "uuid": "6f09e053-56a6-4fbb-8299-e1de616825cc",
+          "invariantUuid": "e0297a51-c670-452e-b31c-c5b37c6ad40f",
+          "customizationUuid": "1106fca3-235a-4f92-8d5a-960a7336b32f",
+          "description": null,
+          "name": "Greatdefect..module_1_ixla..module-2",
+          "version": "3",
+          "modelCustomizationName": "Greatdefect..module_1_ixla..module-2",
+          "properties": {
+            "minCountInstances": 0,
+            "maxCountInstances": null,
+            "initialCount": 0,
+            "vfModuleLabel": null
+          },
+          "inputs": {
+
+          },
+          "volumeGroupAllowed": false
+        },
+        "greatdefect0..Greatdefect..base_ixla..module-0": {
+          "uuid": "01166434-ef34-4969-aaf2-626203d72e48",
+          "invariantUuid": "80ff85fb-cb11-42cb-9737-e47095d42756",
+          "customizationUuid": "316e323d-611d-4007-a647-b1d2ecdaee9e",
+          "description": null,
+          "name": "Greatdefect..base_ixla..module-0",
+          "version": "3",
+          "modelCustomizationName": "Greatdefect..base_ixla..module-0",
+          "properties": {
+            "minCountInstances": 1,
+            "maxCountInstances": 1,
+            "initialCount": 1,
+            "vfModuleLabel": null
+          },
+          "inputs": {
+
+          },
+          "volumeGroupAllowed": false
+        },
+        "greatdefect0..Greatdefect..module_2_ixla..module-1": {
+          "uuid": "dea8e41f-c996-4557-b521-263210d96baa",
+          "invariantUuid": "23befc6e-aa97-4004-b215-4979c3f84913",
+          "customizationUuid": "b52c1fda-fbbf-4de3-ad9b-190d4a14990c",
+          "description": null,
+          "name": "Greatdefect..module_2_ixla..module-1",
+          "version": "3",
+          "modelCustomizationName": "Greatdefect..module_2_ixla..module-1",
+          "properties": null,
+          "inputs": {
+
+          },
+          "volumeGroupAllowed": false
+        }
+      },
+      "volumeGroups": {
+
+      }
+    }
+  },
+  "volumeGroups": {
+
+  },
+  "configurations": {
+
+  },
+  "serviceProxies": {
+
+  },
+  "pnfs": {
+
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/vf-with-annotation-csar.json b/onap-enabler-be/src/test/resources/vf-with-annotation-csar.json
new file mode 100644
index 0000000..2729d6c
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/vf-with-annotation-csar.json
@@ -0,0 +1,644 @@
+{
+  "service": {
+    "uuid": "f4d84bb4-a416-4b4e-997e-0059973630b9",
+    "invariantUuid": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
+    "name": "ADIOD vMX vPE_BV Service 488",
+    "version": "1.0",
+    "toscaModelURL": null,
+    "category": "Network L1-3",
+    "serviceType": "",
+    "serviceRole": "",
+    "description": "ADIOD vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
+    "serviceEcompNaming": "true",
+    "instantiationType": "Macro",
+    "inputs": {
+      "2017488_adiodvpe0_ASN": {
+        "type": "string",
+        "description": "AV/PE",
+        "entry_schema": null,
+        "inputProperties": null,
+        "constraints": [
+          
+        ],
+        "required": true,
+        "default": "AV_vPE"
+      }
+    }
+  },
+  "vnfs": {
+    "2017-488_ADIOD-vPE 0": {
+      "uuid": "ea81d6f7-0861-44a7-b7d5-d173b562c350",
+      "invariantUuid": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
+      "description": "Name ADIOD vPE Description The provider edge function for the ADIOD service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release Code 17.2 Owners Mary Fragale. Updated 9-25 to use v8.0 of the Juniper Valid 2 VLM",
+      "name": "2017-488_ADIOD-vPE",
+      "version": "9.0",
+      "customizationUuid": "41516cc6-5098-4b40-a619-f8d5f55fc4d8",
+      "inputs": {
+
+      },
+      "commands": {
+        
+      },
+      "properties": {
+        "vmxvre_retype": "RE-VMX",
+        "vnf_config_template_version": "get_input:2017488_adiodvpe0_vnf_config_template_version",
+        "sriov44_net_id": "48d399b3-11ee-48a8-94d2-f0ea94d6be8d",
+        "int_ctl_net_id": "2f323477-6936-4d01-ac53-d849430281d9",
+        "vmxvpfe_sriov41_0_port_mac": "00:11:22:EF:AC:DF",
+        "int_ctl_net_name": "VMX-INTXI",
+        "vmx_int_ctl_prefix": "128.0.0.0",
+        "sriov43_net_id": "da349ca1-6de9-4548-be88-2d88e99bfef5",
+        "sriov42_net_id": "760669ba-013d-4d9b-b0e7-4151fe2e6279",
+        "sriov41_net_id": "25ad52d5-c165-40f8-b3b0-ddfc2373280a",
+        "nf_type": "ROUTER",
+        "vmxvpfe_int_ctl_ip_1": "128.0.0.16",
+        "is_AVPN_service": "false",
+        "vmx_RSG_name": "vREXI-affinity",
+        "vmx_int_ctl_forwarding": "l2",
+        "vmxvre_oam_ip_0": "10.40.123.5",
+        "vmxvpfe_sriov44_0_port_mac": "00:11:22:EF:AC:DF",
+        "vmxvpfe_sriov41_0_port_vlanstrip": "false",
+        "vmxvpfe_sriov42_0_port_vlanfilter": "4001",
+        "vmxvpfe_sriov44_0_port_unknownunicastallow": "true",
+        "vmxvre_image_name_0": "vre172_nova_img",
+        "vmxvre_instance": "0",
+        "vmxvpfe_sriov43_0_port_mac": "00:11:22:EF:AC:DF",
+        "vmxvre_flavor_name": "ns.c1r16d32.v5",
+        "vmxvpfe_volume_size_0": "40.0",
+        "vmxvpfe_sriov43_0_port_vlanfilter": "4001",
+        "nf_naming": "{ecomp_generated_naming=true}",
+        "multi_stage_design": "false",
+        "nf_naming_code": "me6",
+        "vmxvre_name_0": "vREXI",
+        "vmxvpfe_sriov42_0_port_vlanstrip": "false",
+        "vmxvpfe_volume_name_0": "vPFEXI_FBVolume",
+        "vmx_RSG_id": "bd89a33c-13c3-4a04-8fde-1a57eb123141",
+        "vmxvpfe_image_name_0": "vpfe172_nova_img",
+        "vmxvpfe_sriov43_0_port_unknownunicastallow": "true",
+        "vmxvpfe_sriov44_0_port_unknownmulticastallow": "true",
+        "vmxvre_console": "vidconsole",
+        "vmxvpfe_sriov44_0_port_vlanfilter": "4001",
+        "vmxvpfe_sriov42_0_port_mac": "00:11:22:EF:AC:DF",
+        "vmxvpfe_volume_id_0": "47cede15-da2f-4397-a101-aa683220aff3",
+        "vmxvpfe_sriov42_0_port_unknownmulticastallow": "true",
+        "vmxvpfe_sriov44_0_port_vlanstrip": "false",
+        "vf_module_id": "123",
+        "nf_function": "ADIOD vPE",
+        "vmxvpfe_sriov43_0_port_unknownmulticastallow": "true",
+        "vmxvre_int_ctl_ip_0": "128.0.0.1",
+        "AIC_CLLI": "get_input:2017488_adiodvpe0_AIC_CLLI",
+        "vnf_name": "mtnj309me6vre",
+        "vmxvpfe_sriov41_0_port_unknownunicastallow": "true",
+        "vmxvre_volume_type_1": "HITACHI",
+        "vmxvpfe_sriov44_0_port_broadcastallow": "true",
+        "vmxvre_volume_type_0": "HITACHI",
+        "vmxvpfe_volume_type_0": "HITACHI",
+        "vmxvpfe_sriov43_0_port_broadcastallow": "true",
+        "bandwidth_units": "get_input:2017488_adiodvpe0_bandwidth_units",
+        "vnf_id": "123",
+        "vmxvre_oam_prefix": "24",
+        "availability_zone_0": "get_input:2017488_adiodvpe0_availability_zone_0",
+        "ASN": "get_input:2017488_adiodvpe0_ASN",
+        "vmxvre_chassis_i2cid": "161",
+        "vmxvpfe_name_0": "vPFEXI",
+        "bandwidth": "get_input:2017488_adiodvpe0_bandwidth",
+        "availability_zone_max_count": "1",
+        "vmxvre_volume_size_0": "45.0",
+        "vmxvre_volume_size_1": "50.0",
+        "vmxvpfe_sriov42_0_port_broadcastallow": "true",
+        "vmxvre_oam_gateway": "10.40.123.1",
+        "vmxvre_volume_name_1": "vREXI_FAVolume",
+        "vmxvre_ore_present": "0",
+        "vmxvre_volume_name_0": "vREXI_FBVolume",
+        "vmxvre_type": "0",
+        "vnf_instance_name": "get_input:2017488_adiodvpe0_vnf_instance_name",
+        "vmxvpfe_sriov41_0_port_unknownmulticastallow": "true",
+        "oam_net_id": "b95eeb1d-d55d-4827-abb4-8ebb94941429",
+        "vmx_int_ctl_len": "24",
+        "vmxvpfe_sriov43_0_port_vlanstrip": "false",
+        "vmxvpfe_sriov41_0_port_broadcastallow": "true",
+        "vmxvre_volume_id_1": "6e86797e-03cd-4fdc-ba72-2957119c746d",
+        "vmxvpfe_sriov41_0_port_vlanfilter": "4001",
+        "nf_role": "vPE",
+        "vmxvre_volume_id_0": "f4eacb79-f687-4e9d-b760-21847c8bb15a",
+        "vmxvpfe_sriov42_0_port_unknownunicastallow": "true",
+        "vmxvpfe_flavor_name": "ns.c20r16d25.v5"
+      },
+      "type": "VF",
+      "modelCustomizationName": "2017-488_ADIOD-vPE 0",
+      "vfModules": {
+        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+          "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
+          "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+          "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
+          "description": null,
+          "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "version": "8",
+          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "properties": {
+            "minCountInstances": 0,
+            "maxCountInstances": null,
+            "initialCount": 0,
+            "vfModuleLabel": "ADIOD_vRE_BV"
+          },
+          "inputs": {
+            "2017488_adiodvpe0_bandwidth_units": {
+              "type": "string",
+              "description": "Units of bandwidth",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "bandwidth_units"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "Gbps"
+            },
+            "2017488_adiodvpe0_bandwidth": {
+              "type": "string",
+              "description": "Requested VPE bandwidth",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "bandwidth"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "10"
+            },
+            "2017488_adiodvpe0_vnf_instance_name": {
+              "type": "string",
+              "description": "The hostname assigned to the vpe.",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "vnf_instance_name"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "mtnj309me6"
+            },
+            "2017488_adiodvpe0_vnf_config_template_version": {
+              "type": "string",
+              "description": "VPE Software Version",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "vnf_config_template_version"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "17.2"
+            },
+            "2017488_adiodvpe0_AIC_CLLI": {
+              "type": "string",
+              "description": "AIC Site CLLI",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "AIC_CLLI"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "ATLMY8GA"
+            }
+          },
+          "volumeGroupAllowed": true
+        },
+        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0": {
+          "uuid": "040e591e-5d30-4e0d-850f-7266e5a8e013",
+          "invariantUuid": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+          "customizationUuid": "5c5f91f9-5e31-4120-b892-5536587ec258",
+          "description": null,
+          "name": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+          "version": "6",
+          "modelCustomizationName": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+          "properties": {
+            "minCountInstances": 1,
+            "maxCountInstances": 1,
+            "initialCount": 1,
+            "vfModuleLabel": "ADIOD_base_vPE_BV"
+          },
+          "inputs": {
+            
+          },
+          "volumeGroupAllowed": false
+        },
+        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+          "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
+          "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
+          "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
+          "description": null,
+          "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "version": "8",
+          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "properties": {
+            "minCountInstances": 0,
+            "maxCountInstances": null,
+            "initialCount": 0,
+            "vfModuleLabel": "ADIOD_vPFE_BV"
+          },
+          "inputs": {
+            "2017488_adiodvpe0_availability_zone_0": {
+              "type": "string",
+              "description": "The Availability Zone to launch the instance.",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vPFE_BV",
+                "paramName": "availability_zone_0"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "mtpocfo-kvm-az01"
+            }
+          },
+          "volumeGroupAllowed": true
+        }
+      },
+      "volumeGroups": {
+        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+          "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
+          "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+          "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
+          "description": null,
+          "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "version": "8",
+          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "properties": {
+            "minCountInstances": 0,
+            "maxCountInstances": null,
+            "initialCount": 0,
+            "vfModuleLabel": "ADIOD_vRE_BV"
+          },
+          "inputs": {
+            "2017488_adiodvpe0_bandwidth_units": {
+              "type": "string",
+              "description": "Units of bandwidth",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "bandwidth_units"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "Gbps"
+            },
+            "2017488_adiodvpe0_bandwidth": {
+              "type": "string",
+              "description": "Requested VPE bandwidth",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "bandwidth"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "10"
+            },
+            "2017488_adiodvpe0_vnf_instance_name": {
+              "type": "string",
+              "description": "The hostname assigned to the vpe.",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "vnf_instance_name"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "mtnj309me6"
+            },
+            "2017488_adiodvpe0_vnf_config_template_version": {
+              "type": "string",
+              "description": "VPE Software Version",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "vnf_config_template_version"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "17.2"
+            },
+            "2017488_adiodvpe0_AIC_CLLI": {
+              "type": "string",
+              "description": "AIC Site CLLI",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vRE_BV",
+                "paramName": "AIC_CLLI"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "ATLMY8GA"
+            }
+          }
+        },
+        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+          "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
+          "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
+          "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
+          "description": null,
+          "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "version": "8",
+          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "properties": {
+            "minCountInstances": 0,
+            "maxCountInstances": null,
+            "initialCount": 0,
+            "vfModuleLabel": "ADIOD_vPFE_BV"
+          },
+          "inputs": {
+            "2017488_adiodvpe0_availability_zone_0": {
+              "type": "string",
+              "description": "The Availability Zone to launch the instance.",
+              "entry_schema": null,
+              "inputProperties": {
+                "sourceType": "HEAT",
+                "vfModuleLabel": "ADIOD_vPFE_BV",
+                "paramName": "availability_zone_0"
+              },
+              "constraints": null,
+              "required": true,
+              "default": "mtpocfo-kvm-az01"
+            }
+          }
+        }
+      }
+    }
+  },
+  "networks": {
+    
+  },
+  "collectionResource": {
+    
+  },
+  "configurations": {
+    
+  },
+  "serviceProxies": {
+    
+  },
+  "vfModules": {
+    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+      "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
+      "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+      "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
+      "description": null,
+      "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "version": "8",
+      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "properties": {
+        "minCountInstances": 0,
+        "maxCountInstances": null,
+        "initialCount": 0,
+        "vfModuleLabel": "ADIOD_vRE_BV"
+      },
+      "inputs": {
+        "2017488_adiodvpe0_bandwidth_units": {
+          "type": "string",
+          "description": "Units of bandwidth",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "bandwidth_units"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "Gbps"
+        },
+        "2017488_adiodvpe0_bandwidth": {
+          "type": "string",
+          "description": "Requested VPE bandwidth",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "bandwidth"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "10"
+        },
+        "2017488_adiodvpe0_vnf_instance_name": {
+          "type": "string",
+          "description": "The hostname assigned to the vpe.",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "vnf_instance_name"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "mtnj309me6"
+        },
+        "2017488_adiodvpe0_vnf_config_template_version": {
+          "type": "string",
+          "description": "VPE Software Version",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "vnf_config_template_version"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "17.2"
+        },
+        "2017488_adiodvpe0_AIC_CLLI": {
+          "type": "string",
+          "description": "AIC Site CLLI",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "AIC_CLLI"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "ATLMY8GA"
+        }
+      },
+      "volumeGroupAllowed": true
+    },
+    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0": {
+      "uuid": "040e591e-5d30-4e0d-850f-7266e5a8e013",
+      "invariantUuid": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+      "customizationUuid": "5c5f91f9-5e31-4120-b892-5536587ec258",
+      "description": null,
+      "name": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+      "version": "6",
+      "modelCustomizationName": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+      "properties": {
+        "minCountInstances": 1,
+        "maxCountInstances": 1,
+        "initialCount": 1,
+        "vfModuleLabel": "ADIOD_base_vPE_BV"
+      },
+      "inputs": {
+        
+      },
+      "volumeGroupAllowed": false
+    },
+    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+      "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
+      "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
+      "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
+      "description": null,
+      "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "version": "8",
+      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "properties": {
+        "minCountInstances": 0,
+        "maxCountInstances": null,
+        "initialCount": 0,
+        "vfModuleLabel": "ADIOD_vPFE_BV"
+      },
+      "inputs": {
+        "2017488_adiodvpe0_availability_zone_0": {
+          "type": "string",
+          "description": "The Availability Zone to launch the instance.",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vPFE_BV",
+            "paramName": "availability_zone_0"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "mtpocfo-kvm-az01"
+        }
+      },
+      "volumeGroupAllowed": true
+    }
+  },
+  "volumeGroups": {
+    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+      "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
+      "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+      "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
+      "description": null,
+      "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "version": "8",
+      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "properties": {
+        "minCountInstances": 0,
+        "maxCountInstances": null,
+        "initialCount": 0,
+        "vfModuleLabel": "ADIOD_vRE_BV"
+      },
+      "inputs": {
+        "2017488_adiodvpe0_bandwidth_units": {
+          "type": "string",
+          "description": "Units of bandwidth",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "bandwidth_units"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "Gbps"
+        },
+        "2017488_adiodvpe0_bandwidth": {
+          "type": "string",
+          "description": "Requested VPE bandwidth",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "bandwidth"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "10"
+        },
+        "2017488_adiodvpe0_vnf_instance_name": {
+          "type": "string",
+          "description": "The hostname assigned to the vpe.",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "vnf_instance_name"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "mtnj309me6"
+        },
+        "2017488_adiodvpe0_vnf_config_template_version": {
+          "type": "string",
+          "description": "VPE Software Version",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "vnf_config_template_version"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "17.2"
+        },
+        "2017488_adiodvpe0_AIC_CLLI": {
+          "type": "string",
+          "description": "AIC Site CLLI",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vRE_BV",
+            "paramName": "AIC_CLLI"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "ATLMY8GA"
+        }
+      }
+    },
+    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+      "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
+      "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
+      "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
+      "description": null,
+      "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "version": "8",
+      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "properties": {
+        "minCountInstances": 0,
+        "maxCountInstances": null,
+        "initialCount": 0,
+        "vfModuleLabel": "ADIOD_vPFE_BV"
+      },
+      "inputs": {
+        "2017488_adiodvpe0_availability_zone_0": {
+          "type": "string",
+          "description": "The Availability Zone to launch the instance.",
+          "entry_schema": null,
+          "inputProperties": {
+            "sourceType": "HEAT",
+            "vfModuleLabel": "ADIOD_vPFE_BV",
+            "paramName": "availability_zone_0"
+          },
+          "constraints": null,
+          "required": true,
+          "default": "mtpocfo-kvm-az01"
+        }
+      }
+    }
+  },
+  "pnfs": {
+    
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/vf-with-vfcInstanceGroups.json b/onap-enabler-be/src/test/resources/vf-with-vfcInstanceGroups.json
new file mode 100644
index 0000000..334e2a7
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/vf-with-vfcInstanceGroups.json
@@ -0,0 +1,135 @@
+{
+  "service": {
+    "uuid": "6bce7302-70bd-4057-b48e-8d5b99e686ca",
+    "invariantUuid": "9aa04749-c02c-432d-a90c-18caa361c833",
+    "name": "vDBE_srv",
+    "version": "1.0",
+    "toscaModelURL": null,
+    "category": "Network L4+",
+    "serviceType": "",
+    "serviceRole": "",
+    "description": "vDBE_srv",
+    "serviceEcompNaming": "true",
+    "instantiationType": "A-La-Carte",
+    "inputs": {
+      
+    }
+  },
+  "vnfs": {
+    "vDBE 0": {
+      "uuid": "61535073-2e50-4141-9000-f66fea69b433",
+      "invariantUuid": "fcdf49ce-6f0b-4ca2-b676-a484e650e734",
+      "description": "vDBE",
+      "name": "vDBE",
+      "version": "0.2",
+      "customizationUuid": "882e5dcb-ba9f-4766-8cde-e326638107db",
+      "inputs": {
+        
+      },
+      "commands": {
+        
+      },
+      "properties": {
+        "nf_naming": "{ecomp_generated_naming=true}",
+        "multi_stage_design": "false",
+        "oam_vfc_instance_group_function": "oambbb",
+        "availability_zone_max_count": "1",
+        "oam_network_collection_function": "oamaaa",
+        "ecomp_generated_naming": "true",
+        "untr_vfc_instance_group_function": "untrbbb",
+        "untr_network_collection_function": "untraaa"
+      },
+      "type": "VF",
+      "modelCustomizationName": "vDBE 0",
+      "vfModules": {
+        "vdbe0..Vdbe..main..module-0": {
+          "uuid": "25a4d009-2f5a-44b4-b02a-62c584c15912",
+          "invariantUuid": "614afb1a-3e7e-44e9-90ab-424d0070c781",
+          "customizationUuid": "3443b341-7b0b-498c-a84a-a7ee736cba7e",
+          "description": null,
+          "name": "Vdbe..main..module-0",
+          "version": "1",
+          "modelCustomizationName": "Vdbe..main..module-0",
+          "properties": {
+            "minCountInstances": 1,
+            "maxCountInstances": 1,
+            "initialCount": 1,
+            "vfModuleLabel": "main"
+          },
+          "inputs": {
+            
+          },
+          "volumeGroupAllowed": false
+        }
+      },
+      "volumeGroups": {
+        
+      },
+      "vfcInstanceGroups": {
+        "untr_group": {
+          "uuid": "5fca04e2-a889-4579-8338-f60f1bf285fa",
+          "invariantUuid": "fb1e384b-117a-46ae-9ad1-bf2f1ee1e49f",
+          "name": "untr_group",
+          "version": "1",
+          "vfcInstanceGroupProperties": {
+            "vfcParentPortRole": "untr",
+            "networkCollectionFunction": "untraaa",
+            "vfcInstanceGroupFunction": null,
+            "subinterfaceRole": "untr"
+          }
+        },
+        "oam_group": {
+          "uuid": "a0efd5fc-f7be-4502-936a-a6c6392b958f",
+          "invariantUuid": "9384abf9-1231-4da4-bd8d-89e4d2f8a749",
+          "name": "oam_group",
+          "version": "1",
+          "vfcInstanceGroupProperties": {
+            "vfcParentPortRole": "untr",
+            "networkCollectionFunction": "untraaa",
+            "vfcInstanceGroupFunction": null,
+            "subinterfaceRole": "untr"
+          }
+        }
+      }
+    }
+  },
+  "networks": {
+    
+  },
+  "collectionResource": {
+    
+  },
+  "configurations": {
+    
+  },
+  "serviceProxies": {
+    
+  },
+  "vfModules": {
+    "vdbe0..Vdbe..main..module-0": {
+      "uuid": "25a4d009-2f5a-44b4-b02a-62c584c15912",
+      "invariantUuid": "614afb1a-3e7e-44e9-90ab-424d0070c781",
+      "customizationUuid": "3443b341-7b0b-498c-a84a-a7ee736cba7e",
+      "description": null,
+      "name": "Vdbe..main..module-0",
+      "version": "1",
+      "modelCustomizationName": "Vdbe..main..module-0",
+      "properties": {
+        "minCountInstances": 1,
+        "maxCountInstances": 1,
+        "initialCount": 1,
+        "vfModuleLabel": "main"
+      },
+      "inputs": {
+        
+      },
+      "volumeGroupAllowed": false
+    }
+  },
+  "volumeGroups": {
+    
+  },
+  "pnfs": {
+    
+  }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/vl-csar.JSON b/onap-enabler-be/src/test/resources/vl-csar.JSON
new file mode 100644
index 0000000..8be2d09
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/vl-csar.JSON
@@ -0,0 +1,94 @@
+{
+    "service": {
+        "uuid": "68101369-6f08-4e99-9a28-fa6327d344f3",
+        "invariantUuid": "d752a44c-ac7b-4bda-8111-fb52312d101e",
+        "name": "Macro_flow_test",
+        "version": "1.0",
+        "toscaModelURL": null,
+        "category": "Network L1-3",
+        "serviceType": null,
+        "serviceRole": null,
+        "description": "dsfg",
+        "serviceEcompNaming": "true",
+        "instantiationType": "ClientConfig",
+        "inputs": {
+            "extvl0_network_scope": {
+                "type": "string",
+                "description": "Uniquely identifies the network scope. Valid values for the network scope   includes: VF - VF-level network. Intra-VF network which connects the VFCs (VMs) inside the VF. SERVICE - Service-level network. Intra-Service network which connects  the VFs within the service GLOBAL - Global network which can be shared by multiple services\n",
+                "entry_schema": null,
+                "inputProperties": null,
+                "constraints": [
+
+                ],
+                "required": true,
+                "default": null
+            },
+            "extvl0_network_role": {
+                "type": "string",
+                "description": "Unique label that defines the role that this network performs.   example: vce oam network, vnat sr-iov1 network\n",
+                "entry_schema": null,
+                "inputProperties": null,
+                "constraints": [
+
+                ],
+                "required": true,
+                "default": null
+            },
+            "extvl0_exVL_naming_naming_policy": {
+                "type": "string",
+                "description": "Reference to naming policy that ECOMP will use when the name is auto-generated",
+                "entry_schema": null,
+                "inputProperties": null,
+                "constraints": [
+
+                ],
+                "required": true,
+                "default": null
+            }
+        }
+    },
+    "vnfs": {
+
+    },
+    "networks": {
+        "ExtVL 0": {
+            "uuid": "af584529-d7f0-420e-a6f3-c38b689c030f",
+            "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
+            "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
+            "name": "ExtVL",
+            "version": "4.0",
+            "customizationUuid": "664f8aa7-3989-46ac-81c0-dd72a8a63f26",
+            "inputs": {
+
+            },
+            "commands": {
+
+            },
+            "properties": {
+                "network_role": "get_input:extvl0_network_role",
+                "exVL_naming": "{naming_policy=get_input:extvl0_exVL_naming_naming_policy}",
+                "network_scope": "get_input:extvl0_network_scope"
+            },
+            "type": "VL",
+            "modelCustomizationName": "ExtVL 0"
+        }
+    },
+    "collectionResource": {
+
+    },
+    "configurations": {
+
+    },
+    "serviceProxies": {
+
+    },
+    "vfModules": {
+
+    },
+    "volumeGroups": {
+
+    },
+    "pnfs": {
+
+    }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/src/test/resources/vnfConfigUpdatePayload.json b/onap-enabler-be/src/test/resources/vnfConfigUpdatePayload.json
new file mode 100644
index 0000000..94161d9
--- /dev/null
+++ b/onap-enabler-be/src/test/resources/vnfConfigUpdatePayload.json
@@ -0,0 +1,40 @@
+{
+    "payload":{
+        "request-parameters":{
+            "vm":[
+                {
+                    "vnfc":[
+                        {
+                            "ipaddress-v4-oam-vip":"135.21.166.39",
+                            "vnfc-name":"ibcx0001vm001dbg001",
+                            "vnfc-function-code":"dbg",
+                            "vnfc-type":"DBE-VM #1",
+                            "group-notation":"ibcx0001vm001dbg001pair"
+                        }
+                    ],
+                    "vm-name":"ibcx0001vm001"
+                },
+                {
+                    "vnfc":[
+                        {
+                            "vnfc-name":"ibcx0001vm002dbg001",
+                            "vnfc-function-code":"dbg",
+                            "vnfc-type":"DBE-VM #1",
+                            "group-notation":"ibcx0001vm001dbg001pair"
+                        }
+                    ],
+                    "vm-name":"ibcx0001vm002"
+                }
+            ],
+            "vnf-name":"ibcx0099v",
+            "template-name":"vdbe_template1"
+        },
+        "configuration":{
+            "configuration-json":"{\n   \"version\": \"15.1X49-D50.3\",\n   \"groups\": {\n      \"name\": \"node0\",\n      \"system\": {\n         \"host-name\": \"$node0_hostname\",\n         \"backup-router\": {\n            \"address\": \"$node0_backup_router_address\",\n            \"destination\": \"0.0.0.0/0\"\n         }\n      }\n   }\n}",
+            "configuration-string": "   <configuration xmlns=\"http://xml.juniper.net/xnm/1.1/xnm\" \n    xmlns:a=\"http://xml.juniper.net/junos/15.1X49/junos\" >\n            <version>15.1X49-D50.3<\/version>\n            <groups>\n                <name>node0<\/name>\n                <system>\n                    <host-name>$node0_hostname<\/host-name>\n                    <backup-router>\n                        <address>$node0_backup_router_address<\/address>\n                        <destination>0.0.0.0/0<\/destination>\n             <\/backup-router>\n                <\/system>\n     <\/groups>\n    <\/configuration>"
+        },
+        "configuration-parameters":{
+            "nat_source_sp_v6rogerssnat_address1":"2001:1890:fc45:f025:135:25:246:c806/128"
+        }
+    }
+}
\ No newline at end of file
diff --git a/onap-enabler-be/version.properties b/onap-enabler-be/version.properties
new file mode 100644
index 0000000..113097b
--- /dev/null
+++ b/onap-enabler-be/version.properties
@@ -0,0 +1,13 @@
+# Versioning variables
+# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
+# because they are used in Jenkins, whose plug-in doesn't support
+
+major=0
+minor=0
+patch=1
+
+base_version=${major}.${minor}.${patch}
+
+# Release must be completed with git revision # in Jenkins
+release_version=${base_version}
+snapshot_version=${base_version}-SNAPSHOT
