diff options
author | 2018-08-12 12:20:55 +0000 | |
---|---|---|
committer | 2018-08-12 12:20:55 +0000 | |
commit | 91b057331b92ecf7f3c2d495681b05295dc8346c (patch) | |
tree | 0ce3f821ada8ad518784f7f9869db4b537ba3237 /vid-automation/src/main/java/org/opencomp/simulator/presetGenerator/presets/aai/PresetAAIGetRelatedInstanceGroupsByVnfId.java | |
parent | 9152b2ae03c4751b492a219993d85d522c58b383 (diff) | |
parent | 4a4dcc5185f8ba5a28c7f9fef509f32c0c2389e6 (diff) |
Merge "vid-automation selenium tests"
Diffstat (limited to 'vid-automation/src/main/java/org/opencomp/simulator/presetGenerator/presets/aai/PresetAAIGetRelatedInstanceGroupsByVnfId.java')
-rw-r--r-- | vid-automation/src/main/java/org/opencomp/simulator/presetGenerator/presets/aai/PresetAAIGetRelatedInstanceGroupsByVnfId.java | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/opencomp/simulator/presetGenerator/presets/aai/PresetAAIGetRelatedInstanceGroupsByVnfId.java b/vid-automation/src/main/java/org/opencomp/simulator/presetGenerator/presets/aai/PresetAAIGetRelatedInstanceGroupsByVnfId.java new file mode 100644 index 000000000..a70a43232 --- /dev/null +++ b/vid-automation/src/main/java/org/opencomp/simulator/presetGenerator/presets/aai/PresetAAIGetRelatedInstanceGroupsByVnfId.java @@ -0,0 +1,129 @@ +package org.opencomp.simulator.presetGenerator.presets.aai; + +import com.google.common.collect.ImmutableMap; +import org.opencomp.simulator.presetGenerator.presets.BasePresets.BaseAAIPreset; +import org.springframework.http.HttpMethod; + +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public class PresetAAIGetRelatedInstanceGroupsByVnfId extends BaseAAIPreset { + + private String vnfId; + + + public String getVnfId() { + return vnfId; + } + + public void setVnfId(String vnfId) { + this.vnfId = vnfId; + } + + + public PresetAAIGetRelatedInstanceGroupsByVnfId(String vnfId){ + this.vnfId = vnfId; + } + + @Override + public HttpMethod getReqMethod() { + return HttpMethod.GET; + } + + @Override + public String getReqPath() { + return getRootPath() + "/network/generic-vnfs/generic-vnf/" + getVnfId(); + } + + @Override + public Map<String, List> getQueryParams() { + return ImmutableMap.of( + "depth", Collections.singletonList("0") + ); + } + + @Override + public Object getResponseBody() { + return "{\n" + + " \"vnf-id\": \"vnf-id-3\",\n" + + " \"vnf-name\": \"zmtn6nf-code-110\",\n" + + " \"vnf-type\": \"vnf-type\",\n" + + " \"prov-status\": \"NVTPROV\",\n" + + " \"operational-status\": \"out-of-service-path\",\n" + + " \"equipment-role\": \"nf-role-1\",\n" + + " \"in-maint\": false,\n" + + " \"is-closed-loop-disabled\": false,\n" + + " \"resource-version\": \"1524162037142\",\n" + + " \"model-invariant-id\": \"inv-id-5000\",\n" + + " \"model-version-id\": \"ver-id-5000\",\n" + + " \"model-customization-id\": \"vnf-customization-uuid-1\",\n" + + " \"selflink\": \"restconf/config/GENERIC-RESOURCE-API:services/service/bgb-instance-2/service-data/vnfs/vnf/vnf-id-3/vnf-data/vnf-topology\",\n" + + " \"relationship-list\": {\n" + + " \"relationship\": [\n" + + " {\n" + + " \"related-to\": \"instance-group\",\n" + + " \"relationship-label\": \"org.onap.relationships.inventory.MemberOf\",\n" + + " \"related-link\": \"/aai/v13/network/instance-groups/instance-group/bgb-net-inst-group-1\",\n" + + " \"relationship-data\": [\n" + + " {\n" + + " \"relationship-key\": \"instance-group.id\",\n" + + " \"relationship-value\": \"bgb-net-inst-group-1\"\n" + + " }\n" + + " ],\n" + + " \"related-to-property\": [\n" + + " {\n" + + " \"property-key\": \"instance-group.description\",\n" + + " \"property-value\": \"test\"\n" + + " },\n" + + " {\n" + + " \"property-key\": \"instance-group.instance-group-name\",\n" + + " \"property-value\": \"instance group name\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " {\n" + + " \"related-to\": \"instance-group\",\n" + + " \"relationship-label\": \"org.onap.relationships.inventory.MemberOf\",\n" + + " \"related-link\": \"/aai/v13/network/instance-groups/instance-group/bgb-net-inst-group-2\",\n" + + " \"relationship-data\": [\n" + + " {\n" + + " \"relationship-key\": \"instance-group.id\",\n" + + " \"relationship-value\": \"bgb-net-inst-group-2\"\n" + + " }\n" + + " ],\n" + + " \"related-to-property\": [\n" + + " {\n" + + " \"property-key\": \"instance-group.description\",\n" + + " \"property-value\": \"test\"\n" + + " },\n" + + " {\n" + + " \"property-key\": \"instance-group.instance-group-name\",\n" + + " \"property-value\": \"instance group name\"\n" + + " }\n" + + " ]\n" + + " },\n" + + " {\n" + + " \"related-to\": \"availability-zone\",\n" + + " \"relationship-label\": \"org.onap.relationships.inventory.Uses\",\n" + + " \"related-link\": \"/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn6/availability-zones/availability-zone/AZ-MN02\",\n" + + " \"relationship-data\": [\n" + + " {\n" + + " \"relationship-key\": \"cloud-region.cloud-owner\",\n" + + " \"relationship-value\": \"att-aic\"\n" + + " },\n" + + " {\n" + + " \"relationship-key\": \"cloud-region.cloud-region-id\",\n" + + " \"relationship-value\": \"mtn6\"\n" + + " },\n" + + " {\n" + + " \"relationship-key\": \"availability-zone.availability-zone-name\",\n" + + " \"relationship-value\": \"AZ-MN02\"\n" + + " }\n" + + " ]\n" + + " }\n" + + " ]\n" + + " }\n" + + "}"; + } +} |