X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fprovidermanagementapi%2Ftypeaccess.go;h=b1894d44cdda5325e509dc978d7b7ccdd9fda534;hb=c1d23cc476433ecf2fab9d43cda75376e1294b0d;hp=78b68c063a33db0a143e1e3cc00f0e5aca3ad502;hpb=829338e085a03b58b6bb8a54b8c67bfffbf84952;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/providermanagementapi/typeaccess.go b/capifcore/internal/providermanagementapi/typeaccess.go index 78b68c0..b1894d4 100644 --- a/capifcore/internal/providermanagementapi/typeaccess.go +++ b/capifcore/internal/providermanagementapi/typeaccess.go @@ -22,7 +22,7 @@ package providermanagementapi func (ed APIProviderEnrolmentDetails) GetExposingFunctionIdsForPublisher(apfId string) []string { for _, registeredFunc := range *ed.ApiProvFuncs { - if *registeredFunc.ApiProvFuncId == apfId && registeredFunc.isProvidingFunction() { + if *registeredFunc.ApiProvFuncId == apfId { return ed.getExposingFunctionIds() } } @@ -48,7 +48,16 @@ func (ed APIProviderEnrolmentDetails) IsFunctionRegistered(functionId string) bo return false } -func (fd APIProviderFunctionDetails) isProvidingFunction() bool { +func (ed APIProviderEnrolmentDetails) IsPublishingFunctionRegistered(functionId string) bool { + for _, registeredFunc := range *ed.ApiProvFuncs { + if *registeredFunc.ApiProvFuncId == functionId && registeredFunc.isPublishingFunction() { + return true + } + } + return false +} + +func (fd APIProviderFunctionDetails) isPublishingFunction() bool { return fd.ApiProvFuncRole == ApiProviderFuncRoleAPF }