Quality of Life logging improvements 13/75713/1
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Sat, 12 Jan 2019 02:19:45 +0000 (21:19 -0500)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Sat, 12 Jan 2019 02:19:59 +0000 (21:19 -0500)
Remove invalid newline character in process name
Quality of Life logging improvements

Change-Id: I2193c08e365e847f6be144106a0b20aa7828497e
Issue-ID: SO-1381
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn
bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteGenericALaCarteServiceInstance.bpmn
bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
common/src/test/java/org/onap/so/client/aai/AAIPatchConverterTest.java

index b1e4a75..94434cd 100644 (file)
@@ -803,7 +803,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
                     LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound, error);
                     throw new VnfException(error, MsoExceptionCategory.USERDATA);
                 } else {
-                               LOGGER.debug("Found vfModuleCust entry " + vfmc.toString());
+                               LOGGER.trace("Found vfModuleCust entry " + vfmc.toString());
                 }
                 if (vf.getIsBase()) {
                     isBaseRequest = true;
index 1fdf2f3..cd62636 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
-  <bpmn2:process id="HomingBB" name="Homing" isExecutable="true">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+  <bpmn2:process id="HomingBB" name="HomingBB" isExecutable="true">
     <bpmn2:startEvent id="start">
       <bpmn2:outgoing>SequenceFlow_1x9usa6</bpmn2:outgoing>
     </bpmn2:startEvent>
@@ -43,7 +43,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
       <bpmn2:sequenceFlow id="SequenceFlow_0kamg53" name="" sourceRef="startJavaError" targetRef="processJavaException" />
       <bpmn2:sequenceFlow id="SequenceFlow_1o7154s" name="" sourceRef="processJavaException" targetRef="endJavaError" />
     </bpmn2:subProcess>
-    <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" camunda:modelerTemplate="receiveWorkflowMessage" calledElement="ReceiveWorkflowMessage">
+    <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" calledElement="ReceiveWorkflowMessage" camunda:modelerTemplate="receiveWorkflowMessage">
       <bpmn2:extensionElements>
         <camunda:in source="true" target="isDebugLogEnabled" />
         <camunda:out source="WorkflowException" target="WorkflowException" />
index 9e20497..627cee4 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="CreateGenericALaCarteServiceInstance" name="CreateGenericALaCarteServiceInstance" isExecutable="true">
     <bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow">
       <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
@@ -38,6 +38,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
         <camunda:in sourceExpression="1610" target="sdncVersion" />
         <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
         <camunda:in source="bpmnRequest" target="requestJson" />
+        <camunda:in source="msoRequestId" target="mso-request-id" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_1fv5tk6</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
@@ -169,6 +170,7 @@ csi.prepareDecomposeService(execution)]]></bpmn2:script>
         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
         <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
         <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="msoRequestId" target="mso-request-id" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_0xhu1k3</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1o3ihrh</bpmn2:outgoing>
@@ -185,7 +187,7 @@ csi.prepareCreateServiceInstance(execution)]]></bpmn2:script>
     <bpmn2:sequenceFlow id="SequenceFlow_1tfe975" sourceRef="IntermediateCatchEvent_00tv706" targetRef="ScriptTask_1vr3ks5" />
     <bpmn2:sequenceFlow id="SequenceFlow_14ajbme" sourceRef="CallActivity_1y1p4bd" targetRef="IntermediateThrowEvent_1tbopzu" />
     <bpmn2:sequenceFlow id="SequenceFlow_1hjh5zy" sourceRef="IntermediateCatchEvent_1aouco1" targetRef="ScriptTask_04zaa1o" />
-    <bpmn2:callActivity id="CallActivity_1y1p4bd" name="Call Homing Service" camunda:modelerTemplate="homingBlock" calledElement="Homing">
+    <bpmn2:callActivity id="CallActivity_1y1p4bd" name="Call Homing Service" calledElement="Homing" camunda:modelerTemplate="homingBlock">
       <bpmn2:extensionElements>
         <camunda:in source="true" target="isDebugLogEnabled" />
         <camunda:in source="null" target="timeout" />
@@ -204,6 +206,7 @@ csi.prepareCreateServiceInstance(execution)]]></bpmn2:script>
         <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
         <camunda:in source="homingModelIds" target="homingModelIds" />
         <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+        <camunda:in source="mso-request-id" target="mso-request-d" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_0bng27u</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_14ajbme</bpmn2:outgoing>
index 5c9a800..4224f9a 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="DeleteGenericALaCarteServiceInstance" name="DeleteGenericALaCarteServiceInstance" isExecutable="true">
     <bpmn2:startEvent id="deleteSI_startEvent" name="Delete SI Start Flow">
       <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
@@ -36,6 +36,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
         <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
         <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
         <camunda:in sourceExpression="1610" target="sdncVersion" />
+        <camunda:in source="msoRequestId" target="mso-request-id" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
@@ -328,4 +329,4 @@ csi.sendSyncResponse(execution)]]></bpmn2:script>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
-</bpmn2:definitions>
\ No newline at end of file
+</bpmn2:definitions>
index e3f1d77..383a9f5 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
-  <bpmn2:process id="DoCreateServiceInstance" name="DoCreateServiceInstance&#10;" isExecutable="true">
+  <bpmn2:process id="DoCreateServiceInstance" name="DoCreateServiceInstance" isExecutable="true">
     <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
       <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
     </bpmn2:startEvent>
@@ -370,4 +370,4 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
-</bpmn2:definitions>
+</bpmn2:definitions>
\ No newline at end of file
index 6b89387..55eaf36 100644 (file)
@@ -156,10 +156,13 @@ public class SniroHomingV2 {
 
                        log.trace("Completed Sniro Homing Call Sniro");
                }catch(BpmnError e){
+                       log.error(e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
                }catch(BadResponseException e){
+                       log.error(e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
                }catch(Exception e){
+                       log.error(e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while preparing sniro request: " + e.getMessage());
                }
        }
@@ -203,10 +206,13 @@ public class SniroHomingV2 {
 
                        log.trace("Completed Sniro Homing Process Solution");
                }catch(BpmnError e){
+                       log.error(e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
                }catch(BadResponseException e){
+                       log.error(e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
                }catch(Exception e){
+                       log.error(e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while processing sniro asynchronous response: " + e.getMessage());
                }
        }
index 0cee366..0d4490f 100644 (file)
@@ -67,6 +67,15 @@ public class AAIPatchConverterTest {
                assertEquals("expect no change", payload, result);
        }
        
+       @Test
+       public void convertStringToPatchFormatNull_Test() throws URISyntaxException, JsonParseException, JsonMappingException, IOException {
+               AAIPatchConverter validator = new AAIPatchConverter();
+               String payload = "{\"ipv4-loopback0-address\": null}";
+               String result = validator.marshallObjectToPatchFormat(payload);
+               System.out.println(result);
+               assertEquals("expect no change", payload, result);
+       }
+       
        @Test
        public void convertMapToPatchFormatTest() throws URISyntaxException, JsonParseException, JsonMappingException, IOException {
                AAIPatchConverter validator = new AAIPatchConverter();