Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5200

Delete an outage through the REST API is not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.10.0
    • Fix Version/s: 1.10.1
    • Component/s: REST
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      This is related with the Customer Ticket 1080.

      When trying to DELETE an outage using new sched-outages REST API, the system responds with the following error:

      curl -v -X DELETE -u 'admin:admin' 'http:/localhost:8980/opennms/rest/sched-outages/r4'

      DELETE /opennms/rest/sched-outages/r4 HTTP/1.1
      Authorization: Basic YWRtaW46YWRwaXB0MQ==
      User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5
      OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
      Host: 127.0.0.1:8980
      Accept: /

      < HTTP/1.1 400 Bad Request
      < Content-Type: text/plain
      < Transfer-Encoding: chunked
      < Server: Jetty(7.5.1.v20110908)

      • Connection #0 to host 127.0.0.1 left intact
      • Closing connection #0
        Can't delete the scheduled outage r4 because, null

      Here's poll-outages.xml before:

      <?xml version="1.0" encoding="UTF-8"?>
      <outages xmlns="http://xmlns.opennms.org/xsd/config/poller/outages">
      <outage name="r4" type="specific">
      <time begins="23-Feb-2012 11:00:00" ends="24-Feb-2012 11:25:00"/>
      <node id="27"/>
      </outage>
      </outages>

      And after:

      <?xml version="1.0" encoding="UTF-8"?>
      <outages xmlns="http://xmlns.opennms.org/xsd/config/poller/outages">
      </outages>

      The code does two things when deleting an outage:

      • It removes the outage from poll-outages.xml
      • It updates the configuration of the services to remove the reference to the outage in question.

      The second part is failing ...

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: