Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor #37

Merged
merged 25 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
23b2cdc
feat: consumer nrf_service
a3828162 Apr 24, 2024
f50f25d
feat: add nudm_service.go and nudr_service.go in consumer/
a3828162 Apr 27, 2024
21c90fb
feat: refactor processor ee, pp, callback
a3828162 Apr 29, 2024
aef8bce
feat: refactor uecm api_{SRV}.go and sdm api_{SRV}.go
a3828162 Apr 30, 2024
1e67491
feat: change func name http to handle, add (processor) method
a3828162 Apr 30, 2024
2d42b1a
feat: refactor server, processsor, consumer, router
a3828162 May 13, 2024
b8715f9
Merge branch 'main' into refactor/sbi-logic
a3828162 May 15, 2024
4076213
feat: refactor router
a3828162 May 15, 2024
d2386b3
Merge branch 'refactor/sbi-logic' of github.com:a3828162/udm into ref…
a3828162 May 15, 2024
c563d3e
fix: fix lint error
a3828162 May 15, 2024
dfb8312
feat: move procedure, hand func
a3828162 May 22, 2024
2decf1b
fix: name error
a3828162 May 23, 2024
f066b7c
fix: fix run error, remove unuse line
a3828162 May 26, 2024
e3f5dea
fix: consumer init error, url.Value init error
a3828162 May 27, 2024
bc28dff
fix: add mock app interface & fix unit test
ianchen0119 May 29, 2024
8f668bb
delete: remove legacy code
a3828162 May 29, 2024
76c53ec
fix: fix with PR comment
a3828162 Jun 4, 2024
6cf39c6
fix: fix PR comment & terminate problem
a3828162 Jun 21, 2024
2d138ca
fix: fix PR comment
a3828162 Jun 24, 2024
0465bd4
fix: fix log
a3828162 Jun 24, 2024
4e578fd
fix: fix wrong file name & fix implementation of processor follow sta…
a3828162 Jun 25, 2024
0001050
fix: fix PR comment
a3828162 Jun 25, 2024
d4025e0
fix: fix PR comment
a3828162 Jun 25, 2024
395e622
fix : fix PR comment
a3828162 Jun 26, 2024
972efcf
fix: fix PR comment
a3828162 Jun 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions internal/sbi/api_eventexposure.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,14 @@ func (s *Server) HandleCreateEeSubscription(c *gin.Context) {

ueIdentity := c.Params.ByName("ueIdentity")

createdEESubscription, problemDetails := s.Processor().CreateEeSubscriptionProcedure(ueIdentity, eesubscription)
if createdEESubscription != nil {
c.JSON(http.StatusCreated, createdEESubscription)
return
} else if problemDetails != nil {
c.JSON(int(problemDetails.Status), problemDetails)
return
} else {
problemDetails = &models.ProblemDetails{
Status: http.StatusInternalServerError,
Cause: "UNSPECIFIED_NF_FAILURE",
}
c.JSON(http.StatusInternalServerError, problemDetails)
return
}
s.Processor().CreateEeSubscriptionProcedure(c, ueIdentity, eesubscription)
}

func (s *Server) HandleDeleteEeSubscription(c *gin.Context) {
ueIdentity := c.Params.ByName("ueIdentity")
subscriptionID := c.Params.ByName("subscriptionId")

s.Processor().DeleteEeSubscriptionProcedure(ueIdentity, subscriptionID)
// only return 204 no content
c.Status(http.StatusNoContent)
s.Processor().DeleteEeSubscriptionProcedure(c, ueIdentity, subscriptionID)
}

func (s *Server) HandleUpdateEeSubscription(c *gin.Context) {
Expand Down Expand Up @@ -139,14 +123,7 @@ func (s *Server) HandleUpdateEeSubscription(c *gin.Context) {
logger.EeLog.Infoln("Handle Update EE subscription")
logger.EeLog.Warnln("Update EE Subscription is not implemented")

problemDetails := s.Processor().UpdateEeSubscriptionProcedure(ueIdentity, subscriptionID, patchList)
if problemDetails != nil {
c.JSON(int(problemDetails.Status), problemDetails)
return
} else {
c.Status(http.StatusNoContent)
return
}
s.Processor().UpdateEeSubscriptionProcedure(c, ueIdentity, subscriptionID, patchList)
}

func (s *Server) HandleIndex(c *gin.Context) {
Expand Down
11 changes: 1 addition & 10 deletions internal/sbi/api_httpcallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,5 @@ func (s *Server) HandleDataChangeNotificationToNF(c *gin.Context) {

logger.CallbackLog.Infof("Handle DataChangeNotificationToNF")

problemDetails := s.Processor().DataChangeNotificationProcedure(dataChangeNotify.NotifyItems, supi)

// step 4: process the return value from step 3
if problemDetails != nil {
c.JSON(int(problemDetails.Status), problemDetails)
return
} else {
c.Status(http.StatusNoContent)
return
}
s.Processor().DataChangeNotificationProcedure(c, dataChangeNotify.NotifyItems, supi)
}
11 changes: 1 addition & 10 deletions internal/sbi/api_parameterprovision.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,5 @@ func (s *Server) HandleUpdate(c *gin.Context) {
logger.PpLog.Infoln("Handle UpdateRequest")

// step 3: handle the message
problemDetails := s.Processor().UpdateProcedure(ppDataReq, gpsi)

// step 4: process the return value from step 3
if problemDetails != nil {
c.JSON(int(problemDetails.Status), problemDetails)
return
} else {
c.Status(http.StatusNoContent)
return
}
s.Processor().UpdateProcedure(c, ppDataReq, gpsi)
}
Loading
Loading