Merge "Introduce request-id headers enum"
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java b/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java
index d0e212b..d77a28c 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java
@@ -35,6 +35,7 @@
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "WORKFLOW_DB_ID")
     @JsonIgnore
+    @Override
     public Long getId() {
         return id;
     }
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index 20e964c..d966df8 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -587,18 +587,18 @@
             vm.vnfs = [];
             vm.vfModules = [];
 
-            let vnfRole = null;
+            let nfRole = null;
             let cloudRegion = null;
 
             if ($scope.isNewFilterChangeManagmentEnabled()) {
-                vnfRole = vm.changeManagement.vnfType ? vm.changeManagement.vnfType : null;
+                nfRole = vm.changeManagement.vnfType ? vm.changeManagement.vnfType : null;
                 cloudRegion = vm.changeManagement.cloudRegion ? vm.changeManagement.cloudRegion : null;
             }
 
             AaiService.getVnfsByCustomerIdAndServiceType(
                 vm.changeManagement.subscriberId,
                 vm.changeManagement.serviceType["service-type"],
-                vnfRole,
+                nfRole,
                 cloudRegion,
             ).then(function (response) {
                     vm.isSearchedVNF = true;
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js
index 352fa20..74bbb88 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js
@@ -55,7 +55,7 @@
                 vm.releaseVersions = response["release"].map(function (releaseOptions){
                     return releaseOptions.name;});
             },COMPONENT.TENANT_ISOLATION_FAMILY);
-        }
+        };
 
 
         vm.setEcompEnvironment = function (selectedIndex) {
@@ -82,7 +82,7 @@
         };
 
         vm.isShowReleaseEnabled = function () {
-            return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1908_RELEASE_TENANT_ISOLATION)
+            return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1908_RELEASE_TENANT_ISOLATION);
         };
 
         init();
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
index 2cfcf57..759f67d 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.controller.js
@@ -137,13 +137,13 @@
     };
 
     $scope.removeVendorFromCloudOwner = function(cloudOwner) {
-        return AaiService.removeVendorFromCloudOwner(cloudOwner)
+        return AaiService.removeVendorFromCloudOwner(cloudOwner);
     };
 
     $scope.selectedLcpRegionIsMegaRegion = function() {
         if ($scope.regionSelection.optionId) {
             let cloudRegionId = DataService.getCloudOwnerAndLcpCloudRegionFromOptionId($scope.regionSelection.optionId).cloudRegionId;
-            return ($scope.megaRegion).indexOf(cloudRegionId) > -1
+            return ($scope.megaRegion).indexOf(cloudRegionId) > -1;
         } else {
             return false;
         }
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js
index 12fd0d0..2e470f6 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js
@@ -33,7 +33,7 @@
                     successCallbackFunction(response.data.categoryParameters);
                 }).catch(UtilityService.runHttpErrorHandler);
         }
-    }
+    };
 };
 
 appDS2.factory("OwningEntityService", ["$http", "$log", "PropertyService",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
index 0e1beef..d307576 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
@@ -86,13 +86,13 @@
         }).join("&");
     }
 
-    function getConfigParams(vnfRole, cloudRegion) {
+    function getConfigParams(nfRole, cloudRegion) {
         if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_CLOUD_REGION_AND_NF_ROLE_OPTIONAL_SEARCH)) {
             return null
         }
 
         let data = {
-            vnfRole: vnfRole,
+            nfRole: nfRole,
             cloudRegion: cloudRegion,
         };
 
@@ -492,7 +492,7 @@
                 successCallbackFunction(lcpCloudRegionTenants);
             }).catch(function (error) {
                 (UtilityService.runHttpErrorHandler(error.data, error.status));
-            })
+            });
         },
         getSubscribers: function (successCallbackFunction) {
             $log
@@ -553,7 +553,7 @@
                     catchCallbackFunction();
                 }
                 UtilityService.runHttpErrorHandler(response, status);
-            })
+            });
         },
         getServices: function (successCallbackFunction) {
             $log
@@ -646,13 +646,13 @@
             (UtilityService.runHttpErrorHandler);
         },
 
-        getVnfsByCustomerIdAndServiceType: function (globalSubscriberId, serviceType, vnfRole, cloudRegion) {
+        getVnfsByCustomerIdAndServiceType: function (globalSubscriberId, serviceType, nfRole, cloudRegion) {
             let deferred = $q.defer();
 
             let url = globalSubscriberId + COMPONENT.FORWARD_SLASH + serviceType
 
             const path = COMPONENT.AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE + url;
-            let config = getConfigParams(vnfRole, cloudRegion);
+            let config = getConfigParams(nfRole, cloudRegion);
 
             if (UtilityService.hasContents(globalSubscriberId) &&
                 UtilityService.hasContents(serviceType)) {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js
index 0bc8f0b..251aeef 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js
@@ -177,8 +177,8 @@
 	getFieldDisplayName : function(name) {

 	    return getDisplayName(name);

 	}

-    }

-}

+    };

+};

 

 appDS2.factory("ComponentService", [ "$log", "COMPONENT", "UtilityService",

 	ComponentService ]);

diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
index 9724637..15ba519 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js
@@ -417,7 +417,7 @@
 								option = {
 										name: constraintsArray[i][PARAMETER.VALID_VALUES][j],
 										isDefault: false
-								} 
+								}; 
 								if ( ( UtilityService.hasContents (inputs[key][PARAMETER.DEFAULT]) ) 
 										&& (inputs[key][PARAMETER.DEFAULT] === constraintsArray[i][PARAMETER.VALID_VALUES][j] ) ) {
 									option = {
@@ -481,7 +481,7 @@
 								parameter.min = constraintsArray[i][PARAMETER.IN_RANGE][0];
 								parameter.max = constraintsArray[i][PARAMETER.IN_RANGE][1];
 								parameter.type = PARAMETER.NUMBER;
-								parameter.value = inputs[key][PARAMETER.DEFAULT]
+								parameter.value = inputs[key][PARAMETER.DEFAULT];
 								parameterList.push(parameter);
 								parameterPushed = true;
 								//console.log ("pushed param for in_range");
@@ -492,7 +492,7 @@
 						if ( constraintsArray[i][PARAMETER.GREATER_THAN] != null ) {
 								parameter.type = PARAMETER.NUMBER;
 								parameter.min = constraintsArray[i][PARAMETER.GREATER_THAN];
-								parameter.value = inputs[key][PARAMETER.DEFAULT]
+								parameter.value = inputs[key][PARAMETER.DEFAULT];
 								parameterList.push(parameter);
 								parameterPushed = true;
 								//console.log ("pushed param for greater_than");
@@ -515,7 +515,7 @@
         var inventoryItem = DataService.getInventoryItem();
         var inventoryInfo = ComponentService.getInventoryInfo(
             _this.componentId, inventoryItem);
-	}
+	};
 
     /*
      * The "*Mso*" functions return URL and request details that can be passed
@@ -723,7 +723,7 @@
                 if(lineOfBusiness) {
                     requestDetails.lineOfBusiness = {
                         lineOfBusinessName: lineOfBusiness
-                    }
+                    };
                 }
 
                 requestDetails.platform = {
@@ -741,7 +741,7 @@
 
                     requestDetails.lineOfBusiness = {
                         lineOfBusinessName: lineOfBusinessNamesString
-                    }
+                    };
                 }
 
                 var platform = getValueFromList(FIELD.ID.PLATFORM, parameterList);
@@ -866,7 +866,7 @@
                         "modelCustomizationId": modelInfo.customizationUuid,
                         "modelCustomizationName": modelInfo.modelCustomizationName
                     }
-                }
+                };
             }
             relatedInstanceList.push({
                 relatedInstance : relatedInstance
@@ -918,13 +918,13 @@
                         arbitraryParameters = {
                             name: parameter.id,
                             value: parameter.value
-                        }
+                        };
                         arbitraryArray.push(arbitraryParameters);
                     }
             }
         }
         return (arbitraryArray);
-    }
+    };
 
     var getModel = function() {
         AsdcService.getModel(DataService.getModelId(), function(response) {
@@ -1310,8 +1310,8 @@
         getMsoRequestDetails : getMsoRequestDetails,
         getMsoUrl : getMsoUrl,
         setInventoryInfo: setInventoryInfo
-    }
-}
+    };
+};
 
 appDS2.factory("CreationService", [ "$log", "AaiService", "AsdcService",
     "DataService","VIDCONFIGURATION", "ComponentService", "COMPONENT", "FIELD", "PARAMETER",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
index 84413f8..95bdb3a 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
@@ -43,7 +43,7 @@
 			return {

 				cloudOwner: cloudRegionTenant.cloudOwner,

 				cloudRegionId: cloudRegionTenant.cloudRegionId

-			}

+			};

 		},

 		getGlobalCustomerId : function() {

 			return _this.globalCustomerId;

@@ -405,7 +405,7 @@
             _this.owningEntityProperties = properties;

         }

 

-	}

+	};

 };

 

 appDS2.factory("DataService", [ "$log", DataService ]);

diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
index c13c721..a50fb25 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js
@@ -382,7 +382,7 @@
 				};
 		}
 		return requestDetails;
-    }
+    };
 
     var getLcpRegion = function() {
 		var cloudRegionTenantList = DataService.getCloudRegionTenantList();
@@ -520,8 +520,8 @@
 		getMsoRequestDetails : getMsoRequestDetails,
 		getMsoUrl : getMsoUrl,
 		isMacro : DataService.getMacro()
-    }
-}
+    };
+};
 
 appDS2.factory("DeleteResumeService", [ "$log", "AaiService", "AsdcService",
 	"DataService", "ComponentService", "COMPONENT", "FIELD",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/detailsService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/detailsService.js
index de5e9c0..a2e20e4 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/detailsService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/detailsService.js
@@ -113,8 +113,8 @@
         getSummaryList: getSummaryList,

         getDetailsList: getDetailsList,

         getMsoFilterString: getMsoFilterString

-    }

-}

+    };

+};

 

 appDS2.factory("DetailsService", ["$log", "DataService", "ComponentService",

     "COMPONENT", "FIELD", "UtilityService", DetailsService]);

diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js
index 3f902e8..ac6eeea 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js
@@ -42,7 +42,7 @@
         if (response.data.status < 200 || response.data.status > 202) {

             throw {

                 type : FIELD.ID.MSO_FAILURE

-            }

+            };

         }

     };

 

@@ -172,7 +172,7 @@
         getFormattedCommonResponse : function(response) {

             return UtilityService.getCurrentTime() + " HTTP Status: "

                 + UtilityService.getHttpStatusText(response.data.status)

-                + "\n" + angular.toJson(response.data.entity, true)

+                + "\n" + angular.toJson(response.data.entity, true);

 

         },

         checkValidStatus : checkValidStatus,

@@ -326,7 +326,7 @@
                 $log.debug("model info from instance", instance);

                 $log.debug("model info to model", modelInfo);

 

-                return modelInfo

+                return modelInfo;

             };

 

             var payload = {

@@ -572,7 +572,7 @@
 

             return sendPostRequestWithBody(url, payload);

         }

-    }

+    };

 };

 

 appDS2.factory("MsoService", MsoService );

diff --git a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
index 500d981..7c577ca 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
@@ -228,15 +228,15 @@
             String globalCustomerId = "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb";
             String serviceType = "vRichardson";
             SimulatorApi.registerExpectationFromPreset(new PresetBaseAAICustomQuery(
-                SIMPLE,
-                "/business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/"
-                    + serviceType + "/service-instances",
-                "query/vnfs-fromServiceInstance-filter"
+                    SIMPLE,
+                    "/business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/"
+                            + serviceType + "/service-instances",
+                    "query/vnfs-fromServiceInstance-filterByCloudRegion?nfRole=vMobileDNS&cloudRegionID=092eb9e8e4b7412e8787dd091bc58e86"
             ) {
                 @Override
                 public Object getResponseBody() {
                     return getResourceAsString(
-                        AAI_VNFS_FOR_CHANGE_MANAGEMENT_JSON_BY_PARAMS);
+                            AAI_VNFS_FOR_CHANGE_MANAGEMENT_JSON_BY_PARAMS);
                 }
             }, APPEND);
         }
@@ -546,9 +546,9 @@
         fillVNFInPlace3Fields(operationsTimeout, existingSwVersion, newSwVersion);
 
         assertThatVidToPortalCallbackDataIsOk(VNF_DATA_WITH_IN_PLACE.workflowName, ImmutableMap.of(
-            "existingSoftwareVersion", existingSwVersion,
-            "newSoftwareVersion", newSwVersion,
-            "operationTimeout", operationsTimeout
+                "existingSoftwareVersion", existingSwVersion,
+                "newSoftwareVersion", newSwVersion,
+                "operationTimeout", operationsTimeout
         ));
     }
 
@@ -559,10 +559,10 @@
         Assert.assertEquals(Get.byId(Constants.ChangeManagement.newModalConfigUpdateInputId + "-label").getText(), fileName);
         Assert.assertTrue(Get.byId(Constants.generalSubmitButtonId).isEnabled());
         assertThatVidToPortalCallbackDataIsOk("VNF Config Update", ImmutableMap.of(
-            "configUpdateFile",
-            "{\"request-parameters\":{\"vm\":[{\"vnfc\":["
-                + "{\"vnfc-name\":\"ibcx0001vm001dbg001\",\"vnfc-function-code\":\"dbg\"}],\"vm-name\":\"ibcx0001vm001\"},"
-                + "{\"vnfc\":[{\"vnfc-name\":\"ibcx0001vm002dbg001\"}],\"vm-name\":\"ibcx0001vm002\"}]},\"configuration-parameters\":{\"node0_hostname\":\"dbtx0001vm001\"}}"
+                "configUpdateFile",
+                "{\"request-parameters\":{\"vm\":[{\"vnfc\":["
+                        + "{\"vnfc-name\":\"ibcx0001vm001dbg001\",\"vnfc-function-code\":\"dbg\"}],\"vm-name\":\"ibcx0001vm001\"},"
+                        + "{\"vnfc\":[{\"vnfc-name\":\"ibcx0001vm002dbg001\"}],\"vm-name\":\"ibcx0001vm002\"}]},\"configuration-parameters\":{\"node0_hostname\":\"dbtx0001vm001\"}}"
         ));
     }
 
@@ -632,28 +632,28 @@
         String modelInvariantId = "72e465fe-71b1-4e7b-b5ed-9496118ff7a8";
         String vnfInstanceId = "8e5e3ba1-3fe6-4d86-966e-f9f03dab4855";
 
-            assertThat(errorMessage, startsWith(SCHEDULE_ERROR_PREFIX));
-            assertThat(errorMessage.replace(SCHEDULE_ERROR_PREFIX, ""), jsonEquals(
+        assertThat(errorMessage, startsWith(SCHEDULE_ERROR_PREFIX));
+        assertThat(errorMessage.replace(SCHEDULE_ERROR_PREFIX, ""), jsonEquals(
                 ImmutableMap.of(
-                    "widgetName", "Portal-Common-Scheduler",
-                    "widgetParameter", "",
-                    "widgetData", ImmutableMap.builder()
-                        .put("vnfNames", ImmutableList.of(ImmutableMap.of(
-                            "id", vnfInstanceId,
-                            "invariant-id", modelInvariantId
-                        )))
-                        .put("workflowParameters", emptyMap())
-                        .put("subscriberId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
-                        .put("fromVNFVersion", "" + "76e908e0-5201-44d2-a3e2-9e6128d05820" + "")
-                        .put("workflow", "" + workflowName + "")
-                        .put("policyYN", "Y")
-                        .put("sniroYN", "Y")
-                        .put("testApi", "VNF_API")
-                        .put("vnfType", "vMobileDNS")
-                        .putAll(workflowParams)
-                    .build()
-                    )
-                ).when(Option.IGNORING_EXTRA_FIELDS));
+                        "widgetName", "Portal-Common-Scheduler",
+                        "widgetParameter", "",
+                        "widgetData", ImmutableMap.builder()
+                                .put("vnfNames", ImmutableList.of(ImmutableMap.of(
+                                        "id", vnfInstanceId,
+                                        "invariant-id", modelInvariantId
+                                )))
+                                .put("workflowParameters", emptyMap())
+                                .put("subscriberId", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb")
+                                .put("fromVNFVersion", "" + "76e908e0-5201-44d2-a3e2-9e6128d05820" + "")
+                                .put("workflow", "" + workflowName + "")
+                                .put("policyYN", "Y")
+                                .put("sniroYN", "Y")
+                                .put("testApi", "VNF_API")
+                                .put("vnfType", "vMobileDNS")
+                                .putAll(workflowParams)
+                                .build()
+                )
+        ).when(Option.IGNORING_EXTRA_FIELDS));
 
 
         Click.byId(Constants.generalCancelButtonId);
diff --git a/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json b/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
index 869ff2d..5139aa0 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
@@ -10,6 +10,7 @@
   "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
   "owningEntityName": "Lucine Sarika",
   "projectName": "zasaki",
+  "position":null,
   "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
   "subscriberName": "SILVIA ROBBINS",
   "productFamilyId": "ddf9cc0f-6331-4d35-bed0-a37f2d5e9cb3",
@@ -44,6 +45,7 @@
       "trackById": "TRACK_BY_ID",
       "isFailed": true,
       "statusMessage":"Vnf failed.",
+      "position":null,
       "lineOfBusiness": "vnf_lineOfBusinessName"
     }
   },
diff --git a/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json b/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
index d27dd05..849cb7e 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
@@ -10,6 +10,7 @@
   ],
   "isALaCarte": true,
   "isFailed": true,
+  "position":null,
   "lcpCloudRegionId": "a93f8383-707e-43fa-8191-a6e69a1aab17",
   "modelInfo": {
     "modelInvariantId": "0367689e-d41e-483f-b200-eab17e4a7f8d",
@@ -62,6 +63,7 @@
       "statusMessage": null,
       "tenantId": "88a6ca3ee0394ade9403f075db23167e",
       "trackById": "TRACK_BY_ID",
+      "position":null,
       "vfModules": {
       }
     }