summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/main')
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseAAIPreset.java4
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java6
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BasePreset.java7
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseSDCPreset.java4
4 files changed, 11 insertions, 10 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseAAIPreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseAAIPreset.java
index c3c89c5d6..3870c8369 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseAAIPreset.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseAAIPreset.java
@@ -13,8 +13,8 @@ public abstract class BaseAAIPreset extends BasePreset {
public Map<String, String> getRequestHeaders() {
Map<String, String> map = super.getRequestHeaders();
map.put("X-ONAP-PartnerName", "VID.VID");
- map.put("X-InvocationID", "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}");
- map.put("X-ONAP-RequestID", "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}");
+ map.put("X-InvocationID", UUID_REGEX);
+ map.put("X-ONAP-RequestID", UUID_REGEX);
return map;
}
}
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
index f17efffb3..7c4ce0376 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
@@ -48,9 +48,9 @@ public abstract class BaseMSOPreset extends BasePreset {
public Map<String, String> getRequestHeaders() {
Map<String, String> map = super.getRequestHeaders();
map.put("X-ONAP-PartnerName", "VID.VID");
- map.put("X-ECOMP-RequestID", "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}");
- map.put("X-InvocationID", "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}");
- map.put("X-ONAP-RequestID", "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}");
+ map.put("X-ECOMP-RequestID", UUID_REGEX);
+ map.put("X-InvocationID", UUID_REGEX);
+ map.put("X-ONAP-RequestID", UUID_REGEX);
return map;
}
}
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BasePreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BasePreset.java
index aded77ccf..d90af3fe2 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BasePreset.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BasePreset.java
@@ -1,17 +1,18 @@
package org.onap.simulator.presetGenerator.presets.BasePresets;
-import org.onap.simulator.presetGenerator.presets.model.RegistrationRequest;
-import org.springframework.http.HttpMethod;
-
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.onap.simulator.presetGenerator.presets.model.RegistrationRequest;
+import org.springframework.http.HttpMethod;
/**
* Created by itzikliderman on 13/12/2017.
*/
public abstract class BasePreset {
+ public static final String UUID_REGEX = "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}";
+
public RegistrationRequest generateScenario() {
Map<String, String> responseHeaders = new HashMap<>();
responseHeaders.put("Content-Type", getContentType());
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseSDCPreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseSDCPreset.java
index 4a1da9e27..1179bf46c 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseSDCPreset.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseSDCPreset.java
@@ -15,8 +15,8 @@ public abstract class BaseSDCPreset extends BasePreset {
public Map<String, String> getRequestHeaders() {
Map<String, String> map = super.getRequestHeaders();
map.put("X-ONAP-PartnerName", "VID.VID");
- map.put("X-InvocationID", "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}");
- map.put("X-ONAP-RequestID", "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}");
+ map.put("X-InvocationID", UUID_REGEX);
+ map.put("X-ONAP-RequestID", UUID_REGEX);
return map;
}