X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=reader%2FrNibReader.go;fp=reader%2FrNibReader.go;h=c12a2c86fe2b723cca0ca30ee4fec051c8f326c0;hb=341bb65b5b833ec46203305396f19688b4349914;hp=77fee8dacf82268887dd2c2a90443c4cf2440c68;hpb=1f7faca9ec93c410832a009595e0111faa12eb05;p=ric-plt%2Fnodeb-rnib.git diff --git a/reader/rNibReader.go b/reader/rNibReader.go index 77fee8d..c12a2c8 100644 --- a/reader/rNibReader.go +++ b/reader/rNibReader.go @@ -67,6 +67,8 @@ type RNibReader interface { GetE2TAddresses() ([]string, error) GetGeneralConfiguration() (*entities.GeneralConfiguration, error) + + GetRanFunctionDefinition(inventoryName string, Oid string) ([]string, error) } //GetNewRNibReader returns reference to RNibReader @@ -78,6 +80,22 @@ func GetNewRNibReader(storage common.ISdlSyncStorage) RNibReader { } } +//GetRanFunctionDefinition from the OID +func (w *rNibReaderInstance) GetRanFunctionDefinition(inventoryName string, oid string) ([]string, error){ + nb, err := w.GetNodeb (inventoryName) + if (nb.GetGnb() != nil) { + ranFunction := nb.GetGnb().RanFunctions + functionDefinitionList := make([]string, 0) + for _, ranFunction := range ranFunction { + if (oid == ranFunction.RanFunctionOid) { + functionDefinitionList = append(functionDefinitionList ,ranFunction.RanFunctionDefinition) + } + } + return functionDefinitionList, err + } + return nil, common.NewResourceNotFoundErrorf("#rNibReader.GetCellList - served cells not found. Responding node RAN name: % s.", inventoryName) +} + //GetRNibReader returns reference to RNibReader //Deprecated: Will be removed in a future release, please use GetNewRNibReader instead. func GetRNibReader(sdl common.ISdlInstance) RNibReader {