Skip to content

Commit

Permalink
fix ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KunLee76 committed Jun 11, 2024
1 parent 6b8a2ac commit e318a8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions internal/sbi/api_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (s *Server) getNFManagementRoutes() []Route {
}

// DeregisterNFInstance - Deregisters a given NF Instance
func (s *Server) DeregisterNFInstance(c *gin.Context) { //OK
func (s *Server) DeregisterNFInstance(c *gin.Context) { // OK
auth_err := authorizationCheck(c, "nnrf-nfm")
if auth_err != nil {
c.JSON(http.StatusUnauthorized, gin.H{"error": auth_err.Error()})
Expand All @@ -91,7 +91,7 @@ func (s *Server) DeregisterNFInstance(c *gin.Context) { //OK
}

// GetNFInstance - Read the profile of a given NF Instance
func (s *Server) NFInstance(c *gin.Context) { //OK
func (s *Server) NFInstance(c *gin.Context) { // OK
auth_err := authorizationCheck(c, "nnrf-nfm")
if auth_err != nil {
c.JSON(http.StatusUnauthorized, gin.H{"error": auth_err.Error()})
Expand All @@ -104,7 +104,7 @@ func (s *Server) NFInstance(c *gin.Context) { //OK
s.Processor().GetNFInstanceProcedure(c, nfInstanceId)
}

func (s *Server) RegisterNFInstance(c *gin.Context) { //OK
func (s *Server) RegisterNFInstance(c *gin.Context) { // OK
auth_err := authorizationCheck(c, "nnrf-nfm")
if auth_err != nil {
c.JSON(http.StatusUnauthorized, gin.H{"error": auth_err.Error()})
Expand Down Expand Up @@ -170,7 +170,7 @@ func (s *Server) RegisterNFInstance(c *gin.Context) { //OK
}

// UpdateNFInstance - Update NF Instance profile
func (s *Server) getUpdateNFInstance(c *gin.Context) { //OK
func (s *Server) getUpdateNFInstance(c *gin.Context) { // OK
auth_err := authorizationCheck(c, "nnrf-nfm")
if auth_err != nil {
c.JSON(http.StatusUnauthorized, gin.H{"error": auth_err.Error()})
Expand Down Expand Up @@ -322,7 +322,7 @@ func (s *Server) UpdateSubscription(c *gin.Context) {
// Provide SubsciptionId for each request (add by one each time)

// CreateSubscription - Create a new subscription
func (s *Server) CreateSubscription(c *gin.Context) { //OK
func (s *Server) CreateSubscription(c *gin.Context) { // OK
auth_err := authorizationCheck(c, "nnrf-nfm")
if auth_err != nil {
c.JSON(http.StatusUnauthorized, gin.H{"error": auth_err.Error()})
Expand Down
14 changes: 7 additions & 7 deletions internal/sbi/processor/nfmanagement.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func RemoveSubscriptionProcedure(subscriptionID string) {
}
}

func (p *Processor) GetNFInstancesProcedure( //OK
func (p *Processor) GetNFInstancesProcedure( // OK
c *gin.Context, nfType string, limit int,
) { // (*nrf_context.UriList, *models.ProblemDetails) {
collName := "urilist"
Expand Down Expand Up @@ -249,8 +249,8 @@ func (p *Processor) GetNFInstancesProcedure( //OK
}
c.JSON(http.StatusInternalServerError, problemDetail)
// return nil, problemDetail
//c.JSON(int(problemDetail.Status), problemDetail)
//c.Data(http.StatusInternalServerError, "application/json", []byte("error in GetNFInstancesProcedure"))
// c.JSON(int(problemDetail.Status), problemDetail)
// c.Data(http.StatusInternalServerError, "application/json", []byte("error in GetNFInstancesProcedure"))
}
rspUriList.Link.Item = append(rspUriList.Link.Item, originalUL.Link.Item...)
if nfType != "" && rspUriList.NfType == "" {
Expand All @@ -266,7 +266,7 @@ func (p *Processor) GetNFInstancesProcedure( //OK
c.JSON(http.StatusForbidden, nil)
}

func (p *Processor) NFDeregisterProcedure(c *gin.Context, nfInstanceID string) *models.ProblemDetails { //OK
func (p *Processor) NFDeregisterProcedure(c *gin.Context, nfInstanceID string) *models.ProblemDetails { // OK
collName := "NfProfile"
filter := bson.M{"nfInstanceId": nfInstanceID}

Expand Down Expand Up @@ -353,7 +353,7 @@ func (p *Processor) NFDeregisterProcedure(c *gin.Context, nfInstanceID string) *
return nil
}

func (p *Processor) UpdateNFInstanceProcedure( //OK
func (p *Processor) UpdateNFInstanceProcedure( // OK
c *gin.Context, nfInstanceID string, patchJSON []byte,
) map[string]interface{} {
collName := "NfProfile"
Expand Down Expand Up @@ -397,7 +397,7 @@ func (p *Processor) UpdateNFInstanceProcedure( //OK
return nf
}

func (p *Processor) GetNFInstanceProcedure(c *gin.Context, nfInstanceID string) { //OK
func (p *Processor) GetNFInstanceProcedure(c *gin.Context, nfInstanceID string) { // OK
collName := "NfProfile"
filter := bson.M{"nfInstanceId": nfInstanceID}
response, err := mongoapi.RestfulAPIGetOne(collName, filter)
Expand All @@ -412,7 +412,7 @@ func (p *Processor) GetNFInstanceProcedure(c *gin.Context, nfInstanceID string)
c.JSON(http.StatusOK, response)
}

func (p *Processor) NFRegisterProcedure(c *gin.Context, nfProfile models.NfProfile) ( //OK
func (p *Processor) NFRegisterProcedure(c *gin.Context, nfProfile models.NfProfile) ( // OK
header http.Header, response bson.M,
update bool, problemDetails *models.ProblemDetails,
) {
Expand Down

0 comments on commit e318a8e

Please sign in to comment.