diff options
author | 2018-05-02 16:46:14 -0400 | |
---|---|---|
committer | 2018-05-04 15:28:51 +0000 | |
commit | 3ee4ec41ac18e51a16eafa767e090502b1a33fb5 (patch) | |
tree | 11a4d7b6c3bc5b88ce8dd67f12c7726c9f7dd80f /adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java | |
parent | 13999df2b5cbcfd29d479e20970b39ba876725f3 (diff) |
Fix CloudConfig junits
...for some definition of the word "fix". There is still a lot
that's less than ideal about how CloudConfig is handled, and with
how the unit tests are written.
Change-Id: Ic8c66c64d336f22c141687cf41a4828810bf1aec
Issue-ID: SO-584
Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java')
-rw-r--r-- | adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java index 2cd4597c18..964babd1e0 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoTenantUtils.java @@ -22,7 +22,6 @@ package org.openecomp.mso.openstack.utils; import java.util.Map; -import org.openecomp.mso.cloud.CloudConfig; import org.openecomp.mso.cloud.CloudConfigFactory; import org.openecomp.mso.cloud.CloudIdentity; import org.openecomp.mso.logger.MessageEnum; @@ -36,16 +35,14 @@ import org.openecomp.mso.properties.MsoPropertiesFactory; public abstract class MsoTenantUtils extends MsoCommonUtils { - protected CloudConfigFactory cloudConfigFactory; + private CloudConfigFactory cloudConfigFactory; protected MsoPropertiesFactory msoPropFactory; protected static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); protected MsoJavaProperties msoProps; - protected CloudConfig cloudConfig; - public MsoTenantUtils (String msoPropID) { - cloudConfigFactory = new CloudConfigFactory(); + public MsoTenantUtils (String msoPropID, CloudConfigFactory cloudConfigFactory) { + this.cloudConfigFactory = cloudConfigFactory; msoPropFactory = new MsoPropertiesFactory(); - cloudConfig = cloudConfigFactory.getCloudConfig (); LOGGER.debug("msoTenantUtils:" + msoPropID); @@ -56,6 +53,10 @@ public abstract class MsoTenantUtils extends MsoCommonUtils { } } + public CloudConfigFactory getCloudConfigFactory() { + return cloudConfigFactory; + } + public abstract String createTenant (String tenantName, String cloudSiteId, Map <String, String> metadata, boolean backout) throws MsoException; |