Merge "Update Logging"
authorRob Daugherty <rd472p@att.com>
Fri, 31 Aug 2018 18:14:48 +0000 (18:14 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 31 Aug 2018 18:14:48 +0000 (18:14 +0000)
50 files changed:
adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.7__CreateTableControllerSelectionRefence.sql [moved from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.4__CreateTableControllerSelectionRefence.sql with 100% similarity]
adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.8__AutoScaleOutReferenceData.sql [new file with mode: 0644]
adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapterImpl.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/ValetClient.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/valet/beans/HeatRequest.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java
adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java
bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn [new file with mode: 0644]
bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java [new file with mode: 0644]
bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java [new file with mode: 0644]
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java [new file with mode: 0644]
docs/api/SO_API_v0.1.2.pdf [moved from docs/SO_API_v0.1.2.pdf with 100% similarity]
docs/api/SO_MultiCloud.xlsx [moved from docs/SO_MultiCloud.xlsx with 100% similarity]
docs/api/UUI-SO_API_Specification_v0.1.docx [moved from docs/UUI-SO_API_Specification_v0.1.docx with 100% similarity]
docs/api/offered_consumed_apis.rst [moved from docs/offered_consumed_apis.rst with 91% similarity]
docs/architecture/architecture.rst
docs/developer_info/BPMN_Main_Process_Flows.rst [moved from docs/bpmn/BPMN_Main_Process_Flows.rst with 100% similarity]
docs/developer_info/BPMN_Project_Deployment_Strategy.rst [moved from docs/bpmn/BPMN_Project_Deployment_Strategy.rst with 100% similarity]
docs/developer_info/BPMN_Project_Structure.rst [moved from docs/bpmn/BPMN_Project_Structure.rst with 100% similarity]
docs/developer_info/BPMN_Subprocess_Process_Flows.rst [moved from docs/bpmn/BPMN_Subprocess_Process_Flows.rst with 100% similarity]
docs/developer_info/Building_SO.rst [moved from docs/Building_SO.rst with 100% similarity]
docs/developer_info/Camunda_Cockpit_Community_Edition.rst [moved from docs/bpmn/Camunda_Cockpit_Community_Edition.rst with 100% similarity]
docs/developer_info/Camunda_Cockpit_Enterprise_Edition.rst [moved from docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst with 100% similarity]
docs/developer_info/Camunda_Modeler.rst [moved from docs/bpmn/Camunda_Modeler.rst with 100% similarity]
docs/developer_info/ONAP_SO_Env_Setup_Guide.pdf [moved from docs/ONAP_SO_Env_Setup_Guide.pdf with 100% similarity]
docs/developer_info/Working_with_SO_Docker.rst [moved from docs/Working_with_SO_Docker.rst with 100% similarity]
docs/developer_info/developer_information.rst [new file with mode: 0644]
docs/developer_information.rst [deleted file]
docs/index.rst
docs/installconfigure/Install_Configure_SO.rst [moved from docs/Install_Configure_SO.rst with 93% similarity]
docs/release_notes/release-notes.rst [moved from docs/release-notes.rst with 100% similarity]
mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ControllerSelectionReferenceRepository.java
mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java
mso-catalog-db/src/test/resources/data.sql
pom.xml

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 (file)
index 0000000..c5a8dcf
--- /dev/null
@@ -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');
index fbafdd0..ee89edb 100644 (file)
@@ -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);
index f58382f..b86681e 100644 (file)
@@ -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);
index f4bda4a..3e3c675 100644 (file)
@@ -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);
index dfd257b..4f7afa2 100644 (file)
@@ -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
index 29d8f29..0d7a739 100644 (file)
@@ -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
      */
index fba1d25..e74dd64 100644 (file)
@@ -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;
index e68bac4..e488209 100644 (file)
@@ -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;
index 58feaac..7193724 100644 (file)
@@ -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;
        }
 
index 576d784..d5ce96e 100644 (file)
@@ -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
index 8541889..da00a6f 100644 (file)
@@ -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);
                }
 
index 6bd7037..6e4fbd8 100644 (file)
@@ -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()) {
index 9feee14..8fae281 100644 (file)
@@ -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 (file)
index 0000000..d7828c5
--- /dev/null
@@ -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
index f6d81ba..21b6dd4 100644 (file)
@@ -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 (file)
index 0000000..1c882e8
--- /dev/null
@@ -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();
+       }
+}
+
+
index d7bb084..2d102af 100644 (file)
@@ -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
index 808bbc1..df4698d 100644 (file)
@@ -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")
index 5833244..515a9bb 100644 (file)
@@ -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>
index d817f57..0d48719 100644 (file)
@@ -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 (file)
index 0000000..772def7
--- /dev/null
@@ -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);
+                       }
+       }
+}
index 8661c8e..be19f25 100644 (file)
@@ -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());
         }
index 87852e9..3fce15a 100644 (file)
@@ -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 (file)
index 0000000..3aaf15c
--- /dev/null
@@ -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);
+       }
+}
similarity index 91%
rename from docs/offered_consumed_apis.rst
rename to docs/api/offered_consumed_apis.rst
index 78f531d..6f8b7fc 100644 (file)
@@ -1,15 +1,15 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
-.. http://creativecommons.org/licenses/by/4.0\r
-.. Copyright 2018 Huawei Technologies Co., Ltd.\r
-\r
-SO Offered and Consumed APIs\r
-=====================================\r
-\r
-SO APIs\r
---------\r
-All the Service Orchestrator APIs, both inward and outward are documented in the below link of onap wiki.\r
\r
-.. toctree::\r
-   :maxdepth: 1\r
-   \r
-   api/SO_Interface.rst\r
+.. 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
index 754c6f8..7965e1d 100644 (file)
@@ -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/developer_info/developer_information.rst b/docs/developer_info/developer_information.rst
new file mode 100644 (file)
index 0000000..8613f26
--- /dev/null
@@ -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 (file)
index 739a1f2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
-.. http://creativecommons.org/licenses/by/4.0\r
-.. Copyright 2017 Huawei Technologies Co., Ltd.\r
-\r
-SO Developer Information\r
-========================\r
-\r
-.. toctree::\r
-   :maxdepth: 1\r
-   \r
-   BPMN_Project_Structure.rst\r
-   Camunda_Modeler.rst\r
-   BPMN_Main_Process_Flows.rst\r
-   BPMN_Subprocess_Process_Flows.rst\r
-   BPMN_Project_Deployment_Strategy.rst\r
-   Building_SO.rst\r
-   Working_with_SO_Docker.rst\r
-   Camunda_Cockpit_Community_Edition.rst\r
-   Camunda_Cockpit_Enterprise_Edition.rst\r
-   
\ No newline at end of file
index 553b7f4..ebb8b0b 100644 (file)
@@ -10,6 +10,6 @@ ONAP SO
 \r
    installconfigure/Install_Configure_SO.rst\r
    architecture/architecture.rst\r
-   offered_consumed_apis.rst\r
-   developer_information.rst\r
-   release-notes.rst
\ No newline at end of file
+   api/offered_consumed_apis.rst\r
+   developer_info/developer_information.rst\r
+   release_notes/release-notes.rst
\ No newline at end of file
similarity index 93%
rename from docs/Install_Configure_SO.rst
rename to docs/installconfigure/Install_Configure_SO.rst
index e06385e..bdfd328 100644 (file)
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
-.. http://creativecommons.org/licenses/by/4.0\r
-.. Copyright 2017 Huawei Technologies Co., Ltd.\r
-\r
-SO Install & Configure\r
-==========================================\r
-\r
-Get Ubuntu\r
-----------\r
-Get the Ubuntu ISO image from ubuntu.com. The recommended version is 16.04.3 LTS (Long Term Support), desktop edition.\r
-\r
-Get VirtualBox and VirtualBox Guest Additions\r
----------------------------------------------\r
-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:\r
-    http://download.virtualbox.org/virtualbox\r
-*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.\r
-\r
-Create a new VM in VirtualBox for Ubuntu\r
-----------------------------------------\r
-Type: Linux\r
-\r
-Version: Ubuntu (64-bit)\r
-\r
-At least 2048 MB memory\r
-\r
-At least 40 GB VDI\r
-\r
-Network: Attached to: NAT\r
-\r
-Create a port-forwarding rule for SSH\r
--------------------------------------\r
-Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM.\r
-\r
-Go to "Network" settings in VirtualBox, add a port forwarding rule:\r
-\r
-Name: SSH\r
-\r
-Protocol: TCP\r
-\r
-Host IP: 127.0.0.1\r
-\r
-Host Port: 1022\r
-\r
-Guest IP: <leave blank>\r
-\r
-Guest Port: 22\r
-\r
-.. image:: ../images/Configure_ubuntu_SO_1.png\r
-\r
-.\r
-\r
-.. image:: ../images/Configure_ubuntu_SO_2.png\r
-\r
-Create Shared Folder\r
---------------------\r
-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.\r
-\r
-Go to "Shared Folders" settings in VirtualBox, add a share:\r
-\r
-Folder Path: C:\Users\r
-\r
-Folder Name: Users\r
-\r
-Auto-mount: <checked>\r
-\r
-Read-only: <unchecked>\r
-\r
-.. image:: ../images/Configure_ubuntu_SO_3.png\r
-\r
-.\r
-\r
-.. image:: ../images/Configure_ubuntu_SO_4.png\r
-\r
-Install Ubuntu in the VM\r
-------------------------\r
-On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image".  Select your Ubuntu ISO image.\r
-\r
-.. image:: images/Configure_ubuntu_SO_5.png\r
-\r
-After selecting the ISO image, start the VM.\r
-\r
-Follow the prompts to install Ubuntu.\r
-\r
-Proxy Configuration (optional)\r
-------------------------------\r
-If you're behind a corporate firewall, configure some proxy settings.  NOTE: your proxy configuration may require username and password credentials, not shown here.\r
-**Ubuntu system proxy setting:**\r
-\r
-       System Settings → Network → Network proxy\r
-       \r
-       (Replace "proxyhost" and port with your actual proxy information)\r
-\r
-.. image:: images/Configure_ubuntu_SO_6.png\r
-       \r
-**apt proxy setting:**\r
-       Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information):\r
-       \r
-               Acquire::http::Proxy "http://proxyhost:port";\r
-               \r
-       Reboot the VM.\r
-       \r
-Install SSH Server\r
-------------------\r
-\r
-.. code-block:: bash\r
-\r
-    sudo apt update\r
-    sudo apt install openssh-server\r
-\r
-Connect to the VM from your host computer\r
------------------------------------------\r
-       The PuTTY SSH client is popular.  A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM.\r
-\r
-.. image:: ../images/Configure_ubuntu_SO_7.png\r
-       \r
-Install VirtualBox Guest Additions\r
-----------------------------------\r
-On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image".  Select your VirtualBox Guest Additions ISO image.\r
-\r
-.. image:: images/Configure_ubuntu_SO_8.png\r
-\r
-In a VM terminal window, mount the cdrom:\r
-\r
-.. code-block:: bash\r
-\r
-       sudo mkdir -p /media/cdrom\r
-       sudo mount /dev/cdrom /media/cdrom\r
-       \r
-Install necessary dependencies:\r
-\r
-.. code-block:: bash\r
-\r
-    sudo apt update\r
-    sudo apt install gcc g++ dkms\r
-       \r
-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.\r
-\r
-.. code-block:: bash\r
-\r
-       cd /media/cdrom\r
-       sudo ./VBoxLinuxAdditions.run\r
-\r
-.. image:: ../images/Configure_ubuntu_SO_9.png \r
-       \r
-Add yourself to the vboxsf user group (replace "userid" with your user ID):\r
-       \r
-.. code-block:: bash   \r
-       \r
-       sudo usermod -a -G vboxsf userid\r
-       \r
-Reboot the VM.\r
-\r
-In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here:\r
-       /media/sf_Users\r
-       \r
-Further Reading\r
-----------------------------------------       \r
-\r
-.. toctree::\r
-   :maxdepth: 1\r
-\r
-   installconfigure/Install_Docker.rst\r
-   installconfigure/Configure_git_and_gerrit.rst\r
-   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
index ac21f5f..8da24c9 100644 (file)
@@ -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")
index ad1bbc3..ad162b5 100644 (file)
@@ -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
+       }
index bc34883..016d1d6 100644 (file)
@@ -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";
index 58bde0e..9da6d13 100644 (file)
@@ -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 8b9b295..d2ddd6c 100644 (file)
--- 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>
                        <id>restlet</id>
                        <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>
                </pluginRepository>
        </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>