2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property.
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
22 package org.onap.ccsdk.features.sdnr.wt.dataprovider.http.about;
24 import java.util.HashMap;
27 public class ODLVersionLUT {
29 private static Map<String,String> odlMdsalVersionLUT=null;
31 public static String getONAPReleaseName(String onapCCSDKVersion, String def) {
32 if (onapCCSDKVersion == null) {
35 if (onapCCSDKVersion.startsWith("2.7.")) {
36 return "ONAP New Dehli";
38 if (onapCCSDKVersion.startsWith("2.6.")) {
39 return "ONAP Montreal";
41 if (onapCCSDKVersion.startsWith("2.5.")) {
44 if (onapCCSDKVersion.startsWith("2.4.")) {
47 if (onapCCSDKVersion.startsWith("2.3.")) {
48 return "ONAP Jakarta";
50 if (onapCCSDKVersion.startsWith("2.2.")) {
51 return "ONAP Istanbul";
53 if (onapCCSDKVersion.startsWith("2.1.")) {
54 return "ONAP Honolulu";
56 if (onapCCSDKVersion.startsWith("2.0.")) {
59 if (onapCCSDKVersion.startsWith("1.5.")) {
60 return "ONAP Frankfurt";
62 if (onapCCSDKVersion.startsWith("1.4.")) {
63 return "ONAP El Alto";
65 if (onapCCSDKVersion.startsWith("1.3.")) {
66 return "ONAP El Alto";
68 if (onapCCSDKVersion.startsWith("1.2.")) {
74 public static String getOdlVersion(String mdsalVersion, String def) {
76 if (mdsalVersion == null) {
79 if(odlMdsalVersionLUT==null) {
80 odlMdsalVersionLUT = new HashMap<>();
81 odlMdsalVersionLUT.put("12.0.4","potassium-SR2 (0.19.2)");
82 odlMdsalVersionLUT.put("12.0.3","potassium-SR1 (0.19.1)");
83 odlMdsalVersionLUT.put("12.0.2","potassium-SR0 (0.19.0)");
84 odlMdsalVersionLUT.put("11.0.15","argon-SR3 (0.18.3)");
85 odlMdsalVersionLUT.put("11.0.12","argon-SR2 (0.18.2)");
86 odlMdsalVersionLUT.put("11.0.9","argon-SR1 (0.18.1)");
87 odlMdsalVersionLUT.put("11.0.7","argon-SR0 (0.18.0)");
88 odlMdsalVersionLUT.put("10.0.8","chlorine-SR3 (0.17.3)");
89 odlMdsalVersionLUT.put("10.0.6","chlorine-SR2 (0.17.2)");
90 odlMdsalVersionLUT.put("10.0.5","chlorine-SR1 (0.17.1)");
91 odlMdsalVersionLUT.put("10.0.2","chlorine-SR0 (0.17.0)");
92 odlMdsalVersionLUT.put("9.0.5","sulfur-SR2 (0.16.2)");
93 odlMdsalVersionLUT.put("9.0.4","sulfur-SR1 (0.16.1)");
94 odlMdsalVersionLUT.put("9.0.2","sulfur-SR0 (0.16.0)");
95 odlMdsalVersionLUT.put("8.0.11","phosphorus-SR2 (0.15.2)");
96 odlMdsalVersionLUT.put("8.0.7","phosphorus-SR1 (0.15.1)");
97 odlMdsalVersionLUT.put("8.0.5","phosphorus-SR0 (0.15.0)");
98 odlMdsalVersionLUT.put("7.0.9","silicon-SR2 (0.14.2)");
99 odlMdsalVersionLUT.put("7.0.7","silicon-SR1 (0.14.1)");
100 odlMdsalVersionLUT.put("7.0.6","silicon-SR0 (0.14.0)");
101 odlMdsalVersionLUT.put("6.0.8","aluminium-SR3 (0.13.3)");
102 //odlMdsalVersionLUT.put("6.0.7","aluminium-SR2 (0.13.2)");
103 odlMdsalVersionLUT.put("6.0.7","aluminium-SR1 (0.13.1)");
104 odlMdsalVersionLUT.put("6.0.4","aluminium-SR0 (0.13.0)");
105 odlMdsalVersionLUT.put("5.0.14","magnesium-SR2 (0.12.2)");
106 odlMdsalVersionLUT.put("5.0.10","magnesium-SR1 (0.12.1)");
107 odlMdsalVersionLUT.put("5.0.9","magnesium-SR0 (0.12.0)");
108 odlMdsalVersionLUT.put("4.0.17","sodium-SR4 (0.11.4)");
109 odlMdsalVersionLUT.put("4.0.14","sodium-SR3 (0.11.3)");
110 odlMdsalVersionLUT.put("4.0.11","sodium-SR2 (0.11.2)");
111 odlMdsalVersionLUT.put("4.0.6","sodium-SR1 (0.11.1)");
112 odlMdsalVersionLUT.put("4.0.4","sodium-SR0 (0.11.0)");
113 odlMdsalVersionLUT.put("3.0.13","neon-SR3 (0.10.3)");
114 odlMdsalVersionLUT.put("3.0.10","neon-SR2 (0.10.2)");
115 odlMdsalVersionLUT.put("3.0.8","neon-SR1 (0.10.1)");
116 odlMdsalVersionLUT.put("3.0.6","neon-SR0 (0.10.0)");
119 return odlMdsalVersionLUT.getOrDefault(mdsalVersion, def);