diff options
author | 2017-12-18 15:03:24 +0100 | |
---|---|---|
committer | 2018-01-03 05:08:44 +0000 | |
commit | 4108c5aca1ee4c556af3937c09c4415d2ebbde70 (patch) | |
tree | 3ce4af7faaa655dac3e96769fa6608327d46d091 /adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud | |
parent | 58ee7ac8ab60a17a508358a4c1353eac00411be5 (diff) |
refactoring - remove unused code
Issue-ID: SO-360
Change-Id: Iac9653fa6d5f10de7986fa3d511535d74f0c24c8
Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud')
7 files changed, 7 insertions, 50 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java index 23230071c7..0af0e9422b 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudConfig.java @@ -26,13 +26,10 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; -import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.annotate.JsonRootName; -import org.openecomp.mso.logger.MessageEnum; import org.openecomp.mso.logger.MsoLogger; import org.openecomp.mso.openstack.exceptions.MsoCloudIdentityNotFound; @@ -165,25 +162,23 @@ public class CloudConfig { return null; } - protected synchronized void reloadPropertiesFile() throws JsonParseException, JsonMappingException, IOException, MsoCloudIdentityNotFound { + protected synchronized void reloadPropertiesFile() throws IOException, MsoCloudIdentityNotFound { this.loadCloudConfig(this.configFilePath, this.refreshTimerInMinutes); } protected synchronized void loadCloudConfig(String configFile, int refreshTimer) - throws JsonParseException, JsonMappingException, IOException, MsoCloudIdentityNotFound { + throws IOException, MsoCloudIdentityNotFound { FileReader reader = null; configFilePath = configFile; this.refreshTimerInMinutes = refreshTimer; - - CloudConfig cloudConfig = null; this.validCloudConfig=false; try { reader = new FileReader(configFile); // Parse the JSON input into a CloudConfig - cloudConfig = mapper.readValue(reader, CloudConfig.class); + CloudConfig cloudConfig = mapper.readValue(reader, CloudConfig.class); this.cloudSites = cloudConfig.cloudSites; this.identityServices = cloudConfig.identityServices; diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java index 0f15dea577..d0ba7e09fc 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java @@ -26,26 +26,17 @@ package org.openecomp.mso.cloud; import java.io.IOException; import java.net.URISyntaxException; import java.security.GeneralSecurityException; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.map.SerializerProvider; import org.codehaus.jackson.map.annotate.JsonDeserialize; import org.codehaus.jackson.map.annotate.JsonSerialize; -import org.codehaus.jackson.JsonProcessingException; - import org.openecomp.mso.openstack.exceptions.MsoAdapterException; import org.openecomp.mso.openstack.exceptions.MsoException; -import org.openecomp.mso.openstack.utils.MsoCommonUtils; import org.openecomp.mso.openstack.utils.MsoKeystoneUtils; import org.openecomp.mso.openstack.utils.MsoTenantUtils; import org.openecomp.mso.openstack.utils.MsoTenantUtilsFactory; import org.openecomp.mso.cloud.authentication.AuthenticationMethodFactory; import org.openecomp.mso.cloud.authentication.AuthenticationWrapper; -import org.openecomp.mso.cloud.authentication.models.RackspaceAuthentication; import org.openecomp.mso.cloud.authentication.wrappers.RackspaceAPIKeyWrapper; import org.openecomp.mso.cloud.authentication.wrappers.UsernamePasswordWrapper; import org.openecomp.mso.logger.MessageEnum; @@ -137,14 +128,6 @@ public class CloudIdentity { this.id = id; } - //DEPRECATED - public String getKeystoneUrl () throws MsoException { - if (this.identityServerType.equals(IdentityServerType.KEYSTONE)) - return this.identityUrl; - else - return null; - } - public String getKeystoneUrl (String regionId, String msoPropID) throws MsoException { if (IdentityServerType.KEYSTONE.equals(this.identityServerType)) { return this.identityUrl; diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeJsonDeserializer.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeJsonDeserializer.java index 7e4eced884..dcd8de79aa 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeJsonDeserializer.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityAuthenticationTypeJsonDeserializer.java @@ -22,17 +22,15 @@ package org.openecomp.mso.cloud; import java.io.IOException;
import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.JsonToken;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.JsonDeserializer;
-import org.openecomp.mso.cloud.CloudIdentity.IdentityServerType;
public class IdentityAuthenticationTypeJsonDeserializer extends JsonDeserializer<IdentityAuthenticationTypeAbstract> {
@Override
public IdentityAuthenticationTypeAbstract deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
- throws IOException, JsonProcessingException {
+ throws IOException {
JsonToken token = jsonParser.getCurrentToken();
if (JsonToken.VALUE_STRING.equals(token)) {
return IdentityAuthenticationTypeAbstract.valueOf(jsonParser.getText());
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonDeserializer.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonDeserializer.java index 6e030a9262..bb8a3f1fd9 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonDeserializer.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonDeserializer.java @@ -24,18 +24,15 @@ package org.openecomp.mso.cloud; import java.io.IOException;
import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.JsonToken;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.JsonDeserializer;
-import org.openecomp.mso.cloud.CloudIdentity.IdentityServerType;
-
public class IdentityServerTypeJsonDeserializer extends JsonDeserializer<IdentityServerTypeAbstract> {
@Override
public IdentityServerTypeAbstract deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
- throws IOException, JsonProcessingException {
+ throws IOException {
JsonToken token = jsonParser.getCurrentToken();
if (JsonToken.VALUE_STRING.equals(token)) {
return IdentityServerTypeAbstract.valueOf(jsonParser.getText());
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonSerializer.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonSerializer.java index 600f88b7bd..a05d0b8872 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonSerializer.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/IdentityServerTypeJsonSerializer.java @@ -22,17 +22,14 @@ package org.openecomp.mso.cloud; import java.io.IOException;
import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
-import org.openecomp.mso.cloud.CloudIdentity.IdentityServerType;
-
public class IdentityServerTypeJsonSerializer extends JsonSerializer<IdentityServerTypeAbstract> {
@Override
public void serialize(IdentityServerTypeAbstract tmpObj, JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
- throws IOException, JsonProcessingException {
+ throws IOException {
jsonGenerator.writeObject(tmpObj.toString());
}
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodFactory.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodFactory.java index 8236307f45..85cb2967d6 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodFactory.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/AuthenticationMethodFactory.java @@ -39,10 +39,7 @@ import com.woorea.openstack.keystone.model.Authentication; public final class AuthenticationMethodFactory {
private static Map<String, AuthenticationWrapper> authWrappers = new ConcurrentHashMap<>();
-
- /**
- *
- */
+
private AuthenticationMethodFactory() {}
/**
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/models/RackspaceAuthentication.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/models/RackspaceAuthentication.java index 2b8da9f641..c96b809ff9 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/models/RackspaceAuthentication.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/models/RackspaceAuthentication.java @@ -23,7 +23,6 @@ package org.openecomp.mso.cloud.authentication.models; -import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.map.annotate.JsonRootName; import com.woorea.openstack.keystone.model.Authentication; @@ -31,17 +30,8 @@ import com.woorea.openstack.keystone.model.Authentication; @JsonRootName("auth") public class RackspaceAuthentication extends Authentication { - /** - * - */ private static final long serialVersionUID = 5451283386875662918L; - @JsonIgnore - private String tenantId; - - @JsonIgnore - private String tenantName; - public static final class Token { private String username; |