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
