Improved logging for VNF image extraction
[aai/babel.git] / src / main / java / org / onap / aai / babel / csar / vnfcatalog / VendorImageConfiguration.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 European Software Marketing Ltd.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21 package org.onap.aai.babel.csar.vnfcatalog;
22
23 import com.google.gson.annotations.SerializedName;
24
25 /**
26  * This class represents Vendor Image data gleaned from tosca files within a csar file.
27  *
28  * <p>
29  * Example: Where the value application property is 'VM00' this comes from the VNFConfiguration NodeTemplate under a
30  * path:
31  *
32  * <pre>
33  * node_templates:
34  *     vFW_VNF_Configuration:
35  *         type: org.openecomp.nodes.VnfConfiguration
36  *         properties:
37  *             allowed_flavors:
38  *                 ATT_part_12345_for_FortiGate-VM00: Note the value of this element is dynamic
39  *                     vendor_info:
40  *                         vendor_model: VM00
41  * </pre>
42  *
43  * Where the value applicationVendor property is 'ATT (Tosca)' this comes from the VNFConfiguration NodeTemplate under a
44  * path:
45  *
46  * <pre>
47  * node_templates:
48  *     vFW_VNF_Configuration:
49  *         type: org.openecomp.nodes.VnfConfiguration
50  *         metadata:
51  *             resourceVendor: ATT (Tosca)
52  * </pre>
53  *
54  * Where the value applicationVersion property is '3.16.9' this comes from the MultiFlavorVFC NodeTemplate under a path:
55  *
56  * <pre>
57  *  node_templates:
58  *     vWAN_VFC:
59  *         type: org.openecomp.resource.abstract.nodes.MultiFlavorVFC
60  *         properties:
61  *             images:
62  *                 3.16.1: Note the value of this element is dynamic - represents the name of each image
63  *                     software_version: 3.16.1
64  * </pre>
65  */
66 class VendorImageConfiguration {
67
68     private String application;
69
70     @SerializedName("application-vendor")
71     private String applicationVendor;
72
73     @SerializedName("application-version")
74     private String applicationVersion;
75
76     VendorImageConfiguration(String application, String applicationVendor, String applicationVersion) {
77         this.application = application;
78         this.applicationVendor = applicationVendor;
79         this.applicationVersion = applicationVersion;
80     }
81
82     public String getApplication() {
83         return application;
84     }
85
86     public void setApplication(String application) {
87         this.application = application;
88     }
89
90     public String getApplicationVendor() {
91         return applicationVendor;
92     }
93
94     public void setApplicationVendor(String applicationVendor) {
95         this.applicationVendor = applicationVendor;
96     }
97
98     public String getApplicationVersion() {
99         return applicationVersion;
100     }
101
102     public void setApplicationVersion(String applicationVersion) {
103         this.applicationVersion = applicationVersion;
104     }
105
106     @Override
107     public String toString() {
108         return "VendorImage [" + application + ", " + applicationVendor + ", " + applicationVersion + "]";
109     }
110
111 }