- transport := httptransport.New(appmgrUrl.Hostname()+":"+appmgrUrl.Port(), "/ric/v1", []string{"http"})
- client := apiclient.New(transport, strfmt.Default)
- addSubParams := operations.NewAddSubscriptionParamsWithTimeout(10 * time.Second)
- // create sub req with rest url and port
- subReq := CreateSubReq(string(nbiifUrl.Scheme+"://"+nbiifUrl.Hostname()), nbiifUrl.Port())
- resp, postErr := client.Operations.AddSubscription(addSubParams.WithSubscriptionRequest(subReq))
- if postErr != nil {
- rtmgr.Logger.Error("POST unsuccessful:"+postErr.Error())
- return postErr
- } else {
- // TODO: use the received ID
- rtmgr.Logger.Info("POST received: "+string(resp.Payload.ID))
- return nil
- }
+ transport := httptransport.New(appmgrUrl.Hostname()+":"+appmgrUrl.Port(), "/ric/v1", []string{"http"})
+ client := apiclient.New(transport, strfmt.Default)
+ addSubParams := operations.NewAddSubscriptionParamsWithTimeout(10 * time.Second)
+ // create sub req with rest url and port
+ subReq := CreateSubReq(nbiifUrl.Scheme+"://"+nbiifUrl.Hostname(), nbiifUrl.Port())
+ resp, postErr := client.Operations.AddSubscription(addSubParams.WithSubscriptionRequest(subReq))
+ if postErr != nil {
+ xapp.Logger.Error("POST unsuccessful:" + postErr.Error())
+ return postErr
+ } else {
+ // TODO: use the received ID
+ xapp.Logger.Info("POST received: " + string(resp.Payload.ID))
+ return nil
+ }