Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[ JIRA Id - ODUHIGH-606 ] Fixing null memory size allocation issue
[o-du/l2.git]
/
src
/
o1
/
InitConfig.hpp
diff --git
a/src/o1/InitConfig.hpp
b/src/o1/InitConfig.hpp
index
99d61f3
..
32added
100644
(file)
--- a/
src/o1/InitConfig.hpp
+++ b/
src/o1/InitConfig.hpp
@@
-24,27
+24,20
@@
#include <utility>
#include <string>
#include <iostream>
#include <utility>
#include <string>
#include <iostream>
-#include
"sysrepo-cpp/Session.hpp"
+#include
<string.h>
#include <map>
#include <map>
+#include "sysrepo-cpp/Session.hpp"
#include "Singleton.hpp"
#include "Singleton.hpp"
-#include "Config.h"
-
+#include "CmInterface.h"
#include "GlobalDefs.hpp"
#include "GlobalDefs.hpp"
+
#define IP_ADDRESS "interface-address"
#define PORT "port"
#define INTERFACE_MODULE_NAME_ORAN "/o-ran-sc-odu-interface-v1:odu"
#define MAX_XPATH 100
#define NETCONF_STARTUP_CFG "/etc/netconf_startup.cfg"
#define IP_ADDRESS "interface-address"
#define PORT "port"
#define INTERFACE_MODULE_NAME_ORAN "/o-ran-sc-odu-interface-v1:odu"
#define MAX_XPATH 100
#define NETCONF_STARTUP_CFG "/etc/netconf_startup.cfg"
-#define DEFAULT_DU_IPV4_ADDR "192.168.130.81"
-#define DEFAULT_DU_PORT 38472
-
-#define DEFAULT_CU_IPV4_ADDR "192.168.130.82"
-#define DEFAULT_CU_PORT 38472
-
-#define DEFAULT_RIC_IPV4_ADDR "192.168.130.80"
-#define DEFAULT_RIC_PORT 36421
-
+using namespace std;
enum class Interface
{ ODU,
OCU,
enum class Interface
{ ODU,
OCU,
@@
-67,6
+60,7
@@
class InitConfig : public Singleton<InitConfig>
~InitConfig();
bool init(sysrepo::S_Session sess);
bool getCurrInterfaceConfig(StartupConfig & cfg);
~InitConfig();
bool init(sysrepo::S_Session sess);
bool getCurrInterfaceConfig(StartupConfig & cfg);
+ bool disableNacm(sysrepo::S_Session sess);
private:
private:
@@
-75,10
+69,11
@@
class InitConfig : public Singleton<InitConfig>
sysrepo::S_Session mSess;
//string mVal;
/* function to get the data of Interfaces param*/
sysrepo::S_Session mSess;
//string mVal;
/* function to get the data of Interfaces param*/
- InterfaceMap getInterfaceConfig(sysrepo::S_Session sess);
- Address getInterfaceData(sysrepo::S_Session sess, Interface inf);
+ bool getInterfaceData(sysrepo::S_Session sess, \
+ Interface inf, InitConfig::Address & addr);
+ bool getInterfaceConfig(sysrepo::S_Session sess , InitConfig::InterfaceMap &map);
char * getInterfaceXpath( std::string sInf, std::string param);
char * getInterfaceXpath( std::string sInf, std::string param);
-
std::string getData(sysrepo::S_Session sess,char* xpath
);
+
bool getData(sysrepo::S_Session sess,char* xpath, string &val
);
std::string interfaceToString(Interface inf);
bool printInterfaceConfig();
bool writeInterfaceConfig();
std::string interfaceToString(Interface inf);
bool printInterfaceConfig();
bool writeInterfaceConfig();