X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2FrNibWriter%2FrNibWriter.go;h=a7195de9b7769b26a64d5abb26accfa2b1b95018;hb=6c6a9f5cd027a71a2c9f5ca160bee0bef9243682;hp=13a31f33ccde5c1e90dafd7c035b52b56e80a6b6;hpb=372a275602ae05da22130a4601709291c7fbbaa6;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/rNibWriter/rNibWriter.go b/E2Manager/rNibWriter/rNibWriter.go index 13a31f3..a7195de 100644 --- a/E2Manager/rNibWriter/rNibWriter.go +++ b/E2Manager/rNibWriter/rNibWriter.go @@ -43,6 +43,7 @@ type RNibWriter interface { SaveRanLoadInformation(inventoryName string, ranLoadInformation *entities.RanLoadInformation) error SaveE2TInstance(e2tInstance *entities.E2TInstance) error SaveE2TAddresses(addresses []string) error + RemoveE2TInstance(e2tAddress string) error } /* @@ -234,6 +235,20 @@ func (w *rNibWriterInstance) SaveE2TAddresses(addresses []string) error { return nil } + +func (w *rNibWriterInstance) RemoveE2TInstance(address string) error { + key, rNibErr := common.ValidateAndBuildE2TInstanceKey(address) + if rNibErr != nil { + return rNibErr + } + err := w.sdl.Remove([]string{key}) + + if err != nil { + return common.NewInternalError(err) + } + return nil +} + /* Close the writer */