+ log.Println("Sending alarm: ", fmt.Sprintf("%s", payload))
+
+ if r.rmrCtx == nil || !r.rmrReady {
+ url := fmt.Sprintf("%s/%s", r.managerUrl, "ric/v1/alarms")
+ resp, err := http.Post(url, "application/json", bytes.NewReader(payload))
+ if err != nil || resp == nil {
+ return fmt.Errorf("Unable to send alarm: %v", err)
+ }
+ log.Printf("Alarm posted to %s [status=%d]", url, resp.StatusCode)
+ return nil
+ }