X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Finc%2Futils%2Futils.h;h=61ce1e35a4ef3cf0eec2cef0e02a9b2800991b6a;hb=226e12e7c9b504dc32fcf71f97483bb97195643d;hp=6208600f92528aed93e7b783b26b9b0fc9a9184f;hpb=610985b805c2b5c730bbc247ccbf76dd624792d0;p=sim%2Fo1-interface.git diff --git a/ntsimulator/inc/utils/utils.h b/ntsimulator/inc/utils/utils.h index 6208600..61ce1e3 100644 --- a/ntsimulator/inc/utils/utils.h +++ b/ntsimulator/inc/utils/utils.h @@ -31,7 +31,9 @@ #define TRUE 1 #define FALSE 0 -#define NETCONF_CONNECTIONS_PER_DEVICE 10 +#define NETCONF_CONNECTIONS_PER_DEVICE (getSshConnectionsFromConfigJson() + getTlsConnectionsFromConfigJson()) +#define SSH_CONNECTIONS_PER_DEVICE getSshConnectionsFromConfigJson() +#define TLS_CONNECTIONS_PER_DEVICE getTlsConnectionsFromConfigJson() #define PREPARE_ADD_NEW_VALUE(v, num) {\ num++;\ @@ -72,15 +74,20 @@ cJSON* vesCreateFaultFields(char *alarm_condition, char *alarm_object, char *sev char* readConfigFileInString(void); void writeConfigFile(char *config); +int writeSkeletonConfigFile(void); int getFaultNotificationDelayPeriodFromConfigJson(int *period_array, int *count); int getVesHeartbeatPeriodFromConfigJson(void); char* getVesAuthMethodFromConfigJson(void); char* getVesIpFromConfigJson(void); +char* getVesUsernameFromConfigJson(void); +char* getVesPasswordFromConfigJson(void); int getVesPortFromConfigJson(void); int getVesRegistrationFromConfigJson(void); int getNetconfAvailableFromConfigJson(void); int getVesAvailableFromConfigJson(void); +int getSshConnectionsFromConfigJson(void); +int getTlsConnectionsFromConfigJson(void); void generateRandomMacAddress(char *mac_address); @@ -95,4 +102,6 @@ cJSON* getDeviceListFromStatusFile(void); int compute_notifications_count(counterAlarms *ves_counter, counterAlarms *netconf_counter); int getDeviceCounters(char *containerId, counterAlarms *ves_counter, counterAlarms *netconf_counter); +int getIntFromString(char *string, int def_value); + #endif /* EXAMPLES_NTSIMULATOR_UTILS_H_ */