You are on page 1of 126

Tellabs

8000 Network Manager R17A


JavaAPI for Tellabs

8000 Network Manager


Northbound Interface
70182_01
30.09.09
Document Information
2009 Tellabs. All rights reserved.
This Tellabs manual is owned by Tellabs or its licensors and protected by U.S. and international copyright laws, conventions and
treaties. Your right to use this manual is subject to limitations and restrictions imposed by applicable licenses and copyright laws.
Unauthorized reproduction, modication, distribution, display or other use of this manual may result in criminal and civil penalties.
The following trademarks and service marks are owned by Tellabs Operations, Inc. or its afliates in the United States and/or
other countries: TELLABS

, TELLABS

logo, TELLABS and T symbol

, and T symbol

.
Any other company or product names may be trademarks of their respective companies.
The specications and information regarding the products in this manual are subject to change without notice. All statements,
information, and recommendations in this manual are believed to be accurate but are presented without warranty of any kind,
express or implied. Users must take full responsibility for their application of any products.
Adobe

Reader

are registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


2
Document Information
Terms and Conventions
Term Explanation
API Application Programming Interface
DB Database
GPT General Problem Type
NBI Northbound Interface
NE Network Element
OSS Operations Support System. Includes e.g. EMS, NMS and SMS functionalities.
SPT Specic Problem Type
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


3
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


4
Table of Contents
Table of Contents
About the Manual .............................................................................................................. 11
Objectives........................................................................................................................................................................11
Audience..........................................................................................................................................................................11
Related Documentation...................................................................................................................................................11
Document Conventions ...................................................................................................................................................11
Documentation Feedback............................................................................................................................................... 12
1 Introduction to JavaAPI .............................................................................................. 13
2 Downward Compatibility of JavaAPI ......................................................................... 16
3 Clear Text Descriptions and Capacity Vectors of Attribute Values ........................ 17
4 Problem Type Descriptions and Probable Cause of Network Element Alarms..... 18
5 How to Use JavaAPI.................................................................................................... 19
5.1 Java Runtime Environment ................................................................................................................................. 19
5.2 Create an Object of TolService Class ................................................................................................................. 19
5.3 Decide if You Want to See the Clear Text Descriptions of DB Values ............................................................... 19
5.3.1 Create an Object of NbifAttributeValueService Class ....................................................................... 19
5.4 Decide if You Want to See the Problem Type Descriptions and Probable Cause of NE Alarms........................ 20
5.4.1 Create an Object of NbifAttributeAlarmValueService Class .............................................................. 20
5.5 Decide the Datetime Format of JavaAPI............................................................................................................. 20
5.6 Open Communication (Socket) ........................................................................................................................... 21
5.7 Open Session ....................................................................................................................................................... 21
5.8 Running a Get Command .................................................................................................................................... 22
5.8.1 Creating Object TolResultSet .............................................................................................................. 22
5.8.2 Getting Inventory and Performance data............................................................................................. 22
5.8.3 Getting Alarm Data ............................................................................................................................. 23
5.8.4 Managing the Input Parameters of the Get Commands....................................................................... 23
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


5
Table of Contents
5.8.5 Retrieve the Result Data...................................................................................................................... 26
5.8.6 Retrieve the Clear Text Descriptions for the Attribute Values ............................................................ 29
5.8.7 Retrieve the Problem Type Descriptions and Probable Cause of NE Alarms..................................... 29
5.8.8 Retrieve the Capacity Vector ............................................................................................................... 29
5.9 Provisioning with Macros.................................................................................................................................... 30
5.10 Subscribing to the Tellabs 8000 Manager NBI Inventory and NBI Alarm Notications ................................... 31
5.10.1 Implement TolEventObserver Interface .............................................................................................. 32
5.10.2 Register as an Observer with addChangeListener Method ................................................................. 33
5.10.3 Check if Notications Are Supported for the Entity ........................................................................... 33
5.10.4 Subscribe Commands for Subscribing to Inventory Entities............................................................... 33
5.10.5 Subscribe Commands for Subscribing to Alarm Entities and System Notications........................... 34
5.10.6 Handle the Received Inventory Notications...................................................................................... 34
5.10.7 Handle the Received Alarm Notications ........................................................................................... 36
5.10.8 Handle the Received System Notications ......................................................................................... 36
5.11 Acknowledging Alarms....................................................................................................................................... 37
5.12 Pinging the NBI Server to Verify that It Is Alive ................................................................................................ 37
5.13 Command Names and Codes............................................................................................................................... 37
5.14 Close Session....................................................................................................................................................... 38
5.15 Close Communication (Socket)........................................................................................................................... 38
6 TolService Class.......................................................................................................... 39
6.1 Establishing Connections to the Tellabs 8000 Manager NBI.............................................................................. 40
6.1.1 Method openCommunication for Opening Socket .............................................................................. 40
6.1.2 Method closeCommunication for Closing Socket............................................................................... 40
6.1.3 Method openSession............................................................................................................................ 40
6.1.4 Method closeSession ........................................................................................................................... 41
6.2 Requesting Inventory or Performance Data from the Tellabs 8000 Manager NBI ............................................. 41
6.2.1 Method getAllData .............................................................................................................................. 41
6.2.2 Method getFilteredAllData................................................................................................................. 42
6.2.3 Method getOneData............................................................................................................................. 44
6.2.4 Method getIntervalData (Deprecated) ................................................................................................. 45
6.2.5 Method pingNima................................................................................................................................ 46
6.2.6 Method pingNsa .................................................................................................................................. 46
6.3 Requesting Alarm Data from the Tellabs 8000 Manager NBI ............................................................................ 47
6.3.1 Method getActiveAlarmData .............................................................................................................. 47
6.3.2 Method getAllData for Getting Alarms............................................................................................... 47
6.4 Acknowledging Alarms....................................................................................................................................... 48
6.4.1 Method acknowledgeAlarm ................................................................................................................ 48
6.5 Executing the Tellabs 8000 Manager NBI Conguration Changes (Macros)..................................................... 49
6.6 Subscribing to the Tellabs 8000 Manager NBI Inventory and NBI Alarm Notications ................................... 49
6.6.1 Method addChangeListener................................................................................................................. 50
6.6.2 Method removeChangeListener .......................................................................................................... 50
6.6.3 Method subscribeNotication.............................................................................................................. 50
6.6.4 Method unsubscribeNotication.......................................................................................................... 51
6.6.5 Method subscribeSystemNotication.................................................................................................. 51
6.6.6 Method unsubscribeSystemNotication.............................................................................................. 51
6.7 Settings of TolService.......................................................................................................................................... 52
6.7.1 Trace Level of JavaAPI ....................................................................................................................... 52
6.7.2 Datetime Pattern of JavaAPI ............................................................................................................... 53
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


6
Table of Contents
7 TolResultSet Class...................................................................................................... 54
7.1 Scanning the Tellabs 8000 Manager NBI Response Records ............................................................................. 54
7.2 Extracting Attributes from a Record ................................................................................................................... 55
7.2.1 Method getValueAsString.................................................................................................................... 55
7.2.2 Method getValueByte .......................................................................................................................... 56
7.2.3 Method getValueShort ......................................................................................................................... 56
7.2.4 Method getValueInt ............................................................................................................................. 56
7.2.5 Method getValueDouble...................................................................................................................... 56
7.2.6 Method getValueLong64 ..................................................................................................................... 57
7.2.7 Method getValueDate .......................................................................................................................... 57
7.2.8 Method getValueString........................................................................................................................ 57
7.2.9 Method getValueBytes......................................................................................................................... 57
7.3 Datetime Pattern of TolResultSet ........................................................................................................................ 58
8 NbifAttributeInfo and NbifAttributeService Classes................................................ 59
8.1 Entity IDs and Names.......................................................................................................................................... 59
8.2 Attribute IDs and Names ..................................................................................................................................... 59
8.3 Methods for Handling Entities ............................................................................................................................ 60
8.3.1 Methods that Return All Entities ......................................................................................................... 60
8.3.2 Methods that Return Inventory and Performance Entities .................................................................. 60
8.3.3 Methods that Return Alarm Entities.................................................................................................... 61
8.3.4 Method getEntityName........................................................................................................................ 62
8.3.5 Method getEntityIdForEntityName..................................................................................................... 62
8.3.6 Method getEntityObject ...................................................................................................................... 62
8.3.7 Method isAlarmEntity ......................................................................................................................... 62
8.3.8 Method isEclEntity.............................................................................................................................. 63
8.3.9 Method getEntityNoticationSupport ................................................................................................. 63
8.4 Methods for Handling Attributes......................................................................................................................... 63
8.4.1 Methods that Return Attributes ........................................................................................................... 63
8.4.2 Method getAttributeNamesInArrayList .............................................................................................. 64
8.4.3 Method getNumberOfKeyAttributes................................................................................................... 64
8.4.4 Methods that Return Key Attributes.................................................................................................... 64
8.4.5 Method getAttributeObject.................................................................................................................. 65
8.4.6 Method getAttributeIdForAttributeName............................................................................................ 66
8.4.7 Method getAttributeEntityId ............................................................................................................... 66
8.4.8 Method getAttributeName................................................................................................................... 66
8.4.9 Method getAttributeDataTypeCode .................................................................................................... 66
8.4.10 Method getAttributeDataTypeDesc..................................................................................................... 67
8.4.11 Method getAttributeDataLength.......................................................................................................... 67
8.4.12 Method getAttributeIsKey................................................................................................................... 67
8.5 Methods for Parsing Strings ................................................................................................................................ 67
8.5.1 Method parseEntities ........................................................................................................................... 68
8.5.2 Method parseOneEntity....................................................................................................................... 68
8.5.3 Method parseAttributes ....................................................................................................................... 68
8.5.4 Method parseOneAttribute .................................................................................................................. 69
8.5.5 Method parseFilters ............................................................................................................................. 69
8.5.6 Method parseAttributeValueList.......................................................................................................... 70
8.5.7 Method parseOneValue........................................................................................................................ 70
8.5.8 Method parseIntegerParameterList...................................................................................................... 71
8.5.9 Method parseOneInteger ..................................................................................................................... 71
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


7
Table of Contents
8.5.10 Method parseOneLong ........................................................................................................................ 71
8.6 Methods for Getting Capacity Vectors ................................................................................................................ 72
8.6.1 Method convertBytesToCapacityVectorString.................................................................................... 72
8.6.2 Method convertBytesToCapacityVectorArrayList .............................................................................. 73
8.7 Attribute Data Type Denition............................................................................................................................ 75
8.8 Methods for Getting Example Value Format for Attributes ................................................................................ 75
8.8.1 Method getExampleValueString.......................................................................................................... 75
8.8.2 Method getExampleTolDateTimeString.............................................................................................. 76
9 NbifAttributeValueService Class................................................................................ 77
9.1 Methods for Handling the Attribute Value Descriptions ..................................................................................... 77
9.1.1 Method NbifAttributeValueService..................................................................................................... 77
9.1.2 Method getService_data_is_ok............................................................................................................ 78
9.1.3 Method getDescriptionOfAttributeValue ............................................................................................ 78
9.1.4 Method getValueOfAttributeDescription ............................................................................................ 78
9.1.5 Method getAttributeValueObjectsOfAttribute .................................................................................... 79
10 NbifAttributeAlarmValueService Class ..................................................................... 80
10.1 NE Alarm Types .................................................................................................................................................. 80
10.2 Methods for Handling the Alarm Values............................................................................................................. 80
10.2.1 Method NbifAttributeAlarmValueService........................................................................................... 80
10.2.2 Method getService_data_is_ok............................................................................................................ 81
10.2.3 Method getGptText.............................................................................................................................. 81
10.2.4 Method getSptText .............................................................................................................................. 81
10.2.5 Method getAlarmtypetext.................................................................................................................... 82
11 NbifAttributeSptValue Class....................................................................................... 83
11.1 Methods for Handling the Specic Problem Type Descriptions of an NE Alarm .............................................. 83
11.1.1 Method getSpttext................................................................................................................................ 83
11.1.2 Method getProbablecause.................................................................................................................... 83
11.1.3 Method getSourcehw........................................................................................................................... 83
11.1.4 Method getSptCode ............................................................................................................................. 84
11.1.5 Method getAlarmtype.......................................................................................................................... 84
11.1.6 Method getHwtype .............................................................................................................................. 84
12 TolType and TolTypeService Classes........................................................................ 85
12.1 Values in TolType Class....................................................................................................................................... 85
12.1.1 Codes of Commands for Accessing Data from NBI Server................................................................ 85
12.1.2 Codes for Received Notications ........................................................................................................ 85
12.1.3 Status Stored in the Header of the Reply Message.............................................................................. 85
12.1.4 Error Codes Set in Case of Problems in Reading Reply Data............................................................. 85
12.1.5 Codes and Names of Supported Capacity Vector Types ..................................................................... 86
12.1.6 Codes of Supported Trunk Allocation Types ...................................................................................... 86
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


8
Table of Contents
12.1.7 Trace Level .......................................................................................................................................... 87
12.1.8 Filter Types Available for GetFilteredAllData Command................................................................... 87
12.2 TolTypeService Methods for Handling Commands ............................................................................................ 87
12.2.1 Method getCommandName................................................................................................................. 87
12.2.2 Method getCommandCode.................................................................................................................. 88
12.2.3 Methods that Return Commands for Managing Inventory and Performance Data............................. 88
12.2.4 Methods that Return Commands for Managing Alarms ..................................................................... 88
12.3 TolTypeService Methods for Capacity Vector Types .......................................................................................... 89
12.3.1 Method getCapacityVectorAlloctypeForTrunkAllocType .................................................................. 89
12.3.2 Method getCapacityVectorTypeCode................................................................................................. 89
12.3.3 Method getCapacityVectorTypeName................................................................................................. 90
12.3.4 Method getCapacityVectorTypeCodes ................................................................................................ 90
12.3.5 Method getCapacityVectorTypeNames ............................................................................................... 90
12.4 TolTypeService Methods for Handling Trace Log Levels .................................................................................. 91
12.4.1 Methods getTraceLevelCodes and getTraceLevelNames ................................................................... 91
12.4.2 Method getTraceLevelName ............................................................................................................... 91
12.4.3 Method getTraceLevelCode ................................................................................................................ 91
12.5 TolTypeService Methods for Handling Filter Types of Command GetFilteredAllData ..................................... 92
13 OpenResultSet Class.................................................................................................. 93
13.1 Extracting the Tellabs 8000 Manager NBI Sessions Handle ID ....................................................................... 93
14 TolEventObserver Class............................................................................................. 94
14.1 Processing the Tellabs 8000 Manager NBI Inventory Notications ................................................................... 94
14.1.1 Create Notications ............................................................................................................................. 94
14.1.2 Attribute Value Change Notications.................................................................................................. 95
14.1.3 Delete Notications ............................................................................................................................. 95
14.2 Processing the Tellabs 8000 Manager NBI Alarm Notications ........................................................................ 96
14.2.1 TolAlarmEvent Methods ..................................................................................................................... 96
14.3 Processing the Tellabs 8000 Manager NBI System Notications....................................................................... 96
14.3.1 TolSystemEvent Methods.................................................................................................................... 97
15 OSS Client Development and JavaAPI Use .............................................................. 98
15.1 Using JavaAPI to Simultaneously Integrate Inventory Data and Alarm Data ................................................... 98
15.2 Entity IDs and Attribute IDs ............................................................................................................................... 98
15.3 Required Setting at NIMA.INI ........................................................................................................................... 99
15.4 Providing Key Attribute Values in getOneData and getIntervalData Requests ................................................. 99
15.5 Other JavaAPI Specic Data Types..................................................................................................................... 99
15.5.1 TolDateTime Class .............................................................................................................................. 99
15.6 JavaAPI Exceptions........................................................................................................................................... 102
15.6.1 TolCommunicationException............................................................................................................ 102
15.6.2 TolAttributeException ....................................................................................................................... 104
15.7 Using the openCommunication() and openSession() Methods ........................................................................ 104
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


9
Table of Contents
16 Using NBI Test Client ................................................................................................ 105
16.1 Installing Java Runtime Environment ............................................................................................................... 105
16.2 Files of the NBI Test Client ............................................................................................................................... 105
16.2.1 jar-les NBITestClient.jar and tol.jar ................................................................................................ 105
16.2.2 Clear Text Description File................................................................................................................ 105
16.2.3 Ini File for the Test Client.................................................................................................................. 106
16.3 Launching the Test Client.................................................................................................................................. 107
16.4 NBI Inventory and Performance Services (Target NIMA)................................................................................ 108
16.4.1 Commands for Subscribing to Notications ......................................................................................110
16.4.2 Command GetAll...............................................................................................................................111
16.4.3 Command GetFilteredAll ...................................................................................................................112
16.4.4 Command GetOne ..............................................................................................................................114
16.5 NBI Fault and Provisioning Services (Target NSA)...........................................................................................115
16.5.1 Commands for Subscribing to Notications ......................................................................................117
16.5.2 Command GetAll................................................................................................................................117
16.5.3 Command Execute Macro ..................................................................................................................118
Appendix: JavaAPI Examples ....................................................................................... 119
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


10
About the Manual
About the Manual
Objectives
This manual gives information on JavaAPI, a Java based library that provides a high-level
programming interface for developers of third party OSS Client applications.
Audience
This information is aimed at the developers of third party OSS Client applications. With the help of
JavaAPI library, the developers do not need to know details about the underlying protocols used in
the Tellabs 8000 Network Manager Northbound Interface (Tellabs 8000 network manager NBI).
The developers of third party OSS Client applications must use the Java programming language
to be able to benet from the JavaAPI library and must implement an adapter module at the OSS
System that uses JavaAPI classes to integrate with the Tellabs 8000 network manager NBI.
Related Documentation
Document No Document Name
Tellabs

8000 Network Manager R17A


Installation and Conguration Guide for
Northbound Interface (70173_XX)
Provides instructions on installing and conguring
the Northbound Interface service of Management
Server of theTellabs 8000 network manager.
Information on general Java classes, for example information on the Java class SimpleDateFormat,
is available at SUNs web pages: <http://java.sun.com/j2se/1.5.0/docs/api/>
Document Conventions
This is a note symbol. It emphasizes or supplements information in the document.
This is a caution symbol. It indicates that damage to equipment is possible if the instructions
are not followed.
This is a warning symbol. It indicates that bodily injury is possible if the instructions are not
followed.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


11
About the Manual
Documentation Feedback
Please contact us to suggest improvements or to report errors in our documentation:
Email: -documentation@tellabs.com
Fax: +358.9.4131.2430
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


12
1 Introduction to JavaAPI
1 Introduction to JavaAPI
The gure below shows an overview of how JavaAPI and the Tellabs 8000 manager NBI are used
when integrated to a third party OSS system.
Fig. 1 JavaAPI and Tellabs 8000 Network Manager NBI Integrated to a Third Party OSS System
JavaAPI is composed of more than 20 Java classes and one interface, but only a selection of the
classes and methods are public for OSS Client development. For processing notications messages
sent by the Tellabs 8000 manager NBI, the OSS Client needs to implement one JavaAPI Interface.
The main public classes are:
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


13
1 Introduction to JavaAPI
TolService containing the Tellabs 8000 manager NBI communication methods
openCommunication
openSession
getAllData
getOneData
getFilteredData
getActiveAlarmData
acknowledgeAlarm
getIntervalData
subscribeNotification
and others.
OpenResultSet containing a method to obtain the HandleId that identies a session to the Tellabs
8000 manager NBI.
TolResultSet containing methods to read and parse data sent by Tellabs NBI in response to
getAllData, getOneData and getIntervalData calls. Notication data is also han-
dled by TolResultSet.
NbifAttributeService containing methods to handle data entities and attributes.
NbifAttributeValueService containing methods to get descriptions for the attribute values.
To process the notications sent by the Tellabs 8000 manager NBI, the OSS Client application must
implement the TolEventObserver interface.
JavaAPI is provided as a set of Java class les that should be installed at the computer/server
running the OSS Client application. JavaAPI requires J2SE release 1.5 or newer.
The gure below shows an example of the OSS Client application being implemented in the
TellabsClient.java le and installed under directory \OSSApp. JavaAPI les should then be
installed in the \OSSApp\ directory.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


14
1 Introduction to JavaAPI
Fig. 2 An Example of JavaAPI Files Implemented
The JavaAPI can be used for two purposes:
1. NBI Inventory and Performance Services
2. NBI Fault and Provisioning Services
These services are provided in different ports of the NBI Server. The JavaAPI programmer must
create the connection to the wanted port to have access to the services.
For GET operations, there is a list of supported entities. Each entity supports a list of attributes.
An entity can be a physical object (for example a node or a unit), a logical object (for example a
circuit, an mplsvpn), a performance object (for example G821 performance data), an alarm object
(network element alarm or service alarm), etc.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


15
2 Downward Compatibility of JavaAPI
2 Downward Compatibility of JavaAPI
JavaAPI is downward compatible with previous releases of Tellabs 8000 network manager. OSS
application can implement the most recent methods and performance enhancements of the latest
JavaAPI even when it is integrating with an older release of Tellabs 8000 manager. OSS application
can start using the new commands and getting data for the new entities and attributes as soon as
Tellabs 8000 network manager is upgraded to a release which supports them.
JavaAPI is not compatible upward. When upgrading to a new release of Tellabs 8000 manager,
the newest JavaAPI must be taken into use.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


16
3 Clear Text Descriptions and Capacity Vectors of Attribute Values
3 Clear Text Descriptions and Capacity Vectors
of Attribute Values
JavaAPI provides Clear Text description texts for the attribute values (since R15A) and Capacity
Vectors (since R16).
For example, you can easily view the nodes hardware type. After you have received the data from
the NBI Server to your client, you can pass the values over to Clear Text Description methods of
JavaAPI to get the Clear Text description, e.g. string 8630 in case of a Tellabs 8630 access switch
node (whose code value is 10017). For more information on using the Clear Text descriptions,
see the information below.
The trunk capacity usage can also be clearly seen. After receiving the data from the NBI Server to
your client, you can pass the capacity data over to Capacity Vector methods of JavaAPI to get the
Capacity usage in a clear format, e.g. the used capacity of a STM-1 trunk can been seen as a clear
text TU:100,211,212,310,370, which shows which TU-12s, TU-2s and TU-3s are used.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


17
4 Problem Type Descriptions and Probable Cause of Network Element Alarms
4 Problem Type Descriptions and Probable
Cause of Network Element Alarms
JavaAPI provides descriptions for alarms which is a useful feature for NBI alarm integration. It
provides the following:
description of the Generic Problem Type (GPT) code
description of the Specic Problem Type (SPT) code
probable cause for alarms
the type of the alarm (NODE Alarm, NTU Alarm or NMS Alarm)
the hardware type of the faulty unit or the faulty NTU
After you have received the alarms from the NBI Server to your client, you can pass the alarm data
to Alarm Description methods of JavaAPI to get the SPT and GPT problem type descriptions, the
probable cause of the alarm, the type of the alarm and the hardware type of the faulty unit or NTU.
E.g. for an alarm from Interface unit for Tellabs 8660 edge switch, the alarm might have GPT
code 10004 and SPT code 1769474. The Alarm Description methods of JavaAPI provide the
following descriptions:
GPT: "Alarm received from the Tellabs 8600 equipment"
SPT: "Tx circuit down"
probable cause: "Circuit is down in transmit direction. The reason may be that the LDP signalling
is not successfully executed."
type of the alarm: "NODE Alarm"
hardware type of the unit: "8605 Interface Unit"
For more information on using the Alarm Description methods of JavaAPI, see the information
below.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


18
5 How to Use JavaAPI
5 How to Use JavaAPI
5.1 Java Runtime Environment
Use JavaAPI with Java Runtime Environment 5.0 or newer.
5.2 Create an Object of TolService Class
The class TolService provides methods for handling the commands of JavaAPI. The default
constructor is
TolService Srv = new TolService();
An alternative constructor of TolService takes the trace level as a parameter.
TolService prints only those messages to JavaAPI trace which have a higher importance than the
selected (or default) trace level. For more information on the constructors and the trace level
settings, see 6 TolService Class.
5.3 Decide if You Want to See the Clear Text Descriptions of DB
Values
If you want to use the Clear Text descriptions, create an object of class NbifAttributeValueService.
With the methods of NbifAttributeValueService you can either get all Clear Text descriptions
or convert an attribute value to its description.
You can use NbifAttributeValueService to give the Clear Text descriptions for the result data of Get
commands or when you receive notications.
There should be only one instance of NbifAttributeValueService since creating such an object
is a reasonably heavy task.
5.3.1 Create an Object of NbifAttributeValueService Class
Class NbifAttributeValueService provides methods for getting Clear Text descriptions for the
attribute values.
When an instance of class NbifAttributeValueService is created, it loads the Clear Text descriptions
from les and maps them to those attributes which support the descriptions.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


19
5 How to Use JavaAPI
You can check that the NbifAttributeValueService was loaded properly by getting the status with
method getService_data_is_ok(). This status contains the boolean value True if the Clear Text
descriptions exist.
For more information on NbifAttributeValueService, see 9 NbifAttributeValueService Class.
5.4 Decide if You Want to See the Problem Type Descriptions and
Probable Cause of NE Alarms
If you are integrating to NBI Alarms and want to get the Problem type descriptions and probable
cause of NE alarms, create an object of class NbifAttributeAlarmValueService. With the methods of
NbifAttributeAlarmValueService you can get the GPT and SPT descriptions, the probable cause of
the alarm, the type of the alarm and the hardware type of the faulty unit or NTU.
You can use NbifAttributeAlarmValueService to get the descriptions for the result data when getting
all existing active alarms or when you receive alarm notications. There should be only one instance
of NbifAttributeAlarmValueService since creating such an object is a reasonably heavy task.
Starting up the JavaAPI takes longer, when you use the feature to get the Problem type
descriptions and probable cause of alarms since the JavaAPI loads the problem type
description and probable cause texts at startup.
5.4.1 Create an Object of NbifAttributeAlarmValueService Class
Class NbifAttributeAlarmValueService provides methods for getting the GPT and SPT descriptions,
the probable cause of the alarm, the type of the alarm and the hardware type of the faulty unit or
NTU.
When an instance of class NbifAttributeAlarmValueService is created, it loads the problem type
descriptions and probable cause texts from les.
You can check that the NbifAttributeAlarmValueService was loaded properly by getting the status
with method getService_data_is_ok(). This status contains the boolean value True if the descriptions
exist.
For more information on NbifAttributeAlarmValueService, see 10 NbifAttributeAlarmValueService
Class.
5.5 Decide the Datetime Format of JavaAPI
JavaAPI prints out datetimes and requires the datetimes to be inserted in a certain pattern. The
pattern is common (static) in JavaAPI.
The default datetime pattern is " dd.MM.yyyy HH:mm:ss:SSS". For example: 10.03.2005
19:30:25:55.
If you want to change the default datetime pattern, you can do it either
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


20
5 How to Use JavaAPI
1. with set-methods of TolService (see 6.7.2 Datetime Pattern of JavaAPI)
or
2. with set-methods of a TolDateTime object (see 15.5.1 TolDateTime Class).
Changing the pattern affects all the places where datetimes are used.
1. The datetime pattern is used when printing out results containing datetime attributes with meth-
ods of TolResultSet class.
2. The datetime pattern is needed in class TolService when giving datetime values as input to
commands GetFilteredAllData (or GetIntervalData).
NBI Server applications return the TolDateTime values by default in the local normal time.
There is an option to return the TolDateTime values in UTC time by adding the parameter
USE_UTC_TIME=YES to the nsa.ini and nima.ini les in the NBI Server.
5.6 Open Communication (Socket)
Dene the hostname or the IP address of the Northbound Interface. Dene the port where the
Northbound Interface provides the requested services:
Requested Services Service Name Service Port (Server
Default)
NBI Inventory and Performance
services
NIMA 2462
NBI Fault and Provisioning
services
NSA 2461
Open the socket using the method openCommunication of TolService class
public void openCommunication(String hostAddress, int
portNumber) throws IOException
When using JavaAPI to communicate with NBI Fault and Provisioning services, the following
conguration changes have to be made:
in %DXXDIR%\dat\nsa.ini, set the parameter BYTE_CONVERSION=OFF.
5.7 Open Session
Dene an object of the class OpenResultSet:
OpenResultSet resultSet = new OpenResultSet();
Dene the username and the password.
Open the session using the method openSession of TolService class:
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


21
5 How to Use JavaAPI
public void openSession(String userName, String passWord,
OpenResultSet openResultSet)
throws IOException, TolCommunicationException
Get the handleId using the method getHandleId of OpenResultSet class:
public long getHandleId()
Store the handleId. You need it every time you send commands to the Northbound Interface:
long handleId = openResultSet.getHandleId();
5.8 Running a Get Command
The available commands depend on the port you have opened. However, there are common features
in the different Get commands:
All Get commands return the data in TolResultSet. You can use the same methods of the class
TolResultSet to evaluate the results.
All Get commands require the entityId as an input parameter.
Most Get commands require an ArrayList of selected attributes as an input parameter.
Some Get commands require specic input parameters.
5.8.1 Creating Object TolResultSet
First, dene an instance of class TolResultSet to let the Get command ll it with data.
TolResultSet resultSet = new TolResultSet();
5.8.2 Getting Inventory and Performance data
The following methods are available for getting Inventory and Performance data (NIMA in port
2462):
Method or TolService Description Parameters
getAllData Method to retrieve the selected
attributes for all existing rows of
the selected entity.
long handleId
int entityId
ArrayList selectedAttributes
TolResultSet resultSet (Output)
getFilteredAllData Method to retrieve the selected
attributes for those rows of the
selected entity which match the
given lters.
long handleId
int entityId
ArrayList selectedAttributes
ArrayList lterAttributes
ArrayList lterAttrValues
ArrayList lterTypes
TolResultSet resultSet (Output)
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


22
5 How to Use JavaAPI
Method or TolService Description Parameters
getOneData Method to retrieve the selected
attributes for a single row of the
selected entity, which matches
the given key attribute values.
long handleId
int entityId
ArrayList selectedAttributes
ArrayList keyAttributes
ArrayList keyAttrValues
TolResultSet resultSet (Output)
getIntervalData Note: A deprecated method
which works only for some
performance entities.
Method to retrieve the selected
attributes for those rows of the
selected entity which are in
the given time interval and, for
some of the entities, match the
given Circuit ID/ NTU ID.
It is recommended
to use the method
getFilteredAllData
instead!
Deprecated method
Parameters are as in case of
getOneData. However,
the order of the keyIds does
matter. Since this command is
deprecated, the details are not
described here.
5.8.3 Getting Alarm Data
The following method are available for getting alarm data (NSA in port 2461):
Command Description Parameters
getActiveAlarmData Returns all attributes for all
existing rows of the selected
(alarm) entity.
The method getActiveAlarm-
Data does not require giving any
attributes as an input parameter
but it always returns all the
attributes.
long handleId
int entityId
TolResultSet resultSet (Output)
getAllData Returns all attributes for all
existing rows of the selected
(alarm) entity.
The method getAllData requires
giving all existing attributes of
the select (alarm) entity in the
prespecied order.
long handleId
int entityId
ArrayList selectedAttributes
TolResultSet resultSet (Output)
5.8.4 Managing the Input Parameters of the Get Commands
Commands require giving the supported entities, attributes, lter types etc. as input parameters.
Commands allow giving ArrayLists containing either IDs/codes or names/symbols.
OSS client applications dealing with predened supported entities and attributes can directly use
them from the NbifAttributeInfo class and in the TolType class.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


23
5 How to Use JavaAPI
A GUI application is more likely to play around with lists of supported entities, attribute, values
etc. There are several methods available which format the parameters to the format expected by the
Get command.
1. You can get a list of all possible supported entities.
2. You can get a list of all possible attributes of an entity.
3. You can get a list of possible values for an attribute.
4. You can convert the names into IDs and vice versa.
See also Appendix: JavaAPI Examples
The handleId Is Needed for Any Get Command
Input parameter handleId is the handle ID which you received from the OpenSession command.
The entityId is Needed for Any Get Command
The entityIds can be taken directly from the NbifAttributeInfo class (see 8.1 Entity IDs and Names).
There are also methods in NbifAttributeService, which return (see 8.3 Methods for Handling
Entities):
1. All supported entities (either Inventory and Performance or Alarm entities).
2. Entity name for an entity ID and vice versa.
3. Information if the entity is the Tellabs 8000 manager Provisioning related entity (ECL entity).
And methods which can be used for parsing the entity from a string (see 8.5 Methods for
Parsing Strings).
4. Methods for parsing entity IDs or NAMEs from a string.
Selected Attributes for Get Commands
The input parameter selectedAttributes is an ArrayList of attributes, which you want to get.
ArrayList is allowed to contain either attribute IDs (as Integers) or attribute names (as Strings). The
attribute IDs and names can be taken directly from the NbifAttributeInfo class (see 8.1 Entity
IDs and Names).
For Inventory and Performance entities you can select, that is, add to the ArrayList, as many
attributes as you like in any order. However, to make the getting of the data faster, it a recommended
to select only those attributes which are of importance to your OSS Client application.
For Alarm entities ALL attributes must be selected in the predened order. So, instead of selecting
the attributes, it is recommended either to
use the command getActiveAlarmData(), where you do not have to give the selected at-
tributes
or
use the method ArrayList getAttrIdArrayList(int entityId) of NbifAttribute-
Service to create the ArrayList. Give that ArrayList directly as an input parameter selectedAt-
tributes to GetAllData()command.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


24
5 How to Use JavaAPI
For Get commands of Alarm entities, all attributes must be included in the selected attributes
and they must be included in the order of the attribute IDs.
There are also methods in NbifAttributeService which return (see 8.4 Methods for Handling
Attributes):
1. All attributes of the given entity.
2. A number of key attributes and all key attributes of the given entity.
3. Properties of the given attribute (entity, data type, data length, if it is key).
4. Attribute name for an attribute ID and vice versa.
And methods which can be used for parsing the attributes from a string (see 8.5 Methods
for Parsing Strings):
5. Methods for parsing attribute IDs or NAMEs from a string.
Key Attributes and Key Values for GetOneData Command
For the GetOneData command you must give the key attributes of the entity in one ArrayList
and the key values in another ArrayList. ArrayList of key attributes is allowed to contain either
attribute IDs (as Integers) or attribute names (as Strings). ArrayList of key values must contain a
value for each key attribute in its own data type.
To be able to use the command GetOneData(), you must know which of the attributes are key
attributes and you must know their data types to give the key value in its own data type format.
Note that there are methods available in NbifAttributeService to nd out which attributes are key
attributes and the methods to get the key attributes.
The key attributes can be added to the ArrayList in any order. However, you must insert the key
attribute values to their ArrayList in the same order as you inserted the key attributes.
The key attributes can be managed as the selected attributes (described above).
Additionally, there are methods in NbifAttributeService for parsing the values from a string (see
8.5 Methods for Parsing Strings):
Methods for parsing attribute value(s) from a string to the data type(s) of the attribute.
Filter Attributes, Filter Types and Filter Values for GetFilteredAllData Command
For the GetFilteredAllData command you can give a lter which consists of one or more
logical conditions.
The logical condition is a condition on the values of one attribute. For example, you can have a
lter for the NODE entity where the logical condition is that the node hardware type attribute
has value 10017:
NODE_HWTYPE = 10017
If you give more logical conditions in a lter, the logical conditions are joint with AND.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


25
5 How to Use JavaAPI
(Attribute1 operator1 value1) AND (Attribute2 operator2 value2) AND ... AND (AttributeN
operatorN valueN)
AttributeX means attribute (ID or name)
operatorX means lter type ( =, < , > , <= , >= , LIKE)
where
valueX means value used in ltering
The maximum of ten logical conditions (AttributeX operatorX valueX) can be applied in a lter.
For example, you can have a lter for the NODE entity where the logical condition is that the node
hardware type attribute has value 10017 and the node ID is in the range of 100 and 199:
( NODE_NHWTYPE = 10017 ) AND ( NODE_NID >= 100 ) AND ( NODE_NID
<= 199 )
The lter is given to the GetFilteredAll command in three ArrayLists:
ArrayList containing the lter attributes (IDs or names)
ArrayList containing the lter attribute values (by their types)
(OPTIONAL) ArrayList containing the lter types (codes or symbols)
If you do not give the lter types of the logical conditions, lter type equal (=) is assumed for all
the logical conditions in the lter. Filter type LIKE can be applied only for the attributes with data
type NIMA_DT_CHARARRAY. Filter type LIKE nds those records, where the lter attribute
contains the given value (value_x) as a substring.
For more information on the lter types refer to TolType class in 12.1.8 Filter Types Available for
GetFilteredAllData Command and to TolTypeService class in 12.5 TolTypeService Methods for
Handling Filter Types of Command GetFilteredAllData.
Refer to 6.2.2 Method getFilteredAllData for more information on the parameters of the method
GetFilteredAllData.
If NbifAttributeValueService is used, you can use the methods of NbifAttributeValueService to
parse the lter values from their descriptions. For example, it is more convenient to refer to Tellabs
8630 access switch by its descriptive value string 8630 than by its node hardware type code
10017 (see 9 NbifAttributeValueService Class)
Additionally, NbifAttributeService class provides a parseFilters method for parsing the
lter from a semicolon-separated string (see 8.5 Methods for Parsing Strings). You will input
one semicolon-separated string to the method parseFilters and you get the three ArrayLists
necessary for the GetFilteredAllData command.
5.8.5 Retrieve the Result Data
All Get commands return the result in an object of TolResultSet class. TolResultSet class contains
the methods to read and parse the Tellabs 8000 manager NBI response data. Response data is sent
by the NBI as TolResultSet objects. TolResultSet is a buffer containing NBI objects (records). Each
record is composed of attributes. See the gure below.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


26
5 How to Use JavaAPI
Fig. 3 TolResultSet
By using the TolResultSet methods the OSS Client can scan all records contained in the TolResultSet
object. By using attribute IDs the OSS Client can extract the value of a specic attribute. To parse
the records and attributes in the TolResultSet, the OSS Client should use the getNext() and
getValueXX (attrId) methods. These methods are described in more detail in the sections
below.
Fig. 4 getNext
The values can be replaced or extended by the Clear Text explanations if wanted. Class
NbifAttributeValueService provides methods for retrieving the Clear Texts.
In case of NBI Alarm integration, the class NbifAttributeAlarmValueService can be used for
getting the GPT and SPT descriptions, the probable cause and the type of an NE alarm and also
the hardware type of the faulty unit or NTU.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


27
5 How to Use JavaAPI
Scan the Tellabs 8000 Manager NBI Response Records
TolResultSet class provides methods for Scanning the Tellabs 8000 manager NBI response records.
See also 7.1 Scanning the Tellabs 8000 Manager NBI Response Records. Use the method
getNext() to scan the records one by one (returns True as long as there are records). After
using the method getNext() you must use the methods for extracting the attributes from the
record as described below.
Get Attributes in the TolResultSet Object
Use the method ArrayList getAttrIdList() to get an ArrayList containing the IDs of
the attributes which are contained in each record of the TolResultSet. Every record of the same
TolResultSet object contains the same attributes. You need to know the attributes to be able to
retrieve the values using the proper data type.
Extract Attributes from a Record
TolResultSet class provides methods for extracting attributes from a record. See 7.2 Extracting
Attributes from a Record.
To extract attribute values, the OSS Client can use two approaches:
1. Extract all attributes as string values with the method string getValueAsString (int
attrId).
2. Extract each attribute in its native data type (byte, short, int, double, long64, String, byte[], Tol-
DateTime) with the method getValueXX(int attrId). For example, extract an attribute
of data type short with method short getValueShort(int attrId).
Developers of the OSS Client can choose which one is more appropriate.
In both cases, the OSS Client must know the entity in a TolResultSet, and the IDs of the attributes
to be extracted.
In case of extracting attributes in their native data type, OSS Client must also know the data
type of the attribute in order to call the correct method, otherwise the getValueXX()
method will throw a TolAttributeException. To nd out the data type of an attribute,
use the method int getAttributeDataTypeCode (int attrId) of the
class NbifAttributeService, which returns the data type code of the given attribute, e.g.
NbifAttributeService.NIMA_DT_SHORT.
For more methods giving information on the attribute, see 8.4 Methods for Handling Attributes.
For more information on possible data types, see 8.7 Attribute Data Type Denition.
Get General Information on the TolResultSet Object
There are also methods for
1. Getting the number of records in the TolResultSet object.
2. Getting the size of the whole TolResultSet object.
3. Getting the size of one record.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


28
5 How to Use JavaAPI
5.8.6 Retrieve the Clear Text Descriptions for the Attribute Values
To retrieve the Clear Text descriptions, create on object of class NbifAttributeValueSer-
vice. With methods of the NbifAttributeValueService class you can:
Check that the service has been loaded properly.
Get the description for a given value of a given attribute.
Get the attribute value for a given description of a given attribute.
Get all possible values for a given attribute.
See also 9 NbifAttributeValueService Class
5.8.7 Retrieve the Problem Type Descriptions and Probable Cause of NE Alarms
To retrieve the GPT and SPT descriptions, the probable cause of the alarm, the
type of the alarm and the hardware type of the faulty unit or NTU, create on
object of class NbifAttributeAlarmValueService. With methods of the
NbifAttributeAlarmValueService class you can do the following:
Check that the service has been loaded properly.
Get the description of a given GPT code.
Get the description of a given SPT code.
Get the probable cause for the alarm.
Get the type of the alarm (NODE Alarm, NTU Alarm or NMS Alarm).
Get the hardware type of the faulty unit or the faulty NTU.
See also 10 NbifAttributeAlarmValueService Class.
5.8.8 Retrieve the Capacity Vector
For a capacity vector attribute, you can see the capacity structure with methods provided in class
NbifAttributeService.
There are methods for converting a byte array into a string or an ArrayList containing the TS, TU,
AU-4 or bit capacity vector:
Method convertBytesToCapacityVectorString returns the capacity structure in a string
Method convertBytesToCapacityVectorArrayList returns the capacity structure as integer values
in an ArrayList.
Capacity
Vector
Type
Contents Example of Capacity
Structure in a String
Example of
Capacity
Structure as
Integers
TS: non-zero TS numbers TS:0,1,2 0,1,2
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


29
5 How to Use JavaAPI
Capacity
Vector
Type
Contents Example of Capacity
Structure in a String
Example of
Capacity
Structure as
Integers
TU: non-zero KLM values:
TU-12s in format K*100+L*10+M
TU-2s in format K*100+L*10
TU-3s in format K*100
TU:100,211,212,310,370 100,211,212,310,370
AU-4 non-zero AU4s AU4:1,2 1,2
Bit capacity Non-zero bits. First all eight bits of TS0
(TS0\b0, TS0\b1, TS0\b2, ..., TS0\b7),
then all bits of TS1 (TS1\b0, TS2\b1,
...TS2\b7), then bits of all following
time slots. Zero-bits in the end of list
are NOT included in the ArrayList.
TS0:B6\B7\,TS1:B1\B2 0,0,0,0,0,0,1,1,1,1
See also 8.6 Methods for Getting Capacity Vectors.
5.9 Provisioning with Macros
The following method is available for executing macros (NSA in port 2461):
Command Description Parameters
executeMacro
The macro le, whose name is
given as a parameter, is executed
on the Northbound Interface.
In case of success the method
returns. In case of failure, the
method throws exception, which
contains explanation on the
failure.
long handleId
String macroFileName
String macroArguments
(optional) int timeout
Conguration changes, such as provisioning operations, are possible through the executeMacro
feature of the Tellabs 8000 manager NBI.
The executeMacro method allows the OSS to request the NBI Server to execute a Macro program
with given arguments. When calling the executeMacro method, the OSS must specify the name
of the Tellabs 8000 manager Macro program and the input parameters for the Macro program. The
Macro programs must be installed in the NBI Server, and will be executed by the Tellabs 8000
manager NBI every time the OSS calls the executeMacro method with appropriate parameters.
The method executeMacro accepts the name of the macro program with or without the .mac
sufx. For example, the macro program OSSMacro.mac can be given to method executeMacro as
OSSMacro or OSSMacro.mac
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


30
5 How to Use JavaAPI
Most of the Tellabs 8000 manager Macro programs expect input parameters. Input parameters
are dened in the Macro program and are specic to each Macro. Input parameters can vary
in type or quantity. Every input parameter in a Macro has a name. The OSS Client should use
the input parameter names when building the macroArguments String. The generic format
for this string is:
<Arg1_name>=<value><space><Arg2_name>=<value>...<ArgN_name>=<value>
For Macro parameters of STRING type, the <value> must be enclosed in quotation marks ().
For example, let us assume a Macro le named OSSMacro.mac that expects one INT
parameter named NodeID and one STRING parameter named NodeName. When the OSS
Client calls the executeMacro method for a node with ID=10 named New Node under a
session with handleId = 100, the method should be called as follows:
executeMacro(100, OSSMacro, NodeID=10 NodeName=\New Node\)
5.10 Subscribing to the Tellabs 8000 Manager NBI Inventory and NBI
Alarm Notications
Subscribe to notications before using the getAll command to avoid loosing any
notications.
The mechanism implemented in JavaAPI to send event notications to the OSS Client is based on
the Observer Java Design Pattern (compare for example with the MouseListener interface in
Java). The OSS Client takes the role of Observer, and JavaAPI takes the role of Subject.
In this scenario, the OSS Client rst has to register as an Observer to JavaAPI. This is done
by calling the addChangeListener method. After that, the OSS Client can inform JavaAPI
from which object entities it is interested in receiving the notications. This is done by calling the
subscribeNotification method. As a summary, JavaAPI will start giving notications to
the client, when the client:
1. Implements the interface TolEventObserver and overrides all of its event processing methods.
2. Registers as an observer with method addChangeListener.
3. Subscribes to the notications.
After receiving the OSS Client registration and subscription, JavaAPI calls the appropriate event
processing methods implemented at the OSS Client application.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


31
5 How to Use JavaAPI
Fig. 5 Subscribing to NBI Inventory and NBI Alarm Notications
5.10.1 Implement TolEventObserver Interface
Implement interface TolEventObserver in your client application and override all its event
processing methods:
public class MyClientService implements TolEventObserver {
...
// Method addNotification is called when a new change message of type "add" occurs.
public void addNotification(TolAddEvent addEvent) {
...
}
// Method updateNotification is called when a new change message of type "update"
occurs.
public void updateNotification (TolUpdateEvent updateEvent) {
...
}
// Method delNotification is called when a new change message of type delete occurs.
public void delNotification(TolDelEvent delEvent) {
...
}
// Method systemNotification is called when a new system notication message occurs.
public void systemNotification(TolSystemEvent systemEvent) {
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


32
5 How to Use JavaAPI
...
{
// Method alarmNotification is called when a new alarm notication message occurs.
public void alarmNotification(TolAlarmEvent alarmEvent) {
...
}
}
5.10.2 Register as an Observer with addChangeListener Method
Register the OSS Client application as a listener to notications by calling the method
addChangeListener:
Method or TolService Description Parameters
addChangeListener Register the given Java class
as an observer to notications.
Note: the given java class
must implement the interface
TolEventObserver.
eventObserver
5.10.3 Check if Notications Are Supported for the Entity
NbifAttributeService provides methods for checking if notications are supported for an entity.
Also, NbifAttributeService provides you with methods for getting all entities.
5.10.4 Subscribe Commands for Subscribing to Inventory Entities
The following methods are available for getting notications on Inventory entities (NIMA in port
2462). Note that the NBI server does not support notications on Performance entities:
Method or TolService Description Parameters
subscribeNotification Subscribe to those entities for
which notications are wanted.
int handleId
ArrayList entityIds
unsubscribeNotifica-
tion
Unsubscribe all notications. int handleId
If you call the method subscribeNotification again, the old subscriptions are dropped
and the new list of entities will be subscribed to.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


33
5 How to Use JavaAPI
5.10.5 Subscribe Commands for Subscribing to Alarm Entities and System
Notications
The following methods are available for getting Alarm and System notications through the NBI
Fault and Provisioning adapter in port 2461:
Method or TolService Description Parameters
subscribeNotification Subscribe to those entities for
which notications are wanted.
int handleId
ArrayList entityIds
unsubscribeNotifica-
tion
Unsubscribe all notications int handleId
subscribeSystemNoti-
fication
Subscribe to systemnotications int handleId
unsubscribeSystemNo-
tification
Unsubscribe system
notications
int handleId
5.10.6 Handle the Received Inventory Notications
You have already implemented interface TolEventObserver in your client application and
overridden all of its event processing methods addNotification, updateNotification,
delNotification, alarmNotification, and systemNotification (see
5.10.1 Implement TolEventObserver Interface).
JavaAPI calls the event processing methods every time there is a new event coming from the
NBI service. For each of the notication types (Create, Attribute Value Change, Delete, Alarm,
System) there is a corresponding class (TolAddEvent, TolUpdateEvent, TolDelEvent,
TolAlarmEvent, TolSystemEvent) containing the methods that can be used to extract the
notication-specic data. The actual record data should be extracted using the TolResultSet
methods.
Create Notications
JavaAPI calls method addNotification (TolAddEvent addEvent) implemented in the
OSS client application when a new inventory object has been created in the Tellabs 8000 manager
system.
There are methods available for retrieving data from the TolAddEvent object which the method
addNotification gets as a parameter:
1. Method for getting the entity ID of the created object (int getEntityId()).
2. Method for getting the number of attributes of the created object (int getNumberOfAt-
tributes()).
3. Method for getting attribute IDs of the created object in an ArrayList (ArrayList getAt-
trIdList()).
4. Method for the getting the TolResultSet object containing values for each of the attributes (Tol-
ResultSet getAttrValueSet()).
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


34
5 How to Use JavaAPI
To retrieve the data from the TolResultSet object, use the methods of TolResultSet. TolResultSet is
described in 5.8.5 Retrieve the Result Data .
Attribute Value Change Notications
JavaAPI calls method updateNotification (TolUpdateEvent updateEvent)
implemented in the OSS client application, when there is a change in the Tellabs 8000 manager
system inventory data.
There are methods available for retrieving data from the TolUpdateEvent object which the method
updateNotification gets as a parameter. The TolUpdateEvent object contains data on the key
attributes and data on the changed attributes.
1. Method for getting the entity ID of the object, whose values have been changed (int getEn-
tityId()).
2. Method for getting the number of key attributes (int getNumberOfKeyAttributes()).
3. Method for getting the number of changed attributes (int getNumberOfChangeAt-
tributes()).
4. Method for getting key attribute IDs in an ArrayList (ArrayList getKeyAt-
trIdList()).
5. Method for getting attribute IDs of the changed attributes in an ArrayList (ArrayList
getChangeAttrIdList()).
6. Method for the getting the TolResultSet object containing key attribute values (TolResult-
Set getKeyAttrValueSet ()).
7. Method for the getting the TolResultSet object containing attribute values for the changed at-
tributes (TolResultSet getChangeAttrValueSet()).
To retrieve the data from the TolResultSet objects, use methods of TolResultSet. The use of
TolResultSet is described in 5.8.5 Retrieve the Result Data.
Delete Notications
JavaAPI calls method delNotification (TolDelEvent delEvent) implemented in the
OSS client application when an inventory object has been deleted from the Tellabs 8000 manager
system. There are methods available for retrieving data from the TolDelEvent object which the
method delNotication gets as a parameter.
1. Method for getting the entity ID of the deleted object (int getEntityId()).
2. Method for getting the number of key attributes (int getNumberOfKeyAttributes()).
3. Method for getting the key attribute IDs in an ArrayList (ArrayList getKeyAt-
trIdList()).
4. Method for the getting the TolResultSet object containing values for each of the key attributes
(TolResultSet getKeyAttrValueSet()).
To retrieve the data from the TolResultSet object, use methods of TolResultSet. The use of
TolResultSet is described in 5.8.5 Retrieve the Result Data.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


35
5 How to Use JavaAPI
5.10.7 Handle the Received Alarm Notications
You have already implemented the interface TolEventObserver in your client application and
overridden all of its event processing methods addNotification, updateNotification,
delNotification, alarmNotification, and systemNotification (see
5.10.1 Implement TolEventObserver Interface). JavaAPI calls method alarmNotification
(TolAlarmEvent alarmEvent) implemented in the OSS client application when there is
changed alarm data in the Tellabs 8000 manager system.
Notication handling of alarm notications is different from handling inventory notications. For
the NBI Inventory data, Tellabs 8000 manager NBI provides separate event notication for Create,
Attribute Value Change, and Delete events. For NBI alarm data, there is no concept of Create,
Delete, and AVC events. Whenever there is a change in a alarm object instance (NE alarm, service
alarm), the NBI will send a complete updated object to the OSS Client. This update message does
not contain information on what has happened to the object. Also, the update data can contain
information on more than one alarm record.
For example, in case of an existing NE Alarm whose status has turned from Active to Cleared, the
NBI sends a complete NE Alarm record with the Alarm Status attribute set to Clear, and with the
Clear Date set with the time stamp when the NE Alarm was cleared. There are methods available
for retrieving data from the TolAlarmEvent object which the method alarmNotification
gets as a parameter:
1. Method for getting the entity ID of the alarm object (int getEntityId()).
2. Method for the getting the TolResultSet object containing values for each of the attributes of
the alarm object (TolResultSet getAttrValueSet()).
To retrieve the data from the TolResultSet object, use methods of TolResultSet. The use of
TolResultSet is described in 5.8.5 Retrieve the Result Data.
Note that more than one alarm object can be included in the TolResultSet.
To get the attribute IDs of the alarm object, use the method ArrayList getAttrIdList() of the
TolResultSet object.
5.10.8 Handle the Received System Notications
You have already implement interface TolEventObserver in your client application and
overridden all of its event processing methods addNotification, updateNotification,
delNotification, alarmNotification, and systemNotification (see
5.10.1 Implement TolEventObserver Interface).
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


36
5 How to Use JavaAPI
JavaAPI calls method systemNotification (TolSystemEvent systemEvent)
implemented in the OSS client application when there is an error in the NBI service. There
is a method available for retrieving data from the TolSystemEvent object which the method
systemNotication gets as a parameter:
1. Method for getting the error code of the system notication (int getMessageType())
1. error code 1:
The NBI Kernel shutting down. Sent when the NBI Server Supervisor stops NBI Kernel
processes.
2. error code 2:
Notications lost. Internal processes of the NBI server are unexpectedly terminated, or
the server has lost connection to the database.
5.11 Acknowledging Alarms
The following method is available for acknowledging Network Element (NE) alarms through the
NBI Fault and Provisioning adapter in port 2461:
Command Description Parameters
acknowledgeAlarm acknowledges an NE alarm in
Tellabs 8000 manager
long handleId
int faultID
Method acknowledgeAlarm acknowledges the NE alarm, which has the given alarm ID (given
as a parameter faultId). Give as input the ID of one Network Element alarm which you want to
acknowledge.
5.12 Pinging the NBI Server to Verify that It Is Alive
Use ping commands to verify the status of the services on the NBI Server. Verify that the NBI
Server Inventory and Performance service (NIMA) is alive using the method pingNima of
TolService class:
public void pingNima (long pingPacketSize) throws IOException,
TolCommunicationException
Verify that the NBI Server Fault and Provisioning Service (NSA) is alive using the method
pingNsa of TolService class:
public void pingNsa () throws IOException, TolCommunicationExcep-
tion
For more information on the ping commands, refer to 6.2.5 Method pingNima and 6.2.6 Method
pingNsa.
5.13 Command Names and Codes
You do not have to worry about the command names or codes if you call the TolService methods
which carry out the commands.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


37
5 How to Use JavaAPI
If you want to create your own GUI for handling the commands by their names (or codes), you can
use JavaAPI classes TolType and TolTypeService.
The command codes and names are available in TolType class. You can use those variables directly
from TolType class (see 12.1 Values in TolType Class).
You can also use methods of TolTypeService class to get all command codes or names and to nd a
name for a command code and vice versa. For example, the methods listed below are available.
There are also methods in TolTypeService, which return (see 12.2 TolTypeService Methods for
Handling Commands):
1. All command names or codes (either Inventory and Performance or Alarm commands).
2. Command name for a command code and vice versa.
5.14 Close Session
After using the JavaAPI, release the threads and other resources by closing the socket using method
closeCommunication of TolService class.
Method closeSession expects the handleId of your session as a parameter.
public voidcloseSession(long handleId)
throws IOException, TolCommunicationException
5.15 Close Communication (Socket)
At the very end, close the socket using method openCommunication of TolService class
public void closeCommunication() throws IOException
JavaAPI commands allow managing the commands with names/symbols. However, the
corresponding IDs/codes are used in the communication between the Northbound Interface
and the JavaAPI. So in the byte streams between your OSS clients and the Northbound
Interface you would see only the IDs/codes.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


38
6 TolService Class
6 TolService Class
This class contains all methods needed to establish sessions to the Tellabs 8000 manager NBI and to
send request commands. Other classes (e.g. TolResultSet) should be used to process the Tellabs
8000 manager NBI response data.
To initiate a session to the Tellabs 8000 manager NBI, the OSS Client application should rst call
the openCommunication method to establish a communication path to the appropriate NBI
Server and TCP port. Once the communication is established, the OSS Client should login to the
NBI service by calling the openSession method.
Once the session is established, the OSS Client can subscribe to event notications by calling the
subscribeNotification method, send get requests using the getXXXData methods, and
send provisioning requests by using the executeMacro method.
The default constructor of TolService takes no parameter and prints trace messages on default
trace level:
TolService ()
Construct a new TolService object. Use default trace log level of JavaAPI.
Parameters
Exceptions
The alternative constructors of TolService take the trace level as a parameter.
TolService (int loglevel)
TolService(String loglevelname)
Construct a new TolService object and dene the trace log level of JavaAPI. Valid values for the
trace level are dened in class TolType (see 12.1.7 Trace Level.) If the given trace log level is
invalid, the default trace log level is used.
Parameters logLevel/loglevelName trace level for JavaAPI
Exceptions
For more information on the trace levels, see 6.7.1 Trace Level of JavaAPI.
The following sections describe all the methods available in the TolService class.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


39
6 TolService Class
6.1 Establishing Connections to the Tellabs 8000 Manager NBI
6.1.1 Method openCommunication for Opening Socket
Open a communication path to the Tellabs 8000 manager NBI. This is the rst method the OSS
Client should call to establish a connection to the Tellabs 8000 manager NBI. This method
establishes the TCP socket connection to the NBI server port.
void openCommunication (String hostAddress, int portNum-
ber)throws IOException
Parameters hostAddress (Input)
Species the IP address of the NBI server
computer
portNumber (Input)
Species the TCP port number of the NBI
service
Exceptions IOException is thrown if an I/O error occurs
6.1.2 Method closeCommunication for Closing Socket
Close communication path to the Tellabs 8000 manager NBI.
void closeCommunication () throws IOException
Exceptions IOException is thrown if an I/O error occurs
6.1.3 Method openSession
Opens an OSS Client session to the NBI service. This method should be called after a successful
execution of the openCommunication method. While openCommunication establishes a
connection to the NBI Server socket port, the openSession establishes a client session to the NBI
service. The OSS Client should include a OpenResultSet object as a parameter which will be lled
by JavaAPI with a Client HandleId that uniquely identies the session to the NBI service.
void openSession(String userName, String passWord, OpenResultSet
openResult) throws IOException, TolCommunicationException
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


40
6 TolService Class
Parameters userName (Input)
species the login name for the OSS Client session
passWord (Input)
species the password for the OSS Client session
openResult (Output)
OpenResultSet returned by Tellabs 8000 manager NBI
containing the handleId.
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication exception
occurs
6.1.4 Method closeSession
Close an OSS Client session to the NBI service.
void closeSession (int handleId) throws IOException,TolCommuni-
cationException
Parameters handleId (Input)
Client specic handle that is used to identify a
session
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication
exception occurs
6.2 Requesting Inventory or Performance Data from the Tellabs 8000
Manager NBI
6.2.1 Method getAllData
Populate resultSet with all objects within the requested inventory or performance entity.
To parse the resultSet data, the OSS Client should use the methods available in the TolResultSet
class. See description of the TolResultSet object in 7 TolResultSet Class.
void getAllData (long handleId, int entityId, ArrayList se-
lectedAttributes, TolResultSet resultSet) throws IOException,
TolCommunicationException, TolAttributeException
Parameters handleId (Input)
Client specic handle that is used to identify a
session
entityId (Input)
ID of requested inventory/performance entity
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


41
6 TolService Class
selectedAt-
tributes
(Input)
Arraylist containing the IDs or names of the
attributes that should be included in the returned
records. ArrayList must contain attribute IDs as
Integers and attribute names as Strings.
resultSet (Output)
Data set returned by the NBI containing all
objects with the requested attributes of the given
inventory/performance entity.
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication
exception occurs
TolAttributeException is thrown if the given entityId or the
selectedAttributes are incorrect
6.2.2 Method getFilteredAllData
Populate resultSet with those objects which match the given lters within the requested inventory or
performance entity (entityId).
For the GetFilteredAllData command you can give a lter which consist of one or more
logical conditions.
The logical condition is a condition on the values of one attribute. For example, you can have a
lter for the NODE entity where the logical condition is that the node hardware type attribute
has value 10017:
NODE_NHWTYPE = 10017
If you give more logical conditions in a lter, the logical conditions are joint with AND.
(Attribute1 operator1 value1) AND (Attribute2 operator2 value2) AND ... AND (AttributeN
operatorN valueN)
AttributeX means attribute (ID or name)
operatorX means lter type ( =, < , > , <= , >= , LIKE)
where
valueX means value used in ltering
The maximum of ten logical conditions (AttributeX operatorX valueX) can be applied in a lter.
For example, you can have a lter for the NODE entity where the logical condition is that the node
hardware type attribute has value 10017 and the node ID is in the range of 100 and 199:
( NODE_NHWTYPE = 10017 ) AND ( NODE_NID >= 100 ) AND ( NODE_NID
<= 199 )
The lter is given to the GetFilteredAll command in three ArrayLists:
ArrayList containing the lter attributes (IDs or names)
ArrayList containing the lter attribute values (by their types)
(OPTIONAL) ArrayList containing the lter types (codes or symbols)
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


42
6 TolService Class
If the lter type codes are not given, the default lter type (=) is used for all the logical conditions
in the lter.
For more information on the lter types refer to TolType class in 12.1.8 Filter Types Available for
GetFilteredAllData Command and to TolTypeService class in 12.5 TolTypeService Methods for
Handling Filter Types of Command GetFilteredAllData.
To parse the resultSet data, the OSS Client should then use the methods available in the TolResultSet
class. See the description of the TolResultSet object in 7 TolResultSet Class.
void getFilteredAllData(long handleId, int entityId, ArrayList
selectedAttributes, ArrayList filterAttributes, ArrayList fil-
terAttrValues, ArrayList filterTypes, TolResultSet resultSet)
throws IOException, TolAttributeException,TolCommunicationEx-
ception
or without specifying the lter types
void getFilteredAllData(long handleId, int entityId, ArrayList
selectedAttributes, ArrayList filterAttributes, ArrayList fil-
terAttrValues, TolResultSet resultSet) throws IOException,
TolAttributeException, TolCommunicationException
Parameters handleId (Input)
Client specic handle that is
used to identify a session.
entityId (Input)
ID of requested
inventory/performance entity.
selectedAttributes (Input)
Arraylist containing the IDs
or names of the attributes
that should be included in the
returned records. ArrayList
must contain attribute IDs as
Integers or attribute names as
Strings.
lterAttributes (Input)
Arraylist containing the
lter attribute IDs or names.
ArrayList must contain attribute
IDs as Integers or attribute
names as Strings.
lterAttrValues (Input)
Array list of lter attribute
values
lterTypes (Optional input)
Array list of lter types. The
lter types can be given as
symbols (string values) or as
codes (integer values).
resultSet (Output)
Result set that contains received
attribute values from the NBI
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


43
6 TolService Class
Possible lter types are:
Code Symbol
FILTER_TYPE_EQUAL "="
FILTER_TYPE_LESS "<"
FILTER_TYPE_GREATER ">"
FILTER_TYPE_LESS_OR_EQUAL "<="
FILTER_TYPE_GREATER_OR_EQUAL ">="
FILTER_TYPE_LIKE "LIKE"
If this input is not given, FILTER_TYPE_EQUAL = is used for all the given lters.
See the description of TolType to see the methods available for handling the lter codes.
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a
communication exception occurs
TolAttributeException is thrown if an attribute
exception occurs
Chapter 5.8.4 Managing the Input Parameters of the Get Commands provides more information on
how to use the parameters of the GetFilteredAllData command.
6.2.3 Method getOneData
Populate resultSet with one object from the given inventory entity. Method getOnedata is not
supported to Performance entities. To call this method the OSS Client application must include the
IDs and values of the key attributes as parameters to select a unique record from the entity.
To parse the resultSet data, the OSS Client should use the methods available in the TolResultSet
class. See description of the TolResultSet object in 7 TolResultSet Class.
void getOneData (long handleId, int entityId, ArrayList selecte-
dAttributes, ArrayList keyAttributes, ArrayList keyAttrValues,
TolResultSet resultSet) throws IOException, TolCommunicationEx-
ception, TolAttributeException
Parameters handleId (Input)
Client specic handle that is used to
identify a session
entityId (Input)
ID of requested inventory/performance
entity
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


44
6 TolService Class
selectedAttributes (Input)
Arraylist containing the IDs or names
of the attributes that should be included
in the returned records. ArrayList must
contain attribute IDs as Integers or
attribute names as Strings.
keyAttributes (Input)
Arraylist containing the key attribute
IDs or names. ArrayList must contain
attribute IDs as Integers or attribute
names as Strings.
keyAttrValues (Input)
Array list of key attribute values
resultSet (Output)
Result set that contains received attribute
values from the NBI
Exceptions IOException is thrown if an I/O error occurs.
TolCommunicationException is thrown if a communication
exception occurs.
TolAttributeException is thrown if an attribute exception
occurs.
6.2.4 Method getIntervalData (Deprecated)
Method getIntervalData exists only for downward compatibility reasons. It is recommended
to use method getFilteredAllData instead (see 6.2.2 Method getFilteredAllData).
This method can be called by the OSS Client to retrieve objects of a specic the Tellabs 8000
manager NBI performance entity for a specic date interval range. The method is supported only for
a limited set of performance entities, e.g. 24hour G.82x Circuit Performance data from the Tellabs
8000 manager NBI. In this case, the method populates resultSet with all performance records of a
given Circuit for a specied date interval. The key attributes that should be used are Circuit ID,
Performance Date (with a start date), and again Performance Date (with an end date).
(deprecated method) void getIntervalData (long handleId, int en-
tityId, ArrayList selectedAttributes, ArrayList keyAttributes,
ArrayList keyAttrValues, TolResultSet resultSet) throws IOEx-
ception, TolCommunicationException, TolAttributeException
Parameters handleId (Input)
Client specic handle that is used to
identify a session
entityId (Input)
ID of requested performance entity
selectedAttributes (Input)
Arraylist containing the IDs or names
of the attributes that should be included
in the returned records. ArrayList must
contain attribute IDs as Integers or
attribute names as Strings.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


45
6 TolService Class
keyAttributes (Input)
Arraylist containing the key attribute
IDs or names. ArrayList must contain
attribute Ids as Integers or attribute
names as Strings.
keyAttrValues (Input)
Array list of key attribute values
resultSet (Output)
Result set that contains received attribute
values from the NBI
Exceptions IOException is thrown if an I/O error occurs.
TolCommunicationException is thrown if a communication
exception occurs.
TolAttributeException is thrown if an attribute exception
occurs.
6.2.5 Method pingNima
The PingNima command requests a reply from the NBI Server Inventory and Performance Service
(NIMA). The reply contains as many data bytes as specied as the packet size.
Exceptions are thrown if pinging fails. In case of success, pingNima does not return anything.
void pingNima (long packetsize) throws IOException, TolCommuni-
cationException
Parameters packet size (Input) Size of the wanted ping reply
Exceptions IOException is thrown if an I/O error occurs.
TolCommunicationException is thrown if Ping fails.
6.2.6 Method pingNsa
The PingNsa command requests a reply from the NBI Server Fault and Provisioning Service
(NSA). Exceptions are thrown if pinging fails. In case of success, pingNsa does not return
anything.
void pingNsa () throws IOException, TolCommunicationException
Parameters packet size (Input) Size of the wanted ping reply
Exceptions IOException is thrown if an I/O error occurs.
TolCommunicationException is thrown if Ping fails.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


46
6 TolService Class
6.3 Requesting Alarm Data from the Tellabs 8000 Manager NBI
6.3.1 Method getActiveAlarmData
The method requests active alarm data from the Tellabs 8000 manager NBI and supports only
alarm entities.
Populate resultSet with all current alarm objects within the requested alarm entity. The NBI
alarm object entities are: NE alarm, extended NE alarm, service alarm, extended service
alarm. To parse the resultSet data, the OSS Client should then use the methods available
in the TolResultSet class. To get a list of the attributes returned in the TolResultSet, use
method TolResultSet.getAttrIdList(). See description of the TolResultSet class in
7 TolResultSet Class.
void getActiveAlarmData (long handleId, int entityId, TolResult-
Set resultSet) throws IOException, TolCommunicationException,
TolAttributeException
Parameters handleId (Input)
Client specic handle that is used to
identify a session
entityId (Input)
ID of requested alarm entity
resultSet (Output)
Data set returned by the NBI containing
all objects of the given alarm entity
Exceptions IOException is thrown if an I/O error occurs.
TolCommunicationException is thrown if a communication
exception occurs.
TolAttributeException is thrown if an attribute exception
occurs
6.3.2 Method getAllData for Getting Alarms
Populate resultSet with all objects within the requested alarm entity.
To parse the resultSet data, the OSS Client should use the methods available in the TolResultSet
class. See description of the TolResultSet object in 7 TolResultSet Class.
Alarm records always contain all available attributes and the attributes are always returned in
the prespecied order.
To use the method GetAllData to get all active alarms, you have to give the list of the selected
attributes containing all the available attributes in the prespecied order. Alternatively to this
method, you can use method GetActiveAlarmData (see 6.3.1 Method getActiveAlarmData)
to which you do not have to specify the attributes.
void getAllData (long handleId, int entityId, ArrayList se-
lectedAttributes, TolResultSet resultSet) throws IOException,
TolCommunicationException, TolAttributeException
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


47
6 TolService Class
Parameters handleId (Input)
Client specic handle that is used to identify a
session
entityId (Input)
ID of requested alarm entity
selectedAt-
tributes
(Input)
Arraylist containing the IDs or names of all
attributes of the requested alarm entity in the
prespecied order. ArrayList must contain
attribute IDs as Integers and attribute names as
Strings.
resultSet (Output)
Data set returned by the NBI containing all
objects with all attributes of the given alarm
entity.
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication
exception occurs
TolAttributeException is thrown if the given entityId or the
selectedAttributes are incorrect
6.4 Acknowledging Alarms
6.4.1 Method acknowledgeAlarm
The method acknowledges an NE alarm in Tellabs 8000 manager. An alarm ID of a network element
alarm must be provided as input to the method.
Exceptions are thrown if acknowledging the alarm fails. In case of success, acknowledgeAlarm
does not return anything.
Parameters handleId (Input)
Client specic handle that is used to
identify a session
faultId (Input)
ID of alarm to be acknowledged
Exceptions IOException is thrown if an I/O error occurs.
TolCommunicationException is thrown if a communication
exception occurs.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


48
6 TolService Class
6.5 Executing the Tellabs 8000 Manager NBI Conguration Changes
(Macros)
Conguration changes, similar to provisioning operations, are possible through the ExecuteMacro
feature of the Tellabs 8000 manager NBI. The executeMacro method allows the OSS to
request the NBI Server to execute a Macro program with given arguments. When calling the
executeMacro method, the OSS must specify the name of the Tellabs 8000 manager Macro
program and the input parameters for the Macro program. The Macro programs must be installed in
the NBI Server, and will be executed by the Tellabs 8000 manager NBI every time the OSS calls the
executeMacro method with appropriate parameters.
void executeMacro (long handleId, String macroFileName, String
macroArguments) throws IOException, TolCommunicationException
Parameters handleId (Input)
Client specic handle that is used to
identify a session
macroFileName (Input) (Input)
Name of the macro le with or without
the .mac extension
macroArguments (Input)
Input string for the macro program.
timeout (Input, optional)
Timeout for the macro execution in
seconds. If value is not given, the
default is 1000s. Value 0 means no
timeout.
Exceptions IOException is thrown if an I/O error occurs.
TolCommunicationException is thrown if a communication
exception occurs.
TolAttributeException is thrown if an attribute exception
occurs
For more information on how to use the macros, refer to 5.9 Provisioning with Macros.
6.6 Subscribing to the Tellabs 8000 Manager NBI Inventory and NBI
Alarm Notications
For instructions on how the notications work and how to use them, see 5.10 Subscribing to the
Tellabs 8000 Manager NBI Inventory and NBI Alarm Notications.
To summarize, JavaAPI starts giving notications to the client, when the client
1. Implements interface TolEventObserver and overrides all of its event processing methods.
2. Registers itself as an observer with method addChangeListener.
3. Subscribes to the notications.
JavaAPI, after receiving the OSS Client registration and subscription, will call the appropriate event
processing methods implemented at the OSS Client application.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


49
6 TolService Class
Below are the notication subscription methods available in the TolService class. The
TolEventObserver methods are explained later in this document.
6.6.1 Method addChangeListener
The OSS Client application should use this method to register itself to JavaAPI (e.g. informing that
it implements the TolEventObserver interface).
void addChangeListener (TolEventObserver eventObserver)
Parameters eventObserver (Input)
Object that contains methods to
process change events
Exceptions
6.6.2 Method removeChangeListener
Removes OSS Client registration from JavaAPI.
void removeChangeListener()
Parameters
Exceptions
6.6.3 Method subscribeNotication
This method should be called after the addChangeListener method. The OSS Client uses this
method to inform JavaAPI what the object entities are that it wants to receive event notications
from. This method should be used to subscribe to NBI Inventory and NBI Alarm entities.
In the Tellabs 8100 manager up to R14 and the Tellabs 8000 manager up to R15, the method
subscribeNotification should be called only once and should contain all the entities the
OSS Client is interested in.
In the Tellabs 8000 manager R15A or newer, the method subscribeNotification can be
called many times and the new entities are also subscribed. However, the Northbound Interface
Server ini les must be congured to dene those entities which can be subscribed to. See the
installation document of the NIMA; this document is provided by Tellabs Oy Professional Services.
void subscribeNotification(int handleId, ArrayList selectedEnti-
ties) throws IOException, TolCommunicationException
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


50
6 TolService Class
Parameters handleId (Input)
Client specic handle that is
used to identify a session
selectedEntities (Input)
Array list containing the IDs or
names of the requested change
message entities. ArrayList
must contain either entity IDs
as Integers or entity names as
Strings.
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication
exception occurs
6.6.4 Method unsubscribeNotication
The OSS Client uses this method to inform that it wants to stop receiving event notications.
void unsubscribeNotification(int handleId) throws IOExcep-
tion,TolCommunicationException
Parameters handleId (Input)
Client specic handle that is
used to identify a session
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication
exception occurs
6.6.5 Method subscribeSystemNotication
This method should be called after the addChangeListener method. The OSS Client uses this
method to inform that it wants to receive system notications.
void subscribeSystemNotification(int handleId) throws IOExcep-
tion,TolCommunicationException
Parameters handleId (Input)
Client specic handle that is
used to identify a session
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication
exception occurs
6.6.6 Method unsubscribeSystemNotication
The OSS Client uses this method to inform that it wants to stop receiving system notications.
void unsubscribeSystemNotification(int handleId) throws IOExcep-
tion,TolCommunicationException
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


51
6 TolService Class
Parameters handleId (Input)
Client specic handle that is
used to identify a session
Exceptions IOException is thrown if an I/O error occurs
TolCommunicationException is thrown if a communication
exception occurs
6.7 Settings of TolService
6.7.1 Trace Level of JavaAPI
JavaAPI prints to trace only those messages which have a higher importance than the selected
trace level.
The default trace level is TolType.TRACELEVEL_ONLY_ERRORS.
The trace level is the same in classes TolService and NBifAttributeValueService.
The trace level can be set (or changed)
in the constructor of TolService
in the constructor of NBifAttributeValueService
using the method setLoglevel in TolService class.
TolService class provides the following methods for handling the trace log level:
int getLoglevelCode()
String getLoglevelName)
Get the trace level of the TolService.
Parameters
Exceptions
Method getLoglevelCode returns the code of the trace log level
Method getLoglevelName returns the name of the trace log level
void setLoglevel(int newLogLevel) throws TolAttributeException
void setLoglevel(String newLogLevelName) throws TolAttributeEx-
ception
Change the trace level of the TolService. Valid values for the trace level are dened in class
TolType (see 12.1.7 Trace Level).
Parameters newLogLevel (Input)
new trace level.
Exceptions TolAttributeException is thrown if the given value is not a valid
trace level
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


52
6 TolService Class
You can use the trace level codes and names of class TolType, e.g.
TolType.TRACELEVEL_ONLY_ERRORS /TolType.CN_TRACELEVEL_ONLY_ERRORS
as parameters. To create a GUI for managing the trace level, you can also use methods of
TolTypeService for getting all trace level codes or names and for getting the trace level name for a
trace level code and vise versa. See 12 TolType and TolTypeService Classes for more information
on classes TolTypes and TolTypeService.
6.7.2 Datetime Pattern of JavaAPI
JavaAPI prints out datetimes and requires data times to be inserted in a certain pattern. The pattern
is common (static) in JavaAPI. Changing the pattern affects all places where datetimes are used.
1. The datetime pattern is used when printing out results containing datetime attributes with the
methods of TolResultSet class.
2. The datetime pattern is needed in class TolService, when giving datetime values as input to
commands GetFilteredAllData (or GetIntervalData).
The default Datetime pattern is " dd.MM.yyyy HH:mm:ss:SSS".
You can change the datetime pattern of JavaAPI
1. with set-methods of TolService
2. with set-methods of a TolDateTime object (see 15.5.1 TolDateTime Class).
TolService provides the following methods for handling the datetime pattern:
String getTolDateTimePattern()
Method returns the pattern in which Datetime values must be given to TolService.
Parameters
Exceptions

void setTolDateTimePattern(String pattern)
Method changes the pattern in which Datetime values are given to TolService. For detailed
information on the valid Datetime patterns, see the standard Java documentation. Some examples of
the patterns are given here:
Date and Time Pattern Result
d.MM.yyyy HH:mm:ss:SSS. 04.07.2001 12:08:56:123
yyyy-MM-dd HH:mm:ss.SSS. 2001-07-04 12:08:56.123
yyyy.MM.dd G at HH:mm:ss z 2001.07.04 AD at 12:08:56 PDT
EEE, MMM d, y Wed, Jul 4, 01
h:mm a 12:08 PM
Parameters pattern new pattern which is used as input to
SimpleDateFormat
Exceptions TolAttributeException is thrown if the given pattern is null or invalid.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


53
7 TolResultSet Class
7 TolResultSet Class
This class contains the methods to read and parse the Tellabs 8000 manager NBI response data.
Response data is sent by Tellabs 8000 manager NBI as TolResultSet objects. TolResultSet includes
a buffer containing NBI objects (records). Each record is composed of attributes. For information
how to use the TolResultSet and for gures of the TolResultSet, see 5.8.5 Retrieve the Result Data.
The default constructor creates the TolResultSet object, which the OSS Client application needs to
create for Get commands.
TolResultSet ()
Construct a new TolResultSet object. The OSS Client should always construct a TolResultSet
before calling the TolService methods.
TolResultSet result = new TolResultSet();
7.1 Scanning the Tellabs 8000 Manager NBI Response Records
boolean getNext ()
The OSS Client should call this method to point to a new record in a TolResultSet. When called for
the rst time for a returned TolResultSet it will point to the rst record in the TolResultSet. Returns
false, when there are no more records in the TolResultSet.
Parameters
Exceptions
int getRecordSize ()
Return the size (in bytes) of one record in a TolResultSet. Note that all records in the same
TolResultSet will always have the same size.
Parameters
Exceptions
int getNumberOfRecords ()
Return the number of records in a TolResultSet.
Parameters
Exceptions
int getDataSize ()
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


54
7 TolResultSet Class
Return the size (in bytes) of the response data in a TolResultSet.
Parameters
Exceptions
ArrayList getAttrIdList ()
Parameters
Exceptions
Return an array with the attribute IDs contained in the TolResultSet.
7.2 Extracting Attributes from a Record
By using the methods described above, the OSS Client is able to scan through the TolResultSet to
fetch the records in the Tellabs 8000 manager NBI response. The methods described in this section
are then used to extract the attributes contained in one record. To extract attribute values, the
OSS Client can use two approaches:
1. Extract all attributes as string values.
2. Extract each attribute in its native data type (byte, short, int, String, byte[ ], TolDateTime).
Developers of the OSS Client can choose which one is more appropriate. In both cases, the OSS
Client must know the entity in a TolResultSet, and the IDs of the attributes to be extracted. In the
case of extracting attributes in its native data type, the OSS Client must also know the data type of
the attribute in order to call the correct getValueXX() method, otherwise the getValueXX()
method throws a TolAttributeException.
7.2.1 Method getValueAsString
This method returns an attribute value always in a string format, regardless of the attributes native
data type.
For attributes with native data type TolDateTime, the returned string is in the datetime format
of JavaAPI.
For more information on the datetime format, see 6.7.2 Datetime Pattern of JavaAPI.
For attributes with native data type Byte[ ], the returned string is in the format Hex String.
string getValueAsString (int attrId) throws TolAttributeExcep-
tion
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attribute ID is not valid.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


55
7 TolResultSet Class
7.2.2 Method getValueByte
Return a signed byte with value ranging between (-128,127) from a TolResultSet record.
byte getValueByte (int attrID throws TolAttributeException
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is not
NIMA_DT_BYTE or if the attribute ID is not valid.
7.2.3 Method getValueShort
Return a signed short value from a TolResultSet record.
short getValueShort(int attrId) throws TolAttributeException
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is not
NIMA_DT_SHORT or if the attribute ID is not valid.
7.2.4 Method getValueInt
Return a signed int value from a TolResultSet record.
int getValueInt (int attrId) throws TolAttributeException
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is not
NIMA_DT_LONG or if the attribute ID is not valid
7.2.5 Method getValueDouble
Return a signed double value from a TolResultSet record.
double getValueDouble (int attrId) throws TolAttributeException
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is not
NIMA_DT_DOUBLE or if the attribute ID is not valid
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


56
7 TolResultSet Class
7.2.6 Method getValueLong64
Return a Long64 i.e. an 8-byte-integer value from a TolResultSet record.
long getValueLong64 (int attrId) throws TolAttributeException
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is not
NIMA_DT_LONG64 or if the attribute ID is not valid
7.2.7 Method getValueDate
Return a TolDateTime value from a TolResultSet record.
TolDateTime getValueDate (int attrId) throws TolAttributeExcep-
tion
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is not
NIMA_DT_DATETIME or if the attribute ID is not valid
7.2.8 Method getValueString
Return a string value from a TolResultSet record.
String getValueString (int attrId) throws TolAttributeException
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is not
NIMA_DT_CHARARRAY or if the attribute ID is not valid
7.2.9 Method getValueBytes
Return an array of bytes from a TolResultSet record.
byte[]getValueBytes(int attrId) throws TolAttributeException
Parameters attrId (Input)
ID of the requested attribute
Exceptions TolAttributeException is thrown if given attributes data type is
not NIMA_DT_BYTEARRAY or NIMA_DT_CL_BYTEARRAY or if the
attribute ID is not valid
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


57
7 TolResultSet Class
7.3 Datetime Pattern of TolResultSet
TolResultSet uses the datetime pattern of JavaAPI. Method getValueAsString presents
attributes which are of data type TolDateTime, in the datetime pattern of JavaAPI. You can manage
the datetime pattern with methods of TolService (see 6.7.2 Datetime Pattern of JavaAPI).
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


58
8 NbifAttributeInfo and NbifAttributeService Classes
8 NbifAttributeInfo and NbifAttributeService
Classes
NbifAttributeInfo class contains the constant values for data entities and attributes.
NbifAttributeService class contains the methods for handling the data entities and attributes.
NbifAttributeService class also contains denitions of the data types (due to compatibility with
older releases, the data types must be dened in class NbifAttributeService). Additionally,
NbifAttributeService class contains methods for getting the capacity vectors and example values.
8.1 Entity IDs and Names
The entity IDs and names can be used directly from the NbifAttributeInfo class:
Variable in NbifAttributeInfo Class Description
NbifAttributeInfo.NIMA_CI__
1
Entity ID for an Inventory or Performance entity
NbifAttributeInfo.NIMA_CN__
1
Entity name for an Inventory or Performance entity
NbifAttributeInfo.NSA_CI__
1
Entity ID for an Alarm entity
NbifAttributeInfo.NSA_CN__
1
Entity name for an Alarm entity
Example:
int entityId = NbifAttributeInfo.NIMA_CI_IFACE; //the entity ID for interface entity
8.2 Attribute IDs and Names
The attribute IDs and names can be used directly from the NbifAttributeInfo class:
Variable in NbifAttributeInfo Class Description
NbifAttributeInfo.NIMA_AI__
1
__
2
Attribute ID for an Inventory or Performance entity
NbifAttributeInfo.NIMA_AN__
1
__
2
Attribute name for an Inventory or Performance
entity
NbifAttributeInfo.NSA_AI__
1
__
2
Attribute ID for an Alarm entity
NbifAttributeInfo.NSA_AN__
1
__
2
Attribute name for an Alarm entity
Example:
1
Is the entity
2
Is the attribute
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


59
8 NbifAttributeInfo and NbifAttributeService Classes
int attrId = NbifAttributeInfo.NIMA_AI_IFACE_NID; //the attribute ID for attribute nid of
entity iface
For Inventory and Performance entities you can select as many attributes as you like, in any order.
To get the data faster, it is recommended to select only those attributes which are of importance to
your OSS Client application.
For an Alarm entity ALL attributes must be selected in a predened order. Instead of taking the
attributes one by one from the NbifAttributeInfo, it is recommended to get them all with the
method ArrayList getAttrIdArrayList(int entityId). It is also possible to use the
command getActiveAlarmData() which does not require giving the selected attributes.
8.3 Methods for Handling Entities
8.3.1 Methods that Return All Entities
ArrayList
getManagedEntityObjectsInArrayList ()
ArrayList
getManagedEntityIdsInArrayList ()
String
getManagedEntityIdsInString ()
ArrayList
getManagedEntityNamesInArrayList ()
These methods return all supported entities. Inventory and Performance as well as Alarm entities
are included.
Method getManagedEntityObjectsInArrayList returns all NbifEntity objects in an
ArrayList.
Method getManagedEntityIdsInArrayList returns all entity IDs in an ArrayList.
Method getManagedEntityIdsInString returns the entity IDs in a string separated by
commas.
Method getManagedEntityNamesInArrayList returns all entity NAMES in an
ArrayList.
Parameters
Exceptions
8.3.2 Methods that Return Inventory and Performance Entities
ArrayList
getManagedEntityNimaObjectsInArrayList ()
ArrayList
getManagedEntityNimaIdsInArrayList ()
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


60
8 NbifAttributeInfo and NbifAttributeService Classes
String
getManagedEntityNimaIdsInString ()
ArrayList
getManagedEntityNimaNamesInArrayList ()
Returns all supported Inventory and Performance entities. These entities are available when
connecting to the server through port for NBI Inventory and Performance adapter (see also
1 Introduction to JavaAPI).
Method getManagedEntityNimaObjectsInArrayList returns all the Inventory and
Performance NbifEntity objects in an ArrayList.
Method getManagedEntityNimaIdsInArrayList returns all the Inventory and Perfor-
mance entity IDs in an ArrayList.
Method getManagedEntityNimaIdsInString returns all the Inventory and Performance
entity IDs in a string separated by commas.
Method getManagedEntityNimaNamesInArrayList returns all the Inventory and Per-
formance entity NAMES in an ArrayList
Parameters
Exceptions
8.3.3 Methods that Return Alarm Entities
ArrayList
getManagedEntityNsaObjectsInArrayList ()
ArrayList
getManagedEntityNsaIdsInArrayList ()
String
getManagedEntityNsaIdsInString ()
ArrayList
getManagedEntityNsaNamesInArrayList ()
Returns all supported Alarm entities. These entities are available when connecting to the server
through port for NBI Fault and Provisioning adapter (see also 1 Introduction to JavaAPI).
Method getManagedEntityNsaObjectsInArrayList returns all Alarm entity
NbifEntity objects in an ArrayList.
Method getManagedEntityNsaIdsInArrayList returns the Alarm entity IDs in an Ar-
rayList.
Method getManagedEntityNsaIdsInString returns the Alarmentity IDs in a string sep-
arated by commas.
Method getManagedEntityNsaNamesInArrayList returns the Alarm entity NAMES
in an ArrayList.
Parameters
Exceptions
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


61
8 NbifAttributeInfo and NbifAttributeService Classes
8.3.4 Method getEntityName
Returns the name of the given entity or text UNKNOWN if the entity is unknown.
String getEntityName (int entityId)
Parameters entityId (Input)
ID of the entity
Exceptions
8.3.5 Method getEntityIdForEntityName
Returns the ID of the given entity name.
int getEntityIdForEntityName (String entityName) throws TolAt-
tributeException
Parameters entityId (Input)
ID of the entity
Exceptions TolAttributeException is thrown if the entity name is invalid.
8.3.6 Method getEntityObject
Returns the NbifEntity object of the given entity or null, if the entity is not found.
NbifEntity getEntityObject (int entityId)
NbifEntity getEntityObject(String entityname)
Parameters entityId/ entityname (Input)
ID/name of the entity attrId
Exceptions
8.3.7 Method isAlarmEntity
Returns true if the given entity is an alarm entity. Returns false if the entity is not an alarm entity
or if the entity is unknown.
boolean isAlarmEntity (int entityId)
boolean isAlarmEntity (String entityname)
Parameters entityId/ entityname (Input)
ID/name of the entity
Exceptions

Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


62
8 NbifAttributeInfo and NbifAttributeService Classes
8.3.8 Method isEclEntity
Returns true if the given entity is the Tellabs 8000 manager Provisioning related entity (ECL entity).
Returns false if the entity is not a ECL entity or if the entity is unknown.
boolean isEclEntity (int entityId)
boolean isEclEntity (String entityname)
Parameters entityId/ entityname (Input)
ID/name of the entity attrId
Exceptions
8.3.9 Method getEntityNoticationSupport
Returns true if notications are supported for the given entity. Returns false if notications are not
supported or if the entity is unknown.
boolean getEntityNotificationSupport (int entityId)
boolean getEntityNotificationSupport (String entityname)
Parameters entityId/ entityname (Input)
ID/name of the entity attrId
Exceptions
8.4 Methods for Handling Attributes
8.4.1 Methods that Return Attributes
ArrayList
getAttributeObjectsInArrayList(int entityId) throws
TolAttributeException
ArrayList
getAttributeIdsInArrayList(int entityId) throws TolAttributeEx-
ception
String
getAttributeIdsInString (int entityId)
Returns all attributes of the given entity.
Method getAttributeObjectsInArrayList returns NbifAttribute objects of the given
entity in an ArrayList.
Method getAttributeIdsInArrayList returns attribute IDs of the given entity in an Ar-
rayList.
Method getAllAttributes returns all attribute IDs of the given entity in a string separated
by commas.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


63
8 NbifAttributeInfo and NbifAttributeService Classes
Parameters entityId (Input)
ID of the entity
Exceptions TolAttributeException is thrown if the given entity is unknown.
8.4.2 Method getAttributeNamesInArrayList
ArrayList getAttributeNamesInArrayList(int entityId, boolean
ordered)throws TolAttributeException
Returns all attribute NAMEs of the given entity in an ArrayList. The names can be returned
either in an alphabetical order or in the order of the attribute IDs. In the order of attribute IDs
the most important attributes are listed rst (e.g. for the node entity the attributes ID and name).
Parameters entityId/ entityname (Input)
ID of the entity
ordered (Input)
Boolean true if names are wanted in
an alphabetical order.
Boolean false if names are wanted in
the order of the IDs.
Exceptions TolAttributeException is thrown if the given entity is unknown.
8.4.3 Method getNumberOfKeyAttributes
short getNumberOfKeyAttributes (int entityId)
Returns the number of key attributes of the given entity.
Parameters entityId (Input)
ID of the entity
Exceptions
8.4.4 Methods that Return Key Attributes
ArrayList
getKeyAttributeObjectsInArrayList (int entityId) throws
TolAttributeException
ArrayList
getKeyAttributeIdsInArrayList(int entityId) throws
TolAttributeException
String
getKeyAttributeIdsInString (int entityId) throws TolAttribu-
teException
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


64
8 NbifAttributeInfo and NbifAttributeService Classes
ArrayList
getKeyAttributeNamesInArrayList(int entityId) throws
TolAttributeException
String
getKeyAttributeNamesInString (int entityId) throws
TolAttributeException
Returns the key attributes of the given entity.
Method getKeyAttributeObjectsInArrayListreturns the NbifAttribute objects of the
key attributes given entity in an ArrayList.
Method getKeyAttributeIdsInArrayList returns the key attribute IDs of the given en-
tity in an ArrayList.
Method getKeyAttributeIdsInString returns the key attribute IDs of the given entity
in one comma separated string.
Method getKeyAttributeNamesInArrayList returns the key attribute names of the
given entity in an ArrayList.
Method getKeyAttributeNamesInString returns the key attribute names of the given
entity in a one comma separated string.
Parameters entityId (Input)
ID of the entity
Exceptions TolAttributeException is thrown if the entity ID is invalid.
8.4.5 Method getAttributeObject
NbifAttribute getAttributeObject (int attrID)
Returns the NbifAttribute object of the given attribute or null, if the attribute is unknown.
Parameters attrId (Input)
ID of the attribute
Exceptions
NbifAttribute getAttributeObject (String attrName, int Entity)
Returns the NbifAttribute object of the given attribute or null, if the attribute is unknown.
Parameters attrName (Input)
name of the attribute
Entity (Input)
ID of the entity of the attribute
Exceptions
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


65
8 NbifAttributeInfo and NbifAttributeService Classes
8.4.6 Method getAttributeIdForAttributeName
int getAttributeIdForAttributeName(String attrName, int enti-
tyId) throws TolAttributeException
int getAttributeIdForAttributeName(String attrName,String enti-
tyname) throws TolAttributeException
Returns the ID of the given attribute
Parameters attrName (Input)
name of the attribute
entityId / entityname (Input)
ID or name of the entity of the
attribute
Exceptions TolAttributeException is thrown if the given attribute is unknown.
8.4.7 Method getAttributeEntityId
int getAttributeEntityId (int attrId) ) throws TolAttributeEx-
ception
Returns the entity ID of the given attribute.
Parameters attrId (Input)
ID of the attribute
Exceptions TolAttributeException is thrown if the given attribute is unknown.
8.4.8 Method getAttributeName
String getAttributeName (int attrId)
Returns the name of the given attribute or text UNKNOWN, if the attribute is unknown.
Parameters attrId (Input)
ID of the attribute
Exceptions
8.4.9 Method getAttributeDataTypeCode
int getAttributeDataTypeCode (int attrId)
Returns the data type code of the given attribute. The data type code is a data type code dened
by the NbifAttributeService, e,g NbifAttributeService.NIMA_DT_SHORT.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


66
8 NbifAttributeInfo and NbifAttributeService Classes
Parameters attrId (Input)
ID of the attribute
Exceptions
8.4.10 Method getAttributeDataTypeDesc
String getAttributeDataTypeDesc (int attrId)
Returns the data type of the given attribute as clear text, e.g.. "byte", "short", "int", "String".
For more information on the possible data types, see 8.7 Attribute Data Type Denition.
Parameters attrId (Input)
ID of the attribute
Exceptions

8.4.11 Method getAttributeDataLength
int getAttributeDataLength (int attrId)
Returns the length of the given attribute
Parameters attrId (Input)
ID of the attribute
Exceptions

8.4.12 Method getAttributeIsKey
boolean getAttributeIsKey (int attrId) ) throws TolAttributeEx-
ception
Returns boolean true if the attribute is a key attribute.
Parameters attrId (Input)
ID of the attribute
Exceptions TolAttributeException is thrown if the given attribute is unknown.
8.5 Methods for Parsing Strings
The parsing methods throws TolAttributeExceptions in case of failure and also write to
trace log of JavaAPI.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


67
8 NbifAttributeInfo and NbifAttributeService Classes
8.5.1 Method parseEntities
ArrayList
parseEntities(String param) throws TolAttributeException
Method parseEntities parses the entity IDs OR NAMEs from a string separated by commas
and inserts the corresponding entity IDs to an ArrayList as Integer values.
Parameters String param (Input)
String with entity IDs (Integers)
separated by commas or entity
names (Strings)
Exceptions TolAttributeException is thrown if the given string does not contain
entity names or IDs.
8.5.2 Method parseOneEntity
int parseOneEntity(String name)throws TolAttributeException
MethodparseEntities parses ONE entity ID OR NAME from a string and returns the
corresponding entity ID.
Parameters String name (Input)
String with one entity ID (Integer)
or name (String)
Exceptions TolAttributeException is thrown if the given string does not contain
an entity name or ID.
8.5.3 Method parseAttributes
ArrayList parseAttributes(String param, int Entity) throws To-
lAttributeException
Method parseAttributes parses the attribute IDs OR NAMEs from a string and inserts the
corresponding attribute IDs to an ArrayList as Integer values.
Parameters String param (Input)
String with comma-separated
attribute IDs (Integers) or attribute
names (Strings)
int Entity (Input)
ID of the entity (note: the entity is
needed since the attribute names are
not unique)
Exceptions TolAttributeException is thrown if the given string does not contain
an attribute name or ID.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


68
8 NbifAttributeInfo and NbifAttributeService Classes
8.5.4 Method parseOneAttribute
int parseOneAttribute(String attrname, int Entity) throws To-
lAttributeException
Method parseAttributes parses ONE attribute ID OR NAME from a string and returns the
corresponding attribute ID
Parameters String attrname (Input)
String with one attribute ID (Integer)
or name (String)
int Entity (Input)
ID of the entity (note: the entity is
needed since the attribute names are
not unique).
Exceptions TolAttributeException is thrown if the given string does not contain
attribute names or IDs.
8.5.5 Method parseFilters
void parseFilters(String filterStr, int entityId, ArrayList
filterAttrIdList, ArrayList filterAttrValueList, ArrayList fil-
terTypeCodes) throws TolAttributeException
void parseFilters(String filterStr, int entityId, ArrayList
filterAttrIdList, ArrayList filterAttrValueList, ArrayList
filterTypeCodes, NbifAttributeValueService attrValueService)
throws TolAttributeException
Method parseFilters parses the lters from a semicolon-separated string and lls the
three ArrayLists necessary for the GetFilteredAllData command (refer to 6.2.2 Method
getFilteredAllData).
The semicolon-separated string contains the logical conditions of the lter:
(Attribute1 operator1 value1) AND (Attribute2 operator2 value2) AND ... AND (AttributeN
operatorN valueN)
AttributeX means attribute (ID or name)
operatorX means lter type ( =, < , > , <= , >= , LIKE)
where
valueX means value used in ltering
For example, you can have a lter for the NODE entity where the logical condition is that the node
hardware type attribute has value 10017 and the node ID is in the range of 100 and 199:
NHWTYPE = 10017;NID >= 100;NODE_NID <= 199
The method is able to parse the values from their clear text descriptions IF the OSS Client has
initialized the NbifAttributeValueService. The above example with giving the node hardware type
with its description:
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


69
8 NbifAttributeInfo and NbifAttributeService Classes
NHWTYPE = 8630;NID >= 100;NODE_NID <= 199
Parameters String lterStr (Input)
A string of lters separated by
commas (in format "attrId = value")
int Entity (Input)
ID of the entity (note: the entity is
needed since the attribute names are
not unique)
ArrayList lterAttrIdList (Output)
ArrayList with attribute IDs
ArrayList lterAttrValueList (Output)
ArrayList with attribute values
ArrayList lterTypeCodes (Output)
ArrayList with lter type codes
NbifAttributeValueService
attrValueService
(OPTIONAL INPUT)
attribute value service
Exceptions TolAttributeException is thrown if the given string does not contain
valid lters
8.5.6 Method parseAttributeValueList
ArrayList parseAttributeValueList (ArrayList attrIdList, String
param) throws TolAttributeException
Method parseAttributeValueList parses the attribute values from a string and inserts
the values to an ArrayList.
Parameters ArrayList attrIdList (Input)
ArrayList containing attribute IDs
(Integers)
String param (Input)
Comma-separated string with the
values
Exceptions TolAttributeException is thrown if the given string does not contain
valid values for the given attributes
8.5.7 Method parseOneValue
ArrayList parseOneValue (String valuestr, int attrId, ArrayList
filterValueList) throws TolAttributeException
Method parseOneValue parses the attribute value from a string and adds it to the given
ArrayList by its actual data type.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


70
8 NbifAttributeInfo and NbifAttributeService Classes
Parameters String valuestr (Input)
String containing the value
int attrId (Input)
Attribute ID
ArrayList lterValueList (Input and Output)
ArrayList where the value is added
by the type of the attribute
Exceptions: TolAttributeException is thrown if the given string does not contain
a valid value for the given attribute
8.5.8 Method parseIntegerParameterList
ArrayList parseIntegerParameterList(String param) throws TolAt-
tributeException
Method parseIntegerParameterList parses any integer values from the given string
separated by commas and returns the integer values in an ArrayList.
Parameters String param (Input)
String with integers separated by
commas
Exceptions TolAttributeException is thrown if the given string does not contain integers.
8.5.9 Method parseOneInteger
int parseOneInteger(String str) throws TolAttributeException
Method parseOneInteger parses one (any) integer value from the given string and returns
the integer value.
Parameters String str (Input)
String containing one integer
Exceptions TolAttributeException is thrown if the given string does not contain
an integer.
8.5.10 Method parseOneLong
long parseOneLong(String str) throws TolAttributeException
Method parseOneLong parses one (any) long value from the given string and returns the long
value.
Parameters String str (Input)
String containing one integer
Exceptions TolAttributeException is thrown if the given string does not contain
a long
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


71
8 NbifAttributeInfo and NbifAttributeService Classes
8.6 Methods for Getting Capacity Vectors
There are methods for getting the TS, TU, AU-4 or bit structure of allocated capacity.
8.6.1 Method convertBytesToCapacityVectorString
ArrayList <Integer> convertBytesToCapacityVectorString (int attrId, short trunkalloctypecode,
byte b[]) throws TolAttributeException
ArrayList <Integer> convertBytesToCapacityVectorString (int attrId, byte b[], int capacityvec-
tortype) throws TolAttributeException
Method convertBytesToCapacityVectorString converts a byte array into a String containing the TS,
TU, AU-4 or bit capacity vector. Method determines the proper structure (TS, TU, AU-4 or bit
capacity structure) from the given input parameter trunkalloctypecode or capacityvectortype.
The capacity structure in the string is:
Capacity Vector Type Contents of the String Example
TS: non-zero TS numbers TS:0,1,2
TU non-zero KLM values:
TU-12s in format K*100 + L*10 + M
TU-2s in format K*100 + L*10
TU-3s in format K*100
TU:100,211,212,310,370
AU-4 non-zero AU4s AU4:1,2
Bit capacity non-zero bits. First all eigth bits of TS0
(TS0\b0, TS0\b1, TS0\b2, ..., TS0\b7), then all
bits of TS1 (TS1\b0, TS2\b1, ...TS2\b7), then
bits of all following time slots. Zero-bits in the
end of list are NOT included in the ArrayList.
TS0:B6\B7\,TS1:B1\B2
Give as input parameter the trunk allocation type when possible. For more information on the
supported trunk allocation types, please refer to 12 TolType and TolTypeService Classes.
Give as input parameter the capacity vector type for other capacity vectors when you do not know
the trunks allocation type, but you do know the capacity vector type. For more information on the
supported capacity vector types, please refer to 12 TolType and TolTypeService Classes.
Parameters:
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


72
8 NbifAttributeInfo and NbifAttributeService Classes
int attrId (Input)
id of the JavaAPI attribute, which is a capacity
vector attribute
short trunkalloctypecode (Input)
trunks allocation type (the value of attribute
NIMA_AI_TRUNK_ALLOC)
byte b[] (Input)
array of bytes (which is received from the
TolResultSet)
Exceptions: TolAttributeException is thrown if the given byte array does not contain at least two
bytes
or
Parameters:
int attrId (Input)
id of the JavaAPI attribute, which is a capacity
vector attribute
byte b[] (Input)
array of bytes (which is received from the
TolResultSet)
short capacityvectortype (Input)
capacity vector type
Exceptions: TolAttributeException is thrown if the given byte array does not contain at least two
bytes.
8.6.2 Method convertBytesToCapacityVectorArrayList
ArrayList <Integer> convertBytesToCapacityVectorArrayList(int attrId, short trunkalloctype-
code, byte b[]) throws TolAttributeException
ArrayList <Integer> convertBytesToCapacityVectorArrayList(int attrId, byte b[], int capaci-
tyvectortype) throws TolAttributeException
Method convertBytesToCapacityVectorArrayList converts a byte array into capacity vector
values as Integers containing either TS, TU, AU-4 or bit capacity structure. Method determines
the proper structure (TS, TU, AU-4 or bit capacity structure) from the given input parameter
trunkalloctypecode or capacityvectortype.
The integer values in the returned ArrayList are:
Capacity Vector Type Values Example
TS: non-zero TS numbers 0,1,2
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


73
8 NbifAttributeInfo and NbifAttributeService Classes
Capacity Vector Type Values Example
TU: non-zero KLM values:
TU-12s in format K*100 +
L*10 + M
TU-2s in format K*100 + L*10
TU-3s in format K*100
100,211,212,310,370
AU-4 non-zero AU4s 1,2
Bit capacity Non-zero bits. First all eigth bits
of TS0 (TS0\b0, TS0\b1, TS0\b2,
..., TS0\b7), then all bits of TS1
(TS1\b0, TS2\b1, ...TS2\b7), then
bits of all following time slots.
Zero-bits in the end of list are NOT
included in the ArrayList.
0,0,0,0,0,0,1,1,1,1
Give as input parameter the trunk allocation type when possible. For more information on the
supported trunk allocation types, please refer to 12 TolType and TolTypeService Classes.
Give as input parameter the capacity vector type for other capacity vectors when you dont know the
trunks allocation type but when you know the capacity vector type. For more information on the
supported capacity vector types, please refer to 12 TolType and TolTypeService Classes.
Parameters:
int attrId (Input)
id of the JavaAPI attribute, which is a capacity
vector attribute
short trunkalloctypecode (Input)
trunks allocation type (the value of attribute
NIMA_AI_TRUNK_ALLOC)
byte b[] (Input)
array of bytes (which is received from the
TolResultSet)
Exceptions: TolAttributeException is thrown if the given byte array does not contain at least two
bytes
or
Parameters:
int attrId (Input)
id of the JavaAPI attribute, which is a capacity
vector attribute
byte b[] (Input)
array of bytes (which is received from the
TolResultSet)
short capacityvectortype (Input)
capacity vector type
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


74
8 NbifAttributeInfo and NbifAttributeService Classes
Exceptions: TolAttributeException is thrown if the given byte array does not contain at least two
bytes.
8.7 Attribute Data Type Denition
NbifAttributeService class contains denitions of the data types. Due to compatibility with older
releases, the data types are dened in class NbifAttributeService.
NbifAttributeSer-
vice.NIMA_DT_UNDEFINED
(0) = undened
NbifAttributeSer-
vice.NIMA_DT_BYTE
(1) = byte
NbifAttributeSer-
vice.NIMA_DT_SHORT
(2) = short
NbifAttributeSer-
vice.NIMA_DT_LONG
(3) = int
NbifAttributeSer-
vice.NIMA_DT_CHARAR-
RAY
(4) = String
NbifAttributeSer-
vice.NIMA_DT_DOUBLE
(5) = double
NbifAttributeSer-
vice.NIMA_DT_DATE
(6) = TolDateTime
NbifAttributeSer-
vice.NIMA_DT_BYTEARRAY
(7) = bytearray
NbifAttributeSer-
vice.NIMA_DT_CL_BYTEAR-
RAY
(8) = xed length bytearray
NbifAttributeSer-
vice.NIMA_DT_LONG64
(9) = long
Method getAttributeDataTypeDesc(int attrId) is described in 8.4 Methods for
Handling Attributes. Methods for handling attributes return this textual description of the data type.
8.8 Methods for Getting Example Value Format for Attributes
8.8.1 Method getExampleValueString
String getExampleValueString(int attrId)
Returns an example string for a value of the given attribute. For datetime attributes this method
returns the datetime string of current moment.
Parameters attrId (Input)
ID of the attribute
Exceptions
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


75
8 NbifAttributeInfo and NbifAttributeService Classes
8.8.2 Method getExampleTolDateTimeString
String getExampleTolDateTimeString()
Returns an example string with datetime of current moment.
Parameters
Exceptions
String getExampleTolDateTimeString(short year,short month,short
day,short hour,short minute,short second,short msecond)
Returns an example string with given datetime components
Parameters year
(Input) year
month (Input) month
day (Input) day
hour (Input) hour
minute (Input) minute
second (Input) second
msecond (Input) millisecond
Exceptions
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


76
9 NbifAttributeValueService Class
9 NbifAttributeValueService Class
NbifAttributeValueService class provides methods for getting descriptions (clear texts) for the
values of the attributes.
When an object NbifAttributeValueService is created, it loads the attribute value descriptions from
les which are provided with the JavaAPI adapter. That is why you should create only one object
NbifAttributeValueService and use the same object all over the OSS Client application.
There should be only one instance of the class NbifAttributeValueService since creating
such an object is a reasonably heavy task.
The OSS Client application can also decide not to create an NbifAttributeValueService object
at all and use original values from TolResultSet. Or OSS Client application can create the
NbifAttributeValueService object but use it only in specic cases and/or show the original values
of the TolResultSet.
9.1 Methods for Handling the Attribute Value Descriptions
The default constructor of NbifAttributeValueService takes no parameters and uses the default trace
log level of JavaAPI. You can also use another constructor which sets the trace log level (for the
whole JavaAPI). For more information on the trace level, see also how to set the trace log level with
methods of TolService class in 6.7.1 Trace Level of JavaAPI.
Methods are available for getting the description for one specic value and for getting all values
of an attribute.
Note: if the ini les are not available, the methods return empty Strings or ArrayLists. There is a
Boolean variable which tells if the attribute value descriptions have been loaded properly.
9.1.1 Method NbifAttributeValueService
NbifAttributeValueService()
Create an object of class NbifAttributeValueService
Parameters
Exceptions
NbifAttributeValueService (String loglevelname)
Create a new NbifAttributeValueService object and dene the trace log level of JavaAPI. Valid
values for the trace level are dened in class TolType (see 12.1.7 Trace Level). If the given trace log
level is invalid, the default trace log level is used.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


77
9 NbifAttributeValueService Class
Parameters logLevel/loglevelName trace level for JavaAPI
Exceptions

For more information on the trace levels, see 6.7.1 Trace Level of JavaAPI.
9.1.2 Method getService_data_is_ok
boolean getService_data_is_ok()
Method returns boolean true if the clear text descriptions have been loaded successfully.
Parameters
Exceptions
9.1.3 Method getDescriptionOfAttributeValue
String getDescriptionOfAttributeValue(int attrId, String give-
nAttrValueStr)
This method gets the description for the given value of the given attribute. In the case that there is
not such value, this method returns an empty string . Note that the method expects the attributes
value as a String and not by its natural data type. I.e. an integer value 1 must be given as 1.
Parameters attrId (Input)
ID of the attribute
givenAttrValueStr (Input)
value as a String
Exceptions TolAttributeException is thrown if the given attribute is unknown
9.1.4 Method getValueOfAttributeDescription
String getValueOfAttributeDescription(int attrId, String give-
nAttrValueDescription) throws TolAttributeException
Get attribute Value for the given description of the given attribute. In the case that there is not such
description, this method returns an empty string . Note that the method returns the value as a
String. I.e. an integer value 1 is returned as 1.
Parameters attrId (Input)
ID of the attribute
givenAttrValueDescription (Input)
description as a String
Exceptions TolAttributeException is thrown if the given attribute is unknown.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


78
9 NbifAttributeValueService Class
9.1.5 Method getAttributeValueObjectsOfAttribute
ArrayList getAttributeValueObjectsOfAttribute(int attrId) throws
TolAttributeException
Method getAttributeValueObjectsOfAttribute returns all possible values for the
given attribute in an ArrayList of NbifAttributeValue objects.
Parameters attrId (Input)
ID of the attribute
Exceptions TolAttributeException is thrown if the given attribute is unknown.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


79
10 NbifAttributeAlarmValueService Class
10 NbifAttributeAlarmValueService Class
NbifAttributeAlarmValueService class provides methods for getting the GPT and SPT descriptions,
the probable cause and the type of an NE alarm and the type of the alarm and the hardware type
of the faulty unit or NTU.
10.1 NE Alarm Types
NbifAttributeAlarmValueService denes constant values for differentiating between different NE
alarm types.
Constant Value
(short)
Constant Value
(String)
Alarm Type Text
short alarmtype_node String
alarmtypetext_node
NODE Alarm
short alarmtype_ntu String
alarmtypetext_ntu
NTU Alarm
short alarmtype_nms String
alarmtypetext_nms
NMS Alarm
10.2 Methods for Handling the Alarm Values
The default constructor of NbifAttributeAlarmValueService takes no parameters. If you have
additionally created the NbifAttributeValueService (refer to chapter 9 NbifAttributeValueService
Class), you can use the constructor where the NbifAttributeValueService is a parameter to be able to
provide the hardware type of the faulty unit or NTU.
If the INI les are not available, the methods return empty Strings or ArrayLists. There is
a Boolean variable which tells if the attribute alarm value descriptions have been loaded
properly.
10.2.1 Method NbifAttributeAlarmValueService
NbifAttributeAlarmValueService()
Creates an object of class NbifAttributeAlarmValueService.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


80
10 NbifAttributeAlarmValueService Class
Parameters
Exceptions
NbifAttributeAlarmValueService(NbifAttributeValueService nas)
Creates a new NbifAttributeAlarmValueService object which is able to provide the hardware type
of the faulty unit or NTU.
Parameters NbifAttributeValuesService instance of the NbifAttributeVal-
uesService class
Exceptions
10.2.2 Method getService_data_is_ok
boolean getService_data_is_ok()
Method returns boolean true if the alarm value descriptions have been loaded successfully.
Parameters
Exceptions
10.2.3 Method getGptText
String getGptText(int gptcode)
Method returns the Generic Problem type description if the alarm value descriptions have been
loaded successfully
Parameters gptcode the GPT code of the alarm
Exceptions

10.2.4 Method getSptText
NbifAttributeSptValue getSptInfo(short hwtype, int sptcode, int
gptcode, int mid)
Method returns an object of class NbifAttributeSptValue if the alarm value descriptions have
been loaded successfully. The NbifAttributeSptValue object contains the Specic Problem type
description, the probable cause text, the type of the alarm and the hardware type of the faulty unit or
faulty NTU. Refer to 11 NbifAttributeSptValue Class
Parameters hwtype the hardware type code of the alarm
record
sptcode the SPT code of the alarm
gptcode the GPT code of the alarm
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


81
10 NbifAttributeAlarmValueService Class
mid NTU ID provided in the alarm record
Exceptions

10.2.5 Method getAlarmtypetext
String getAlarmtypetext(short alarmtype)
Method returns text of corresponding to the given alarm type code. The alarm type code is a variable
in the NbifAttributeSptValue class (refer to 11 NbifAttributeSptValue Class). For the possible alarm
types, refer to 10.1 NE Alarm Types.
Parameters alarmtype the alarm type code
Exceptions
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


82
11 NbifAttributeSptValue Class
11 NbifAttributeSptValue Class
NbifAttributeSptValue class contains all information related to the SPT of an NE alarm.
Method getSptText of NbifAttributeAlarmValueService returns the SPT information as an
NbifAttributeSptValue object. You can use the method of the NbifAttributeSptValue Class to
retrieve the information from it.
11.1 Methods for Handling the Specic Problem Type Descriptions
of an NE Alarm
The constructor of NbifAttributeSptValue is not needed by OSS Client developers.
11.1.1 Method getSpttext
String getSpttext()
Method returns the Specic Problem Type description.
Parameters
Exceptions
11.1.2 Method getProbablecause
String getProbablecause()
Method returns the probable cause text.
Parameters
Exceptions
11.1.3 Method getSourcehw
String getSourcehw()
Method returns the following:
the hardware type of the faulty unit in case the alarm is from a Tellabs 8000 Node
the hardware type of the faulty NTU in case the alarm is from a Tellabs 8000 NTU
text "NMS Alarm" in case the alarm is from a Tellabs 8000 Management System Server
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


83
11 NbifAttributeSptValue Class
Parameters
Exceptions
11.1.4 Method getSptCode
int getSptCode()
Method returns the Specic Problem Type code.
Parameters
Exceptions
11.1.5 Method getAlarmtype
short getAlarmtype()
Method returns the Alarm Type as a constant value. The alarm type can be used for classifying the
alarms into alarms from Tellabs 8000 nodes, alarms from Tellabs 8000 NTUs and alarms from
Tellabs 8000 Management System Server computers.
The constant alarm type values are dened in the NbifAttributeAlarmValueService class (see
10.1 NE Alarm Types). NbifAttributeAlarmValueService class also denes the corresponding
strings and a method to get the string for the constant value (see 10.2.5 Method getAlarmtypetext)
Parameters
Exceptions
11.1.6 Method getHwtype
int getHwtype()
Method returns the Hardware type code.
Parameters
Exceptions
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


84
12 TolType and TolTypeService Classes
12 TolType and TolTypeService Classes
TolTypeService class contains the methods for handling the types and commands.
Alternatively, you can also use most variables directly in class TolType, since they are public to
enable easy access to them. For example, you can get a command code for OpenConnection just by
using the int value TolType.OPEN_CONNECTION.
TolType class denes several static (constant) values:
12.1 Values in TolType Class
12.1.1 Codes of Commands for Accessing Data from NBI Server
See also method getCommandName of this TolType class:
TolType.OPEN_CONNECTION = 1109
TolType.GET_ALL = 1104
... = ...
12.1.2 Codes for Received Notications
For example:
TolType.NOTIF_CREATE = 1200
TolType.NOTIF_ACTIVE_NEFAULT = 2
... = ...
12.1.3 Status Stored in the Header of the Reply Message
TolType.STATUS_OK = 1
TolType.STATUS_FAILED = 2
12.1.4 Error Codes Set in Case of Problems in Reading Reply Data
TolType.NO_ERROR = 0
TolType.LOW_LEVEL_ERROR = 1
TolType.FRAME_STATUS_ERROR = 2
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


85
12 TolType and TolTypeService Classes
TolType.DATA_READ_ERROR = 3
TolType.FRAME_SYNC_ERROR = 4
TolType.FRAME_COUNT_ERROR = 5
TolType.FRAME_TYPE_ERROR = 6
TolType.FRAME_SEQNBR_ERROR = 7
TolType.OPEN_CONNECTION_DATA_ERROR = 8
12.1.5 Codes and Names of Supported Capacity Vector Types
TolType.CAPACITYVECTOR_ALLOCTYPE_NOTSUP-
PORTED
= -1
TolType.CAPACITYVECTOR_ALLOCTYPE_UNDEFINED =0
TolType.CAPACITYVECTOR_ALLOCTYPE_TS =1
TolType.CAPACITYVECTOR_ALLOCTYPE_TU =2
TolType.CAPACITYVECTOR_ALLOCTYPE_AU4 =3
TolType.CN_CAPACITYVECTOR_ALLOCTYPE_NOTSUP-
PORTED
= "NOTSUPPORTED"
TolType.CN_CAPACITYVECTOR_ALLOCTYPE_UNDE-
FINED
= "UNDEFINED"
TolType.CN_CAPACITYVECTOR_ALLOCTYPE_TS = "TS"
TolType.CN_CAPACITYVECTOR_ALLOCTYPE_TU = "TU"
TolType.CN_CAPACITYVECTOR_ALLOCTYPE_AU4 = "AU4"
12.1.6 Codes of Supported Trunk Allocation Types
These are the trunk allocation types, which are supported by the Capacity Vector methods.
The values are the same as in Tellabs 8000 manager database and can be read with a Get
command as JavaAPI attribute NbifAttributeInfo.NIMA_AI_TRUNK_ALLOC of entity
NbifAttributeInfo.NIMA_CI_TRUNK_ALLOC.
JavaAPI Attribute NbifAttributeInfo.NIMA_AI_TRUNK_ALLOC can have several values, but the
capacity vector methods (see 8.6 Methods for Getting Capacity Vectors) support only TS, TU, AU-4
and bit capacity allocation types as presented in the following table:
TolType.TRUNK_ALLOCTYPE_UNDEFINED =0
TolType.TRUNK_ALLOCTYPE_BIT =1
TolType.TRUNK_ALLOCTYPE_OCTET = 2 (TS capacity allocation)
TolType.TRUNK_ALLOCTYPE_TU = 3 (KLM-structure)
TolType.TRUNK_ALLOCTYPE_AU4 =5
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


86
12 TolType and TolTypeService Classes
12.1.7 Trace Level
Trace level on which this JavaAPI can be set to write error and info messages (see also methods
getTraceLevelArray and getTraceLevelDescription):
TolType.TRACELEVEL_NO_TRACE = 0 No trace
TolType.TRACELEVEL_ONLY_ER-
ROR
= 1 Only errors
TolType.TRACELEVEL_MA-
JOR_INFO
= 2 Also major info
TolType.TRACELEVEL_ALL_INFO = 3 Also info
TolType.TRACELEVEL_DEBUG = 4 Also debug
12.1.8 Filter Types Available for GetFilteredAllData Command
The following lter types are available for the GetFilteredAllData command (see also
method getFilterTypeArray of this TolType class):
FILTER TYPE CODE FILTER SYMBOL
TolType.FILTER_TYPE_UNDEFINED UNDEFINED
TolType.FILTER_TYPE_EQUAL =
TolType.FILTER_TYPE_LESS <
TolType.FILTER_TYPE_GREATER >
TolType.FILTER_TYPE_LESS_OR_EQUAL <=
TolType.FILTER_TYPE_GREATER_OR_EQUAL >=
TolType.FILTER_TYPE_LIKE "LIKE" (can be applied for the attributes of
data type NIMA_DT_CHARRAY)
TolTypeService class also contains methods for retrieving more information on the variables.
Note that lter type FILTER_TYPE_LIKE can be applied only for attributes with data type
NIMA_DT_CHARARRAY. Filter type FILTER_TYPE_LIKE nds those records, where the lter
attribute contains the given value as a substring.
12.2 TolTypeService Methods for Handling Commands
12.2.1 Method getCommandName
String getCommandName(int commandcode) throws TolAttributeExcep-
tion
Returns the command name for the given command code.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


87
12 TolType and TolTypeService Classes
Parameters commandcode command code, e.g. TolType.OPEN_CONNEC-
TION
Exceptions TolAttributeException is thrown if the given code is unknown
12.2.2 Method getCommandCode
int getCommandCode(String commandname) throws TolAttributeExcep-
tion
Returns the command code for the given command name.
Parameters commandname command name, e.g. TolType.CN_OPEN_CON-
NECTION
Exceptions TolAttributeException is thrown if the given name is unknown
12.2.3 Methods that Return Commands for Managing Inventory and Performance
Data
ArrayList
getNimaCommandCodes()
ArrayList
getNimaCommandNames()
These methods return all commands available for managing Inventory and Performance data. These
commands are available in Northbound Interface NIMA port 2462.
Method getNimaCommandCodes returns the codes for the commands.
Method getNimaCommandNames returns the names for the commands.
Parameters
Exceptions
12.2.4 Methods that Return Commands for Managing Alarms
ArrayList
getNsaCommandCodes()
ArrayList
getNsaCommandNames()
These methods return all commands available for managing alarms. These commands are available
in Northbound Interface NSA port 2461.
Method getNsaCommandCodes returns the codes for the commands.
Method getNsaCommandNames returns the names for the commands.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


88
12 TolType and TolTypeService Classes
Parameters
Exceptions
12.3 TolTypeService Methods for Capacity Vector Types
12.3.1 Method getCapacityVectorAlloctypeForTrunkAllocType
short getCapacityVectorAlloctypeForTrunkAllocType (int trunkalloctypecode) throws
TolAttributeException
Method getCapacityVectorAlloctypeForTrunkAllocType returns the capacity vector type
code for the given trunk allocation code. The value of the trunk allocation type is the
value from the Tellabs 8000 manager database eld trunk.alloc and can be read with a
Get command as attribute NbifAttributeInfo.NIMA_AI_TRUNK_ALLOC of entity
NbifAttributeInfo.NIMA_CI_TRUNK_ALLOC.
Attribute NbifAttributeInfo.NIMA_AI_TRUNK_ALLOC can have several values, but method
getCapacityVectorAlloctypeForTrunkAllocType supports only codes:
TolType.TRUNK_ALLOCTYPE_OCTET for TS allocation trunks
TolType.TRUNK_ALLOCTYPE_TU for TU12, TU2 or TU3 allocated trunks (KLM structure)
TolType.TRUNK_ALLOCTYPE_AU4 for AU-4 allocated trunks
TolType.TRUNK_ALLOCTYPE_BIT for trunks allocation on bit level
Parameters: int trunkalloctypecode (Input) trunk allocation type code
Exceptions: TolAttributeException is thrown if the given trunk allocation type code is not supported
in the JavaAPI.
12.3.2 Method getCapacityVectorTypeCode
int getCapacityVectorTypeCode (String capacityvectortypename) throws TolAttributeException
Method getCapacityVectorTypeCode returns the capacity vector type code for its name. Method
supports only the following names:
TolType.CN_TRUNK_ALLOCTYPE_OCTET for TS allocation trunks
TolType.CN_TRUNK_ALLOCTYPE_TU for TU12, TU2 or TU3 allocated trunks (KLM structure)
TolType.CN_TRUNK_ALLOCTYPE_AU4 for AU-4 allocated trunks
TolType.CN_TRUNK_ALLOCTYPE_BIT for trunks allocation on bit level
Parameters: String capacityvectortypename (Input) capacity vector allocation type name
Exceptions: TolAttributeException is thrown if the given capacity vector allocation type is not
supported in the JavaAPI.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


89
12 TolType and TolTypeService Classes
12.3.3 Method getCapacityVectorTypeName
String getCapacityVectorTypeName(int capacityvectoralloctypecode) throws
TolAttributeException.
Method getCapacityVectorTypeName returns the capacity vector type name for its code. Method
supports only the following codes:
TolType.TRUNK_ALLOCTYPE_OCTET for TS allocation trunks
TolType.TRUNK_ALLOCTYPE_TU for TU12, TU2 or TU3 allocated trunks (KLM structure)
TolType.TRUNK_ALLOCTYPE_AU4 for AU-4 allocated trunks
TolType.TRUNK_ALLOCTYPE_BIT for trunks allocation on bit level
Parameters: int capacityvectortypecode (Input) capacity vector allocation type code
Exceptions: TolAttributeException is thrown if the given capacity vector allocation type is not
supported in the JavaAPI.
12.3.4 Method getCapacityVectorTypeCodes
ArrayList<Integer> getCapacityVectorTypeCodes()
Method getCapacityVectorTypeCodes returns the capacity vector types which are supported in the
JavaAPI. The returned ArrayList contains the supported codes as integer values.
Parameters: -
Exceptions: -
12.3.5 Method getCapacityVectorTypeNames
ArrayList <String> getCapacityVectorTypeNames()
Method getCapacityVectorTypeNames returns the capacity vector types which are supported in the
JavaAPI. The returned ArrayList contains names of the supported capacity vector types.
Parameters: -
Exceptions: -
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


90
12 TolType and TolTypeService Classes
12.4 TolTypeService Methods for Handling Trace Log Levels
12.4.1 Methods getTraceLevelCodes and getTraceLevelNames
ArrayList
getTraceLevelCodes()
ArrayList
getTraceLevelNames()
These methods return all trace levels of JavaAPI.
Parameters
Exceptions
Method getTraceLevelCodes returns an ArrayList of the codes.
Method getTraceLevelNames returns an ArrayList of the names.
Parameters
Exceptions
12.4.2 Method getTraceLevelName
String getTraceLevelName(int level) throws TolAttributeException
Returns description text for the given trace level.
Parameters level trace level
Exceptions TolAttributeException is thrown if the given level is invalid
12.4.3 Method getTraceLevelCode
int getTraceLevelCode (String traceLevelName) throws TolAttribu-
teException
Returns trace level corresponding to the given description text
Parameters traceLevel Description trace level description
Exceptions TolAttributeException is thrown if the given level is invalid
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


91
12 TolType and TolTypeService Classes
12.5 TolTypeService Methods for Handling Filter Types of Command
GetFilteredAllData
The command GetFilteredAllData accepts specic lter types given by their codes. The lter
types are variables of TolType class and can be managed with these methods of the TolTypeService
class. For a list of the lter types, see 12.1.8 Filter Types Available for GetFilteredAllData
Command.
ArrayList getFilterSymbols()
Returns all lter type symbols (=, < ...).
Parameters
Exceptions
ArrayList getFilterTypeCodes()
Returns all lter type symbols (e.g.. TolType.FILTER_TYPE_EQUAL= 1)
Parameters
Exceptions
String getFilterSymbol(int filterTypeCode) throws TolAttribute-
Exception
Returns lter type symbol for the given lter type code
Parameters lterTypeCode lter type code
Exceptions TolAttributeException is thrown if the given lter type code is invalid
int getFilterTypeCode(String filterSymbol) throws TolAttribute-
Exception
Returns lter type code for the given lter type symbol
Parameters traceLevelDescription lter type symbol
Exceptions TolAttributeException is thrown if the given lter type symbol is
invalid.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


92
13 OpenResultSet Class
13 OpenResultSet Class
This class contains the result data from the Tellabs 8000 manager NBI when the OSS Client calls the
openSession() method. Currently only the sessions Handle Id is available in the OpenResultSet
object. The Handle Id identies a OSS Client session towards the Tellabs 8000 manager NBI.
13.1 Extracting the Tellabs 8000 Manager NBI Sessions Handle ID
OpenResultSet()
Construct a new OpenResultSet. The OSS Client must call this method to create a
OpenResultSet object that will be included as a parameter in the openSession() method.
OpenResultSet openResult = new OpenResultSet();
long getHandleId()
Return the Handle ID of the Tellabs 8000 manager NBI client session. The OSS Client should
use the Handle ID as a parameter in other JavaAPI methods.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


93
14 TolEventObserver Class
14 TolEventObserver Class
The TolEventObserver interface must be implemented at the OSS Client side. This interface
denes member methods that JavaAPI will call every time a new event comes from the NBI
service. For each of the notication types (Create, Attribute Value Change, Delete, Alarm, System)
there is a corresponding class (TolAddEvent, TolUpdateEvent, TolDelEvent, TolAlarmEvent,
TolSystemEvent) containing the methods that can be used to extract the notication-specic
data. The actual record data should be extracted using the TolResultSet methods. To
process notication data, the OSS Client should implement the methods addNotification,
updateNotification, delNotification, alarmNotification, and
systemNotification. For a general overview on how to use the notications, see
5.10 Subscribing to the Tellabs 8000 Manager NBI Inventory and NBI Alarm Notications.
14.1 Processing the Tellabs 8000 Manager NBI Inventory Notications
14.1.1 Create Notications
JavaAPI calls method addNotification (TolAddEvent addEvent) implemented in the
OSS client application when a new inventory object has been created in the Tellabs 8000 manager
system. There are methods available for retrieving data from the TolAddEvent object which the
method gets as a parameter.
void addNotification (TolAddEvent addEvent);
Parameters addEvent (Input)
object containing methods to
extract a create notication data.
TolAddEvent Methods
public int getEntityId()
Return the entity ID of the object entity of created object.
int getNumberOfAttributes()
Return the number of attributes in created object.
ArrayList getAttrIdList()
Return the list of attribute IDs in created object. The attribute IDs are of type int.
TolResultSet getAttrValueSet()
Return a TolResultSet object containing the created object data. Use TolResultSet methods
to extract the attributes.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


94
14 TolEventObserver Class
14.1.2 Attribute Value Change Notications
JavaAPI calls method updateNotification (TolUpdateEvent updateEvent)
implemented in the OSS client application when there is a change in the Tellabs 8000 manager
systems inventory data. There are methods available for retrieving data from the TolUpdateEvent
object which the method gets as a parameter.
void updateNotification (TolUpdateEvent updateEvent);
Parameters updateEvent (Input)
object containing methods to
extract an update notication
data.
TolUpdateEvent Methods
public int getEntityId ()
Return the ID of object entity of updated object
int getNumberOfKeyAttributes ()
Return the number of key attributes in updated object.
int getNumberOfChangeAttributes ()
Return the number of changed attributes in the updated object.
ArrayList getKeyAttrIdList ()
Return the list of key attribute IDs. The attribute IDs are of type int.
ArrayList getChangeAttrIdList ()
Return the list of changed attribute IDs. The attribute IDs are of type int.
TolResultSet getChangeAttrValueSet ()
Return a TolResultSet object containing the changed data. Use TolResultSet methods to
extract the attributes.
TolResultSet getKeyAttrValueSet ()
Return a TolResultSet object containing the key attributes of the changed record. Use
TolResultSet methods to extract the attributes.
14.1.3 Delete Notications
JavaAPI calls the method delNotification (TolDelEvent delEvent) implemented
in the OSS client application when an inventory object has been deleted from the Tellabs 8000
Mmanager system. There are methods available for retrieving data from the TolDelEvent object
which the method gets as a parameter.
void delNotification(TolDelEvent delEvent);
Parameters delEvent (Input)
object containing methods to
extract a delete notication data
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


95
14 TolEventObserver Class
TolDelEvent Methods
int getEntityId()
Return the ID of the object entity of the deleted object.
int getNumberOfKeyAttributes()
Return a number of key attributes in the deleted object.
ArrayList getKeyAttrIdList ()
Return the list of key attribute IDs in the deleted object. The attribute IDs are of type int.
TolResultSet getKeyAttrValueSet()
Return a TolResultSet object containing the key attribute data of the deleted object. Use
TolResultSet methods to extract the attributes.
14.2 Processing the Tellabs 8000 Manager NBI Alarm Notications
JavaAPI calls method alarmNotification (TolAlarmEvent alarmEvent)
implemented in the OSS client application when there is changed alarm data in the Tellabs 8000
manager System. There are methods available for retrieving data from the TolAlarmEvent object
which the method gets as a parameter.
void alarmNotification (TolAlarmEvent alarmEvent);
Parameters alarmEvent (Input)
object containing methods to extract
the changed alarm data
14.2.1 TolAlarmEvent Methods
int getEntityId()
Return the entity ID of the changed alarm object entity (NE alarm, extended NE alarm, service
alarm or Extended service alarm).
TolResultSet getAttrValueSet()
Return a TolResultSet object containing all changed alarm objects. Note that more than one
alarm object can be included in the TolResultSet. Use TolResultSet methods to extract the
alarm objects and attributes.
14.3 Processing the Tellabs 8000 Manager NBI System Notications
void systemNotification (TolSystemEvent systemEvent);
JavaAPI calls this method whenever there is an error in the Tellabs 8000 manager NBI service.
Parameters systemEvent (Input)
object containing methods to extract
the system notication data
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


96
14 TolEventObserver Class
14.3.1 TolSystemEvent Methods
int getMessageType()
Return the error code of the system notication. The possible error codes are listed in the table
below:
Error Code Description
1 The NBI Kernel shutting down. Sent when NBI
Server Supervisor stops NBI Kernel processes.
2 Notications lost. Internal processes of the NBI
server are unexpectedly terminated, or server lost
connection to database.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


97
15 OSS Client Development and JavaAPI Use
15 OSS Client Development and JavaAPI Use
15.1 Using JavaAPI to Simultaneously Integrate Inventory Data and
Alarm Data
Currently JavaAPI can be used to integrate with the following NBI functions: NBI Inventory, NBI
Performance, NBI Alarm and NBI Conguration Changes (Macro).
Due to the Tellabs 8000 manager NBI architecture, there are two different services on the NBI
Server. You must access NBI Inventory and Performance functions via port 2462 and the NBI
Alarm and Provisioning (macro) functions via port 2461.
In cases where OSS Client is accessing for example both inventory and alarm data, the fact that
there are two services on the NBI server must be taken into consideration. To simultaneously
integrate to these functions, the OSS Client must open two distinct NBI sessions. One session
is opened towards the port providing the NBI Inventory function, and second session is opened
towards the port providing the NBI Alarm function.
In the OSS Client implementation, this means that the client must create separate JavaAPI
TolService classes:
TolService SrvInventory = new TolService();
TolService SrvFault = new TolService();
Further openCommunication and openSession calls are then issued under the distinct
TolService instances.
SrvInventory.openCommunication (ip_addr_NBI1, port_1);
SrvInventory.openSession(...);
SrvFault.openCommunication (ip_addr_NBI1, port_2);
SrvFault.openSession(...);
15.2 Entity IDs and Attribute IDs
This specication does not describe the details of the Tellabs 8000 manager NBI Information Model
(entities and attributes supported by the Tellabs 8000 manager NBI). The information can be found
in a separated document. Please contact Tellabs Professional Services for further information on
this document.
The Entity IDs and Attribute IDs used in JavaAPI are dened in the le NbifAttributeInfo.java. This
le is included in the JavaAPI package delivered to customers.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


98
15 OSS Client Development and JavaAPI Use
15.3 Required Setting at NIMA.INI
When using JavaAPI to integrate to the NBI Inventory function, the following entry must be added
to the NIMA.INI le at the NBI/NIMA server:
NIMA_REPLY_ALL = TRUE
15.4 Providing Key Attribute Values in getOneData and getIntervalData
Requests
In the current JavaAPI implementation, the OSS Client must call the getOneData,
getIntervalData and GetFilteredAllData methods providing an Array List of key
attribute values where the attribute value is inserted in its native data type. Therefore, the OSS
Client must know the native data type of the key attributes used in the get request.
15.5 Other JavaAPI Specic Data Types
15.5.1 TolDateTime Class
The TolDateTime is a class used to represent dates in JavaAPI.
JavaAPI prints out datetimes and requires data times to be inserted in a certain pattern. The pattern
is common (static) in JavaAPI. Changing the pattern affects all places where datetimes are used.
The datetime pattern is used when printing out results containing datetime attributes with methods
of TolResultSet class.
The datetime pattern is needed in class TolService, when giving datetime values as input to com-
mands GetFilteredAllData (or GetIntervalData).
The datatime pattern is used when getting example value strings for a datetime attribute with
methods of class NbifAttributeService.
The default Datetime pattern is dd.MM.yyyy HH:mm:ss:SSS. You can change the datetime
pattern of JavaAPI
with set-methods of TolService (see 6.7.2 Datetime Pattern of JavaAPI)
with set-methods of a TolDateTime object.
The OSS Client can use the following TolDateTime methods to extract the date information of a
TolDateTime object as short values:
getYear(), getMonth(), getDay(), getMinute(), getSecond(), getMSecond().
There are also methods for getting the date as a string in the current datetime format or in the
given datetime format.
TolDateTime(short year,short month,short day,short hour,short
minute,short second,short msecond)
Default constructor. Creates a TolDateTime object with given datetime components.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


99
15 OSS Client Development and JavaAPI Use
Parameters year
(Input) year
month (Input) month
day (Input) day
hour (Input) hour
minute (Input) minute
second (Input) second
msecond (Input) millisecond
Exception
-
TolDateTime()
Constructor which creates a TolDateTime object with datetime of the current moment. Needed
mainly internally by JavaAPI.
Parameters
Exception
short getYear()
short getMonth()
short getDay()
short getHour()
short getMinute()
short getSecond()
short getMSecond()
Returns the year/month/day/hour/minute/second/millisecond of the TolDateTime object.
Parameters
Exception

String getString()
Method getString returns the datetime in the default format: dd.mm.yyyy hh:mm:ss:ms (for
example: 06.12.2006 19:30:25:155).
Parameters
Exception
String getString(String owndateformatpattern) throws TolAttribu-
teException
Method returns the date in the format of the given pattern.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


100
15 OSS Client Development and JavaAPI Use
Parameters String ownpattern (Input)
pattern for presenting the date.
Exception TolAttributeException is thrown if the given pattern is not valid.
String getString(SimpleDateFormat ownDateFormat)
Method returns the date in the given format.
Parameters SimpleDateFormat ownDateFormat (Input)
date format for presenting the date.
Exception
String getCurrentPattern()
Method returns the pattern of date format in which Datetime values are handled in JavaAPI.
Parameters
Exception
String getDefaultPattern()
Method returns the pattern of default date format in which Datetime values are handled in JavaAPI.
Parameters
Exception

SimpleDateFormat getCurrentDateFormat()
Method returns the SimpleDateFormat in which Datetime values are handled in JavaAPI.
Parameters
Exception
SimpleDateFormat getDefaultDateFormat()
Method returns the SimpleDateFormat which is the default format of JavaAPI
Parameters
Exception
void setCurrentDateFormat(SimpleDateFormat df)
Method sets the date format in which Datetime values are handled in JavaAPI.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


101
15 OSS Client Development and JavaAPI Use
Parameters SimpleDateFormat df format which will be applied in
JavaAPI
Exception
void setCurrentDateFormat(String owndateformatpattern) throws
TolAttributeException
Method sets the date format in which Datetime values are handled in JavaAPI. For detailed
information on the valid Datetime patterns, see the standard Java documentation. Some examples of
the patterns are given here:
Date and Time Pattern Result
dd.MM.yyyy HH:mm:ss:SSS 04.07.2001 12:08:56:123
yyyy-MM-dd HH:mm:ss.SS 2001-07-04 12:08:56.123
yyyy.MM.dd G at HH:mm:ss z 2001.07.04 AD at 12:08:56 PDT
EEE, MMM d, yy Wed, Jul 4, 01
h:mm a 12:08 PM
Parameters String owndateformatpattern pattern for format of presenting the
date in JavaAPI
Exception TolAttributeException is thrown if the given pattern is not valid
15.6 JavaAPI Exceptions
15.6.1 TolCommunicationException
JavaAPI communication exceptions are reported if there are problems in the socket communication
between JavaAPI and the Tellabs 8000 manager NBI. Socket communication problems can be
related to the actual socket connection or to the Tellabs 8000 manager NBI communication protocol.
A client request may be rejected also in case of improper usage of the services such as giving invalid
attribute IDs or username/password as input. Invalid attribute IDs are usually related to attribute IDs
which are not congured in the customers NBI implementation. For example, for the supported
inventory data, a separate list of entity IDs and Attribute IDs is provided to the customer.
The method getMessage() returns a generic error message such as JavaAPI Communication
error. To nd out the exact error code the Client OSS should call the method getErrorCode().
The method returns an integer value according to the table below:
Error Code Description
2 Message status has value FAILED. This can
happen for example when the OSS Client uses
invalid entity IDs or attribute IDs.
3 IOException happens when reading data from
the socket.
4 Frame number is not as expected.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


102
15 OSS Client Development and JavaAPI Use
Error Code Description
5 Frame count is greater than frame number.
6 Message frame type is not as expected.
7 Sequence number is not as expected.
For the cases where the Error Code is equal to 2 (Message Status has value FAILED), there
are two additional methods providing further error data (Sub-error data). The methods are
getSubErrorCode() and getSubErrorDescription(). The table below shows the
possible Sub-Error codes.
Sub-Error Code Explanation
100002 Parameters in Get requests contain invalid
Attribute IDs.
100003 Parameters in Get or Subscribe requests
contain invalid Entity ID values.
100005 Attribute IDs in Get requests are not in an
ascending order.
100007 NBI login name used in the NBI session does not
have privileges for the requested operation.
Get and Subscribe requests require read or
all privileges. For executeMacro request all
privileges are required.
101202 The FMSP_PORT entry or COMPUTERNAME
entry is missing from dxxnms.ini.
101205 Invalid password or username in openSession
request.
101602 Wrong number of key attributes given in Get
request message.
101603 Invalid key attribute given in Get request message
(attribute ID is not in the range of the entity IDs).
101604 Invalid key attribute given in Get request message
(the given attribute ID is not a key).
102200 Invalid macro le name or invalid parameter list in
executeMacro request.
110000 The message header of the request contains an
invalid Message ID.
110001 Attempt to use openSession without an earlier
call of the openCommunication method.
110008 Invalid HandleId in the request call.
110010 Mismatch in length parameters of the
executeMacro request message.
110011 Mismatch in length parameter of the GetAll
request message.
110012 The Username parameter in the
OpenConnection request message is
invalid.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


103
15 OSS Client Development and JavaAPI Use
Sub-Error Code Explanation
110013 The Password parameter in the OpenConnec-
tion request message is invalid.
110015 There is a mismatch between ulDataLength value
of the header and message data contents of the
request message.
For example, in the OpenConnection request
message, ulDataLength of the header has a correct
value, but either the username size or the password
size parameter contained by message data has an
incorrect value.
15.6.2 TolAttributeException
JavaAPI attribute exceptions can happen in the getValueXX() methods of the TolResultSet class
and in the getOneData() and getIntervalData() methods of the TolService class.
On the getValueXX() methods, the attribute exception will happen if the OSS Client calls
getValueXX(attrId) with an attrId of an attribute whose data type is not supported by the
specic getValueXX method. For example, if the OSS Client calls the getValueByte()
method giving as parameter an attribute whose data type is not byte.
On the getOneData() and getIntervalData() methods, the attribute exception will happen
if there is a mismatch on the given key attribute IDs and key attribute values, for example, if the size
of the key attribute list is different from the size of the key attribute values list.
The method getMessage() can be called to extract the error message included in the exception.
15.7 Using the openCommunication() and openSession() Methods
Before calling the openSession() method, the OSS Client must rst call the
openCommunication() method. In cases where the openCommunication() call is
successfully executed, but the openSession() method fails (for example because of wrong
password), the OSS Client should rst close and open the NBI communication (calling the
closeCommunication() and openCommunication()) before attempting to call the
openSession() method again.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


104
16 Using NBI Test Client
16 Using NBI Test Client
Tellabs uses a test client in the internal development and testing.
Contact Tellabs Professional Services to get the runnable test client. The test client is available for
you when you have the NBI licence and the support agreement for the NBI. With the test client
you can perform actions which your licence covers. Other actions will be rejected and you will
get an error message.
Test client consists of two jar packages (NBITestClient.jar and tol.jar) and the Clear Text description
le (NbifAttributeValues.ini). Optionally, an ini le can be used to store the default settings of the
NBITestClient. Make sure that your NBI Server is setup according to the installation manual.
The screen shots presented throughout this chapter are provided as simple illustrations of the
NBI Test Client. Current release does not tie these to a particular release number, therefore
the application title outlook of the screen will be different from the one shown in this chapter.
16.1 Installing Java Runtime Environment
Download the Java Runtime Environment from Internet. It is available for example at SUNs
internet pages: <java.sun.com>. Use Java Runtime Environment 5.0 or newer.
16.2 Files of the NBI Test Client
16.2.1 jar-les NBITestClient.jar and tol.jar
Copy the jar-les NBITestClient.jar and tol.jar to the same directory.
16.2.2 Clear Text Description File
By default, the NBI Test Client will show the Clear Text description.
To install the Clear Text description feature, follow these steps:
Step 1 Create subdirectory dat to your class path (to the same directory where you have copied the jar
les NBITestClient.jar and tol.jar)
Step 2 Copy the le NbifAttributeValues.ini to the same directory.
If you have the java development environment, you can also extract the dat directory from the
tol.jar package, using the following command:
jar -xvf tol.jar dat /NbifAttributeValues.ini
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


105
16 Using NBI Test Client
This command creates a sub directory dat which contains the le NbifAttributeValues.ini
The NBI Test Client starts and runs normally if the le is not available, but the data is reported
only with original attribute values. In this case the NBI Test Client prints the following warning
to the Command prompt where it is launched:
JavaAPI ERROR: NbifAttributeValueService DOESNT support
Attribute Value Descriptions.
(file dat\NbifAttributeValues.ini nor the raw data files were
available)
16.2.3 Ini File for the Test Client
You can use an ini le for the test client to dene the default values for the NBI Server name and
ports, log in and the mode for showing the Clear text descriptions. If the ini le does not exist,
default values are selected by the test client but you can change them later in the test client.
Copy the le nbitestclient.ini to the same directory where you are going to launch the
NBITestClient.jar.
Modify the settings according to your wishes. Parameters must be given in format
PARAMETER = value
You can dene some or all of the following parameters:
Name or IP address of the NBI Server
NBISERVER = localhost
NBISERVER = 192.19.170.16
Port of the NBI Inventory and Performance (NIMA) service in NBI Server (default is 2462)
PORTNIMA = 2462
Port of the NBI Fault and Provisioning (NSA) service in the NBI Server (default is 2461)
PORTNSA = 2461
Default target when the test client is started (NIMA or NSA)
TARGET = NIMA
TARGET = NSA
Username and password to the NBI service
USERNAME = nbif
PASSWORD = nbif
CLEARTEXT = BOTH
Shows the clear text of the attribute values. Possible values are:
YES, if clear text of attributes should be shown.
NO, if only the original attribute value should be shown.
BOTH, if both the clear text and the original value should be shown.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


106
16 Using NBI Test Client
JAVAAPITRACE = 1
Trace level of the JavaAPI. Possible values are 0-4:
0 No trace
1 Only errors
2 Also warnings
3 Also major info
4 Also info
16.3 Launching the Test Client
Step 1 Launch the NBI Test Client with the following command:
java -jar NBITestClient.jar
Fig. 6 Launching Test Client
Step 2 Give the IP address or name of the NBI Server.
Check that the given name or IP address is correct for your NBI Server.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


107
16 Using NBI Test Client
Step 3 Select either NBI Inventory and Performance services or NBI Fault and Provisioning Services
(NSA).
Due to the Tellabs 8000 manager NBI architecture, there are two different services on the NBI
Server. You must access NBI Inventory and Performance functions (NIMA) via port 2462 and the
NBI Fault and NBI Provisioning (Macro) functions (NSA) via port 2461.
Select NIMA to access NBI Inventory and Performance functions (NIMA) via port 2462.
Select NSA to access NBI Fault and NBI Provisioning (Macro) functions (NSA) via port
2461.
Step 4 Open the socket.
After selecting the target to be either NBI Inventory and Performance services or NBI Fault and
Provisioning services (NSA), open the socket by clicking Open Socket.
See 16.4 NBI Inventory and Performance Services (Target NIMA) and 16.5 NBI Fault and
Provisioning Services (Target NSA) for more details on these services.
16.4 NBI Inventory and Performance Services (Target NIMA)
Target NIMA supports the Get family commands described in the following chapters for the
Inventory and Performance entities and the Notications for the Inventory entities.
Step 1 Open the socket to NBI Alarm Inventory and Performance services NIMA.
On the Socket connection page, select the target to be NBI Inventory and Performance services.
Open the socket by clicking the Open Socket button.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


108
16 Using NBI Test Client
Step 2 Opening Session to NBI Inventory and Performance services NIMA:
When the communication path is open, the test client will take you to the Commands page. First
you must open a session to the NBI Inventory and Performance services. Select command Open
connection. Type the user name and password. Click Send.
Fig. 7 Opening Session to NBI Inventory and Performance Services (NIMA)
When the session is open, the information in the text eld shows
OpenCommunication (opening Socket), host = 169.254.25.129 port =
2462
Command Open connection started at 22-Dec-2006 Fri 10:47:10:947
Communication path is opened
Open session command: username=nbif passWord=nbif
Session is opened
OpenResultSet: HandleId = 4
Command Open connection completed at 22-Dec-2006 Fri 10:47:17:461
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


109
16 Using NBI Test Client
Step 3 Executing commands:
Now the session is open. Select the command you need from the Command drop-down list.
For most commands, an entity selection is required. Use the Entity drop-down list to select the
wanted entity. Select from selection boxes or type in other parameters for the command (if the
command requires parameters).
Click the Send button. Note that you might not have licences for running all the commands shown
in Command or for all the entities shown in Entity. In such a case you will see an error message in
the output text area.
16.4.1 Commands for Subscribing to Notications
Subscribe to notications before using the getAll command to avoid loosing any
notications.
To subscribe to notications
1. Run command Add Change Listener to activate the client application to listen to the notica-
tions.
Step 1 Select command Add Change Listener.
Step 2 Click the Send button.
2. Run command Subscribe notications to start getting notications from the server.
Step 1 Select command Subscribe notications.
The entry eld Object entity IDs shows an example list of entity IDs. Modify the
list according to your needs.
Step 2 Click the Send button.
When a notication is received, it is shown in the Notication Area on the NBItestClient window.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


110
16 Using NBI Test Client
Fig. 8 Subscribing to Notications
16.4.2 Command GetAll
To run command GetAll:
Step 1 Select command Getall from the Command drop-down list.
Step 2 Select the wanted entity in the Entity drop-down list, or type in the entity name or ID in the
Selected entity entry eld.
Step 3 Select the wanted attributes from the Attribute drop-down list, or type in the attribute names
or IDs in the Selected Attributes entry eld.
Step 4 Click the Send button.
Note that the command GetAll might return a lot of data especially if you select all attributes.
Select only the needed attributes. Also consider using GetFilteredAll command instead.
See 16.4.3 Command GetFilteredAll.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


111
16 Using NBI Test Client
Fig. 9 Running Command GetAll (NIMA)
16.4.3 Command GetFilteredAll
To run command GetFilteredAll:
Step 1 Select the command GetFilteredAll from the Command drop-down list.
Step 2 Select the wanted entity in the Entity drop-down list, or type in the entity name or ID in the
Selected entity entry eld.
Step 3 Select the wanted attributes from the Attribute drop-down list, or type in the attribute names
or IDs in the Selected Attributes entry eld.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


112
16 Using NBI Test Client
Step 4 Give the lters either by typing them:
Type the lters in the Filters entry eld in format
FILTER filtertype VALUE ; FILTER2 filtertype2 VALUE2
e.g.. nhwtype = 8630; nid > 680; nid < 720
or select the available lter attributes, type and value from the drop-down lists:
Select the Filter attribute.
Select the Filter type.
Select the Filter value:
select the lter value fromthe corresponding drop-down lists (available if you are using
Clear Text descriptions)
or type the wanted value in the entry eld.
Click the Add lter button to select the lter (the lter will be added to the entry eld Fil-
ters).
Step 5 Click the Send button.
Fig. 10 Running Command GetFilteredAll
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


113
16 Using NBI Test Client
16.4.4 Command GetOne
To run command GetOne:
Step 1 Select command Get one from the Command drop-down list.
Step 2 Select the wanted entity from the Entity drop-down list.
Step 3 Select the wanted attributes from the Attribute drop-down list, or type in the attribute names or IDs.
The entry eld Key attributes shows the key attributes of the selected entity and the entry eld Key
values shows a list of 1s separated by commas.
Modify these values according to your need.
Step 4 Click the Send button.
Fig. 11 Running Command GetOne
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


114
16 Using NBI Test Client
16.5 NBI Fault and Provisioning Services (Target NSA)
Target NSA supports
Get commands and Notications for the Alarm entities
ExecuteMacro command.
Running the test client against the NBI Fault and Provisioning Services requires that byte
conversion is set off in le %DXXDIR/dat/nsa.ini the NBI Server. For more information, contact
Tellabs Professional Services for NIMA Installation Manual. See also Tellabs

8000 Network
Manager Installation and Conguration Guide for Northbound Interface for more details on
conguring the NBI Server.
Step 1 Open the socket to NBI Fault and Provisioning Services NSA.
On the Socket connection page, select the target to be NBI Fault and Provisioning services (NSA).
Open the socket by clicking the Open Socket button.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


115
16 Using NBI Test Client
Step 2 Opening Session to NBI Fault and Provisioning services NSA:
When the communication path is open, the test client will take you to the Commands page.
First you must open a session to the NBI Inventory and Performance services. Select the Open
connection command. Type the user name and password. Click the Send button.
Fig. 12 Opening Session to NBI Fault and Provisioning Services (NSA)
When the session is open, the text eld shows the information
OpenCommunication (opening Socket), host = 192.168.254.254 port =
2461
Communication path is opened
Command Open connection started at 22-Dec-2006 Fri 17:58:41:512
Open session command: username=nbif passWord=nbif
Session is opened
OpenResultSet: HandleId = 101
Command Open connection completed at 22-Dec-2006 Fri 17:58:41:712
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


116
16 Using NBI Test Client
Step 3 Executing commands:
Select the command you need from the Command drop-down list.
If the command requires parameters, select them from the selection elds or type in the parameters
for the command.
Step 4 Click the Send button.
Note that you might not have licences for running all the commands shown in the Command
drop-down list or for all the entities shown in the Entity drop-down list. In such a case you will
see an error message in the output text area.
16.5.1 Commands for Subscribing to Notications
Subscribe to notications before using the getAll command to avoid loosing any
notications.
To subscribe to notications:
1. Run command Add Change Listener to activate the client application to listen to the notica-
tions.
Step 1 Select command Add Change Listener.
Step 2 Click the Send button.
2. Run command Subscribe notications to start getting notications from the server.
Step 1 Select command Subscribe notications.
The entry eld Object entity IDs shows an example list of entity IDs. Modify the
list according to your needs.
Step 2 Click the Send button.
When a notication is received, it is shown in the Notication Area on the NBItestClient window.
16.5.2 Command GetAll
To run command GetAll:
Step 1 Select command Get all from the Command drop-down list.
Step 2 Select the wanted entity from the Entity drop-down list, or type in the entity name or ID in the
Selected entity entry eld.
For Alarm classes, all attributes must be selected. That is why the selected attributes cannot be
modied.
Step 3 Click the Send button.
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


117
16 Using NBI Test Client
Fig. 13 Running Command GetAll (NSA)
16.5.3 Command Execute Macro
The macro le must already exist on the NBI Server. To execute the macro from the NBI Test Client
run command Execute Macro to execute a macro on the NBI Server:
Step 1 Select command Execute Macro.
Step 2 Type the macro le name in the Macro File entry eld.
Step 3 Type the macro arguments in the Arguments entry eld.
Step 4 Optional: modify the timeout in the Timeout entry eld if wanted.
Step 5 Click the Send button.
Tellabs

8000 Network Manager R17A 70182_01


JavaAPI for Tellabs

8000 Network Manager Northbound Interface 2009 Tellabs.


118
Appendix: JavaAPI Examples
Appendix: JavaAPI Examples
This appendix chapter contains the following JavaAPI code examples:
Opening Communication (Socket)
Open Session
Manage Input Parameters of Get Commands
Using JavaAPI to Get Bulk Data
Using JavaAPI to Receive Notications
Using JavaAPI to Execute Macros
70182_01 Tellabs

8000 Network Manager R17A


2009 Tellabs. JavaAPI for Tellabs

8000 Network Manager Northbound Interface


119

Appendix: JavaAPI Examples




Example: Opening Communication (Socket)

//-------------------------------------------------------------------------
//
// Create an object of class TolService and call its method openCommunication
//
// Two parameters are given to method openCommunication
// 1. hostname or IP-address of the Northbound Interface
// 2. port in the Northbound Interface
// 2462 is the default port for the Inventory and Performance services
// 2461 is the default port for the Fault and Provisioning services
//
//-------------------------------------------------------------------------


TolService service = new TolService();
try {
service.openCommunication(172.19.45.16,2462);
}
catch (IOException e){
System.out.println(opening communication port failed);
}

Example: Open Session
//-------------------------------------------------------------------------
//
// Create an object of class OpenResultSet and call method openCommunication
// of the TolService object created before
//
// Three parameters are given to method openCommunication
// 1. user name of an NBI operator
// 2. password of an NBI operator
// 3. an object of class OpenResultSet
//
//-------------------------------------------------------------------------
OpenResultSet openresultSet = new OpenResultSet ();
try {
service.openSession(nbif,nbif);
}
catch (IOException e) {
...
}
catch (TolCommunicationException e) {
...
}

//-------------------------------------------------------------------------
//
// Get the handleId using method getHandleId of the OpenResultSet object
//
//-------------------------------------------------------------------------
class long handleId = openresultSet.getHandleId();


Example: Manage Input Parameters of Get Commands
//-------------------------------------------------------------------------
//
// 1. The HandleId is needed for any Get Command:
// - use the handle id which you received before from the OpenSession
// command
//
// 2. The EntityId is needed for any Get Command
// - The entity id can be taken directly from the NbifAttributeInfo class:
//
//-------------------------------------------------------------------------

// Example: the entity id for entity interface
int entityId = NbifAttributeInfo.NIMA_CI_IFACE;


//-------------------------------------------------------------------------

Appendix: JavaAPI Examples



//
// 3A. Attributes must be selected for when getting data for Inventory or
// Performance Entities
// - For Inventory and Performance entities you can select as many
// attributes as you like in any order.
// - To make getting the data faster, it a recommended to select only
// those attributes, which are of importance to your OSS Client
// application.
// - The attribute ids can be taken directly from the NbifAttributeInfo
// class using their id or name variables
//
//-------------------------------------------------------------------------

int entityId = NbifAttributeInfo.NIMA_CI_NODE;
ArrayList selectedAttributes = new ArrayList();

int attrId = NbifAttributeInfo.NIMA_AI_NODE_NID;
selectedAttributes.add(new Integer(attrId));

String attrName = NbifAttributeInfo.NIMA_AN_NODE_NHWTYPE;
selectedAttributes.add(new String(attrName));

String attrName = info1;
selectedAttributes.add(new String (attrName));



//-------------------------------------------------------------------------
//
// 3B. For a Fault entity ALL attributes must be selected in the
// predefined order. The attributes are selected with method
// ArrayList getAttrIdArrayList(int entityId)
//
// NOTE: it is also possible to use command getActiveAlarmData(),
// which does not require giving the selected attributes at all
//
//-------------------------------------------------------------------------

// Example: the entity id for entity network element fault
int entityId = NbifAttributeInfo.NSA_CI_NEFLT;
NbifAttributeService nas = new NbifAttributeService();


ArrayList faultAttributeIds;
try {
faultAttributeIds = nas.getAttrIdArrayList(entityId);
}
catch (TolAttributeException e) {
throw e;
}

//-------------------------------------------------------------------------
//
// 3C. Key Attributes and Key Values for GetOneData Command
//
//-------------------------------------------------------------------------

// Example of giving keys for GetOne command attributes for
// entity iface, which has two key attributes

int entityId = NbifAttributeInfo.NIMA_CI_IFACE;
...
ArrayList keyAttributes = new ArrayList();
ArrayList keyAttrValues = new ArrayList();
int attrIdNid = NbifAttributeInfo.NIMA_AI_IFACE_NID;
int nid = 501;
int attrIdIfnr = NbifAttributeInfo.NIMA_AI_IFACE_IFNR;
int ifnr = 100872;
keyAttributes.add(new Integer(attrIdNid));
keyAttributes.add(new Integer(attrIdIfnr));
keyAttrValues.add(new Integer(nid));
keyAttrValues.add(new Integer(100872));

//-------------------------------------------------------------------------
//
// 3D. Filter Attributes, Filter Types and Filter Values for
// GetFilteredAllData Command
//
//-------------------------------------------------------------------------

Appendix: JavaAPI Examples




// Example of creating filters for GetFilteredAll command to get
// those interfaces, whose node ID is in the wanted interval
// (1000 <= nid < 2000) and whose ifcat value is 2157.

int entityId = NbifAttributeInfo.NIMA_CI_IFACE;

ArrayList<Integer> filterAttrIdList = new ArrayList()<Integer>;
ArrayList<Object> filterAttrValueList = new ArrayList<Object>();
ArrayList<Integer> filterTypeCodes = new ArrayList()<Integer>;
String filterStr = ifcat=2157;nid>=1000;nid<2000

// Call method parseFilters to parse the filters from a string
// and insert the filter IDs, filter types and filter values to
// ArrayLists.
try {
parseFilters(filterStr, entityId, filterAttrIdList,
filterAttrIdList, filterAttrValueList, filterTypeCodes)
}
catch (TolAttributeException e) {
// parsing String failed give error info to your application
}

// Method parseFilters has filled the attribute ids, filter
// types and attribute values to corresponding ArrayLists, which
// you can give to method GetAllData.
//
// Note that if you give an optional NbifAttributeValueService-
// parameter to method parseFilters, you will be able to give the
// values also by their descriptions in the filterStr String

Example: Using JavaAPI to Get Bulk Data
//-------------------------------------------------------------------------
//
// Use JavaAPI to get data from 8000 NBI
//
// The following example shows how to use JavaAPI to get data from 8000 NBI.
// First the OSS Client must create a valid session to the NBI Server. Start
// with creating a new objects of JavaAPI classes TolService, TolResultSet
// and TolOpenResultSet:
//-------------------------------------------------------------------------

TolService srv = new TolService();
TolResultSet result = new TolResultSet();
OpenResultSet openResult = new OpenResultSet();

// Next, the OSS Client opens the communication channel to the 8000 NBI service
// giving the IP address and port number where the 8000 NBI service is running.
// Note that when Inventory data is required, open the communication port 2462:
srv.openCommunication(172.19.35.104, 2462);

// When the connection to the 8000 NBI service is established, it is time to
// open a client session to 8000 NBI by providing the sessions username (for
// example nbif) and password (for example nbif1234).
srv.openSession(nbif, nbif1234, openResult);

// At this point the OSS Client has established a valid session to the 8000 NBI
// service and it can start sending get requests to 8000 NBI. The handleId of
// the OSS Client session is found from the openResult data set.
// Let us assume the OSS Client wants to send a getAllData request to extract
// Node object data (Node ID and Node Name).
// Before calling the getAllData method the OSS Client must build the ArrayList
// that contains the IDs of the Node attributes that should be in the response
// data:
ArrayList selected = new ArrayList();
selected.add(new Integer(NbifAttributeInfo.NIMA_AI_NODE_NID));
selected.add(new Integer(NbifAttributeInfo.NIMA_AI_NODE_NNM));

// Now, the OSS Client is ready to send the getAllData command to 8000 NBI.
try {
srv.getAllData (openResult.getHandleId(),
NbifAttributeInfo.NIMA_CI_NODE,
selected,
result);

Appendix: JavaAPI Examples



}
catch (IOException e){
// System.out.println ("IOException occurs in GetAllData\n");
}
catch (TolCommunicationException e) {
if (e.getSubErrorCode() > 0)
System.out.println("TolCommunicationException occurs in GetAllData\n"
+ Error code = + e.getErrorCode() + \n
+ Error message = + e.getMessage() + \n
+ Sub-Error Code = + e.getSubErrorCode() + \n
+ Sub-Error Description = + e.getSubErrorDescription()
+ \n);
else{
System.out.println ("TolCommunicationException occurs in GetAllData\n
+ Error code = + e.getErrorCode() + \n
+ Error message = + e.getMessage() + \n
+ No further info available\n);
}
}

// TolCommunicationException might occur if, for example, the selected attribute
// IDs are incorrect. The error message looks like the following:

TolCommunicationException occurs in GetAllData
Error code = 2
Error message = System error message
Sub-Error Code = 1
Sub-Error Description = Parameter error

// TolCommunicationException is also thrown if the query is executed as normal
// but there is no data. In that case the error message looks like the
// following:

TolCommunicationException occurs in GetAllData
Error code = 0
Error message = GetAll OK but there was no matching data
No further info available

// If no Exception occurred, it is time to read result data and you can do this
// by using the getNext() iterator. The OSS Client should scan all records until
// getNext() returns false. The OSS Client must know what attributes it is
// expecting in the response records (Node ID and Node Name). To fetch the
// attribute values from the result data set, the OSS Client can use either the
// getValueAsString() method for both attributes or use the specific
// getValueXX() methods according to the attributes native data types. In this
// example we use the native data type method.
//
// Note that the OSS Client can fetch the attributes in a different order from
// the one in which the attributes were added to the selected array.
while (result.getNext() == true)
{
String nodeName = result.getValueString(NbifAttributeInfo.NIMA_AI_NODE_NNM);
int nodeId = result.getValueInt(NbifAttributeInfo.NIMA_AI_NODE_NID);
System.out.println("Node Id = " + nodeId + " Node name = " + nodeName);
}


Example: Using JavaAPI to Receive Notifications
//-------------------------------------------------------------------------
//
// To receive inventory notifications from 8000 NBI the OSS Client must first
// define an own class that implements TolEventObserver
//-------------------------------------------------------------------------
class OSSClientObserver implements TolEventObserver
{
/* OSS Client code ...*/
}

// If the OSS Client has not yet opened a session to 8000 NBI, this should be
// done in the same way as explained in the previous example.
// Once a valid session has been established to the 8000 NBI, the
// OSSClientObserver implementation must register to JavaAPI by calling the
// addChangeListener method.
//

Appendix: JavaAPI Examples




// In the OSS client code, e.g. the constructor of the OSSClientObserver class,
// call the addChangeListener method of the TolService object

srv.addChangeListener(this);

// The next step is to subscribe to the entities from which the OSS Client wants
// to receive notifications.
// In this example the OSS Client is only subscribing to the Node entity.

ArrayList subscribeList = new ArrayList();
subscribeList.add(new Integer(NbifAttributeInfo.NIMA_CI_NODE));
srv.subscribeNotification(openResult.getHandleId(), subscribeList);

// The remaining task is to define the implementation of the TolEventObserver
// methods in the OSS client class OSSClientObserver, which has registered as
// an observer to JavaAPI by calling the addChangeListener method.
// JavaAPI will be calling those methods when it has a notification to send.

public void addNotification(TolAddEvent addEvent)
{
/* OSS Client code */
}
public void updateNotification(TolUpdateEvent updateEvent)
{
/* OSS Client code */
}
public void delNotification(TolDelEvent delEvent)
{
/* OSS Client code */
}
public void alarmNotification(TolAlarmEvent alarmEvent)
{
/* OSS Client code */
}
public void systemNotification(TolSystemEvent systemEvent)
{
/* OSS Client code */
}

// At this stage, the OSS Client is ready to start receiving notifications from
// JavaAPI. Whenever there is a change in the 8000 System, JavaAPI will call the
// appropriate TolEventObserver method implemented at the OSS Client side.
// To continue our example, let us see how a create notification
// would be processed. When a new Node object is created at the 8000 System,
// JavaAPI calls the addNotification method with a TolAddEvent object as
// parameter.
// Below is an example on how the addNotification method can be implemented by
// the OSS Client:

public void addNotification(TolAddEvent addEvent)
{
System.out.println("OSSClientObserver:: New add event, EntityId "
+ addEvent.getEntityId());
ArrayList attrList = addEvent.getAttrIdList();
TolResultSet result = addEvent.getAttrValueSet();
try
{
while (result.getNext() == true)
{
for (int ind = 0;ind < attrList.size();ind++ )
{
int attrId = ( (Integer) attrList.get(ind)).intValue();
String attrVal = result.getValueAsString(attrId);
System.out.println("AttrId " + attrId
+ " attrValue " + attrVal);
}
}
}
catch (TolAttributeException
{
System.out.println("TolAttributeException " + e.getMessage());
}
}

// Similarly, here are examples on how the delNotification and
// updateNotification methods can be implemented:
public void delNotification(TolDelEvent delEvent)
{
System.out.println("CustomerApi:: New delete event, EntityId"
+ delEvent.getEntityId());
ArrayList keyAttrList = delEvent.getKeyAttrIdList();
TolResultSet result = delEvent.getKeyAttrValueSet();

Appendix: JavaAPI Examples



try
{
while (result.getNext() == true)
{
for (int ind = 0;ind < keyAttrList.size();ind++ )
{
int attrId = ( (Integer) keyAttrList.get(ind)).intValue();
String attrVal = result.getValueAsString(attrId);
System.out.println("KeyAttrId " + attrId
+ " KeyAttrValue " + attrVal);
}
}
}
catch (TolAttributeException e)
{
System.out.println("TolAttributeException " + e.getMessage());
}
}

public void updateNotification(TolUpdateEvent updateEvent)
{
System.out.println("CustomerApi:: New update event, EntityId "
+ updateEvent.getEntityId());
ArrayList keyAttrList = updateEvent.getKeyAttrIdList();
ArrayList changeAttrList = updateEvent.getChangeAttrIdList();
TolResultSet resultKey = updateEvent.getKeyAttrValueSet();
TolResultSet resultChange = updateEvent.getChangeAttrValueSet();
try
{
while (resultKey.getNext() == true)
{
for (int ind = 0;ind < keyAttrList.size();ind++ )
{
int keyAttrId = ( (Integer) keyAttrList.get(ind)).intValue();
String keyAttrVal = resultKey.getValueAsString(keyAttrId);
System.out.println("KeyAttrId " + keyAttrId
+ " KeyAttrValue " + keyAttrVal);
}
}
while (resultChange.getNext() == true)
{
for (int ind = 0;ind < changeAttrList.size();ind++ )
{
int changeAttrId =((Integer)changeAttrList.get(ind)).intValue();
String changeAttrVal = resultChange.getValueAsString(changeAttrId);
System.out.println("ChangeAttrId " + changeAttrId
+ "ChangeAttrValue " + changeAttrVal);
}
}
}
catch (TolAttributeException e)
{
System.out.println("TolAttributeException " + e.getMessage());
}
}

// And here is an example on how the alarmNotification method could be
// implemented:

public void alarmNotification(TolAlarmEvent alarmEvent)
{
System.out.println("CustomerApi:: New alarm event \n"
+ alarmEvent.getString());
TolResultSet result = alarmEvent.getAttrValueSet();
ArrayList attrIdList = result.getAttrIdList();
try
{
while (result.getNext() == true)
{
for (int ind = 0;ind < attrIdList.size();ind++ )
{
int attrId = ( (Integer) attrIdList.get(ind)).intValue();
String attrVal = result.getValueAsString(attrId);
System.out.println("AttrId " + attrId
+ " AttrValue " + attrVal);
}
}
}
catch (TolAttributeException e)
{
System.out.println("TolAttributeException " + e.getMessage());

Appendix: JavaAPI Examples




}
}


Example: Using JavaAPI to Execute Macros
//-------------------------------------------------------------------------
//
// The following example shows how to use JavaAPI to handle the faults or
// provision the 8000 network by executing macros through NBI.
//
// Note that the macro file must already exist on the NBI Server.
// First the OSS Client must create a valid session to the NBI Server.
// with creating a new objects of JavaAPI classes TolService, TolResultSet
// and TolOpenResultSet:
//-------------------------------------------------------------------------

TolService srv = new TolService();
TolResultSet result = new TolResultSet()
OpenResultSet openResult = new OpenResultSet();

// Next, the OSS Client opens the communication channel to the 8000 NBI service
// giving the IP address and port number where the 8000 NBI service is running.
// Note that when fault data or provisioning is required, open the communication
// port 2461:

srv.openCommunication("172.19.35.104", 2461);

// When the connection to the 8000 NBI service is established, it is time to
// open a client session to 8000 NBI by providing the sessions username (for
// example nbif) and password (for examplenbif1234).

srv.openSession("nbif", "nbif1234", openResult);

// At this point the OSS Client has established a valid session to the 8000 NBI
// service and it can start sending get requests to 8000 NBI. The handleId of
// the OSS Client session is found from the openResult data set.
// Let us assume the OSS Client wants to execute a macro to acknowledge faults.
// The macro name in the example is UMSFltAck.mac and it requires an input
// parameter with a name ID FaultID. In the following example the timeout
// parameter is not given which means that the default timeout is used:



int handleId = openResult.getHandleId();
String macroFileStr = UMSFltAck;
String macroArguments = FaultID=165;
try{
srv.executeMacro(handleId, macroFileStr, macroArguments);
System.out.println ("Macro executed!\n");
}
catch (IOException e) {
System.out.println ("IOException occurs in Executemacro\n");
}
catch (TolCommunicationException e) {
System.out.println ("TolCommunicationException occurs in Executemacro\n"
+ "Error code = " + e.getErrorCode() + "\n"
+ "Error message = " + e.getMessage() + "\n"
+ "Sub-Error Code = " + e.getSubErrorCode() + "\n"
+ "Sub-Error Description = " + e.getSubErrorDescription()
+ "\n");
}

// TolCommunicationException occurs e.g. if the macro arguments are not given or
// if there are macro specific error messages. The error output looks like the
// following:

TolCommunicationException occurs in Executemacro
Error code = 2
Error message = System error message
Sub-Error Code = 102200
Sub-Error Description = Error at line 27: variable FaultID not supplied
in argument
Exception thrown from file: adaexecm.cpp function: AdaExecMacro

You might also like