diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/AuthenticationType.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/AuthenticationType.java
deleted file mode 100644
index 7cb2222..0000000
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/AuthenticationType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*-
- * ============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.onap.so.cloud;
-
-public enum AuthenticationType {
-	USERNAME_PASSWORD, RACKSPACE_APIKEY; 
-}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java
index ef5f823..5560282 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudConfig.java
@@ -20,22 +20,16 @@
 
 package org.onap.so.cloud;
 
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Optional;
 
-import javax.annotation.PostConstruct;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonRootName;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.CloudifyManager;
+import org.onap.so.db.catalog.client.CatalogDbClient;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
 
 /**
  * JavaBean JSON class for a CloudConfig. This bean maps a JSON-format cloud
@@ -52,61 +46,17 @@
  *
  */
 
-@Configuration
 @JsonRootName("cloud_config")
-@ConfigurationProperties(prefix="cloud_config")
+@Component
 public class CloudConfig {
 	
     private static final String CLOUD_SITE_VERSION = "2.5";
     private static final String DEFAULT_CLOUD_SITE_ID = "default";
-    
-    @JsonProperty("identity_services")
-    private Map<String, CloudIdentity> identityServices = new HashMap<>();
-    
-    @JsonProperty("cloud_sites")
-    private Map <String, CloudSite> cloudSites = new HashMap<>();
-    
-    @JsonProperty("cloudify_managers")
-    private Map <String, CloudifyManager> cloudifyManagers = new HashMap<>();
 
-    @PostConstruct
-    private void init() {
-    	for (Entry<String, CloudIdentity> entry : identityServices.entrySet()) {
-    		entry.getValue().setId(entry.getKey());
-    	}
-    	
-    	for (Entry<String, CloudSite> entry : cloudSites.entrySet()) {
-    		entry.getValue().setId(entry.getKey());
-    	}
-    	
-    	for (Entry<String, CloudifyManager> entry : cloudifyManagers.entrySet()) {
-    		entry.getValue().setId(entry.getKey());
-    	}
-    }
-    
-    /**
-     * Get a map of all identity services that have been loaded.
-     */
-    public Map<String, CloudIdentity> getIdentityServices() {
-        return identityServices;
-    }
+    @Autowired
+    private CatalogDbClient catalogDbClient;
 
     /**
-     * Get a map of all cloud sites that have been loaded.
-     */
-    public Map<String, CloudSite> getCloudSites() {
-        return cloudSites;
-    }
-
-	/**
-	 * Get a Map of all CloudifyManagers that have been loaded.
-	 * @return the Map
-	 */
-    public Map<String,CloudifyManager> getCloudifyManagers() {
-         return cloudifyManagers;
-    }
-    
-    /**
      * Get a specific CloudSites, based on an ID. The ID is first checked
      * against the regions, and if no match is found there, then against
      * individual entries to try and find one with a CLLI that matches the ID
@@ -116,39 +66,28 @@
      * @return an Optional of CloudSite object.
      */
      public synchronized Optional<CloudSite> getCloudSite(String id) {
-        if (id == null) {
-            return Optional.empty();
-        }
-        if (cloudSites.containsKey(id)) {
-            return Optional.ofNullable(cloudSites.get(id));
-        } else {
-        	return getCloudSiteWithClli(id);
-        }
-    }
-    
-    public String getCloudSiteId(CloudSite cloudSite) {
-       for(Entry<String, CloudSite> entry : this.getCloudSites().entrySet()){
-    	   if(entry.getValue().equals(cloudSite))
-    		   return entry.getKey();
-       }
-       return null;
-    }
+         if (id == null) {
+             return Optional.empty();
+         }
+         CloudSite cloudSite = catalogDbClient.getCloudSite(id);
 
+         if (cloudSite != null) {
+             return Optional.of(cloudSite);
+         } else {
+             return getCloudSiteWithClli(id);
+         }
+     }
+    
     /**
      * Get a specific CloudSites, based on a CLLI and (optional) version, which
      * will be matched against the aic_version field of the CloudSite.
      * 
      * @param clli
      *            the CLLI to match
-     * @param version
-     *            the version to match; may be null in which case any version
-     *            matches
      * @return a CloudSite, or null of no match found
      */
     private Optional<CloudSite> getCloudSiteWithClli(String clli) {
-        Optional <CloudSite> cloudSiteOptional = cloudSites.values().stream().filter(cs ->
-                cs.getClli() != null && clli.equals(cs.getClli()) && (CLOUD_SITE_VERSION.equals(cs.getAicVersion())))
-                .findAny();
+        Optional <CloudSite> cloudSiteOptional = Optional.ofNullable(catalogDbClient.getCloudSiteByClliAndAicVersion(clli,CLOUD_SITE_VERSION));
         if (cloudSiteOptional.isPresent()) {
         	return cloudSiteOptional;
         } else {
@@ -157,8 +96,7 @@
     }
 
     private Optional<CloudSite> getDefaultCloudSite(String clli) {
-        Optional<CloudSite> cloudSiteOpt = cloudSites.values().stream()
-                .filter(cs -> cs.getId().equalsIgnoreCase(DEFAULT_CLOUD_SITE_ID)).findAny();
+        Optional<CloudSite> cloudSiteOpt = Optional.ofNullable(catalogDbClient.getCloudSite(DEFAULT_CLOUD_SITE_ID));
         if (cloudSiteOpt.isPresent()) {
             CloudSite defaultCloudSite = cloudSiteOpt.get();
             CloudSite clone = new CloudSite(defaultCloudSite);
@@ -178,7 +116,7 @@
      * @return a CloudIdentity, or null of no match found
      */
     public CloudIdentity getIdentityService(String id) {
-    		return identityServices.get(id);
+        return catalogDbClient.getCloudIdentity(id);
     }
 
 	/**
@@ -187,30 +125,6 @@
 	 * @return a CloudifyManager, or null of no match found
 	 */
 	public CloudifyManager getCloudifyManager (String id) {
-			return cloudifyManagers.get(id);
-	}
-	
-	@Override
-	public String toString() {
-		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
-				.append("identityServices", getIdentityServices()).append("cloudSites", getCloudSites()).toString();
-	}
-	
-	@Override
-	public boolean equals(final Object other) {
-		if (other == null) {
-			return false;
-		}
-		if (!getClass().equals(other.getClass())) {
-			return false;
-		}
-		CloudConfig castOther = (CloudConfig) other;
-		return new EqualsBuilder().append(getIdentityServices(), castOther.getIdentityServices())
-				.append(getCloudSites(), castOther.getCloudSites()).isEquals();
-	}
-	
-	@Override
-	public int hashCode() {
-		return new HashCodeBuilder(1, 31).append(getIdentityServices()).append(getCloudSites()).toHashCode();
+        return catalogDbClient.getCloudifyManager(id);
 	}
 }
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudIdentity.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudIdentity.java
deleted file mode 100644
index 188a930..0000000
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudIdentity.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*-
- * ============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.onap.so.cloud;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.openpojo.business.annotation.BusinessKey;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-
-import java.util.Comparator;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * JavaBean JSON class for a CloudIdentity. This bean represents a cloud identity
- * service instance (i.e. a DCP node) in the NVP/AIC cloud. It will be loaded via
- * CloudConfig object, of which it is a component (a CloudConfig JSON configuration
- * file may contain multiple CloudIdentity definitions).
- *
- * Note that this is only used to access Cloud Configurations loaded from a
- * JSON config file, so there are no explicit setters.
- *
- */
-public class CloudIdentity {
-	
-    @JsonProperty
-    @BusinessKey
-    private String id;
-    @JsonProperty("identity_url")
-    @BusinessKey
-    private String identityUrl;
-    @JsonProperty("mso_id")
-    @BusinessKey
-    private String msoId;
-    @JsonProperty("mso_pass")
-    @BusinessKey
-    private String msoPass;
-    @JsonProperty("admin_tenant")
-    @BusinessKey
-    private String adminTenant;
-    @JsonProperty("member_role")
-    @BusinessKey
-    private String memberRole;
-    @JsonProperty("tenant_metadata")
-    @BusinessKey
-    private Boolean tenantMetadata;
-    @JsonProperty("identity_server_type")
-    @BusinessKey
-    private ServerType identityServerType;
-    @JsonProperty("identity_authentication_type")
-    @BusinessKey
-    private AuthenticationType identityAuthenticationType;
-    
-    public CloudIdentity() {}
-
-    public String getId () {
-        return id;
-    }
-
-    public void setId (String id) {
-        this.id = id;
-    }
-
-    public String getIdentityUrl() {
-    	return this.identityUrl;
-    }
-    public void setIdentityUrl(String url) {
-    	this.identityUrl = url;
-    }
-
-    public String getMsoId () {
-        return msoId;
-    }
-
-    public void setMsoId (String id) {
-        this.msoId = id;
-    }
-
-    public String getMsoPass () {
-        return msoPass;
-    }
-
-    public void setMsoPass (String pwd) {
-        this.msoPass = pwd;
-    }
-
-    public String getAdminTenant () {
-        return adminTenant;
-    }
-
-    public void setAdminTenant (String tenant) {
-        this.adminTenant = tenant;
-    }
-
-    public String getMemberRole () {
-        return memberRole;
-    }
-
-    public void setMemberRole (String role) {
-        this.memberRole = role;
-    }
-
-    public Boolean hasTenantMetadata () {
-        return tenantMetadata;
-    }
-
-    public void setTenantMetadata (Boolean meta) {
-        this.tenantMetadata = meta;
-    }
-    
-    public ServerType getIdentityServerType() {
-    	return this.identityServerType;
-    }
-    public void setIdentityServerType(ServerType ist) {
-    	this.identityServerType = ist;
-    }
-    public String getIdentityServerTypeAsString() {
-    	return this.identityServerType.toString();
-    }
-    /**
-	 * @return the identityAuthenticationType
-	 */
-	public AuthenticationType getIdentityAuthenticationType() {
-		return identityAuthenticationType;
-	}
-
-	/**
-	 * @param identityAuthenticationType the identityAuthenticationType to set
-	 */
-	public void setIdentityAuthenticationType(AuthenticationType identityAuthenticationType) {
-		this.identityAuthenticationType = identityAuthenticationType;
-	}
-
-	@Override
-	public CloudIdentity clone() {
-		CloudIdentity cloudIdentityCopy = new CloudIdentity();
-
-		cloudIdentityCopy.id = this.id;
-		cloudIdentityCopy.identityUrl = this.identityUrl;
-		cloudIdentityCopy.msoId = this.msoId;
-		cloudIdentityCopy.msoPass = this.msoPass;
-		cloudIdentityCopy.adminTenant = this.adminTenant;
-		cloudIdentityCopy.memberRole = this.memberRole;
-		cloudIdentityCopy.tenantMetadata = this.tenantMetadata;
-		cloudIdentityCopy.identityServerType = this.identityServerType;
-		cloudIdentityCopy.identityAuthenticationType = this.identityAuthenticationType;
-
-		return cloudIdentityCopy;
-	}
-
-	@Override
-	public String toString() {
-		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", getId())
-				.append("identityUrl", getIdentityUrl()).append("msoId", getMsoId())
-				.append("adminTenant", getAdminTenant()).append("memberRole", getMemberRole())
-				.append("tenantMetadata", hasTenantMetadata()).append("identityServerType", getIdentityServerType())
-				.append("identityAuthenticationType", getIdentityAuthenticationType()).toString();
-	}
-
-	@Override
-	public boolean equals(final Object other) {
-		if (other == null) {
-			return false;
-		}
-		if (!getClass().equals(other.getClass())) {
-			return false;
-		}
-		CloudIdentity castOther = (CloudIdentity) other;
-		return new EqualsBuilder().append(getId(), castOther.getId())
-				.append(getIdentityUrl(), castOther.getIdentityUrl()).append(getMsoId(), castOther.getMsoId())
-				.append(getMsoPass(), castOther.getMsoPass()).append(getAdminTenant(), castOther.getAdminTenant())
-				.append(getMemberRole(), castOther.getMemberRole())
-				.append(hasTenantMetadata(), castOther.hasTenantMetadata())
-				.append(getIdentityServerType(), castOther.getIdentityServerType())
-				.append(getIdentityAuthenticationType(), castOther.getIdentityAuthenticationType()).isEquals();
-	}
-
-	@Override
-	public int hashCode() {
-		return new HashCodeBuilder(1, 31).append(getId()).append(getIdentityUrl()).append(getMsoId())
-				.append(getMsoPass()).append(getAdminTenant()).append(getMemberRole()).append(hasTenantMetadata())
-				.append(getIdentityServerType()).append(getIdentityAuthenticationType()).toHashCode();
-	}
-}
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudSite.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudSite.java
deleted file mode 100644
index f38403d..0000000
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudSite.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*-
- * ============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.onap.so.cloud;
-
-
-import java.util.Comparator;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.openpojo.business.annotation.BusinessKey;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * JavaBean JSON class for a CloudSite.  This bean represents a cloud location
- * (i.e. and LCP node) in the NVP/AIC cloud.  It will be loaded via CloudConfig
- * object, of which it is a component (a CloudConfig JSON configuration file
- * will contain multiple CloudSite definitions).
- *
- * Note that this is only used to access Cloud Configurations loaded from a
- * JSON config file, so there are no explicit setters.
- *
- */
-public class CloudSite {
-	@JsonProperty
-	@BusinessKey
-	private String id;
-	@JsonProperty("region_id")
-	@BusinessKey
-	private String regionId;
-	@JsonProperty("identity_service_id")
-	@BusinessKey
-	private String identityServiceId;
-	@JsonProperty("aic_version")
-	@BusinessKey
-	private String aicVersion;
-	@JsonProperty("clli")
-	@BusinessKey
-	private String clli;
-	@JsonProperty("cloudify_id")
-	@BusinessKey
-	private String cloudifyId;
-	@JsonProperty("platform")
-	@BusinessKey
-	private String platform;
-	@JsonProperty("orchestrator")
-	@BusinessKey
-	private String orchestrator;
-	
-	// Derived property (set by CloudConfig loader based on identityServiceId)
-	private CloudIdentity identityService;
-	// Derived property (set by CloudConfig loader based on cloudifyId)
-	private CloudifyManager cloudifyManager;
-	
-	public CloudSite() {
-		
-	}
-	
-	public CloudSite(CloudSite site) {
-		this.aicVersion = site.getAicVersion();
-		this.clli = site.getClli();
-		this.cloudifyId = this.getCloudifyId();
-		this.cloudifyManager = this.getCloudifyManager();
-		this.id = site.getId();
-		this.identityService = site.getIdentityService();
-		this.identityServiceId = site.getIdentityServiceId();
-		this.orchestrator = site.getOrchestrator();
-		this.platform = site.getPlatform();
-		this.regionId = this.getRegionId();
-	}
-	public String getId() {
-		return this.id;
-	}
-	
-	public void setId(String id) {
-		this.id = id;
-	}
-	
-	public String getRegionId() {
-		return regionId;
-	}
-	
-	public void setRegionId(String regionId) {
-		this.regionId = regionId;
-	}
-
-	public String getIdentityServiceId() {
-		return identityServiceId;
-	}
-	
-	public void setIdentityServiceId(String identityServiceId) {
-		this.identityServiceId = identityServiceId;
-	}
-	public String getAicVersion() {
-		return aicVersion;
-	}
-
-	public void setAicVersion(String aicVersion) {
-		this.aicVersion = aicVersion;
-	}
-
-	public String getClli() {
-		return clli;
-	}
-
-	public void setClli(String clli) {
-		this.clli = clli;
-	}
-
-	public String getCloudifyId() {
-		return cloudifyId;
-	}
-
-	public void setCloudifyId (String id) {
-		this.cloudifyId = id;
-	}
-	
-	public String getPlatform() {
-		return platform;
-	}
-
-	public void setPlatform(String platform) {
-		this.platform = platform;
-	}
-
-	public String getOrchestrator() {
-		return orchestrator;
-	}
-
-	public void setOrchestrator(String orchestrator) {
-		this.orchestrator = orchestrator;
-	}
-
-	public CloudIdentity getIdentityService () {
-		return identityService;
-	}
-
-	public void setIdentityService (CloudIdentity identity) {
-		this.identityService = identity;
-	}
-	
-	public CloudifyManager getCloudifyManager () {
-		return cloudifyManager;
-	}
-
-	public void setCloudifyManager (CloudifyManager cloudify) {
-		this.cloudifyManager = cloudify;
-	}
-
-	@Override
-	public String toString() {
-		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("regionId", getRegionId())
-				.append("identityServiceId", getIdentityServiceId()).append("aicVersion", getAicVersion())
-				.append("clli", getClli()).append("cloudifyId", getCloudifyId()).append("platform", getPlatform())
-				.append("orchestrator", getOrchestrator()).toString();
-	}
-
-	@Override
-	public boolean equals(final Object other) {
-		if (other == null) {
-			return false;
-		}
-		if (!getClass().equals(other.getClass())) {
-			return false;
-		}
-		CloudSite castOther = (CloudSite) other;
-		return new EqualsBuilder().append(getRegionId(), castOther.getRegionId())
-				.append(getIdentityServiceId(), castOther.getIdentityServiceId())
-				.append(getAicVersion(), castOther.getAicVersion()).append(getClli(), castOther.getClli()).isEquals();
-	}
-
-	@Override
-	public int hashCode() {
-		return new HashCodeBuilder(1, 31).append(getRegionId()).append(getIdentityServiceId()).append(getAicVersion())
-				.append(getClli()).toHashCode();
-	}
-}
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudifyManager.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudifyManager.java
deleted file mode 100644
index 1bf3f13..0000000
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/CloudifyManager.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*-
- * ============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.onap.so.cloud;
-
-import java.security.GeneralSecurityException;
-import java.util.Comparator;
-
-import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
-import org.onap.so.utils.CryptoUtils;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.openpojo.business.annotation.BusinessKey;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-
-/**
- * JavaBean JSON class for a Cloudify Manager.  This bean represents a Cloudify
- * node through which TOSCA-based VNFs may be deployed.  Each CloudSite in the
- * CloudConfig may have a Cloudify Manager for deployments using TOSCA blueprints.
- * Cloudify Managers may support multiple Cloud Sites, but each site will have
- * at most one Cloudify Manager.
- * 
- * This does not replace the ability to use the CloudSite directly via Openstack.
- *
- * Note that this is only used to access Cloud Configurations loaded from a
- * JSON config file, so there are no explicit setters.
- *
- * @author JC1348
- */
-public class CloudifyManager {
-	
-    private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, CloudifyManager.class);
-
-	@BusinessKey
-	@JsonProperty
-	private String id;
-	
-	@BusinessKey
-	@JsonProperty ("cloudify_url")
-	private String cloudifyUrl;
-	
-	@BusinessKey
-	@JsonProperty("username")
-	private String username;
-	
-	@BusinessKey
-	@JsonProperty("password")
-	private String password;
-	
-	@BusinessKey
-	@JsonProperty("version")
-	private String version;
-
-	public CloudifyManager() {}
-	
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-	
-	public String getCloudifyUrl() {
-		return cloudifyUrl;
-	}
-
-	public void setCloudifyUrl(String cloudifyUrl) {
-		this.cloudifyUrl = cloudifyUrl;
-	}
-
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getPassword() {
-        return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	public String getVersion() {
-		return version;
-	}
-
-	public void setVersion(String version) {
-		this.version = version;
-	}
-
-	@Override
-	public CloudifyManager clone() {
-		CloudifyManager cloudifyManagerCopy = new CloudifyManager();
-		cloudifyManagerCopy.id = this.id;
-		cloudifyManagerCopy.cloudifyUrl = this.cloudifyUrl;
-		cloudifyManagerCopy.username = this.username;
-		cloudifyManagerCopy.password = this.password;
-		cloudifyManagerCopy.version = this.version;
-		return cloudifyManagerCopy;
-	}
-
-	@Override
-	public String toString() {
-		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", getId())
-				.append("cloudifyUrl", getCloudifyUrl()).append("username", getUsername())
-				.append("password", getPassword()).append("version", getVersion()).toString();
-	}
-
-	@Override
-	public boolean equals(final Object other) {
-		if (other == null) {
-			return false;
-		}
-		if (!getClass().equals(other.getClass())) {
-			return false;
-		}
-		CloudifyManager castOther = (CloudifyManager) other;
-		return new EqualsBuilder().append(getId(), castOther.getId())
-				.append(getCloudifyUrl(), castOther.getCloudifyUrl()).append(getUsername(), castOther.getUsername())
-				.append(getPassword(), castOther.getPassword()).append(getVersion(), castOther.getVersion()).isEquals();
-	}
-
-	@Override
-	public int hashCode() {
-		return new HashCodeBuilder(1, 31).append(getId()).append(getCloudifyUrl()).append(getUsername())
-				.append(getPassword()).append(getVersion()).toHashCode();
-	}
-}
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/ServerType.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/ServerType.java
deleted file mode 100644
index ac59018..0000000
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/ServerType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*-
- * ============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.onap.so.cloud;
-
-public enum ServerType {
-	KEYSTONE, ORM;
-}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java
index 5c648eb..1912cd8 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java
@@ -20,8 +20,8 @@
 
 package org.onap.so.cloud.authentication;
 
-import org.onap.so.cloud.AuthenticationType;
-import org.onap.so.cloud.CloudIdentity;
+import org.onap.so.db.catalog.beans.AuthenticationType;
+import org.onap.so.db.catalog.beans.CloudIdentity;
 import org.onap.so.cloud.authentication.models.RackspaceAuthentication;
 import org.onap.so.utils.CryptoUtils;
 import org.springframework.stereotype.Component;
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
index aa8e37f..59996fa 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java
@@ -42,8 +42,8 @@
 import org.onap.so.adapters.vdu.VduStateType;
 import org.onap.so.adapters.vdu.VduStatus;
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudSite;
-import org.onap.so.cloud.CloudifyManager;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.CloudifyManager;
 import org.onap.so.cloudify.base.client.CloudifyBaseException;
 import org.onap.so.cloudify.base.client.CloudifyClientTokenProvider;
 import org.onap.so.cloudify.base.client.CloudifyConnectException;
@@ -898,7 +898,7 @@
     {
         CloudifyManager cloudifyConfig = cloudConfig.getCloudifyManager(cloudSite.getCloudifyId());
         if (cloudifyConfig == null) {
-        	throw new MsoCloudifyManagerNotFound (cloudConfig.getCloudSiteId(cloudSite));
+        	throw new MsoCloudifyManagerNotFound (cloudSite.getId());
         }
 
         // Get a Cloudify client
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
index e5ece20..1d5b1a0 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
@@ -41,8 +41,8 @@
 import org.onap.so.adapters.vdu.VduStateType;
 import org.onap.so.adapters.vdu.VduStatus;
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudIdentity;
-import org.onap.so.cloud.CloudSite;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.cloud.authentication.AuthenticationMethodFactory;
 import org.onap.so.db.catalog.beans.HeatTemplate;
 import org.onap.so.db.catalog.beans.HeatTemplateParam;
@@ -949,7 +949,7 @@
      * @return an authenticated Heat object
      */
     public Heat getHeatClient (CloudSite cloudSite, String tenantId) throws MsoException {
-        String cloudId = cloudConfig.getCloudSiteId(cloudSite);
+        String cloudId = cloudSite.getId();
 
         // Check first in the cache of previously authorized clients
         String cacheKey = cloudId + ":" + tenantId;
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdate.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdate.java
index 0b3f9df..e68a8e7 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdate.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdate.java
@@ -28,8 +28,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudSite;
+import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoLogger;
 import org.onap.so.openstack.beans.StackInfo;
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java
index d3ec74d..2f2a457 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoKeystoneUtils.java
@@ -27,8 +27,8 @@
 import java.util.Map;
 import java.util.Optional;
 
-import org.onap.so.cloud.CloudIdentity;
-import org.onap.so.cloud.CloudSite;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.cloud.authentication.AuthenticationMethodFactory;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoAlarmLogger;
@@ -92,7 +92,7 @@
      * <p>
      *
      * @param tenantName The tenant name to create
-     * @param cloudId The cloud identifier (may be a region) in which to create the tenant.
+     * @param cloudSiteId The cloud identifier (may be a region) in which to create the tenant.
      * @return the tenant ID of the newly created tenant
      * @throws MsoTenantAlreadyExists Thrown if the requested tenant already exists
      * @throws MsoOpenstackException Thrown if the Openstack API call returns an exception
@@ -150,7 +150,7 @@
 	            executeAndRecordOpenstackRequest (request);
             }
 
-            if (cloudIdentity.hasTenantMetadata () && metadata != null && !metadata.isEmpty ()) {
+            if (cloudIdentity.getTenantMetadata () && metadata != null && !metadata.isEmpty ()) {
                 Metadata tenantMetadata = new Metadata ();
                 tenantMetadata.setMetadata (metadata);
 
@@ -221,7 +221,7 @@
             }
 
             Map <String, String> metadata = new HashMap <String, String> ();
-            if (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).hasTenantMetadata ()) {
+            if (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getTenantMetadata ()) {
                 OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ());
                 Metadata tenantMetadata = executeAndRecordOpenstackRequest (request);
                 if (tenantMetadata != null) {
@@ -267,7 +267,7 @@
             }
 
             Map <String, String> metadata = new HashMap <String, String> ();
-            if (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).hasTenantMetadata ()) {
+            if (cloudConfig.getIdentityService(cloudSite.getIdentityServiceId()).getTenantMetadata ()) {
                 OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ());
                 Metadata tenantMetadata = executeAndRecordOpenstackRequest (request);
                 if (tenantMetadata != null) {
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
index adeb008..18ed941 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
@@ -27,8 +27,8 @@
 import java.util.Map;
 
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudIdentity;
-import org.onap.so.cloud.CloudSite;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.cloud.authentication.AuthenticationMethodFactory;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoAlarmLogger;
@@ -42,7 +42,6 @@
 import org.onap.so.openstack.exceptions.MsoNetworkAlreadyExists;
 import org.onap.so.openstack.exceptions.MsoNetworkNotFound;
 import org.onap.so.openstack.exceptions.MsoOpenstackException;
-import org.onap.so.openstack.exceptions.MsoTenantNotFound;
 import org.onap.so.openstack.mappers.NetworkInfoMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtils.java
index 28911bc..383409f 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtils.java
@@ -24,7 +24,7 @@
 import java.util.Map;
 
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudIdentity;
 import org.onap.so.logger.MsoLogger;
 import org.onap.so.openstack.beans.MsoTenant;
 import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java
index 68d0ef2..da9f79a 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoTenantUtilsFactory.java
@@ -21,8 +21,8 @@
 package org.onap.so.openstack.utils;
 
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudSite;
-import org.onap.so.cloud.ServerType;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.ServerType;
 import org.onap.so.logger.MsoLogger;
 import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java
index 36f82e1..36a50fd 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/BaseTest.java
@@ -22,14 +22,30 @@
 
 
 import com.github.tomakehurst.wiremock.client.WireMock;
+import org.apache.http.HttpHeaders;
+import org.apache.http.HttpStatus;
 import org.junit.After;
+import org.junit.Before;
 import org.junit.runner.RunWith;
+import org.onap.so.db.catalog.beans.AuthenticationType;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.ServerType;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
+import javax.ws.rs.core.MediaType;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*;
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+
 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @ActiveProfiles("test")
@@ -43,4 +59,68 @@
 	public void after() {
 		WireMock.reset();
 	}
-}
+
+	protected static String getBody(String body, int port, String urlPath) throws IOException {
+		return body.replaceAll("port", "http://localhost:" + port + urlPath);
+	}
+
+	@Before
+	public void init() throws IOException {
+		CloudIdentity identity = getCloudIdentity();
+		CloudSite cloudSite = getCloudSite(identity);
+		mockCloud(identity, cloudSite);
+	}
+
+	private void mockCloud(CloudIdentity identity, CloudSite cloudSite) throws IOException {
+		stubFor(get(urlPathEqualTo("/cloudSite/MTN13")).willReturn(aResponse()
+				.withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, ""))
+				.withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+				.withStatus(HttpStatus.SC_OK)));
+		stubFor(get(urlPathEqualTo("/cloudSite/default")).willReturn(aResponse()
+				.withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, ""))
+				.withHeader(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON)
+				.withStatus(HttpStatus.SC_OK)));
+		stubFor(get(urlPathEqualTo("/cloudIdentity/mtn13")).willReturn(aResponse()
+				.withBody(getBody(mapper.writeValueAsString(identity),wireMockPort, ""))
+				.withHeader(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON)
+				.withStatus(HttpStatus.SC_OK)));
+	}
+
+	private CloudIdentity getCloudIdentity() {
+		CloudIdentity identity = new CloudIdentity();
+		identity.setId("mtn13");
+		identity.setMsoId("m93945");
+		identity.setMsoPass("93937EA01B94A10A49279D4572B48369");
+		identity.setAdminTenant("admin");
+		identity.setMemberRole("admin");
+		identity.setTenantMetadata(false);
+		identity.setIdentityUrl("http://localhost:"+wireMockPort+"/v2.0");
+		identity.setIdentityAuthenticationType(AuthenticationType.USERNAME_PASSWORD);
+		identity.setIdentityServerType(ServerType.KEYSTONE);
+		return identity;
+	}
+
+	private CloudSite getCloudSite(CloudIdentity identity) {
+		CloudSite cloudSite = new CloudSite();
+		cloudSite.setId("MTN13");
+		cloudSite.setCloudVersion("3.0");
+		cloudSite.setClli("MDT13");
+		cloudSite.setRegionId("mtn13");
+		cloudSite.setIdentityService(identity);
+		return cloudSite;
+	}
+
+	private static String readFile(String fileName) throws IOException {
+		try (BufferedReader br = new BufferedReader(new FileReader(fileName))) {
+			StringBuilder sb = new StringBuilder();
+			String line = br.readLine();
+
+			while (line != null) {
+				sb.append(line);
+				sb.append("\n");
+				line = br.readLine();
+			}
+			return sb.toString();
+		}
+	}
+}
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java
new file mode 100644
index 0000000..d7b30ed
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/EmbeddedMariaDbConfig.java
@@ -0,0 +1,42 @@
+package org.onap.so;
+
+import ch.vorburger.exec.ManagedProcessException;
+import ch.vorburger.mariadb4j.DBConfigurationBuilder;
+import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+
+import javax.sql.DataSource;
+
+@Configuration
+@Profile({"test","local"})
+public class EmbeddedMariaDbConfig {
+
+    @Bean
+    MariaDB4jSpringService mariaDB4jSpringService() {
+        return new MariaDB4jSpringService();
+    }
+
+    @Bean
+    DataSource dataSource(MariaDB4jSpringService mariaDB4jSpringService,
+                          @Value("${mariaDB4j.databaseName}") String databaseName,
+                          @Value("${spring.datasource.username}") String datasourceUsername,
+                          @Value("${spring.datasource.password}") String datasourcePassword,
+                          @Value("${spring.datasource.driver-class-name}") String datasourceDriver) throws ManagedProcessException {
+        //Create our database with default root user and no password
+        mariaDB4jSpringService.getDB().createDB(databaseName);
+
+        DBConfigurationBuilder config = mariaDB4jSpringService.getConfiguration();
+
+        return DataSourceBuilder
+                .create()
+                .username(datasourceUsername)
+                .password(datasourcePassword)
+                .url(config.getURL(databaseName))
+                .driverClassName(datasourceDriver)
+                .build();
+    }
+}
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java
index 539e7ac..012805e 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsRefactorTest.java
@@ -21,39 +21,72 @@
 package org.onap.so.adapter_utils.tests;
 
 
+import org.apache.http.HttpHeaders;
+import org.apache.http.HttpStatus;
+import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.onap.so.cloud.Application;
-import org.onap.so.openstack.utils.MsoCommonUtils;
+import org.onap.so.BaseTest;
+import org.onap.so.db.catalog.beans.AuthenticationType;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.ServerType;
+import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
 import org.onap.so.openstack.utils.MsoHeatUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.ws.rs.core.MediaType;
+import java.io.IOException;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*;
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static org.junit.Assert.assertEquals;
 
-/**
+/**PoConfigTest
  * This class implements test methods of the MsoHeatUtils
  *
  *
  */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-@ActiveProfiles("test")
-public class MsoHeatUtilsRefactorTest extends MsoCommonUtils {
+public class MsoHeatUtilsRefactorTest extends BaseTest {
 
 	@Autowired
 	private  MsoHeatUtils msoHeatUtils;
+
+	@Before
+	public void init() throws IOException {
+		CloudIdentity identity = new CloudIdentity();
+
+		identity.setId("MTN13");
+		identity.setMsoId("m93945");
+		identity.setMsoPass("93937EA01B94A10A49279D4572B48369");
+		identity.setAdminTenant("admin");
+		identity.setMemberRole("admin");
+		identity.setTenantMetadata(true);
+		identity.setIdentityUrl("http://localhost:28090/v2.0");
+		identity.setIdentityAuthenticationType(AuthenticationType.USERNAME_PASSWORD);
+
+		CloudSite cloudSite = new CloudSite();
+		cloudSite.setId("MTN13");
+		cloudSite.setCloudVersion("3.0");
+		cloudSite.setClli("MDT13");
+		cloudSite.setRegionId("MTN13");
+		identity.setIdentityServerType(ServerType.KEYSTONE);
+		cloudSite.setIdentityService(identity);
+
+
+		stubFor(get(urlPathEqualTo("/cloudSite/default")).willReturn(aResponse()
+				.withBody(getBody(mapper.writeValueAsString(cloudSite),wireMockPort, ""))
+				.withHeader(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON)
+				.withStatus(HttpStatus.SC_OK)));
+		stubFor(get(urlPathEqualTo("/cloudIdentity/MTN13")).willReturn(aResponse()
+				.withBody(getBody(mapper.writeValueAsString(identity),wireMockPort, ""))
+				.withHeader(HttpHeaders.CONTENT_TYPE,MediaType.APPLICATION_JSON)
+				.withStatus(HttpStatus.SC_OK)));
+	}
 	
 	@Test
-	public final void testGetKeystoneUrl() {
-		try {
-			String keyUrl = msoHeatUtils.getCloudSiteKeystoneUrl("DAN");
-			assertEquals("http://192.168.170.21:5000/v2.0",keyUrl);
-		} catch (Exception e) {
-			
-		}
+	public final void testGetKeystoneUrl() throws MsoCloudSiteNotFound {
+		String keyUrl = msoHeatUtils.getCloudSiteKeystoneUrl("DAN");
+		assertEquals("http://localhost:28090/v2.0", keyUrl);
 	}
-
-
 }
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java
index 6d96872..50fc175 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/adapter_utils/tests/MsoHeatUtilsWithUpdateTest.java
@@ -23,7 +23,6 @@
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.when;
 
-import java.security.GeneralSecurityException;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -36,9 +35,9 @@
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudIdentity;
-import org.onap.so.cloud.CloudSite;
-import org.onap.so.cloud.ServerType;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.ServerType;
 import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
 import org.onap.so.openstack.exceptions.MsoException;
 import org.onap.so.openstack.exceptions.MsoIOException;
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java
index 668b180..c6db998 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudConfigTest.java
@@ -22,86 +22,71 @@
 
 import static org.junit.Assert.*;
 
-import java.util.Map;
 import java.util.Optional;
 
 import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.onap.so.BaseTest;
+import org.onap.so.db.catalog.beans.AuthenticationType;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.ServerType;
 import org.onap.so.openstack.exceptions.MsoException;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.ActiveProfiles;
-import org.springframework.test.context.junit4.SpringRunner;
 
 /**
  * This class implements test methods of the CloudConfig features.
  *
  *
  */
-public class CloudConfigTest extends BaseTest {
+public class CloudConfigTest extends BaseTest{
 
 	@Autowired
 	private CloudConfig con;
 
-   /**
-    * This method implements a test for the getCloudSites method.
-    */
-   @Test
-   public final void testGetCloudSites () {
-	   Map<String,CloudSite> siteMap = con.getCloudSites();
-	   assertNotNull(siteMap);
+	/**
+	 * This method implements a test for the getCloudSite method.
+	 */
+	@Test
+	public final void testGetCloudSite () {
+		CloudSite site1 = con.getCloudSite("MTN13").get();
 
-	   CloudSite site1 = siteMap.get("regionOne");
-
-	   assertEquals ("regionOne", site1.getRegionId());
-	   assertEquals ("MT_KEYSTONE", site1.getIdentityServiceId());
-	   assertEquals ("MT2", site1.getClli());
-	   assertEquals ("2.5", site1.getAicVersion());
-   }
+		assertEquals ("mtn13", site1.getRegionId());
+		assertEquals ("mtn13", site1.getIdentityServiceId());
+		assertEquals ("MDT13", site1.getClli());
+		assertEquals ("3.0", site1.getCloudVersion());
+	}
 
 
-   /**
-    * This method implements a test for the getIdentityServices method.
- * @throws MsoException 
-    */
-   @Test
-   public final void testGetIdentityServices () throws MsoException {
-	   Map<String,CloudIdentity> identityMap = con.getIdentityServices ();
-	   assertNotNull(identityMap);
+	/**
+	 * This method implements a test for the getIdentityServices method.
+	 * @throws MsoException
+	 */
+	@Test
+	public final void testGetIdentityServices () throws MsoException {
 
-	   CloudIdentity identity1 = identityMap.get("MT_KEYSTONE");
+		CloudIdentity identity1 = con.getIdentityService("mtn13");
 
-	   assertEquals("john", identity1.getMsoId());
-	   assertEquals("313DECE408AF7759D442D7B06DD9A6AA", identity1.getMsoPass());
-	   assertEquals("admin", identity1.getAdminTenant());
-	   assertEquals("_member_", identity1.getMemberRole());
-	   assertEquals(false, identity1.hasTenantMetadata());
-	   assertEquals("http://localhost:"+wireMockPort+"/v2.0", identity1.getIdentityUrl());
-	   assertEquals(ServerType.KEYSTONE, identity1.getIdentityServerType());
-	   assertEquals(AuthenticationType.USERNAME_PASSWORD, identity1.getIdentityAuthenticationType());
+		assertEquals("m93945", identity1.getMsoId());
+		assertEquals("93937EA01B94A10A49279D4572B48369", identity1.getMsoPass());
+		assertEquals("admin", identity1.getAdminTenant());
+		assertEquals("admin", identity1.getMemberRole());
+		assertTrue(identity1.getIdentityUrl().contains("http://localhost:"));
+		assertEquals(ServerType.KEYSTONE, identity1.getIdentityServerType());
+		assertEquals(AuthenticationType.USERNAME_PASSWORD, identity1.getIdentityAuthenticationType());
 
-   }
+	}
 
-   /**
-    * This method implements a test for the getCloudSite method.
-    */
-   @Test
-   public final void testGetDefaultCloudSite () {
-	   Optional<CloudSite> site  = con.getCloudSite("NotThere");
-	   assertTrue(site.isPresent());
-	   CloudSite site1 = site.get();
-	   assertEquals ("NotThere", site1.getRegionId());
-	   assertEquals("MTN6", site1.getClli());
-	   assertEquals("NotThere", site1.getId());
-	   assertEquals ("ORDM3", site1.getIdentityServiceId());
-   }
-   
-   @Test
-   public void testGetIdentityService() {
-	   CloudIdentity identity = con.getIdentityService("MT_KEYSTONE");
-	   assertEquals("john", identity.getMsoId());
-	   assertEquals("MT_KEYSTONE", identity.getId());
-   }
-
+	/**
+	 * This method implements a test for the getCloudSite method.
+	 */
+	@Test
+	public final void testGetDefaultCloudSite () {
+		Optional<CloudSite> site  = con.getCloudSite("NotThere");
+		assertTrue(site.isPresent());
+		CloudSite site1 = site.get();
+		assertEquals ("NotThere", site1.getRegionId());
+		assertEquals("MDT13", site1.getClli());
+		assertEquals("NotThere", site1.getId());
+	}
+	
 }
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudIdentityTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudIdentityTest.java
deleted file mode 100644
index db2ba05..0000000
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudIdentityTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * ============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.onap.so.cloud;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.security.GeneralSecurityException;
-
-import org.junit.Test;
-import org.onap.so.utils.CryptoUtils;
-
-public class CloudIdentityTest {
-	
-	private CloudIdentity cloudIdentity = new CloudIdentity();
-	private static final String ID = "testId";
-	private static final String IDENTITY_URL = "testIdentityUrl";
-	private static final String MSO_ID = "testMsoId";
-	private static final String MSO_PASS = "testMsoPassword";
-	private static final String ADMIN_TENANT = "testAdminTenant";
-	private static final String MEMBER_ROLE = "testMemberRole";
-	private static final Boolean TENANT_METADATA = true;
-	
-    @Test
-    public final void testCloudIdentity () {
-        CloudIdentity id = new CloudIdentity ();
-        id.setAdminTenant ("AdminTenant");
-        id.setId ("id");
-//        id.setKeystoneUrl ("keystone");
-        id.setIdentityUrl ("keystone");
-        id.setMemberRole ("member");
-        id.setMsoId ("msoId");
-        id.setMsoPass (CryptoUtils.encryptCloudConfigPassword("password"));
-        id.setTenantMetadata (true);
-        id.setIdentityServerType(null);
-        id.setIdentityAuthenticationType(null);
-        
-
-        assertTrue (id.getAdminTenant ().equals ("AdminTenant"));
-        assertTrue (id.getId ().equals ("id"));
-//        assertTrue (id.getKeystoneUrl ().equals ("keystone"));
-        assertTrue (id.getMemberRole ().equals ("member"));
-        assertTrue (id.getMsoId ().equals ("msoId"));
-        assertTrue (CryptoUtils.decryptCloudConfigPassword(id.getMsoPass()).equals ("password"));
-        assertTrue (id.hasTenantMetadata ());
-//        assertTrue (id.toString ().contains ("keystone"));
-        assertTrue(id.toString().contains("null"));
-    }
-
-    @Test
-    public final void testEncryption () throws GeneralSecurityException {
-        String encrypted = CryptoUtils.encryptCloudConfigPassword("password");
-        assertTrue (encrypted != null);
-        assertTrue (!encrypted.equals ("password"));
-    }
-    
-    @Test
-    public void cloneTest() {
-    	cloudIdentity = setupCloudIdentity(cloudIdentity, ID, IDENTITY_URL, MSO_ID, MSO_PASS, ADMIN_TENANT, 
-    			MEMBER_ROLE, TENANT_METADATA, ServerType.ORM, AuthenticationType.USERNAME_PASSWORD);
-    	CloudIdentity cloudIdentity2 = cloudIdentity.clone();
-    	
-    	assertEquals(cloudIdentity.getClass(), cloudIdentity2.getClass());
-    }
-	
-    private CloudIdentity setupCloudIdentity(CloudIdentity obj, String id, String identityUrl, 
-    		String msoId, String msoPass, String adminTenant, String memberRole, Boolean tenantMetadata, 
-    		ServerType identityServerType, AuthenticationType identityAuthenticationType) {
-		obj.setId(id);
-		obj.setIdentityUrl(identityUrl);
-		obj.setMsoId(msoId);
-		obj.setMsoPass(msoPass);
-		obj.setAdminTenant(adminTenant);
-		obj.setMemberRole(memberRole);
-		obj.setTenantMetadata(tenantMetadata);
-		obj.setIdentityServerType(identityServerType);
-		obj.setIdentityAuthenticationType(identityAuthenticationType);
-		
-		return obj;
-	}
-}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudPojoTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudPojoTest.java
index 89c15b0..096d5da 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudPojoTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudPojoTest.java
@@ -21,7 +21,9 @@
 package org.onap.so.cloud;
 
 import org.junit.Test;
-import org.onap.so.openpojo.rules.EqualsAndHashCodeTester;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.db.catalog.beans.CloudifyManager;
 import org.onap.so.openpojo.rules.ToStringTester;
 
 import com.openpojo.reflection.PojoClass;
@@ -51,7 +53,6 @@
 				.with(new SetterTester())
 				.with(new GetterTester())
 				.with(new ToStringTester())
-				.with(new EqualsAndHashCodeTester())
 				.build();
 		validator.validate(pojoClass);
 	}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudifyManagerTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudifyManagerTest.java
deleted file mode 100644
index 9a660b4..0000000
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/CloudifyManagerTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 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.onap.so.cloud;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
-
-public class CloudifyManagerTest {
-	
-	private CloudifyManager cloudifyManager = new CloudifyManager();
-	private static final String ID = "testId";
-	private static final String CLOUDIFY_URL = "testCloudifyUrl";
-	private static final String USERNAME = "testUsername";
-	private static final String PASSWORD = "testPassword";
-	private static final String VERSION = "testVersion";
-	
-	@Test
-	public void cloneTest() {
-		cloudifyManager.setId(ID);
-		cloudifyManager.setCloudifyUrl(CLOUDIFY_URL);
-		cloudifyManager.setUsername(USERNAME);
-		cloudifyManager.setPassword(PASSWORD);
-		cloudifyManager.setVersion(VERSION);
-		
-		CloudifyManager clone = cloudifyManager.clone();
-		assertEquals(cloudifyManager, clone);
-	}
-}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java
index e1c5337..d676bca 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloud/authentication/AuthenticationMethodTest.java
@@ -24,11 +24,11 @@
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.onap.so.BaseTest;
 import org.onap.so.cloud.Application;
-import org.onap.so.cloud.AuthenticationType;
-import org.onap.so.cloud.CloudIdentity;
+import org.onap.so.db.catalog.beans.AuthenticationType;
+import org.onap.so.db.catalog.beans.CloudIdentity;
 import org.onap.so.cloud.authentication.models.RackspaceAuthentication;
-import org.onap.so.openstack.exceptions.MsoException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.ActiveProfiles;
@@ -43,10 +43,7 @@
  * only are tested.
  *
  */
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-@ActiveProfiles("test")
-public class AuthenticationMethodTest {
+public class AuthenticationMethodTest extends BaseTest {
 
 	@Autowired
 	private AuthenticationMethodFactory authenticationMethodFactory;
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/utils/MsoCloudifyUtilsTest2.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/utils/MsoCloudifyUtilsTest2.java
index e75a4ae..96202c5 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/utils/MsoCloudifyUtilsTest2.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/cloudify/utils/MsoCloudifyUtilsTest2.java
@@ -42,13 +42,12 @@
 import org.onap.so.adapters.vdu.VduStateType;
 import org.onap.so.adapters.vdu.VduStatus;
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudIdentity;
-import org.onap.so.cloud.CloudSite;
+import org.onap.so.db.catalog.beans.CloudIdentity;
+import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.cloudify.beans.DeploymentInfo;
 import org.onap.so.cloudify.beans.DeploymentStatus;
 import org.onap.so.cloudify.v3.client.Cloudify;
 import org.onap.so.cloudify.v3.model.AzureConfig;
-import org.onap.so.cloudify.v3.model.OpenstackConfig;
 import org.onap.so.openstack.exceptions.MsoException;
 
 public class MsoCloudifyUtilsTest2 {
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java
index d347ded..f069e9f 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/config/PoConfigTest.java
@@ -24,6 +24,7 @@
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.onap.so.BaseTest;
 import org.onap.so.cloud.Application;
 import org.onap.so.config.beans.PoConfig;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,10 +32,7 @@
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-@ActiveProfiles("test")
-public class PoConfigTest {
+public class PoConfigTest extends BaseTest {
 
 	
 	@Autowired
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/HeatCacheEntryTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/HeatCacheEntryTest.java
index 4adf6bf..b675f48 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/HeatCacheEntryTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/HeatCacheEntryTest.java
@@ -30,7 +30,7 @@
 import org.junit.Test;
 import org.onap.so.BaseTest;
 
-public class HeatCacheEntryTest extends BaseTest {
+public class HeatCacheEntryTest {
 	
 	private static final String HEAT_URL = "testHeatUrl";
 	private static final String TOKEN = "testToken";
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/NeutronCacheEntryTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/NeutronCacheEntryTest.java
index 3a65204..8626e7d 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/NeutronCacheEntryTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/NeutronCacheEntryTest.java
@@ -29,7 +29,7 @@
 import org.junit.Test;
 import org.onap.so.BaseTest;
 
-public class NeutronCacheEntryTest extends BaseTest {
+public class NeutronCacheEntryTest {
 	
 	private static final String NEUTRON_URL = "testNeutronUrl";
 	private static final String TOKEN = "testToken";
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java
index 522a261..94715f1 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/OpenstackBeansPojoTest.java
@@ -30,7 +30,7 @@
 import com.openpojo.validation.test.impl.GetterTester;
 import com.openpojo.validation.test.impl.SetterTester;
 
-public class OpenstackBeansPojoTest extends BaseTest {
+public class OpenstackBeansPojoTest {
 	@Test
 	public void pojoStructure() {
 		test(PojoClassFactory.getPojoClass(VnfRollback.class));
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
index 6bcb209..b304cba 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
@@ -47,6 +47,10 @@
 import org.onap.so.adapters.vdu.VduModelInfo;
 import org.onap.so.adapters.vdu.VduStateType;
 import org.onap.so.adapters.vdu.VduStatus;
+import org.onap.so.cloud.CloudConfig;
+import org.onap.so.db.catalog.beans.CloudSite;
+import org.onap.so.openstack.beans.HeatStatus;
+import org.onap.so.openstack.beans.StackInfo;
 import org.onap.so.openstack.exceptions.MsoException;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -67,7 +71,7 @@
 		expected.setStatus(status);
 
 		CloudInfo cloudInfo = new CloudInfo();
-		cloudInfo.setCloudSiteId("regionOne");
+		cloudInfo.setCloudSiteId("MTN13");
 		cloudInfo.setTenantId("tenantId");
 		VduModelInfo vduModel = new VduModelInfo();
 		vduModel.setModelCustomizationUUID("blueprintId");
@@ -111,7 +115,7 @@
 		expected.setStatus(status);
 
 		CloudInfo cloudInfo = new CloudInfo();
-		cloudInfo.setCloudSiteId("regionOne");
+		cloudInfo.setCloudSiteId("mtn13");
 		cloudInfo.setTenantId("tenantId");
 		String instanceId = "instanceId";
 
@@ -138,7 +142,7 @@
 		expected.setStatus(status);
 
 		CloudInfo cloudInfo = new CloudInfo();
-		cloudInfo.setCloudSiteId("regionOne");
+		cloudInfo.setCloudSiteId("mtn13");
 		cloudInfo.setTenantId("tenantId");
 		String instanceId = "instanceId";
 
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
index c252f61..1a8f4fb 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
@@ -25,7 +25,6 @@
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
 import java.io.File;
@@ -39,13 +38,12 @@
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
-import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 import org.mockito.Spy;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.onap.so.TestDataSetup;
 import org.onap.so.cloud.CloudConfig;
-import org.onap.so.cloud.CloudSite;
+import org.onap.so.db.catalog.beans.CloudSite;
 import org.onap.so.openstack.beans.HeatStatus;
 import org.onap.so.openstack.beans.StackInfo;
 import org.onap.so.openstack.exceptions.MsoException;
@@ -55,10 +53,7 @@
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.woorea.openstack.base.client.OpenStackRequest;
 import com.woorea.openstack.heat.Heat;
-import com.woorea.openstack.heat.StackResource;
-import com.woorea.openstack.heat.StackResource.UpdateStack;
 import com.woorea.openstack.heat.model.Stack;
-import com.woorea.openstack.heat.model.UpdateStackParam;
 
 @RunWith(MockitoJUnitRunner.class)
 public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
@@ -95,7 +90,7 @@
 	
 	@Test
 	public void updateStackTest() throws MsoException, JsonParseException, JsonMappingException, IOException {
-		CloudSite cloudSite = mapper.readValue(new File(RESOURCE_PATH + "CloudSite.json"), CloudSite.class);
+		CloudSite cloudSite = new CloudSite();
 		Heat heatClient = new Heat("endpoint");
 		Stack heatStack = mapper.readValue(new File(RESOURCE_PATH + "HeatStack.json"), Stack.class);
 		Stack updateStack = mapper.readValue(new File(RESOURCE_PATH + "UpdateStack.json"), Stack.class);
@@ -120,7 +115,7 @@
 	public void updateStackWithEnvironmentTest() throws JsonParseException, JsonMappingException, IOException, MsoException {
 		String environmentString = "environmentString";
 		
-		CloudSite cloudSite = mapper.readValue(new File(RESOURCE_PATH + "CloudSite.json"), CloudSite.class);
+		CloudSite cloudSite = new CloudSite();
 		Heat heatClient = new Heat("endpoint");
 		Stack heatStack = mapper.readValue(new File(RESOURCE_PATH + "HeatStack.json"), Stack.class);
 		Stack updateStack = mapper.readValue(new File(RESOURCE_PATH + "UpdateStack.json"), Stack.class);
@@ -147,7 +142,7 @@
 		Map<String, Object> files = new HashMap<>();
 		files.put("file1", new Object());
 		
-		CloudSite cloudSite = mapper.readValue(new File(RESOURCE_PATH + "CloudSite.json"), CloudSite.class);
+		CloudSite cloudSite = new CloudSite();
 		Heat heatClient = new Heat("endpoint");
 		Stack heatStack = mapper.readValue(new File(RESOURCE_PATH + "HeatStack.json"), Stack.class);
 		Stack updateStack = mapper.readValue(new File(RESOURCE_PATH + "UpdateStack.json"), Stack.class);
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java
index 706427e..92f7738 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoKeystoneUtilsTest.java
@@ -48,7 +48,7 @@
 
         StubOpenStack.mockOpenStackGetUserById("john");
         StubOpenStack.mockOpenStackGetRoles_200("OS-KSADM");
-        String response = msoKeystoneUtils.createTenant("tenant", "regionOne", new HashMap<>(), true);
+        String response = msoKeystoneUtils.createTenant("tenant", "MTN13", new HashMap<>(), true);
 
         Assert.assertEquals("tenantId", response);
     }
@@ -59,7 +59,7 @@
 
         StubOpenStack.mockOpenStackGetUserByName("john");
         StubOpenStack.mockOpenStackGetRoles_200("OS-KSADM");
-        String response = msoKeystoneUtils.createTenant("tenant", "regionOne", new HashMap<>(), true);
+        String response = msoKeystoneUtils.createTenant("tenant", "MTN13", new HashMap<>(), true);
         Assert.assertEquals("tenantId", response);
 
     }
@@ -70,14 +70,14 @@
         StubOpenStack.mockOpenStackPostTenantWithBodyFile_200();
         StubOpenStack.mockOpenStackGetUserByName_500("john");
         StubOpenStack.mockOpenStackGetRoles_200("OS-KSADM");
-        msoKeystoneUtils.createTenant("tenant", "regionOne", new HashMap<>(), true);
+        msoKeystoneUtils.createTenant("tenant", "Test", new HashMap<>(), true);
     }
 
     @Test
     public void queryTenantTest() throws Exception {
         StubOpenStack.mockOpenStackGetTenantById("tenantId");
 
-        MsoTenant msoTenant = msoKeystoneUtils.queryTenant("tenantId", "regionOne");
+        MsoTenant msoTenant = msoKeystoneUtils.queryTenant("tenantId", "MTN13");
 
         Assert.assertEquals("testingTenantName", msoTenant.getTenantName());
     }
@@ -86,7 +86,7 @@
     public void queryTenantByNameTest() throws Exception {
         StubOpenStack.mockOpenStackGetTenantByName("tenant");
 
-        MsoTenant msoTenant = msoKeystoneUtils.queryTenantByName("tenant", "regionOne");
+        MsoTenant msoTenant = msoKeystoneUtils.queryTenantByName("tenant", "MTN13");
 
         Assert.assertEquals("testingTenantName", msoTenant.getTenantName());
     }
@@ -95,7 +95,7 @@
     public void deleteTenantTest() throws Exception {
         StubOpenStack.mockOpenStackGetTenantById("tenantId");
         StubOpenStack.mockOpenStackDeleteTenantById_200("tenantId");
-        boolean result = msoKeystoneUtils.deleteTenant("tenantId", "regionOne");
+        boolean result = msoKeystoneUtils.deleteTenant("tenantId", "MTN13");
 
         Assert.assertTrue(result);
     }
@@ -104,7 +104,7 @@
     public void deleteTenantByNameTest() throws Exception {
         StubOpenStack.mockOpenStackGetTenantByName("tenant");
         StubOpenStack.mockOpenStackDeleteTenantById_200("tenantId");
-        boolean result = msoKeystoneUtils.deleteTenantByName("tenant", "regionOne");
+        boolean result = msoKeystoneUtils.deleteTenantByName("tenant", "MTN13");
 
         Assert.assertTrue(result);
     }
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java
index 9f8b51a..0442d4d 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoNeutronUtilsTest.java
@@ -50,14 +50,14 @@
     @Test
     public void createNetworkTest_OpenStackBaseException() throws Exception {
         expectedException.expect(MsoException.class);
-        msoNeutronUtils.createNetwork("regionOne", "tenantId", 
+        msoNeutronUtils.createNetwork("MTN13", "tenantId", 
                 MsoNeutronUtils.NetworkType.PROVIDER,"networkName", "PROVIDER", vlans);
     }
 
     @Test
     public void createNetworkTest_NetworkTypeAsMultiProvider() throws Exception {
         StubOpenStack.mockOpenstackPostNetwork("OpenstackCreateNeutronNetworkResponse.json");
-        NetworkInfo networkInfo = msoNeutronUtils.createNetwork("regionOne", "tenantId",
+        NetworkInfo networkInfo = msoNeutronUtils.createNetwork("MTN13", "tenantId",
                 MsoNeutronUtils.NetworkType.MULTI_PROVIDER,"networkName","PROVIDER", vlans);
 
         Assert.assertEquals("2a4017ef-31ff-496a-9294-e96ecc3bc9c9",networkInfo.getId());
@@ -66,7 +66,7 @@
     @Test
     public void createNetworkTest() throws Exception {
         StubOpenStack.mockOpenstackPostNetwork("OpenstackCreateNeutronNetworkResponse.json");
-        NetworkInfo networkInfo = msoNeutronUtils.createNetwork("regionOne", "tenantId",
+        NetworkInfo networkInfo = msoNeutronUtils.createNetwork("MTN13", "tenantId",
                 MsoNeutronUtils.NetworkType.PROVIDER,"networkName","PROVIDER", vlans);
 
         Assert.assertEquals("2a4017ef-31ff-496a-9294-e96ecc3bc9c9",networkInfo.getId());
@@ -75,14 +75,14 @@
     @Test
     public void queryNetworkTest() throws Exception {
         StubOpenStack.mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
-        NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","regionOne");
+        NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","MTN13");
 
         Assert.assertEquals("net1",networkInfo.getName());
     }
 
     @Test
     public void queryNetworkTest_404() throws Exception {
-        NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","regionOne");
+        NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","MTN13");
         Assert.assertNull(networkInfo);
     }
 
@@ -90,7 +90,7 @@
     public void queryNetworkTest_500() throws Exception {
         expectedException.expect(MsoException.class);
         StubOpenStack.mockOpenStackGetNeutronNetwork_500("43173f6a-d699-414b-888f-ab243dda6dfe");
-        msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","regionOne");
+        msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","MTN13");
 
     }
 
@@ -98,7 +98,7 @@
     public void deleteNetworkkTest() throws Exception {
         StubOpenStack.mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
         StubOpenStack.mockOpenStackDeleteNeutronNetwork("43173f6a-d699-414b-888f-ab243dda6dfe");
-        Boolean result = msoNeutronUtils.deleteNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","regionOne");
+        Boolean result = msoNeutronUtils.deleteNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId","MTN13");
 
         Assert.assertTrue(result);
     }
@@ -107,7 +107,7 @@
     public void updateNetworkTest() throws Exception {
         StubOpenStack.mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
         StubOpenStack.mockOpenstackPutNetwork("OpenstackCreateNeutronNetworkResponse.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
-        NetworkInfo networkInfo = msoNeutronUtils.updateNetwork("regionOne", "tenantId",
+        NetworkInfo networkInfo = msoNeutronUtils.updateNetwork("MTN13", "tenantId",
                 "43173f6a-d699-414b-888f-ab243dda6dfe",MsoNeutronUtils.NetworkType.PROVIDER,"PROVIDER", vlans);
 
         Assert.assertEquals("2a4017ef-31ff-496a-9294-e96ecc3bc9c9",networkInfo.getId());
@@ -117,7 +117,7 @@
     public void updateNetworkTest_NetworkTypeAsMultiProvider() throws Exception {
         StubOpenStack.mockOpenStackGetNeutronNetwork("GetNeutronNetwork.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
         StubOpenStack.mockOpenstackPutNetwork("OpenstackCreateNeutronNetworkResponse.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
-        NetworkInfo networkInfo = msoNeutronUtils.updateNetwork("regionOne", "tenantId",
+        NetworkInfo networkInfo = msoNeutronUtils.updateNetwork("MTN13", "tenantId",
                 "43173f6a-d699-414b-888f-ab243dda6dfe",MsoNeutronUtils.NetworkType.MULTI_PROVIDER,"PROVIDER", vlans);
 
         Assert.assertEquals("2a4017ef-31ff-496a-9294-e96ecc3bc9c9",networkInfo.getId());
diff --git a/adapters/mso-adapter-utils/src/test/resources/__files/OpenstackResponse_Access.json b/adapters/mso-adapter-utils/src/test/resources/__files/OpenstackResponse_Access.json
index 7153f8b..f1c08cc 100644
--- a/adapters/mso-adapter-utils/src/test/resources/__files/OpenstackResponse_Access.json
+++ b/adapters/mso-adapter-utils/src/test/resources/__files/OpenstackResponse_Access.json
@@ -12,7 +12,7 @@
 				"name": null,
 				"endpoints": [
 					{
-						"region": "regionOne",
+						"region": "mtn13",
 						"publicURL": "port",
 						"internalURL": null,
 						"adminURL": null
@@ -25,7 +25,7 @@
 				"name": null,
 				"endpoints": [
 					{
-						"region": "regionOne",
+						"region": "mtn13",
 						"publicURL": "port",
 						"internalURL": null,
 						"adminURL": null
@@ -38,7 +38,7 @@
 				"name": null,
 				"endpoints": [
 					{
-						"region": "regionOne",
+						"region": "mtn13",
 						"publicURL": "port",
 						"internalURL": null,
 						"adminURL": null
diff --git a/adapters/mso-adapter-utils/src/test/resources/application-test.yaml b/adapters/mso-adapter-utils/src/test/resources/application-test.yaml
index b584088..f9467d3 100644
--- a/adapters/mso-adapter-utils/src/test/resources/application-test.yaml
+++ b/adapters/mso-adapter-utils/src/test/resources/application-test.yaml
@@ -1,12 +1,5 @@
 # will be used as entry in DB to say SITE OFF/ON for healthcheck
 # MSO Properties go here
-mso:
-  catalog:
-    db:
-      spring:
-        endpoint: "http://localhost:"
-  db:
-    auth: Basic YnBlbDptc28tZGItMTUwNyE=
 cloud_config:
   identity_services:
     MT_KEYSTONE:
@@ -48,3 +41,51 @@
     orm_url_replace_with_this: "7080"
     quota_value: "10"
     set_default_quota: "false"
+      
+server-port: 8080
+ssl-enable: false
+tomcat:
+  max-threads: 50
+mso:
+  logPath: logs
+  catalog:
+    db:
+      spring:
+        endpoint: http://localhost:${wiremock.server.port}
+  db:
+    auth: Basic YnBlbDptc28tZGItMTUwNyE=
+  site-name: localDevEnv
+  async:
+    core-pool-size: 50
+    max-pool-size: 50
+    queue-capacity: 500
+spring:
+  datasource:
+    url: jdbc:mariadb://localhost:3307/catalogdb
+    username: root
+    password: password
+    driver-class-name: org.mariadb.jdbc.Driver    
+    initialize: true
+    initialization-mode: never
+  jpa:   
+    generate-ddl: false
+    show-sql: false
+    hibernate:      
+      ddl-auto: none
+      naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+      enable-lazy-load-no-trans: true
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+
+mariaDB4j:
+  dataDir: 
+  port: 3307
+  databaseName: catalogdb
+
+
+#Actuator
+management: 
+  endpoints:
+    enabled-by-default: false
+  endpoint:
+    info:
+      enabled: true
\ No newline at end of file
diff --git a/adapters/mso-adapter-utils/src/test/resources/data.sql b/adapters/mso-adapter-utils/src/test/resources/data.sql
new file mode 100644
index 0000000..5e0e558
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/test/resources/data.sql
@@ -0,0 +1,3 @@
+INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, '2018-07-17 14:05:08', '2018-07-17 14:05:08');
+
+INSERT INTO `cloud_sites` (`ID`, `region_id`, `identity_service_id`, `cloud_version`, `clli`, `cloudify_id`, `platform`, `orchestrator`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('MTN13', 'mtn13', 'MTN13', '3.0', 'MDT13', 'mtn13', null, 'orchestrator', '2018-07-17 14:06:28', '2018-07-17 14:06:28');
\ No newline at end of file
