1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2020-2021] [HCL Technologies Ltd.] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
18 /* This is a singleton class to load and store all configuration parameters */
20 #include "ConfigLoader.hpp"
23 ConfigLoader::ConfigLoader()
24 : mNetconfConfig(NETCONF_CONFIG),
25 mOamConfig(OAM_VES_CONFIG),
26 mSmoConfig(SMO_VES_CONFIG)
29 /* Default Destructor */
30 ConfigLoader::~ConfigLoader()
34 /*******************************************************************
36 * @brief Load all configuration files
40 * Function : loadConfigurations
43 * - Loads all the configuration files
47 * @return true - success
49 ******************************************************************/
50 bool ConfigLoader::loadConfigurations() {
51 return mOamConfig.loadConfigFile()
53 mSmoConfig.loadConfigFile()
55 mNetconfConfig.loadConfigFile();
58 /*******************************************************************
60 * @brief Get OAM Ves collector configuration
64 * Function : getOamConfigFile
67 * - Returns the OAM config object
71 * @return const reference to VesConfigFile
73 ******************************************************************/
74 const VesConfigFile& ConfigLoader::getOamConfigFile() const{
78 /*******************************************************************
80 * @brief Get SMO Ves collector configuration
84 * Function : getsmoConfigFile
87 * - Returns the Smo config object
91 * @return const reference to VesConfigFile
93 ******************************************************************/
94 const VesConfigFile& ConfigLoader::getSmoConfigFile() const{
98 /*******************************************************************
100 * @brief Get Netconf server configuration
104 * Function : getNetconfConfigFile
107 * - Returns the Netconf config object
111 * @return const reference to NetconfConfigFile
113 ******************************************************************/
114 const NetconfConfigFile& ConfigLoader::getNetconfConfigFile() const{
115 return mNetconfConfig;
118 /**********************************************************************
120 **********************************************************************/