cef037178920cfbccbbc39964e220c926a4503c0
[so.git] / adapters / mso-openstack-adapters / src / main / java / org / onap / so / vdu / utils / VduBlueprint.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.vdu.utils;
22
23 import java.util.Map;
24
25 /*
26  * This Java bean class describes the template model of a VDU as distributed
27  * by SDC to SO.  It is composed of one or more templates, one of which must be
28  * the main template, 
29  * 
30  * The structure of this class corresponds to the format in which the templates
31  * and associated artifacts are represented in the SO Catalog.
32  * 
33  * The map keys will be the "path" that is used to reference these artifacts within
34  * the other templates.  This may be relevant to how different VDU plugins package
35  * the files for delivery to the sub-orchestrator.
36  * 
37  * In the future, it is possible that pre-packaged blueprints (e.g. complete TOSCA CSARs)
38  * could be stored in the catalog (and added to this structure).
39  * 
40  * This bean is passed as an input to instantiateVdu and updateVdu.
41  */
42
43 public class VduBlueprint {
44         String vduModelId;
45         String mainTemplateName;
46         Map<String,byte[]> templateFiles;
47         Map<String,byte[]> attachedFiles;
48
49         public String getVduModelId() {
50                 return vduModelId;
51         }
52
53         public void setVduModelId(String vduModelId) {
54                 this.vduModelId = vduModelId;
55         }
56
57         public String getMainTemplateName() {
58                 return mainTemplateName;
59         }
60
61         public void setMainTemplateName(String mainTemplateName) {
62                 this.mainTemplateName = mainTemplateName;
63         }
64
65         public Map<String, byte[]> getTemplateFiles() {
66                 return templateFiles;
67         }
68
69         public void setTemplateFiles(Map<String, byte[]> templateFiles) {
70                 this.templateFiles = templateFiles;
71         }
72
73         public Map<String, byte[]> getAttachedFiles() {
74                 return attachedFiles;
75         }
76
77         public void setAttachedFiles(Map<String, byte[]> attachedFiles) {
78                 this.attachedFiles = attachedFiles;
79         }
80
81         @Override
82     public String toString() {
83         return "VduInfo {" +
84                 "id='" + vduModelId + '\'' +
85                 "mainTemplateName='" + mainTemplateName + '\'' +
86                 '}';
87     }
88
89 }
90