skip to main content
TGO > Programmers documentation > Business objects and data sources > States > Defining states in XML
 
Defining states in XML
Explains how to define object states in the XML format and load them in a data source.
*Overview
*Explains the use of a data source to load objects with states defined in XML.
*OSI states
*Describes the XML elements that you can use in the OSI state system.
*Bellcore states
*Describes the XML elements that you can use in the Bellcore state system.
*SNMP states
*Describes the XML elements that you can use in the SNMP state system.
*Miscellaneous states
*Describes the XML elements that you can use in the Miscellaneous state system.
*Performance states
*Describes the XML elements that you can use to read and write Performance states.
*SAN states
*Describes the XML elements that you can use in the SAN state system.
*SONET states
*Describes the XML elements that you can use in the SONET state system.
*BiSONET states
*Describes the XML elements that you can use in the BiSONET state system.
*Alarm states
*Describes the XML elements that you can use in the Alarm state system.
*Trap states
*Describes the XML elements that you can use in the Trap state system.
Overview
To load objects with states defined in the XML format, all you have to do is create a data source using the data source default implementation defined by IltDefaultDataSource and pass the XML file containing the object description to the parse method of the data source, as shown below:
 
dataSource = new IltDefaultDataSource();
dataSource.parse("OSIXMLFile.xml");
To define states when you add predefined business objects to the data source, set the value of attribute objectState to one of the JViews TGO object states:
*IltOSIObjectState
*IltBellcoreObjectState
*IltSNMPObjectState
*IltSONETObjectState
*IltBiSONETObjectState
*IltAlarmObjectState
*IltTrapObjectState
How to create a predefined business object with states and alarms using XML
The following example shows an XML extract that you can load in a data source to create a rectangular group. States and alarms can be set in this object by declaring the value of attribute objectState when adding the business object:
 
<addObject id="RectGroup">
  <class>ilog.tgo.model.IltRectGroup</class>
  <attribute name="name">RectGroup</attribute>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpRect">
     <x>489</x> <y>356</y> <width>80</width> <height>60</height>
  </attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <administrative>Locked</administrative>
      <operational>Enabled</operational>
      <usage>Idle</usage>
    </state>
    <availability>PowerOff</availability>
    <control>ReservedForTest</control>
    <alarms>
      <new severity="Raw.Critical">5</new>
      <ack severity="Raw.Warning">12</ack>
    </alarms>
  </attribute>
</addObject>
How to set states and alarms to an existing object using XML
The following example shows how to set the states and alarms of 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="RectGroup">
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <administrative>ShuttingDown</administrative>
      <operational>Enabled</operational>
      <usage>Busy</usage>
    </state>
    <availability>PowerOff</availability>
    <misc>HighTemperatureWarning</misc>
    <alarms>
      <new severity="Raw.Critical">2</new>
    </alarms>
  </attribute>
</updateObject>
The <attribute> tag is used to modify the value of an attribute in a business object. When you use it to modify the value of attribute objectState, the old object state definition is completely replaced by the new one.
JViews TGO also provides support to update the object state of a predefined business object to allow you to perform incremental changes. This support is made available through the tag <updateState> :
Within an <updateState> block, you can modify the states, alarms and traps present in the business object state, adding and removing states, adding, removing and setting alarms and traps.
How to update states and alarms incrementally using XML
 
<updateObject id="NE1">
  <updateState>
    <state>
      <operational>Enabled</operational>
      <usage>Active</usage>
    </state>
    <procedural operation="remove">Initializing</procedural>
    <misc operation="remove">DoorAjar</misc>
    <alarms>
      <new severity="Raw.Critical" operation="set">2</new>
      <new severity="Raw.Major" operation="add">1</new>
      <ack severity="Raw.Warning" operation="remove">5</ack>
    </alarms>
  </updateState>
</updateObject>
The tables in this section list, for each state system, the XML elements that you can use to describe states in the XML format.
OSI states
The class IltOSIObjectStateSAXInfo is the XML serialization class that allows you to read and write OSI object states in the XML format.
The following table describes the XML elements that can be used.
XML elements in the OSI state system 
XML Element
Attributes
Possible Values
Description
<administrative>
 
Locked, Unlocked, ShuttingDown
OSI Administrative state
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<operational>
 
Enabled, Disabled
OSI Operational state
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<usage>
 
Idle, Active, Busy
OSI Usage state
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<procedural>
 
InitializationRequired, Initializing, Reporting, Terminating
OSI Procedural status
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<availability>
 
Degraded, Dependency, Failed, InTest, LogFull, NotInstalled, OffDuty, OffLine, PowerOff
OSI Availability status
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<control>
 
PartOfServicesLocked, ReservedForTest, SubjectToTest, Suspended
OSI Control status
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<standby>
 
InStandby
OSI Stand-by status
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<repair>
 
UnderRepair
OSI Repair status
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
How to add a network element with OSI states defined in XML
 
<addObject id="NE1">
  <class>ilog.tgo.model.IltNetworkElement</class>
  <attribute name="name">NE1</attribute>
  <attribute name="family">OC12</attribute>
  <attribute name="type">MD</attribute>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
    <x>68</x> <y>61</y>
  </attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <administrative>ShuttingDown</administrative>
      <operational>Enabled</operational>
      <usage>Active</usage>
    </state>
    <procedural>Reporting</procedural>
    <repair>UnderRepair</repair>
  </attribute>
</addObject>
How to set OSI states to an existing object using XML
The following example shows how to set OSI states 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="RectGroup">
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <administrative>ShuttingDown</administrative>
      <operational>Enabled</operational>
      <usage>Busy</usage>
    </state>
    <availability>PowerOff</availability>
    <procedural>Terminating</procedural>
  </attribute>
</updateObject>
How to update OSI states incrementally using XML
 
<updateObject id="RectGroup">
  <updateState>
    <state>
      <operational>Enabled</operational>
      <usage>Active</usage>
    </state>
    <procedural operation="remove">Initializing</procedural>
    <availability>InTest</availability>
  </updateState>
</updateObject>
Bellcore states
The class IltBellcoreObjectStateSAXInfo is the XML serialization class that allows you to read and write Bellcore object states in the XML format.
The following table describes the XML elements that can be used.
XML elements in the Bellcore state system 
XML Element
Attributes
Possible Values
Description
<state>
None
DisabledIdle, EnabledIdle, EnabledActive
BellCore primary state
<secState>
 
Blocked, Busy, ColdStandby, Combined, Diagnostic, Disabled, Disconnected, Exercise, FacilityFailure, FarEndProcessorOutage, Fault, Forced, HotStandby, Idle, IdleReceive, IdleTransmit, InhibitInProgress, LockedOut, LoopbackTest, Maintenance, MaintenanceLimited, MismatchOfEquipmen, Monitor, Overflow, PerformanceMonitorInhibited, Power, PrePostService, ProtectionReleaseInhibited, ProtectionSwitchExercise, ProtectionSwitchInhibited, Protocol, Rearrangement, RedLined, SoftwareDownloading, SoftwareTransferInhibited, SoftwareTransferOnly, SoftwareUploading, StandbyInhibited, StandbySwitched, SupportedEntityAbsent, SupportedEntityExists, SupportingEntityOutage, SupportingEntitySwapped, SuspendBoth, SuspendOrigination, SuspendTermination, SwitchedSystemActivity, TerminatedBoth, TerminatedFrom, TerminatedTo, Test, TestFailure,Transferred, Unassigned, Unequipped, Working
BellCore secondary states
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
How to add a network element with Bellcore states defined in XML
 
<addObject id="NE3">
  <class>ilog.tgo.model.IltNetworkElement</class>
  <attribute name="name">NE3</attribute>
  <attribute name="type">Router</attribute>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
    <x>151</x> <y>512</y>
  </attribute>
  <attribute name="objectState"
         javaClass="ilog.tgo.model.IltBellcoreObjectState">
    <state>EnabledActive</state>
    <secState>TestFailure</secState>
  </attribute>
</addObject>
How to set Bellcore states to an existing object using XML
The following example shows how to set Bellcore states 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.IltBellcoreObjectState">
    <state>EnabledActive</state>
    <secState>Blocked</secState>
    <secState>Busy</secState>
  </attribute>
</updateObject>
How to update Bellcore states incrementally using XML
 
<updateObject id="NE1">
  <updateState>
    <state>EnabledIdle</state>
    <secState operation="remove">Blocked</secState>
    <secState operation="remove">Busy</secState>
    <secState>HotStandby</secState>
  </updateState>
</updateObject>
SNMP states
The class IltSNMPObjectStateSAXInfo is the XML serialization class that allows you to read and write SNMP object states in the XML format.
The following table describes the XML elements that can be used.
XML elements in the SNMP state system 
XML Element
Attributes
Possible Values
Description
<state>
None
Down, Failed, Shutdown, Testing, Up
SNMP primary state
<interface>
state
InOctets, InUcastPkts, InDiscards, InErrors, InUnknownProtos, OutOctets,OutUcastPkts, OutNUcastPkts, OutDiscards, OutErrors
This attribute is mandatory. It defines the secondary state that will be set.
 
isArray
true or false
This attribute is optional. It defines whether the state value is an array or not.
 
value
java.lang.Float
This attribute is optional. When describing array values, each value in the array is enclosed in a <value> element.
 
javaClass
 
This attribute is optional. It defines the value of the state. The default value is java.lang.Float.
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<ip>
state
InReceives, InHdrErrors,InAddrError, ForwDatagrams, InUnknownProtos, InDiscards, InDelivers, OutRequests, OutDiscards, OutNoRoutes, Forwarding
See <interface>
 
isArray
true or false
See <interface>
 
value
java.lang.Float
See <interface>
 
javaClass
 
See <interface>
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<icmp>
state
InMsgs, InErrors, OutMsgs, OutErrors
See <interface>
 
isArray
true or false
See <interface>
 
value
java.lang.Float
See <interface>
 
javaClass
 
See <interface>
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<tcp>
state
CurrentEstablished, InSegs, OutSegs, InErrors, RetranSegs
See <interface>
 
isArray
true or false
See <interface>
 
value
java.lang.Float
See <interface>
 
javaClass
 
See <interface>
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<udp>
state
InDatagrams, InErrors, OutDatagrams
See <interface>
 
isArray
true or false
See <interface>
 
value
java.lang.Float
See <interface>
 
javaClass
 
See <interface>
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<egp>
state
InMsgs, InErrors, OutMsgs, OutErrors
See <interface>
 
isArray
true or false
See <interface>
 
value
java.lang.Float
See <interface>
 
javaClass
 
See <interface>
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<snmp>
state
InPkts, OutPkts
See <interface>
 
isArray
true or false
See <interface>
 
value
java.lang.Float
See <interface>
 
javaClass
 
See <interface>
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
<system>
None
 
Defines the system information for the object. It can be used to define the system attributes, such as location, description, contact.
How to add a group with SNMP states defined in XML
 
<addObject id="RectGroup">
  <class>ilog.tgo.model.IltRectGroup</class>
  <attribute name="name">RectGroup</attribute>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpRect">
     <x>489</x> <y>356</y> <width>80</width> <height>60</height>
  </attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltSNMPObjectState">
    <state>Down</state>
    <ip state="InDiscards">50</ip>
    <ip state="Forwarding" javaClass="java.lang.Boolean">true</ip>
    <interface state="InOctets" isArray="true" javaClass="java.lang.Integer">
      <value>50</value>
      <value>70</value>
      <value>58</value>
      <value>60</value>
      <value>58</value>
      <value>62</value>
    </interface>
  </attribute>
</addObject>
How to set SNMP states to an existing object using XML
The following example shows how to set SNMP states 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.IltSNMPObjectState">
    <state>Up</state>
    <interface state="InOctets">100</interface>
    <ip state="InDiscards">50</ip>
    <system>
      <attribute name="location">San Francisco</attribute>
      <attribute name="description">Test machine</attribute>
    </system>
  </attribute>
</updateObject>
How to update SNMP states incrementally using XML
 
<updateObject id="NE1">
  <updateState>
    <state>Up</state>
    <interface state="InOctets">80</interface>
    <ip state="InDiscards" operation="remove"/>
    <system>
      <attribute name="location">Los Angeles</attribute>
      <attribute name="description" null="true"/>
    </system>
  </updateState>
</updateObject>
Miscellaneous states
The class IltObjectStateSAXInfo is the XML serialization class that allows you to read and write miscellaneous states in the XML format.
The following table describes the XML elements that can be used.
XML elements in the Miscellaneous state system 
XML Element
Attributes
Possible Values
Description
<misc>
 
SoftwareUpload, SoftwareDownload, SoftwareLimitExceeded, MismatchedCard, UnknownCard, DoorAjar, LowTemperatureWarning, HighTemperatureWarning, TestPassed, TestFailed, ThresholdCrossing, PlanToRemove, UnderRepair
Miscellaneous state
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
How to add a network element with Miscellaneous states defined in XML
 
<addObject id="NE1">
  <class>ilog.tgo.model.IltNetworkElement</class>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
    <x>68</x> <y>61</y>
  </attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <administrative>ShuttingDown</administrative>
      <operational>Enabled</operational>
      <usage>Active</usage>
    </state>
    <misc>LowTemperatureWarning</misc>
    <misc>DoorAjar</misc>
  </attribute>
</addObject>
How to set Miscellaneous states to an existing object using XML
The following example shows how to set miscellaneous states 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.IltBellcoreObjectState">
    <state>EnabledActive</state>
    <misc>DoorAjar</misc>
  </attribute>
</updateObject>
How to update Miscellaneous states incrementally using XML
 
<updateObject id="NE1">
  <updateState>
    <misc operation="remove">DoorAjar</misc>
    <misc>LowTemperatureWarning</misc>
  </updateState>
</updateObject>
Performance states
The class IltObjectStateSAXInfo is the XML serialization class that allows you to read and write Performance states in the XML format.
The following table describes the XML elements that can be used.
XML elements in the Performance state system 
XML Element
Attributes
Possible Values
Description
<performance>
state
Input, In, In_Kb, In_Mb, In_Gb, Output, Out, Out_Kb, Out_Mb, Out_Gb, Print, Generic, Power, Temperature, Bandwidth
SAN state
 
isArray
true or false
This attribute is optional. It defines whether the state value is an array or not.
 
value
java.lang.Float
This attribute is optional. When describing array values, each value in the array is enclosed in an element.
 
javaClass
 
This attribute is optional. It defines the value of the state. The default value is java.lang.Float.
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
How to add a network element with Performance states defined in XML
 
<addObject id="NE1">
  <class>ilog.tgo.model.IltNetworkElement</class>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
    <x>68</x> <y>61</y>
  </attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <administrative>ShuttingDown</administrative>
      <operational>Enabled</operational>
      <usage>Active</usage>
    </state>
    <performance state="In_Kb" isArray="true" javaClass="java.lang.Integer">
      <value>50</value>
      <value>70</value>
      <value>58</value>
      <value>60</value>
      <value>58</value>
      <value>62</value>
      <value>54</value>
      <value>24</value>
      <value>56</value>
      <value>85</value>
      <value>58</value>
      <value>65</value>
      <value>12</value>
      <value>35</value>
    </performance>
    <performance state="Input">200</performance>
  </attribute>
</addObject>
How to set Performance states to an existing object using XML
The following example shows how to set Performance states 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.IltBellcoreObjectState">
    <state>EnabledActive</state>
    <performance state="Input">200</performance>
  </attribute>
</updateObject>
How to update Performance states incrementally using XML
 
<updateObject id="NE1">
  <updateState>
    <performance state="Input" operation="remove"/>
    <performance state="Bandwidth">50</performance>
  </updateState>
</updateObject>
SAN states
The class IltObjectStateSAXInfo is the XML serialization class that allows you to read and write SAN states in the XML format.
The following table describes the XML elements that can be used.
XML elements in the SAN state system 
XML Element
Attributes
Possible Values
Description
<SAN>
state
IO, Allocated, Available, BackRecovery, Bandwidth, Capacity, CapacityUtilization, CPU, DataAccessDelay, Fragmentation, LostData, Usage
SAN state
 
isArray
true or false
This attribute is optional. It defines whether the state value is an array or not.
 
value
java.lang.Float
This attribute is optional. When describing array values, each value in the array is enclosed in an element.
 
javaClass
 
This attribute is optional. It defines the value of the state. The default value is java.lang.Float.
 
operation
add, remove
This attribute is optional. It specifies whether the state should be added to/removed from the object state. The default value is add indicating that the state will be set in the object state. This attribute is used within an <updateState> element.
How to add a network element with SAN states defined in XML
 
<addObject id="NE1">
  <class>ilog.tgo.model.IltNetworkElement</class>
  <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
    <x>68</x> <y>61</y>
  </attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltOSIObjectState">
    <state>
      <administrative>ShuttingDown</administrative>
      <operational>Enabled</operational>
      <usage>Active</usage>
    </state>
    <SAN state="Bandwidth" isArray="true" javaClass="java.lang.Integer">
      <value>50</value>
      <value>70</value>
      <value>30</value>
    </SAN>
  </attribute>
</addObject>
How to set SAN states to an existing object using XML
The following example shows how to set SAN states 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.IltBellcoreObjectState">
    <state>EnabledActive</state>
    <SAN state="Allocated">88</SAN>
  </attribute>
</updateObject>
How to update SAN states incrementally using XML
 
<updateObject id="NE1">
  <updateState>
    <SAN state="Allocated" operation="remove"/>
    <SAN state="Fragmentation">75</SAN>
  </updateState>
</updateObject>
SONET states
The class IltSONETObjectStateSAXInfo is the XML serialization class that allows you to read and write SONET states in the XML format.
The following table describes the XML elements that can be used:
XML elements in the SONET state system 
XML Element
Attributes
Possible Values
Description
<state>
None
Disabled, Inactive, Active, ActiveProtecting, TroubledProtected, TroubledUnprotected
SONET primary state
<protection>
 
Exercisor, ForcedSwitch, Locked, ManualSwitch, Pending, WaitToRestore
SONET protection state
 
from
true or false
This is an optional attribute. It defines whether the protection is set in the “from” end point of the link. By default, the value is true.
 
to
true or false
This is an optional attribute. It defines whether the protection is set in the “to” end point of the link. By default, the value is true.
How to add a link with a SONET state defined in XML
 
<addObject id="Link1">
  <class>ilog.tgo.model.IltLink</class>
  <link> <from>PolyGroup</from> <to>NE3</to> </link>
  <attribute name="name">Link1</attribute>
  <attribute name="media">Fiber</attribute>
  <attribute name="objectState" javaClass="ilog.tgo.model.IltSONETObjectState">
    <state>Active</state>
    <protection from="true">Exercisor</protection>
    <protection to="true">Locked</protection>
  </attribute>
</addObject>
How to set SONET states to an existing object using XML
The following example shows how to set SONET states 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="Link1">
  <attribute name="objectState" javaClass="ilog.tgo.model.IltSONETObjectState">
    <state>Active</state>
    <protection from="true" to="false">Exercisor</protection>
    <protection>Locked</protection>
  </attribute>
</updateObject>
How to update SONET states incrementally using XML
 
<updateObject id="Link1">
  <updateState>
    <protection from="false" to="true">Exercisor</protection>
    <protection from="false" to="false">Locked</protection>
  </updateState>
</updateObject>
BiSONET states
The class IltBiSONETObjectStateSAXInfo is the XML serialization class that allows you to read and write BiSONET states in the XML format.
The following table describes the XML elements that can be used:
XML elements in the BiSONET state system 
XML Element
Attributes
Possible Values
Description
<state>
None
Disabled, Inactive, Active, ActiveProtecting, TroubledProtected, TroubledUnprotected
BiSONET primary state
<reverseState>
None
Disabled, Inactive, Active, ActiveProtecting, TroubledProtected, TroubledUnprotected
BiSONET reverse state
<protection>
 
Exercisor, ForcedSwitch, Locked, ManualSwitch, Pending, WaitToRestore
BiSONET protection state
 
from
true or false
This is an optional attribute. It defines whether the protection is set in the “from” end point of the link. By default, the value is true.
 
to
true or false
This is an optional attribute. It defines whether the protection is set in the “to” end point of the link. By default, the value is true.
How to add a link with a BiSONET state defined in XML
 
<addObject id="Link1">
  <class>ilog.tgo.model.IltLink</class>
  <link> <from>PolyGroup</from> <to>NE3</to> </link>
  <attribute name="name">Link1</attribute>
  <attribute name="media">Fiber</attribute>
  <attribute name="objectState"
       javaClass="ilog.tgo.model.IltBiSONETObjectState">
    <state>Active</state>
    <reverseState>ActiveProtecting</reverseState>
    <protection from="true">Exercisor</protection>
    <protection to="true">Locked</protection>
  </attribute>
</addObject>
How to set BiSONET states to an existing object using XML
The following example shows how to set BiSONET states 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="Link1">
  <attribute name="objectState"
javaClass="ilog.tgo.model.IltBiSONETObjectState">
    <state>Active</state>
    <reverseState>ActiveProtecting</reverseState>
    <protection from="true" to="false">Exercisor</protection>
    <protection>Locked</protection>
  </attribute>
</updateObject>
How to update BiSONET states incrementally using XML
 
<updateObject id="Link1">
  <updateState>
    <reverseState>TroubledProtected</reverseState>
    <protection from="false" to="true">Exercisor</protection>
    <protection from="false" to="false">Locked</protection>
  </updateState>
</updateObject>
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>
Trap states
The class IltTrapObjectStateSAXInfo is the XML serialization class that allows you to read and write traps in the XML format.
The following table describes the XML elements that can be used.
XML elements in the Trap state system 
XML Element
Attributes
Possible Values
Description
<traps>
None
 
Delimits trap state definition
<new>
 
 
Structural element that lets you specify new traps for an object
 
type
ColdStart, WarmStart, LinkFailure, AuthenticationFailure, EGPNeighborLoss
This attribute is mandatory. It defines the type of the new trap to be set.
 
operation
set, add, remove
This attribute is optional. It specifies whether the trap should be set, added to or removed from the object state. The default value is set indicating that the trap will be set in the object state. This attribute is used within an <updateState> element.
<ack>
 
 
Structural element that lets you specify acknowledged traps for an object
 
type
ColdStart, WarmStart, LinkFailure, AuthenticationFailure, EGPNeighborLoss
This attribute is mandatory. It defines the severity of the acknowledged trap to be set.
 
operation
set, add, remove
This attribute is optional. It specifies whether the trap should be set, added to or removed from the object state. The default value is set indicating that the trap will be set in the object state. This attribute is used within an <updateState> element.
How to add a network element with traps 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.IltSNMPObjectState">
    <state>Up</state>
    <traps>
      <new type="LinkFailure">5</new>
      <ack type="AuthenticationFailure">2</ack>
    </traps>
  </attribute>
</addObject>
How to set traps to an existing object using XML
The following example shows how to set traps 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.IltSNMPObjectState">
    <state>Up</state>
    <traps>
      <new type="LinkFailure">2</new>
      <ack type="AuthenticationFailure">3</ack>
    </traps>
  </attribute>
</updateObject>
How to update traps incrementally using XML
 
<updateObject id="NE1">
  <updateState>
    <traps>
      <new type="ColdStart">1</new>
      <new type="LinkFailure" operation="remove">1</new>
      <new type="AuthenticationFailure" operation="add">1</new>
      <ack severity="LinkFailure" operation="add">1</ack>
      <ack severity="AuthenticationFailure" operation="remove">3</ack>
    </traps>
  </updateState>
</updateObject>

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.