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()
      • getOutage

        public Outage getOutage​(java.lang.String outageName)
                         throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • 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​(java.lang.String outageName)
      • addOutageToCollector

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

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

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

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

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

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

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

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

        public java.lang.String isNodeInOutage​(java.lang.String outageName,
                                               java.lang.Integer nodeId)
      • isNodeInOutage

        public java.lang.String isNodeInOutage​(int nodeId)
      • isInterfaceInOutage

        public java.lang.String isInterfaceInOutage​(java.lang.String outageName,
                                                    java.lang.String ipAddr)
      • isInterfaceInOutage

        public java.lang.String isInterfaceInOutage​(java.lang.String ipAddr)