X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=capifcore%2Finternal%2Fprovidermanagementapi%2Ftypeaccess.go;fp=capifcore%2Finternal%2Fprovidermanagementapi%2Ftypeaccess.go;h=b1894d44cdda5325e509dc978d7b7ccdd9fda534;hb=6f91b6ac28e733561200c5faf12029cafed39d3f;hp=5257701ef3a89b98766f28099d73d34ee5ed0819;hpb=e71305f32cddb7933da76dc5ce60193a866c48e7;p=nonrtric%2Fplt%2Fsme.git diff --git a/capifcore/internal/providermanagementapi/typeaccess.go b/capifcore/internal/providermanagementapi/typeaccess.go index 5257701..b1894d4 100644 --- a/capifcore/internal/providermanagementapi/typeaccess.go +++ b/capifcore/internal/providermanagementapi/typeaccess.go @@ -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 }