Added CSIT for Macroflow with HEAT
[integration/csit.git] / plans / so / integration-etsi-testing / so-simulators / multicloud-simulator / src / main / java / org / onap / so / multicloudsimulator / beans / InstanceNameOutput.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * Copyright 2021 Huawei Technologies Co., Ltd.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * ============LICENSE_END=========================================================
17  */
18
19 package org.onap.so.multicloudsimulator.beans;
20
21 import com.fasterxml.jackson.databind.JsonNode;
22 import org.springframework.boot.context.properties.ConfigurationProperties;
23 import org.springframework.context.annotation.PropertySource;
24 import org.springframework.core.io.ClassPathResource;
25 import org.springframework.stereotype.Component;
26 import java.io.IOException;
27 import java.io.InputStream;
28
29 @Component
30 @PropertySource(value = "data/InstanceNameOutput.json")
31 @ConfigurationProperties
32 public class InstanceNameOutput {
33     private String template_type;
34     private String workload_id;
35     private String workload_status;
36     public JsonNode workload_status_reason;
37
38     public  String getTemplate_type() {
39         return template_type;
40     }
41
42     public void setTemplate_type(final String template_type) {
43         this.template_type = template_type;
44     }
45
46     public String getWorkload_id() {
47         return workload_id;
48     }
49
50     public void setWorkload_id(final String workload_id) {
51         this.workload_id = workload_id;
52     }
53
54     public String getWorkload_status() {
55         return workload_status;
56     }
57
58     public void setWorkload_status(final String workload_status) {
59         this.workload_status = workload_status;
60     }
61
62     public JsonNode getWorkload_status_reason() {
63         return workload_status_reason;
64     }
65
66     public void setWorkload_status_reason(final JsonNode workload_status_reason) {
67         this.workload_status_reason = workload_status_reason;
68     }
69
70     public final static InputStream getFile(final String file) throws IOException {
71         return new ClassPathResource(file).getInputStream();
72     }
73
74     public final static InputStream getInstanceName() throws Exception, IOException {
75         return getFile("data/InstanceNameOutput.json");
76     }
77 }