diff options
author | Yoav Schneiderman <yoav.schneiderman@intl.att.com> | 2019-12-18 21:04:38 +0200 |
---|---|---|
committer | Einat Vinouze <einat.vinouze@intl.att.com> | 2019-12-24 11:46:22 +0200 |
commit | 89de17b50dcd1d29fb87acfe518d1ddf43c1408a (patch) | |
tree | a6ae4d0c697c9e016bb86733d9df6eebe6a0ee88 /vid-automation/src | |
parent | 8fd9bd94ca80daf31a8fc83893503120d9405a2f (diff) |
move templates API to a intended controller
Issue-ID: VID-730
Change-Id: Id2aa44803a190333b5a96fda77ca15d254b4c222
Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Diffstat (limited to 'vid-automation/src')
-rw-r--r-- | vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java | 4 | ||||
-rw-r--r-- | vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java b/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java index 5e1310535..8855b51f0 100644 --- a/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java +++ b/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java @@ -105,6 +105,10 @@ public class AsyncInstantiationBase extends BaseMsoApiTest { return uri.toASCIIString() + "/asyncInstantiation"; } + protected String getTemplateInfoUrl(String serviceModelId) { + return uri.toASCIIString() + "/instantiationTemplates?serviceModelId=" + serviceModelId; + } + protected String getJobAuditUrl() { return uri.toASCIIString() + "/asyncInstantiation/auditStatus/{JOB_ID}?source={SOURCE}"; } diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java index ff30c9ce5..4d2f06983 100644 --- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java +++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java @@ -16,6 +16,7 @@ import static org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPres import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost.DEFAULT_REQUEST_ID; import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.COMPLETE; import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.SERVICE_NAME; +import static vid.automation.test.services.SimulatorApi.registerExpectationFromPreset; import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets; import static vid.automation.test.services.SimulatorApi.retrieveRecordedRequests; @@ -31,6 +32,7 @@ import java.util.stream.Stream; import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset; import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset; import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId; +import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet; import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAddOrRemoveOneInstanceGroupMember; import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAddOrRemoveOneInstanceGroupMember.InstanceGroupMemberAction; import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost; @@ -129,6 +131,8 @@ public class AsyncInstantiationALaCarteApiTest extends AsyncInstantiationBase { @Test public void deployTwoServicesGetServicesFilterByModelId() { + registerExpectationFromPreset(new PresetAAIGetSubscribersGet(), RegistrationStrategy.CLEAR_THEN_SET); + List<String> uuids = new LinkedList<>(); try { //given @@ -145,7 +149,7 @@ public class AsyncInstantiationALaCarteApiTest extends AsyncInstantiationBase { //when ResponseEntity<List<ServiceInfo>> response = restTemplate.exchange( - getServiceInfoUrl() + "?serviceModelId=" + SERVICE_MODEL_UUID, + getTemplateInfoUrl(SERVICE_MODEL_UUID), HttpMethod.GET, null, new ParameterizedTypeReference<List<ServiceInfo>>() { @@ -169,8 +173,6 @@ public class AsyncInstantiationALaCarteApiTest extends AsyncInstantiationBase { uuids.forEach(uuid->new AsyncJobsService().muteAsyncJobById(uuid)); } } - - @Test public void deleteServiceWithTwoVnfGroups_andRetry() { String parentServiceInstanceId = "service-instance-id"; |