X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fo1%2FInitConfig.hpp;h=32addedbf4b12447048065937ca6f447aae8b890;hb=6dc8a4c17da24847b3a3aee91b37151f77a8a5bc;hp=99d61f3487126f9ef23d44daad2e283d14f15f8f;hpb=069f38324ca51afc183962404383802ae8a5553c;p=o-du%2Fl2.git diff --git a/src/o1/InitConfig.hpp b/src/o1/InitConfig.hpp index 99d61f348..32addedbf 100644 --- a/src/o1/InitConfig.hpp +++ b/src/o1/InitConfig.hpp @@ -24,27 +24,20 @@ #include #include #include -#include "sysrepo-cpp/Session.hpp" +#include #include +#include "sysrepo-cpp/Session.hpp" #include "Singleton.hpp" -#include "Config.h" - +#include "CmInterface.h" #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 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, @@ -67,6 +60,7 @@ class InitConfig : public Singleton ~InitConfig(); bool init(sysrepo::S_Session sess); bool getCurrInterfaceConfig(StartupConfig & cfg); + bool disableNacm(sysrepo::S_Session sess); private: @@ -75,10 +69,11 @@ class InitConfig : public Singleton 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); - 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();