RemoveE2TInstance(e2tAddress string) error
UpdateGnbCells(nodebInfo *entities.NodebInfo, servedNrCells []*entities.ServedNRCell) error
RemoveServedNrCells(inventoryName string, servedNrCells []*entities.ServedNRCell) error
- UpdateNodebConnectivityState(nodebInfo *entities.NodebInfo, stateChangeMessageChannel string, event string) error
+ UpdateNodebInfoOnConnectionStatusInversion(nodebInfo *entities.NodebInfo, stateChangeMessageChannel string, event string) error
+ SaveGeneralConfiguration(config *entities.GeneralConfiguration) error
}
/*
return nil
}
+func (w *rNibWriterInstance) SaveGeneralConfiguration(config *entities.GeneralConfiguration) error {
+
+ err := w.SaveWithKeyAndMarshal(common.BuildGeneralConfigurationKey(), config)
+
+ if err != nil {
+ return common.NewInternalError(err)
+ }
+
+ return nil
+}
+
/*
SaveNodeb saves nodeB entity data in the redis DB according to the specified data model
*/
return nil
}
+func (w *rNibWriterInstance) SaveWithKeyAndMarshal(key string, entity interface{}) error {
+
+ data, err := json.Marshal(entity)
+
+ if err != nil {
+ return common.NewInternalError(err)
+ }
+
+ var pairs []interface{}
+ pairs = append(pairs, key, data)
+
+ err = w.sdl.Set(pairs)
+
+ if err != nil {
+ return common.NewInternalError(err)
+ }
+
+ return nil
+}
+
/*
-UpdateNodebConnectivityState...
+UpdateNodebInfoOnConnectionStatusInversion...
*/
-func (w *rNibWriterInstance) UpdateNodebConnectivityState(nodebInfo *entities.NodebInfo, stateChangeMessageChannel string, event string) error {
+func (w *rNibWriterInstance) UpdateNodebInfoOnConnectionStatusInversion(nodebInfo *entities.NodebInfo, stateChangeMessageChannel string, event string) error {
pairs, err := buildUpdateNodebInfoPairs(nodebInfo)
func isNotEmpty(nbIdentity *entities.NbIdentity) bool {
return nbIdentity.GlobalNbId != nil && nbIdentity.GlobalNbId.PlmnId != "" && nbIdentity.GlobalNbId.NbId != ""
-}
+}
\ No newline at end of file