Class ScheduledOutagesRestService


  • @Component("scheduledOutagesRestService")
    public class ScheduledOutagesRestService
    extends OnmsRestService

    ScheduledOutagesRestService class.

    • GET /sched-outages
      to get a list of configured scheduled outages.
    • POST /sched-outages
      to add a new outage (or update an existing one).
    • GET /sched-outages/{outageName}
      to get the details of a specific outage.
    • DELETE /sched-outages/{outageName}
      to delete a specific outage.
    • PUT /sched-outages/{outageName}/collectd/{package}
      to add a specific outage to a collectd's package.
    • PUT /sched-outages/{outageName}/pollerd/{package}
      to add a specific outage to a pollerd's package.
    • PUT /sched-outages/{outageName}/threshd/{package}
      to add a specific outage to a threshd's package.
    • PUT /sched-outages/{outageName}/notifd
      to add a specific outage to the notifications.
    • DELETE /sched-outages/{outageName}/collectd/{package}
      to remove a specific outage from a collectd's package.
    • DELETE /sched-outages/{outageName}/pollerd/{package}
      to remove a specific outage from a pollerd's package.
    • DELETE /sched-outages/{outageName}/threshd/{package}
      to remove a specific outage from a threshd's package.
    • DELETE /sched-outages/{outageName}/notifd
      to remove a specific outage from the notifications.

    Node and Interface status (the requests return true or false):

    • GET /sched-outages/{outageName}/nodeInOutage/{nodeId}
      to check if a node (with a specific nodeId) is currently on outage for a specific scheduled outage calendar.
    • GET /sched-outages/{outageName}/interfaceInOutage/{ipAddr}
      to check if an interface (with a specific IP address) is currently on outage for a specific scheduled outage calendar.
    • GET /sched-outages/nodeInOutage/{nodeId}
      to check if a node (with a specific nodeId) is currently in outage.
    • GET /sched-outages/interfaceInOutage/{ipAddr}
      to check if an interface (with a specific IP address) is currently on outage.
    Author:
    Alejandro Galue
    • Field Detail

      • m_eventProxy

        @Autowired
        @Qualifier("eventProxy")
        protected EventProxy m_eventProxy
    • Constructor Detail

      • ScheduledOutagesRestService

        public ScheduledOutagesRestService()
    • Method Detail

      • getOutages

        public Outages getOutages()
      • saveOrUpdateOutage

        public javax.ws.rs.core.Response saveOrUpdateOutage​(@Context
                                                            javax.ws.rs.core.UriInfo uriInfo,
                                                            Outage newOutage)
      • deleteOutage

        public javax.ws.rs.core.Response deleteOutage​(String outageName)
      • addOutageToCollector

        public javax.ws.rs.core.Response addOutageToCollector​(String outageName,
                                                              String packageName)
      • removeOutageFromCollector

        public javax.ws.rs.core.Response removeOutageFromCollector​(String outageName,
                                                                   String packageName)
      • addOutageToPoller

        public javax.ws.rs.core.Response addOutageToPoller​(String outageName,
                                                           String packageName)
      • removeOutageFromPoller

        public javax.ws.rs.core.Response removeOutageFromPoller​(String outageName,
                                                                String packageName)
      • addOutageToThresholder

        public javax.ws.rs.core.Response addOutageToThresholder​(String outageName,
                                                                String packageName)
      • removeOutageFromThresholder

        public javax.ws.rs.core.Response removeOutageFromThresholder​(String outageName,
                                                                     String packageName)
      • addOutageToNotifications

        public javax.ws.rs.core.Response addOutageToNotifications​(String outageName)
      • removeOutageFromNotifications

        public javax.ws.rs.core.Response removeOutageFromNotifications​(String outageName)
      • isNodeInOutage

        public String isNodeInOutage​(int nodeId)
      • isInterfaceInOutage

        public String isInterfaceInOutage​(String outageName,
                                          String ipAddr)
      • isInterfaceInOutage

        public String isInterfaceInOutage​(String ipAddr)