com.alarmpoint.integrations.nnmi
Class NetworkNodeManagerScriptObject

java.lang.Object
  extended by com.alarmpoint.integrations.nnmi.NetworkNodeManagerScriptObject

public class NetworkNodeManagerScriptObject
extends java.lang.Object


Constructor Summary
NetworkNodeManagerScriptObject()
           
NetworkNodeManagerScriptObject(java.lang.String url, java.lang.String user, java.lang.String password)
           
 
Method Summary
 boolean acknowledgeIncident(java.lang.String nnmId, java.lang.String targetName)
           
 boolean annotateIncident(java.lang.String nnmId, java.lang.String message)
           
 boolean changePriority(java.lang.String nnmId, java.lang.String priority)
          Change the priority of the incident in NNM to a new value.
 boolean closeIncident(java.lang.String nnmId)
           
 java.util.Map<java.lang.String,java.lang.String> getIncidentMap(java.lang.String searchName, java.lang.String searchValue)
          Retrieves an incident using a web service call, and creates a map of all its fields and values.
 java.lang.String getIncidentNotesByNNMID(java.lang.String nnmId)
          Retrieves the notes on an incident by matching the NNM ID field
 java.lang.String getIncidentNotesByUUID(java.lang.String uuid)
          Retrieves the notes on an incident by matching the UUID field
 java.lang.String getNNMIncidentId(java.lang.String uuid)
          NNM does not give us direct access to the ID it uses for incidents.
 java.util.Map<java.lang.String,java.lang.String> getNodeMap(java.lang.String searchName, java.lang.String searchValue)
          Returns a map of all the field names and their values for a given node
 java.util.Set<java.lang.String> getNodeNames()
          Fetches from NNM using a webservice call a list of the nodes, and extracts their names.
 boolean initializeClient(java.lang.String url, java.lang.String user, java.lang.String password)
          Initialize the script object with the web service access data.
static void main(java.lang.String[] args)
           
 boolean ownIncident(java.lang.String nnmId, java.lang.String targetName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkNodeManagerScriptObject

public NetworkNodeManagerScriptObject()

NetworkNodeManagerScriptObject

public NetworkNodeManagerScriptObject(java.lang.String url,
                                      java.lang.String user,
                                      java.lang.String password)
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

initializeClient

public boolean initializeClient(java.lang.String url,
                                java.lang.String user,
                                java.lang.String password)
Initialize the script object with the web service access data.

Parameters:
url - the URL of the web service
user - the user to use for logging in to the web service
password - the password to use for logging in to the web service
Returns:
true if the script object was initialized properly, false otherwise

getNNMIncidentId

public java.lang.String getNNMIncidentId(java.lang.String uuid)

NNM does not give us direct access to the ID it uses for incidents. Instead, we have to retrieve the incident based on its UUID and pull the ID from the returned values.

SOAP Request:

 
     
         
             uuid
             =
             ${uuid}
         
     
 
 

SOAP Response:

 
     
         
             Administrator
             com.hp.nms.incident.category.Fault
             0
             com.hp.nms.incident.family.Address
             2007-11-09T15:49:52.671-08:00
             122406567936
             2007-11-09T15:49:52.671-08:00
             com.hp.nms.incident.lifecycle.Closed
             AddressNotResponding
             Root Cause
             Tested
             Management Software
             2007-11-09T15:49:52.484-08:00
             com.hp.nms.incident.priority.None
             false
             CRITICAL
             192.168.168.101
             LJ_PRINTER_VICT
             accc3982-b7bc-4193-8bee-18cbd6ed2805
             class com.hp.ov.nms.model.layer3.IPv4Address
             4aec3406-3d4d-4433-a5c1-094493809867
             34c1562c-e464-422e-9677-aae98f14d5f8
         
     
 
 

Parameters:
uuid - The UUID of the NNMi incident, as passed to AlarmPoint
Returns:
a string containing the actual ID that NNMi uses for the incident

annotateIncident

public boolean annotateIncident(java.lang.String nnmId,
                                java.lang.String message)

acknowledgeIncident

public boolean acknowledgeIncident(java.lang.String nnmId,
                                   java.lang.String targetName)

ownIncident

public boolean ownIncident(java.lang.String nnmId,
                           java.lang.String targetName)

closeIncident

public boolean closeIncident(java.lang.String nnmId)

changePriority

public boolean changePriority(java.lang.String nnmId,
                              java.lang.String priority)

Change the priority of the incident in NNM to a new value.

SOAP Request:

 
     17209581
     com.hp.nms.incident.priority.Top
 

 

Parameters:
nnmId - the internal id used by NNM to identify this incident
priority - the new priority this incident should have
Returns:
true if the change was successful, false otherwise

getIncidentNotesByUUID

public java.lang.String getIncidentNotesByUUID(java.lang.String uuid)
Retrieves the notes on an incident by matching the UUID field

Parameters:
uuid - the incident id used in AlarmPoint
Returns:
a string representing the notes on this incident, or empty string if not found

getIncidentNotesByNNMID

public java.lang.String getIncidentNotesByNNMID(java.lang.String nnmId)
Retrieves the notes on an incident by matching the NNM ID field

Parameters:
nnmId - the internal NNM id to use
Returns:
a string representing the notes on this incident, or empty string if not found

getNodeNames

public java.util.Set<java.lang.String> getNodeNames()
Fetches from NNM using a webservice call a list of the nodes, and extracts their names.

Returns:
a sorted list of the names of the nodes

getNodeMap

public java.util.Map<java.lang.String,java.lang.String> getNodeMap(java.lang.String searchName,
                                                                   java.lang.String searchValue)
Returns a map of all the field names and their values for a given node

Parameters:
searchName - the field to use to select this node
searchValue - the value that field should have
Returns:
a map of all the fields of the selected node

getIncidentMap

public java.util.Map<java.lang.String,java.lang.String> getIncidentMap(java.lang.String searchName,
                                                                       java.lang.String searchValue)
Retrieves an incident using a web service call, and creates a map of all its fields and values. The incident is the first one found that has a field with the name of the searchName and a value of the searchValue.

Parameters:
searchName - a field in the incident which must be matched
searchValue - the value that the field must match
Returns:
a map of all the fields in the incident, or an empty match if none found