aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.7__CreateTableControllerSelectionRefence.sql (renamed from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.4__CreateTableControllerSelectionRefence.sql)0
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql22
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java27
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java22
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java3
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java26
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java2
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java10
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java28
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java21
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java26
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java17
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java3
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn56
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java4
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java41
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java103
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java101
-rw-r--r--docs/api/SO_API_v0.1.2.pdf (renamed from docs/SO_API_v0.1.2.pdf)bin355169 -> 355169 bytes
-rw-r--r--docs/api/SO_MultiCloud.xlsx (renamed from docs/SO_MultiCloud.xlsx)bin9771 -> 9771 bytes
-rw-r--r--docs/api/UUI-SO_API_Specification_v0.1.docx (renamed from docs/UUI-SO_API_Specification_v0.1.docx)bin61243 -> 61243 bytes
-rw-r--r--docs/api/offered_consumed_apis.rst (renamed from docs/offered_consumed_apis.rst)30
-rw-r--r--docs/architecture/architecture.rst3
-rw-r--r--docs/developer_info/BPMN_Main_Process_Flows.rst (renamed from docs/bpmn/BPMN_Main_Process_Flows.rst)0
-rw-r--r--docs/developer_info/BPMN_Project_Deployment_Strategy.rst (renamed from docs/bpmn/BPMN_Project_Deployment_Strategy.rst)0
-rw-r--r--docs/developer_info/BPMN_Project_Structure.rst (renamed from docs/bpmn/BPMN_Project_Structure.rst)0
-rw-r--r--docs/developer_info/BPMN_Subprocess_Process_Flows.rst (renamed from docs/bpmn/BPMN_Subprocess_Process_Flows.rst)0
-rw-r--r--docs/developer_info/Building_SO.rst (renamed from docs/Building_SO.rst)0
-rw-r--r--docs/developer_info/Camunda_Cockpit_Community_Edition.rst (renamed from docs/bpmn/Camunda_Cockpit_Community_Edition.rst)0
-rw-r--r--docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst (renamed from docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst)0
-rw-r--r--docs/developer_info/Camunda_Modeler.rst (renamed from docs/bpmn/Camunda_Modeler.rst)0
-rw-r--r--docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf (renamed from docs/ONAP_SO_Env_Setup_Guide.pdf)bin777004 -> 777004 bytes
-rw-r--r--docs/developer_info/Working_with_SO_Docker.rst (renamed from docs/Working_with_SO_Docker.rst)0
-rw-r--r--docs/developer_info/developer_information.rst20
-rw-r--r--docs/developer_information.rst20
-rw-r--r--docs/index.rst6
-rw-r--r--docs/installconfigure/Install_Configure_SO.rst (renamed from docs/Install_Configure_SO.rst)328
-rw-r--r--docs/release_notes/release-notes.rst (renamed from docs/release-notes.rst)0
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java7
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java4
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java10
-rw-r--r--mso-catalog-db/src/test/resources/data.sql3
-rw-r--r--pom.xml15
50 files changed, 641 insertions, 344 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.4__CreateTableControllerSelectionRefence.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.7__CreateTableControllerSelectionRefence.sql
index dbeba53acc..dbeba53acc 100644
--- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.4__CreateTableControllerSelectionRefence.sql
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.7__CreateTableControllerSelectionRefence.sql
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql
new file mode 100644
index 0000000000..c5a8dcf806
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql
@@ -0,0 +1,22 @@
+use catalogdb;
+
+INSERT INTO building_block_detail (BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION)
+VALUES
+('ConfigurationScaleOutBB', 'VF_MODULE', 'CREATE'),
+('GenericVnfHealthCheckBB', 'VF_MODULE', 'CREATE');
+
+INSERT INTO northbound_request_ref_lookup(MACRO_ACTION, ACTION, REQUEST_SCOPE, IS_ALACARTE, IS_TOPLEVELFLOW, MIN_API_VERSION, MAX_API_VERSION) VALUES
+('VFModule-ScaleOut', 'createInstance', 'VfModule', true, true, '7','7');
+
+INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES
+('VFModule-ScaleOut', '1', 'GenericVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')),
+('VFModule-ScaleOut', '2', 'AssignVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')),
+('VFModule-ScaleOut', '3', 'CreateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')),
+('VFModule-ScaleOut', '4', 'ActivateVfModuleBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')),
+('VFModule-ScaleOut', '5', 'ConfigurationScaleOutBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut')),
+('VFModule-ScaleOut', '6', 'GenericVnfHealthCheckBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'VFModule-ScaleOut'));
+
+INSERT INTO rainy_day_handler_macro (FLOW_NAME, SERVICE_TYPE, VNF_TYPE, ERROR_CODE, WORK_STEP, POLICY)
+VALUES
+('GenericVnfHealthCheckBB', '*', '*', '*', "*" , 'Retry'),
+('ConfigurationScaleOutBB', '*', '*', '*', "*" , 'Retry');
diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
index fbafdd052e..ee89edbda8 100644
--- a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
@@ -2,8 +2,6 @@ package db.migration;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import org.flywaydb.core.api.MigrationVersion;
@@ -78,7 +76,7 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro
this.cloudConfig = cloudConfig;
}
- private CloudConfig loadCloudConfig(InputStream stream) throws JsonMappingException, IOException {
+ private CloudConfig loadCloudConfig(InputStream stream) throws IOException {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
R__CloudConfigMigration cloudConfigMigration =
mapper.readValue(stream, R__CloudConfigMigration.class);
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java
index f58382f53c..b86681ebfc 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* 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
@@ -45,12 +47,13 @@ import org.springframework.stereotype.Component;
@WebService(serviceName = "TenantAdapter", endpointInterface = "org.onap.so.adapters.tenant.MsoTenantAdapter", targetNamespace = "http://org.onap.so/tenant")
@Component
public class MsoTenantAdapterImpl implements MsoTenantAdapter {
- public static final String CREATE_TENANT = "CreateTenant";
+ public static final String CREATE_TENANT = "createTenant";
public static final String OPENSTACK = "OpenStack";
public static final String QUERY_TENANT = "QueryTenant";
public static final String DELETE_TENANT = "DeleteTenant";
public static final String ROLLBACK_TENANT = "RollbackTenant";
-
+ private static final String SUCCESS_RESPONSE_OPENSTACK="Successfully received response from Open Stack";
+ private static final String OPENSTACK_COMMUNICATE_EXCEPTION_MSG="Exception while communicate with Open Stack";
@Resource
private WebServiceContext wsContext;
@@ -84,7 +87,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
Boolean backout,
MsoRequest msoRequest,
Holder <String> tenantId,
- Holder <TenantRollback> rollback) throws TenantException, TenantAlreadyExists {
+ Holder <TenantRollback> rollback) throws TenantException {
MsoLogger.setLogContext (msoRequest);
MsoLogger.setServiceName (CREATE_TENANT);
@@ -104,7 +107,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
try {
tUtils = tFactory.getTenantUtils (cloudSiteId);
} catch (MsoCloudSiteNotFound me) {
- logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me);
+ logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me);
throw new TenantException (me);
}
@@ -113,11 +116,11 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
long queryTenantStartTime = System.currentTimeMillis ();
try {
newTenant = tUtils.queryTenantByName (tenantName, cloudSiteId);
- logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, QUERY_TENANT, null);
+ logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, QUERY_TENANT, null);
} catch (MsoException me) {
- logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", OPENSTACK, QUERY_TENANT, null);
+ logger.recordMetricEvent (queryTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, OPENSTACK, QUERY_TENANT, null);
String error = "Create Tenant " + tenantName + ": " + me;
- logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "Exception while communicate with Open Stack", me);
+ logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, me);
logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
throw new TenantException (me);
}
@@ -127,11 +130,11 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
long createTenantStartTime = System.currentTimeMillis ();
try {
newTenantId = tUtils.createTenant (tenantName, cloudSiteId, metadata, backout.booleanValue ());
- logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, CREATE_TENANT, null);
+ logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, CREATE_TENANT, null);
} catch (MsoException me) {
- logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with Open Stack", OPENSTACK, CREATE_TENANT, null);
+ logger.recordMetricEvent (createTenantStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, OPENSTACK, CREATE_TENANT, null);
String error = "Create Tenant " + tenantName + ": " + me;
- logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "Exception while communicate with Open Stack", me);
+ logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, OPENSTACK_COMMUNICATE_EXCEPTION_MSG, me);
logger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, error);
throw new TenantException (me);
}
@@ -176,7 +179,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
try {
tUtils = tFactory.getTenantUtils (cloudSiteId);
} catch (MsoCloudSiteNotFound me) {
- logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, "createTenant", MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me);
+ logger.error (MessageEnum.RA_CREATE_TENANT_ERR, me.getMessage(), OPENSTACK, CREATE_TENANT, MsoLogger.ErrorCode.DataError, "no implementation found for " + cloudSiteId, me);
throw new TenantException (me);
}
@@ -184,7 +187,7 @@ public class MsoTenantAdapterImpl implements MsoTenantAdapter {
long subStartTime = System.currentTimeMillis ();
try {
qTenant = tUtils.queryTenant (tenantNameOrId, cloudSiteId);
- logger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from Open Stack", OPENSTACK, QUERY_TENANT, null);
+ logger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, SUCCESS_RESPONSE_OPENSTACK, OPENSTACK, QUERY_TENANT, null);
if (qTenant == null) {
// Not found by ID, Try by name.
qTenant = tUtils.queryTenantByName (tenantNameOrId, cloudSiteId);
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java
index f4bda4aaa0..3e3c6754dc 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* 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
@@ -69,7 +71,9 @@ public class ValetClient {
private static final String DEFAULT_BASE_URL = "http://localhost:8080/";
private static final String DEFAULT_BASE_PATH = "api/valet/placement/v1";
private static final String DEFAULT_AUTH_STRING = "";
-
+ private static final String REQUEST_ID="requestId";
+ private static final String HEADERS=", headers=";
+ private static final String BODY=", body=";
@Autowired
private ObjectMapper mapper;
@@ -100,7 +104,7 @@ public class ValetClient {
GenericValetResponse<ValetCreateResponse> gvr = null;
try {
- UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId);
+ UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId);
URI uri = builder.build();
ValetCreateRequest vcr = this.createValetCreateRequest(regionId, tenantId, serviceInstanceId, vnfId, vnfName, vfModuleId, vfModuleName, keystoneUrl, heatRequest);
@@ -108,7 +112,7 @@ public class ValetClient {
String body = mapper.writeValueAsString(vcr);
HttpHeaders headers = generateHeaders(requestId);
HttpEntity<String> entity = new HttpEntity<>(body, headers);
- LOGGER.debug("valet create req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString());
+ LOGGER.debug("valet create req: " + uri.toString() + HEADERS + headers.toString() + BODY + body.toString());
response = restTemplate.exchange(uri, HttpMethod.POST, entity, ValetCreateResponse.class);
gvr = this.getGVRFromResponse(response);
@@ -128,7 +132,7 @@ public class ValetClient {
GenericValetResponse<ValetUpdateResponse> gvr = null;
try {
- UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId);
+ UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId);
URI uri = builder.build();
ValetUpdateRequest vur = this.createValetUpdateRequest(regionId, tenantId, serviceInstanceId, vnfId, vnfName, vfModuleId, vfModuleName, keystoneUrl, heatRequest);
@@ -136,7 +140,7 @@ public class ValetClient {
String body = mapper.writeValueAsString(vur);
HttpHeaders headers = generateHeaders(requestId);
HttpEntity<String> entity = new HttpEntity<>(body, headers);
- LOGGER.debug("valet update req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString());
+ LOGGER.debug("valet update req: " + uri.toString() + HEADERS + headers.toString() + ", body=" + body.toString());
response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetUpdateResponse.class);
gvr = this.getGVRFromResponse(response);
@@ -155,7 +159,7 @@ public class ValetClient {
GenericValetResponse<ValetDeleteResponse> gvr = null;
try {
- UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam("requestId", requestId);
+ UriBuilder builder = UriBuilder.fromPath(baseUrl).path(basePath).queryParam(REQUEST_ID, requestId);
URI uri = builder.build();
ValetDeleteRequest vdr = this.createValetDeleteRequest(regionId, tenantId, vfModuleId, vfModuleName);
@@ -163,7 +167,7 @@ public class ValetClient {
String body = mapper.writeValueAsString(vdr);
HttpHeaders headers = generateHeaders(requestId);
HttpEntity<String> entity = new HttpEntity<>(body, headers);
- LOGGER.debug("valet delete req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString());
+ LOGGER.debug("valet delete req: " + uri.toString() + HEADERS + headers.toString() + ", body=" + body.toString());
response = restTemplate.exchange(uri, HttpMethod.DELETE, entity, ValetDeleteResponse.class);
gvr = this.getGVRFromResponse(response);
@@ -190,7 +194,7 @@ public class ValetClient {
String body = mapper.writeValueAsString(vcr);
HttpHeaders headers = generateHeaders(requestId);
HttpEntity<String> entity = new HttpEntity<>(body, headers);
- LOGGER.debug("valet confirm req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body);
+ LOGGER.debug("valet confirm req: " + uri.toString() + HEADERS + headers.toString() + BODY + body);
response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetConfirmResponse.class);
gvr = this.getGVRFromResponse(response);
@@ -217,7 +221,7 @@ public class ValetClient {
String body = mapper.writeValueAsString(vrr);
HttpHeaders headers = generateHeaders(requestId);
HttpEntity<String> entity = new HttpEntity<>(body, headers);
- LOGGER.debug("valet rollback req: " + uri.toString() + ", headers=" + headers.toString() + ", body=" + body.toString());
+ LOGGER.debug("valet rollback req: " + uri.toString() + HEADERS + headers.toString() + BODY + body.toString());
response = restTemplate.exchange(uri, HttpMethod.PUT, entity, ValetRollbackResponse.class);
gvr = this.getGVRFromResponse(response);
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java
index dfd257b06b..4f7afa2d5c 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* 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
@@ -26,7 +28,6 @@ import java.util.Map;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.woorea.openstack.heat.model.CreateStackParam;
/*
* This class represents the heat request as sent to OpenStack as defined in the
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 29d8f297bf..0d7a739d36 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
@@ -947,19 +947,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
LOGGER.debug ("Got Heat Environment from DB: " + heatEnvironment.getEnvironment());
}
}
- // Replace flavors in environment with those returned by OOF
- if (!oldWay) {
- Map<String, Object> returnMap = updateFlavorsFromOof(heatEnvironment.getEnvironment(), inputs);
- String heatEnvironmentString = returnMap.get("heatEnvironmentString").toString();
- LOGGER.debug("After OOF Update Heat Env String is: " + heatEnvironmentString);
- if (returnMap.get("inputs") instanceof Map) {
- inputs = (Map<String, String>) returnMap.get("inputs");
- LOGGER.debug("After OOF Update inputs are: " + inputs.toString());
- } else {
- LOGGER.debug("inputs is not an instance of a Map: " + returnMap.get("inputs"));
- throw new VnfException("Updating inputs using OOF info failed.", MsoExceptionCategory.INTERNAL);
- }
- }
LOGGER.debug ("In MsoVnfAdapterImpl, about to call db.getNestedTemplates avec templateId="
+ heatTemplate.getArtifactUuid ());
@@ -2043,19 +2030,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
return vfModuleName;
}
- private Map<String, Object> updateFlavorsFromOof(String heatEnvironmentString, Map<String, String> inputs) {
- Map<String, Object> returnMap = new HashMap<>();
- for (Map.Entry<String, String> input : inputs.entrySet()){
- if (heatEnvironmentString.contains("label_" + input.getKey())){
- heatEnvironmentString = heatEnvironmentString.replace("label_" + input.getKey(),
- input.getValue());
- inputs.remove("label_" + input.getKey());
- }
- }
- returnMap.put("heatEnvironmentString", heatEnvironmentString);
- returnMap.put("inputs", inputs);
- return returnMap;
- }
/*
* Helper method to check a boolean property value - on error return provided default
*/
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java
index fba1d25a76..e74dd64bb3 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java
@@ -66,7 +66,7 @@ public class SDNCAdapterService extends Service {
try {
logger.info(MessageEnum.RA_PRINT_URL, SDNC_ADAPTER_WSDL, wsdlUrl.toURI().toString(), "");
} catch (Exception e) {
- logger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "SDNCAdapter.wsdl", "", "", MsoLogger.ErrorCode.DataError, "Exception - print URL", e);
+ logger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, SDNC_ADAPTER_WSDL, "", "", MsoLogger.ErrorCode.DataError, "Exception - print URL", e);
}
}
WSDL_LOCATION = wsdlUrl;
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java
index e68bac4178..e4882090bf 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java
@@ -45,7 +45,7 @@ import org.onap.so.logger.MsoLogger;
public class SDNCCallbackAdapterService extends Service {
private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, SDNCCallbackAdapterService.class);
-
+ private static final String SDNC_CALLBACK_ADAPTER_WSDL="SDNCCallbackAdapter.wsdl";
public static final URL WSDL_LOCATION;
public static final QName SERVICE = new QName("http://org.onap/workflow/sdnc/adapter/callback/wsdl/v1", "SDNCCallbackAdapterService");
public static final QName SDNCCallbackAdapterSoapHttpPort = new QName("http://org.onap/workflow/sdnc/adapter/callback/wsdl/v1", "SDNCCallbackAdapterSoapHttpPort");
@@ -54,15 +54,15 @@ public class SDNCCallbackAdapterService extends Service {
try {
wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCCallbackAdapter.wsdl");
} catch (Exception e) {
- msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCCallbackAdapter.wsdl", "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e);
+ msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, SDNC_CALLBACK_ADAPTER_WSDL, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - WSDL not found", e);
}
if(wsdlUrl == null) {
- msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, "SDNCCallbackAdapter.wsdl", "SDNC", "", MsoLogger.ErrorCode.DataError, "WSDL not found");
+ msoLogger.error(MessageEnum.RA_WSDL_NOT_FOUND, SDNC_CALLBACK_ADAPTER_WSDL, "SDNC", "", MsoLogger.ErrorCode.DataError, "WSDL not found");
} else {
try {
- msoLogger.info(MessageEnum.RA_PRINT_URL, "SDNCCallbackAdapter.wsdl", wsdlUrl.toURI().toString(), "SDNC");
+ msoLogger.info(MessageEnum.RA_PRINT_URL, SDNC_CALLBACK_ADAPTER_WSDL, wsdlUrl.toURI().toString(), "SDNC");
} catch (Exception e) {
- msoLogger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, "SDNCCallbackAdapter.wsdl", "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - URL convention problem", e);
+ msoLogger.error(MessageEnum.RA_WSDL_URL_CONVENTION_EXC, SDNC_CALLBACK_ADAPTER_WSDL, "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception - URL convention problem", e);
}
}
WSDL_LOCATION = wsdlUrl;
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index 58feaac0e7..71937245bc 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* 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
@@ -73,7 +75,9 @@ public class SDNCRestClient{
private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,SDNCRestClient.class);
private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
-
+ private static final String EXCEPTION_MSG="Exception while evaluate xpath";
+ private static final String MSO_INTERNAL_ERROR="MsoInternalError";
+ private static final String CAMUNDA="Camunda";
@Async
public void executeRequest(SDNCAdapterRequest bpelRequest)
{
@@ -217,7 +221,7 @@ public class SDNCRestClient{
eType = xpath.evaluate("error-type", error);
sdncErrMsg = new StringBuilder(". SDNC Returned-[error-type:" + eType);
} catch (Exception e3) {
- msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
+ msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, EXCEPTION_MSG, e3);
}
String eTag = null;
@@ -225,7 +229,7 @@ public class SDNCRestClient{
eTag = xpath.evaluate( "error-tag", error);
sdncErrMsg.append(", error-tag:").append(eTag);
} catch (Exception e3) {
- msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
+ msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, EXCEPTION_MSG, e3);
}
String eMsg = null;
@@ -233,7 +237,7 @@ public class SDNCRestClient{
eMsg = xpath.evaluate("error-message", error);
sdncErrMsg.append(", error-message:").append(eMsg).append("]");
} catch (Exception e3) {
- msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
+ msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, EXCEPTION_MSG, e3);
}
}
} catch (Exception e2) {
@@ -253,7 +257,7 @@ public class SDNCRestClient{
sdncResp.setRespMsg(respMsg);
msoLogger.error(MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC, "SDNC", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with SDNC", e);
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, respMsg);
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, respMsg);
return sdncResp;
}
finally
@@ -275,15 +279,15 @@ public class SDNCRestClient{
{
cbReq.setRequestData(sdncResp.getSdncRespXml());
}
- msoLogger.info(MessageEnum.RA_CALLBACK_BPEL.name() + ":\n" + cbReq.toString(), "Camunda", "");
+ msoLogger.info(MessageEnum.RA_CALLBACK_BPEL.name() + ":\n" + cbReq.toString(), CAMUNDA, "");
URL wsdlUrl = null;
try {
wsdlUrl = new URL (bpelUrl);
} catch (MalformedURLException e1) {
error = "Caught exception initializing Callback wsdl " + e1.getMessage();
- msoLogger.error(MessageEnum.RA_INIT_CALLBACK_WSDL_ERR, "Camunda", "", MsoLogger.ErrorCode.DataError, "Exception initializing Callback wsdl", e1);
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+ msoLogger.error(MessageEnum.RA_INIT_CALLBACK_WSDL_ERR, CAMUNDA, "", MsoLogger.ErrorCode.DataError, "Exception initializing Callback wsdl", e1);
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, error);
}
SDNCCallbackAdapterService cbSvc = new SDNCCallbackAdapterService();
@@ -312,8 +316,8 @@ public class SDNCRestClient{
}
catch (Exception e2) {
error = "Unable to set authorization in callback request " + e2.getMessage();
- msoLogger.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Unable to set authorization in callback request", e2);
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+ msoLogger.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - Unable to set authorization in callback request", e2);
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, error);
}
msoLogger.debug("Invoking Bpel Callback. BpelCallbackUrl:" + bpelUrl);
@@ -324,9 +328,9 @@ public class SDNCRestClient{
{
error = "Error sending BpelCallback request" + e.getMessage();
msoLogger.error("Error " + MsoLogger.ErrorCode.BusinessProcesssError + " - " + MessageEnum.RA_CALLBACK_BPEL_EXC + " - " + error, e);
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, error);
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, error);
}
- msoLogger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), "Camunda", "");
+ msoLogger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), CAMUNDA, "");
return;
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
index 576d7846cd..d5ce96ea5a 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* 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
@@ -47,7 +49,8 @@ import org.springframework.core.env.Environment;
public class BPRestCallback {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,BPRestCallback.class);
private static final MsoAlarmLogger ALARMLOGGER = new MsoAlarmLogger();
-
+ private static final String CAMUNDA="Camunda";
+ private static final String MSO_INTERNAL_ERROR="MsoInternalError";
@Autowired
private Environment env;
@@ -91,7 +94,7 @@ public class BPRestCallback {
+ " message=" + message
+ ")");
- LOGGER.info(MessageEnum.RA_CALLBACK_BPEL, message == null ? "[no content]" : message, "Camunda", "");
+ LOGGER.info(MessageEnum.RA_CALLBACK_BPEL, message == null ? "[no content]" : message, CAMUNDA, "");
HttpPost method = null;
HttpResponse httpResponse = null;
@@ -121,9 +124,9 @@ public class BPRestCallback {
String authorization = "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes());
method.setHeader("Authorization", authorization);
} catch (Exception e) {
- LOGGER.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError,
+ LOGGER.error(MessageEnum.RA_SET_CALLBACK_AUTH_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError,
"Unable to set authorization in callback request", e);
- ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL,
+ ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL,
"Unable to set authorization in callback request: " + e.getMessage());
error = true;
}
@@ -140,15 +143,15 @@ public class BPRestCallback {
if (httpResponse.getStatusLine().getStatusCode() >= 300) {
String msg = "Received error response to callback request: " + httpResponse.getStatusLine();
- LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, msg);
- ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, msg);
+ LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError, msg);
+ ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, msg);
}
}
return true;
} catch (Exception e) {
- LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError,
+ LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, CAMUNDA, "", MsoLogger.ErrorCode.BusinessProcesssError,
"Error sending callback request", e);
- ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL,
+ ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL,
"Error sending callback request: " + e.getMessage());
return false;
} finally {
@@ -168,7 +171,7 @@ public class BPRestCallback {
LOGGER.debug("Exception:", e);
}
}
- LOGGER.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE, "Camunda", "","");
+ LOGGER.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE, CAMUNDA, "","");
}
}
} \ No newline at end of file
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java
index 8541889d8e..da00a6fafa 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* 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
@@ -35,6 +37,10 @@ public class MapTypedRequestTunablesData {
private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,MapTypedRequestTunablesData.class);
private static final MsoAlarmLogger alarmLogger = new MsoAlarmLogger();
+
+ private static final String MISSING_CONFIGURATION_ERROR_MSG= "Missing configuration for: ";
+ private static final String MISSING_CONFIG_PARAM_ERROR_MSG="Missing config param";
+ private static final String MSO_INTERNAL_ERROR="MsoInternalError";
@Autowired
private Environment env;
@@ -47,9 +53,9 @@ public class MapTypedRequestTunablesData {
String value = env.getProperty(reqTunable.getKey().toLowerCase(), "");
if ("".equals(value)) {
- error= "Missing configuration for: " + reqTunable.getKey();
- msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, reqTunable.getKey(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Missing config param");
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError());
+ error= MISSING_CONFIGURATION_ERROR_MSG + reqTunable.getKey();
+ msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, reqTunable.getKey(), "SDNC", "", MsoLogger.ErrorCode.DataError, MISSING_CONFIG_PARAM_ERROR_MSG);
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError());
throw new SDNCAdapterException(error);
}
@@ -58,7 +64,7 @@ public class MapTypedRequestTunablesData {
if (parts.length != 5) {
error="Invalid configuration for: " + reqTunable.getKey();
msoLogger.error(MessageEnum.RA_SDNC_INVALID_CONFIG, reqTunable.getKey(), value, "SDNC", "", MsoLogger.ErrorCode.DataError, "Invalid config");
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError());
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError());
throw new SDNCAdapterException(error);
}
@@ -72,9 +78,9 @@ public class MapTypedRequestTunablesData {
reqTunable.setSdncUrl(env.getProperty(urlPropKey, ""));
if ("".equals(reqTunable.getSdncUrl())) {
- error="Missing configuration for: " + urlPropKey;
- msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, urlPropKey, "SDNC", "", MsoLogger.ErrorCode.DataError, "Missing config param");
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError());
+ error=MISSING_CONFIGURATION_ERROR_MSG + urlPropKey;
+ msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, urlPropKey, "SDNC", "", MsoLogger.ErrorCode.DataError, MISSING_CONFIG_PARAM_ERROR_MSG);
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError());
throw new SDNCAdapterException(error);
}
@@ -89,10 +95,10 @@ public class MapTypedRequestTunablesData {
reqTunable.setMyUrl(env.getProperty(Constants.MY_URL_PROP, ""));
if ("".equals(reqTunable.getMyUrl())) {
- error="Missing configuration for: " + Constants.MY_URL_PROP;
+ error=MISSING_CONFIGURATION_ERROR_MSG + Constants.MY_URL_PROP;
msoLogger.error(MessageEnum.RA_SDNC_MISS_CONFIG_PARAM, Constants.MY_URL_PROP, "SDNC", "",
- MsoLogger.ErrorCode.DataError, "Missing config param");
- alarmLogger.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, reqTunable.getError());
+ MsoLogger.ErrorCode.DataError, MISSING_CONFIG_PARAM_ERROR_MSG);
+ alarmLogger.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, reqTunable.getError());
throw new SDNCAdapterException(error);
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java
index 6bd7037ca1..6e4fbd830e 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* 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
@@ -68,7 +70,8 @@ import org.springframework.core.env.Environment;
public abstract class SDNCConnector {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA,SDNCConnector.class);
private static final MsoAlarmLogger ALARMLOGGER = new MsoAlarmLogger();
-
+ private static final String MSO_INTERNAL_ERROR="MsoInternalError";
+ private static final String XPATH_EXCEPTION="XPath Exception";
@Autowired
private Environment env;
@@ -146,7 +149,7 @@ public abstract class SDNCConnector {
}
logError(errMsg);
- ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg);
+ ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, errMsg);
return createErrorResponse(statusCode, errMsg, rt);
}
@@ -196,13 +199,13 @@ public abstract class SDNCConnector {
protected void logError(String errMsg) {
LOGGER.error(MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC, "SDNC", "",
MsoLogger.ErrorCode.AvailabilityError, errMsg);
- ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg);
+ ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, errMsg);
}
protected void logError(String errMsg, Throwable t) {
LOGGER.error(MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC, "SDNC", "",
MsoLogger.ErrorCode.AvailabilityError, errMsg, t);
- ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg);
+ ALARMLOGGER.sendAlarm(MSO_INTERNAL_ERROR, MsoAlarmLogger.CRITICAL, errMsg);
}
/**
@@ -286,7 +289,7 @@ public abstract class SDNCConnector {
info += "error-type:" + errorType;
} catch (XPathExpressionException e) {
LOGGER.error(MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "",
- MsoLogger.ErrorCode.DataError, "XPath Exception", e);
+ MsoLogger.ErrorCode.DataError, XPATH_EXCEPTION, e);
}
try {
@@ -297,7 +300,7 @@ public abstract class SDNCConnector {
info += "error-tag:" + errorTag;
} catch (XPathExpressionException e) {
LOGGER.error(MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "",
- MsoLogger.ErrorCode.DataError, "XPath Exception", e);
+ MsoLogger.ErrorCode.DataError, XPATH_EXCEPTION, e);
}
try {
@@ -308,7 +311,7 @@ public abstract class SDNCConnector {
info += "error-message:" + errorMessage;
} catch (Exception e) {
LOGGER.error(MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "",
- MsoLogger.ErrorCode.DataError, "XPath Exception", e);
+ MsoLogger.ErrorCode.DataError, XPATH_EXCEPTION, e);
}
if (!info.isEmpty()) {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java
index 9feee14640..8fae2816b2 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java
@@ -31,12 +31,13 @@ import org.onap.so.bpmn.core.json.JsonUtils;
import org.onap.so.client.appc.ApplicationControllerSupport.StatusCategory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
-
+@Component
public class ApplicationControllerAction {
protected ApplicationControllerOrchestrator client = new ApplicationControllerOrchestrator();
private String errorCode = "1002";
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn
new file mode 100644
index 0000000000..d7828c5163
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0ky0lyw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2">
+ <bpmn:process id="GenericVnfHealthCheckBB" name="GenericVnfHealthCheckBB" isExecutable="true">
+ <bpmn:startEvent id="Start_GenericVnfHealthChkBB" name="Start">
+ <bpmn:outgoing>SequenceFlow_06ab7wm</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:serviceTask id="SetParamsHealthCheck" name="Set Params HealthCheck" camunda:expression="${GenericVnfHealthCheck.setParamsForGenericVnfHealthCheck(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_06ab7wm</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1yhmh9s</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_06ab7wm" sourceRef="Start_GenericVnfHealthChkBB" targetRef="SetParamsHealthCheck" />
+ <bpmn:endEvent id="End_GenericVnfHealthChkBB" name="End">
+ <bpmn:incoming>SequenceFlow_12srn62</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1yhmh9s" sourceRef="SetParamsHealthCheck" targetRef="Call-AppC-HealthCheck" />
+ <bpmn:sequenceFlow id="SequenceFlow_12srn62" sourceRef="Call-AppC-HealthCheck" targetRef="End_GenericVnfHealthChkBB" />
+ <bpmn:serviceTask id="Call-AppC-HealthCheck" name="Call APP-C For&#10;HealthCheck&#10;" camunda:expression="${GenericVnfHealthCheck.callAppcClient(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_1yhmh9s</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12srn62</bpmn:outgoing>
+ </bpmn:serviceTask>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericVnfHealthCheckBB">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_GenericVnfHealthChkBB">
+ <dc:Bounds x="173" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="179" y="145" width="25" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1juzqvs_di" bpmnElement="SetParamsHealthCheck">
+ <dc:Bounds x="261" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_06ab7wm_di" bpmnElement="SequenceFlow_06ab7wm">
+ <di:waypoint x="209" y="120" />
+ <di:waypoint x="261" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_07e01q3_di" bpmnElement="End_GenericVnfHealthChkBB">
+ <dc:Bounds x="554" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="562" y="145" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1yhmh9s_di" bpmnElement="SequenceFlow_1yhmh9s">
+ <di:waypoint x="361" y="120" />
+ <di:waypoint x="413" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12srn62_di" bpmnElement="SequenceFlow_12srn62">
+ <di:waypoint x="513" y="120" />
+ <di:waypoint x="554" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0d1v1dn_di" bpmnElement="Call-AppC-HealthCheck">
+ <dc:Bounds x="413" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
index f6d81ba771..21b6dd402b 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
@@ -51,6 +51,7 @@ import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils;
import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignVnf;
import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetwork;
import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetworkCollection;
+import org.onap.so.bpmn.infrastructure.flowspecific.tasks.GenericVnfHealthCheck;
import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignNetworkBB;
import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignVnf;
import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCActivateTasks;
@@ -182,6 +183,9 @@ public abstract class BaseBPMNTest {
@MockBean
protected WorkflowActionBBTasks workflowActionBBTasks;
+ @MockBean
+ protected GenericVnfHealthCheck genericVnfHealthCheck;
+
@LocalServerPort
private int port;
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java
new file mode 100644
index 0000000000..1c882e85d1
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java
@@ -0,0 +1,41 @@
+package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
+
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doThrow;
+
+import java.io.IOException;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.junit.Test;
+import org.onap.so.bpmn.BaseBPMNTest;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+
+
+
+public class GenericVnfHealthCheckBBTest extends BaseBPMNTest {
+
+ @Test
+ public void sunnyDayGenericVnfHealthCheckBBTest() throws InterruptedException, IOException {
+
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("Start_GenericVnfHealthChkBB", "SetParamsHealthCheck",
+ "Call-AppC-HealthCheck", "End_GenericVnfHealthChkBB");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void genericVnfHealthCheckBBExceptionTest() throws Exception {
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(genericVnfHealthCheck).setParamsForGenericVnfHealthCheck(any(BuildingBlockExecution.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted()
+ .hasPassedInOrder("Start_GenericVnfHealthChkBB", "SetParamsHealthCheck")
+ .hasNotPassed("Call-AppC-HealthCheck", "End_GenericVnfHealthChkBB");
+ assertThat(pi).isEnded();
+ }
+}
+
+
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
index d7bb084195..2d102afe9f 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
+++ b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
@@ -67,6 +67,9 @@ mso:
workflow:
message:
endpoint: http://localhost:28090/workflows/messages/message
+ requestDb:
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ endpoint: http://localhost:8081
async:
core-pool-size: 50
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 808bbc1898..df4698de9d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -311,8 +311,8 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
//Get Service Instance Info
String serviceInstanceId = getVariableEnforced(execution, "DoCVNF_serviceInstanceId")
- String globalCustId = execution.getVariable("global-customer-id")
- String serviceType = execution.getVariable("service-type")
+ String globalCustId = execution.getVariable("globalCustomerId")
+ String serviceType = execution.getVariable("serviceType")
Map<String, String> payload = new LinkedHashMap<>();
payload.put("vnf-id", vnfId);
@@ -337,7 +337,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
resourceClient.connect(uri, siUri)
}catch(Exception ex) {
- msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process " + ex.getMessage())
+ msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process ", ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf CreateGenericVnf Process")
}
msoLogger.trace("COMPLETED DoCreateVnf CreateGenericVnf Process")
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
index 5833244c7c..515a9bb85a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
@@ -518,7 +518,6 @@ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(execution)]]></bpmn2:s
<camunda:in source="serviceModelInfo" target="serviceModelInfo" />
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceDecomposition" target="serviceDecomposition" />
- <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0ws7fjn</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1mkdhw9</bpmn2:outgoing>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
index d817f5703b..0d48719c6b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
@@ -40,7 +40,6 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script>
<camunda:in source="tenantId" target="tenantId" />
<camunda:in source="false" target="usePreload" />
<camunda:in source="aLaCarte" target="aLaCarte" />
- <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ixcnb6</bpmn:outgoing>
@@ -128,7 +127,6 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script>
<camunda:in source="tenantId" target="tenantId" />
<camunda:in source="rollbackData" target="rollbackData" />
<camunda:in source="vnfResourceDecomposition" target="vnfResourceDecomposition" />
- <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_19ohb1a</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_07u8e3l</bpmn:outgoing>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
new file mode 100644
index 0000000000..772def739b
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
@@ -0,0 +1,103 @@
+/*-
+ * ============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.bpmn.infrastructure.flowspecific.tasks;
+
+import java.util.HashMap;
+import java.util.Optional;
+
+import org.onap.appc.client.lcm.model.Action;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
+import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
+import org.onap.so.client.appc.ApplicationControllerAction;
+import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.db.catalog.client.CatalogDbClient;
+import org.onap.so.db.catalog.beans.ControllerSelectionReference;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class GenericVnfHealthCheck {
+
+ private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, GenericVnfHealthCheck.class);
+ @Autowired
+ private ExceptionBuilder exceptionUtil;
+ @Autowired
+ private ExtractPojosForBB extractPojosForBB;
+ @Autowired
+ private CatalogDbClient catalogDbClient;
+ @Autowired
+ private ApplicationControllerAction appCClient;
+
+ public void setParamsForGenericVnfHealthCheck(BuildingBlockExecution execution) {
+
+ GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
+
+ try {
+ ControllerSelectionReference controllerSelectionReference;
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+ String vnfId = vnf.getVnfId();
+ String vnfName = vnf.getVnfName();
+ String vnfType = vnf.getVnfType();
+ String oamIpAddress = vnf.getIpv4OamAddress();
+ String actionCategory = Action.HealthCheck.toString();
+ controllerSelectionReference = catalogDbClient.getControllerSelectionReferenceByVnfTypeAndActionCategory(vnfType, actionCategory);
+ String controllerName = controllerSelectionReference.getControllerName();
+
+ execution.setVariable("vnfId", vnfId);
+ execution.setVariable("vnfName", vnfName);
+ execution.setVariable("oamIpAddress", oamIpAddress);
+ execution.setVariable("msoRequestId", gBBInput.getRequestContext().getMsoRequestId());
+ execution.setVariable("action", actionCategory);
+ execution.setVariable("controllerType", controllerName);
+
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+
+ public void callAppcClient(BuildingBlockExecution execution) {
+
+ try {
+ Action action = null;
+ action = Action.valueOf(execution.getVariable("action"));
+ String msoRequestId = execution.getVariable("msoRequestId");
+ String vnfId = execution.getVariable("vnfId");
+ Optional<String> payload = null;
+ if(execution.getVariable("payload") != null){
+ String pay = execution.getVariable("payload");
+ payload = Optional.of(pay);
+ }
+ String controllerType = execution.getVariable("controllerType");
+ HashMap<String, String> payloadInfo = new HashMap<String, String>();
+ payloadInfo.put("vnfName", execution.getVariable("vnfName"));
+ payloadInfo.put("vfModuleId",execution.getVariable("vfModuleId"));
+ payloadInfo.put("oamIpAddress",execution.getVariable("oamIpAddress"));
+ //PayloadInfo contains extra information that adds on to payload before making request to appc
+ appCClient.runAppCCommand(action, msoRequestId, vnfId, payload, payloadInfo, controllerType);
+
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
index 8661c8e91e..be19f25cca 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
@@ -15,6 +15,7 @@
* 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.
+ * Modifications Copyright (C) 2018 IBM
* ============LICENSE_END=========================================================
*/
@@ -159,19 +160,19 @@ public class AAIObjectMapper {
return modelMapper.map(customer, org.onap.aai.domain.yang.Customer.class);
}
- public Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets> convertSubnets = new Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets>() {
+ private Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets> convertSubnets = new Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets>() {
public org.onap.aai.domain.yang.Subnets convert(MappingContext<List<Subnet>, org.onap.aai.domain.yang.Subnets> context) {
return mapToAAISubNets(context.getSource());
}
};
- public Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> convertCtagAssignments = new Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments>() {
+ private Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> convertCtagAssignments = new Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments>() {
public org.onap.aai.domain.yang.CtagAssignments convert(MappingContext<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> context) {
return mapToAAICtagAssignmentList(context.getSource());
}
};
- public Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> convertSegmentationAssignments = new Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments>() {
+ private Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> convertSegmentationAssignments = new Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments>() {
public org.onap.aai.domain.yang.SegmentationAssignments convert(MappingContext<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> context) {
return mapToAAISegmentationAssignmentList(context.getSource());
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java
index 87852e9922..3fce15a6c4 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java
@@ -27,6 +27,7 @@ import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
+import org.onap.so.client.appc.ApplicationControllerAction;
import org.onap.so.client.db.request.RequestsDbClient;
import org.onap.so.client.orchestration.AAICollectionResources;
import org.onap.so.client.orchestration.AAIInstanceGroupResources;
@@ -120,4 +121,7 @@ public abstract class BaseTaskTest extends TestDataSetup {
@SpyBean
protected SDNCClient SPY_sdncClient;
+
+ @MockBean
+ protected ApplicationControllerAction appCClient;
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
new file mode 100644
index 0000000000..3aaf15cf11
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java
@@ -0,0 +1,101 @@
+/*-
+ * ============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.bpmn.infrastructure.flowspecific.tasks;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import java.util.HashMap;
+import java.util.Optional;
+import java.util.UUID;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.appc.client.lcm.model.Action;
+import org.onap.so.bpmn.BaseTaskTest;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
+import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
+import org.onap.so.db.catalog.beans.ControllerSelectionReference;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class GenericVnfHealthCheckTest extends BaseTaskTest {
+
+ @Autowired
+ private GenericVnfHealthCheck genericVnfHealthCheck;
+
+ private GenericVnf genericVnf;
+ private RequestContext requestContext;
+ private String msoRequestId;
+
+ @Before
+ public void before() {
+ genericVnf = setGenericVnf();
+ msoRequestId = UUID.randomUUID().toString();
+ requestContext = setRequestContext();
+ requestContext.setMsoRequestId(msoRequestId);
+ gBBInput.setRequestContext(requestContext);
+ }
+
+ @Test
+ public void setParamsForGenericVnfHealthCheckTest() throws Exception {
+ ControllerSelectionReference controllerSelectionReference = new ControllerSelectionReference();
+ controllerSelectionReference.setControllerName("testName");
+ controllerSelectionReference.setActionCategory("testAction");
+ controllerSelectionReference.setVnfType("testVnfType");
+
+ doReturn(controllerSelectionReference).when(catalogDbClient).getControllerSelectionReferenceByVnfTypeAndActionCategory(genericVnf.getVnfType(), Action.HealthCheck.toString());
+
+ genericVnfHealthCheck.setParamsForGenericVnfHealthCheck(execution);
+
+ assertEquals(genericVnf.getVnfId(), execution.getVariable("vnfId"));
+ assertEquals(genericVnf.getVnfName(), execution.getVariable("vnfName"));
+ assertEquals(genericVnf.getIpv4OamAddress(), execution.getVariable("oamIpAddress"));
+ assertEquals("HealthCheck", execution.getVariable("action"));
+ assertEquals(requestContext.getMsoRequestId(), execution.getVariable("msoRequestId"));
+ assertEquals(controllerSelectionReference.getControllerName(), execution.getVariable("controllerType"));
+ }
+ @Test
+ public void callAppcClientTest() throws Exception {
+ Action action = Action.HealthCheck;
+ String vnfId = genericVnf.getVnfId();
+ String payload = "{\"testName\":\"testValue\",}";
+ String controllerType = "testType";
+ HashMap<String, String> payloadInfo = new HashMap<String, String>();
+ payloadInfo.put("vnfName", "testVnfName");
+ payloadInfo.put("vfModuleId", "testVfModuleId");
+ payloadInfo.put("oamIpAddress", "testOamIpAddress");
+ execution.setVariable("action", Action.HealthCheck.toString());
+ execution.setVariable("msoRequestId", msoRequestId);
+ execution.setVariable("controllerType", controllerType);
+ execution.setVariable("vnfId", "testVnfId1");
+ execution.setVariable("vnfName", "testVnfName");
+ execution.setVariable("vfModuleId", "testVfModuleId");
+ execution.setVariable("oamIpAddress", "testOamIpAddress");
+ execution.setVariable("payload", payload);
+
+ doNothing().when(appCClient).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType);
+
+ genericVnfHealthCheck.callAppcClient(execution);
+ verify(appCClient, times(1)).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType);
+ }
+}
diff --git a/docs/SO_API_v0.1.2.pdf b/docs/api/SO_API_v0.1.2.pdf
index cac440da5c..cac440da5c 100644
--- a/docs/SO_API_v0.1.2.pdf
+++ b/docs/api/SO_API_v0.1.2.pdf
Binary files differ
diff --git a/docs/SO_MultiCloud.xlsx b/docs/api/SO_MultiCloud.xlsx
index 9dcabd6eb8..9dcabd6eb8 100644
--- a/docs/SO_MultiCloud.xlsx
+++ b/docs/api/SO_MultiCloud.xlsx
Binary files differ
diff --git a/docs/UUI-SO_API_Specification_v0.1.docx b/docs/api/UUI-SO_API_Specification_v0.1.docx
index d68cccf4d3..d68cccf4d3 100644
--- a/docs/UUI-SO_API_Specification_v0.1.docx
+++ b/docs/api/UUI-SO_API_Specification_v0.1.docx
Binary files differ
diff --git a/docs/offered_consumed_apis.rst b/docs/api/offered_consumed_apis.rst
index 78f531db61..6f8b7fcb89 100644
--- a/docs/offered_consumed_apis.rst
+++ b/docs/api/offered_consumed_apis.rst
@@ -1,15 +1,15 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2018 Huawei Technologies Co., Ltd.
-
-SO Offered and Consumed APIs
-=====================================
-
-SO APIs
---------
-All the Service Orchestrator APIs, both inward and outward are documented in the below link of onap wiki.
-
-.. toctree::
- :maxdepth: 1
-
- api/SO_Interface.rst
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2018 Huawei Technologies Co., Ltd.
+
+SO Offered and Consumed APIs
+=====================================
+
+SO APIs
+--------
+All the Service Orchestrator APIs, both inward and outward are documented in the below link of onap wiki.
+
+.. toctree::
+ :maxdepth: 1
+
+ SO_Interface.rst
diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst
index 754c6f888e..7965e1d50f 100644
--- a/docs/architecture/architecture.rst
+++ b/docs/architecture/architecture.rst
@@ -86,7 +86,8 @@ SO Sub-Components
Support self-service updates to models and artifacts
-** SO Monitoring**
+**SO Monitoring**
+
Monitor BPMN Workflow execution by providing
* Service list search based on search criteria
* Service statistic
diff --git a/docs/bpmn/BPMN_Main_Process_Flows.rst b/docs/developer_info/BPMN_Main_Process_Flows.rst
index 43e08ffd9c..43e08ffd9c 100644
--- a/docs/bpmn/BPMN_Main_Process_Flows.rst
+++ b/docs/developer_info/BPMN_Main_Process_Flows.rst
diff --git a/docs/bpmn/BPMN_Project_Deployment_Strategy.rst b/docs/developer_info/BPMN_Project_Deployment_Strategy.rst
index 50f48363ed..50f48363ed 100644
--- a/docs/bpmn/BPMN_Project_Deployment_Strategy.rst
+++ b/docs/developer_info/BPMN_Project_Deployment_Strategy.rst
diff --git a/docs/bpmn/BPMN_Project_Structure.rst b/docs/developer_info/BPMN_Project_Structure.rst
index 209ec727c3..209ec727c3 100644
--- a/docs/bpmn/BPMN_Project_Structure.rst
+++ b/docs/developer_info/BPMN_Project_Structure.rst
diff --git a/docs/bpmn/BPMN_Subprocess_Process_Flows.rst b/docs/developer_info/BPMN_Subprocess_Process_Flows.rst
index 098f38ff02..098f38ff02 100644
--- a/docs/bpmn/BPMN_Subprocess_Process_Flows.rst
+++ b/docs/developer_info/BPMN_Subprocess_Process_Flows.rst
diff --git a/docs/Building_SO.rst b/docs/developer_info/Building_SO.rst
index 7d68e433cc..7d68e433cc 100644
--- a/docs/Building_SO.rst
+++ b/docs/developer_info/Building_SO.rst
diff --git a/docs/bpmn/Camunda_Cockpit_Community_Edition.rst b/docs/developer_info/Camunda_Cockpit_Community_Edition.rst
index a9379decc9..a9379decc9 100644
--- a/docs/bpmn/Camunda_Cockpit_Community_Edition.rst
+++ b/docs/developer_info/Camunda_Cockpit_Community_Edition.rst
diff --git a/docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst b/docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst
index 3e2d15bf15..3e2d15bf15 100644
--- a/docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst
+++ b/docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst
diff --git a/docs/bpmn/Camunda_Modeler.rst b/docs/developer_info/Camunda_Modeler.rst
index 54f3534210..54f3534210 100644
--- a/docs/bpmn/Camunda_Modeler.rst
+++ b/docs/developer_info/Camunda_Modeler.rst
diff --git a/docs/ONAP_SO_Env_Setup_Guide.pdf b/docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf
index 44b8d9cad6..44b8d9cad6 100644
--- a/docs/ONAP_SO_Env_Setup_Guide.pdf
+++ b/docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf
Binary files differ
diff --git a/docs/Working_with_SO_Docker.rst b/docs/developer_info/Working_with_SO_Docker.rst
index ee958efa41..ee958efa41 100644
--- a/docs/Working_with_SO_Docker.rst
+++ b/docs/developer_info/Working_with_SO_Docker.rst
diff --git a/docs/developer_info/developer_information.rst b/docs/developer_info/developer_information.rst
new file mode 100644
index 0000000000..8613f2605c
--- /dev/null
+++ b/docs/developer_info/developer_information.rst
@@ -0,0 +1,20 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+SO Developer Information
+========================
+
+.. toctree::
+ :maxdepth: 1
+
+.. developer_info/developer_info_Project_Structure.rst
+ developer_info/Camunda_Modeler.rst
+.. developer_info/developer_info_Main_Process_Flows.rst
+.. developer_info/developer_info_Subprocess_Process_Flows.rst
+.. developer_info/developer_info_Project_Deployment_Strategy.rst
+ developer_info/Building_SO.rst
+ developer_info/Working_with_SO_Docker.rst
+ developer_info/Camunda_Cockpit_Community_Edition.rst
+ developer_info/Camunda_Cockpit_Enterprise_Edition.rst
+ \ No newline at end of file
diff --git a/docs/developer_information.rst b/docs/developer_information.rst
deleted file mode 100644
index 739a1f2050..0000000000
--- a/docs/developer_information.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-SO Developer Information
-========================
-
-.. toctree::
- :maxdepth: 1
-
- BPMN_Project_Structure.rst
- Camunda_Modeler.rst
- BPMN_Main_Process_Flows.rst
- BPMN_Subprocess_Process_Flows.rst
- BPMN_Project_Deployment_Strategy.rst
- Building_SO.rst
- Working_with_SO_Docker.rst
- Camunda_Cockpit_Community_Edition.rst
- Camunda_Cockpit_Enterprise_Edition.rst
- \ No newline at end of file
diff --git a/docs/index.rst b/docs/index.rst
index 553b7f4cbc..ebb8b0b552 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -10,6 +10,6 @@ ONAP SO
installconfigure/Install_Configure_SO.rst
architecture/architecture.rst
- offered_consumed_apis.rst
- developer_information.rst
- release-notes.rst \ No newline at end of file
+ api/offered_consumed_apis.rst
+ developer_info/developer_information.rst
+ release_notes/release-notes.rst \ No newline at end of file
diff --git a/docs/Install_Configure_SO.rst b/docs/installconfigure/Install_Configure_SO.rst
index e06385e39b..bdfd328fc5 100644
--- a/docs/Install_Configure_SO.rst
+++ b/docs/installconfigure/Install_Configure_SO.rst
@@ -1,164 +1,164 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. Copyright 2017 Huawei Technologies Co., Ltd.
-
-SO Install & Configure
-==========================================
-
-Get Ubuntu
-----------
-Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition.
-
-Get VirtualBox and VirtualBox Guest Additions
----------------------------------------------
-Make sure you have the VirtualBox Guest Additions ISO for your version of VirtualBox. I'm using VirtualBox 5.1.28. Save the Guest Additions ISO on your host computer along with the Ubuntu ISO. Get the Guest Additions ISO from here:
- http://download.virtualbox.org/virtualbox
-*NOTE*: Guest Additions versions prior to 5.1 will not work with Ubuntu 16.04.3. If you have an earlier version of VirtualBox, you should upgrade to the latest 5.1 version.
-
-Create a new VM in VirtualBox for Ubuntu
-----------------------------------------
-Type: Linux
-
-Version: Ubuntu (64-bit)
-
-At least 2048 MB memory
-
-At least 40 GB VDI
-
-Network: Attached to: NAT
-
-Create a port-forwarding rule for SSH
--------------------------------------
-Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM.
-
-Go to "Network" settings in VirtualBox, add a port forwarding rule:
-
-Name: SSH
-
-Protocol: TCP
-
-Host IP: 127.0.0.1
-
-Host Port: 1022
-
-Guest IP: <leave blank>
-
-Guest Port: 22
-
-.. image:: ../images/Configure_ubuntu_SO_1.png
-
-.
-
-.. image:: ../images/Configure_ubuntu_SO_2.png
-
-Create Shared Folder
---------------------
-This is oriented to Windows users. If you're using a MAC or a Linux host computer, the details may be different. You can share any folder on the host computer with the Ubuntu VM. On Windows, a practical choice is to share the C:\Users folder, so that your Windows home directory will be accessible from the Ubuntu VM.
-
-Go to "Shared Folders" settings in VirtualBox, add a share:
-
-Folder Path: C:\Users
-
-Folder Name: Users
-
-Auto-mount: <checked>
-
-Read-only: <unchecked>
-
-.. image:: ../images/Configure_ubuntu_SO_3.png
-
-.
-
-.. image:: ../images/Configure_ubuntu_SO_4.png
-
-Install Ubuntu in the VM
-------------------------
-On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image.
-
-.. image:: images/Configure_ubuntu_SO_5.png
-
-After selecting the ISO image, start the VM.
-
-Follow the prompts to install Ubuntu.
-
-Proxy Configuration (optional)
-------------------------------
-If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here.
-**Ubuntu system proxy setting:**
-
- System Settings → Network → Network proxy
-
- (Replace "proxyhost" and port with your actual proxy information)
-
-.. image:: images/Configure_ubuntu_SO_6.png
-
-**apt proxy setting:**
- Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information):
-
- Acquire::http::Proxy "http://proxyhost:port";
-
- Reboot the VM.
-
-Install SSH Server
-------------------
-
-.. code-block:: bash
-
- sudo apt update
- sudo apt install openssh-server
-
-Connect to the VM from your host computer
------------------------------------------
- The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM.
-
-.. image:: ../images/Configure_ubuntu_SO_7.png
-
-Install VirtualBox Guest Additions
-----------------------------------
-On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image.
-
-.. image:: images/Configure_ubuntu_SO_8.png
-
-In a VM terminal window, mount the cdrom:
-
-.. code-block:: bash
-
- sudo mkdir -p /media/cdrom
- sudo mount /dev/cdrom /media/cdrom
-
-Install necessary dependencies:
-
-.. code-block:: bash
-
- sudo apt update
- sudo apt install gcc g++ dkms
-
-Install the guest additions. NOTE: look for errors in the command output! If you see an error that says you are missing kernel headers, the most likely cause is that you are using a VirtualBox version that is too old. The error message is misleading.
-
-.. code-block:: bash
-
- cd /media/cdrom
- sudo ./VBoxLinuxAdditions.run
-
-.. image:: ../images/Configure_ubuntu_SO_9.png
-
-Add yourself to the vboxsf user group (replace "userid" with your user ID):
-
-.. code-block:: bash
-
- sudo usermod -a -G vboxsf userid
-
-Reboot the VM.
-
-In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here:
- /media/sf_Users
-
-Further Reading
-----------------------------------------
-
-.. toctree::
- :maxdepth: 1
-
- installconfigure/Install_Docker.rst
- installconfigure/Configure_git_and_gerrit.rst
- installconfigure/Workspace_and_Development_Tools.rst \ No newline at end of file
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+SO Install & Configure
+==========================================
+
+Get Ubuntu
+----------
+Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition.
+
+Get VirtualBox and VirtualBox Guest Additions
+---------------------------------------------
+Make sure you have the VirtualBox Guest Additions ISO for your version of VirtualBox. I'm using VirtualBox 5.1.28. Save the Guest Additions ISO on your host computer along with the Ubuntu ISO. Get the Guest Additions ISO from here:
+ http://download.virtualbox.org/virtualbox
+*NOTE*: Guest Additions versions prior to 5.1 will not work with Ubuntu 16.04.3. If you have an earlier version of VirtualBox, you should upgrade to the latest 5.1 version.
+
+Create a new VM in VirtualBox for Ubuntu
+----------------------------------------
+Type: Linux
+
+Version: Ubuntu (64-bit)
+
+At least 2048 MB memory
+
+At least 40 GB VDI
+
+Network: Attached to: NAT
+
+Create a port-forwarding rule for SSH
+-------------------------------------
+Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM.
+
+Go to "Network" settings in VirtualBox, add a port forwarding rule:
+
+Name: SSH
+
+Protocol: TCP
+
+Host IP: 127.0.0.1
+
+Host Port: 1022
+
+Guest IP: <leave blank>
+
+Guest Port: 22
+
+.. image:: ../images/Configure_ubuntu_SO_1.png
+
+.
+
+.. image:: ../images/Configure_ubuntu_SO_2.png
+
+Create Shared Folder
+--------------------
+This is oriented to Windows users. If you're using a MAC or a Linux host computer, the details may be different. You can share any folder on the host computer with the Ubuntu VM. On Windows, a practical choice is to share the C:\Users folder, so that your Windows home directory will be accessible from the Ubuntu VM.
+
+Go to "Shared Folders" settings in VirtualBox, add a share:
+
+Folder Path: C:\Users
+
+Folder Name: Users
+
+Auto-mount: <checked>
+
+Read-only: <unchecked>
+
+.. image:: ../images/Configure_ubuntu_SO_3.png
+
+.
+
+.. image:: ../images/Configure_ubuntu_SO_4.png
+
+Install Ubuntu in the VM
+------------------------
+On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image.
+
+.. image:: images/Configure_ubuntu_SO_5.png
+
+After selecting the ISO image, start the VM.
+
+Follow the prompts to install Ubuntu.
+
+Proxy Configuration (optional)
+------------------------------
+If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here.
+**Ubuntu system proxy setting:**
+
+ System Settings → Network → Network proxy
+
+ (Replace "proxyhost" and port with your actual proxy information)
+
+.. image:: images/Configure_ubuntu_SO_6.png
+
+**apt proxy setting:**
+ Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information):
+
+ Acquire::http::Proxy "http://proxyhost:port";
+
+ Reboot the VM.
+
+Install SSH Server
+------------------
+
+.. code-block:: bash
+
+ sudo apt update
+ sudo apt install openssh-server
+
+Connect to the VM from your host computer
+-----------------------------------------
+ The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM.
+
+.. image:: ../images/Configure_ubuntu_SO_7.png
+
+Install VirtualBox Guest Additions
+----------------------------------
+On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image.
+
+.. image:: images/Configure_ubuntu_SO_8.png
+
+In a VM terminal window, mount the cdrom:
+
+.. code-block:: bash
+
+ sudo mkdir -p /media/cdrom
+ sudo mount /dev/cdrom /media/cdrom
+
+Install necessary dependencies:
+
+.. code-block:: bash
+
+ sudo apt update
+ sudo apt install gcc g++ dkms
+
+Install the guest additions. NOTE: look for errors in the command output! If you see an error that says you are missing kernel headers, the most likely cause is that you are using a VirtualBox version that is too old. The error message is misleading.
+
+.. code-block:: bash
+
+ cd /media/cdrom
+ sudo ./VBoxLinuxAdditions.run
+
+.. image:: ../images/Configure_ubuntu_SO_9.png
+
+Add yourself to the vboxsf user group (replace "userid" with your user ID):
+
+.. code-block:: bash
+
+ sudo usermod -a -G vboxsf userid
+
+Reboot the VM.
+
+In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here:
+ /media/sf_Users
+
+Further Reading
+----------------------------------------
+
+.. toctree::
+ :maxdepth: 1
+
+ Install_Docker.rst
+ Configure_git_and_gerrit.rst
+ Workspace_and_Development_Tools.rst \ No newline at end of file
diff --git a/docs/release-notes.rst b/docs/release_notes/release-notes.rst
index b27b2a3eca..b27b2a3eca 100644
--- a/docs/release-notes.rst
+++ b/docs/release_notes/release-notes.rst
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index ac21f5f8f7..8da24c928d 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -433,13 +433,6 @@ public class CatalogDbClient {
.queryParam(ACTION,action).build());
}
- public ControllerSelectionReference getControllerSelectionReferenceByVnfType(String vnfType) {
- return this.getSingleResource(controllerSelectionReferenceClient, UriBuilder
- .fromUri(endpoint + "/controllerSelectionReference/search/findControllerSelectionReferenceByVnfType")
- .queryParam("VNF_TYPE", vnfType).build());
-
- }
-
public ControllerSelectionReference getControllerSelectionReferenceByVnfTypeAndActionCategory(String vnfType, String actionCategory) {
return this.getSingleResource(controllerSelectionReferenceClient, UriBuilder
.fromUri(endpoint + "/controllerSelectionReference/search/findControllerSelectionReferenceByVnfTypeAndActionCategory")
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java
index ad1bbc3f68..ad162b547a 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java
@@ -29,9 +29,7 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "controllerSelectionReference", path = "controllerSelectionReference")
public interface ControllerSelectionReferenceRepository extends JpaRepository<ControllerSelectionReference, String> {
- public ControllerSelectionReference findControllerSelectionReferenceByVnfType(@Param("VNF_TYPE") String vnfType);
-
public ControllerSelectionReference findControllerSelectionReferenceByVnfTypeAndActionCategory(@Param("VNF_TYPE") String vnfType,
@Param("ACTION_CATEGORY") String actionCategory);
- } \ No newline at end of file
+ }
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java
index bc34883ad3..016d1d61d6 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java
@@ -41,16 +41,6 @@ public class ControllerSelectionReferenceTest {
@Autowired
private ControllerSelectionReferenceRepository controllerSelectionReferenceRepository;
-
- @Test
- public void Find_ControllerNameByVnfType_Test() {
- String vnfType = "vLoadBalancerMS/vLoadBalancerMS 0";
- String controllerName = "APPC";
- ControllerSelectionReference controller = controllerSelectionReferenceRepository.findControllerSelectionReferenceByVnfType(vnfType);
- assertEquals(vnfType, controller.getVnfType());
- assertEquals(controllerName, controller.getControllerName());
- }
-
@Test
public void Find_ControllerNameByVnfTypeAndAction_Test() {
String vnfType = "vLoadBalancerMS/vLoadBalancerMS 0";
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql
index 58bde0e532..9da6d13e49 100644
--- a/mso-catalog-db/src/test/resources/data.sql
+++ b/mso-catalog-db/src/test/resources/data.sql
@@ -649,4 +649,5 @@ INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `AD
INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28');
INSERT INTO `controller_selection_reference` (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES
-('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'ConfigScaleOut');
+('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'ConfigScaleOut'),
+('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'HealthCheck');
diff --git a/pom.xml b/pom.xml
index 8b9b295064..d2ddd6c386 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,6 @@
<docker.buildArg.docker_repository>${dockerPullRepo}</docker.buildArg.docker_repository>
<enforcer.skip>true</enforcer.skip>
<nexusproxy>https://nexus.onap.org</nexusproxy>
- <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
<releaseNexusPath>content/repositories/releases/</releaseNexusPath>
<snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
<publicNexusPath>content/repositories/public/</publicNexusPath>
@@ -112,13 +111,6 @@
<url>http://maven.restlet.com</url>
</pluginRepository>
<pluginRepository>
- <id>ecomp-staging</id>
- <url>${nexusproxy}/${stagingNexusPath}</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- <pluginRepository>
<id>ecomp-public</id>
<url>${nexusproxy}/${publicNexusPath}</url>
<snapshots>
@@ -142,13 +134,6 @@
</pluginRepositories>
<repositories>
<repository>
- <id>ecomp-staging</id>
- <url>https://nexus.onap.org/content/repositories/staging/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
<id>ecomp-public</id>
<url>https://nexus.onap.org/content/repositories/public/</url>
<snapshots>