Issue-ID: NONRTRIC-946
Signed-off-by: DenisGNoonan <denis.noonan@est.tech>
Change-Id: Ib298370047713d9e51f3279a92fd9077658eec0b
// O-RAN-SC
// %%
// Copyright (C) 2022: Nordix Foundation
// O-RAN-SC
// %%
// Copyright (C) 2022: Nordix Foundation
+// Copyright (C) 2023: OpenInfra Foundation Europe.
// %%
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// %%
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
if allApis == nil {
return sendCoreError(ctx, http.StatusNotFound, fmt.Sprintf("Invoker %s not registered", params.ApiInvokerId))
}
if allApis == nil {
return sendCoreError(ctx, http.StatusNotFound, fmt.Sprintf("Invoker %s not registered", params.ApiInvokerId))
}
filteredApis := []publishapi.ServiceAPIDescription{}
filteredApis := []publishapi.ServiceAPIDescription{}
- gatewayDomain := "r1-expo-func-aef"
for _, api := range *allApis {
for _, api := range *allApis {
- if !matchesFilter(api, params) {
- continue
- }
- profiles := *api.AefProfiles
- for i, profile := range profiles {
- profile.DomainName = &gatewayDomain // Hardcoded for now. Should be provided through some other mechanism.
- profiles[i] = profile
+ if matchesFilter(api, params) {
+ filteredApis = append(filteredApis, api)
- filteredApis = append(filteredApis, api)
}
discoveredApis := discoverapi.DiscoveredAPIs{
ServiceAPIDescriptions: &filteredApis,
}
discoveredApis := discoverapi.DiscoveredAPIs{
ServiceAPIDescriptions: &filteredApis,