-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
O-RAN V3 Compliant Producer Rest Api: Event Subscription
Signed-off-by: Jack Ding <[email protected]>
- Loading branch information
Showing
26 changed files
with
3,429 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
// Terms Of Service: | ||
// | ||
// Schemes: http, https | ||
// Host: localhost:8080 | ||
// Host: localhost:8089 | ||
// basePath: /api/ocloudNotifications/v1 | ||
// Version: 1.0.0 | ||
// Contact: Aneesh Puttur<[email protected]> | ||
// | ||
|
@@ -186,6 +187,7 @@ func (s *Server) GetHostPath() *types.URI { | |
|
||
// Start will start res routes service | ||
func (s *Server) Start() { | ||
log.Infof("DZK starting V1 REST server at port %d", s.port) | ||
if s.status == started || s.status == starting { | ||
log.Infof("Server is already running at port %d", s.port) | ||
return | ||
|
@@ -196,7 +198,7 @@ func (s *Server) Start() { | |
api := r.PathPrefix(s.apiPath).Subrouter() | ||
|
||
// createSubscription create subscription and send it to a channel that is shared by middleware to process | ||
// swagger:operation POST /subscriptions/ subscription createSubscription | ||
// swagger:operation POST /subscriptions subscription createSubscription | ||
// --- | ||
// summary: Creates a new subscription. | ||
// description: If subscription creation is success(or if already exists), subscription will be returned with Created (201). | ||
|
@@ -237,6 +239,17 @@ func (s *Server) Start() { | |
404 Subscription resources are not available (not created). | ||
*/ | ||
api.HandleFunc("/subscriptions", s.getSubscriptions).Methods(http.MethodGet) | ||
//publishers create publisher and send it to a channel that is shared by middleware to process | ||
// swagger:operation GET /publishers/ publishers getPublishers | ||
// --- | ||
// summary: Get publishers. | ||
// description: If publisher creation is success(or if already exists), publisher will be returned with Created (201). | ||
// parameters: | ||
// responses: | ||
// "200": | ||
// "$ref": "#/responses/publishers" | ||
// "404": | ||
// "$ref": "#/responses/notFound" | ||
api.HandleFunc("/publishers", s.getPublishers).Methods(http.MethodGet) | ||
// 200 and 404 | ||
api.HandleFunc("/subscriptions/{subscriptionid}", s.getSubscriptionByID).Methods(http.MethodGet) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.