Alarm states

The class IltAlarmObjectStateSAXInfo is the XML serialization class that allows you to read and write alarm states in the XML format.
The following table describes the XML elements that can be used.
XML elements in the Alarm state system
XML Element
Attributes
Possible Values
Description
<alarms>
   
Delimits alarm state definition
 
notReporting
true or false
This is an optional attribute. It defines whether the managed object is currently not reporting its alarm state.
 
lossOfConnectivity
true or false
This is an optional attribute. It defines whether the managed object is currently without connectivity.
<new>
   
Structural element that lets you specify new alarms for an object
 
severity
Raw.Critical , Raw.Major , Raw.Minor , Raw.Warning or Raw.Unknown
Impact.CriticalHigh , Impact.CriticalLow , Impact.MajorHigh, Impact.MajorLow , Impact.MinorHigh , Impact.MinorLow, Impact.WarningHigh, Impact.WarningLow or Impact.Unknown
This attribute is mandatory. It defines the severity of the new alarm to be set.
 
operation
set , add , remove
This attribute is optional. It specifies whether the alarm should be set, added to or removed from the object state. The default value is set indicating that the alarm will be set in the object state. This attribute is used within an <updateState> element.
<ack>
   
Structural element that lets you specify acknowledged alarms for an object
 
severity
Raw.Critical , Raw.Major , Raw.Minor , Raw.Warning or Raw.Unknown
Impact.CriticalHigh , Impact.CriticalLow , Impact.MajorHigh, Impact.MajorLow , Impact.MinorHigh , Impact.MinorLow, Impact.WarningHigh, Impact.WarningLow or Impact.Unknown
This attribute is mandatory. It defines the severity of the acknowledged alarm to be set.
 
operation
set , add , remove
This attribute is optional. It specifies whether the alarm should be set, added to or removed from the object state. The default value is set indicating that the alarm will be set in the object state. This attribute is used within an <updateState> element.

How to add a network element and a link with alarms defined in XML

<addObject id="NE2">
  <class>ilog.tgo.model.IltNetworkElement</class>
  <attribute name="name">NE2</attribute>
  <attribute name="type">Mainframe</attribute>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
    <x>229</x>  <y>126</y>
  </attribute>
  <attribute name="objectState"
    javaClass="ilog.tgo.model.IltBellcoreObjectState">
    <state>EnabledActive</state>
    <alarms>
      <new severity="Raw.Critical">5</new>
      <ack severity="Impact.WarningLow">2</ack>
    </alarms>
  </attribute>
</addObject>

<addObject id="Link2">
  <class>ilog.tgo.model.IltLink</class>
  <link>  <from>PolyGroup</from>    <to>NE3</to>  </link>
  <attribute name="name">Link2</attribute>
  <attribute name="media">Fiber</attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltSONETObjectState">
    <state>Active</state>
    <alarms notReporting="true" />
  </attribute>
</addObject>

How to set alarms to an existing object using XML

The following example shows how to set alarms to an object that already exists in the data source. You can achieve this by using the XML tag <updateObject> to modify the attribute objectState :
<updateObject id="NE1">
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <operational>Disabled</operational>
      <usage>Idle</usage>
      <administrative>Unlocked</administrative>
    </state>
    <alarms>
      <new severity="Raw.Critical">2</new>
      <new severity="Raw.Warning">1</new>
      <ack severity="Raw.Minor">3</ack>
    </alarms>
  </attribute>
</updateObject>

How to update alarms incrementally using XML

<updateObject id="NE1">
  <updateState>
    <alarms>
      <new severity="Raw.Critical" operation="remove">1</new>
      <new severity="Raw.Warning" operation="add">1</new>
      <ack severity="Raw.Critical" operation="add">1</ack>
      <ack severity="Raw.Minor" operation="remove">3</ack>
    </alarms>
  </updateState>
</updateObject>