From 60db47fe8638526e760aaca8b44a08c83279b210 Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Fri, 23 Aug 2024 17:03:06 +0200 Subject: [PATCH] remove unused method (#113) Signed-off-by: Patricia Reinoso --- consumer/nf_discovery.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 consumer/nf_discovery.go diff --git a/consumer/nf_discovery.go b/consumer/nf_discovery.go deleted file mode 100644 index e4f31d6..0000000 --- a/consumer/nf_discovery.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2019 free5GC.org -// -// SPDX-License-Identifier: Apache-2.0 -// - -package consumer - -import ( - "context" - "fmt" - "net/http" - - "github.com/omec-project/openapi/Nnrf_NFDiscovery" - "github.com/omec-project/openapi/models" - "github.com/omec-project/udr/logger" -) - -func SendSearchNFInstances(nrfUri string, targetNfType, requestNfType models.NfType, - param Nnrf_NFDiscovery.SearchNFInstancesParamOpts, -) (models.SearchResult, error) { - // Set client and set url - configuration := Nnrf_NFDiscovery.NewConfiguration() - configuration.SetBasePath(nrfUri) - client := Nnrf_NFDiscovery.NewAPIClient(configuration) - - var res *http.Response - result, res, err := client.NFInstancesStoreApi.SearchNFInstances(context.TODO(), targetNfType, requestNfType, ¶m) - if res != nil && res.StatusCode == http.StatusTemporaryRedirect { - err = fmt.Errorf("temporary Redirect For Non NRF Consumer") - } - defer func() { - if rspCloseErr := res.Body.Close(); rspCloseErr != nil { - logger.ConsumerLog.Errorf("SearchNFInstances response body cannot close: %+v", rspCloseErr) - } - }() - - return result, err -}