aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAIGetVfModulesByVnf.java
blob: 798a02642af7cb34a834df02bbdc738d8f043169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package org.onap.simulator.presetGenerator.presets.aai;

import org.onap.simulator.presetGenerator.presets.BasePresets.BaseAAIPreset;
import org.springframework.http.HttpMethod;

public class PresetAAIGetVfModulesByVnf extends BaseAAIPreset {
    private final String vnfInstanceId;

    public PresetAAIGetVfModulesByVnf(String vnfInstanceId) {
        this.vnfInstanceId = vnfInstanceId;
    }

    @Override
    public HttpMethod getReqMethod() {
        return HttpMethod.GET;
    }

    @Override
    public String getReqPath() {
        return getRootPath() + "/network/generic-vnfs/generic-vnf/" + this.vnfInstanceId + "/vf-modules";
    }

    @Override
    public Object getResponseBody() {
        return "" +
                "{" +
                "  \"vf-module\": [{" +
                "      \"vf-module-id\": \"2c1ca484-cbc2-408b-ab86-25a2c15ce280\"," +
                "      \"vf-module-name\": \"ss820f_0918_db\"," +
                "      \"orchestration-status\": \"deleted\"," +
                "      \"is-base-vf-module\": false," +
                "      \"in-maint\": true," +
                "      \"automated-assignment\": false," +
                "      \"resource-version\": \"1537396469591\"," +
                "      \"model-invariant-id\": \"09edc9ef-85d0-4b26-80de-1f569d49e750\"," +
                "      \"model-version-id\": \"522159d5-d6e0-4c2a-aa44-5a542a12a830\"," +
                "      \"model-customization-id\": \"55b1be94-671a-403e-a26c-667e9c47d091\"," +
                "      \"module-index\": 0," +
                "      \"relationship-list\": {" +
                "        \"relationship\": [{" +
                "            \"related-to\": \"vnfc\"," +
                "            \"relationship-label\": \"org.onap.relationships.inventory.Uses\"," +
                "            \"related-link\": \"/aai/v13/network/vnfcs/vnfc/ss820f_0918_refvnf_vnfinstancem002mmb001\"," +
                "            \"relationship-data\": [{" +
                "                \"relationship-key\": \"vnfc.vnfc-name\"," +
                "                \"relationship-value\": \"ss820f_0918_refvnf_vnfinstancem002mmb001\"" +
                "              }" +
                "            ]" +
                "          }" +
                "        ]" +
                "      }" +
                "    }, {" +
                "      \"vf-module-id\": \"3ef042c4-259f-45e0-9aba-0989bd8d1cc5\"," +
                "      \"vf-module-name\": \"ss820f_0918_base\"," +
                "      \"heat-stack-id\": \"\"," +
                "      \"orchestration-status\": \"Assigned\"," +
                "      \"is-base-vf-module\": true," +
                "      \"automated-assignment\": false," +
                "      \"resource-version\": \"1537310272044\"," +
                "      \"model-invariant-id\": \"1e463c9c-404d-4056-ba56-28fd102608de\"," +
                "      \"model-version-id\": \"dc229cd8-c132-4455-8517-5c1787c18b14\"," +
                "      \"model-customization-id\": \"8ad8670b-0541-4499-8101-275bbd0e8b6a\"," +
                "      \"module-index\": 0," +
                "      \"relationship-list\": {" +
                "        \"relationship\": [{" +
                "            \"related-to\": \"vnfc\"," +
                "            \"relationship-label\": \"org.onap.relationships.inventory.Uses\"," +
                "            \"related-link\": \"/aai/v13/network/vnfcs/vnfc/ss820f_0918_refvnf_vnfinstancem001mmb001\"," +
                "            \"relationship-data\": [{" +
                "                \"relationship-key\": \"vnfc.vnfc-name\"," +
                "                \"relationship-value\": \"ss820f_0918_refvnf_vnfinstancem001mmb001\"" +
                "              }" +
                "            ]" +
                "          }" +
                "        ]" +
                "      }" +
                "    }" +
                "  ]" +
                "}";
    }


}