[RIC-397] rename method to UpdateNodebInfoOnConnectionStatusInversion
[ric-plt/e2mgr.git] / E2Manager / configuration / configuration.go
index 89515e4..f539c5d 100644 (file)
@@ -53,6 +53,7 @@ type Configuration struct {
                Mcc   string
                Mnc   string
        }
+       StateChangeMessageChannel string
 }
 
 func ParseConfiguration() *Configuration {
@@ -80,6 +81,7 @@ func ParseConfiguration() *Configuration {
        config.KeepAliveDelayMs = viper.GetInt("KeepAliveDelayMs")
        config.E2TInstanceDeletionTimeoutMs = viper.GetInt("e2tInstanceDeletionTimeoutMs")
        config.populateGlobalRicIdConfig(viper.Sub("globalRicId"))
+       config.StateChangeMessageChannel = viper.GetString("stateChangeMessageChannel")
        return &config
 }
 
@@ -152,7 +154,7 @@ func validateGlobalRicIdConfig(globalRicIdConfig *viper.Viper) error {
 func validateMcc(mcc string) error {
 
        if len(mcc) == 0{
-               return errors.New("#configuration.validateMcc - mcc is emtpy or missing\n")
+               return errors.New("#configuration.validateMcc - mcc is missing or empty\n")
        }
 
        if len(mcc) != 3{
@@ -174,7 +176,7 @@ func validateMcc(mcc string) error {
 func validateMnc(mnc string) error {
 
        if len(mnc) == 0{
-               return errors.New("#configuration.validateMnc - mnc is emtpy or missing\n")
+               return errors.New("#configuration.validateMnc - mnc is missing or empty\n")
        }
 
        if len(mnc) < 2 || len(mnc) >3 {
@@ -197,7 +199,7 @@ func validateMnc(mnc string) error {
 func validateRicId(ricId string) error{
 
        if len(ricId) == 0{
-               return errors.New("#configuration.validateRicId - ricId is emtpy or missing\n")
+               return errors.New("#configuration.validateRicId - ricId is missing or empty\n")
        }
 
        if len(ricId) != 5 {
@@ -217,7 +219,7 @@ func (c *Configuration) String() string {
        return fmt.Sprintf("{logging.logLevel: %s, http.port: %d, rmr: { port: %d, maxMsgSize: %d}, routingManager.baseUrl: %s, "+
                "notificationResponseBuffer: %d, bigRedButtonTimeoutSec: %d, maxRnibConnectionAttempts: %d, "+
                "rnibRetryIntervalMs: %d, keepAliveResponseTimeoutMs: %d, keepAliveDelayMs: %d, e2tInstanceDeletionTimeoutMs: %d, "+
-               "globalRicId: { ricId: %s, mcc: %s, mnc: %s}",
+               "globalRicId: { ricId: %s, mcc: %s, mnc: %s}, StateChangeMessageChannel: %s",
                c.Logging.LogLevel,
                c.Http.Port,
                c.Rmr.Port,
@@ -233,5 +235,6 @@ func (c *Configuration) String() string {
                c.GlobalRicId.RicId,
                c.GlobalRicId.Mcc,
                c.GlobalRicId.Mnc,
+               c.StateChangeMessageChannel,
        )
 }