bp-gen code clone from cli repo
[dcaegen2/platform.git] / mod / bpgenerator / src / main / java / org / onap / blueprintgenerator / core / TestComponentSpec.java
1 /**============LICENSE_START======================================================= 
2  org.onap.dcae 
3  ================================================================================ 
4  Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. 
5  ================================================================================ 
6  Licensed under the Apache License, Version 2.0 (the "License"); 
7  you may not use this file except in compliance with the License. 
8  You may obtain a copy of the License at 
9  
10       http://www.apache.org/licenses/LICENSE-2.0 
11  
12  Unless required by applicable law or agreed to in writing, software 
13  distributed under the License is distributed on an "AS IS" BASIS, 
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
15  See the License for the specific language governing permissions and 
16  limitations under the License. 
17  ============LICENSE_END========================================================= 
18  
19 */
20
21
22 package org.onap.blueprintgenerator.core;
23
24
25
26
27 import lombok.Getter;
28 import lombok.Setter;
29
30 @Getter @Setter
31 public class TestComponentSpec {
32         private String cs = "{\r\n" + 
33                         "       \"self\": {\r\n" + 
34                         "               \"component_type\": \"docker\",\r\n" + 
35                         "               \"description\": \"Test component spec\",\r\n" + 
36                         "               \"name\": \"test.component.spec\",\r\n" + 
37                         "               \"version\": \"1.0.1\"\r\n" + 
38                         "       },\r\n" + 
39                         "\r\n" + 
40                         "       \"service\": {\r\n" + 
41                         "               \"calls\": [],\r\n" + 
42                         "               \"provides\": []\r\n" + 
43                         "       },\r\n" + 
44                         "\r\n" + 
45                         "       \"streams\": {\r\n" + 
46                         "                               \"publishes\": [{\r\n" + 
47                         "                               \"config_key\": \"TEST-PUB-DR\",\r\n" + 
48                         "                               \"format\": \"dataformat_Hello_World_PM\",\r\n" + 
49                         "                               \"type\": \"data_router\",\r\n" + 
50                         "                               \"version\": \"1.0.0\"\r\n" + 
51                         "                       },\r\n" + 
52                         "                       {\r\n" + 
53                         "                               \"config_key\": \"TEST-PUB-MR\",\r\n" + 
54                         "                               \"format\": \"dataformat_Hello_World_PM\",\r\n" + 
55                         "                               \"type\": \"message_router\",\r\n" + 
56                         "                               \"version\": \"1.0.0\"\r\n" + 
57                         "                       }\r\n" + 
58                         "               ],\r\n" + 
59                         "\r\n" + 
60                         "               \"subscribes\": [{\r\n" + 
61                         "                               \"config_key\": \"TEST-SUB-MR\",\r\n" + 
62                         "                               \"format\": \"dataformat_Hello_World_PM\",\r\n" + 
63                         "                               \"route\": \"/TEST_HELLO_WORLD_SUB_MR\",\r\n" + 
64                         "                               \"type\": \"message_router\",\r\n" + 
65                         "                               \"version\": \"1.0.0\"\r\n" + 
66                         "                       },\r\n" + 
67                         "                       {\r\n" + 
68                         "                               \"config_key\": \"TEST-SUB-DR\",\r\n" + 
69                         "                               \"format\": \"dataformat_Hello_World_PM\",\r\n" + 
70                         "                               \"route\": \"/TEST-HELLO-WORLD-SUB-DR\",\r\n" + 
71                         "                               \"type\": \"data_router\",\r\n" + 
72                         "                               \"version\": \"1.0.0\"\r\n" + 
73                         "                       }               \r\n" + 
74                         "               ]\r\n" + 
75                         "       },\r\n" + 
76                         "\r\n" + 
77                         "       \"parameters\":\r\n" + 
78                         "       [\r\n" + 
79                         "               {\r\n" + 
80                         "                       \"name\": \"testParam1\",\r\n" + 
81                         "                       \"description\": \"test parameter 1\",\r\n" + 
82                         "                       \"value\": \"test-param-1\",\r\n" + 
83                         "                       \"type\": \"string\",\r\n" + 
84                         "                       \"sourced_at_deployment\": true,\r\n" + 
85                         "                       \"designer_editable\": true,\r\n" + 
86                         "                       \"policy_editable\": true,\r\n" + 
87                         "                       \"policy_group\": \"Test_Parameters\",\r\n" + 
88                         "                       \"required\": true\r\n" + 
89                         "               }\r\n" + 
90                         "       ],\r\n" + 
91                         "\r\n" + 
92                         "       \"auxilary\": {\r\n" + 
93                         "               \"healthcheck\": {\r\n" + 
94                         "                       \"type\": \"docker\",\r\n" + 
95                         "                       \"interval\": \"300s\",\r\n" + 
96                         "                       \"timeout\": \"120s\",\r\n" + 
97                         "                       \"script\": \"/etc/init.d/nagios status\"\r\n" + 
98                         "               },\r\n" + 
99                         "\r\n" + 
100                         "               \"databases\" : {\r\n" + 
101                         "          \"TestDB1\": \"PGaaS\",\r\n" + 
102                         "          \"TestDB2\": \"PGaaS\"\r\n" + 
103                         "        },\r\n" + 
104                         "\r\n" + 
105                         "               \"policy\": {\r\n" + 
106                         "                       \"trigger_type\": \"docker\",\r\n" + 
107                         "                       \"script_path\": \"/opt/app/manager/bin/reconfigure.sh\"\r\n" + 
108                         "               },\r\n" + 
109                         "               \"volumes\": [\r\n" + 
110                         "                       {\r\n" + 
111                         "                               \"container\": {\r\n" + 
112                         "                                       \"bind\": \"/opt/app/manager/config/hostname\"\r\n" + 
113                         "                               },\r\n" + 
114                         "                               \"host\": {\r\n" + 
115                         "                                       \"path\": \"/etc/hostname\",\r\n" + 
116                         "                                       \"mode\": \"ro\"\r\n" + 
117                         "                               }\r\n" + 
118                         "                       }\r\n" + 
119                         "\r\n" + 
120                         "               ],\r\n" + 
121                         "               \"ports\": [\r\n" + 
122                         "                       \"80:80\"\r\n" + 
123                         "               ]\r\n" + 
124                         "       },\r\n" + 
125                         "\r\n" + 
126                         "           \"artifacts\": [{\r\n" + 
127                         "               \"type\": \"docker image\",\r\n" + 
128                         "               \"uri\": \"test.tester\"\r\n" + 
129                         "       }]      \r\n" + 
130                         "\r\n" + 
131                         "}";
132 }