From 66af8b9b391879be78660d6ccb0a1f1f9340b423 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 11 Mar 2019 09:34:34 +0200 Subject: Merge automation from ECOMP's repository Reference commit in ECOMP: 8e92a8c6 Issue-ID: VID-378 Change-Id: Ia32f4813378ef95097f788246aa5b1172e20ca48 Signed-off-by: Ittay Stern --- .../PresetMsoChangeManagementBase.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoChangeManagementBase.java (limited to 'vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoChangeManagementBase.java') diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoChangeManagementBase.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoChangeManagementBase.java new file mode 100644 index 000000000..758e15e6e --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/changeManagement/PresetMsoChangeManagementBase.java @@ -0,0 +1,28 @@ +package org.onap.simulator.presetGenerator.presets.mso.changeManagement; + +import org.apache.commons.lang3.StringUtils; +import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost; + +public abstract class PresetMsoChangeManagementBase extends PresetMSOBaseCreateInstancePost { + + protected final String serviceInstanceId; + protected final String vnfInstanceId; + private final String actionName; + + public PresetMsoChangeManagementBase(String serviceInstanceId, String vnfInstanceId, String actionName) { + super(DEFAULT_REQUEST_ID, vnfInstanceId); + this.serviceInstanceId = serviceInstanceId; + this.vnfInstanceId = vnfInstanceId; + this.actionName = actionName; + } + + @Override + public String getReqPath() { + return getRootPath() + "/serviceInstances/v./" + serviceInstanceId + "/vnfs/"+vnfInstanceId+ getReqPathTrailer(); + } + + protected String getReqPathTrailer() { + return StringUtils.isEmpty(actionName) ? "" : "/"+ actionName; + } + +} -- cgit 1.2.3-korg