Added RSM platform component routes and xApp Manager interface changes
[ric-plt/rtmgr.git] / pkg / nbi / nbi.go
index 2b9fa99..61c18c8 100644 (file)
@@ -70,13 +70,17 @@ func GetNbi(nbiName string) (Engine, error) {
 
 func CreateSubReq(restUrl string, restPort string) *appmgr_model.SubscriptionRequest {
        // TODO: parameterize function
-       subReq := appmgr_model.SubscriptionRequest{
-               TargetURL:  swag.String(restUrl + ":" + restPort + "/ric/v1/handles/xapp-handle/"),
-               EventType:  swag.String("all"),
+       subData := appmgr_model.SubscriptionData{
+               TargetURL: swag.String(restUrl + ":" + restPort + "/ric/v1/handles/xapp-handle/"),
+               EventType: appmgr_model.EventTypeAll,
                MaxRetries: swag.Int64(5),
                RetryTimer: swag.Int64(10),
        }
 
+       subReq := appmgr_model.SubscriptionRequest{
+               Data: &subData,
+       }
+
        return &subReq
 }