aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java11
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java4
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java13
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java15
5 files changed, 24 insertions, 23 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql
index 4d11858960..419429ce11 100644
--- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql
@@ -188,8 +188,8 @@ VALUES
('VnfAdapterBB', '*', '*', '*', '*' , 'Retry'),
('AAICheckVnfInMaintBB', '*', '*', '*', '*' , 'Abort'),
('AAISetVnfInMaintBB', '*', '*', '*', '*' , 'Abort'),
-('AAIUnsetVnfInMaintBB', '*', '*', '*', '*' , 'Abort');
-
+('AAIUnsetVnfInMaintBB', '*', '*', '*', '*' , 'Abort'),
+('ConfigDeployVnfBB', '*', '*', '*', '*' , 'Retry');
INSERT INTO building_block_detail (building_block_name, resource_type, target_action)
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index 8511f3cb49..a141f59153 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -812,6 +812,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
logger.trace("Found vfModuleCust entry {}", vfmc.toString());
}
if (vf.getIsBase()) {
+ isBaseRequest = true;
logger.debug("This is a BASE VF request!");
} else {
logger.debug("This is *not* a BASE VF request!");
@@ -938,8 +939,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (heatTemplate == null) {
String error = "UpdateVF: No Heat Template ID defined in catalog database for " + vfModuleType
- + ", modelCustomizationUuid=" + mcu + ", vfModuleUuid=" + vf.getModelUUID()
- + ", vnfResourceModelUuid=" + vnfResource.getModelUUID() + ", reqType=" + requestTypeString;
+ + ", modelCustomizationUuid=" + mcu + ", vfModuleUuid="
+ + (vf != null ? vf.getModelUUID() : "null") + ", vnfResourceModelUuid="
+ + vnfResource.getModelUUID() + ", reqType=" + requestTypeString;
logger.error(LoggingAnchor.SIX, MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(), "Heat Template " + "ID",
vfModuleType, OPENSTACK, ErrorCode.DataError.getValue(), error);
logger.debug(error);
@@ -954,8 +956,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
} else {
if (heatEnvironment == null) {
String error = "Update VNF: undefined Heat Environment. VF=" + vfModuleType
- + ", modelCustomizationUuid=" + mcu + ", vfModuleUuid=" + vf.getModelUUID()
- + ", vnfResourceModelUuid=" + vnfResource.getModelUUID() + ", reqType=" + requestTypeString;
+ + ", modelCustomizationUuid=" + mcu + ", vfModuleUuid="
+ + (vf != null ? vf.getModelUUID() : "null") + ", vnfResourceModelUuid="
+ + vnfResource.getModelUUID() + ", reqType=" + requestTypeString;
logger.error(LoggingAnchor.FIVE, MessageEnum.RA_VNF_UNKNOWN_PARAM.toString(),
"Heat " + "Environment ID", OPENSTACK, ErrorCode.DataError.getValue(), error);
logger.debug(error);
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java b/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java
index afa6ccced1..c37eccf594 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java
@@ -86,7 +86,7 @@ public class ActivitySpecsActions {
}
}
} catch (Exception e) {
- logger.warn(LoggingAnchor.TWO, "Exception creating activitySpec", e.getMessage());
+ logger.warn(LoggingAnchor.TWO, "Exception creating activitySpec", e);
}
return activitySpecId;
@@ -120,7 +120,7 @@ public class ActivitySpecsActions {
}
} catch (Exception e) {
- logger.warn(LoggingAnchor.TWO, "Exception certifying activitySpec", e.getMessage());
+ logger.warn(LoggingAnchor.TWO, "Exception certifying activitySpec", e);
}
return certificationResult;
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java
index 60abdc33ef..639a96eab6 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java
@@ -22,7 +22,6 @@
package org.onap.so.asdc.client;
-
import java.security.GeneralSecurityException;
import java.util.Arrays;
import java.util.Collections;
@@ -40,11 +39,11 @@ import org.springframework.stereotype.Component;
public class ASDCConfiguration implements IConfiguration {
// SHell command to obtain the same encryption, 128 bits key, key must be HEX
- // echo -n "This is a test string" | openssl aes-128-ecb -e -K 546573746F736973546573746F736973 -nosalt | xxd
+ // echo -n "This is a test string" | openssl aes-128-ecb -e -K 546573746F736973546573746F736973
+ // -nosalt | xxd
private static Logger logger = LoggerFactory.getLogger(ASDCConfiguration.class);
-
private String asdcControllerName;
public static final String HEAT = "HEAT";
@@ -74,7 +73,6 @@ public class ASDCConfiguration implements IConfiguration {
@Value("${mso.asdc-connections.asdc-controller1.messageBusAddress}")
private String[] messageBusAddress;
-
public void setAsdcControllerName(String asdcControllerName) {
this.asdcControllerName = asdcControllerName;
}
@@ -96,15 +94,12 @@ public class ASDCConfiguration implements IConfiguration {
} else {
return Collections.emptyList();
}
-
-
}
public String getAsdcControllerName() {
return asdcControllerName;
}
-
@Override
public String getConsumerGroup() {
return getPropertyOrNull("mso.asdc-connections.asdc-controller1.consumerGroup");
@@ -172,6 +167,7 @@ public class ASDCConfiguration implements IConfiguration {
try {
return Boolean.valueOf(config);
} catch (Exception e) {
+ logger.warn("Exception while getting boolean property with default property", e);
return defaultValue;
}
}
@@ -194,7 +190,8 @@ public class ASDCConfiguration implements IConfiguration {
@Override
public List<String> getRelevantArtifactTypes() {
- // DO not return the Static List SUPPORTED_ARTIFACT_TYPES_LIST because the ASDC Client will try to modify it !!!
+ // DO not return the Static List SUPPORTED_ARTIFACT_TYPES_LIST because the ASDC Client will
+ // try to modify it !!!
return Arrays.asList(SUPPORTED_ARTIFACT_TYPES);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index b0ba0595d5..a1fcbff0db 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -33,7 +35,6 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.PostConstruct;
-import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang3.StringUtils;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
@@ -118,7 +119,7 @@ public class VnfAdapterVfModuleObjectMapper {
public CreateVfModuleRequest createVfModuleRequestMapper(RequestContext requestContext, CloudRegion cloudRegion,
OrchestrationContext orchestrationContext, ServiceInstance serviceInstance, GenericVnf genericVnf,
VfModule vfModule, VolumeGroup volumeGroup, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse)
- throws JsonParseException, JsonMappingException, IOException {
+ throws IOException {
CreateVfModuleRequest createVfModuleRequest = new CreateVfModuleRequest();
createVfModuleRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId());
@@ -167,7 +168,7 @@ public class VnfAdapterVfModuleObjectMapper {
private Map<String, Object> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance,
GenericVnf genericVnf, VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse)
- throws JsonParseException, JsonMappingException, IOException {
+ throws IOException {
GenericResourceApiVnfTopology vnfTop =
@@ -206,7 +207,7 @@ public class VnfAdapterVfModuleObjectMapper {
Map<String, Object> srcMap) {
StringBuilder directives = new StringBuilder();
int no_directives_size = 0;
- if (directives.equals(MsoMulticloudUtils.USER_DIRECTIVES)
+ if (directive.equals(MsoMulticloudUtils.USER_DIRECTIVES)
&& srcMap.containsKey(MsoMulticloudUtils.OOF_DIRECTIVES)) {
no_directives_size = 1;
}
@@ -214,7 +215,7 @@ public class VnfAdapterVfModuleObjectMapper {
directives.append("{ \"attributes\": [ ");
int i = 0;
for (String attributeName : srcMap.keySet()) {
- if (!(MsoMulticloudUtils.USER_DIRECTIVES.equals(directives)
+ if (!(MsoMulticloudUtils.USER_DIRECTIVES.equals(directive)
&& attributeName.equals(MsoMulticloudUtils.OOF_DIRECTIVES))) {
directives.append(new AttributeNameValue(attributeName, srcMap.get(attributeName).toString()));
if (i < (srcMap.size() - 1 + no_directives_size))
@@ -247,7 +248,7 @@ public class VnfAdapterVfModuleObjectMapper {
private void buildParamsMapFromVnfSdncResponse(Map<String, Object> paramsMap,
GenericResourceApiVnftopologyVnfTopology vnfTopology, Map<String, String> networkRoleMap,
- boolean skipVnfResourceAssignments) throws JsonParseException, JsonMappingException, IOException {
+ boolean skipVnfResourceAssignments) throws IOException {
// Get VNF parameters from SDNC response
GenericResourceApiParam vnfParametersData = vnfTopology.getVnfParametersData();
buildParamsMapFromSdncParams(paramsMap, vnfParametersData);
@@ -324,7 +325,7 @@ public class VnfAdapterVfModuleObjectMapper {
private void buildParamsMapFromVfModuleSdncResponse(Map<String, Object> paramsMap,
GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology, boolean skipVfModuleAssignments)
- throws JsonParseException, JsonMappingException, IOException {
+ throws IOException {
// Get VF Module parameters from SDNC response
GenericResourceApiParam vfModuleParametersData = vfModuleTopology.getVfModuleParameters();
buildParamsMapFromSdncParams(paramsMap, vfModuleParametersData);