aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-11-03 15:29:12 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-11-03 22:05:32 +0200
commit3a6149664092cacfdf76c0ab985a250ec9131439 (patch)
treedabb1b295900b26efc33529702e9f717e9b7093e /vid-automation/src/main/java
parent87e8d266de1ddc2495e229a076363542609a005a (diff)
send unqiue request ids to MSO in async instantiation
Issue-ID: VID-253 Change-Id: I73e7829a2e7e980540e0c253823d030e77b9976b Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-automation/src/main/java')
-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;
}