Upgrade NODEB-RNIB version to 1.0.21
[ric-plt/xapp-frame.git] / pkg / xapp / db.go
index 779e2cd..25c11c5 100755 (executable)
 package xapp
 
 import (
-       rnibcommon "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
        rnibentities "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
        rnibreader "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader"
        sdl "gerrit.o-ran-sc.org/r/ric-plt/sdlgo"
-       uenibprotobuf "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uernibprotobuf"
-       uenibreader "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uernibreader"
-       uenibwriter "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uernibwriter"
+       uenibprotobuf "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uenibprotobuf"
+       uenibreader "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uenibreader"
+       uenibwriter "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uenibwriter"
        rnibwriter "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/rnib"
        "sync"
        "time"
@@ -64,7 +63,7 @@ type UENIBClient struct {
 type RNIBNodeType = rnibentities.Node_Type
 type RNIBGlobalNbId = rnibentities.GlobalNbId
 type RNIBNodebInfo = rnibentities.NodebInfo
-type RNIBIRNibError = rnibcommon.IRNibError
+type RNIBIRNibError = error
 type RNIBCells = rnibentities.Cells
 type RNIBNbIdentity = rnibentities.NbIdentity
 type RNIBCellType = rnibentities.Cell_Type
@@ -159,6 +158,10 @@ func (s *SDLClient) MStoreAndPublish(channelsAndEvents []string, pairs ...interf
        return s.db.SetAndPublish(channelsAndEvents, pairs...)
 }
 
+func (s *SDLClient) Delete(keys []string) (err error) {
+       return s.db.Remove(keys)
+}
+
 func (s *SDLClient) Clear() {
        s.db.RemoveAll()
 }
@@ -225,11 +228,11 @@ func (r *RNIBClient) GetCellList(invName string) (*RNIBCells, RNIBIRNibError) {
        return rnibreader.GetRNibReader().GetCellList(invName)
 }
 
-func (r *RNIBClient) GetListGnbIds() (*[]*RNIBNbIdentity, RNIBIRNibError) {
+func (r *RNIBClient) GetListGnbIds() ([]*RNIBNbIdentity, RNIBIRNibError) {
        return rnibreader.GetRNibReader().GetListGnbIds()
 }
 
-func (r *RNIBClient) GetListEnbIds() (*[]*RNIBNbIdentity, RNIBIRNibError) {
+func (r *RNIBClient) GetListEnbIds() ([]*RNIBNbIdentity, RNIBIRNibError) {
        return rnibreader.GetRNibReader().GetListEnbIds()
 }