2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2020 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.setup.guilin;
24 import java.util.HashMap;
27 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
28 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.ReleaseInformation;
29 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.ComponentName;
30 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.DatabaseInfo;
31 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.KeepDataSearchHitConverter;
32 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.Release;
33 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.SearchHitConverter;
35 public class GuilinReleaseInformation extends ReleaseInformation {
41 public GuilinReleaseInformation() {
42 super(Release.GUILIN_R1, createDBMap());
46 private static Map<ComponentName, DatabaseInfo> createDBMap() {
47 Map<ComponentName, DatabaseInfo> map = new HashMap<>();
48 map.put(ComponentName.EVENTLOG, new DatabaseInfo("eventlog", "eventlog", ""));
49 map.put(ComponentName.FAULTCURRENT, new DatabaseInfo("faultcurrent", "faultcurrent", ""));
50 map.put(ComponentName.FAULTLOG, new DatabaseInfo("faultlog", "faultlog", ""));
51 map.put(ComponentName.INVENTORY, new DatabaseInfo("inventoryequipment", "inventoryequipment", ""));
52 map.put(ComponentName.HISTORICAL_PERFORMANCE_15M,
53 new DatabaseInfo("historicalperformance15min", "historicalperformance15min", ""));
54 map.put(ComponentName.HISTORICAL_PERFORMANCE_24H,
55 new DatabaseInfo("historicalperformance24h", "historicalperformance24h", ""));
56 map.put(ComponentName.REQUIRED_NETWORKELEMENT,
57 new DatabaseInfo("networkelement-connection", "networkelement-connection", ""));
58 map.put(ComponentName.MEDIATOR_SERVER, new DatabaseInfo("mediator-server", "mediator-server", ""));
59 map.put(ComponentName.MAINTENANCE, new DatabaseInfo("maintenancemode", "maintenancemode", ""));
64 public SearchHitConverter getConverter(Release dst, ComponentName comp) {
65 if (dst == Release.GUILIN_R1) {
66 return new KeepDataSearchHitConverter(comp);
72 protected boolean runPreInitCommands(HtDatabaseClient dbClient) {
77 protected boolean runPostInitCommands(HtDatabaseClient dbClient) {