diff --git a/common/src/main/java/org/openecomp/mso/client/PreconditionFailedException.java b/common/src/main/java/org/openecomp/mso/client/PreconditionFailedException.java
new file mode 100644
index 0000000..df28baa
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/PreconditionFailedException.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client;
+
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+
+public class PreconditionFailedException extends WebApplicationException {
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	public PreconditionFailedException(String message) {
+        super(message, Response.Status.PRECONDITION_FAILED);
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/ResponseExceptionMapper.java b/common/src/main/java/org/openecomp/mso/client/ResponseExceptionMapper.java
new file mode 100644
index 0000000..19c1784
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/ResponseExceptionMapper.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Optional;
+
+import javax.ws.rs.BadRequestException;
+import javax.ws.rs.ForbiddenException;
+import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.NotAcceptableException;
+import javax.ws.rs.NotAllowedException;
+import javax.ws.rs.NotAuthorizedException;
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.NotSupportedException;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientRequestContext;
+import javax.ws.rs.client.ClientResponseContext;
+import javax.ws.rs.client.ClientResponseFilter;
+import javax.ws.rs.core.Response;
+
+public abstract class ResponseExceptionMapper implements ClientResponseFilter {
+
+	@Override
+	public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {
+		if (responseContext.getStatus() >= 300) {
+			String message = "empty message";
+			if (responseContext.hasEntity()) {
+				Optional<String> result = this.extractMessage(responseContext.getEntityStream());
+				if (result.isPresent()) {
+					message = result.get();
+				}
+			}
+			Response.Status status = Response.Status.fromStatusCode(responseContext.getStatus());
+			WebApplicationException webAppException;
+			switch (status) {
+			case BAD_REQUEST:
+				webAppException = new BadRequestException(message);
+				break;
+			case UNAUTHORIZED:
+				webAppException = new NotAuthorizedException(message);
+				break;
+			case FORBIDDEN:
+				webAppException = new ForbiddenException(message);
+				break;
+			case NOT_FOUND:
+				webAppException = new NotFoundException(message);
+				break;
+			case METHOD_NOT_ALLOWED:
+				webAppException = new NotAllowedException(message);
+				break;
+			case NOT_ACCEPTABLE:
+				webAppException = new NotAcceptableException(message);
+				break;
+			case PRECONDITION_FAILED:
+				webAppException = new PreconditionFailedException(message);
+				break;
+			case UNSUPPORTED_MEDIA_TYPE:
+				webAppException = new NotSupportedException(message);
+				break;
+			case INTERNAL_SERVER_ERROR:
+				webAppException = new InternalServerErrorException(message);
+				break;
+			case SERVICE_UNAVAILABLE:
+				webAppException = new WebApplicationException(message);
+				break;
+			default:
+				webAppException = new WebApplicationException(message);
+			}
+			throw webAppException;
+		}
+	}
+	
+	public abstract Optional<String> extractMessage(InputStream stream) throws IOException;
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/ResponseExceptionMapperImpl.java b/common/src/main/java/org/openecomp/mso/client/ResponseExceptionMapperImpl.java
new file mode 100644
index 0000000..7841d7a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/ResponseExceptionMapperImpl.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Optional;
+
+import javax.annotation.Priority;
+import javax.ws.rs.ext.Provider;
+
+import org.apache.commons.io.IOUtils;
+
+@Provider
+@Priority(Integer.MIN_VALUE)
+public class ResponseExceptionMapperImpl extends ResponseExceptionMapper {
+
+	@Override
+	public Optional<String> extractMessage(InputStream stream) throws IOException {
+		final String input = IOUtils.toString(stream, "UTF-8");
+		IOUtils.closeQuietly(stream);
+		return Optional.of(input);
+	}
+	
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/RestProperties.java b/common/src/main/java/org/openecomp/mso/client/RestProperties.java
new file mode 100644
index 0000000..ae8862d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/RestProperties.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+public interface RestProperties {
+
+	public URL getEndpoint() throws MalformedURLException;
+	public String getSystemName();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/RestPropertiesLoader.java b/common/src/main/java/org/openecomp/mso/client/RestPropertiesLoader.java
new file mode 100644
index 0000000..647acdf
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/RestPropertiesLoader.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client;
+
+import java.util.Iterator;
+import java.util.ServiceLoader;
+
+public class RestPropertiesLoader {
+
+	private final ServiceLoader<RestProperties> services;
+	private RestPropertiesLoader() {
+		services = ServiceLoader.load(RestProperties.class);
+	}
+	
+	private static class Helper {
+		private static final RestPropertiesLoader INSTANCE = new RestPropertiesLoader();
+	}
+	
+	public static RestPropertiesLoader getInstance() {
+		return Helper.INSTANCE;
+	}
+	
+	public <T> T getNewImpl(Class<? extends RestProperties> clazz) {
+		return this.getImpl(clazz, true);
+	}
+	public <T> T getImpl(Class<? extends RestProperties> clazz) {
+		return this.getImpl(clazz, false);
+	}
+	
+	private <T> T getImpl(Class<? extends RestProperties> clazz, boolean forceNewInstance) {
+		T result = null;
+		Iterator<RestProperties> propertyImpls = services.iterator();
+		RestProperties item;
+		while (propertyImpls.hasNext()) {
+			item = propertyImpls.next();
+			if (clazz.isAssignableFrom(item.getClass())) {
+				try {
+					if (forceNewInstance) {	
+						result = (T)item.getClass().newInstance();
+					} else {
+						result = (T)item;
+					}
+				} catch (InstantiationException | IllegalAccessException e) {
+					/* all spi implementations must provide a public
+					 * no argument constructor
+					 */
+					
+				}
+				//break;
+			}
+		}
+		
+		return result;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIClient.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIClient.java
new file mode 100644
index 0000000..9150dca
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIClient.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.net.URI;
+import java.util.UUID;
+
+import javax.ws.rs.core.UriBuilder;
+
+import org.openecomp.mso.client.RestPropertiesLoader;
+import org.openecomp.mso.client.aai.entities.uri.AAIUri;
+import org.openecomp.mso.client.defaultproperties.DefaultAAIPropertiesImpl;
+import org.openecomp.mso.client.policy.RestClient;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public abstract class AAIClient {
+
+	protected final AAIVersion defaultVersion;
+	private static final String AAI_ROOT = "/aai";
+	protected final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+	private final AAIProperties properties;
+	protected final UUID requestId;
+	public AAIClient(UUID requestId) {
+		AAIProperties props = RestPropertiesLoader.getInstance().getNewImpl(AAIProperties.class);
+		if (props == null) {
+			metricsLogger.error("No RestProperty.AAIProperties implementation found on classpath");
+			props = new DefaultAAIPropertiesImpl();
+		}
+		this.properties = props;
+		this.defaultVersion = props.getDefaultVersion();
+		this.requestId = requestId;
+	}
+	protected URI constructPath(AAIUri uri) {
+		
+		return UriBuilder.fromUri(AAI_ROOT + "/" + this.getVersion().toString() + uri.build().toString()).build();
+	}
+	
+	protected RestClient createClient(AAIUri uri) {
+		return new AAIRestClient(properties, this.getRequestId(), constructPath(uri)).addRequestId(this.getRequestId());
+
+	}
+	
+	protected UUID getRequestId() {
+		return this.requestId;
+	}
+	protected AAIVersion getVersion() {
+		return defaultVersion;
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIClientResponseExceptionMapper.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIClientResponseExceptionMapper.java
new file mode 100644
index 0000000..657b4c5
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIClientResponseExceptionMapper.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.annotation.Priority;
+import javax.ws.rs.ext.Provider;
+
+import org.openecomp.mso.client.ResponseExceptionMapper;
+import org.openecomp.mso.client.aai.entities.AAIError;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Provider
+@Priority(Integer.MIN_VALUE)
+public class AAIClientResponseExceptionMapper extends ResponseExceptionMapper {
+
+	private final UUID requestId;
+	public AAIClientResponseExceptionMapper(UUID requestId) {
+		this.requestId = requestId;
+	}
+	@Override
+	public Optional<String> extractMessage(InputStream stream) throws IOException {
+		
+		String errorString = "Error calling A&AI. Request-Id=" + this.getRequestId() + " ";
+		try {
+			AAIError error = new ObjectMapper().readValue(stream, AAIError.class);
+			AAIErrorFormatter formatter = new AAIErrorFormatter(error);
+			return Optional.of(errorString + formatter.getMessage());
+		} catch (JsonParseException e) {
+			return Optional.of(errorString);
+		}
+	}
+	
+	protected UUID getRequestId() {
+		return this.requestId;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAICommonObjectMapperProvider.java b/common/src/main/java/org/openecomp/mso/client/aai/AAICommonObjectMapperProvider.java
new file mode 100644
index 0000000..cbee903
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAICommonObjectMapperProvider.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import javax.ws.rs.ext.ContextResolver;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.databind.AnnotationIntrospector;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
+
+public class AAICommonObjectMapperProvider implements ContextResolver<ObjectMapper> {
+
+	final ObjectMapper mapper;
+
+	public AAICommonObjectMapperProvider() {
+		mapper = new ObjectMapper();
+		mapper.setSerializationInclusion(Include.NON_NULL);
+		mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
+		mapper.enable(MapperFeature.USE_ANNOTATIONS);
+		mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+		mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
+		mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+		AnnotationIntrospector aiJaxb = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
+        AnnotationIntrospector aiJackson = new JacksonAnnotationIntrospector();
+        // first Jaxb, second Jackson annotations
+        mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(aiJaxb, aiJackson));
+	}
+
+	@Override
+	public ObjectMapper getContext(Class<?> type) {
+		return mapper;
+	}
+	
+	public ObjectMapper getMapper() {
+		return mapper;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIConfigurationClient.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIConfigurationClient.java
new file mode 100644
index 0000000..fdeb975
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIConfigurationClient.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import org.openecomp.mso.client.aai.entities.Configuration;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+import org.openecomp.mso.serviceinstancebeans.RequestDetails;
+
+public class AAIConfigurationClient {
+
+	private AAIResourcesClient aaiClient;
+
+	private static final String ORCHESTRATION_STATUS = "PendingCreate";
+
+	public AAIConfigurationClient() {
+		aaiClient = new AAIResourcesClient();
+	}
+
+	public void createConfiguration(RequestDetails requestDetails, String configurationId, String configurationType,
+			String configurationSubType) {
+		Configuration payload = new Configuration();
+		payload.setConfigurationId(configurationId);
+		payload.setConfigurationType(configurationType);
+		payload.setConfigurationSubType(configurationSubType);
+		payload.setModelInvariantId(requestDetails.getModelInfo().getModelInvariantId());
+		payload.setModelVersionId(requestDetails.getModelInfo().getModelVersionId());
+		payload.setOrchestrationStatus(ORCHESTRATION_STATUS);
+		payload.setOperationalStatus("");
+		AAIResourceUri uri = getConfigurationURI(payload.getConfigurationId());
+		payload.setConfigurationSelflink(uri.build().getPath());
+		payload.setModelCustomizationId(requestDetails.getModelInfo().getModelCustomizationId());
+
+		aaiClient.create(uri, payload);
+	}
+
+	public void deleteConfiguration(String uuid) {
+		aaiClient.delete(getConfigurationURI(uuid));
+	}
+
+	public void updateOrchestrationStatus(String uuid, String payload) {
+		aaiClient.update(getConfigurationURI(uuid), payload);
+	}
+
+	public Configuration getConfiguration(String uuid) {
+		return aaiClient.get(Configuration.class, getConfigurationURI(uuid));
+	}
+
+	public boolean configurationExists(String uuid) {
+		return aaiClient.exists(getConfigurationURI(uuid));
+	}
+
+	public AAIResourceUri getConfigurationURI(String uuid) {
+		return AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, uuid);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIErrorFormatter.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIErrorFormatter.java
new file mode 100644
index 0000000..dd56e97
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIErrorFormatter.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.util.List;
+import java.util.Optional;
+
+import org.openecomp.mso.client.aai.entities.AAIError;
+import org.openecomp.mso.client.aai.entities.ServiceException;
+
+public class AAIErrorFormatter {
+
+	private final AAIError error;
+	public AAIErrorFormatter(AAIError error) {
+		this.error = error;
+	}
+	
+	public String getMessage() {
+		if (error.getRequestError() != null && 
+			error.getRequestError().getServiceException() != null) {
+			ServiceException serviceException = error.getRequestError().getServiceException();
+			return this.fillInTemplate(serviceException.getText(), serviceException.getVariables());
+		}
+		
+		return "no parsable error message found";
+	}
+	
+	protected String fillInTemplate(String text, List<String> variables) {
+		for (int i = 0; i < variables.size(); i++) {
+			variables.set(i, this.format(variables.get(i), variables));
+		}
+		
+		return format(text, variables);
+	}
+	
+	protected String format(String s, List<String> variables) {
+		return String.format(s.replaceAll("%(\\d+)", "%$1\\$s"), variables.toArray());
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAINamespaceConstants.java b/common/src/main/java/org/openecomp/mso/client/aai/AAINamespaceConstants.java
new file mode 100644
index 0000000..4bdfc4d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAINamespaceConstants.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+public class AAINamespaceConstants {
+
+	protected static final String CLOUD_INFRASTRUCTURE = "/cloud-infrastructure";
+	protected static final String NETWORK = "/network";
+	protected static final String BUSINESS = "/business";
+	protected static final String SERVICE_DESIGN_AND_CREATION = "/service-design-and-creation";
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectName.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectName.java
new file mode 100644
index 0000000..c7459d3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectName.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import com.google.common.base.CaseFormat;
+
+public interface AAIObjectName {
+
+	public String typeName();
+	public String typeName(CaseFormat format);
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectPlurals.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectPlurals.java
new file mode 100644
index 0000000..dc2831c
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectPlurals.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import com.google.common.base.CaseFormat;
+
+public enum AAIObjectPlurals implements AAIObjectName, AAIObjectUriTemplate, AAIObjectUriPartial {
+
+	GENERIC_VNF(AAINamespaceConstants.NETWORK, "/generic-vnfs"),
+	PSERVER(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/pservers");
+	
+	private final String uriTemplate;
+	private final String partialUri;
+	private AAIObjectPlurals(String parentUri, String partialUri) {
+		this.uriTemplate = parentUri + partialUri;
+		this.partialUri = partialUri;
+	}
+	
+	@Override
+	public String toString() {
+		return this.uriTemplate();
+	}
+
+	@Override
+	public String uriTemplate() {
+		return this.uriTemplate;
+	}
+
+	@Override
+	public String partialUri() {
+		return this.partialUri;
+	}
+
+	@Override
+	public String typeName() {
+		return this.typeName(CaseFormat.LOWER_HYPHEN);
+	}
+	@Override
+	public String typeName(CaseFormat format) {
+		String enumName = this.name();
+		if (this.equals(AAIObjectType.DEFAULT_CLOUD_REGION) || this.equals(AAIObjectType.DEFAULT_TENANT)) {
+			enumName = enumName.replace("DEFAULT_", "");
+		}
+		
+		return CaseFormat.UPPER_UNDERSCORE.to(format, enumName);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectType.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectType.java
new file mode 100644
index 0000000..9026c29
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectType.java
@@ -0,0 +1,98 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import com.google.common.base.CaseFormat;
+
+public enum AAIObjectType implements AAIObjectName, AAIObjectUriTemplate, AAIObjectUriPartial {
+
+	DEFAULT_CLOUD_REGION(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/cloud-regions/cloud-region/att-aic/{cloud-region-id}"),
+	CUSTOMER(AAINamespaceConstants.BUSINESS, "/customers/customer/{global-customer-id}"),
+	GENERIC_QUERY("/search", "/generic-query"),
+	BULK_PROCESS("/bulkprocess", ""),
+	GENERIC_VNF(AAINamespaceConstants.NETWORK, "/generic-vnfs/generic-vnf/{vnf-id}"),
+	VF_MODULE(AAIObjectType.GENERIC_VNF.uriTemplate(), "/vf-modules/vf-module/{vf-module-id}"),
+	L3_NETWORK(AAINamespaceConstants.NETWORK, "/l3-networks/l3-network/{network-id}"),
+	NETWORK_POLICY(AAINamespaceConstants.NETWORK, "/network-policies/network-policy/{network-policy-id}"),
+	NODES_QUERY("/search", "/nodes-query"),
+	CUSTOM_QUERY("/query", ""),
+	ROUTE_TABLE_REFERENCE(AAINamespaceConstants.NETWORK, "/route-table-references/route-table-reference/{route-table-reference-id}"),
+	DEFAULT_TENANT(AAINamespaceConstants.CLOUD_INFRASTRUCTURE + "/cloud-regions/cloud-region/att-aic/AAIAIC25", "/tenants/tenant/{tenant-id}"),
+	VCE(AAINamespaceConstants.NETWORK, "/vces/vce/{vnf-id}"),
+	VPN_BINDING(AAINamespaceConstants.NETWORK, "/vpn-bindings/vpn-binding/{vpn-id}"),
+	CONFIGURATION(AAINamespaceConstants.NETWORK, "/configurations/configuration/{configuration-id}"),
+	PSERVER(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/pservers/pserver/{hostname}"),
+	SERVICE_SUBSCRIPTION(AAIObjectType.CUSTOMER.uriTemplate(), "/service-subscriptions/service-subscription/{service-type}"),
+	SERVICE_INSTANCE(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), "/service-instances/service-instance/{service-instance-id}"),
+	PROJECT(AAINamespaceConstants.BUSINESS, "/projects/project/{id}"),
+	LINE_OF_BUSINESS(AAINamespaceConstants.BUSINESS, "/lines-of-business/line-of-business/{id}"),
+	PLATFORM(AAINamespaceConstants.BUSINESS, "/platforms/platform/{id}"),
+	OWNING_ENTITY(AAINamespaceConstants.BUSINESS, "/owning-entities/owning-entity/{id}"),
+	ALLOTTED_RESOURCE(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "/allotted-resources/allotted-resource/{id}"),
+	PNF(AAINamespaceConstants.NETWORK, "/pnfs/pnf/{pnf-name}"),
+	OPERATIONAL_ENVIRONMENT(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/operational-environments/operational-environment/{operational-environment-id}"),
+	CLOUD_REGION(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, "/cloud-regions/cloud-region/{cloud-owner-id}/{cloud-region-id}"),
+	TENANT(AAIObjectType.CLOUD_REGION.uriTemplate(), "/tenants/tenant/{tenant-id}"),
+	VSERVER(AAIObjectType.TENANT.uriTemplate(), "/vservers/vserver/{vserver-id}"),
+	MODEL_VER(AAINamespaceConstants.SERVICE_DESIGN_AND_CREATION + "/models/model/{model-invariant-id}", "/model-vers/model-ver/{model-version-id}"),
+	TUNNEL_XCONNECT(AAIObjectType.ALLOTTED_RESOURCE.uriTemplate(), "/tunnel-xconnects/tunnel-xconnect/{id}"),
+	P_INTERFACE(AAIObjectType.PSERVER.uriTemplate(), "/p-interfaces/p-interface/{interface-name}"),
+	PHYSICAL_LINK(AAINamespaceConstants.NETWORK, "/physical-links/physical-link/{link-name}"),
+	UNKNOWN("", "");
+
+	private final String uriTemplate;
+	private final String parentUri;
+	private final String partialUri;
+	private AAIObjectType(String parentUri, String partialUri) {
+		this.parentUri = parentUri;
+		this.partialUri = partialUri;
+		this.uriTemplate = parentUri + partialUri;
+	}
+
+	@Override
+	public String toString() {
+		return this.uriTemplate();
+	}
+
+	@Override
+	public String typeName() {
+		return this.typeName(CaseFormat.LOWER_HYPHEN);
+	}
+	@Override
+	public String typeName(CaseFormat format) {
+		String enumName = this.name();
+		if (this.equals(AAIObjectType.DEFAULT_CLOUD_REGION) || this.equals(AAIObjectType.DEFAULT_TENANT)) {
+			enumName = enumName.replace("DEFAULT_", "");
+		}
+
+		return CaseFormat.UPPER_UNDERSCORE.to(format, enumName);
+	}
+
+	@Override
+	public String uriTemplate() {
+		return this.uriTemplate;
+	}
+
+	@Override
+	public String partialUri() {
+		return this.partialUri;
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectUriPartial.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectUriPartial.java
new file mode 100644
index 0000000..3fb867d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectUriPartial.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+public interface AAIObjectUriPartial {
+
+	public String partialUri();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectUriTemplate.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectUriTemplate.java
new file mode 100644
index 0000000..397b66d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIObjectUriTemplate.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+public interface AAIObjectUriTemplate {
+
+	public String uriTemplate();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIProperties.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIProperties.java
new file mode 100644
index 0000000..358bbbb
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIProperties.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import org.openecomp.mso.client.RestProperties;
+
+public interface AAIProperties extends RestProperties {
+
+	public AAIVersion getDefaultVersion();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIQueryClient.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIQueryClient.java
new file mode 100644
index 0000000..f8707de
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIQueryClient.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.util.Optional;
+import java.util.UUID;
+
+import org.openecomp.mso.client.aai.entities.CustomQuery;
+import org.openecomp.mso.client.aai.entities.uri.AAIUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+import org.openecomp.mso.client.policy.RestClient;
+import org.openecomp.mso.client.aai.AAIVersion;
+
+public class AAIQueryClient extends AAIClient {
+
+
+	private final AAIVersion version;
+	private Optional<String> depth = Optional.empty();
+	private boolean nodesOnly = false;
+	private Optional<AAISubgraphType> subgraph = Optional.empty();
+	
+	public AAIQueryClient() {
+		super(UUID.randomUUID());
+		this.version = super.getVersion();
+	}
+	
+	public AAIQueryClient(AAIVersion version, UUID requestId) {
+		super(requestId);
+		this.version = version;
+	}
+	
+	public AAIQueryClient(AAIVersion version) {
+		this(version, UUID.randomUUID());
+	}
+	
+	public String query(Format format, CustomQuery query) {
+		return this.createClient(AAIUriFactory.createResourceUri(AAIObjectType.CUSTOM_QUERY).queryParam("format", format.toString()))
+		.addRequestId(requestId).put(query, String.class);
+	}
+	
+	@Override
+	protected AAIVersion getVersion() {
+		return this.version;
+	}
+	
+	public AAIQueryClient depth (String depth) {
+		this.depth = Optional.of(depth);
+		return this;
+	}
+	public AAIQueryClient nodesOnly() {
+		this.nodesOnly = true;
+		return this;
+	}
+	public AAIQueryClient subgraph(AAISubgraphType type){
+		
+		subgraph =  Optional.of(type);
+
+		return this;
+	}
+	
+	@Override
+	public RestClient createClient(AAIUri uri) {
+		AAIUri clone = uri.clone();
+		if (this.depth.isPresent()) {
+			clone.queryParam("depth", depth.get());
+		}
+		if (this.nodesOnly) {
+			clone.queryParam("nodesOnly", "");
+		}
+		if (this.subgraph.isPresent()) {
+			clone.queryParam("subgraph", this.subgraph.get().toString());
+		}
+		return super.createClient(clone);
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIQueryObjectMapperProvider.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIQueryObjectMapperProvider.java
new file mode 100644
index 0000000..425d9ce
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIQueryObjectMapperProvider.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import com.fasterxml.jackson.databind.AnnotationIntrospector;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
+
+public class AAIQueryObjectMapperProvider extends AAICommonObjectMapperProvider {
+
+	public AAIQueryObjectMapperProvider() {
+		super();
+		AnnotationIntrospector aiJaxb = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
+        AnnotationIntrospector aiJackson = new JacksonAnnotationIntrospector();
+        // first Jaxb, second Jackson annotations
+        mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(aiJaxb, aiJackson));
+
+	}
+
+	@Override
+	public ObjectMapper getContext(Class<?> type) {
+		return mapper;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIResourcesClient.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIResourcesClient.java
new file mode 100644
index 0000000..32c61f7
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIResourcesClient.java
@@ -0,0 +1,244 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.client.ResponseProcessingException;
+import javax.ws.rs.core.GenericType;
+
+import org.onap.aai.domain.yang.Relationship;
+import org.openecomp.mso.client.aai.entities.AAIResultWrapper;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUri;
+import org.openecomp.mso.client.aai.entities.uri.Depth;
+import org.openecomp.mso.client.policy.RestClient;
+
+public class AAIResourcesClient extends AAIClient {
+	
+	private final AAIVersion version;
+		
+	public AAIResourcesClient() {
+		super(UUID.randomUUID());
+		this.version = super.getVersion();
+	}
+	
+	public AAIResourcesClient(AAIVersion version) {
+		super(UUID.randomUUID());
+		this.version = version;
+	}
+	
+	public AAIResourcesClient(AAIVersion version, UUID requestId) {
+		super(requestId);
+		this.version = version;
+	}
+	
+	/**
+	 * creates a new object in A&AI
+	 * 
+	 * @param obj - can be any object which will marshal into a valid A&AI payload
+	 * @param uri
+	 * @return
+	 */
+	public void create(AAIResourceUri uri, Object obj) {
+		RestClient aaiRC = this.createClient(uri);
+		aaiRC.put(obj);
+		return;
+	}
+	
+	/**
+	 * creates a new object in A&AI with no payload body
+	 * 
+	 * @param uri
+	 * @return
+	 */
+	public void createEmpty(AAIResourceUri uri) {
+		RestClient aaiRC = this.createClient(uri);
+		aaiRC.put("");
+		return;
+	}
+	
+	/**
+	 * returns false if the object does not exist in A&AI
+	 * 
+	 * @param uri
+	 * @return
+	 */
+	public boolean exists(AAIResourceUri uri) {
+		AAIUri forceMinimal = this.addParams(Optional.of(Depth.ZERO), true, uri);
+		RestClient aaiRC = this.createClient(forceMinimal);
+		try{
+			aaiRC.get();	
+		} catch(ResponseProcessingException e) {
+			if (e.getCause() instanceof NotFoundException) {
+				return false;
+			} else {
+				throw e;
+			}
+		}
+		return true;
+	}
+	
+	/**
+	 * Adds a relationship between two objects in A&AI 
+	 * @param uriA
+	 * @param uriB
+	 * @return
+	 */
+	public void connect(AAIResourceUri uriA, AAIResourceUri uriB) {
+		AAIResourceUri uriAClone = uriA.clone();
+		RestClient aaiRC = this.createClient(uriAClone.relationshipAPI());
+		aaiRC.put(this.buildRelationship(uriB));
+		return;
+	}
+	
+	/**
+	 * Removes relationship from two objects in A&AI
+	 * 
+	 * @param uriA
+	 * @param uriB
+	 * @return
+	 */
+	public void disconnect(AAIResourceUri uriA, AAIResourceUri uriB) {
+		AAIResourceUri uriAClone = uriA.clone();
+		RestClient aaiRC = this.createClient(uriAClone.relationshipAPI());
+		aaiRC.delete(this.buildRelationship(uriB));
+		return;
+	}
+	
+	/**
+	 * Deletes object from A&AI. Automatically handles resource-version.
+	 * 
+	 * @param uri
+	 * @return
+	 */
+	public void delete(AAIResourceUri uri) {
+		AAIResourceUri clone = uri.clone();
+		RestClient aaiRC = this.createClient(clone);
+		Map<String, Object> result = aaiRC.get(new GenericType<Map<String, Object>>(){});
+		String resourceVersion = (String) result.get("resource-version");
+		aaiRC = this.createClient(clone.resourceVersion(resourceVersion));
+		aaiRC.delete();
+		return;
+	}
+	
+	/**
+	 * @param obj - can be any object which will marshal into a valid A&AI payload
+	 * @param uri
+	 * @return
+	 */
+	public void update(AAIResourceUri uri, Object obj) {
+		RestClient aaiRC = this.createClient(uri);
+		aaiRC.patch(obj);
+		return;
+	}
+	
+	/**
+	 * Retrieves an object from A&AI and unmarshalls it into the Class specified
+	 * @param clazz
+	 * @param uri
+	 * @return
+	 */
+	public <T> T get(Class<T> clazz, AAIResourceUri uri) {
+		return this.createClient(uri).get(clazz);
+	}
+	
+	/**
+	 * Retrieves an object from A&AI and automatically unmarshalls it into a Map or List 
+	 * @param resultClass
+	 * @param uri
+	 * @return
+	 */
+	public <T> T get(GenericType<T> resultClass, AAIResourceUri uri) {
+		return this.createClient(uri).get(resultClass);
+	}
+	
+	/**
+	 * Retrieves an object from A&AI wrapped in a helper class which offer additional features
+	 * 
+	 * @param uri
+	 * @return
+	 */
+	public AAIResultWrapper get(AAIResourceUri uri) {
+		String json = this.createClient(uri).get(String.class);
+		
+		return new AAIResultWrapper(json);
+
+	}
+	private Relationship buildRelationship(AAIResourceUri uri) {
+		final Relationship result = new Relationship();
+		result.setRelatedLink(uri.build().toString());
+		return result;
+	}
+	
+	/**
+	 * Will automatically create the object if it does not exist
+	 * 
+	 * @param obj - Optional object which serializes to a valid A&AI payload
+	 * @param uri
+	 * @return
+	 */
+	public AAIResourcesClient createIfNotExists(AAIResourceUri uri, Optional<Object> obj) {
+		if(!this.exists(uri)){
+			if (obj.isPresent()) {
+				this.create(uri, obj.get());
+			} else {
+				this.createEmpty(uri);
+			}
+			
+		}
+		return this;
+	}
+
+	/**
+	 * Starts a transaction which encloses multiple A&AI mutations
+	 * 
+	 * @return
+	 */
+	public AAITransactionalClient beginTransaction() {
+		return new AAITransactionalClient(this.version, this.requestId);
+	}
+
+	@Override
+	protected AAIVersion getVersion() {
+		return this.version;
+	}
+	
+	@Override
+	protected RestClient createClient(AAIUri uri) {
+		return super.createClient(uri);
+	}
+	
+	private AAIUri addParams(Optional<Depth> depth, boolean nodesOnly, AAIUri uri) {
+		AAIUri clone = uri.clone();
+		if (depth.isPresent()) {
+			clone.depth(depth.get());
+		}
+		if (nodesOnly) {
+			clone.nodesOnly(nodesOnly);
+		}
+		
+		return clone;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIResourcesObjectMapperProvider.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIResourcesObjectMapperProvider.java
new file mode 100644
index 0000000..ada1939
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIResourcesObjectMapperProvider.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class AAIResourcesObjectMapperProvider extends AAICommonObjectMapperProvider {
+
+	public AAIResourcesObjectMapperProvider() {
+		super();
+	}
+
+	@Override
+	public ObjectMapper getContext(Class<?> type) {
+		return mapper;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClient.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClient.java
new file mode 100644
index 0000000..9348beb
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClient.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.net.URI;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.client.ClientResponseFilter;
+import javax.ws.rs.ext.ContextResolver;
+
+import org.openecomp.mso.client.RestProperties;
+import org.openecomp.mso.client.policy.RestClient;
+import org.openecomp.mso.client.policy.RestClientSSL;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class AAIRestClient extends RestClientSSL {
+
+	protected AAIRestClient(RestProperties props, UUID requestId, URI uri) {
+		super(props, requestId, Optional.of(uri));
+		headerMap.put("X-TransactionId", requestId.toString());
+	}
+
+	@Override
+	protected void initializeHeaderMap(Map<String, String> headerMap) {
+		headerMap.put("X-FromAppId", "MSO");
+	}
+
+	@Override
+	protected Optional<ClientResponseFilter> addResponseFilter() {
+
+		return Optional.of(new AAIClientResponseExceptionMapper(this.getRequestId()));
+	}
+
+	@Override
+	public RestClient addRequestId(UUID requestId) {
+		headerMap.put("X-TransactionId", requestId.toString());
+		this.requestId = requestId;
+		return this;
+	}
+	
+	@Override
+	protected ContextResolver<ObjectMapper> getMapper() {
+		return new AAICommonObjectMapperProvider();
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClientI.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClientI.java
new file mode 100644
index 0000000..801c0f9
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClientI.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.List;
+
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.Pserver;
+import org.onap.aai.domain.yang.Pservers;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+
+public interface AAIRestClientI {
+	
+	Pservers getPhysicalServers(String hostName, String uuid);
+	
+	List<Pserver> getPhysicalServerByVnfId(String vnfId, String transactionLoggingUuid) throws UnsupportedEncodingException, JsonParseException, JsonMappingException, IOException;
+	
+	void updateMaintenceFlag(String vnfId,boolean inMaint, String transactionLoggingUuid) throws Exception;
+
+	void updateMaintenceFlagVnfId(String vnfId, boolean inMaint, String transactionLoggingUuid) throws Exception;
+	
+	GenericVnf getVnfByName(String vnfId,  String transactionLoggingUuid) throws Exception;
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java
new file mode 100644
index 0000000..e27075d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIRestClientImpl.java
@@ -0,0 +1,165 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.GenericVnfs;
+import org.onap.aai.domain.yang.Pserver;
+import org.onap.aai.domain.yang.Pservers;
+import org.openecomp.mso.client.aai.entities.CustomQuery;
+import org.openecomp.mso.client.aai.entities.Results;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+import org.springframework.stereotype.Service;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+@Service
+public class AAIRestClientImpl implements AAIRestClientI {
+	
+	private static final EELFLogger logger = EELFManager.getInstance().getMetricsLogger();
+	private static final AAIVersion ENDPOINT_VERSION = AAIVersion.V10;
+	private static final String ENDPOINT_GET_ALL = ENDPOINT_VERSION + "/cloud-infrastructure/pservers";
+	private static final String ENDPOINT_GET_ALL_VNFS = ENDPOINT_VERSION + "/network/generic-vnfs";
+	private static final String ENDPOINT_CUSTOM_QUERY = ENDPOINT_VERSION + "/query";
+	private static final String PSERVER_VNF_QUERY = "pservers-fromVnf";
+	private static final String GENERIC_VNF_PATH = ENDPOINT_VERSION + "/network/generic-vnfs/generic-vnf";
+	private static final String SERVICE_TOPOLOGY_BY_SERVICE_INSTANCE_ID = "store(‘x’).union(__.in(‘subscribesTo’).has(‘aai-node-type’,’customer’).store(‘x’),__.out(‘uses’).has(‘aai-node-type’,’allotted-resource’).store(‘x’),__.in(‘hasInstance’).has(‘aai-node-type’,’generic-vnf’).store(‘x’).union("
+			+ ".out(‘has’).has(‘aai-node-type’,’vf-module’).store(‘x’),out(‘uses’).has(‘aai-node-type’,’volume-group’).store(‘x’),"
+			+ ".out(‘hasLInterface’).has(‘aai-node-type’,’l-interface’).union("
+			+ ".out(‘hasIpAddress’).has(‘aai-node-type’,’l3-interface-ipv4-address’).store(‘x’).out(‘isMemberOf’).has(‘aai-node-type’,’l3-network’).store(‘x’),"
+			+ ".out(‘hasIpAddress’).has(‘aai-node-type’,’l3-interface-ipv6-address’).store(‘x’).out(‘isMemberOf’).has(‘aai-node-type’,’l3-network’).store(‘x’)"
+			+ ")," + ".out(‘runsOnVserver’).has(‘aai-node-type’,’vserver’).store(‘x’).union("
+			+ ".in(‘owns’).has(‘aai-node-type’,’tenant’).store(‘x’).in(‘has’).has(‘aai-node-type’,’cloud-region’).store(‘x’),"
+			+ ".out(‘runsOnPserver’).has(‘aai-node-type’,’pserver’).store(‘x’),"
+			+ ".out(‘hasLInterface’).has(‘aai-node-type’,’l-interface’).union("
+			+ ".out(‘hasIpAddress’).has(‘aai-node-type’,’l3-interface-ipv4-address’).store(‘x’).out(‘isMemberOf’).has(‘aai-node-type’,’l3-network’).store(‘x’),"
+			+ ".out(‘hasIpAddress’).has(‘aai-node-type’,’l3-interface-ipv6-address’).store(‘x’).out(‘isMemberOf’).has(‘aai-node-type’,’l3-network’).store(‘x’)"
+			+ ")" + ")" + ")" + ").cap(‘x’).unfold().dedup()";
+
+	public AAIRestClientImpl() {		
+	
+		
+	}
+
+	public AAIRestClientImpl(final String host) {	
+		
+	
+	}
+
+	@Override
+	public Pservers getPhysicalServers(String hostName, String uuid) {
+		UUID requestId;
+		try {
+			requestId = UUID.fromString(uuid);
+		} catch (IllegalArgumentException e) {
+			logger.warn("could not parse uuid: " + uuid + " creating valid uuid automatically");
+			requestId = UUID.randomUUID();
+		}
+		return new AAIResourcesClient(ENDPOINT_VERSION, requestId).get(Pservers.class, AAIUriFactory.createResourceUri(AAIObjectPlurals.PSERVER));
+	}
+
+	@Override
+	public List<Pserver> getPhysicalServerByVnfId(String vnfId, String transactionLoggingUuid)
+			throws JsonParseException, JsonMappingException, IOException {
+		UUID requestId;
+		try {
+			requestId = UUID.fromString(transactionLoggingUuid);
+		} catch (IllegalArgumentException e) {
+			logger.warn("could not parse uuid: " + transactionLoggingUuid + " creating valid uuid automatically");
+			requestId = UUID.randomUUID();
+		}
+		List<AAIResourceUri> startNodes = new ArrayList<>();
+		startNodes.add(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+		String jsonInput = new AAIQueryClient(ENDPOINT_VERSION, requestId).query(Format.RESOURCE, new CustomQuery(startNodes,PSERVER_VNF_QUERY));
+
+		return this.getListOfPservers(jsonInput);
+		
+	}
+
+	protected List<Pserver> getListOfPservers(String jsonInput) throws JsonParseException, JsonMappingException, IOException {
+		ObjectMapper mapper = new AAICommonObjectMapperProvider().getContext(Object.class);
+		Results<Map<String, Pserver>> resultsFromJson = mapper.readValue(jsonInput,
+				new TypeReference<Results<Map<String, Pserver>>>() {
+				});
+		List<Pserver> results = new ArrayList<>();
+		for (Map<String, Pserver> m : resultsFromJson.getResult()) {
+			results.add(m.get("pserver"));
+		}
+		return results;
+	}
+	@Override
+	public void updateMaintenceFlag(String vnfName, boolean inMaint, String transactionLoggingUuid) throws JsonParseException, JsonMappingException, IOException {
+		UUID requestId;
+		try {
+			requestId = UUID.fromString(transactionLoggingUuid);
+		} catch (IllegalArgumentException e) {
+			logger.warn("could not parse uuid: " + transactionLoggingUuid + " creating valid uuid automatically");
+			requestId = UUID.randomUUID();
+		}
+		GenericVnfs genericVnfs = new AAIResourcesClient(ENDPOINT_VERSION, requestId).get(GenericVnfs.class, AAIUriFactory.createResourceUri(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName));
+		if(genericVnfs.getGenericVnf().size() > 1)
+			throw new IndexOutOfBoundsException("Multiple Generic Vnfs Returned");
+		
+		GenericVnf genericVnf = genericVnfs.getGenericVnf().get(0);
+		updateMaintenceFlagVnfId(genericVnf.getVnfId(), inMaint, transactionLoggingUuid);
+	}
+
+	@Override
+	public void updateMaintenceFlagVnfId(String vnfId, boolean inMaint, String transactionLoggingUuid) throws JsonParseException, JsonMappingException, IOException {
+		UUID requestId;
+		try {
+			requestId = UUID.fromString(transactionLoggingUuid);
+		} catch (IllegalArgumentException e) {
+			logger.warn("could not parse uuid: " + transactionLoggingUuid + " creating valid uuid automatically");
+			requestId = UUID.randomUUID();
+		}
+		GenericVnf genericVnf = new GenericVnf();
+		genericVnf.setInMaint(inMaint);
+		new AAIResourcesClient(ENDPOINT_VERSION, requestId).update(AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId), genericVnf);
+		
+	}
+
+	@Override
+	public GenericVnf getVnfByName(String vnfId, String transactionLoggingUuid) throws JsonParseException, JsonMappingException, IOException {
+		UUID requestId;
+		try {
+			requestId = UUID.fromString(transactionLoggingUuid);
+		} catch (IllegalArgumentException e) {
+			logger.warn("could not parse uuid: " + transactionLoggingUuid + " creating valid uuid automatically");
+			requestId = UUID.randomUUID();
+		}
+		return new AAIResourcesClient(ENDPOINT_VERSION, requestId).get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId));
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAISubgraphType.java b/common/src/main/java/org/openecomp/mso/client/aai/AAISubgraphType.java
new file mode 100644
index 0000000..9179499
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAISubgraphType.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+
+public enum AAISubgraphType {
+	STAR("star"),
+	PRUNE("prune");
+
+	private final String name;
+
+	private AAISubgraphType(String name) {
+		this.name = name;
+	}
+
+	@Override
+	public String toString() {
+		return name;
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAITransactionalClient.java b/common/src/main/java/org/openecomp/mso/client/aai/AAITransactionalClient.java
new file mode 100644
index 0000000..5478627
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAITransactionalClient.java
@@ -0,0 +1,263 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+
+import org.onap.aai.domain.yang.Relationship;
+import org.openecomp.mso.client.aai.entities.AAIError;
+import org.openecomp.mso.client.aai.entities.bulkprocess.OperationBody;
+import org.openecomp.mso.client.aai.entities.bulkprocess.Transaction;
+import org.openecomp.mso.client.aai.entities.bulkprocess.Transactions;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+import org.openecomp.mso.client.aai.exceptions.BulkProcessFailed;
+import org.openecomp.mso.client.policy.RestClient;
+import org.openecomp.mso.jsonpath.JsonPathUtil;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Joiner;
+
+public class AAITransactionalClient extends AAIClient {
+
+	private final Transactions transactions;
+	private Transaction currentTransaction;
+	private final AAIVersion version;
+	private int actionCount = 0;
+	protected AAITransactionalClient(AAIVersion version, UUID requestId) {
+		super(requestId);
+		this.version = version;
+		this.transactions = new Transactions();
+		startTransaction();
+	}
+	
+	private void startTransaction() {
+		Transaction transaction = new Transaction();
+		transactions.getTransactions().add(transaction);
+		currentTransaction = transaction;
+	}
+	
+	/**
+	 * adds an additional transaction and closes the previous transaction
+	 * 
+	 * @return AAITransactionalClient
+	 */
+	public AAITransactionalClient beginNewTransaction() {
+		startTransaction();
+		return this;
+	}
+	
+	/**
+	 * creates a new object in A&AI
+	 * 
+	 * @param obj - can be any object which will marshal into a valid A&AI payload
+	 * @param uri
+	 * @return
+	 */
+	public AAITransactionalClient create(AAIResourceUri uri, Object obj) {
+		currentTransaction.getPut().add(new OperationBody().withUri(uri.build().toString()).withBody(obj));
+		incrementActionAmount();
+		return this;
+	}
+	
+	/**
+	 * creates a new object in A&AI with no payload body
+	 * 
+	 * @param uri
+	 * @return
+	 */
+	public AAITransactionalClient createEmpty(AAIResourceUri uri) {
+		currentTransaction.getPut().add(new OperationBody().withUri(uri.build().toString()).withBody(new HashMap<String, String>()));
+		incrementActionAmount();
+		return this;
+	}
+	
+	/**
+	 * Adds a relationship between two objects in A&AI 
+	 * @param uriA
+	 * @param uriB
+	 * @return
+	 */
+	public AAITransactionalClient connect(AAIResourceUri uriA, AAIResourceUri uriB) {
+		AAIResourceUri uriAClone = uriA.clone();
+		currentTransaction.getPut().add(new OperationBody().withUri(uriAClone.relationshipAPI().build().toString()).withBody(this.buildRelationship(uriB)));
+		incrementActionAmount();
+		return this;
+	}
+	
+	/**
+	 * relationship between multiple objects in A&AI - connects A to all objects specified in list
+	 * 
+	 * @param uriA
+	 * @param uris
+	 * @return
+	 */
+	public AAITransactionalClient connect(AAIResourceUri uriA, List<AAIResourceUri> uris) {
+		for (AAIResourceUri uri : uris) {
+			this.connect(uriA, uri);
+		}
+		return this;
+	}
+	
+	/**
+	 * Removes relationship from two objects in A&AI
+	 * 
+	 * @param uriA
+	 * @param uriB
+	 * @return
+	 */
+	public AAITransactionalClient disconnect(AAIResourceUri uriA, AAIResourceUri uriB) {
+		AAIResourceUri uriAClone = uriA.clone();
+		currentTransaction.getDelete().add(new OperationBody().withUri(uriAClone.relationshipAPI().build().toString()).withBody(this.buildRelationship(uriB)));
+		incrementActionAmount();
+		return this;
+	}
+	
+	/**
+	 * Removes relationship from multiple objects - disconnects A from all objects specified in list
+	 * @param uriA
+	 * @param uris
+	 * @return
+	 */
+	public AAITransactionalClient disconnect(AAIResourceUri uriA, List<AAIResourceUri> uris) {
+		for (AAIResourceUri uri : uris) {
+			this.disconnect(uriA, uri);
+		}
+		return this;
+	}
+	/**
+	 * Deletes object from A&AI. Automatically handles resource-version.
+	 * 
+	 * @param uri
+	 * @return
+	 */
+	public AAITransactionalClient delete(AAIResourceUri uri) {
+		AAIResourcesClient client = new AAIResourcesClient();
+		AAIResourceUri clone = uri.clone();
+		Map<String, Object> result = client.get(new GenericType<Map<String, Object>>(){}, clone);
+		String resourceVersion = (String) result.get("resource-version");
+		currentTransaction.getDelete().add(new OperationBody().withUri(clone.resourceVersion(resourceVersion).build().toString()).withBody(""));
+		incrementActionAmount();
+		return this;
+	}
+	
+	/**
+	 * @param obj - can be any object which will marshal into a valid A&AI payload
+	 * @param uri
+	 * @return
+	 */
+	public AAITransactionalClient update(AAIResourceUri uri, Object obj) {
+		currentTransaction.getPatch().add(new OperationBody().withUri(uri.build().toString()).withBody(obj));
+		incrementActionAmount();
+		return this;
+	}
+	
+	private void incrementActionAmount() {
+		actionCount++;
+	}
+	/**
+	 * Executes all created transactions in A&AI
+	 * @throws BulkProcessFailed 
+	 */
+	public void execute() throws BulkProcessFailed {
+		RestClient client = this.createClient(AAIUriFactory.createResourceUri(AAIObjectType.BULK_PROCESS));
+		try {
+			Response response = client.put(this.transactions);
+			if (response.hasEntity()) {
+				final Optional<String> errorMessage = this.locateErrorMessages(response.readEntity(String.class));
+				if (errorMessage.isPresent()) {
+					throw new BulkProcessFailed("One or more transactions failed in A&AI. Request-id=" + this.getRequestId() + ". Check logs for payloads.\nMessages:\n" + errorMessage.get());
+				}
+			} else {
+				throw new BulkProcessFailed("Transactions acccepted by A&AI, but there was no response. Unsure of result.");
+			}
+		} finally {
+			this.transactions.getTransactions().clear();
+			this.currentTransaction = null;
+			this.actionCount = 0;
+		}
+	}
+	
+	protected Optional<String> locateErrorMessages(String response) {
+		final List<String> errorMessages = new ArrayList<>();
+		final List<String> results = JsonPathUtil.getInstance().locateResultList(response, "$..body");
+		final ObjectMapper mapper = new ObjectMapper();
+		if (!results.isEmpty()) {
+			List<Map<String, Object>> parsed = new ArrayList<>();
+			try {
+				for (String result : results) {
+					parsed.add(mapper.readValue(result, new TypeReference<Map<String, Object>>(){}));
+				}
+			} catch (IOException e) {
+				metricsLogger.error("could not map json", e);
+			}
+			for (Map<String, Object> map : parsed) {
+				for (Entry<String, Object> entry : map.entrySet()) {
+					if (!entry.getKey().matches("2\\d\\d")) {
+						AAIError error;
+						try {
+							error = mapper.readValue(entry.getValue().toString(), AAIError.class);
+						} catch (IOException e) {
+							metricsLogger.error("could not parse error object from A&AI", e);
+							error = new AAIError();
+						}
+						AAIErrorFormatter formatter = new AAIErrorFormatter(error);
+						String outputMessage = formatter.getMessage();
+						metricsLogger.error("part of a bulk action failed in A&AI: " + entry.getValue());
+						errorMessages.add(outputMessage);
+					}
+				}
+			}
+		}
+		
+		if (!errorMessages.isEmpty()) {
+			return Optional.of(Joiner.on("\n").join(errorMessages));
+		} else {
+			return Optional.empty();
+		}
+	}
+	private Relationship buildRelationship(AAIUri uri) {
+		final Relationship result = new Relationship();
+		result.setRelatedLink(uri.build().toString());
+		return result;
+	}
+
+	@Override
+	protected AAIVersion getVersion() {
+		return this.version;
+	}
+	
+	protected Transactions getTransactions() {
+		return this.transactions;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIUpdator.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIUpdator.java
new file mode 100644
index 0000000..3bdcdc5
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIUpdator.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.io.IOException;
+
+public interface AAIUpdator {
+	
+	void updateVnfToLocked(String vnfName, String uuid) throws IOException, Exception;
+	
+	void updateVnfToUnLocked(String vnfName, String uuid) throws IOException, Exception;
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIUpdatorImpl.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIUpdatorImpl.java
new file mode 100644
index 0000000..c808761
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIUpdatorImpl.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class AAIUpdatorImpl implements AAIUpdator {
+	
+	@Autowired
+	protected AAIRestClientI client;
+	
+	public AAIRestClientI getClient() {
+		return client;
+	}
+
+
+	public void setClient(AAIRestClientI client) {
+		this.client = client;
+	}
+
+	@Override
+	public void updateVnfToLocked(String vnfId, String uuid) throws Exception {
+		client.updateMaintenceFlagVnfId(vnfId, true, uuid);
+	}
+
+	@Override
+	public void updateVnfToUnLocked(String vnfId, String uuid) throws Exception {
+		client.updateMaintenceFlagVnfId(vnfId, false, uuid);
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIValidator.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIValidator.java
new file mode 100644
index 0000000..117ec42
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIValidator.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.io.IOException;
+
+public interface AAIValidator {
+	
+	boolean isPhysicalServerLocked(String hostName, String transactionLoggingUuid) throws IOException;
+	
+	boolean isVNFLocked(String vnfId, String transactionLoggingUuid) throws IOException, Exception;
+	
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIValidatorImpl.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIValidatorImpl.java
new file mode 100644
index 0000000..c84d2f4
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIValidatorImpl.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.Pserver;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+
+@Service
+public class AAIValidatorImpl implements AAIValidator {
+
+
+	@Autowired
+	protected AAIRestClientI client;
+	
+	public AAIRestClientI getClient() {
+		return client;
+	}
+
+
+	public void setClient(AAIRestClientI client) {
+		this.client = client;
+	}
+
+	@Override
+	public boolean isPhysicalServerLocked(String vnfId, String transactionLoggingUuid) throws IOException {
+		List<Pserver> pservers;
+		boolean isLocked = false;
+		pservers = client.getPhysicalServerByVnfId(vnfId, transactionLoggingUuid);
+		for (Pserver pserver : pservers)
+			if (pserver.isInMaint())
+				isLocked = true;
+		
+		return isLocked;
+	}
+
+	@Override
+	public boolean isVNFLocked(String vnfId, String transactionLoggingUuid) throws Exception {
+		boolean isLocked = false;
+		GenericVnf genericVnf = client.getVnfByName(vnfId, transactionLoggingUuid);
+			if (genericVnf.isInMaint())
+				isLocked = true;
+
+		return isLocked;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/AAIVersion.java b/common/src/main/java/org/openecomp/mso/client/aai/AAIVersion.java
new file mode 100644
index 0000000..20117fb
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/AAIVersion.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+public enum AAIVersion {
+	V8("v8"),
+	V9("v9"), 
+	V10("v10"), 
+	V11("v11"), 
+	V12("v12");
+	
+	public final static AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
+	private final String value;
+	private AAIVersion(String value){
+		this.value = value;
+	}
+	@Override
+	public String toString(){
+		return this.value;
+	}
+}
+
+
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/Format.java b/common/src/main/java/org/openecomp/mso/client/aai/Format.java
new file mode 100644
index 0000000..e400815
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/Format.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai;
+
+public enum Format {
+
+	RESOURCE("resource"),
+	SIMPLE("simple"),
+	RAW("raw"),
+	CONSOLE("console"),
+	PATHED("pathed"),
+	GRAPHSON("graphson"),
+	ID("id");
+
+	private final String name;
+	
+	private Format(String name) {
+		this.name = name;
+	}
+	
+	@Override
+	public String toString() {
+		return name;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIEntity.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIEntity.java
new file mode 100644
index 0000000..3f0c4f3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIEntity.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+public class AAIEntity{
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIEntityObject.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIEntityObject.java
new file mode 100644
index 0000000..e4a64c4
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIEntityObject.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+
+public interface AAIEntityObject {
+	
+	public AAIResourceUri getUri();
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIError.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIError.java
new file mode 100644
index 0000000..5f895ef
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIError.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "requestError"
+})
+public class AAIError {
+
+    @JsonProperty("requestError")
+    private RequestError requestError;
+
+    @JsonProperty("requestError")
+    public RequestError getRequestError() {
+        return requestError;
+    }
+
+    @JsonProperty("requestError")
+    public void setRequestError(RequestError requestError) {
+        this.requestError = requestError;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIResultWrapper.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIResultWrapper.java
new file mode 100644
index 0000000..9898f04
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/AAIResultWrapper.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.openecomp.mso.client.aai.AAICommonObjectMapperProvider;
+import org.openecomp.mso.jsonpath.JsonPathUtil;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class AAIResultWrapper {
+
+	private final String jsonBody;
+	private final ObjectMapper mapper;
+	public AAIResultWrapper(String json) {
+		this.jsonBody = json;
+		this.mapper = new AAICommonObjectMapperProvider().getMapper();
+	}
+	
+	public Optional<Relationships> getRelationships() {
+		final String path = "$.relationship-list";
+		Optional<String> result = JsonPathUtil.getInstance().locateResult(jsonBody, path);
+		if (result.isPresent()) {
+			return Optional.of(new Relationships(result.get()));
+		} else {
+			return Optional.empty();
+		}
+	}
+	
+	public String getJson() {
+		return jsonBody;
+	}
+	
+	public Map<String, Object> asMap() {
+		try {
+			return mapper.readValue(this.jsonBody, new TypeReference<Map<String, Object>>(){});
+		} catch (IOException e) {
+			return new HashMap<>();
+		}
+	}
+	
+	public <T> Optional<T> asBean(Class<T> clazz) {
+		try {
+			return Optional.of(mapper.readValue(this.jsonBody, clazz));
+		} catch (IOException e) {
+			return Optional.empty();
+		}
+	}
+	
+	@Override
+	public String toString() {
+		return this.getJson();
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/Configuration.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/Configuration.java
new file mode 100644
index 0000000..a2d0fb3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/Configuration.java
@@ -0,0 +1,162 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.aai.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "configuration-id",
+    "configuration-type",
+    "configuration-sub-type",
+    "model-invariant-id",
+    "model-version-id",
+    "orchestration-status",
+    "operational-status",
+    "configuration-selflink",
+    "model-customization-id"
+})
+public class Configuration {
+
+    @JsonProperty("configuration-id")
+    private String configurationId;
+    @JsonProperty("configuration-name")
+    private String configurationName;
+	@JsonProperty("configuration-type")
+    private String configurationType;
+    @JsonProperty("configuration-sub-type")
+    private String configurationSubType;
+    @JsonProperty("model-invariant-id")
+    private String modelInvariantId;
+    @JsonProperty("model-version-id")
+    private String modelVersionId;
+    @JsonProperty("orchestration-status")
+    private String orchestrationStatus;
+	@JsonProperty("operational-status")
+    private String operationalStatus;
+	@JsonProperty("configuration-selflink")
+    private String configurationSelflink;
+    @JsonProperty("model-customization-id")
+    private String modelCustomizationId;
+    
+    @JsonProperty("configuration-id")
+    public String getConfigurationId() {
+        return configurationId;
+    }
+
+    @JsonProperty("configuration-id")
+    public void setConfigurationId(String configurationId) {
+        this.configurationId = configurationId;
+    }
+    
+    @JsonProperty("configuration-name")
+    public String getConfigurationName() {
+		return configurationName;
+	}
+
+    @JsonProperty("configuration-name")
+	public void setConfigurationName(String configurationName) {
+		this.configurationName = configurationName;
+	}
+
+    @JsonProperty("configuration-type")
+    public String getConfigurationType() {
+        return configurationType;
+    }
+
+    @JsonProperty("configuration-type")
+    public void setConfigurationType(String configurationType) {
+        this.configurationType = configurationType;
+    }
+
+    @JsonProperty("configuration-sub-type")
+    public String getConfigurationSubType() {
+        return configurationSubType;
+    }
+
+    @JsonProperty("configuration-sub-type")
+    public void setConfigurationSubType(String configurationSubType) {
+        this.configurationSubType = configurationSubType;
+    }
+
+    @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("orchestration-status")
+    public String getOrchestrationStatus() {
+		return orchestrationStatus;
+	}
+
+    @JsonProperty("orchestration-status")
+	public void setOrchestrationStatus(String orchestrationStatus) {
+		this.orchestrationStatus = orchestrationStatus;
+	}
+
+    @JsonProperty("operational-status")
+	public String getOperationalStatus() {
+		return operationalStatus;
+	}
+
+    @JsonProperty("operational-status")
+	public void setOperationalStatus(String operationalStatus) {
+		this.operationalStatus = operationalStatus;
+	}
+    
+    @JsonProperty("model-customization-id")
+    public String getModelCustomizationId() {
+		return modelCustomizationId;
+	}
+
+    @JsonProperty("model-customization-id")
+	public void setModelCustomizationId(String modelCustomizationId) {
+		this.modelCustomizationId = modelCustomizationId;
+	}
+
+    @JsonProperty("configuration-selflink")
+    public String getConfigurationSelflink() {
+        return configurationSelflink;
+    }
+
+    @JsonProperty("configuration-selflink")
+    public void setConfigurationSelflink(String configurationSelflink) {
+        this.configurationSelflink = configurationSelflink;
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/CustomQuery.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/CustomQuery.java
new file mode 100644
index 0000000..3d014b8
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/CustomQuery.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL) 
+public class CustomQuery {
+	
+	private List<String> start;
+	private String query;
+	private String gremlin;
+	
+	public String getGremlin() {
+		return gremlin;
+	}
+
+	public void setGremlin(String gremlin) {
+		this.gremlin = gremlin;
+	}
+
+	
+	public CustomQuery(List<AAIResourceUri> start){
+		this.setStart(start);
+	}
+	
+	public CustomQuery(List<AAIResourceUri> start, String query){
+		this.setStart(start);
+		this.query= "query/" + query;
+	}
+	
+	public CustomQuery(String gremlin) throws UnsupportedEncodingException{
+		this.gremlin=gremlin;
+	}
+	
+	public List<String> getStart() {
+		return start;
+	}
+
+	public void setStart(List<AAIResourceUri> start) {
+		this.start = this.mapUris(start);
+	}
+
+	public String getQuery() {
+		return query;
+	}
+
+	public void setQuery(String query) {
+		this.query = query;
+	}
+	
+	private List<String> mapUris(List<AAIResourceUri> uris) {
+		final List<String> result = new ArrayList<>();
+		uris.stream().map(item -> item.build().toString()).forEach(result::add);
+		return result;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/Relationships.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/Relationships.java
new file mode 100644
index 0000000..cca2fb3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/Relationships.java
@@ -0,0 +1,140 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Predicate;
+
+import javax.ws.rs.core.UriBuilder;
+
+import org.openecomp.mso.client.aai.AAICommonObjectMapperProvider;
+import org.openecomp.mso.client.aai.AAIObjectName;
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.AAIResourcesClient;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+import org.openecomp.mso.jsonpath.JsonPathUtil;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.CaseFormat;
+
+public class Relationships {
+
+	private final ObjectMapper mapper;
+	private Map<String, Object> map;
+	private final String jsonBody;
+	public Relationships(String json) {
+		this.jsonBody = json;
+		this.mapper = new AAICommonObjectMapperProvider().getMapper();
+		try {
+			this.map = mapper.readValue(json, new TypeReference<Map<String, Object>>() {});
+		} catch (IOException e) {
+			this.map = new HashMap<>();
+		}
+	}
+	
+	public List<AAIResultWrapper> getByType(AAIObjectName type) {
+		
+		return this.getAll(Optional.of(type));
+	}
+	
+	public List<AAIResultWrapper> getAll() {
+		
+		return this.getAll(Optional.empty());
+	}
+	
+	
+	public List<String> getRelatedLinks() {
+		return this.getRelatedLinks(Optional.empty());
+	}
+	
+	public List<String> getRelatedLinks(AAIObjectName type) {
+		return this.getRelatedLinks(Optional.of(type));
+	}
+	
+	public List<AAIResourceUri> getRelatedAAIUris() {
+		return this.getRelatedAAIUris(x -> true);
+	}
+	
+	public List<AAIResourceUri> getRelatedAAIUris(AAIObjectName type) {
+		return this.getRelatedAAIUris(x -> type.typeName().equals(x));
+	}
+	protected List<AAIResourceUri> getRelatedAAIUris(Predicate<String> p) {
+		List<AAIResourceUri> result = new ArrayList<>();
+		if (map.containsKey("relationship")) {
+			List<Map<String, Object>> relationships = (List<Map<String, Object>>)map.get("relationship");
+			for (Map<String, Object> relationship : relationships) {
+				final String relatedTo = (String)relationship.get("related-to");
+				if (p.test(relatedTo)) {
+					AAIObjectType type;
+					try {
+						type = AAIObjectType.valueOf(CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_UNDERSCORE, relatedTo));
+					} catch (IllegalArgumentException e) {
+						type = AAIObjectType.UNKNOWN;
+					}
+					final String relatedLink = (String)relationship.get("related-link");
+					
+					result.add(AAIUriFactory.createResourceFromExistingURI(type, UriBuilder.fromPath(relatedLink).build()));
+				}
+			}
+		}
+		return result;
+	}
+	
+	
+	
+	protected List<AAIResultWrapper> getAll(final Optional<AAIObjectName> type) {
+		List<AAIResourceUri> relatedLinks;
+		if (type.isPresent()) {
+			relatedLinks = this.getRelatedAAIUris(type.get());
+		} else {
+			relatedLinks = this.getRelatedAAIUris();
+		}
+		ArrayList<AAIResultWrapper> result = new ArrayList<>();
+		for (AAIResourceUri link : relatedLinks) {
+			result.add(this.get(link));
+		}
+		return result;
+	}
+	
+	protected AAIResultWrapper get(AAIResourceUri uri) {
+		return new AAIResourcesClient().get(uri);
+		
+	}
+	
+	protected List<String> getRelatedLinks(Optional<AAIObjectName> type) {
+		String matcher = "";
+		if (type.isPresent()) {
+			matcher = "[?(@.related-to=='" + type.get() + "')]";
+		}
+		return JsonPathUtil.getInstance().locateResultList(this.jsonBody, String.format("$.relationship%s.related-link", matcher));
+	}
+	
+	public String getJson() {
+		return this.jsonBody;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/RequestError.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/RequestError.java
new file mode 100644
index 0000000..2fd3572
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/RequestError.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "serviceException"
+})
+public class RequestError {
+
+    @JsonProperty("serviceException")
+    private ServiceException serviceException;
+
+    @JsonProperty("serviceException")
+    public ServiceException getServiceException() {
+        return serviceException;
+    }
+
+    @JsonProperty("serviceException")
+    public void setServiceException(ServiceException serviceException) {
+        this.serviceException = serviceException;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/Results.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/Results.java
new file mode 100644
index 0000000..e91823a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/Results.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"results"
+})
+public class Results<T> {
+	@JsonProperty("results")
+	protected List<T> results;
+	
+	@JsonProperty("results")
+    public List<T> getResult() {
+        if (results == null) {
+        	results = new ArrayList<>();
+        }
+        return this.results;
+    }
+	@JsonProperty("results")
+    public void setResult(List<T> results) {        
+        this.results=results;
+    }	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/ServiceException.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/ServiceException.java
new file mode 100644
index 0000000..66ca10d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/ServiceException.java
@@ -0,0 +1,75 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "messageId",
+    "text",
+    "variables"
+})
+public class ServiceException {
+
+    @JsonProperty("messageId")
+    private String messageId;
+    @JsonProperty("text")
+    private String text;
+    @JsonProperty("variables")
+    private List<String> variables = new ArrayList<>();
+
+    @JsonProperty("messageId")
+    public String getMessageId() {
+        return messageId;
+    }
+
+    @JsonProperty("messageId")
+    public void setMessageId(String messageId) {
+        this.messageId = messageId;
+    }
+
+    @JsonProperty("text")
+    public String getText() {
+        return text;
+    }
+
+    @JsonProperty("text")
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    @JsonProperty("variables")
+    public List<String> getVariables() {
+        return variables;
+    }
+
+    @JsonProperty("variables")
+    public void setVariables(List<String> variables) {
+        this.variables = variables;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/OperationBody.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/OperationBody.java
new file mode 100644
index 0000000..ddd9a45
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/OperationBody.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.bulkprocess;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"uri",
+"body"
+})
+public class OperationBody {
+
+@JsonProperty("uri")
+private String uri;
+@JsonProperty("body")
+private Object body;
+
+@JsonProperty("uri")
+public String getUri() {
+return uri;
+}
+
+@JsonProperty("uri")
+public void setUri(String uri) {
+this.uri = uri;
+}
+
+public OperationBody withUri(String uri) {
+this.uri = uri;
+return this;
+}
+
+@JsonProperty("body")
+public Object getBody() {
+return body;
+}
+
+@JsonProperty("body")
+public void setBody(Object body) {
+this.body = body;
+}
+
+public OperationBody withBody(Object body) {
+this.body = body;
+return this;
+}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/Transaction.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/Transaction.java
new file mode 100644
index 0000000..8c4d54d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/Transaction.java
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.bulkprocess;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"patch",
+"patch",
+"delete"
+})
+public class Transaction {
+
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+@JsonProperty("put")
+private List<OperationBody> put = new ArrayList<>();
+
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+@JsonProperty("patch")
+private List<OperationBody> patch = new ArrayList<>();
+
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+@JsonProperty("delete")
+private List<OperationBody> delete = new ArrayList<>();
+
+@JsonProperty("put")
+public List<OperationBody> getPut() {
+return put;
+}
+
+@JsonProperty("put")
+public void setPut(List<OperationBody> put) {
+this.put = put;
+}
+
+public Transaction withPut(List<OperationBody> put) {
+this.put = put;
+return this;
+}
+
+@JsonProperty("patch")
+public List<OperationBody> getPatch() {
+return patch;
+}
+
+@JsonProperty("patch")
+public void setPatch(List<OperationBody> patch) {
+this.patch = patch;
+}
+
+public Transaction withPatch(List<OperationBody> patch) {
+this.patch = patch;
+return this;
+}
+
+@JsonProperty("delete")
+public List<OperationBody> getDelete() {
+return delete;
+}
+
+@JsonProperty("delete")
+public void setDelete(List<OperationBody> delete) {
+this.delete = delete;
+}
+
+public Transaction withDelete(List<OperationBody> delete) {
+this.delete = delete;
+return this;
+}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/Transactions.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/Transactions.java
new file mode 100644
index 0000000..f6ce3c5
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/bulkprocess/Transactions.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.bulkprocess;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"transactions"
+})
+public class Transactions {
+
+@JsonProperty("transactions")
+private List<Transaction> transactions = new ArrayList<>();
+
+@JsonProperty("transactions")
+public List<Transaction> getTransactions() {
+return transactions;
+}
+
+@JsonProperty("transactions")
+public void setTransactions(List<Transaction> transactions) {
+this.transactions = transactions;
+}
+
+public Transactions withTransactions(List<Transaction> transactions) {
+this.transactions = transactions;
+return this;
+}
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIResourceUri.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIResourceUri.java
new file mode 100644
index 0000000..36e3d00
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIResourceUri.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri;
+
+import org.openecomp.mso.client.aai.AAIObjectPlurals;
+import org.openecomp.mso.client.aai.AAIObjectType;
+
+public interface AAIResourceUri extends AAIUri {
+
+	public AAIResourceUri relationshipAPI();
+	public AAIResourceUri relatedTo(AAIObjectPlurals plural);
+	public AAIResourceUri relatedTo(AAIObjectType type, String... values);
+	public AAIResourceUri resourceVersion(String version);
+	public AAIResourceUri depth(Depth depth);
+	public AAIResourceUri nodesOnly(boolean nodesOnly);
+	public AAIResourceUri queryParam(String name, String... values);
+	public AAIResourceUri clone();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIUri.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIUri.java
new file mode 100644
index 0000000..1617bcd
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIUri.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri;
+
+import java.net.URI;
+import java.util.Map;
+
+import org.openecomp.mso.client.aai.AAIObjectPlurals;
+import org.openecomp.mso.client.aai.AAIObjectType;
+
+public interface AAIUri {
+
+	public URI build();
+	/**
+	 * By default A&AI enforces a depth of 1. Some objects can be told to retrieve objects
+	 * nested beneath them by increasing this number.
+	 * 
+	 * You can use 0 to restrict the returned information to only the object you requested
+	 * You can use all to retrieve all nested objects (this should only be used if you really need a massive amount of information and are caching the retrieval)
+	 * @param depth
+	 * @return
+	 */
+	public AAIUri depth(Depth depth);
+	/**
+	 * Makes client only return object fields, no relationships
+	 * 
+	 * @return
+	 */
+	public AAIUri nodesOnly(boolean nodesOnly);
+	public AAIUri queryParam(String name, String... values);
+	public AAIUri clone();
+	
+	/**
+	 * returns all key values of the URI as a map. Key names can be found in {@link AAIObjectType}
+	 * @return
+	 */
+	public Map<String, String> getURIKeys();
+	public AAIObjectType getObjectType();
+	public boolean equals(Object o);
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIUriFactory.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIUriFactory.java
new file mode 100644
index 0000000..cb33435
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/AAIUriFactory.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri;
+
+import java.net.URI;
+
+import org.openecomp.mso.client.aai.AAIObjectPlurals;
+import org.openecomp.mso.client.aai.AAIObjectType;
+
+
+public class AAIUriFactory {
+	
+	/**
+	 * values are filled into the URI template specified in {@link AAIObjectType} in order
+	 * 
+	 * @param type
+	 * @param values
+	 * @return
+	 */
+	public static AAIResourceUri createResourceUri(AAIObjectType type, Object... values) {
+		if (AAIObjectType.SERVICE_INSTANCE.equals(type)) {
+			return new ServiceInstanceUri(values);
+		} else {
+			return new SimpleUri(type, values);
+		}
+	}
+	
+	public static AAIResourceUri createNodesUri(AAIObjectType type, Object... values) {
+		return new NodesUri(type, values);
+		
+	}
+	
+	/**
+	 * This method should only be used to wrap a URI retrieved from A&AI contained within an object response
+	 * 
+	 * @param type
+	 * @param uri
+	 * @return
+	 */
+	public static AAIResourceUri createResourceFromExistingURI(AAIObjectType type, URI uri) {
+		return new SimpleUri(type, uri);
+	}
+	
+	/**
+	 * Creates a uri for a plural type e.g. /cloud-infrastructure/pservers
+	 * 
+	 * @param type
+	 * @return
+	 */
+	public static AAIResourceUri createResourceUri(AAIObjectPlurals type) {
+		
+		return new SimpleUri(type);
+	
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/Depth.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/Depth.java
new file mode 100644
index 0000000..7522ea3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/Depth.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri;
+
+public enum Depth {
+	ZERO("0"),
+	ONE("1"),
+	TWO("2"),
+	THREE("3"),
+	FOUR("4"),
+	FIVE("5"),
+	SIX("6"),
+	ALL("all");
+	
+	private final String depth;
+	private Depth(String s) {
+		
+		this.depth = s;
+	}
+	
+	
+	@Override
+	public String toString() {
+		return this.depth;
+	}
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/NodesUri.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/NodesUri.java
new file mode 100644
index 0000000..407e0ec
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/NodesUri.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri;
+
+import javax.ws.rs.core.UriBuilder;
+
+import org.openecomp.mso.client.aai.AAIObjectPlurals;
+import org.openecomp.mso.client.aai.AAIObjectType;
+
+public class NodesUri extends SimpleUri {
+
+	protected NodesUri(AAIObjectType type, Object... values) {
+		super(type, values);
+	}
+	
+	
+	@Override
+	protected String getTemplate(AAIObjectType type) {
+		return "/nodes" + type.partialUri();
+	}
+	
+	@Override
+	protected String getTemplate(AAIObjectPlurals type) {
+		return "/nodes" + type.partialUri();
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/ServiceInstanceUri.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/ServiceInstanceUri.java
new file mode 100644
index 0000000..cdaeced
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/ServiceInstanceUri.java
@@ -0,0 +1,129 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Optional;
+
+import javax.ws.rs.BadRequestException;
+import javax.ws.rs.client.ResponseProcessingException;
+import javax.ws.rs.core.UriBuilder;
+
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.AAIQueryClient;
+import org.openecomp.mso.client.aai.Format;
+import org.openecomp.mso.client.aai.entities.CustomQuery;
+import org.openecomp.mso.client.aai.entities.Results;
+import org.openecomp.mso.client.aai.exceptions.AAIPayloadException;
+import org.openecomp.mso.client.aai.exceptions.AAIUriComputationException;
+import org.openecomp.mso.client.aai.exceptions.AAIUriNotFoundException;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class ServiceInstanceUri extends SimpleUri {
+
+	private Optional<String> cachedValue = Optional.empty();
+
+	protected ServiceInstanceUri(Object... values) {
+		super(AAIObjectType.SERVICE_INSTANCE, values);
+	}
+	protected ServiceInstanceUri(UriBuilder builder, Optional<String> cachedValue, Object... values) {
+		super(AAIObjectType.SERVICE_INSTANCE, builder, values);
+		this.cachedValue = cachedValue;
+	}
+	protected String getSerivceInstance(Object id) throws AAIUriNotFoundException, AAIPayloadException {
+		if (!this.getCachedValue().isPresent()) {
+			AAIResourceUri serviceInstanceUri = AAIUriFactory.createNodesUri(AAIObjectType.SERVICE_INSTANCE, id);
+			CustomQuery query = new CustomQuery(Collections.singletonList(serviceInstanceUri));
+			String resultJson;
+			try {
+				resultJson = this.getQueryClient().query(Format.PATHED, query);
+			} catch (ResponseProcessingException e) {
+				if (e.getCause() instanceof BadRequestException) {
+					throw new AAIUriNotFoundException("Service instance " + id + " not found at: " + serviceInstanceUri.build());
+				} else {
+					throw e;
+				}
+			}
+			try {
+				cachedValue = extractRelatedLink(resultJson);
+				if (!cachedValue.isPresent()) {
+					throw new AAIUriNotFoundException("Service instance " + id + " not found at: " + serviceInstanceUri.build());
+				}
+			} catch (IOException e) {
+				throw new AAIPayloadException("could not map payload: " + resultJson, e);
+			}
+			
+		}
+		
+		return this.getCachedValue().get();
+	}
+	
+	protected Optional<String> extractRelatedLink(String jsonString) throws IOException {
+		Optional<String> result;
+		ObjectMapper mapper = new ObjectMapper();
+		
+			Results<Map<String, String>> results = mapper.readValue(jsonString, new TypeReference<Results<Map<String, String>>>(){});
+			if (results.getResult().size() == 1) {
+				String uriString = results.getResult().get(0).get("resource-link");
+				URI uri = UriBuilder.fromUri(uriString).build();
+				String rawPath = uri.getRawPath();
+			result = Optional.of(rawPath.replaceAll("/aai/v\\d+", ""));
+			} else if (results.getResult().isEmpty()) {
+			result = Optional.empty();
+			} else {
+				throw new IllegalStateException("more than one result returned");
+			}
+	
+		return result;
+	}
+	
+	protected Optional<String> getCachedValue() {
+		return this.cachedValue;
+	}
+
+	@Override
+	public URI build() {
+		try {
+		if (this.values.length == 1) {
+			String uri = getSerivceInstance(this.values[0]);
+			Map<String, String> map = getURIKeys(uri);
+			return super.build(map.values().toArray(values));
+		}
+		} catch (AAIUriNotFoundException | AAIPayloadException e) {
+			throw new AAIUriComputationException(e);
+		}
+		return super.build();
+	}
+	
+	@Override
+	public ServiceInstanceUri clone() {
+		return new ServiceInstanceUri(this.internalURI.clone(), this.getCachedValue(), values);
+	}
+	
+	protected AAIQueryClient getQueryClient() {
+		return new AAIQueryClient();
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/SimpleUri.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/SimpleUri.java
new file mode 100644
index 0000000..f3e6fad
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/SimpleUri.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.core.UriBuilder;
+
+import org.openecomp.mso.client.aai.AAIObjectPlurals;
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.entities.uri.parsers.UriParser;
+import org.openecomp.mso.client.aai.entities.uri.parsers.UriParserSpringImpl;
+import org.springframework.web.util.UriUtils;
+
+public class SimpleUri implements AAIResourceUri {
+
+	protected UriBuilder internalURI;
+	protected final static String relationshipAPI = "/relationship-list/relationship";
+	protected final static String relatedTo = "/related-to";
+	protected final Object[] values;
+	protected final AAIObjectType type;
+	protected final AAIObjectPlurals pluralType;
+	protected SimpleUri(AAIObjectType type, Object... values) {
+		this.type = type;
+		this.pluralType = null;
+		this.internalURI = UriBuilder.fromPath(this.getTemplate(type));
+		this.values = values;
+	}
+	protected SimpleUri(AAIObjectType type, URI uri) {
+		this.type = type;
+		this.pluralType = null;
+		this.internalURI = UriBuilder.fromPath(uri.getRawPath().replaceAll("/aai/v\\d+", ""));
+		this.values = new Object[0];
+	}
+	protected SimpleUri(AAIObjectType type, UriBuilder builder, Object... values) {
+		this.internalURI = builder;
+		this.values = values;
+		this.type = type;
+		this.pluralType = null;
+	}
+	protected SimpleUri(AAIObjectPlurals type, UriBuilder builder, Object... values) {
+		this.internalURI = builder;
+		this.values = values;
+		this.type = null;
+		this.pluralType = type;
+	}
+	protected SimpleUri(AAIObjectPlurals type) {
+		this.type = null;
+		this.pluralType = type;
+		this.internalURI = UriBuilder.fromPath(this.getTemplate(type));
+		this.values = new Object[0];
+	}
+	
+	@Override
+	public SimpleUri relationshipAPI() {
+		this.internalURI = internalURI.path(relationshipAPI);
+		return this;
+	}
+	
+	@Override
+	public SimpleUri relatedTo(AAIObjectPlurals plural) {
+		
+		this.internalURI = internalURI.path(relatedTo).path(plural.partialUri());
+		return this;
+	}
+	@Override
+	public SimpleUri relatedTo(AAIObjectType type, String... values) {
+		this.internalURI = internalURI.path(relatedTo).path(UriBuilder.fromPath(type.partialUri()).build(values).toString());
+		return this;
+	}
+	
+	@Override
+	public SimpleUri resourceVersion(String version) {
+		this.internalURI = internalURI.queryParam("resource-version", version);
+		return this;
+	}
+	
+	@Override
+	public SimpleUri queryParam(String name, String... values) {
+		this.internalURI = internalURI.queryParam(name, values);
+		return this;
+	}
+	
+	@Override
+	public URI build() {
+		return build(this.values);
+	}
+	
+	protected URI build(Object... values) {
+		//This is a workaround because resteasy does not encode URIs correctly
+		final String[] encoded = new String[values.length];
+		for (int i = 0; i < values.length; i++) {
+			try {
+				encoded[i] = UriUtils.encode(values[i].toString(), StandardCharsets.UTF_8.toString());
+			} catch (UnsupportedEncodingException e) {
+				encoded[i] = values[i].toString();
+			}
+		}
+		return internalURI.buildFromEncoded(encoded);
+	}
+	
+	@Override
+	public Map<String, String> getURIKeys() {
+		return this.getURIKeys(this.build().toString());
+	}
+	
+	protected Map<String, String> getURIKeys(String uri) {
+		UriParser parser;
+		if (this.type != null) {
+			if (!("".equals(this.getTemplate(type)))) {
+				parser = new UriParserSpringImpl(this.getTemplate(type));
+			} else {
+				return new HashMap<>();
+			}
+		} else {
+			parser = new UriParserSpringImpl(this.getTemplate(pluralType));
+		}
+		
+		
+		return parser.parse(uri);
+	}
+	
+	@Override
+	public SimpleUri clone() {
+		if (this.type != null) {
+			return new SimpleUri(this.type, this.internalURI.clone(), values);
+		} else {
+			return new SimpleUri(this.pluralType, this.internalURI.clone(), values);
+		}
+	}
+	
+	@Override
+	public AAIObjectType getObjectType() {
+		return this.type;
+	}
+	
+	@Override
+	public boolean equals(Object o) {
+		if (o instanceof AAIUri) {
+			return this.build().equals(((AAIUri)o).build());
+		}
+		return false;
+	}
+	@Override
+	public SimpleUri depth(Depth depth) {
+		this.internalURI.queryParam("depth", depth.toString());
+		return this;
+	}
+	@Override
+	public SimpleUri nodesOnly(boolean nodesOnly) {
+		if (nodesOnly) {
+			this.internalURI.queryParam("nodes-only", "");
+		}
+		return this;
+	}
+	
+	protected String getTemplate(AAIObjectType type) {
+		return type.uriTemplate();
+	}
+	
+	protected String getTemplate(AAIObjectPlurals type) {
+		return type.uriTemplate();
+	}
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/parsers/UriParser.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/parsers/UriParser.java
new file mode 100644
index 0000000..8e37d59
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/parsers/UriParser.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri.parsers;
+
+import java.util.Map;
+import java.util.Set;
+
+public interface UriParser {
+  public Set<String> getVariables();
+  public Map<String, String> parse(final String uri);
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/parsers/UriParserSpringImpl.java b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/parsers/UriParserSpringImpl.java
new file mode 100644
index 0000000..75f9005
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/entities/uri/parsers/UriParserSpringImpl.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.entities.uri.parsers;
+import java.io.UnsupportedEncodingException;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.springframework.web.util.UriTemplate;
+import org.springframework.web.util.UriUtils;
+
+public class UriParserSpringImpl implements UriParser {
+
+  private final UriTemplate uriTemplate;
+
+  public UriParserSpringImpl(final String template) {
+    this.uriTemplate = new UriTemplate(template);
+  }
+
+  @Override
+  public Map<String, String> parse(final String uri) {
+    final boolean match = this.uriTemplate.matches(uri);
+    if (!match) {
+      return new LinkedHashMap<>();
+    }
+    return Collections.unmodifiableMap(decodeParams(this.uriTemplate.match(uri)));
+  }
+
+  @Override
+  public Set<String> getVariables() {
+    return Collections.unmodifiableSet(new LinkedHashSet<String>(this.uriTemplate.getVariableNames()));
+  }
+  
+  protected Map<String, String> decodeParams(Map<String, String> map) {
+	  final Map<String, String> result = new LinkedHashMap<>();
+	  
+	  for (Entry<String, String> entry : map.entrySet()) {
+		  try {
+			result.put(entry.getKey(), UriUtils.decode(entry.getValue(), "UTF-8"));
+		} catch (UnsupportedEncodingException e) {
+			result.put(entry.getKey(), "");
+		}
+	  }
+	  
+	  return result;
+  }
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIPayloadException.java b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIPayloadException.java
new file mode 100644
index 0000000..3584220
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIPayloadException.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.exceptions;
+
+public class AAIPayloadException extends Exception {
+
+	private static final long serialVersionUID = -5712783905947711065L;
+	
+	public AAIPayloadException(Throwable t) {
+		super(t);
+	}
+	
+	public AAIPayloadException(String s, Throwable t) {
+		super(s, t);
+	}
+	
+	public AAIPayloadException(String s) {
+		super(s);
+	}
+	
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIUriComputationException.java b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIUriComputationException.java
new file mode 100644
index 0000000..4d9f320
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIUriComputationException.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.exceptions;
+
+public class AAIUriComputationException extends RuntimeException {
+
+	private static final long serialVersionUID = 5187931752227522034L;
+
+	public AAIUriComputationException(String s) {
+		super(s);
+	}
+	
+	public AAIUriComputationException(Throwable t) {
+		super(t);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIUriNotFoundException.java b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIUriNotFoundException.java
new file mode 100644
index 0000000..3e37394
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/AAIUriNotFoundException.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.exceptions;
+
+public class AAIUriNotFoundException extends Exception {
+	private static final long serialVersionUID = 2789643165122257833L;
+
+	public AAIUriNotFoundException(String message) {
+		super(message);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/exceptions/BulkProcessFailed.java b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/BulkProcessFailed.java
new file mode 100644
index 0000000..ea64f54
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/exceptions/BulkProcessFailed.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.exceptions;
+
+public class BulkProcessFailed extends Exception {
+
+	public BulkProcessFailed(String message) {
+		super(message);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIOperationalEnvironment.java b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIOperationalEnvironment.java
new file mode 100644
index 0000000..f044e2a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIOperationalEnvironment.java
@@ -0,0 +1,159 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.objects;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"operational-environment-id",
+"operational-environment-name",
+"operational-environment-type",
+"operational-environment-status",
+"tenant-context",
+"workload-context",
+"resource-version"
+})
+public class AAIOperationalEnvironment {
+
+@JsonProperty("operational-environment-id")
+private String operationalEnvironmentId;
+@JsonProperty("operational-environment-name")
+private String operationalEnvironmentName;
+@JsonProperty("operational-environment-type")
+private String operationalEnvironmentType;
+@JsonProperty("operational-environment-status")
+private String operationalEnvironmentStatus;
+@JsonProperty("tenant-context")
+private String tenantContext;
+@JsonProperty("workload-context")
+private String workloadContext;
+@JsonProperty("resource-version")
+private String resourceVersion;
+
+@JsonProperty("operational-environment-id")
+public String getOperationalEnvironmentId() {
+return operationalEnvironmentId;
+ }
+
+@JsonProperty("operational-environment-id")
+public void setOperationalEnvironmentId(String operationalEnvironmentId) {
+this.operationalEnvironmentId = operationalEnvironmentId;
+ }
+
+public AAIOperationalEnvironment withOperationalEnvironmentId(String operationalEnvironmentId) {
+this.operationalEnvironmentId = operationalEnvironmentId;
+return this;
+ }
+
+@JsonProperty("operational-environment-name")
+public String getOperationalEnvironmentName() {
+return operationalEnvironmentName;
+ }
+
+@JsonProperty("operational-environment-name")
+public void setOperationalEnvironmentName(String operationalEnvironmentName) {
+this.operationalEnvironmentName = operationalEnvironmentName;
+ }
+
+public AAIOperationalEnvironment withOperationalEnvironmentName(String operationalEnvironmentName) {
+this.operationalEnvironmentName = operationalEnvironmentName;
+return this;
+ }
+
+@JsonProperty("operational-environment-type")
+public String getOperationalEnvironmentType() {
+return operationalEnvironmentType;
+ }
+
+@JsonProperty("operational-environment-type")
+public void setOperationalEnvironmentType(String operationalEnvironmentType) {
+this.operationalEnvironmentType = operationalEnvironmentType;
+ }
+
+public AAIOperationalEnvironment withOperationalEnvironmentType(String operationalEnvironmentType) {
+this.operationalEnvironmentType = operationalEnvironmentType;
+return this;
+ }
+
+@JsonProperty("operational-environment-status")
+public String getOperationalEnvironmentStatus() {
+return operationalEnvironmentStatus;
+ }
+
+@JsonProperty("operational-environment-status")
+public void setOperationalEnvironmentStatus(String operationalEnvironmentStatus) {
+this.operationalEnvironmentStatus = operationalEnvironmentStatus;
+ }
+
+public AAIOperationalEnvironment withOperationalEnvironmentStatus(String operationalEnvironmentStatus) {
+this.operationalEnvironmentStatus = operationalEnvironmentStatus;
+return this;
+ }
+
+@JsonProperty("tenant-context")
+public String getTenantContext() {
+return tenantContext;
+ }
+
+@JsonProperty("tenant-context")
+public void setTenantContext(String tenantContext) {
+this.tenantContext = tenantContext;
+ }
+
+public AAIOperationalEnvironment withTenantContext(String tenantContext) {
+this.tenantContext = tenantContext;
+return this;
+ }
+
+@JsonProperty("workload-context")
+public String getWorkloadContext() {
+return workloadContext;
+ }
+
+@JsonProperty("workload-context")
+public void setWorkloadContext(String workloadContext) {
+this.workloadContext = workloadContext;
+ }
+
+public AAIOperationalEnvironment withWorkloadContext(String workloadContext) {
+this.workloadContext = workloadContext;
+return this;
+ }
+
+@JsonProperty("resource-version")
+public String getResourceVersion() {
+return resourceVersion;
+ }
+
+@JsonProperty("resource-version")
+public void setResourceVersion(String resourceVersion) {
+this.resourceVersion = resourceVersion;
+ }
+
+public AAIOperationalEnvironment withResourceVersion(String resourceVersion) {
+this.resourceVersion = resourceVersion;
+return this;
+ }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIOwningEntity.java b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIOwningEntity.java
new file mode 100644
index 0000000..b0b3d06
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIOwningEntity.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.objects;
+
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.entities.AAIEntityObject;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class AAIOwningEntity implements AAIEntityObject {
+	
+	@JsonProperty("owning-entity-name")
+	private String owningEntityName;
+	
+	@JsonProperty("owning-entity-id")
+	private String owningEntityId;
+	
+	public String getOwningEntityName() {
+		return owningEntityName;
+	}
+
+	public void setOwningEntityName(String owningEntityName) {
+		this.owningEntityName = owningEntityName;
+	}
+	
+	public String getOwningEntityId() {
+		return owningEntityId;
+	}
+
+	public void setOwningEntityId(String owningEntityId) {
+		this.owningEntityId = owningEntityId;
+	}
+	
+	public AAIOwningEntity withOwningEntity(String owningEntityName, String owningEntityId) {
+		this.setOwningEntityName(owningEntityName);
+		this.setOwningEntityId(owningEntityId);
+		return this;
+	}
+
+	@Override
+	public AAIResourceUri getUri() {
+		final AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.OWNING_ENTITY, this.owningEntityId);
+		return uri;
+	}
+	
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIProject.java b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIProject.java
new file mode 100644
index 0000000..34f715d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIProject.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.objects;
+
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.entities.AAIEntityObject;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class AAIProject implements AAIEntityObject {
+	
+	@JsonProperty("project-name")
+	private String projectName;
+	
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+	
+	public AAIProject withProjectName(String projectName) {
+		this.setProjectName(projectName);
+		return this;
+	}
+
+	@Override
+	public AAIResourceUri getUri() {
+		final AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, this.projectName);
+		return uri;
+	}
+	
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIServiceInstance.java b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIServiceInstance.java
new file mode 100644
index 0000000..dbb34fc
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/aai/objects/AAIServiceInstance.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.aai.objects;
+
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.entities.AAIEntityObject;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class AAIServiceInstance implements AAIEntityObject {
+	
+	@JsonProperty("service-instance-id")
+	private String serviceInstanceId;
+	@JsonProperty("service-instance-name")
+	private String serviceInstanceName;	
+	@JsonProperty("service-type")
+	private String serviceType;
+	@JsonProperty("service-role")
+	private String serviceRole;
+	@JsonProperty("orchestration-status")
+	private String oStatus;
+	@JsonProperty("model-invariant-id")
+	private String modelInvariantUuid;
+	@JsonProperty("model-version-id")
+	private String modelUuid;
+	@JsonProperty("environment-context")
+	private String environmentContext;
+	@JsonProperty("workload-context")
+	private String workloadContext;
+	
+	public String getServiceInstanceName() {
+		return serviceInstanceName;
+	}
+
+	public void setServiceInstanceName(String serviceInstanceName) {
+		this.serviceInstanceName = serviceInstanceName;
+	}
+
+	public String getServiceType() {
+		return serviceType;
+	}
+
+	public void setServiceType(String serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	public String getServiceRole() {
+		return serviceRole;
+	}
+
+	public void setServiceRole(String serviceRole) {
+		this.serviceRole = serviceRole;
+	}
+
+	public String getoStatus() {
+		return oStatus;
+	}
+
+	public void setoStatus(String oStatus) {
+		this.oStatus = oStatus;
+	}
+
+	public String getModelInvariantUuid() {
+		return modelInvariantUuid;
+	}
+
+	public void setModelInvariantUuid(String modelInvariantUuid) {
+		this.modelInvariantUuid = modelInvariantUuid;
+	}
+
+	public String getModelUuid() {
+		return modelUuid;
+	}
+
+	public void setModelUuid(String modelUuid) {
+		this.modelUuid = modelUuid;
+	}
+
+	public String getEnvironmentContext() {
+		return environmentContext;
+	}
+
+	public void setEnvironmentContext(String environmentContext) {
+		this.environmentContext = environmentContext;
+	}
+
+	public String getWorkloadContext() {
+		return workloadContext;
+	}
+
+	public void setWorkloadContext(String workloadContext) {
+		this.workloadContext = workloadContext;
+	}
+
+	public String getServiceInstanceId() {
+		return serviceInstanceId;
+	}
+
+	public void setServiceInstanceId(String serviceInstanceId) {
+		this.serviceInstanceId = serviceInstanceId;
+	}
+	
+	public AAIServiceInstance withServiceInstance(String serviceInstanceId) {
+		this.setServiceInstanceId(serviceInstanceId);
+		return this;
+	}
+
+	@Override
+	public AAIResourceUri getUri() {
+		final AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, this.serviceInstanceId);
+		return uri;
+	}
+	
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/defaultproperties/DefaultAAIPropertiesImpl.java b/common/src/main/java/org/openecomp/mso/client/defaultproperties/DefaultAAIPropertiesImpl.java
new file mode 100644
index 0000000..354d47a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/defaultproperties/DefaultAAIPropertiesImpl.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.defaultproperties;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.openecomp.mso.client.aai.AAIProperties;
+import org.openecomp.mso.client.aai.AAIVersion;
+
+public class DefaultAAIPropertiesImpl implements AAIProperties {
+
+	
+	final Map<Object, Object> props;
+	public DefaultAAIPropertiesImpl() {
+		File initialFile = new File("src/test/resources/aai.properties");
+		Map<Object, Object> temp;
+		try {
+		    InputStream targetStream = new FileInputStream(initialFile);
+			Properties properties = new Properties();
+			properties.load(targetStream);
+			temp = properties;
+		} catch (IOException e) {
+			temp = new HashMap<>();
+		}
+		this.props = temp;
+
+	}
+	@Override
+	public URL getEndpoint() throws MalformedURLException {
+		return new URL(props.get("aai.endpoint").toString());
+	}
+
+	@Override
+	public String getSystemName() {
+		return "MSO";
+	}
+	@Override
+	public AAIVersion getDefaultVersion() {
+		return AAIVersion.LATEST;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/defaultproperties/DefaultDmaapPropertiesImpl.java b/common/src/main/java/org/openecomp/mso/client/defaultproperties/DefaultDmaapPropertiesImpl.java
new file mode 100644
index 0000000..1345286
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/defaultproperties/DefaultDmaapPropertiesImpl.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.defaultproperties;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.openecomp.mso.client.dmaap.DmaapProperties;
+
+public class DefaultDmaapPropertiesImpl implements DmaapProperties {
+
+	private final Map<String, String> properties;
+	public DefaultDmaapPropertiesImpl() throws IOException {
+		File initialFile = new File("src/test/resources/dmaap.properties");
+	    InputStream targetStream = new FileInputStream(initialFile);
+		Properties properties = new Properties();
+		properties.load(targetStream);
+		this.properties = new HashMap<>();
+		properties.forEach((key, value) -> this.properties.put((String)key, (String)value));
+	}
+	@Override
+	public Map<String, String> getProperties() {
+		return this.properties;
+	} 
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java b/common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java
new file mode 100644
index 0000000..77d67d7
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.defaultproperties;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.openecomp.mso.client.policy.PolicyRestProperties;
+
+public class PolicyRestPropertiesImpl implements PolicyRestProperties {
+
+	
+	final Map<Object, Object> props;
+	public PolicyRestPropertiesImpl() {
+		File initialFile = new File("src/test/resources/policy.properties");
+		InputStream targetStream;
+		Map<Object, Object> temp;
+		try {
+			targetStream = new FileInputStream(initialFile);
+			Properties properties = new Properties();
+			properties.load(targetStream);
+			temp = properties;
+		} catch (IOException e) {
+			temp = new HashMap<>();
+		}
+		this.props = temp;
+		
+	}
+	@Override
+	public URL getEndpoint() {
+		try {
+			return new URL((String)props.getOrDefault("policy.endpoint", ""));
+		} catch (MalformedURLException e) {
+			return null;
+		}
+	}
+
+	@Override
+	public String getSystemName() {
+		return "MSO";
+	}
+	
+	public String getClientAuth() {
+		return (String)props.get("policy.client.auth");
+	}
+	
+	public String getAuth() {
+		return (String)props.get("policy.auth");
+	}
+	
+	public String getEnvironment() {
+		return (String)props.get("policy.environment");
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/Consumer.java b/common/src/main/java/org/openecomp/mso/client/dmaap/Consumer.java
new file mode 100644
index 0000000..0e00ae5
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/Consumer.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.dmaap;
+
+public interface Consumer {
+
+	public Iterable<String> fetch();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapClient.java b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapClient.java
new file mode 100644
index 0000000..aabeb8a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapClient.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.dmaap;
+
+import java.io.IOException;
+import java.util.Base64;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Properties;
+
+import org.openecomp.mso.client.defaultproperties.DefaultDmaapPropertiesImpl;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public abstract class DmaapClient {
+	
+	protected final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
+	protected final Map<String, String> msoProperties;
+	protected final Properties properties;
+	public DmaapClient(String filepath) throws IOException {
+		Resource resource = new ClassPathResource(filepath);
+		DmaapProperties dmaapProperties = DmaapPropertiesLoader.getInstance().getNewImpl();
+		if (dmaapProperties == null) {
+			auditLogger.error("No RestProperty implementation found on classpath, loading default");
+			dmaapProperties = new DefaultDmaapPropertiesImpl();
+		}
+		this.msoProperties = dmaapProperties.getProperties();
+		this.properties = new Properties();
+		this.properties.load(resource.getInputStream());
+		this.properties.put("password", this.deobfuscatePassword(this.getPassword()));
+		this.properties.put("username", this.getUserName());
+		this.properties.put("topic", this.getTopic());
+		if (this.getHost().isPresent()) {
+			this.properties.put("host", this.getHost().get());
+		}
+	}
+	protected String deobfuscatePassword(String password) {
+		
+		try {
+			return new String(Base64.getDecoder().decode(password.getBytes()));
+		} catch(IllegalArgumentException iae) {
+			
+			return password;
+		}
+	}
+	
+	
+	public abstract String getUserName();
+	public abstract String getPassword();
+	public abstract String getTopic();
+	public abstract Optional<String> getHost();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapConsumer.java b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapConsumer.java
new file mode 100644
index 0000000..0339516
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapConsumer.java
@@ -0,0 +1,131 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.dmaap;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import org.openecomp.mso.client.dmaap.exceptions.DMaaPConsumerFailure;
+import org.openecomp.mso.client.dmaap.exceptions.ExceededMaximumPollingTime;
+import org.openecomp.mso.client.dmaap.rest.RestConsumer;
+
+import com.google.common.base.Stopwatch;
+
+public abstract class DmaapConsumer extends DmaapClient {
+
+	public DmaapConsumer() throws FileNotFoundException, IOException {
+		super("dmaap/default-consumer.properties");
+	}
+	
+	public Consumer getConsumer() throws FileNotFoundException, IOException {
+		return new RestConsumer(this.properties);
+	}
+	public boolean consume() throws Exception {
+		
+		Consumer mrConsumer = this.getConsumer();
+		int iterations = 0;
+		boolean accepted = false;
+		Stopwatch stopwatch = Stopwatch.createUnstarted();
+		try {
+			while (this.continuePolling()) {
+				if (stopwatch.elapsed(TimeUnit.MILLISECONDS) >= this.getMaximumElapsedTime()) {
+					final String message = "exceeded maximum retries on " + this.getRequestId() + " on " + this.getTopic();
+					auditLogger.error(message);
+					throw new ExceededMaximumPollingTime(message);
+				}
+				stopwatch.start();
+				Iterable<String> itr = mrConsumer.fetch();
+				stopwatch.stop();
+				for (String message : itr) {
+					if (!accepted && this.isAccepted(message)) {
+						auditLogger.info("accepted message found for " + this.getRequestId() + " on " + this.getTopic());
+						accepted = true;
+					} 
+					if (accepted) {
+						if (this.isFailure(message)) {
+							this.stopProcessingMessages();
+							auditLogger.info("received dmaap message: " + message);
+							final String errorMsg = "failure received from dmaap topic " + this.getTopic();
+							auditLogger.error(errorMsg);
+							throw new DMaaPConsumerFailure(errorMsg);
+						} else {
+							auditLogger.info("received dmaap message: " + message);
+							this.processMessage(message);
+						}
+					}
+				}
+				iterations++;
+			}
+			return true;
+		} catch (Exception e ) {
+			throw e;
+		} finally {
+			if (stopwatch.isRunning()) {
+				stopwatch.stop();
+			}
+		}
+	}
+	
+	/**
+	 * Should this consumer continue to consume messages from the topic?
+	 * @return
+	 */
+	public abstract boolean continuePolling();
+	/**
+	 * Process a message from a DMaaP topic
+	 * 
+	 * @param message
+	 * @throws Exception
+	 */
+	public abstract void processMessage(String message) throws Exception;
+	/**
+	 * Has the request been accepted by the receiving system?
+	 * Should the consumer move to processing messages?
+	 * 
+	 * @param message
+	 * @return
+	 */
+	public abstract boolean isAccepted(String message);
+	/**
+	 * has the request failed?
+	 * 
+	 * @param message
+	 * @return
+	 */
+	public abstract boolean isFailure(String message);
+	/**
+	 * The request id to filter messages on
+	 * @return
+	 */
+	public abstract String getRequestId();
+	/**
+	 * Logic that defines when the consumer should stop processing messages
+	 */
+	public abstract void stopProcessingMessages();
+	
+	/**
+	 * time in milliseconds
+	 */
+	public int getMaximumElapsedTime() {
+		return 180000;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapProperties.java b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapProperties.java
new file mode 100644
index 0000000..7bdd7df
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapProperties.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.dmaap;
+
+import java.util.Map;
+
+public interface DmaapProperties {
+
+	/**
+	 * A map of strings which contains the properties for a dmaap client
+	 * @return
+	 */
+	public Map<String, String> getProperties();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java
new file mode 100644
index 0000000..3c86199
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapPropertiesLoader.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.dmaap;
+
+import java.util.ServiceLoader;
+
+public class DmaapPropertiesLoader {
+
+	private final ServiceLoader<DmaapProperties> services;
+	private DmaapPropertiesLoader() {
+		services = ServiceLoader.load(DmaapProperties.class);
+	}
+	
+	private static class Helper {
+		private static final DmaapPropertiesLoader INSTANCE = new DmaapPropertiesLoader();
+	}
+	
+	public static DmaapPropertiesLoader getInstance() {
+		return Helper.INSTANCE;
+	}
+	public DmaapProperties getImpl() {
+		return this.getImpl(false);
+	}
+	public DmaapProperties getNewImpl() {
+		return this.getImpl(true);
+	}
+	private DmaapProperties getImpl(boolean forceNewInstance) {
+		for (DmaapProperties service : services) {
+			if (forceNewInstance) {
+				try {
+					return service.getClass().newInstance();
+				} catch (InstantiationException | IllegalAccessException e) {
+					/* all spi implementations must provide a public
+					 * no argument constructor
+					 */
+				}
+			} else {
+				return service;
+			}
+		}
+		
+		return null;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapPublisher.java b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapPublisher.java
new file mode 100644
index 0000000..d2752c5
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/DmaapPublisher.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.dmaap;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import org.openecomp.mso.client.dmaap.rest.RestPublisher;
+
+public abstract class DmaapPublisher extends DmaapClient {
+	
+	private long seconds;
+	private final Publisher publisher;
+	public DmaapPublisher() throws FileNotFoundException, IOException {
+		super("dmaap/default-consumer.properties");
+		this.publisher = new RestPublisher(properties);
+		this.seconds = 20;
+		
+	}
+	
+	public DmaapPublisher(long seconds) throws FileNotFoundException, IOException {
+		this();
+		this.seconds = seconds;
+	}
+	
+	public void send(String json) throws IOException, InterruptedException {
+		auditLogger.info("publishing message to dmaap topic " + this.getTopic() + ": " + json);
+		publisher.send(json);
+		//publisher.close(seconds, TimeUnit.SECONDS);
+	}
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/Publisher.java b/common/src/main/java/org/openecomp/mso/client/dmaap/Publisher.java
new file mode 100644
index 0000000..ed1b3f3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/Publisher.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.dmaap;
+
+public interface Publisher {
+
+	public void send(String json);
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/exceptions/DMaaPConsumerFailure.java b/common/src/main/java/org/openecomp/mso/client/dmaap/exceptions/DMaaPConsumerFailure.java
new file mode 100644
index 0000000..b1ae2b7
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/exceptions/DMaaPConsumerFailure.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.dmaap.exceptions;
+
+public class DMaaPConsumerFailure extends Exception {
+
+	private static final long serialVersionUID = 2499229901897110362L;
+
+	public DMaaPConsumerFailure() {
+		super();
+	}
+	
+	public DMaaPConsumerFailure(String message) {
+		super(message);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/exceptions/ExceededMaximumPollingTime.java b/common/src/main/java/org/openecomp/mso/client/dmaap/exceptions/ExceededMaximumPollingTime.java
new file mode 100644
index 0000000..c0cda6b
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/exceptions/ExceededMaximumPollingTime.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.dmaap.exceptions;
+
+public class ExceededMaximumPollingTime extends RuntimeException  {
+
+	private static final long serialVersionUID = 2331207691092906423L;
+
+	public ExceededMaximumPollingTime() {
+		super();
+	}
+	
+	public ExceededMaximumPollingTime(String message) {
+		super(message);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java
new file mode 100644
index 0000000..ad744ad
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/DMaaPRestClient.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.dmaap.rest;
+
+import java.net.URL;
+import java.util.Base64;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.client.ClientResponseFilter;
+
+import org.openecomp.mso.client.ResponseExceptionMapperImpl;
+import org.openecomp.mso.client.policy.RestClient;
+
+public class DMaaPRestClient  extends RestClient {
+
+	private final String username;
+	private final String password;
+	public DMaaPRestClient(URL url, String contentType, String username, String password) {
+		super(url, UUID.randomUUID(), contentType);
+		this.username = username;
+		this.password = password;
+	}
+
+	@Override
+	protected void initializeHeaderMap(Map<String, String> headerMap) {
+		headerMap.put("Authorization", "Basic " + Base64.getEncoder().encodeToString((username + ":" + password).getBytes()));
+	}
+
+	@Override
+	protected Optional<ClientResponseFilter> addResponseFilter() {
+		return Optional.of(new ResponseExceptionMapperImpl());
+	}
+
+	@Override
+	public RestClient addRequestId(UUID requestId) {
+		return this;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/rest/PropertiesBean.java b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/PropertiesBean.java
new file mode 100644
index 0000000..e661dd8
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/PropertiesBean.java
@@ -0,0 +1,131 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.dmaap.rest;
+
+import java.util.Properties;
+
+public class PropertiesBean {
+
+	private String username;
+	private String password;
+	private String environment;
+	private String partition;
+	private String contentType;
+	private String host;
+	private String topic;
+	private String timeout;
+	
+	
+	public PropertiesBean(Properties properties) {
+		this.withUsername(properties.getProperty("username"))
+		.withPassword(properties.getProperty("password"))
+		.withTopic(properties.getProperty("topic"))
+		.withEnvironment(properties.getProperty("environment"))
+		.withHost(properties.getProperty("host"))
+		.withTimeout(properties.getProperty("timeout", "20000"))
+		.withPartition(properties.getProperty("partition"))
+		.withContentType(properties.getProperty("contentType", "application/json"));
+	}
+	public String getUsername() {
+		return username;
+	}
+	public void setUsername(String username) {
+		this.username = username;
+	}
+	public PropertiesBean withUsername(String username) {
+		this.username = username;
+		return this;
+	}
+	public String getPassword() {
+		return password;
+	}
+	public void setPassword(String password) {
+		this.password = password;
+	}
+	public PropertiesBean withPassword(String password) {
+		this.password = password;
+		return this;
+	}
+	public String getEnvironment() {
+		return environment;
+	}
+	public void setEnvironment(String environment) {
+		this.environment = environment;
+	}
+	public PropertiesBean withEnvironment(String environment) {
+		this.environment = environment;
+		return this;
+	}
+	public String getPartition() {
+		return partition;
+	}
+	public void setPartition(String partition) {
+		this.partition = partition;
+	}
+	public PropertiesBean withPartition(String partition) {
+		this.partition = partition;
+		return this;
+	}
+	public String getContentType() {
+		return contentType;
+	}
+	public void setContentType(String contentType) {
+		this.contentType = contentType;
+	}
+	public PropertiesBean withContentType(String contentType) {
+		this.contentType = contentType;
+		return this;
+	}
+	public String getHost() {
+		return host;
+	}
+	public void setHost(String host) {
+		this.host = host;
+	}
+	public PropertiesBean withHost(String host) {
+		this.host = host;
+		return this;
+	}
+	public String getTopic() {
+		return topic;
+	}
+	public void setTopic(String topic) {
+		this.topic = topic;
+	}
+	public PropertiesBean withTopic(String topic) {
+		this.topic = topic;
+		return this;
+	}
+	public String getTimeout() {
+		return timeout;
+	}
+	public void setTimeout(String timeout) {
+		this.timeout = timeout;
+	}
+	public PropertiesBean withTimeout(String timeout) {
+		this.timeout = timeout;
+		return this;
+	}
+	
+	
+	
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/rest/RestConsumer.java b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/RestConsumer.java
new file mode 100644
index 0000000..c2fb6f6
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/RestConsumer.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ 
+package org.openecomp.mso.client.dmaap.rest;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.Properties;
+
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.UriBuilder;
+
+import org.openecomp.mso.client.dmaap.Consumer;
+import org.openecomp.mso.client.policy.RestClient;
+
+public class RestConsumer implements Consumer {
+
+	private final RestClient client;
+	public RestConsumer(Properties properties) {
+		PropertiesBean bean = new PropertiesBean(properties);
+		client = new DMaaPRestClient(this.createURL(bean), bean.getContentType(), bean.getUsername(), bean.getPassword());
+	}
+	
+	private URL createURL(PropertiesBean properties) {
+		try {
+			return UriBuilder.fromUri(properties.getHost())
+					.path("events").path(properties.getTopic())
+					.path(properties.getPartition())
+					.path("consumer1")
+					.queryParam("timeout",  properties.getTimeout()).build().toURL();
+		} catch (MalformedURLException e) {
+			throw new RuntimeException(e);
+		}
+	}
+	
+	@Override
+	public Iterable<String> fetch() {
+		
+		return client.get(new GenericType<List<String>>() {});
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/dmaap/rest/RestPublisher.java b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/RestPublisher.java
new file mode 100644
index 0000000..3dab12f
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/dmaap/rest/RestPublisher.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.dmaap.rest;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.core.UriBuilderException;
+
+import org.openecomp.mso.client.dmaap.Publisher;
+import org.openecomp.mso.client.policy.RestClient;
+
+public class RestPublisher implements Publisher {
+
+	private final RestClient client;
+
+	public RestPublisher(Properties properties) {
+		PropertiesBean bean = new PropertiesBean(properties);
+		client = new DMaaPRestClient(this.createURL(bean), bean.getContentType(), bean.getUsername(), bean.getPassword());
+	}
+	
+	private URL createURL(PropertiesBean properties) {
+		try {
+			return UriBuilder.fromUri(properties.getHost())
+					.path("events").path(properties.getTopic())
+					.queryParam("timeout",  properties.getTimeout()).build().toURL();
+		} catch (MalformedURLException e) {
+			throw new RuntimeException(e);
+		}
+	}
+	
+	@Override
+	public void send(String json) {
+		client.post(json);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/exceptions/SDNOException.java b/common/src/main/java/org/openecomp/mso/client/exceptions/SDNOException.java
new file mode 100644
index 0000000..d55f962
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/exceptions/SDNOException.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.exceptions;
+
+
+public class SDNOException extends Exception {
+
+	private static final long serialVersionUID = 6189163383568887383L;
+
+	public SDNOException() {
+		super();
+	}
+	
+	public SDNOException(String string) {
+		super("SDN-O exception: " + string);
+	}
+
+	public SDNOException(Exception e) {
+		super(e);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/GRMAction.java b/common/src/main/java/org/openecomp/mso/client/grm/GRMAction.java
new file mode 100644
index 0000000..50544ba
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/GRMAction.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm;
+
+public enum GRMAction {
+	
+	FIND_RUNNING("findRunning"),
+	ADD("add");
+
+	private final String action;
+
+	GRMAction(String action) {
+		this.action = action;
+	}
+
+	public String getAction() {
+		return action;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/GRMClient.java b/common/src/main/java/org/openecomp/mso/client/grm/GRMClient.java
new file mode 100644
index 0000000..5b5f269
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/GRMClient.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm;
+
+import org.openecomp.mso.client.grm.beans.ServiceEndPointList;
+import org.openecomp.mso.client.grm.beans.ServiceEndPointLookup;
+import org.openecomp.mso.client.grm.beans.ServiceEndPointLookupRequest;
+import org.openecomp.mso.client.grm.beans.ServiceEndPointRequest;
+import org.openecomp.mso.client.grm.beans.VersionLookup;
+import org.openecomp.mso.client.grm.exceptions.GRMClientCallFailed;
+
+public class GRMClient {
+
+	public String findRunningServicesAsString(String name, int majorVersion, String env) throws Exception {
+		
+		ServiceEndPointLookupRequest request = buildServiceEndPointlookupRequest(name, majorVersion, env);		
+		try {
+			GRMRestInvoker invoker = this.getInvoker(GRMAction.FIND_RUNNING);
+			return invoker.post(request, String.class);
+		}
+		catch(Exception e) {
+			throw new GRMClientCallFailed("Call to GRM findRunning failed: " + e.getMessage(), e);
+		}
+	}
+	
+	public ServiceEndPointList findRunningServices(String name, int majorVersion, String env) throws Exception {
+		
+		ServiceEndPointLookupRequest request = buildServiceEndPointlookupRequest(name, majorVersion, env);
+		try {
+			GRMRestInvoker invoker = this.getInvoker(GRMAction.FIND_RUNNING);
+			return invoker.post(request, ServiceEndPointList.class);
+		}
+		catch(Exception e) {
+			throw new GRMClientCallFailed("Call to GRM findRunning failed: " + e.getMessage(), e);
+		}
+	}
+	
+	protected ServiceEndPointLookupRequest buildServiceEndPointlookupRequest(String name, int majorVersion, String env) {
+		VersionLookup version = new VersionLookup();
+		version.setMajor(majorVersion);
+		
+		ServiceEndPointLookup endpoint = new ServiceEndPointLookup();
+		endpoint.setName(name);
+		endpoint.setVersion(version);
+		
+		ServiceEndPointLookupRequest request = new ServiceEndPointLookupRequest();
+		request.setServiceEndPoint(endpoint);
+		request.setEnv(env);
+		return request;
+	}
+	
+	public void addServiceEndPoint(ServiceEndPointRequest request) throws Exception {
+		try {
+			GRMRestInvoker invoker = this.getInvoker(GRMAction.ADD);
+			invoker.post(request);
+		}
+		catch(Exception e) {
+			throw new GRMClientCallFailed("Call to GRM addServiceEndPoint failed: " + e.getMessage(), e);
+		}
+	}
+	
+	protected GRMRestInvoker getInvoker(GRMAction action) {
+		return new GRMRestInvoker(action);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/GRMDefaultPropertiesImpl.java b/common/src/main/java/org/openecomp/mso/client/grm/GRMDefaultPropertiesImpl.java
new file mode 100644
index 0000000..3bdc769
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/GRMDefaultPropertiesImpl.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.ws.rs.core.MediaType;
+
+public class GRMDefaultPropertiesImpl implements GRMProperties {
+	
+	public GRMDefaultPropertiesImpl() {
+	}
+
+	@Override
+	public URL getEndpoint() throws MalformedURLException {
+		return new URL("http://localhost:28090");
+	}
+
+	@Override
+	public String getSystemName() {
+		return "MSO";
+	}
+
+	@Override
+	public String getDefaultVersion() {
+		return "v1";
+	}
+
+	@Override
+	public String getUsername() {
+		return "gmruser";
+	}
+
+	@Override
+	public String getPassword() {
+		return "cGFzc3dvcmQ=";
+	}
+
+	@Override
+	public String getContentType() {
+		return MediaType.APPLICATION_JSON;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/GRMProperties.java b/common/src/main/java/org/openecomp/mso/client/grm/GRMProperties.java
new file mode 100644
index 0000000..6fbbb21
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/GRMProperties.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm;
+
+import org.openecomp.mso.client.RestProperties;
+
+public interface GRMProperties extends RestProperties {
+	public String getDefaultVersion();
+	public String getUsername();
+	public String getPassword();
+	public String getContentType();
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/GRMPropertiesLoader.java b/common/src/main/java/org/openecomp/mso/client/grm/GRMPropertiesLoader.java
new file mode 100644
index 0000000..9323e22
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/GRMPropertiesLoader.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm;
+
+import java.util.Iterator;
+import java.util.ServiceLoader;
+
+public class GRMPropertiesLoader {
+
+	private final ServiceLoader<GRMProperties> services;
+	private GRMPropertiesLoader() {
+		services = ServiceLoader.load(GRMProperties.class);
+	}
+	
+	private static class Helper {
+		private static final GRMPropertiesLoader INSTANCE = new GRMPropertiesLoader();
+	}
+	
+	public static GRMPropertiesLoader getInstance() {
+		return Helper.INSTANCE;
+	}
+	
+	public GRMProperties getImpl() {
+		Iterator<GRMProperties> propertyImpls = services.iterator();
+		while (propertyImpls.hasNext()) {
+			return propertyImpls.next();
+		}
+		return null;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/GRMRestClient.java b/common/src/main/java/org/openecomp/mso/client/grm/GRMRestClient.java
new file mode 100644
index 0000000..7a81d7e
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/GRMRestClient.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm;
+
+
+import java.net.URI;
+import java.util.Base64;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.client.ClientResponseFilter;
+
+import org.openecomp.mso.client.ResponseExceptionMapperImpl;
+import org.openecomp.mso.client.RestProperties;
+import org.openecomp.mso.client.policy.RestClient;
+
+public class GRMRestClient extends RestClient {
+
+	private final String username;
+	private final String password;
+	
+	public GRMRestClient(RestProperties props, URI path, String username, String password) {
+		super(props, UUID.randomUUID(), Optional.of(path));
+		this.username = username;
+		this.password = password;
+	}
+
+	@Override
+	protected void initializeHeaderMap(Map<String, String> headerMap) {
+		headerMap.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(new String(username + ":" + password).getBytes()));
+	}
+
+	@Override
+	protected Optional<ClientResponseFilter> addResponseFilter() {
+		return Optional.of(new ResponseExceptionMapperImpl());
+	}
+
+	@Override
+	public RestClient addRequestId(UUID requestId) {
+		return this;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/GRMRestInvoker.java b/common/src/main/java/org/openecomp/mso/client/grm/GRMRestInvoker.java
new file mode 100644
index 0000000..d706be3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/GRMRestInvoker.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm;
+
+import java.net.URI;
+import java.util.Base64;
+
+import javax.ws.rs.core.UriBuilder;
+import org.openecomp.mso.client.RestPropertiesLoader;
+import org.openecomp.mso.client.policy.RestClient;
+
+public class GRMRestInvoker {
+	
+	private final RestClient client;
+	private final GRMProperties properties;
+	
+	public GRMRestInvoker(GRMAction action) {
+		GRMProperties props = GRMPropertiesLoader.getInstance().getImpl();
+		if (props == null) {
+			props = new GRMDefaultPropertiesImpl();
+		}
+		this.properties = props;
+		this.client = new GRMRestClient(this.properties, this.createURI(action), this.properties.getUsername(), this.decode(this.properties.getPassword()));
+	}
+	
+	private URI createURI(GRMAction action) {
+		return UriBuilder.fromUri("/GRMLWPService")
+				.path(this.properties.getDefaultVersion())
+				.path("serviceEndPoint")
+				.path(action.getAction())
+				.build();
+	}
+	
+	private String decode(String cred) {
+		try {
+			return new String(Base64.getDecoder().decode(cred.getBytes()));
+		} 
+		catch(IllegalArgumentException iae) {
+			return cred;
+		}
+	}
+	
+	private RestClient getClient() {
+		return this.client;
+	}
+	
+	public void post(Object obj) {
+		getClient().post(obj);
+	}
+	
+	public <T> T post(Object obj, Class<T> resultClass) {
+		return getClient().post(obj, resultClass);
+	}
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/OperationalInfo.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/OperationalInfo.java
new file mode 100644
index 0000000..c5f5a7a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/OperationalInfo.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "createdBy", "updatedBy", "createdTimestamp", "updatedTimestamp" })
+public class OperationalInfo {
+
+	@JsonProperty("createdBy")
+	private String createdBy;
+	@JsonProperty("updatedBy")
+	private String updatedBy;
+	@JsonProperty("createdTimestamp")
+	private String createdTimestamp;
+	@JsonProperty("updatedTimestamp")
+	private String updatedTimestamp;
+
+	@JsonProperty("createdBy")
+	public String getCreatedBy() {
+		return createdBy;
+	}
+
+	@JsonProperty("createdBy")
+	public void setCreatedBy(String createdBy) {
+		this.createdBy = createdBy;
+	}
+
+	@JsonProperty("updatedBy")
+	public String getUpdatedBy() {
+		return updatedBy;
+	}
+
+	@JsonProperty("updatedBy")
+	public void setUpdatedBy(String updatedBy) {
+		this.updatedBy = updatedBy;
+	}
+
+	@JsonProperty("createdTimestamp")
+	public String getCreatedTimestamp() {
+		return createdTimestamp;
+	}
+
+	@JsonProperty("createdTimestamp")
+	public void setCreatedTimestamp(String createdTimestamp) {
+		this.createdTimestamp = createdTimestamp;
+	}
+
+	@JsonProperty("updatedTimestamp")
+	public String getUpdatedTimestamp() {
+		return updatedTimestamp;
+	}
+
+	@JsonProperty("updatedTimestamp")
+	public void setUpdatedTimestamp(String updatedTimestamp) {
+		this.updatedTimestamp = updatedTimestamp;
+	}
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/Property.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/Property.java
new file mode 100644
index 0000000..eff1659
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/Property.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "name", "value" })
+public class Property {
+
+	@JsonProperty("name")
+	private String name;
+	@JsonProperty("value")
+	private String value;
+
+	@JsonProperty("name")
+	public String getName() {
+		return name;
+	}
+
+	@JsonProperty("name")
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@JsonProperty("value")
+	public String getValue() {
+		return value;
+	}
+
+	@JsonProperty("value")
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPoint.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPoint.java
new file mode 100644
index 0000000..a753afb
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPoint.java
@@ -0,0 +1,247 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import java.io.Serializable;
+import java.util.List;
+
+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 com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "serviceEndPoint")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "name", "version", "hostAddress", "listenPort", "latitude", "longitude", "registrationTime",
+		"expirationTime", "contextPath", "routeOffer", "statusInfo", "eventStatusInfo", "validatorStatusInfo",
+		"operationalInfo", "protocol", "properties", "disableType" })
+public class ServiceEndPoint implements Serializable {
+
+	private static final long serialVersionUID = -1594441352549128491L;
+	
+	@JsonProperty("name")
+	private String name;
+	@JsonProperty("version")
+	private Version version;
+	@JsonProperty("hostAddress")
+	private String hostAddress;
+	@JsonProperty("listenPort")
+	private String listenPort;
+	@JsonProperty("latitude")
+	private String latitude;
+	@JsonProperty("longitude")
+	private String longitude;
+	@JsonProperty("registrationTime")
+	private String registrationTime;
+	@JsonProperty("expirationTime")
+	private String expirationTime;
+	@JsonProperty("contextPath")
+	private String contextPath;
+	@JsonProperty("routeOffer")
+	private String routeOffer;
+	@JsonProperty("statusInfo")
+	private Status statusInfo;
+	@JsonProperty("eventStatusInfo")
+	private Status eventStatusInfo;
+	@JsonProperty("validatorStatusInfo")
+	private Status validatorStatusInfo;
+	@JsonProperty("operationalInfo")
+	private OperationalInfo operationalInfo;
+	@JsonProperty("protocol")
+	private String protocol;
+	@JsonProperty("properties")
+	private List<Property> properties = null;
+	@JsonProperty("disableType")
+	private List<Object> disableType = null;
+
+	@JsonProperty("name")
+	public String getName() {
+		return name;
+	}
+
+	@JsonProperty("name")
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@JsonProperty("version")
+	public Version getVersion() {
+		return version;
+	}
+
+	@JsonProperty("version")
+	public void setVersion(Version version) {
+		this.version = version;
+	}
+
+	@JsonProperty("hostAddress")
+	public String getHostAddress() {
+		return hostAddress;
+	}
+
+	@JsonProperty("hostAddress")
+	public void setHostAddress(String hostAddress) {
+		this.hostAddress = hostAddress;
+	}
+
+	@JsonProperty("listenPort")
+	public String getListenPort() {
+		return listenPort;
+	}
+
+	@JsonProperty("listenPort")
+	public void setListenPort(String listenPort) {
+		this.listenPort = listenPort;
+	}
+
+	@JsonProperty("latitude")
+	public String getLatitude() {
+		return latitude;
+	}
+
+	@JsonProperty("latitude")
+	public void setLatitude(String latitude) {
+		this.latitude = latitude;
+	}
+
+	@JsonProperty("longitude")
+	public String getLongitude() {
+		return longitude;
+	}
+
+	@JsonProperty("longitude")
+	public void setLongitude(String longitude) {
+		this.longitude = longitude;
+	}
+
+	@JsonProperty("registrationTime")
+	public String getRegistrationTime() {
+		return registrationTime;
+	}
+
+	@JsonProperty("registrationTime")
+	public void setRegistrationTime(String registrationTime) {
+		this.registrationTime = registrationTime;
+	}
+
+	@JsonProperty("expirationTime")
+	public String getExpirationTime() {
+		return expirationTime;
+	}
+
+	@JsonProperty("expirationTime")
+	public void setExpirationTime(String expirationTime) {
+		this.expirationTime = expirationTime;
+	}
+
+	@JsonProperty("contextPath")
+	public String getContextPath() {
+		return contextPath;
+	}
+
+	@JsonProperty("contextPath")
+	public void setContextPath(String contextPath) {
+		this.contextPath = contextPath;
+	}
+
+	@JsonProperty("routeOffer")
+	public String getRouteOffer() {
+		return routeOffer;
+	}
+
+	@JsonProperty("routeOffer")
+	public void setRouteOffer(String routeOffer) {
+		this.routeOffer = routeOffer;
+	}
+
+	@JsonProperty("statusInfo")
+	public Status getStatusInfo() {
+		return statusInfo;
+	}
+
+	@JsonProperty("statusInfo")
+	public void setStatusInfo(Status statusInfo) {
+		this.statusInfo = statusInfo;
+	}
+
+	@JsonProperty("eventStatusInfo")
+	public Status getEventStatusInfo() {
+		return eventStatusInfo;
+	}
+
+	@JsonProperty("eventStatusInfo")
+	public void setEventStatusInfo(Status eventStatusInfo) {
+		this.eventStatusInfo = eventStatusInfo;
+	}
+
+	@JsonProperty("validatorStatusInfo")
+	public Status getValidatorStatusInfo() {
+		return validatorStatusInfo;
+	}
+
+	@JsonProperty("validatorStatusInfo")
+	public void setValidatorStatusInfo(Status validatorStatusInfo) {
+		this.validatorStatusInfo = validatorStatusInfo;
+	}
+
+	@JsonProperty("operationalInfo")
+	public OperationalInfo getOperationalInfo() {
+		return operationalInfo;
+	}
+
+	@JsonProperty("operationalInfo")
+	public void setOperationalInfo(OperationalInfo operationalInfo) {
+		this.operationalInfo = operationalInfo;
+	}
+
+	@JsonProperty("protocol")
+	public String getProtocol() {
+		return protocol;
+	}
+
+	@JsonProperty("protocol")
+	public void setProtocol(String protocol) {
+		this.protocol = protocol;
+	}
+
+	@JsonProperty("properties")
+	public List<Property> getProperties() {
+		return properties;
+	}
+
+	@JsonProperty("properties")
+	public void setProperties(List<Property> properties) {
+		this.properties = properties;
+	}
+
+	@JsonProperty("disableType")
+	public List<Object> getDisableType() {
+		return disableType;
+	}
+
+	@JsonProperty("disableType")
+	public void setDisableType(List<Object> disableType) {
+		this.disableType = disableType;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointList.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointList.java
new file mode 100644
index 0000000..0faf1fb
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointList.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "serviceEndPointList" })
+public class ServiceEndPointList {
+
+	@JsonProperty("serviceEndPointList")
+	private List<ServiceEndPoint> serviceEndPointList = null;
+
+	@JsonProperty("serviceEndPointList")
+	public List<ServiceEndPoint> getServiceEndPointList() {
+		return serviceEndPointList;
+	}
+
+	@JsonProperty("serviceEndPointList")
+	public void setServiceEndPointList(List<ServiceEndPoint> serviceEndPointList) {
+		this.serviceEndPointList = serviceEndPointList;
+	}
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointLookup.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointLookup.java
new file mode 100644
index 0000000..37e2379
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointLookup.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "serviceEndPoint")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "name", "version"})
+public class ServiceEndPointLookup implements Serializable {
+
+	private static final long serialVersionUID = 8867758152519088615L;
+
+	@JsonProperty("name")
+	private String name;
+	@JsonProperty("version")
+	private VersionLookup version;
+
+	@JsonProperty("name")
+	public String getName() {
+		return name;
+	}
+
+	@JsonProperty("name")
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@JsonProperty("version")
+	public VersionLookup getVersion() {
+		return version;
+	}
+
+	@JsonProperty("version")
+	public void setVersion(VersionLookup version) {
+		this.version = version;
+	}	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointLookupRequest.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointLookupRequest.java
new file mode 100644
index 0000000..fc1992c
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointLookupRequest.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "serviceEndPoint", "env" })
+public class ServiceEndPointLookupRequest {
+
+	@JsonProperty("serviceEndPoint")
+	private ServiceEndPointLookup serviceEndPoint;
+	@JsonProperty("env")
+	private String env;
+
+	@JsonProperty("serviceEndPoint")
+	public ServiceEndPointLookup getServiceEndPoint() {
+		return serviceEndPoint;
+	}
+
+	@JsonProperty("serviceEndPoint")
+	public void setServiceEndPoint(ServiceEndPointLookup serviceEndPoint) {
+		this.serviceEndPoint = serviceEndPoint;
+	}
+
+	@JsonProperty("env")
+	public String getEnv() {
+		return env;
+	}
+
+	@JsonProperty("env")
+	public void setEnv(String env) {
+		this.env = env;
+	}
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointRequest.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointRequest.java
new file mode 100644
index 0000000..324fe9f
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/ServiceEndPointRequest.java
@@ -0,0 +1,63 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+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.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "serviceEndPoint", "env" })
+public class ServiceEndPointRequest {
+
+	@JsonProperty("serviceEndPoint")
+	private ServiceEndPoint serviceEndPoint;
+	@JsonProperty("env")
+	private String env;
+
+	@JsonProperty("serviceEndPoint")
+	public ServiceEndPoint getServiceEndPoint() {
+		return serviceEndPoint;
+	}
+
+	@JsonProperty("serviceEndPoint")
+	public void setServiceEndPoint(ServiceEndPoint serviceEndPoint) {
+		this.serviceEndPoint = serviceEndPoint;
+	}
+
+	@JsonProperty("env")
+	public String getEnv() {
+		return env;
+	}
+
+	@JsonProperty("env")
+	public void setEnv(String env) {
+		this.env = env;
+	}
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/Status.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/Status.java
new file mode 100644
index 0000000..3c66c50
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/Status.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "status", "statusReasonCode", "statusReasonDescription", "statusCheckTime" })
+public class Status {
+
+	@JsonProperty("status")
+	private String status;
+	@JsonProperty("statusReasonCode")
+	private String statusReasonCode;
+	@JsonProperty("statusReasonDescription")
+	private String statusReasonDescription;
+	@JsonProperty("statusCheckTime")
+	private String statusCheckTime;
+
+	@JsonProperty("status")
+	public String getStatus() {
+		return status;
+	}
+
+	@JsonProperty("status")
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	@JsonProperty("statusReasonCode")
+	public String getStatusReasonCode() {
+		return statusReasonCode;
+	}
+
+	@JsonProperty("statusReasonCode")
+	public void setStatusReasonCode(String statusReasonCode) {
+		this.statusReasonCode = statusReasonCode;
+	}
+
+	@JsonProperty("statusReasonDescription")
+	public String getStatusReasonDescription() {
+		return statusReasonDescription;
+	}
+
+	@JsonProperty("statusReasonDescription")
+	public void setStatusReasonDescription(String statusReasonDescription) {
+		this.statusReasonDescription = statusReasonDescription;
+	}
+
+	@JsonProperty("statusCheckTime")
+	public String getStatusCheckTime() {
+		return statusCheckTime;
+	}
+
+	@JsonProperty("statusCheckTime")
+	public void setStatusCheckTime(String statusCheckTime) {
+		this.statusCheckTime = statusCheckTime;
+	}
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/Version.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/Version.java
new file mode 100644
index 0000000..1d4d959
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/Version.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "major", "minor", "patch" })
+public class Version {
+
+	@JsonProperty("major")
+	private Integer major;
+	@JsonProperty("minor")
+	private Integer minor;
+	@JsonProperty("patch")
+	private String patch;
+
+	@JsonProperty("major")
+	public Integer getMajor() {
+		return major;
+	}
+
+	@JsonProperty("major")
+	public void setMajor(Integer major) {
+		this.major = major;
+	}
+
+	@JsonProperty("minor")
+	public Integer getMinor() {
+		return minor;
+	}
+
+	@JsonProperty("minor")
+	public void setMinor(Integer minor) {
+		this.minor = minor;
+	}
+
+	@JsonProperty("patch")
+	public String getPatch() {
+		return patch;
+	}
+
+	@JsonProperty("patch")
+	public void setPatch(String patch) {
+		this.patch = patch;
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/beans/VersionLookup.java b/common/src/main/java/org/openecomp/mso/client/grm/beans/VersionLookup.java
new file mode 100644
index 0000000..b9d5a63
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/beans/VersionLookup.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.beans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({ "major" })
+public class VersionLookup implements Serializable {
+
+	private static final long serialVersionUID = 3802602253627725770L;
+
+	@JsonProperty("major")
+	private Integer major;
+	
+	@JsonProperty("major")
+	public Integer getMajor() {
+		return major;
+	}
+
+	@JsonProperty("major")
+	public void setMajor(Integer major) {
+		this.major = major;
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/grm/exceptions/GRMClientCallFailed.java b/common/src/main/java/org/openecomp/mso/client/grm/exceptions/GRMClientCallFailed.java
new file mode 100644
index 0000000..60de572
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/grm/exceptions/GRMClientCallFailed.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.grm.exceptions;
+
+public class GRMClientCallFailed extends Exception {
+
+	private static final long serialVersionUID = -8714110346844078779L;
+
+	public GRMClientCallFailed(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/CommonObjectMapperProvider.java b/common/src/main/java/org/openecomp/mso/client/policy/CommonObjectMapperProvider.java
new file mode 100644
index 0000000..4f41b64
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/CommonObjectMapperProvider.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import javax.ws.rs.ext.ContextResolver;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+public class CommonObjectMapperProvider implements ContextResolver<ObjectMapper> {
+
+	final ObjectMapper mapper;
+
+	public CommonObjectMapperProvider() {
+		
+		mapper = new ObjectMapper();
+		mapper.setSerializationInclusion(Include.NON_NULL);
+        mapper.enable(MapperFeature.USE_ANNOTATIONS);
+		mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+		mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
+		mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+	}
+
+	@Override
+	public ObjectMapper getContext(Class<?> type) {
+		return mapper;
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/DecisionAttributes.java b/common/src/main/java/org/openecomp/mso/client/policy/DecisionAttributes.java
new file mode 100644
index 0000000..7b765eb
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/DecisionAttributes.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "ServiceType", "VNFType", "BB_ID", "WorkStep", "ErrorCode" })
+public class DecisionAttributes {
+
+	@JsonProperty("ServiceType")
+	private String serviceType;
+	@JsonProperty("VNFType")
+	private String vNFType;
+	@JsonProperty("BB_ID")
+	private String bbID;
+	@JsonProperty("WorkStep")
+	private String workStep;
+	@JsonProperty("ErrorCode")
+	private String errorCode;
+
+	@JsonProperty("ServiceType")
+	public String getServiceType() {
+		return serviceType;
+	}
+
+	@JsonProperty("ServiceType")
+	public void setServiceType(String serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	@JsonProperty("VNFType")
+	public String getVNFType() {
+		return vNFType;
+	}
+
+	@JsonProperty("VNFType")
+	public void setVNFType(String vNFType) {
+		this.vNFType = vNFType;
+	}
+
+	@JsonProperty("BB_ID")
+	public String getBBID() {
+		return bbID;
+	}
+
+	@JsonProperty("BB_ID")
+	public void setBBID(String bBID) {
+		this.bbID = bBID;
+	}
+
+	@JsonProperty("WorkStep")
+	public String getWorkStep() {
+		return workStep;
+	}
+
+	@JsonProperty("WorkStep")
+	public void setWorkStep(String workStep) {
+		this.workStep = workStep;
+	}
+
+	@JsonProperty("ErrorCode")
+	public String getErrorCode() {
+		return errorCode;
+	}
+
+	@JsonProperty("ErrorCode")
+	public void setErrorCode(String errorCode) {
+		this.errorCode = errorCode;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/JettisonStyleMapperProvider.java b/common/src/main/java/org/openecomp/mso/client/policy/JettisonStyleMapperProvider.java
new file mode 100644
index 0000000..19579e8
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/JettisonStyleMapperProvider.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import javax.ws.rs.ext.ContextResolver;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+public class JettisonStyleMapperProvider implements ContextResolver<ObjectMapper> {
+	
+	final ObjectMapper mapper;
+
+	public JettisonStyleMapperProvider() {
+		
+		mapper = new ObjectMapper();
+		mapper.setSerializationInclusion(Include.NON_NULL);
+        mapper.enable(MapperFeature.USE_ANNOTATIONS);
+		mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+		mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+		mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+	}
+
+	@Override
+	public ObjectMapper getContext(Class<?> type) {
+		return mapper;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java b/common/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java
new file mode 100644
index 0000000..b040696
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/LoggingFilter.java
@@ -0,0 +1,157 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilterOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
+import javax.annotation.Priority;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.ClientRequestContext;
+import javax.ws.rs.client.ClientRequestFilter;
+import javax.ws.rs.client.ClientResponseContext;
+import javax.ws.rs.client.ClientResponseFilter;
+import javax.ws.rs.ext.Provider;
+import javax.ws.rs.ext.WriterInterceptor;
+import javax.ws.rs.ext.WriterInterceptorContext;
+
+import org.openecomp.mso.logger.MsoLogger;
+
+
+@Provider
+@Priority(0)
+public class LoggingFilter implements ClientRequestFilter, ClientResponseFilter, WriterInterceptor {
+
+	private static final MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+	private static final String ENTITY_STREAM_PROPERTY = "LoggingFilter.entityStream";
+	private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
+	private final int maxEntitySize;
+
+	public LoggingFilter() {
+		maxEntitySize = 1024 * 1024;
+	}
+
+	public LoggingFilter(int maxPayloadSize) {
+		this.maxEntitySize = Integer.min(maxPayloadSize, 1024 * 1024);
+	}
+
+	private void log(StringBuilder sb) {
+		logger.debug(sb.toString());
+	}
+
+	protected InputStream logInboundEntity(final StringBuilder b, InputStream stream, final Charset charset)
+			throws IOException {
+		if (!stream.markSupported()) {
+			stream = new BufferedInputStream(stream);
+		}
+		stream.mark(maxEntitySize + 1);
+		final byte[] entity = new byte[maxEntitySize + 1];
+		final int entitySize = stream.read(entity);
+		if (entitySize != -1) {
+			b.append(new String(entity, 0, Math.min(entitySize, maxEntitySize), charset));
+		}
+		if (entitySize > maxEntitySize) {
+			b.append("...more...");
+		}
+		b.append('\n');
+		stream.reset();
+		return stream;
+	}
+
+	@Override
+	public void filter(ClientRequestContext requestContext) throws IOException {
+		if (requestContext.hasEntity()) {
+			final OutputStream stream = new LoggingStream(requestContext.getEntityStream());
+			requestContext.setEntityStream(stream);
+			requestContext.setProperty(ENTITY_STREAM_PROPERTY, stream);
+		}
+		String method = formatMethod(requestContext);
+		log(new StringBuilder("Making " + method + " request to: " + requestContext.getUri() + "\nRequest Headers: " + requestContext.getHeaders().toString()));
+
+	}
+
+	@Override
+	public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {
+		final StringBuilder sb = new StringBuilder();
+		if (responseContext.hasEntity()) {
+			responseContext.setEntityStream(logInboundEntity(sb, responseContext.getEntityStream(), DEFAULT_CHARSET));
+			String method = formatMethod(requestContext);
+			log(sb.insert(0, "Response from " + method + ": " + requestContext.getUri() + "\nResponse Headers: " + responseContext.getHeaders().toString()));
+		}
+	}
+
+	@Override
+	public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException {
+		final LoggingStream stream = (LoggingStream) context.getProperty(ENTITY_STREAM_PROPERTY);
+		context.proceed();
+		if (stream != null) {
+			log(stream.getStringBuilder(DEFAULT_CHARSET));
+		}
+	}
+
+	private class LoggingStream extends FilterOutputStream {
+
+		private final StringBuilder sb = new StringBuilder();
+		private final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+		LoggingStream(OutputStream out) {
+			super(out);
+		}
+
+		StringBuilder getStringBuilder(Charset charset) {
+			// write entity to the builder
+			final byte[] entity = baos.toByteArray();
+
+			sb.append(new String(entity, 0, entity.length, charset));
+			if (entity.length > maxEntitySize) {
+				sb.append("...more...");
+			}
+			sb.append('\n');
+
+			return sb;
+		}
+
+		@Override
+		public void write(final int i) throws IOException {
+			if (baos.size() <= maxEntitySize) {
+				baos.write(i);
+			}
+			out.write(i);
+		}
+	}
+	
+	private String formatMethod(ClientRequestContext requestContext) {
+		String method = requestContext.getHeaderString("X-HTTP-Method-Override");
+		if (method == null) {
+			method = requestContext.getMethod();
+		} else {
+			method = requestContext.getMethod() + " (overridden to " + method + ")";
+		}
+		
+		return method;
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/PolicyClient.java b/common/src/main/java/org/openecomp/mso/client/policy/PolicyClient.java
new file mode 100644
index 0000000..defd11b
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/PolicyClient.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import org.openecomp.mso.client.policy.entities.AllowedTreatments;
+import org.openecomp.mso.client.policy.entities.DictionaryData;
+import org.openecomp.mso.client.policy.entities.PolicyDecision;
+
+public interface PolicyClient {
+
+	public PolicyDecision getDecision(String serviceType, String vnfType, String bbID, String workStep,
+			String errorCode);
+	
+	public DictionaryData getAllowedTreatments(String bbID, String workStep);
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/PolicyClientImpl.java b/common/src/main/java/org/openecomp/mso/client/policy/PolicyClientImpl.java
new file mode 100644
index 0000000..dc24b7c
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/PolicyClientImpl.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import org.openecomp.mso.client.RestPropertiesLoader;
+import org.openecomp.mso.client.defaultproperties.PolicyRestPropertiesImpl;
+import org.openecomp.mso.client.policy.entities.AllowedTreatments;
+import org.openecomp.mso.client.policy.entities.Bbid;
+import org.openecomp.mso.client.policy.entities.DecisionAttributes;
+import org.openecomp.mso.client.policy.entities.DictionaryData;
+import org.openecomp.mso.client.policy.entities.DictionaryItemsRequest;
+import org.openecomp.mso.client.policy.entities.DictionaryJson;
+import org.openecomp.mso.client.policy.entities.PolicyDecision;
+import org.openecomp.mso.client.policy.entities.PolicyDecisionRequest;
+import org.openecomp.mso.client.policy.entities.PolicyServiceType;
+import org.openecomp.mso.client.policy.entities.Workstep;
+
+import java.util.List;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public class PolicyClientImpl implements PolicyClient {
+
+	protected final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+	private PolicyRestProperties props;
+	public PolicyClientImpl() {
+		props = RestPropertiesLoader.getInstance().getNewImpl(PolicyRestProperties.class);
+		if (props == null) {
+			metricsLogger.error("No RestProperty.PolicyRestProperties implementation found on classpath");
+			props = new PolicyRestPropertiesImpl();
+		}
+	}
+	public PolicyDecision getDecision(String serviceType, String vnfType, String bbID, String workStep,
+			String errorCode) {
+		DecisionAttributes decisionAttributes = new DecisionAttributes();
+		decisionAttributes.setServiceType(serviceType);
+		decisionAttributes.setVNFType(vnfType);
+		decisionAttributes.setBBID(bbID);
+		decisionAttributes.setWorkStep(workStep);
+		decisionAttributes.setErrorCode(errorCode);
+
+		return this.getDecision(decisionAttributes);
+	}
+
+	private PolicyDecision getDecision(DecisionAttributes decisionAttributes) {
+		PolicyRestClient client = new PolicyRestClient(this.props, PolicyServiceType.GET_DECISION);
+		PolicyDecisionRequest decisionRequest = new PolicyDecisionRequest();
+		decisionRequest.setDecisionAttributes(decisionAttributes);
+		decisionRequest.setEcompcomponentName(RestClient.ECOMP_COMPONENT_NAME);
+		
+		return client.post(decisionRequest, PolicyDecision.class);
+	}
+	
+	public DictionaryData getAllowedTreatments(String bbID, String workStep)
+	{
+		PolicyRestClient client = new PolicyRestClient(this.props, PolicyServiceType.GET_DICTIONARY_ITEMS);
+		DictionaryItemsRequest dictionaryItemsRequest = new DictionaryItemsRequest();
+		dictionaryItemsRequest.setDictionaryType("Decision");
+		dictionaryItemsRequest.setDictionary("RainyDayTreatments");
+		final AllowedTreatments response = client.post(dictionaryItemsRequest, AllowedTreatments.class);
+		final DictionaryJson dictionaryJson = response.getDictionaryJson();
+		final List<DictionaryData> dictionaryDataList = dictionaryJson.getDictionaryDatas();
+		for(DictionaryData dictData : dictionaryDataList){
+			Bbid bBid = dictData.getBbid();
+			Workstep workstep = dictData.getWorkstep();
+			String bBidString = bBid.getString();
+			String workstepString = workstep.getString();
+			if(bbID.equals(bBidString) && workStep.equals(workstepString)){
+				return dictData;
+			}
+		}
+		metricsLogger.error("There is no AllowedTreatments with that specified parameter set");
+		return null;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/PolicyDecision.java b/common/src/main/java/org/openecomp/mso/client/policy/PolicyDecision.java
new file mode 100644
index 0000000..98c7e15
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/PolicyDecision.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "decision", "details" })
+public class PolicyDecision {
+
+	@JsonProperty("decision")
+	private String decision;
+	@JsonProperty("details")
+	private String details;
+
+	@JsonProperty("decision")
+	public String getDecision() {
+		return decision;
+	}
+
+	@JsonProperty("decision")
+	public void setDecision(String decision) {
+		this.decision = decision;
+	}
+
+	@JsonProperty("details")
+	public String getDetails() {
+		return details;
+	}
+
+	@JsonProperty("details")
+	public void setDetails(String details) {
+		this.details = details;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/PolicyDecisionRequest.java b/common/src/main/java/org/openecomp/mso/client/policy/PolicyDecisionRequest.java
new file mode 100644
index 0000000..c83fb19
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/PolicyDecisionRequest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "decisionAttributes", "ecompcomponentName" })
+public class PolicyDecisionRequest {
+
+	@JsonProperty("decisionAttributes")
+	private DecisionAttributes decisionAttributes;
+	@JsonProperty("ecompcomponentName")
+	private String ecompcomponentName;
+
+	@JsonProperty("decisionAttributes")
+	public DecisionAttributes getDecisionAttributes() {
+		return decisionAttributes;
+	}
+
+	@JsonProperty("decisionAttributes")
+	public void setDecisionAttributes(DecisionAttributes decisionAttributes) {
+		this.decisionAttributes = decisionAttributes;
+	}
+
+	@JsonProperty("ecompcomponentName")
+	public String getEcompcomponentName() {
+		return ecompcomponentName;
+	}
+
+	@JsonProperty("ecompcomponentName")
+	public void setEcompcomponentName(String ecompcomponentName) {
+		this.ecompcomponentName = ecompcomponentName;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/PolicyRestClient.java b/common/src/main/java/org/openecomp/mso/client/policy/PolicyRestClient.java
new file mode 100644
index 0000000..77fec34
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/PolicyRestClient.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import java.net.MalformedURLException;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.client.ClientResponseFilter;
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.core.UriBuilderException;
+
+import org.openecomp.mso.client.ResponseExceptionMapperImpl;
+import org.openecomp.mso.client.RestProperties;
+import org.openecomp.mso.client.policy.entities.PolicyServiceType;
+import org.springframework.stereotype.Service;
+
+@Service
+public class PolicyRestClient extends RestClient {
+
+	private static final UUID X_ECOMP_REQUESTID = UUID.randomUUID();
+	private final PolicyRestProperties properties;
+	public PolicyRestClient(PolicyRestProperties props, PolicyServiceType serviceType) {
+		super(props, UUID.randomUUID(), Optional.of(UriBuilder.fromPath(serviceType.toString()).build()));
+		this.properties = props;
+		this.getClient();
+	}
+
+	@Override
+	protected void initializeHeaderMap(Map<String, String> headerMap) {
+		headerMap.put("ClientAuth", properties.getClientAuth());
+		headerMap.put("Authorization", properties.getAuth());
+		headerMap.put("Environment", properties.getEnvironment());
+		this.addRequestId(X_ECOMP_REQUESTID);
+	}
+
+	@Override
+	protected Optional<ClientResponseFilter> addResponseFilter() {
+		return Optional.of(new ResponseExceptionMapperImpl());
+	}
+
+	@Override
+	public RestClient addRequestId(UUID requestId) {
+		this.headerMap.put("X-ECOMP-RequestID", requestId.toString());
+		return this;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/PolicyRestProperties.java b/common/src/main/java/org/openecomp/mso/client/policy/PolicyRestProperties.java
new file mode 100644
index 0000000..d89bd54
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/PolicyRestProperties.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Map;
+
+import org.openecomp.mso.client.RestProperties;
+
+public interface PolicyRestProperties extends RestProperties {
+	
+	public String getClientAuth();
+	public String getAuth();
+	public String getEnvironment();
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/RestClient.java b/common/src/main/java/org/openecomp/mso/client/policy/RestClient.java
new file mode 100644
index 0000000..4e6ffd1
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/RestClient.java
@@ -0,0 +1,227 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.ClientResponseFilter;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation.Builder;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.ext.ContextResolver;
+
+import org.apache.log4j.Logger;
+import org.openecomp.mso.client.RestProperties;
+import org.openecomp.mso.logger.MsoLogger;
+import org.springframework.stereotype.Service;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Service
+public abstract class RestClient {
+	protected static final String ECOMP_COMPONENT_NAME = "MSO";
+	
+	private static final int MAX_PAYLOAD_SIZE = 1024 * 1024;
+	private WebTarget webTarget;
+
+	protected final Map<String, String> headerMap;
+	protected final MsoLogger msoLogger;
+	protected URL host;
+	protected Optional<URI> path;
+	protected Logger logger;
+	protected String accept;
+	protected String contentType;
+	protected UUID requestId;
+
+	protected RestClient(RestProperties props, UUID requestId, Optional<URI> path) {
+		logger = Logger.getLogger(getClass().getName());
+		msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+		this.requestId = requestId;
+		headerMap = new HashMap<>();
+		try {
+			host = props.getEndpoint();
+		} catch (MalformedURLException e) {
+			logger.error("url not valid", e);
+			throw new RuntimeException(e);
+		}
+		
+		this.path = path;
+		initializeClient(getClient());
+	}
+
+	protected RestClient(RestProperties props, UUID requestId, Optional<URI> path, String accept, String contentType) {
+		this(props, requestId, path);
+		this.accept = accept;
+		this.contentType = contentType;
+		this.requestId = requestId;
+
+	}
+
+	protected RestClient(URL host, UUID requestId, String contentType) {
+		headerMap = new HashMap<>();
+		logger = Logger.getLogger(getClass().getName());
+		msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL);
+		this.path = Optional.empty();
+		this.host = host;
+		this.contentType = contentType;
+		this.requestId = requestId;
+		initializeClient(getClient());
+	}
+
+	/**
+	 * Override method to return false to disable logging.
+	 * 
+	 * @return true - to enable logging, false otherwise
+	 */
+	protected boolean enableLogging() {
+		return true;
+	}
+	
+	/**
+	 * Override method to return custom value for max payload size.
+	 * 
+	 * @return Default value for MAX_PAYLOAD_SIZE = 1024 * 1024
+	 */
+	protected int getMaxPayloadSize()
+	{
+		return MAX_PAYLOAD_SIZE;
+	}
+
+	protected Builder getBuilder() {
+
+		Builder builder = webTarget.request();
+		initializeHeaderMap(headerMap);
+
+		for (Entry<String, String> entry : headerMap.entrySet()) {
+			builder.header(entry.getKey(), entry.getValue());
+		}
+		return builder;
+	}
+
+	protected abstract void initializeHeaderMap(Map<String, String> headerMap);
+
+	protected abstract Optional<ClientResponseFilter> addResponseFilter();
+
+	public abstract RestClient addRequestId(UUID requestId);
+
+	protected ContextResolver<ObjectMapper> getMapper() {
+		return new CommonObjectMapperProvider();
+	}
+
+	protected String getAccept() {
+		return accept;
+	}
+
+	protected String getContentType() {
+		return contentType;
+	}
+
+	protected String getMergeContentType() {
+		return "application/merge-patch+json";
+	}
+
+	protected Client getClient() {
+		return ClientBuilder.newBuilder().build();
+	}
+
+	protected UUID getRequestId() {
+		return this.requestId;
+	}
+	protected void initializeClient(Client client) {
+		if (this.enableLogging()) {
+			client.register(logger).register(new LoggingFilter(this.getMaxPayloadSize()));
+		}
+		client.register(this.getMapper());
+		Optional<ClientResponseFilter> responseFilter = this.addResponseFilter();
+		responseFilter.ifPresent(clientResponseFilter -> client.register(clientResponseFilter));
+		webTarget = path.<WebTarget>map(uri -> client.target(UriBuilder.fromUri(host + uri.toString())))
+			.orElseGet(() -> client.target(host.toString()));
+		this.accept = MediaType.APPLICATION_JSON;
+		this.contentType = MediaType.APPLICATION_JSON;
+	}
+
+	public Response get() {
+		return this.getBuilder().accept(this.getAccept()).get();
+	}
+
+	public Response post(Object obj) {
+		return this.getBuilder().accept(this.getAccept()).post(Entity.entity(obj, this.getContentType()));
+	}
+
+	public Response patch(Object obj) {
+		return this.getBuilder().header("X-HTTP-Method-Override", "PATCH").accept(this.getAccept())
+				.post(Entity.entity(obj, this.getMergeContentType()));
+	}
+
+	public Response put(Object obj) {
+		return this.getBuilder().accept(this.getAccept()).put(Entity.entity(obj, this.getContentType()));
+	}
+
+	public Response delete() {
+		return this.getBuilder().accept(this.getAccept()).delete();
+	}
+
+	public Response delete(Object obj) {
+		return this.getBuilder().header("X-HTTP-Method-Override", "DELETE").accept(this.getAccept())
+				.put(Entity.entity(obj, this.getContentType()));
+	}
+
+	public <T> T get(Class<T> resultClass) {
+		return this.get().readEntity(resultClass);
+	}
+
+	public <T> T get(GenericType<T> resultClass) {
+		return this.get().readEntity(resultClass);
+	}
+
+	public <T> T post(Object obj, Class<T> resultClass) {
+		return this.post(obj).readEntity(resultClass);
+	}
+
+	public <T> T patch(Object obj, Class<T> resultClass) {
+		return this.patch(obj).readEntity(resultClass);
+	}
+
+	public <T> T put(Object obj, Class<T> resultClass) {
+		return this.put(obj).readEntity(resultClass);
+	}
+
+	public <T> T delete(Class<T> resultClass) {
+		return this.delete().readEntity(resultClass);
+	}
+	
+	public <T> T delete(Object obj, Class<T> resultClass) {
+		return this.delete(obj).readEntity(resultClass);
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/RestClientSSL.java b/common/src/main/java/org/openecomp/mso/client/policy/RestClientSSL.java
new file mode 100644
index 0000000..9216645
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/RestClientSSL.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy;
+
+import java.io.FileInputStream;
+import java.net.URI;
+import java.security.NoSuchAlgorithmException;
+import java.security.KeyStore;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.net.ssl.SSLContext;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+
+import org.openecomp.mso.client.RestProperties;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+
+public abstract class RestClientSSL extends RestClient {
+	
+	public static final String SSL_KEY_STORE_KEY = "javax.net.ssl.keyStore";
+	public static final String SSL_KEY_STORE_PASSWORD_KEY = "javax.net.ssl.keyStorePassword";
+	public static final String MSO_LOAD_SSL_CLIENT_KEYSTORE_KEY = "mso.load.ssl.client.keystore";
+	
+
+	protected RestClientSSL(RestProperties props, UUID requestId, Optional<URI> path) {
+		super(props, requestId, path);
+	}
+
+	protected RestClientSSL(RestProperties props, UUID requestId, Optional<URI> path, String accept, String contentType) {
+		super(props, requestId, path, accept, contentType);
+	}
+
+	@Override
+	protected Client getClient() {
+		
+		Client client = null;
+		try {
+			String loadSSLKeyStore = System.getProperty(RestClientSSL.MSO_LOAD_SSL_CLIENT_KEYSTORE_KEY);
+			if(loadSSLKeyStore != null && loadSSLKeyStore.equalsIgnoreCase("true")) {
+				KeyStore ks = getKeyStore();
+				if(ks != null) {
+					client = ClientBuilder.newBuilder().keyStore(ks, System.getProperty(RestClientSSL.SSL_KEY_STORE_PASSWORD_KEY)).build();
+					this.msoLogger.debug("RestClientSSL not using default SSL context - setting keystore here.");
+					return client;
+				}
+			}
+			//Use default SSL context 
+			client = ClientBuilder.newBuilder().sslContext(SSLContext.getDefault()).build();
+			this.msoLogger.debug("RestClientSSL using default SSL context!");
+		} catch (NoSuchAlgorithmException e) {
+			this.msoLogger.error(MessageEnum.APIH_GENERAL_EXCEPTION, "AAI", "Client init", MsoLogger.ErrorCode.UnknownError, "could not create SSL client", e);
+			throw new RuntimeException(e);
+		}
+		return client;
+	}
+	
+	private KeyStore getKeyStore() {
+		KeyStore ks = null;
+	    char[] password = System.getProperty(RestClientSSL.SSL_KEY_STORE_PASSWORD_KEY).toCharArray();
+	    FileInputStream fis = null;
+	    try {
+	    	ks = KeyStore.getInstance(KeyStore.getDefaultType());
+	        fis = new FileInputStream(System.getProperty(RestClientSSL.SSL_KEY_STORE_KEY));
+	        ks.load(fis, password);
+	    }
+	    catch(Exception e) {
+	    	return null;
+	    }
+	    finally {
+	        if (fis != null) {
+	            try { 
+	            	fis.close();
+	            }
+	            catch(Exception e) {}
+	        }
+	    }
+	    return ks;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/AllowedTreatments.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/AllowedTreatments.java
new file mode 100644
index 0000000..50db843
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/AllowedTreatments.java
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"dictionaryJson",
+"dictionaryData",
+"responseCode",
+"responseMessage"
+})
+public class  AllowedTreatments{
+
+@JsonProperty("dictionaryJson")
+private DictionaryJson dictionaryJson;
+@JsonProperty("dictionaryData")
+private Object dictionaryData;
+@JsonProperty("responseCode")
+private Integer responseCode;
+@JsonProperty("responseMessage")
+private String responseMessage;
+
+@JsonProperty("dictionaryJson")
+public DictionaryJson getDictionaryJson() {
+return dictionaryJson;
+ }
+
+@JsonProperty("dictionaryJson")
+public void setDictionaryJson(DictionaryJson dictionaryJson) {
+this.dictionaryJson = dictionaryJson;
+ }
+
+public AllowedTreatments withDictionaryJson(DictionaryJson dictionaryJson) {
+this.dictionaryJson = dictionaryJson;
+return this;
+ }
+
+@JsonProperty("dictionaryData")
+public Object getDictionaryData() {
+return dictionaryData;
+ }
+
+@JsonProperty("dictionaryData")
+public void setDictionaryData(Object dictionaryData) {
+this.dictionaryData = dictionaryData;
+ }
+
+public AllowedTreatments withDictionaryData(Object dictionaryData) {
+this.dictionaryData = dictionaryData;
+return this;
+ }
+
+@JsonProperty("responseCode")
+public Integer getResponseCode() {
+return responseCode;
+ }
+
+@JsonProperty("responseCode")
+public void setResponseCode(Integer responseCode) {
+this.responseCode = responseCode;
+ }
+
+public AllowedTreatments withResponseCode(Integer responseCode) {
+this.responseCode = responseCode;
+return this;
+ }
+
+@JsonProperty("responseMessage")
+public String getResponseMessage() {
+return responseMessage;
+ }
+
+@JsonProperty("responseMessage")
+public void setResponseMessage(String responseMessage) {
+this.responseMessage = responseMessage;
+ }
+
+public AllowedTreatments withResponseMessage(String responseMessage) {
+this.responseMessage = responseMessage;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/Bbid.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/Bbid.java
new file mode 100644
index 0000000..382b27a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/Bbid.java
@@ -0,0 +1,87 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"valueType",
+"string",
+"chars"
+})
+public class Bbid {
+
+@JsonProperty("valueType")
+private String valueType;
+@JsonProperty("string")
+private String string;
+@JsonProperty("chars")
+private String chars;
+
+@JsonProperty("valueType")
+public String getValueType() {
+return valueType;
+ }
+
+@JsonProperty("valueType")
+public void setValueType(String valueType) {
+this.valueType = valueType;
+ }
+
+public Bbid withValueType(String valueType) {
+this.valueType = valueType;
+return this;
+ }
+
+@JsonProperty("string")
+public String getString() {
+return string;
+ }
+
+@JsonProperty("string")
+public void setString(String string) {
+this.string = string;
+ }
+
+public Bbid withString(String string) {
+this.string = string;
+return this;
+ }
+
+@JsonProperty("chars")
+public String getChars() {
+return chars;
+ }
+
+@JsonProperty("chars")
+public void setChars(String chars) {
+this.chars = chars;
+ }
+
+public Bbid withChars(String chars) {
+this.chars = chars;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/DecisionAttributes.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/DecisionAttributes.java
new file mode 100644
index 0000000..9f40639
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/DecisionAttributes.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.policy.entities;
+
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "ServiceType", "VNFType", "BB_ID", "WorkStep", "ErrorCode" })
+public class DecisionAttributes {
+
+	@JsonProperty("ServiceType")
+	private String serviceType;
+	@JsonProperty("VNFType")
+	private String vNFType;
+	@JsonProperty("BB_ID")
+	private String bbID;
+	@JsonProperty("WorkStep")
+	private String workStep;
+	@JsonProperty("ErrorCode")
+	private String errorCode;
+
+	@JsonProperty("ServiceType")
+	public String getServiceType() {
+		return serviceType;
+	}
+
+	@JsonProperty("ServiceType")
+	public void setServiceType(String serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	@JsonProperty("VNFType")
+	public String getVNFType() {
+		return vNFType;
+	}
+
+	@JsonProperty("VNFType")
+	public void setVNFType(String vNFType) {
+		this.vNFType = vNFType;
+	}
+
+	@JsonProperty("BB_ID")
+	public String getBBID() {
+		return bbID;
+	}
+
+	@JsonProperty("BB_ID")
+	public void setBBID(String bBID) {
+		this.bbID = bBID;
+	}
+
+	@JsonProperty("WorkStep")
+	public String getWorkStep() {
+		return workStep;
+	}
+
+	@JsonProperty("WorkStep")
+	public void setWorkStep(String workStep) {
+		this.workStep = workStep;
+	}
+
+	@JsonProperty("ErrorCode")
+	public String getErrorCode() {
+		return errorCode;
+	}
+
+	@JsonProperty("ErrorCode")
+	public void setErrorCode(String errorCode) {
+		this.errorCode = errorCode;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryData.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryData.java
new file mode 100644
index 0000000..1ecf336
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryData.java
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"id",
+"bbid",
+"workstep",
+"treatments"
+})
+public class DictionaryData {
+
+@JsonProperty("id")
+private Id id;
+@JsonProperty("bbid")
+private Bbid bbid;
+@JsonProperty("workstep")
+private Workstep workstep;
+@JsonProperty("treatments")
+private Treatments treatments;
+
+@JsonProperty("id")
+public Id getId() {
+return id;
+ }
+
+@JsonProperty("id")
+public void setId(Id id) {
+this.id = id;
+ }
+
+public DictionaryData withId(Id id) {
+this.id = id;
+return this;
+ }
+
+@JsonProperty("bbid")
+public Bbid getBbid() {
+return bbid;
+ }
+
+@JsonProperty("bbid")
+public void setBbid(Bbid bbid) {
+this.bbid = bbid;
+ }
+
+public DictionaryData withBbid(Bbid bbid) {
+this.bbid = bbid;
+return this;
+ }
+
+@JsonProperty("workstep")
+public Workstep getWorkstep() {
+return workstep;
+ }
+
+@JsonProperty("workstep")
+public void setWorkstep(Workstep workstep) {
+this.workstep = workstep;
+ }
+
+public DictionaryData withWorkstep(Workstep workstep) {
+this.workstep = workstep;
+return this;
+ }
+
+@JsonProperty("treatments")
+public Treatments getTreatments() {
+return treatments;
+ }
+
+@JsonProperty("treatments")
+public void setTreatments(Treatments treatments) {
+this.treatments = treatments;
+ }
+
+public DictionaryData withTreatments(Treatments treatments) {
+this.treatments = treatments;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryItemsRequest.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryItemsRequest.java
new file mode 100644
index 0000000..d37d0c6
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryItemsRequest.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.policy.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "dictionaryType", "dictionary" })
+public class DictionaryItemsRequest {
+
+	@JsonProperty("dictionary")
+	private String dictionary;
+	@JsonProperty("dictionaryType")
+	private String dictionaryType;
+
+	@JsonProperty("dictionary")
+	public String getDictionary() {
+		return dictionary;
+	}
+
+	@JsonProperty("dictionary")
+	public void setDictionary(String dictionary) {
+		this.dictionary = dictionary;
+	}
+
+	@JsonProperty("dictionaryType")
+	public String getDictionaryType() {
+		return dictionaryType;
+	}
+
+	@JsonProperty("dictionaryType")
+	public void setDictionaryType(String dictionaryType) {
+		this.dictionaryType = dictionaryType;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryJson.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryJson.java
new file mode 100644
index 0000000..b6a95ae
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/DictionaryJson.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"DictionaryDatas"
+})
+public class DictionaryJson {
+
+@JsonProperty("DictionaryDatas")
+private List<DictionaryData> dictionaryDatas = new ArrayList<DictionaryData>();
+
+@JsonProperty("DictionaryDatas")
+public List<DictionaryData> getDictionaryDatas() {
+return dictionaryDatas;
+ }
+
+@JsonProperty("DictionaryDatas")
+public void setDictionaryDatas(List<DictionaryData> dictionaryDatas) {
+this.dictionaryDatas = dictionaryDatas;
+ }
+
+public DictionaryJson withDictionaryDatas(List<DictionaryData> dictionaryDatas) {
+this.dictionaryDatas = dictionaryDatas;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/Id.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/Id.java
new file mode 100644
index 0000000..728381a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/Id.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"integral",
+"valueType"
+})
+public class Id {
+
+@JsonProperty("integral")
+private Boolean integral;
+@JsonProperty("valueType")
+private String valueType;
+
+@JsonProperty("integral")
+public Boolean getIntegral() {
+return integral;
+ }
+
+@JsonProperty("integral")
+public void setIntegral(Boolean integral) {
+this.integral = integral;
+ }
+
+public Id withIntegral(Boolean integral) {
+this.integral = integral;
+return this;
+ }
+
+@JsonProperty("valueType")
+public String getValueType() {
+return valueType;
+ }
+
+@JsonProperty("valueType")
+public void setValueType(String valueType) {
+this.valueType = valueType;
+ }
+
+public Id withValueType(String valueType) {
+this.valueType = valueType;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyDecision.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyDecision.java
new file mode 100644
index 0000000..fbc8e23
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyDecision.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.policy.entities;
+
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "decision", "details" })
+public class PolicyDecision {
+
+	@JsonProperty("decision")
+	private String decision;
+	@JsonProperty("details")
+	private String details;
+
+	@JsonProperty("decision")
+	public String getDecision() {
+		return decision;
+	}
+
+	@JsonProperty("decision")
+	public void setDecision(String decision) {
+		this.decision = decision;
+	}
+
+	@JsonProperty("details")
+	public String getDetails() {
+		return details;
+	}
+
+	@JsonProperty("details")
+	public void setDetails(String details) {
+		this.details = details;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyDecisionRequest.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyDecisionRequest.java
new file mode 100644
index 0000000..bc20b9c
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyDecisionRequest.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.policy.entities;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({ "decisionAttributes", "ecompcomponentName" })
+public class PolicyDecisionRequest {
+
+	@JsonProperty("decisionAttributes")
+	private DecisionAttributes decisionAttributes;
+	@JsonProperty("ecompcomponentName")
+	private String ecompcomponentName;
+
+	@JsonProperty("decisionAttributes")
+	public DecisionAttributes getDecisionAttributes() {
+		return decisionAttributes;
+	}
+
+	@JsonProperty("decisionAttributes")
+	public void setDecisionAttributes(DecisionAttributes decisionAttributes) {
+		this.decisionAttributes = decisionAttributes;
+	}
+
+	@JsonProperty("ecompcomponentName")
+	public String getEcompcomponentName() {
+		return ecompcomponentName;
+	}
+
+	@JsonProperty("ecompcomponentName")
+	public void setEcompcomponentName(String ecompcomponentName) {
+		this.ecompcomponentName = ecompcomponentName;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyServiceType.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyServiceType.java
new file mode 100644
index 0000000..01f6738
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/PolicyServiceType.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy.entities;
+
+public enum PolicyServiceType {
+	GET_CONFIG("getConfig"),
+	SEND_EVENT("sendEvent"),
+	PUSH_POLICY("pushPolicy"),
+	CREATE_POLICY("createPolicy"),
+	UPDATE_POLICY("updatePolicy"),
+	GET_DECISION("getDecision"),
+	GET_METRICS("getMetrics"),
+	DELETE_POLICY("deletePolicy"),
+	LIST_CONFIG("listConfig"),
+	CREATE_DICTIONARY_ITEM("createDictionaryItem"),
+	UPDATE_DICTIONARY_ITEM("updateDictionaryItem"),
+	GET_DICTIONARY_ITEMS("getDictionaryItems");
+	
+	private final String name;
+	
+	PolicyServiceType(String name) {
+		this.name = name;
+	}
+	
+	@Override
+	public String toString() {
+		return name;
+	}
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/Treatments.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/Treatments.java
new file mode 100644
index 0000000..13af893
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/Treatments.java
@@ -0,0 +1,87 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.policy.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"valueType",
+"string",
+"chars"
+})
+public class Treatments {
+
+@JsonProperty("valueType")
+private String valueType;
+@JsonProperty("string")
+private String string;
+@JsonProperty("chars")
+private String chars;
+
+@JsonProperty("valueType")
+public String getValueType() {
+return valueType;
+ }
+
+@JsonProperty("valueType")
+public void setValueType(String valueType) {
+this.valueType = valueType;
+ }
+
+public Treatments withValueType(String valueType) {
+this.valueType = valueType;
+return this;
+ }
+
+@JsonProperty("string")
+public String getString() {
+return string;
+ }
+
+@JsonProperty("string")
+public void setString(String string) {
+this.string = string;
+ }
+
+public Treatments withString(String string) {
+this.string = string;
+return this;
+ }
+
+@JsonProperty("chars")
+public String getChars() {
+return chars;
+ }
+
+@JsonProperty("chars")
+public void setChars(String chars) {
+this.chars = chars;
+ }
+
+public Treatments withChars(String chars) {
+this.chars = chars;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/policy/entities/Workstep.java b/common/src/main/java/org/openecomp/mso/client/policy/entities/Workstep.java
new file mode 100644
index 0000000..9d2adfe
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/policy/entities/Workstep.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.policy.entities;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"valueType",
+"string",
+"chars"
+})
+public class Workstep {
+
+@JsonProperty("valueType")
+private String valueType;
+@JsonProperty("string")
+private String string;
+@JsonProperty("chars")
+private String chars;
+
+@JsonProperty("valueType")
+public String getValueType() {
+return valueType;
+ }
+
+@JsonProperty("valueType")
+public void setValueType(String valueType) {
+this.valueType = valueType;
+ }
+
+public Workstep withValueType(String valueType) {
+this.valueType = valueType;
+return this;
+ }
+
+@JsonProperty("string")
+public String getString() {
+return string;
+ }
+
+@JsonProperty("string")
+public void setString(String string) {
+this.string = string;
+ }
+
+public Workstep withString(String string) {
+this.string = string;
+return this;
+ }
+
+@JsonProperty("chars")
+public String getChars() {
+return chars;
+ }
+
+@JsonProperty("chars")
+public void setChars(String chars) {
+this.chars = chars;
+ }
+
+public Workstep withChars(String chars) {
+this.chars = chars;
+return this;
+ }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/ruby/RubyClient.java b/common/src/main/java/org/openecomp/mso/client/ruby/RubyClient.java
new file mode 100644
index 0000000..a4adcb2
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/ruby/RubyClient.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.ruby;
+
+import java.io.IOException;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+
+import org.openecomp.mso.client.dmaap.DmaapPublisher;
+import org.openecomp.mso.client.ruby.beans.Event;
+import org.openecomp.mso.client.ruby.beans.MsoRequest;
+import org.openecomp.mso.client.ruby.beans.Ruby;
+import org.openecomp.mso.client.ruby.dmaap.RubyCreateTicketRequestPublisher;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+ 
+public class RubyClient {
+	
+	private static final String REQUEST_CLIENT_NAME = "MSO";
+	private static final String ACTION = "Create Ticket";
+	
+	protected String buildRequest(String requestId, String sourceName, String reason, String workflowId, String notification) throws JsonProcessingException {
+		final MsoRequest request = new MsoRequest();
+		request.withRequestClientName(REQUEST_CLIENT_NAME)
+	    	   .withRequestId(requestId)		
+			   .withSourceName(sourceName)
+			   .withWorkflowId(workflowId)
+			   .withAction(ACTION);
+		 
+		request.withRequestTime(this.getTime());
+		
+		if(reason.length() <= 255){
+			request.withReason(reason);
+		} else {
+			throw new IllegalArgumentException("reason exceeds 255 characters");
+		}
+		if(notification.length() <= 1024){
+			request.withNotification(notification);
+		} else {
+			throw new IllegalArgumentException("notification exceeds 1024 characters");
+		}
+		final Event event = new Event();
+		event.setMsoRequest(request);
+		final Ruby ruby = new Ruby();	
+		ruby.setEvent(event);	
+		return this.getJson(ruby);
+	}
+	
+	protected String getJson(Ruby obj) throws JsonProcessingException {
+		final ObjectMapper mapper = new ObjectMapper();
+		return mapper.writeValueAsString(obj);
+	}
+	
+	protected DmaapPublisher getPublisher() throws IOException {
+		return new RubyCreateTicketRequestPublisher();
+	}	
+	
+	protected String getTime() {
+		final ZonedDateTime currentDateTime = ZonedDateTime.now(ZoneOffset.UTC);
+		final DateTimeFormatter format = DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss Z");
+		return currentDateTime.format(format);
+	}
+	
+	public void rubyCreateTicketCheckRequest(String requestId, String sourceName, String reason, String workflowId, String notification) throws Exception {
+		String request = this.buildRequest(requestId, sourceName, reason, workflowId, notification);
+		final DmaapPublisher publisher = this.getPublisher();
+		publisher.send(request);
+	}
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/ruby/beans/Event.java b/common/src/main/java/org/openecomp/mso/client/ruby/beans/Event.java
new file mode 100644
index 0000000..b926359
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/ruby/beans/Event.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.ruby.beans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"msoRequest"
+})
+public class Event {
+
+@JsonProperty("msoRequest")
+private MsoRequest msoRequest;
+
+/**
+* No args constructor for use in serialization
+* 
+*/
+public Event() {
+ }
+
+/**
+* 
+* @param msoRequest
+*/
+public Event(MsoRequest msoRequest) {
+super();
+this.msoRequest = msoRequest;
+ }
+
+@JsonProperty("msoRequest")
+public MsoRequest getMsoRequest() {
+return msoRequest;
+ }
+
+@JsonProperty("msoRequest")
+public void setMsoRequest(MsoRequest msoRequest) {
+this.msoRequest = msoRequest;
+ }
+
+public Event withMsoRequest(MsoRequest msoRequest) {
+this.msoRequest = msoRequest;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/ruby/beans/MsoRequest.java b/common/src/main/java/org/openecomp/mso/client/ruby/beans/MsoRequest.java
new file mode 100644
index 0000000..d00adae
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/ruby/beans/MsoRequest.java
@@ -0,0 +1,207 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.ruby.beans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"requestClientName",
+"requestId",
+"requestTime",
+"sourceName",
+"reason",
+"action",
+"workflowId",
+"notification"
+})
+public class MsoRequest {
+
+@JsonProperty("requestClientName")
+private String requestClientName;
+@JsonProperty("requestId")
+private String requestId;
+@JsonProperty("requestTime")
+private String requestTime;
+@JsonProperty("sourceName")
+private String sourceName;
+@JsonProperty("reason")
+private String reason;
+@JsonProperty("action")
+private String action;
+@JsonProperty("workflowId")
+private String workflowId;
+@JsonProperty("notification")
+private String notification;
+
+/**
+* No args constructor for use in serialization
+* 
+*/
+public MsoRequest() {
+ }
+
+/**
+* 
+* @param requestClientName
+* @param requestTime
+* @param reason
+* @param requestId
+* @param workflowId
+* @param sourceName
+* @param action
+* @param notification
+*/
+public MsoRequest(String requestClientName, String requestId, String requestTime, String sourceName, String reason, String action, String workflowId, String notification) {
+super();
+this.requestClientName = requestClientName;
+this.requestId = requestId;
+this.requestTime = requestTime;
+this.sourceName = sourceName;
+this.reason = reason;
+this.action = action;
+this.workflowId = workflowId;
+this.notification = notification;
+ }
+
+@JsonProperty("requestClientName")
+public String getRequestClientName() {
+return requestClientName;
+ }
+
+@JsonProperty("requestClientName")
+public void setRequestClientName(String requestClientName) {
+this.requestClientName = requestClientName;
+ }
+
+public MsoRequest withRequestClientName(String requestClientName) {
+this.requestClientName = requestClientName;
+return this;
+ }
+
+@JsonProperty("requestId")
+public String getRequestId() {
+return requestId;
+ }
+
+@JsonProperty("requestId")
+public void setRequestId(String requestId) {
+this.requestId = requestId;
+ }
+
+public MsoRequest withRequestId(String requestId) {
+this.requestId = requestId;
+return this;
+ }
+
+@JsonProperty("requestTime")
+public String getRequestTime() {
+return requestTime;
+ }
+
+@JsonProperty("requestTime")
+public void setRequestTime(String requestTime) {
+this.requestTime = requestTime;
+ }
+
+public MsoRequest withRequestTime(String requestTime) {
+this.requestTime = requestTime;
+return this;
+ }
+
+@JsonProperty("sourceName")
+public String getSourceName() {
+return sourceName;
+ }
+
+@JsonProperty("sourceName")
+public void setSourceName(String sourceName) {
+this.sourceName = sourceName;
+ }
+
+public MsoRequest withSourceName(String sourceName) {
+this.sourceName = sourceName;
+return this;
+ }
+
+@JsonProperty("reason")
+public String getReason() {
+return reason;
+ }
+
+@JsonProperty("reason")
+public void setReason(String reason) {
+this.reason = reason;
+ }
+
+public MsoRequest withReason(String reason) {
+this.reason = reason;
+return this;
+ }
+
+@JsonProperty("action")
+public String getAction() {
+return action;
+ }
+
+@JsonProperty("action")
+public void setAction(String action) {
+this.action = action;
+ }
+
+public MsoRequest withAction(String action) {
+this.action = action;
+return this;
+ }
+
+@JsonProperty("workflowId")
+public String getWorkflowId() {
+return workflowId;
+ }
+
+@JsonProperty("workflowId")
+public void setWorkflowId(String workflowId) {
+this.workflowId = workflowId;
+ }
+
+public MsoRequest withWorkflowId(String workflowId) {
+this.workflowId = workflowId;
+return this;
+ }
+
+@JsonProperty("notification")
+public String getNotification() {
+return notification;
+ }
+
+@JsonProperty("notification")
+public void setNotification(String notification) {
+this.notification = notification;
+ }
+
+public MsoRequest withNotification(String notification) {
+this.notification = notification;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/ruby/beans/Ruby.java b/common/src/main/java/org/openecomp/mso/client/ruby/beans/Ruby.java
new file mode 100644
index 0000000..1b81043
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/ruby/beans/Ruby.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.ruby.beans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"event"
+})
+public class Ruby {
+
+@JsonProperty("event")
+private Event event;
+
+/**
+* No args constructor for use in serialization
+* 
+*/
+public Ruby() {
+ }
+
+/**
+* 
+* @param event
+*/
+public Ruby(Event event) {
+super();
+this.event = event;
+ }
+
+@JsonProperty("event")
+public Event getEvent() {
+return event;
+ }
+
+@JsonProperty("event")
+public void setEvent(Event event) {
+this.event = event;
+ }
+
+public Ruby withEvent(Event event) {
+this.event = event;
+return this;
+ }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/ruby/dmaap/RubyCreateTicketRequestPublisher.java b/common/src/main/java/org/openecomp/mso/client/ruby/dmaap/RubyCreateTicketRequestPublisher.java
new file mode 100644
index 0000000..521318f
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/ruby/dmaap/RubyCreateTicketRequestPublisher.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.ruby.dmaap;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Optional;
+
+import org.openecomp.mso.client.dmaap.DmaapPublisher;
+
+public class RubyCreateTicketRequestPublisher extends DmaapPublisher{
+	public RubyCreateTicketRequestPublisher() throws FileNotFoundException, IOException {
+		super();
+	}
+	
+	@Override
+	public String getUserName() {
+		return msoProperties.get("ruby.create-ticket-request.dmaap.username");
+	}
+
+	@Override
+	public String getPassword() {
+		return msoProperties.get("ruby.create-ticket-request.dmaap.password");
+	}
+
+	@Override
+	public String getTopic() {
+		return msoProperties.get("ruby.create-ticket-request.publisher.topic");
+	}
+
+	@Override
+	public Optional<String> getHost() {
+		return Optional.ofNullable(msoProperties.get("ruby.create-ticket-request.publisher.host"));
+	}
+	
+}
+
+
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/SDNOHealthCheckClient.java b/common/src/main/java/org/openecomp/mso/client/sdno/SDNOHealthCheckClient.java
new file mode 100644
index 0000000..3ba75bb
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/SDNOHealthCheckClient.java
@@ -0,0 +1,158 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+
+import org.openecomp.mso.client.dmaap.DmaapConsumer;
+import org.openecomp.mso.client.dmaap.DmaapPublisher;
+import org.openecomp.mso.client.sdno.beans.AAIParamList;
+import org.openecomp.mso.client.sdno.beans.Body;
+import org.openecomp.mso.client.sdno.beans.Input;
+import org.openecomp.mso.client.sdno.beans.RequestHdCustom;
+import org.openecomp.mso.client.sdno.beans.SDNO;
+import org.openecomp.mso.client.sdno.dmaap.SDNOHealthCheckDmaapConsumer;
+import org.openecomp.mso.client.sdno.dmaap.SDNOHealthCheckDmaapPublisher;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class SDNOHealthCheckClient {
+
+	private static final String NODE_TYPE = "VROUTER";
+	private static final String API_OPERATION_TYPE = "health-diagnostic-custom";
+	private static final String MIRRORING_CHECK = "mirroring_check";
+	private static final String CLIENT_NAME = "MSO";
+	private static final String PRE_CHECK_CODE = "VROUTER000003";
+	private static final String POST_CHECK_CODE = "VROUTER000004";
+	private static final String LPORT_MIRRORING_CHECK = "lport_mirroring_check";
+	private static final String CONFIGURATION_ID = "configuration-id";
+	
+	
+	public boolean lPortMirrorHealthPreCheck(String userId, String requestId, Optional<String>clliCode, String configurationId, String interfaceId) throws Exception{
+		String request = buildLPortMirrorCheckPreRequest(userId, requestId, clliCode, configurationId, interfaceId);
+		return this.execute(requestId, request);
+	}
+	
+	public boolean lPortMirrorHealthPostCheck(String userId, String requestId, Optional<String>clliCode, String configurationId, String interfaceId) throws Exception{
+		String request = buildLPortMirrorCheckPostRequest(userId, requestId, clliCode, configurationId, interfaceId);
+		return this.execute(requestId, request);
+	}
+	
+	public boolean portMirrorHealthPreCheck(String userId, String requestId, Optional<String> clliCode, String configurationId) throws Exception {
+		final String request = this.buildPortMirrorPreCheckRequest(userId, requestId, clliCode, configurationId);		
+		return this.execute(requestId, request);
+	}
+	
+	public boolean portMirrorHealthPostCheck(String userId, String requestId, Optional<String> clliCode, String configurationId) throws Exception {
+		final String request = this.buildPortMirrorPostCheckRequest(userId, requestId, clliCode, configurationId);		
+		return this.execute(requestId, request);
+	}
+	
+	protected String buildLPortMirrorCheckPreRequest(String userId, String requestId, Optional<String> clliCode, String configurationId, String interfaceId) throws JsonProcessingException{
+		return this.buildLPortMirrorCheckRequest(userId, requestId, clliCode, configurationId, interfaceId, PRE_CHECK_CODE);
+	}
+	
+	protected String buildLPortMirrorCheckPostRequest(String userId, String requestId, Optional<String> clliCode, String configurationId, String interfaceId) throws JsonProcessingException{
+		return this.buildLPortMirrorCheckRequest(userId, requestId, clliCode, configurationId, interfaceId, POST_CHECK_CODE);
+	}
+	
+	protected String buildPortMirrorPreCheckRequest(String userId, String requestId, Optional<String> clliCode, String configurationId) throws JsonProcessingException {
+		return this.buildPortMirrorCheckRequest(userId, requestId, clliCode, configurationId, PRE_CHECK_CODE);
+	}
+
+	protected String buildPortMirrorPostCheckRequest(String userId, String requestId, Optional<String> clliCode, String configurationId) throws JsonProcessingException {
+		return this.buildPortMirrorCheckRequest(userId, requestId, clliCode, configurationId, POST_CHECK_CODE);
+	}
+	
+	protected String buildPortMirrorCheckRequest(String userId, String requestId, Optional<String> clliCode, String configurationId, String diagnosticCode) throws JsonProcessingException {
+		final AAIParamList list = new AAIParamList();
+		list.setKey(CONFIGURATION_ID);
+		list.setValue(configurationId);
+		
+		return this.buildRequest(userId, requestId, clliCode, diagnosticCode, MIRRORING_CHECK, Collections.singletonList(list));
+	}
+	
+	protected String buildLPortMirrorCheckRequest(String userId, String requestId, Optional<String> clliCode, String configurationId, String interfaceId, String diagnosticCode) throws JsonProcessingException {
+		
+		final AAIParamList configurationIdParam = new AAIParamList();
+		configurationIdParam.setKey(CONFIGURATION_ID);
+		configurationIdParam.setValue(configurationId);
+		final AAIParamList interfaceIdParam = new AAIParamList();
+		interfaceIdParam.setKey("interface-id");
+		interfaceIdParam.setValue(interfaceId);
+		final List<AAIParamList> list = new ArrayList<>();
+		list.add(configurationIdParam);
+		list.add(interfaceIdParam);
+		return this.buildRequest(userId, requestId, clliCode, diagnosticCode, LPORT_MIRRORING_CHECK, list);
+	}
+	
+	
+	protected String buildRequest(String userId, String requestId, Optional<String> clliCode, String diagnosticCode, String operationType, List<AAIParamList> paramList) throws JsonProcessingException {
+
+		final RequestHdCustom hdCustom = new RequestHdCustom();
+		hdCustom.withRequestUserId(userId)
+				.withRequestId(requestId)
+				.withRequestClientName(CLIENT_NAME)
+				.withHealthDiagnosticCode(diagnosticCode)
+				.withOperationType(operationType)
+				.withAaiParamList(paramList);
+		
+		final Input input = new Input();
+		input.setRequestHdCustom(hdCustom);
+		final Body body = new Body();
+		body.setInput(input);
+		final SDNO request = new SDNO();
+		request.withBody(body).withOperation(API_OPERATION_TYPE).withNodeType(NODE_TYPE);
+		if (clliCode.isPresent()) {
+			request.setNodeLoc(clliCode.get());
+		}
+		return this.getJson(request);
+		
+	}
+	protected String getJson(SDNO obj) throws JsonProcessingException {
+		final ObjectMapper mapper = new ObjectMapper();
+		return mapper.writeValueAsString(obj);
+	}
+	
+	protected DmaapPublisher getPublisher() throws FileNotFoundException, IOException {
+		return new SDNOHealthCheckDmaapPublisher();
+	}
+	
+	protected DmaapConsumer getConsumer(String requestId) throws FileNotFoundException, IOException {
+		return new SDNOHealthCheckDmaapConsumer(requestId);
+	}
+	
+	protected boolean execute(String requestId, String request) throws Exception {
+		final DmaapPublisher publisher = this.getPublisher();
+		publisher.send(request);
+		
+		final DmaapConsumer consumer = this.getConsumer(requestId);
+		
+		return consumer.consume();
+	}
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java b/common/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
new file mode 100644
index 0000000..534186b
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/SDNOValidator.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno;
+
+import java.io.IOException;
+import java.util.UUID;
+
+public interface SDNOValidator {
+
+	/**
+	 * Issues a health diagnostic request for a given vnf to SDN-O
+	 * 
+	 * @param vnfId
+	 * @param requestingUserId
+	 * @throws IOException
+	 * @throws Exception
+	 */
+	public void healthDiagnostic(String vnfId, UUID uuid, String requestingUserId) throws IOException, Exception;
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/SDNOValidatorImpl.java b/common/src/main/java/org/openecomp/mso/client/sdno/SDNOValidatorImpl.java
new file mode 100644
index 0000000..e6955f5
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/SDNOValidatorImpl.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Optional;
+import java.util.UUID;
+
+import org.onap.aai.domain.yang.GenericVnf;
+import org.openecomp.mso.client.aai.AAIObjectType;
+import org.openecomp.mso.client.aai.AAIResourcesClient;
+import org.openecomp.mso.client.aai.AAIVersion;
+import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
+import org.openecomp.mso.client.aai.entities.uri.AAIUriFactory;
+import org.openecomp.mso.client.dmaap.DmaapConsumer;
+import org.openecomp.mso.client.dmaap.DmaapPublisher;
+import org.openecomp.mso.client.sdno.beans.Body;
+import org.openecomp.mso.client.sdno.beans.Input;
+import org.openecomp.mso.client.sdno.beans.RequestHealthDiagnostic;
+import org.openecomp.mso.client.sdno.beans.SDNO;
+import org.openecomp.mso.client.sdno.dmaap.SDNOHealthCheckDmaapConsumer;
+import org.openecomp.mso.client.sdno.dmaap.SDNOHealthCheckDmaapPublisher;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+public class SDNOValidatorImpl implements SDNOValidator {
+
+	private final static String clientName = "MSO";
+
+	@Override
+	public void healthDiagnostic(String vnfId, UUID uuid, String requestingUserId) throws IOException, Exception {
+		
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
+		AAIResourcesClient client = new AAIResourcesClient(AAIVersion.V10, uuid);
+		GenericVnf vnf = client.get(GenericVnf.class, uri);
+		
+		SDNO requestDiagnostic = buildRequestDiagnostic(vnf, uuid, requestingUserId);
+		ObjectMapper mapper = new ObjectMapper();
+		String json = mapper.writeValueAsString(requestDiagnostic);
+		this.submitRequest(json);
+		this.pollForResponse(uuid.toString());
+		
+	}
+
+	protected SDNO buildRequestDiagnostic(GenericVnf vnf, UUID uuid, String requestingUserId) {
+		
+		Optional<String> vnfType;
+		if (vnf.getVnfType() == null) {
+			vnfType = Optional.empty();
+		} else {
+			vnfType = Optional.of(vnf.getVnfType());
+		}
+		Input input = new Input();
+		SDNO parentRequest = new SDNO();
+		Body body = new Body();
+		parentRequest.setBody(body);
+		parentRequest.setNodeType(vnfType.orElse("NONE").toUpperCase());
+		parentRequest.setOperation("health-diagnostic");
+		
+		body.setInput(input);
+		
+		RequestHealthDiagnostic request = new RequestHealthDiagnostic();
+		request.setRequestClientName(clientName);
+		request.setRequestNodeName(vnf.getVnfName());
+		request.setRequestNodeIp(vnf.getIpv4OamAddress()); //generic-vnf oam ip
+		request.setRequestUserId(requestingUserId); //mech id?
+		request.setRequestId(uuid.toString()); //something to identify this request by for polling
+		
+		input.setRequestHealthDiagnostic(request);
+		
+		return parentRequest;
+	}
+	protected void submitRequest(String json) throws FileNotFoundException, IOException, InterruptedException {
+		
+		DmaapPublisher publisher = new SDNOHealthCheckDmaapPublisher();
+		publisher.send(json);
+	}
+	protected boolean pollForResponse(String uuid) throws Exception {
+		DmaapConsumer consumer = this.getConsumer(uuid);
+		return consumer.consume();
+	}
+	
+
+	
+	protected DmaapConsumer getConsumer(String uuid) throws FileNotFoundException, IOException {
+		return new SDNOHealthCheckDmaapConsumer(uuid);
+	}
+	
+
+	
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/beans/AAIParamList.java b/common/src/main/java/org/openecomp/mso/client/sdno/beans/AAIParamList.java
new file mode 100644
index 0000000..bab37c0
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/beans/AAIParamList.java
@@ -0,0 +1,87 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.beans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"key",
+"value"
+})
+public class AAIParamList {
+
+@JsonProperty("key")
+private String key;
+@JsonProperty("value")
+private String value;
+
+/**
+* No args constructor for use in serialization
+* 
+*/
+public AAIParamList() {
+ }
+
+/**
+* 
+* @param value
+* @param key
+*/
+public AAIParamList(String key, String value) {
+super();
+this.key = key;
+this.value = value;
+ }
+
+@JsonProperty("key")
+public String getKey() {
+return key;
+ }
+
+@JsonProperty("key")
+public void setKey(String key) {
+this.key = key;
+ }
+
+public AAIParamList withKey(String key) {
+this.key = key;
+return this;
+ }
+
+@JsonProperty("value")
+public String getValue() {
+return value;
+ }
+
+@JsonProperty("value")
+public void setValue(String value) {
+this.value = value;
+ }
+
+public AAIParamList withValue(String value) {
+this.value = value;
+return this;
+ }
+
+}
\ No newline at end of file
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java b/common/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
new file mode 100644
index 0000000..26c74b0
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.beans;
+
+import java.io.Serializable;
+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;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "input"
+})
+public class Body implements Serializable
+{
+
+    @JsonProperty("input")
+    private Input input;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+    private final static long serialVersionUID = 9101706044452851559L;
+
+    @JsonProperty("input")
+    public Input getInput() {
+        return input;
+    }
+
+    @JsonProperty("input")
+    public void setInput(Input input) {
+        this.input = input;
+    }
+
+    public Body withInput(Input input) {
+        this.input = input;
+        return this;
+    }
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    public Body withAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+        return this;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java b/common/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
new file mode 100644
index 0000000..157330a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.beans;
+
+import java.io.Serializable;
+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;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "request-healthdiagnostic",
+    "request-hd-custom"
+})
+public class Input implements Serializable
+{
+
+    @JsonProperty("request-healthdiagnostic")
+    private RequestHealthDiagnostic RequestHealthDiagnostic;
+    @JsonProperty("request-hd-custom")
+    private RequestHdCustom requestHdCustom;
+    
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+    private final static long serialVersionUID = 7155546785389227528L;
+
+    @JsonProperty("request-healthdiagnostic")
+    public RequestHealthDiagnostic getRequestHealthDiagnostic() {
+        return RequestHealthDiagnostic;
+    }
+
+    @JsonProperty("request-healthdiagnostic")
+    public void setRequestHealthDiagnostic(RequestHealthDiagnostic RequestHealthDiagnostic) {
+        this.RequestHealthDiagnostic = RequestHealthDiagnostic;
+    }
+    
+    @JsonProperty("request-hd-custom")
+    public RequestHdCustom getRequestHdCustom() {
+    	return requestHdCustom;
+     }
+
+    @JsonProperty("request-hd-custom")
+    public void setRequestHdCustom(RequestHdCustom requestHdCustom) {
+    	this.requestHdCustom = requestHdCustom;
+    }
+
+    public Input withRequestHealthDiagnostic(RequestHealthDiagnostic RequestHealthDiagnostic) {
+        this.RequestHealthDiagnostic = RequestHealthDiagnostic;
+        return this;
+    }
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    public Input withAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+        return this;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHdCustom.java b/common/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHdCustom.java
new file mode 100644
index 0000000..a0d00a7
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHdCustom.java
@@ -0,0 +1,170 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.openecomp.mso.client.sdno.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"request-client-name",
+"request-user-id",
+"request-id",
+"health-diagnostic-code",
+"operation-type",
+"aai-param-list"
+})
+public class RequestHdCustom {
+
+@JsonProperty("request-client-name")
+private String requestClientName;
+@JsonProperty("request-user-id")
+private String requestUserId;
+@JsonProperty("request-id")
+private String requestId;
+@JsonProperty("health-diagnostic-code")
+private String healthDiagnosticCode;
+@JsonProperty("operation-type")
+private String operationType;
+@JsonProperty("aai-param-list")
+private List<AAIParamList> aaiParamList = new ArrayList<AAIParamList>();
+
+/**
+* No args constructor for use in serialization
+* 
+*/
+public RequestHdCustom() {
+ }
+
+/**
+* 
+* @param requestClientName
+* @param operationType
+* @param requestId
+* @param healthDiagnosticCode
+* @param aaiParamList
+* @param requestUserId
+*/
+public RequestHdCustom(String requestClientName, String requestUserId, String requestId, String healthDiagnosticCode, String operationType, List<AAIParamList> aaiParamList) {
+super();
+this.requestClientName = requestClientName;
+this.requestUserId = requestUserId;
+this.requestId = requestId;
+this.healthDiagnosticCode = healthDiagnosticCode;
+this.operationType = operationType;
+this.aaiParamList = aaiParamList;
+ }
+
+@JsonProperty("request-client-name")
+public String getRequestClientName() {
+return requestClientName;
+ }
+
+@JsonProperty("request-client-name")
+public void setRequestClientName(String requestClientName) {
+this.requestClientName = requestClientName;
+ }
+
+public RequestHdCustom withRequestClientName(String requestClientName) {
+this.requestClientName = requestClientName;
+return this;
+ }
+
+@JsonProperty("request-user-id")
+public String getRequestUserId() {
+return requestUserId;
+ }
+
+@JsonProperty("request-user-id")
+public void setRequestUserId(String requestUserId) {
+this.requestUserId = requestUserId;
+ }
+
+public RequestHdCustom withRequestUserId(String requestUserId) {
+this.requestUserId = requestUserId;
+return this;
+ }
+
+@JsonProperty("request-id")
+public String getRequestId() {
+return requestId;
+ }
+
+@JsonProperty("request-id")
+public void setRequestId(String requestId) {
+this.requestId = requestId;
+ }
+
+public RequestHdCustom withRequestId(String requestId) {
+this.requestId = requestId;
+return this;
+ }
+
+@JsonProperty("health-diagnostic-code")
+public String getHealthDiagnosticCode() {
+return healthDiagnosticCode;
+ }
+
+@JsonProperty("health-diagnostic-code")
+public void setHealthDiagnosticCode(String healthDiagnosticCode) {
+this.healthDiagnosticCode = healthDiagnosticCode;
+ }
+
+public RequestHdCustom withHealthDiagnosticCode(String healthDiagnosticCode) {
+this.healthDiagnosticCode = healthDiagnosticCode;
+return this;
+ }
+
+@JsonProperty("operation-type")
+public String getOperationType() {
+return operationType;
+ }
+
+@JsonProperty("operation-type")
+public void setOperationType(String operationType) {
+this.operationType = operationType;
+ }
+
+public RequestHdCustom withOperationType(String operationType) {
+this.operationType = operationType;
+return this;
+ }
+
+@JsonProperty("aai-param-list")
+public List<AAIParamList> getAaiParamList() {
+return aaiParamList;
+ }
+
+@JsonProperty("aai-param-list")
+public void setAaiParamList(List<AAIParamList> aaiParamList) {
+this.aaiParamList = aaiParamList;
+ }
+
+public RequestHdCustom withAaiParamList(List<AAIParamList> aaiParamList) {
+this.aaiParamList = aaiParamList;
+return this;
+ }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java b/common/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
new file mode 100644
index 0000000..2cddd03
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
@@ -0,0 +1,185 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.beans;
+
+import java.io.Serializable;
+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;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "request-client-name",
+    "request-node-name",
+    "request-node-ip",
+    "request-id",
+    "request-user-id",
+    "request-node-type",
+    "health-diagnostic-code"
+})
+public class RequestHealthDiagnostic implements Serializable
+{
+
+    @JsonProperty("request-client-name")
+    private String requestClientName;
+    @JsonProperty("request-node-name")
+    private String requestNodeName;
+    @JsonProperty("request-node-ip")
+    private String requestNodeIp;
+    @JsonProperty("request-id")
+    private String requestId;
+    @JsonProperty("request-user-id")
+    private String requestUserId;
+    @JsonProperty("request-node-type")
+    private String requestNodeType;
+    @JsonProperty("health-diagnostic-code")
+    private String healthDiagnosticCode;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+    private final static long serialVersionUID = 1166788526178388021L;
+
+    @JsonProperty("request-client-name")
+    public String getRequestClientName() {
+        return requestClientName;
+    }
+
+    @JsonProperty("request-client-name")
+    public void setRequestClientName(String requestClientName) {
+        this.requestClientName = requestClientName;
+    }
+
+    public RequestHealthDiagnostic withRequestClientName(String requestClientName) {
+        this.requestClientName = requestClientName;
+        return this;
+    }
+
+    @JsonProperty("request-node-name")
+    public String getRequestNodeName() {
+        return requestNodeName;
+    }
+
+    @JsonProperty("request-node-name")
+    public void setRequestNodeName(String requestNodeName) {
+        this.requestNodeName = requestNodeName;
+    }
+
+    public RequestHealthDiagnostic withRequestNodeName(String requestNodeName) {
+        this.requestNodeName = requestNodeName;
+        return this;
+    }
+
+    @JsonProperty("request-node-ip")
+    public String getRequestNodeIp() {
+        return requestNodeIp;
+    }
+
+    @JsonProperty("request-node-ip")
+    public void setRequestNodeIp(String requestNodeIp) {
+        this.requestNodeIp = requestNodeIp;
+    }
+
+    public RequestHealthDiagnostic withRequestNodeIp(String requestNodeIp) {
+        this.requestNodeIp = requestNodeIp;
+        return this;
+    }
+
+    @JsonProperty("request-id")
+    public String getRequestId() {
+        return requestId;
+    }
+
+    @JsonProperty("request-id")
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public RequestHealthDiagnostic withRequestId(String requestId) {
+        this.requestId = requestId;
+        return this;
+    }
+
+    @JsonProperty("request-user-id")
+    public String getRequestUserId() {
+        return requestUserId;
+    }
+
+    @JsonProperty("request-user-id")
+    public void setRequestUserId(String requestUserId) {
+        this.requestUserId = requestUserId;
+    }
+
+    public RequestHealthDiagnostic withRequestUserId(String requestUserId) {
+        this.requestUserId = requestUserId;
+        return this;
+    }
+
+    @JsonProperty("request-node-type")
+    public String getRequestNodeType() {
+        return requestNodeType;
+    }
+
+    @JsonProperty("request-node-type")
+    public void setRequestNodeType(String requestNodeType) {
+        this.requestNodeType = requestNodeType;
+    }
+
+    public RequestHealthDiagnostic withRequestNodeType(String requestNodeType) {
+        this.requestNodeType = requestNodeType;
+        return this;
+    }
+
+    @JsonProperty("health-diagnostic-code")
+    public String getHealthDiagnosticCode() {
+        return healthDiagnosticCode;
+    }
+
+    @JsonProperty("health-diagnostic-code")
+    public void setHealthDiagnosticCode(String healthDiagnosticCode) {
+        this.healthDiagnosticCode = healthDiagnosticCode;
+    }
+
+    public RequestHealthDiagnostic withHealthDiagnosticCode(String healthDiagnosticCode) {
+        this.healthDiagnosticCode = healthDiagnosticCode;
+        return this;
+    }
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    public RequestHealthDiagnostic withAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+        return this;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java b/common/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
new file mode 100644
index 0000000..976f5b9
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.beans;
+
+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;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+"client-name",
+"code",
+"processing-host",
+"request-id",
+"status"
+})
+public class ResultInfo {
+
+@JsonProperty("client-name")
+private String clientName;
+@JsonProperty("code")
+private String code;
+@JsonProperty("processing-host")
+private String processingHost;
+@JsonProperty("request-id")
+private String requestId;
+@JsonProperty("status")
+private String status;
+@JsonIgnore
+private Map<String, Object> additionalProperties = new HashMap<>();
+
+@JsonProperty("client-name")
+public String getClientName() {
+return clientName;
+}
+
+@JsonProperty("client-name")
+public void setClientName(String clientName) {
+this.clientName = clientName;
+}
+
+@JsonProperty("code")
+public String getCode() {
+return code;
+}
+
+@JsonProperty("code")
+public void setCode(String code) {
+this.code = code;
+}
+
+@JsonProperty("processing-host")
+public String getProcessingHost() {
+return processingHost;
+}
+
+@JsonProperty("processing-host")
+public void setProcessingHost(String processingHost) {
+this.processingHost = processingHost;
+}
+
+@JsonProperty("request-id")
+public String getRequestId() {
+return requestId;
+}
+
+@JsonProperty("request-id")
+public void setRequestId(String requestId) {
+this.requestId = requestId;
+}
+
+@JsonProperty("status")
+public String getStatus() {
+return status;
+}
+
+@JsonProperty("status")
+public void setStatus(String status) {
+this.status = status;
+}
+
+@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/common/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java b/common/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
new file mode 100644
index 0000000..8505ec9
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
@@ -0,0 +1,131 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.beans;
+
+import java.io.Serializable;
+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;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+    "operation",
+    "nodeLoc",
+    "nodeType",
+    "body"
+})
+public class SDNO implements Serializable
+{
+
+    @JsonProperty("operation")
+    private String operation;
+    @JsonProperty("nodeLoc")
+    private String nodeLoc;
+    @JsonProperty("nodeType")
+    private String nodeType;
+    @JsonProperty("body")
+    private Body body;
+    @JsonIgnore
+    private Map<String, Object> additionalProperties = new HashMap<>();
+    private final static long serialVersionUID = -5303297382564282650L;
+
+    @JsonProperty("operation")
+    public String getOperation() {
+        return operation;
+    }
+
+    @JsonProperty("operation")
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+    
+    @JsonProperty("nodeLoc")
+    public String getNodeLoc() {
+		return nodeLoc;
+	}
+    
+    @JsonProperty("nodeLoc")
+	public void setNodeLoc(String nodeLoc) {
+		this.nodeLoc = nodeLoc;
+	}
+    
+    public SDNO withNodeLoc(String nodeLoc) {
+    	this.nodeLoc = nodeLoc;
+    	return this;
+    }
+
+	public SDNO withOperation(String operation) {
+        this.operation = operation;
+        return this;
+    }
+
+    @JsonProperty("nodeType")
+    public String getNodeType() {
+        return nodeType;
+    }
+
+    @JsonProperty("nodeType")
+    public void setNodeType(String nodeType) {
+        this.nodeType = nodeType;
+    }
+
+    public SDNO withNodeType(String nodeType) {
+        this.nodeType = nodeType;
+        return this;
+    }
+
+    @JsonProperty("body")
+    public Body getBody() {
+        return body;
+    }
+
+    @JsonProperty("body")
+    public void setBody(Body body) {
+        this.body = body;
+    }
+
+    public SDNO withBody(Body body) {
+        this.body = body;
+        return this;
+    }
+
+    @JsonAnyGetter
+    public Map<String, Object> getAdditionalProperties() {
+        return this.additionalProperties;
+    }
+
+    @JsonAnySetter
+    public void setAdditionalProperty(String name, Object value) {
+        this.additionalProperties.put(name, value);
+    }
+
+    public SDNO SDNO (String name, Object value) {
+        this.additionalProperties.put(name, value);
+        return this;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java b/common/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java
new file mode 100644
index 0000000..59adeb2
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapConsumer.java
@@ -0,0 +1,161 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.dmaap;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Optional;
+
+import org.openecomp.mso.client.dmaap.DmaapConsumer;
+import org.openecomp.mso.client.exceptions.SDNOException;
+import org.openecomp.mso.jsonpath.JsonPathUtil;
+
+public class SDNOHealthCheckDmaapConsumer extends DmaapConsumer {
+
+	private final String uuid;
+	private boolean continuePolling = true;
+	private final static String healthDiagnosticPath = "body.output.*";
+
+	public SDNOHealthCheckDmaapConsumer() throws FileNotFoundException, IOException {
+		this("none");
+	}
+	
+	public SDNOHealthCheckDmaapConsumer(String uuid) throws FileNotFoundException, IOException {
+		super();
+		this.uuid = uuid;
+	}
+	
+	@Override
+	public String getUserName() {
+		return msoProperties.get("sdno.health-check.dmaap.username");
+	}
+
+	@Override
+	public String getPassword() {
+		return msoProperties.get("sdno.health-check.dmaap.password");
+	}
+
+	@Override
+	public String getTopic() {
+		return msoProperties.get("sdno.health-check.dmaap.subscriber.topic");
+	}
+	
+	@Override
+	public Optional<String> getHost() {
+		return Optional.ofNullable(msoProperties.get("sdno.health-check.dmaap.subscriber.host"));
+	}
+
+	@Override
+	public boolean continuePolling() {
+		return continuePolling;
+	}
+	
+	@Override
+	public void stopProcessingMessages() {
+		continuePolling = false;
+	}
+	@Override
+	public void processMessage(String message) throws Exception {
+		if (isHealthDiagnostic(message, this.getRequestId())) {
+			if (!healthDiagnosticSuccessful(message)) {
+				Optional<String> statusMessage = this.getStatusMessage(message);
+				if (statusMessage.isPresent()) {
+					throw new SDNOException("failed with message " + statusMessage.get());
+				} else {
+					throw new SDNOException("failed with no status message");
+				}
+			} else {
+				auditLogger.info("successful health diagnostic found for request: " + this.getRequestId());
+				stopProcessingMessages();
+			}
+		}
+	}
+	
+	@Override
+	public boolean isAccepted(String message) {
+		if (isResultInfo(message)) {
+			Optional<String> code = isAccepted(message, this.getRequestId());
+			if (code.isPresent()) {
+				if ("202".equals(code.get())) {
+					return true;
+				} else {
+					//TODO check other statuses 400 and 500
+				}
+			} else {
+				//TODO throw error
+			}
+		}
+		
+		return false;
+	}
+	
+	@Override
+	public boolean isFailure(String message) {
+		if (isResultInfo(message)) {
+			Optional<String> code = isFailure(message, this.getRequestId());
+			if (code.isPresent()) {
+				if ("500".equals(code.get())) {
+					return true;
+				} else {
+					//TODO check other statuses 400 and 500
+				}
+			} else {
+				//TODO throw error
+			}
+		}
+		
+		return false;
+	}
+	
+	@Override
+	public String getRequestId() {
+		return uuid;
+	}
+	
+	protected Optional<String> isAccepted(String json, String uuid) {
+		return JsonPathUtil.getInstance().locateResult(json, String.format("$.result-info[?(@.status=='ACCEPTED' && @.request-id=='%s')].code", uuid));
+	}
+	
+	protected Optional<String> isFailure(String json, String uuid) {
+		return JsonPathUtil.getInstance().locateResult(json, String.format("$.result-info[?(@.status=='FAILURE' && @.request-id=='%s')].code", uuid));
+	}
+	
+	protected boolean isResultInfo(String json) {
+		return JsonPathUtil.getInstance().pathExists(json, "$[?(@.result-info)]");
+	}
+	
+	protected boolean isHealthDiagnostic(String json, String uuid) {
+		return JsonPathUtil.getInstance().pathExists(json, String.format("$[?(@.result-info.request-id=='%s')].%s", uuid, healthDiagnosticPath));
+	}
+	
+	protected boolean healthDiagnosticSuccessful(String json) {
+		return JsonPathUtil.getInstance().pathExists(json, "$." + healthDiagnosticPath + "[?(@.response-status=='Success')]");
+	}
+	
+	protected Optional<String> getStatusMessage(String json) {
+		return JsonPathUtil.getInstance().locateResult(json, "$." + healthDiagnosticPath + ".error-message");
+	}
+	
+	@Override
+	public int getMaximumElapsedTime() {
+		return 300000;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java b/common/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java
new file mode 100644
index 0000000..ef19bb7
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/client/sdno/dmaap/SDNOHealthCheckDmaapPublisher.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.client.sdno.dmaap;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Optional;
+
+import org.openecomp.mso.client.dmaap.DmaapPublisher;
+
+public class SDNOHealthCheckDmaapPublisher extends DmaapPublisher {
+	
+	public SDNOHealthCheckDmaapPublisher() throws FileNotFoundException, IOException {
+		super();
+	}
+	
+	@Override
+	public String getUserName() {
+		return msoProperties.get("sdno.health-check.dmaap.username");
+	}
+
+	@Override
+	public String getPassword() {
+		return msoProperties.get("sdno.health-check.dmaap.password");
+	}
+
+	@Override
+	public String getTopic() {
+		return msoProperties.get("sdno.health-check.dmaap.publisher.topic");
+	}
+	
+	@Override
+	public Optional<String> getHost() {
+		return Optional.ofNullable(msoProperties.get("sdno.health-check.dmaap.publisher.host"));
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/jsonpath/JsonPathUtil.java b/common/src/main/java/org/openecomp/mso/jsonpath/JsonPathUtil.java
new file mode 100644
index 0000000..148eb74
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/jsonpath/JsonPathUtil.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.jsonpath;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.jayway.jsonpath.Configuration;
+import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.Option;
+import com.jayway.jsonpath.spi.json.JacksonJsonNodeJsonProvider;
+
+public class JsonPathUtil {
+
+	
+	private final Configuration conf;
+	
+	private JsonPathUtil() {
+		conf = Configuration.defaultConfiguration().jsonProvider(new JacksonJsonNodeJsonProvider()).addOptions(Option.ALWAYS_RETURN_LIST, Option.SUPPRESS_EXCEPTIONS);
+	}
+	
+	private static class Helper {
+		private static final JsonPathUtil INSTANCE = new JsonPathUtil();
+	}
+	
+	public static JsonPathUtil getInstance() {
+		return Helper.INSTANCE;
+	}
+	public boolean pathExists(String json, String jsonPath) {
+		return JsonPath.using(conf).parse(json).<ArrayNode>read(jsonPath).size() != 0;
+	}
+	
+	public Optional<String> locateResult(String json, String jsonPath) {
+		final ArrayNode result = JsonPath.using(conf).parse(json).read(jsonPath);
+		if (result.size() == 0) {
+			return Optional.empty();
+		} else {
+			if (result.get(0).isValueNode()) {
+				return Optional.of(result.get(0).asText());
+			} else {
+				return Optional.of(result.get(0).toString());
+			}
+			
+		}
+	}
+	
+	public List<String> locateResultList(String json, String jsonPath) {
+		final ArrayNode resultNodes = JsonPath.using(conf).parse(json).read(jsonPath);
+		final ArrayList<String> result = new ArrayList<>();
+		
+		for (JsonNode node : resultNodes) {
+			if (node.isValueNode()) {
+				result.add(node.asText());
+			} else {
+				result.add(node.toString());
+			}
+			
+		}
+		return result;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java b/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
index 9635541..419bbf8 100644
--- a/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
+++ b/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
@@ -202,6 +202,7 @@
 	ASDC_SERVICE_NOT_SUPPORT,
 	ASDC_ARTIFACT_DEPLOY_SUC,
 	ASDC_PROPERTIES_NOT_FOUND,
+	ASDC_PROPERTIES_LOAD_SUCCESS,
 	// Default Messages, in case Log catalog is not defined
 	GENERAL_EXCEPTION_ARG,
 	GENERAL_EXCEPTION,
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoJavaProperties.java b/common/src/main/java/org/openecomp/mso/properties/MsoJavaProperties.java
index f0ca191..c13b9e0 100644
--- a/common/src/main/java/org/openecomp/mso/properties/MsoJavaProperties.java
+++ b/common/src/main/java/org/openecomp/mso/properties/MsoJavaProperties.java
@@ -24,7 +24,11 @@
 import java.io.FileReader;
 import java.io.IOException;
 import java.security.GeneralSecurityException;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Properties;
+
+import org.apache.commons.codec.binary.Base64;
 import org.openecomp.mso.utils.CryptoUtils;
 
 public class MsoJavaProperties extends AbstractMsoProperties {
@@ -86,11 +90,43 @@
 
 	}
 
+	/**
+	 * @param encryptedAuth: encrypted credentials from properties
+	 * @param msoKey: key to use to decrypt from properties
+	 * @return base 64 encoded basic auth credentials
+	 */
+	public synchronized String getBasicAuth(String encryptedAuth, String msoKey){
+		String encodedString = null;
+		if ((encryptedAuth == null || encryptedAuth.isEmpty()) || (msoKey == null || msoKey.isEmpty()))
+			return null;
+		try {
+			String auth = decrypt(encryptedAuth, msoKey);
+			byte[] encoded = Base64.encodeBase64(auth.getBytes());
+			encodedString = new String(encoded);
+			encodedString = "Basic " + encodedString;
+			
+		} catch (Exception ex) {
+			LOGGER.debug("Exception while getBasicAuth " + encryptedAuth, ex);
+		}
+		return encodedString;
+	}		
+	
 	public synchronized int size() {
 		return this.msoProperties.size();
 	}
 	
-
+	public synchronized String decrypt(String toDecrypt, String msokey){
+		String result = null;
+		try {
+			result = CryptoUtils.decrypt(toDecrypt, msokey);
+			
+		}
+		catch (Exception e) {
+			LOGGER.debug("Failed to decrypt credentials: " + toDecrypt, e);
+		}
+		return result;
+	}	
+	
 	@Override
 	protected synchronized void reloadPropertiesFile() throws IOException {
 		this.loadPropertiesFile(this.propertiesFileName);
@@ -181,4 +217,12 @@
 
 		return response.toString();
 	}
+	 
+    public Map<String, String> asMap() {
+        final Map<String, String> result = new HashMap<>();
+        msoProperties.forEach((key, value) -> result.put(key.toString(), value.toString()));
+        
+        return result;
+    }
+
 }
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/CloudConfiguration.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/CloudConfiguration.java
new file mode 100644
index 0000000..cb5a101
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/CloudConfiguration.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "cloudConfiguration")
+@JsonInclude(Include.NON_DEFAULT)
+public class CloudConfiguration implements Serializable {
+
+	private static final long serialVersionUID = 6260165690180745471L;
+	@JsonProperty("aicNodeClli")
+    protected String aicNodeClli;
+	@JsonProperty("tenantId")
+    protected String tenantId;
+	@JsonProperty("lcpCloudRegionId")
+    protected String lcpCloudRegionId;
+
+    /**
+     * Gets the value of the aicNodeClli property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getAicNodeClli() {
+        return aicNodeClli;
+    }
+
+    /**
+     * Sets the value of the aicNodeClli property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setAicNodeClli(String value) {
+        this.aicNodeClli = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+
+
+	public String getLcpCloudRegionId() {
+		return lcpCloudRegionId;
+	}
+
+	public void setLcpCloudRegionId(String lcpCloudRegionId) {
+		this.lcpCloudRegionId = lcpCloudRegionId;
+	}
+
+	@Override
+	public String toString() {
+		return "CloudConfiguration [aicNodeClli=" + aicNodeClli + ", tenantId="
+				+ tenantId + ", lcpCloudRegionId=" + lcpCloudRegionId + "]";
+	}
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ExceptionType.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ExceptionType.java
new file mode 100644
index 0000000..d7dcea3
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ExceptionType.java
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.05.03 at 03:56:30 PM CDT 
+//
+
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for exceptionType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="exceptionType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="text" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="variables" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="50" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "exceptionType", propOrder = {
+    "messageId",
+    "text",
+    "variables"
+})
+@XmlSeeAlso({
+    ServiceException.class,
+    PolicyException.class
+})
+public class ExceptionType {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    @XmlElement(required = true)
+    protected String text;
+    protected List<String> variables;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the text property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * Sets the value of the text property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setText(String value) {
+        this.text = value;
+    }
+
+    /**
+     * Gets the value of the variables property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the variables property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVariables().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getVariables() {
+        if (variables == null) {
+            variables = new ArrayList<>();
+        }
+        return this.variables;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/GetOrchestrationListResponse.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/GetOrchestrationListResponse.java
new file mode 100644
index 0000000..5cee0fa
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/GetOrchestrationListResponse.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+@JsonInclude(Include.NON_DEFAULT)
+public class GetOrchestrationListResponse {
+	
+	protected List<RequestList> requestList;
+
+	public List<RequestList> getRequestList() {
+		return requestList;
+	}
+
+	public void setRequestList(List<RequestList> requestList) {
+		this.requestList = requestList;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/GetOrchestrationResponse.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/GetOrchestrationResponse.java
new file mode 100644
index 0000000..54b1b3b
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/GetOrchestrationResponse.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+@JsonInclude(Include.NON_DEFAULT)
+public class GetOrchestrationResponse {
+	
+	protected Request request;
+
+	public Request getRequest() {
+		return request;
+	}
+
+	public void setRequest(Request request) {
+		this.request = request;
+	}
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/InstanceDirection.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/InstanceDirection.java
new file mode 100644
index 0000000..3334db7
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/InstanceDirection.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+public enum InstanceDirection {
+
+    source,
+    destination;
+
+    public String value() {
+        return name();
+    }
+
+    public static InstanceDirection fromValue(String v) {
+        return valueOf(v);
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/InstanceReferences.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/InstanceReferences.java
new file mode 100644
index 0000000..c442188
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/InstanceReferences.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+@JsonInclude(Include.NON_DEFAULT)
+public class InstanceReferences {
+
+	protected String serviceInstanceId;
+	protected String serviceInstanceName;
+	protected String vnfInstanceId;
+	protected String vnfInstanceName;
+	protected String vfModuleInstanceId;
+	protected String vfModuleInstanceName;
+	protected String volumeGroupInstanceId;
+	protected String volumeGroupInstanceName;
+	protected String networkInstanceId;
+	protected String networkInstanceName;
+	protected String requestorId;
+
+
+	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 getVnfInstanceId() {
+		return vnfInstanceId;
+	}
+	public void setVnfInstanceId(String vnfInstanceId) {
+		this.vnfInstanceId = vnfInstanceId;
+	}
+	public String getVnfInstanceName() {
+		return vnfInstanceName;
+	}
+	public void setVnfInstanceName(String vnfInstanceName) {
+		this.vnfInstanceName = vnfInstanceName;
+	}
+	public String getVfModuleInstanceId() {
+		return vfModuleInstanceId;
+	}
+	public void setVfModuleInstanceId(String vfModuleInstanceId) {
+		this.vfModuleInstanceId = vfModuleInstanceId;
+	}
+	public String getVfModuleInstanceName() {
+		return vfModuleInstanceName;
+	}
+	public void setVfModuleInstanceName(String vfModuleInstanceName) {
+		this.vfModuleInstanceName = vfModuleInstanceName;
+	}
+	public String getVolumeGroupInstanceId() {
+		return volumeGroupInstanceId;
+	}
+	public void setVolumeGroupInstanceId(String volumeGroupInstanceId) {
+		this.volumeGroupInstanceId = volumeGroupInstanceId;
+	}
+	public String getVolumeGroupInstanceName() {
+		return volumeGroupInstanceName;
+	}
+	public void setVolumeGroupInstanceName(String volumeGroupInstanceName) {
+		this.volumeGroupInstanceName = volumeGroupInstanceName;
+	}
+	public String getNetworkInstanceId() {
+		return networkInstanceId;
+	}
+	public void setNetworkInstanceId(String networkInstanceId) {
+		this.networkInstanceId = networkInstanceId;
+	}
+	public String getNetworkInstanceName() {
+		return networkInstanceName;
+	}
+	public void setNetworkInstanceName(String networkInstanceName) {
+		this.networkInstanceName = networkInstanceName;
+	}
+
+	public String getRequestorId() {
+		return requestorId;
+	}
+
+	public void setRequestorId(String requestorId) {
+		this.requestorId = requestorId;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/LineOfBusiness.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/LineOfBusiness.java
new file mode 100644
index 0000000..818d5e0
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/LineOfBusiness.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "lineOfBusiness")
+@JsonInclude(Include.NON_DEFAULT)
+public class LineOfBusiness implements Serializable {
+	
+	private static final long serialVersionUID = -8574860788160041209L;
+	@JsonProperty("lineOfBusinessName")
+	private String lineOfBusinessName;
+	
+	public String getLineOfBusinessName(){
+		return lineOfBusinessName;
+	}
+	public void setLineOfBusinessName(String value){
+		this.lineOfBusinessName = value;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ModelInfo.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ModelInfo.java
new file mode 100644
index 0000000..f91dd10
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ModelInfo.java
@@ -0,0 +1,154 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2016.03.30 at 02:48:23 PM CDT
+//
+
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "modelInfo")
+@JsonInclude(Include.NON_DEFAULT)
+public class ModelInfo implements Serializable {
+
+	private static final long serialVersionUID = 5281763573935476852L;
+	@JsonProperty("modelCustomizationName")
+    protected String modelCustomizationName;
+	@JsonProperty("modelInvariantId")
+    protected String modelInvariantId;
+	@JsonProperty("modelType")
+	protected ModelType modelType;
+	//v2
+	@JsonProperty("modelNameVersionId")
+    protected String modelNameVersionId;
+	@JsonProperty("modelName")
+    protected String modelName;
+	@JsonProperty("modelVersion")
+    protected String modelVersion;
+	@JsonProperty("modelCustomizationUuid")
+    protected String modelCustomizationUuid;
+    //v3
+	@JsonProperty("modelVersionId")
+    protected String modelVersionId;
+	@JsonProperty("modelCustomizationId")
+    protected String modelCustomizationId;
+    //Decomposition fields
+	@JsonProperty("modelUuid")
+    protected String modelUuid;
+	@JsonProperty("modelInvariantUuid")
+	protected String modelInvariantUuid;
+	@JsonProperty("modelInstanceName")
+    protected String modelInstanceName;
+
+	public String getModelCustomizationName() {
+		return modelCustomizationName;
+	}
+	public void setModelCustomizationName(String modelCustomizationName) {
+		this.modelCustomizationName = modelCustomizationName;
+	}
+	public String getModelNameVersionId() {
+		return modelNameVersionId;
+	}
+	public void setModelNameVersionId(String modelNameVersionId) {
+		this.modelNameVersionId = modelNameVersionId;
+	}
+	public String getModelName() {
+		return modelName;
+	}
+	public void setModelName(String modelName) {
+		this.modelName = modelName;
+	}
+	public String getModelVersion() {
+		return modelVersion;
+	}
+	public void setModelVersion(String modelVersion) {
+		this.modelVersion = modelVersion;
+	}
+	public ModelType getModelType() {
+		return modelType;
+	}
+	public void setModelType(ModelType modelType) {
+		this.modelType = modelType;
+	}
+	public String getModelInvariantId() {
+		return modelInvariantId;
+	}
+	public void setModelInvariantId(String modelInvariantId) {
+		this.modelInvariantId = modelInvariantId;
+	}
+	public String getModelCustomizationUuid() {
+		return modelCustomizationUuid;
+	}
+	public void setModelCustomizationUuid(String modelCustomizationUuid) {
+		this.modelCustomizationUuid = modelCustomizationUuid;
+	}
+	public String getModelVersionId() {
+		return modelVersionId;
+	}
+	public void setModelVersionId(String modelVersionId) {
+		this.modelVersionId = modelVersionId;
+	}
+	public String getModelCustomizationId() {
+		return modelCustomizationId;
+	}
+	public void setModelCustomizationId(String modelCustomizationId) {
+		this.modelCustomizationId = modelCustomizationId;
+	}
+    public String getModelUuid() {
+		return modelUuid;
+	}
+	public void setModelUuid(String modelUuid) {
+		this.modelUuid = modelUuid;
+	}
+	public String getModelInvariantUuid() {
+		return modelInvariantUuid;
+	}
+	public void setModelInvariantUuid(String modelInvariantUuid) {
+		this.modelInvariantUuid = modelInvariantUuid;
+	}
+	public String getModelInstanceName() {
+		return modelInstanceName;
+	}
+	public void setModelInstanceName(String modelInstanceName) {
+		this.modelInstanceName = modelInstanceName;
+	}
+	@Override
+	public String toString() {
+		return "ModelInfo [modelCustomizationName=" + modelCustomizationName + ", modelInvariantId=" + modelInvariantId
+				+ ", modelType=" + modelType + ", modelNameVersionId=" + modelNameVersionId + ", modelName=" + modelName
+				+ ", modelVersion=" + modelVersion + ", modelCustomizationUuid=" + modelCustomizationUuid
+				+ ", modelVersionId=" + modelVersionId + ", modelCustomizationId=" + modelCustomizationId
+				+ ", modelUuid=" + modelUuid + ", modelInvariantUuid=" + modelInvariantUuid + ", modelInstanceName="
+				+ modelInstanceName + "]";
+	}
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ModelType.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ModelType.java
new file mode 100644
index 0000000..c7e6615
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ModelType.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+/*
+ * Enum for Model Type values returned by API Handler to BPMN
+*/
+public enum ModelType {
+	service,
+	vnf,
+	vfModule,
+	volumeGroup,
+	network,
+	configuration,
+	connectionPoint,
+	pnf
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/OwningEntity.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/OwningEntity.java
new file mode 100644
index 0000000..985de7d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/OwningEntity.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "owningEntity")
+@JsonInclude(Include.NON_DEFAULT)
+public class OwningEntity implements Serializable {
+	
+	private static final long serialVersionUID = -3907033130633428448L;
+	@JsonProperty("owningEntityId")
+	private String owningEntityId;
+	@JsonProperty("owningEntityName")
+	private String owningEntityName;
+	
+	public String getOwningEntityId(){
+		return owningEntityId;
+	}
+
+	public void setOwningEntityId(String value) {
+		this.owningEntityId = value;
+	}
+	
+	public String getOwningEntityName(){
+		return owningEntityName;
+	}
+	
+	public void setOwningEntityName(String value){
+		this.owningEntityName = value;
+	}
+	@Override
+	public String toString() {
+		return "OwningEntity [owningEntityId=" + owningEntityId
+				+ ", owningEntityName=" + owningEntityName + "]";
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Platform.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Platform.java
new file mode 100644
index 0000000..37841e0
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Platform.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonInclude(Include.NON_DEFAULT)
+@JsonRootName(value = "platform")
+public class Platform implements Serializable {
+	
+	private static final long serialVersionUID = -7334479240678605536L;
+	@JsonProperty("platformName")
+	private String platformName;
+	
+	public String getPlatformName(){
+		return platformName;
+	}
+	public void setPlatformName(String value){
+		this.platformName = value;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/PolicyException.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/PolicyException.java
new file mode 100644
index 0000000..0afd600
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/PolicyException.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.30 at 02:48:23 PM CDT 
+//
+
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for policyException complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="policyException">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://org.openecomp/mso/request/types/v1}exceptionType">
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "policyException")
+public class PolicyException
+    extends ExceptionType
+{
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Project.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Project.java
new file mode 100644
index 0000000..d073616
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Project.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "project")
+@JsonInclude(Include.NON_DEFAULT)
+public class Project implements Serializable {
+	
+	private static final long serialVersionUID = -3868114191925177035L;
+	@JsonProperty("projectName")
+	private String projectName;
+	
+	public String getProjectName(){
+		return projectName;
+	}
+
+	public void setProjectName(String value) {
+		this.projectName = value;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RelatedInstance.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RelatedInstance.java
new file mode 100644
index 0000000..8e4dbd0
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RelatedInstance.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "relatedInstance")
+@JsonInclude(Include.NON_DEFAULT)
+public class RelatedInstance implements Serializable {
+	
+	private static final long serialVersionUID = 137250604008221644L;
+	@JsonProperty("instanceName")
+	protected String instanceName;
+	@JsonProperty("instanceId")
+	protected String instanceId;
+	@JsonProperty("modelInfo")
+	protected ModelInfo modelInfo;
+	//Configuration field
+	@JsonProperty("instanceDirection")
+	protected InstanceDirection instanceDirection;
+	
+	
+	public String getInstanceName() {
+		return instanceName;
+	}
+	public void setInstanceName(String instanceName) {
+		this.instanceName = instanceName;
+	}
+	public String getInstanceId() {
+		return instanceId;
+	}
+	public void setInstanceId(String instanceId) {
+		this.instanceId = instanceId;
+	}
+	public ModelInfo getModelInfo() {
+		return modelInfo;
+	}
+	public void setModelInfo(ModelInfo modelInfo) {
+		this.modelInfo = modelInfo;
+	}
+	public InstanceDirection getInstanceDirection() {
+		return instanceDirection;
+	}
+	public void setInstanceDirection(InstanceDirection instanceDirection) {
+		this.instanceDirection = instanceDirection;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RelatedInstanceList.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RelatedInstanceList.java
new file mode 100644
index 0000000..b11accc
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RelatedInstanceList.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "relatedInstanceList")
+@JsonInclude(Include.NON_DEFAULT)
+public class RelatedInstanceList implements Serializable {
+
+	private static final long serialVersionUID = 6333898302094446243L;
+	@JsonProperty("relatedInstance")
+	protected RelatedInstance relatedInstance;
+
+	public RelatedInstance getRelatedInstance() {
+		return relatedInstance;
+	}
+
+	public void setRelatedInstance(RelatedInstance relatedInstance) {
+		this.relatedInstance = relatedInstance;
+	}
+
+	@Override
+	public String toString() {
+		return "RelatedInstanceList [relatedInstance=" + relatedInstance + "]";
+	}
+
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Request.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Request.java
new file mode 100644
index 0000000..ef9020d
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/Request.java
@@ -0,0 +1,83 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+//@JsonRootName(value = "request")
+@JsonInclude(Include.NON_DEFAULT)
+public class Request {
+
+    protected String requestId;
+    protected String startTime;
+    protected String requestScope;
+    protected String requestType;
+    //protected String requestDetails;
+    protected RequestDetails requestDetails;
+    protected InstanceReferences instanceReferences;
+    protected RequestStatus requestStatus;
+    
+    
+	public String getRequestId() {
+		return requestId;
+	}
+	public void setRequestId(String requestId) {
+		this.requestId = requestId;
+	}
+	public String getStartTime() {
+		return startTime;
+	}
+	public void setStartTime(String startTime) {
+		this.startTime = startTime;
+	}
+	public String getRequestScope() {
+		return requestScope;
+	}
+	public void setRequestScope(String requestScope) {
+		this.requestScope = requestScope;
+	}
+	public String getRequestType() {
+		return requestType;
+	}
+	public void setRequestType(String requestType) {
+		this.requestType = requestType;
+	}
+	public RequestStatus getRequestStatus() {
+		return requestStatus;
+	}
+	public void setRequestStatus(RequestStatus requestStatus) {
+		this.requestStatus = requestStatus;
+	}
+	public InstanceReferences getInstanceReferences() {
+		return instanceReferences;
+	}
+	public void setInstanceReferences(InstanceReferences instanceReferences) {
+		this.instanceReferences = instanceReferences;
+	}
+	public RequestDetails getRequestDetails() {
+		return requestDetails;
+	}
+	public void setRequestDetails(RequestDetails requestDetails) {
+		this.requestDetails = requestDetails;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestDetails.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestDetails.java
new file mode 100644
index 0000000..2bae526
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestDetails.java
@@ -0,0 +1,280 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "requestDetails")
+@JsonInclude(Include.NON_DEFAULT)
+public class RequestDetails implements Serializable {
+
+	private static final long serialVersionUID = -73080684945860609L;
+	@JsonProperty("modelInfo")
+    protected ModelInfo modelInfo;
+	@JsonProperty("requestInfo")
+    protected RequestInfo requestInfo;
+	@JsonProperty("relatedInstanceList")
+    protected RelatedInstanceList[] relatedInstanceList;
+	@JsonProperty("subscriberInfo")
+    protected SubscriberInfo subscriberInfo;
+	@JsonProperty("cloudConfiguration")
+    protected CloudConfiguration cloudConfiguration;
+	@JsonProperty("requestParameters")
+    protected RequestParameters requestParameters;
+	@JsonProperty("project")
+    protected Project project;
+	@JsonProperty("owningEntity")
+    protected OwningEntity owningEntity;
+	@JsonProperty("platform")
+    protected Platform platform;
+	@JsonProperty("lineOfBusiness")
+    protected LineOfBusiness lineOfBusiness;
+    /**
+     * Gets the value of the serviceInfo property.
+     *
+     * @return
+     *     possible object is
+     *     {@link ModelInfo }
+     *
+     */
+    public ModelInfo getModelInfo() {
+        return modelInfo;
+    }
+
+    /**
+     * Sets the value of the serviceInfo property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link ModelInfo }
+     *
+     */
+    public void setModelInfo(ModelInfo value) {
+        this.modelInfo = value;
+    }
+
+    /**
+     * Gets the value of the requestInfo property.
+     *
+     * @return
+     *     possible object is
+     *     {@link RequestInfo }
+     *
+     */
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    /**
+     * Sets the value of the requestInfo property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link RequestInfo }
+     *
+     */
+    public void setRequestInfo(RequestInfo value) {
+        this.requestInfo = value;
+    }
+
+    /**
+     * Gets the value of the subscriberInfo property.
+     *
+     * @return
+     *     possible object is
+     *     {@link SubscriberInfo }
+     *
+     */
+    public SubscriberInfo getSubscriberInfo() {
+        return subscriberInfo;
+    }
+
+    /**
+     * Sets the value of the subscriberInfo property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link SubscriberInfo }
+     *
+     */
+    public void setSubscriberInfo(SubscriberInfo value) {
+        this.subscriberInfo = value;
+    }
+
+    /**
+     * Gets the value of the cloudConfiguration property.
+     *
+     * @return
+     *     possible object is
+     *     {@link CloudConfiguration }
+     *
+     */
+    public CloudConfiguration getCloudConfiguration() {
+        return cloudConfiguration;
+    }
+
+    /**
+     * Sets the value of the cloudConfiguration property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link CloudConfiguration }
+     *
+     */
+    public void setCloudConfiguration(CloudConfiguration value) {
+        this.cloudConfiguration = value;
+    }
+
+    /**
+     * Gets the value of the requestParameters property.
+     *
+     * @return
+     *     possible object is
+     *     {@link RequestParameters }
+     *
+     */
+    public RequestParameters getRequestParameters() {
+        return requestParameters;
+    }
+
+    /**
+     * Sets the value of the requestParameters property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link RequestParameters }
+     *
+     */
+    public void setRequestParameters(RequestParameters value) {
+        this.requestParameters = value;
+    }
+
+	public RelatedInstanceList[] getRelatedInstanceList() {
+		return relatedInstanceList;
+	}
+
+	public void setRelatedInstanceList(RelatedInstanceList[] relatedInstanceList) {
+		this.relatedInstanceList = relatedInstanceList;
+	}
+	/**
+	 * Gets the value of the project property.
+	 *
+	 * @return
+	 *     possible object is
+	 *     {@link Project }
+	 *
+	 */
+	public Project getProject(){
+		return project;
+	}
+	/**
+     * Sets the value of the project property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Project }
+     *
+     */
+	public void setProject(Project value){
+		this.project = value;
+	}
+	/**
+	 * Gets the value of the owningEntity property.
+	 *
+	 * @return
+	 *     possible object is
+	 *     {@link OwningEntity }
+	 *
+	 */
+	public OwningEntity getOwningEntity(){
+		return owningEntity;
+	}
+	/**
+     * Sets the value of the owningEntity property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link OwningEntity }
+     *
+     */
+	public void setOwningEntity(OwningEntity value){
+		this.owningEntity = value;
+	}
+	/**
+     * Gets the value of the platform property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Platform }
+     *
+     */
+	public Platform getPlatform(){
+		return platform;
+	}
+	/**
+     * Sets the value of the platform property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Platform }
+     *
+     */
+	public void setPlatform(Platform value){
+		this.platform = value;
+	}
+	/**
+     * Gets the value of the lineOfBusiness property.
+     *
+     * @return
+     *     possible object is
+     *     {@link LineOfBusiness }
+     *
+     */
+	public LineOfBusiness getLineOfBusiness(){
+		return lineOfBusiness;
+	}
+	/**
+     * Sets the value of the lineOfBusiness property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link LineOfBusiness }
+     *
+     */
+	public void setLineOfBusiness(LineOfBusiness value){
+		this.lineOfBusiness = value;
+	}
+	@Override
+	public String toString() {
+		return "RequestDetails [modelInfo=" + modelInfo + ", requestInfo="
+				+ requestInfo + ", relatedInstanceList="
+				+ Arrays.toString(relatedInstanceList) + ", subscriberInfo="
+				+ subscriberInfo + ", cloudConfiguration=" + cloudConfiguration
+				+ ", requestParameters=" + requestParameters + ", platform=" + platform 
+				+ ", lineOfBusiness=" + ", project=" + project + ", owningEntity=" + owningEntity + "]";
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestError.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestError.java
new file mode 100644
index 0000000..d57364a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestError.java
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.04.07 at 08:25:52 AM CDT 
+//
+
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;choice>
+ *           &lt;element name="policyException" type="{http://org.openecomp/mso/request/types/v1}policyException"/>
+ *           &lt;element name="serviceException" type="{http://org.openecomp/mso/request/types/v1}serviceException"/>
+ *         &lt;/choice>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "policyException",
+    "serviceException"
+})
+@XmlRootElement(name = "requestError")
+public class RequestError {
+
+    protected PolicyException policyException;
+    protected ServiceException serviceException;
+
+    /**
+     * Gets the value of the policyException property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PolicyException }
+     *     
+     */
+    public PolicyException getPolicyException() {
+        return policyException;
+    }
+
+    /**
+     * Sets the value of the policyException property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PolicyException }
+     *     
+     */
+    public void setPolicyException(PolicyException value) {
+        this.policyException = value;
+    }
+
+    /**
+     * Gets the value of the serviceException property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ServiceException }
+     *     
+     */
+    public ServiceException getServiceException() {
+        return serviceException;
+    }
+
+    /**
+     * Sets the value of the serviceException property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ServiceException }
+     *     
+     */
+    public void setServiceException(ServiceException value) {
+        this.serviceException = value;
+    }
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestInfo.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestInfo.java
new file mode 100644
index 0000000..d1e489a
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestInfo.java
@@ -0,0 +1,239 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+@JsonRootName(value = "requestInfo")
+@JsonInclude(Include.NON_DEFAULT)
+public class RequestInfo implements Serializable {
+
+	private static final long serialVersionUID = -1370946827136030181L;
+	@JsonProperty("billingAccountNumber")
+	protected String billingAccountNumber;
+	@JsonProperty("callbackUrl")
+	protected String callbackUrl;
+	@JsonProperty("correlator")
+    protected String correlator;
+	@JsonProperty("orderNumber")
+    protected String orderNumber;
+	@JsonProperty("productFamilyId")
+    protected String productFamilyId;
+	@JsonProperty("orderVersion")
+    protected Integer orderVersion;
+    @JsonSerialize(include=Inclusion.ALWAYS)
+	@JsonProperty("source")
+    protected String source;
+	@JsonProperty("instanceName")
+    protected String instanceName;
+	@JsonProperty("suppressRollback")
+    @JsonSerialize(include=Inclusion.ALWAYS)
+    protected boolean suppressRollback;
+	@JsonProperty("requestorId")
+    protected String requestorId;
+
+    /**
+     * Gets the value of the callbackUrl property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getCallbackUrl() {
+        return callbackUrl;
+    }
+
+    /**
+     * Sets the value of the callbackUrl property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setCallbackUrl(String value) {
+        this.callbackUrl = value;
+    }
+
+    /**
+     * Gets the value of the correlator property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getCorrelator() {
+        return correlator;
+    }
+
+    /**
+     * Sets the value of the correlator property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setCorrelator(String value) {
+        this.correlator = value;
+    }
+
+    /**
+     * Gets the value of the orderNumber property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    /**
+     * Sets the value of the orderNumber property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setOrderNumber(String value) {
+        this.orderNumber = value;
+    }
+
+    /**
+     * Gets the value of the orderVersion property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Integer }
+     *
+     */
+    public Integer getOrderVersion() {
+        return orderVersion;
+    }
+
+    /**
+     * Sets the value of the orderVersion property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Integer }
+     *
+     */
+    public void setOrderVersion(Integer value) {
+        this.orderVersion = value;
+    }
+
+    /**
+     * Gets the value of the source property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getSource() {
+    	if(null == source || source.isEmpty()){
+    		source = "VID";
+    	}
+        return source;
+    }
+
+    /**
+     * Sets the value of the source property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setSource(String value) {
+        this.source = value;
+    }
+
+	public String getInstanceName() {
+		return instanceName;
+	}
+
+	public void setInstanceName(String instanceName) {
+		this.instanceName = instanceName;
+	}
+
+	public String getBillingAccountNumber() {
+		return billingAccountNumber;
+	}
+
+	public void setBillingAccountNumber(String billingAccountNumber) {
+		this.billingAccountNumber = billingAccountNumber;
+	}
+
+	public String getProductFamilyId() {
+		return productFamilyId;
+	}
+
+	public void setProductFamilyId(String productFamilyId) {
+		this.productFamilyId = productFamilyId;
+	}
+
+	/**
+	 * Required for Marshalers to send the fields.
+	 * @return
+	 */
+	public boolean getSuppressRollback() {
+		return suppressRollback;
+	}
+
+	public void setSuppressRollback(boolean suppressRollback) {
+		this.suppressRollback = suppressRollback;
+	}
+
+	public String getRequestorId() {
+		return requestorId;
+	}
+
+	public void setRequestorId(String requestorId) {
+		this.requestorId = requestorId;
+	}
+
+	@Override
+	public String toString() {
+		return "RequestInfo [billingAccountNumber=" + billingAccountNumber
+				+ ", callbackUrl=" + callbackUrl + ", correlator=" + correlator
+				+ ", orderNumber=" + orderNumber + ", productFamilyId="
+				+ productFamilyId + ", orderVersion=" + orderVersion
+				+ ", source=" + source + ", instanceName=" + instanceName
+				+ ", suppressRollback=" + suppressRollback + ", requestorId="
+				+ requestorId + "]";
+	}
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestList.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestList.java
new file mode 100644
index 0000000..05e1ab9
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestList.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.util.List;
+
+
+public class RequestList {
+
+    protected Request request;
+
+	public Request getRequest() {
+		return request;
+	}
+
+	public void setRequest(Request request) {
+		this.request = request;
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestParameters.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestParameters.java
new file mode 100644
index 0000000..ba65c08
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestParameters.java
@@ -0,0 +1,141 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "requestParameters")
+@JsonInclude(Include.NON_DEFAULT)
+public class RequestParameters implements Serializable {
+
+	private static final long serialVersionUID = -5979049912538894930L;
+	@JsonProperty("subscriptionServiceType")
+	private String subscriptionServiceType;
+	@JsonProperty("userParams")
+	private List<Map<String, Object>> userParams = new ArrayList<>();
+	@JsonProperty("aLaCarte")
+	private Boolean aLaCarte;
+	@JsonProperty("autoBuildVfModules")
+	private Boolean autoBuildVfModules;
+	@JsonProperty("cascadeDelete")
+	private Boolean cascadeDelete;
+	@JsonProperty("usePreload")
+	private Boolean usePreload; // usePreload would always be true for Update
+	@JsonProperty("rebuildVolumeGroups")
+	private Boolean rebuildVolumeGroups;
+	@JsonProperty("payload")
+	private String payload;
+
+	public String getSubscriptionServiceType() {
+		return subscriptionServiceType;
+	}
+
+	public void setSubscriptionServiceType(String subscriptionServiceType) {
+		this.subscriptionServiceType = subscriptionServiceType;
+	}
+
+	public Boolean getALaCarte() {
+		return aLaCarte;
+	}
+
+	public void setaLaCarte(boolean aLaCarte) {
+		this.aLaCarte = aLaCarte;
+	}
+	
+	public Boolean isaLaCarte() {
+		return aLaCarte;
+	}
+
+	public List<Map<String, Object>> getUserParams() {
+		return userParams;
+	}
+
+	public void setUserParams(List<Map<String, Object>> userParams) {
+		this.userParams = userParams;
+	}
+
+	public String getUserParamValue(String name){
+		if(userParams!=null){
+			for(Map<String, Object> param:userParams){
+				if(param.get("name").equals(name)){
+					return param.get("value").toString();
+				}
+			}
+		}
+		return null;
+	}
+
+	public Boolean getAutoBuildVfModules() {
+		return autoBuildVfModules;
+	}
+
+	public void setAutoBuildVfModules(boolean autoBuildVfModules) {
+		this.autoBuildVfModules = autoBuildVfModules;
+	}
+
+	public Boolean getCascadeDelete() {
+		return cascadeDelete;
+	}
+
+	public void setCascadeDelete(boolean cascadeDelete) {
+		this.cascadeDelete = cascadeDelete;
+	}
+
+	public Boolean isUsePreload() {
+		return usePreload;
+	}
+
+	public void setUsePreload(boolean usePreload) {
+		this.usePreload = usePreload;
+	}
+	
+	public Boolean rebuildVolumeGroups() {
+		return rebuildVolumeGroups;
+	}
+
+	public void setRebuildVolumeGroups(boolean rebuildVolumeGroups) {
+		this.rebuildVolumeGroups = rebuildVolumeGroups;
+	}
+	public String getPayload(){
+		return payload;
+	}
+	public void setPayload(String value){
+		this.payload = value;
+	}
+	
+	@Override
+	public String toString() {
+		return "RequestParameters [subscriptionServiceType="
+				+ subscriptionServiceType + ", userParams=" + userParams
+				+ ", aLaCarte=" + aLaCarte + ", autoBuildVfModules="
+				+ autoBuildVfModules + ", usePreload="
+				+ usePreload + ", rebuildVolumeGroups="
+				+ rebuildVolumeGroups + ", payload=" + payload + "]";
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestReferences.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestReferences.java
new file mode 100644
index 0000000..b01dfd9
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestReferences.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+public class RequestReferences {
+	
+	String requestId;
+	String instanceId;
+	
+	
+	public String getRequestId() {
+		return requestId;
+	}
+	public void setRequestId(String requestId) {
+		this.requestId = requestId;
+	}
+	public String getInstanceId() {
+		return instanceId;
+	}
+	public void setInstanceId(String instanceId) {
+		this.instanceId = instanceId;
+	}
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestStatus.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestStatus.java
new file mode 100644
index 0000000..58a9c2c
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/RequestStatus.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+@JsonInclude(Include.NON_DEFAULT)
+public class RequestStatus {
+
+    protected String requestState;
+    protected String statusMessage;
+    protected Integer percentProgress;
+    protected String finishTime;
+
+
+	public String getRequestState() {
+		return requestState;
+	}
+	public void setRequestState(String requestState) {
+		this.requestState = requestState;
+	}
+	public String getStatusMessage() {
+		return statusMessage;
+	}
+	public void setStatusMessage(String statusMessage) {
+		this.statusMessage = statusMessage;
+	}
+	public Integer getPercentProgress() {
+		return percentProgress;
+	}
+	public void setPercentProgress(Integer percentProgress) {
+		this.percentProgress = percentProgress;
+	}
+	public String getFinishTime() {
+		return finishTime;
+	}
+	public void setFinishTime(String finishTime) {
+		this.finishTime = finishTime;
+	}
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceException.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceException.java
new file mode 100644
index 0000000..5eacefe
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceException.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2016.03.30 at 02:48:23 PM CDT 
+//
+
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for serviceException complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="serviceException">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://org.openecomp/mso/request/types/v1}exceptionType">
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "serviceException")
+public class ServiceException
+    extends ExceptionType
+{
+
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceInstancesRequest.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceInstancesRequest.java
new file mode 100644
index 0000000..4f8c1a0
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceInstancesRequest.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ServiceInstancesRequest implements Serializable {
+
+	private static final long serialVersionUID = -4959169541182257787L;
+	@JsonProperty("requestDetails")
+	private RequestDetails requestDetails;
+	@JsonProperty("serviceInstanceId")
+	private String serviceInstanceId;
+	@JsonProperty("vnfInstanceId")
+	private String vnfInstanceId;
+	@JsonProperty("networkInstanceId")
+	private String networkInstanceId;
+	@JsonProperty("volumeGroupInstanceId")
+	private String volumeGroupInstanceId;
+	@JsonProperty("vfModuleInstanceId")
+	private String vfModuleInstanceId;
+	@JsonProperty("configurationId")
+	private String configurationId;
+
+	public RequestDetails getRequestDetails() {
+		return requestDetails;
+	}
+
+	public void setRequestDetails(RequestDetails requestDetails) {
+		this.requestDetails = requestDetails;
+	}
+
+	public String getServiceInstanceId() {
+		return serviceInstanceId;
+	}
+
+	public void setServiceInstanceId(String serviceInstanceId) {
+		this.serviceInstanceId = serviceInstanceId;
+	}
+
+	public String getVnfInstanceId() {
+		return vnfInstanceId;
+	}
+
+	public void setVnfInstanceId(String vnfInstanceId) {
+		this.vnfInstanceId = vnfInstanceId;
+	}
+
+	public String getNetworkInstanceId() {
+		return networkInstanceId;
+	}
+
+	public void setNetworkInstanceId(String networkInstanceId) {
+		this.networkInstanceId = networkInstanceId;
+	}
+
+	public String getVolumeGroupInstanceId() {
+		return volumeGroupInstanceId;
+	}
+
+	public void setVolumeGroupInstanceId(String volumeGroupInstanceId) {
+		this.volumeGroupInstanceId = volumeGroupInstanceId;
+	}
+
+	public String getVfModuleInstanceId() {
+		return vfModuleInstanceId;
+	}
+
+	public void setVfModuleInstanceId(String vfModuleInstanceId) {
+		this.vfModuleInstanceId = vfModuleInstanceId;
+	}
+
+	public String getConfigurationId() {
+		return configurationId;
+	}
+
+	public void setConfigurationId(String configurationId) {
+		this.configurationId = configurationId;
+	}
+
+	@Override
+	public String toString() {
+		return "ServiceInstancesRequest [requestDetails=" + requestDetails
+				+ ", serviceInstanceId=" + serviceInstanceId
+				+ ", vnfInstanceId=" + vnfInstanceId + ", networkInstanceId="
+				+ networkInstanceId + ", volumeGroupInstanceId="
+				+ volumeGroupInstanceId + ", vfModuleInstanceId="
+				+ vfModuleInstanceId + ", configurationId="
+				+ configurationId + ",]";
+	}
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceInstancesResponse.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceInstancesResponse.java
new file mode 100644
index 0000000..339c965
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/ServiceInstancesResponse.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+public class ServiceInstancesResponse {
+	
+	RequestReferences requestReferences;
+
+	public RequestReferences getRequestReferences() {
+		return requestReferences;
+	}
+
+	public void setRequestReferences(RequestReferences requestReferences) {
+		this.requestReferences = requestReferences;
+	}
+	
+
+}
diff --git a/common/src/main/java/org/openecomp/mso/serviceinstancebeans/SubscriberInfo.java b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/SubscriberInfo.java
new file mode 100644
index 0000000..47cb1f2
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/serviceinstancebeans/SubscriberInfo.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.serviceinstancebeans;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@JsonRootName(value = "subscriberInfo")
+@JsonInclude(Include.NON_DEFAULT)
+public class SubscriberInfo implements Serializable {
+
+	private static final long serialVersionUID = -1750701712128104652L;
+	@JsonProperty("globalSubscriberId")
+    protected String globalSubscriberId;
+	@JsonProperty("subscriberName")
+    protected String subscriberName;
+
+    /**
+     * Gets the value of the globalSubscriberId property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getGlobalSubscriberId() {
+        return globalSubscriberId;
+    }
+
+    /**
+     * Sets the value of the globalSubscriberId property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setGlobalSubscriberId(String value) {
+        this.globalSubscriberId = value;
+    }
+
+    /**
+     * Gets the value of the subscriberName property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getSubscriberName() {
+        return subscriberName;
+    }
+
+    /**
+     * Sets the value of the subscriberName property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setSubscriberName(String value) {
+        this.subscriberName = value;
+    }
+
+	@Override
+	public String toString() {
+		return "SubscriberInfo [globalSubscriberId=" + globalSubscriberId
+				+ ", subscriberName=" + subscriberName + "]";
+	}
+
+}
diff --git a/common/src/main/resources/ASDC.properties b/common/src/main/resources/ASDC.properties
index 5f4f0ba..f0f38a5 100644
--- a/common/src/main/resources/ASDC.properties
+++ b/common/src/main/resources/ASDC.properties
@@ -182,6 +182,11 @@
                   ASDC Controller successfully initialized|\
                   No resolution needed|\
                   ASDC client initialized
+ASDC_PROPERTIES_LOAD_SUCCESS=\
+                  MSO-ASDC-5332I|\
+                  Properties file loaded successfully|\
+                  No resolution needed|\
+                  Properties file loaded successfully                    
 ASDC_GENERAL_EXCEPTION_ARG=\
                   MSO-ASDC-9300E|\
                   Exception: {0}|\
diff --git a/common/src/main/resources/dmaap/default-consumer.properties b/common/src/main/resources/dmaap/default-consumer.properties
new file mode 100644
index 0000000..4d2ecce
--- /dev/null
+++ b/common/src/main/resources/dmaap/default-consumer.properties
@@ -0,0 +1,28 @@
+TransportType=HTTPAAF
+Latitude=47.778998
+Longitude=-122.182883
+Version=1.0
+ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/events
+Environment=TEST
+Partner=BOT_R
+routeOffer=MR1
+SubContextPath=/events/
+Protocol=http
+MethodType=GET
+contenttype=application/json
+host=http://olsd005.wnsnet.attws.com:3904
+partition=MSO
+maxBatchSize=100
+maxAgeMs=250
+group=MSO
+id=dev
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_REQ_TRACE_ON=true
+AFT_ENVIRONMENT=AFTUAT
+AFT_DME2_EP_CONN_TIMEOUT=15000
+AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000
+AFT_DME2_EP_READ_TIMEOUT_MS=50000
+sessionstickinessrequired=no
+DME2preferredRouterFilePath=src/main/resources/dmaap/empty.txt
+MessageSentThreadOccurance=50
diff --git a/common/src/main/resources/dmaap/default-publisher.properties b/common/src/main/resources/dmaap/default-publisher.properties
new file mode 100644
index 0000000..af1b481
--- /dev/null
+++ b/common/src/main/resources/dmaap/default-publisher.properties
@@ -0,0 +1,28 @@
+TransportType=HTTPAAF
+Latitude=47.778998
+Longitude=-122.182883
+Version=1.0
+ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.att.com/events
+Environment=TEST
+Partner=BOT_R
+routeOffer=MR1
+SubContextPath=/events/
+Protocol=http
+MethodType=POST
+contenttype=application/json
+host=http://olsd005.wnsnet.attws.com:3904
+partition=MSO
+maxBatchSize=100
+maxAgeMs=250
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_REQ_TRACE_ON=true
+AFT_ENVIRONMENT=AFTUAT
+AFT_DME2_EP_CONN_TIMEOUT=15000
+AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000
+AFT_DME2_EP_READ_TIMEOUT_MS=50000
+sessionstickinessrequired=no
+DME2preferredRouterFilePath=src/main/resources/dmaap/empty.txt
+MessageSentThreadOccurance=50
+
+
diff --git a/common/src/main/resources/dmaap/empty.txt b/common/src/main/resources/dmaap/empty.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/common/src/main/resources/dmaap/empty.txt
