Package org.opennms.web.rest.v1
Class ScheduledOutagesRestService
- java.lang.Object
-
- org.opennms.web.rest.v1.OnmsRestService
-
- org.opennms.web.rest.v1.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
- GET /sched-outages
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.web.rest.v1.OnmsRestService
OnmsRestService.ComparisonOperation
-
-
Field Summary
Fields Modifier and Type Field Description protected CollectdConfigFactory
m_collectdConfigFactory
protected EventProxy
m_eventProxy
-
Fields inherited from class org.opennms.web.rest.v1.OnmsRestService
DEFAULT_LIMIT
-
-
Constructor Summary
Constructors Constructor Description ScheduledOutagesRestService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
addOutageToCollector(java.lang.String outageName, java.lang.String packageName)
javax.ws.rs.core.Response
addOutageToNotifications(java.lang.String outageName)
javax.ws.rs.core.Response
addOutageToPoller(java.lang.String outageName, java.lang.String packageName)
javax.ws.rs.core.Response
addOutageToThresholder(java.lang.String outageName, java.lang.String packageName)
javax.ws.rs.core.Response
deleteOutage(java.lang.String outageName)
Outage
getOutage(java.lang.String outageName)
Outages
getOutages()
java.lang.String
isInterfaceInOutage(java.lang.String ipAddr)
java.lang.String
isInterfaceInOutage(java.lang.String outageName, java.lang.String ipAddr)
java.lang.String
isNodeInOutage(int nodeId)
java.lang.String
isNodeInOutage(java.lang.String outageName, java.lang.Integer nodeId)
javax.ws.rs.core.Response
removeOutageFromCollector(java.lang.String outageName, java.lang.String packageName)
javax.ws.rs.core.Response
removeOutageFromNotifications(java.lang.String outageName)
javax.ws.rs.core.Response
removeOutageFromPoller(java.lang.String outageName, java.lang.String packageName)
javax.ws.rs.core.Response
removeOutageFromThresholder(java.lang.String outageName, java.lang.String packageName)
javax.ws.rs.core.Response
saveOrUpdateOutage(javax.ws.rs.core.UriInfo uriInfo, Outage newOutage)
-
Methods inherited from class org.opennms.web.rest.v1.OnmsRestService
applyQueryFilters, applyQueryFilters, getBadRequestResponse, getBeanWrapperForClass, getException, getException, getNumericValue, getRedirectUri, readLock, readUnlock, removeParameter, removeParameter, setProperties, writeLock, writeUnlock
-
-
-
-
Field Detail
-
m_collectdConfigFactory
@Autowired protected CollectdConfigFactory m_collectdConfigFactory
-
m_eventProxy
@Autowired @Qualifier("eventProxy") protected EventProxy m_eventProxy
-
-
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)
-
-