2 * ============LICENSE_START========================================================================
\r
3 * ONAP : tr-069-adapter
\r
4 * =================================================================================================
\r
5 * Copyright (C) 2020 CommScope Inc Intellectual Property.
\r
6 * =================================================================================================
\r
7 * This tr-069-adapter software file is distributed by CommScope Inc under the Apache License,
\r
8 * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You
\r
9 * may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
\r
14 * either express or implied. See the License for the specific language governing permissions and
\r
15 * limitations under the License.
\r
16 * ===============LICENSE_END=======================================================================
\r
19 package org.commscope.tr069adapter.config;
\r
21 import java.util.ArrayList;
\r
22 import java.util.List;
\r
23 import org.commscope.tr069adapter.config.model.ConfigFileContent;
\r
25 public class ConfigDataTestsUtils {
\r
27 private ConfigDataTestsUtils() {}
\r
29 public static final String SERVER_URI = "http://localhost:9000/";
\r
30 public static final String macId = "testMacId";
\r
31 public static final String OUI = "0005B9";
\r
32 public static final String PRODUCT_CLASS = "LTE_Enterprise_C-RANSC_Cntrl";
\r
33 public static final String HAEDWARE_VERSION = "1.1.1.1";
\r
34 public static final String SW_VERSION = "4.5.00.001";
\r
36 public static final String CONFIG_FILE_NAME = macId + ".xml";
\r
38 // public static ConfigurationData getConfigurationData() {
\r
39 // ConfigurationData configData = new ConfigurationData();
\r
41 // configData.setHardwareVersion(HAEDWARE_VERSION);
\r
42 // configData.setSoftwareVersion(SW_VERSION);
\r
43 // configData.setLocalDn(macId);
\r
44 // configData.setOUI(OUI);
\r
45 // configData.setProductClass(PRODUCT_CLASS);
\r
47 //// Map<String, String> map = new HashMap<String, String>();
\r
48 //// map.put(", value)
\r
50 // return configData;
\r
54 public static List<ConfigFileContent> getConfigFileContent() {
\r
55 List<ConfigFileContent> data = new ArrayList<>();
\r
57 for (int i = 0; i < 5; i++) {
\r
58 ConfigFileContent configFileContent = new ConfigFileContent();
\r
59 configFileContent.setFileContent(getFileContent());
\r
60 configFileContent.setMacId(macId);
\r
61 configFileContent.setSwVersion("4." + i);
\r
68 public static String getFileContent() {
\r
69 String fileContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + "<configDataFile>\r\n"
\r
70 + " <fileHeader fileFormatVersion=\"32.594 V14.0.0\" vendorName=\"Commscope\"/>\r\n"
\r
71 + " <configData>\r\n"
\r
72 + " <managedElement swVersion=\"4.3.00.038\" localDn=\"0005B95196D0\" hwVersion=\"750742.00.04\" ProductClass=\"LTE_Enterprise_C-RANSC_Cntrl\" OUI=\"0005B9\"/>\r\n"
\r
73 + " <Device>\r\n" + " <FAP>\r\n" + " <GPS>\r\n"
\r
74 + " <AGPSServerConfig>\r\n" + " <Enable>1</Enable>\r\n"
\r
75 + " <Password>dmsuser</Password>\r\n"
\r
76 + " <ServerPort>7001</ServerPort>\r\n"
\r
77 + " <ServerURL>NONE</ServerURL>\r\n"
\r
78 + " <Username>dmsuser</Username>\r\n" + " </AGPSServerConfig>\r\n"
\r
79 + " <GPSReset>0</GPSReset>\r\n" + " </GPS>\r\n" + " </FAP>\r\n"
\r
80 + " </Device>\r\n" + " </configData>\r\n"
\r
81 + " <fileFooter dateTime=\"2019-07-16T17:32:35+05:30\"/>\r\n" + "</configDataFile>";
\r