Вы находитесь на странице: 1из 140

Use pursuant to applicable agreements

Title page

Alcatel-Lucent 9959
Network Performance Optimizer | M4
Diagnosis Development User Guide

diagug
3BK174465116TQZZA
Alcatel-Lucent Proprietary
Use pursuant to applicable agreements
Issue 10
March 2011
Use pursuant to applicable agreements

Legal notice

Legal notice

Alcatel, Lucent, Alcatel-Lucent and the Alcatel-Lucent logo are trademarks of Alcatel-Lucent. All other trademarks are the property of their respective
owners.

The information presented is subject to change without notice. Alcatel-Lucent assumes no responsibility for inaccuracies contained herein.
Copyright 2011 Alcatel-Lucent. All rights reserved.
Contains proprietary/trade secret information which is the property of Alcatel-Lucent and must not be made available to, or copied or used by anyone outside
Alcatel-Lucent without its written authorization.
Not to be used or disclosed except in accordance with applicable agreements.

Alcatel-Lucent Proprietary
Use pursuant to applicable agreements
Contents

Preface
Purpose .......................................................................................................................................................................................... xiii
xiii

Reason for reissue ...................................................................................................................................................................... xiii


xiii

Document pertinence ................................................................................................................................................................ xiii


xiii

Audience ....................................................................................................................................................................................... xiii


xiii

Assumed knowledge ................................................................................................................................................................. xiii


xiii

Product names ............................................................................................................................................................................. xiii


xiii

How to comment ........................................................................................................................................................................ xiii


xiii

1 Basic concepts

Overview ...................................................................................................................................................................................... 1-1


1-1

Terminology ................................................................................................................................................................................ 1-1


1-1

Diagnosis module process ..................................................................................................................................................... 1-2


1-2

2 Diagnosis editor

Overview ...................................................................................................................................................................................... 2-1


2-1

Eclipse environment ................................................................................................................................................................ 2-1


2-1

Procedure 2-1: Start diagnosis editor ................................................................................................................................. 2-4


2-4

Procedure 2-2: Display scenario .......................................................................................................................................... 2-6


2-6

Procedure 2-3: Close diagnosis editor ............................................................................................................................... 2-7


2-7

Diagnosis editor GUI ............................................................................................................................................................... 2-7


2-7

3 Scenarios

Overview ...................................................................................................................................................................................... 3-1


3-1

Scenario Tree .............................................................................................................................................................................. 3-2


3-2

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary iii
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Contents

....................................................................................................................................................................................................................................
Procedure 3-1: Create scenario ............................................................................................................................................ 3-4
3-4

Procedure 3-2: Create scenario by copy ........................................................................................................................ 3-13


3-13

Procedure 3-3: Edit scenario / scenario properties ..................................................................................................... 3-15


3-15

Procedure 3-4: Validate / check scenario ....................................................................................................................... 3-17


3-17

Procedure 3-5: Save scenario ............................................................................................................................................. 3-18


3-18

Procedure 3-6: Print scenario ............................................................................................................................................. 3-19


3-19

Procedure 3-7: Delete scenario .......................................................................................................................................... 3-20


3-20

Procedure 3-8: Create node ................................................................................................................................................ 3-21


3-21

Procedure 3-9: Edit node properties ................................................................................................................................ 3-27


3-27

Procedure 3-10: Edit node links ........................................................................................................................................ 3-28


3-28

Procedure 3-11: Edit link properties ................................................................................................................................ 3-34


3-34

Procedure 3-12: Copy node ................................................................................................................................................ 3-35


3-35

Procedure 3-13: Delete node / link .................................................................................................................................. 3-38


3-38

4 Edit node code

Overview ...................................................................................................................................................................................... 4-1


4-1

Procedure 4-1: Open node code editor .............................................................................................................................. 4-2


4-2

Use node code template .......................................................................................................................................................... 4-2


4-2

Import libraries .......................................................................................................................................................................... 4-3


4-3

Procedure 4-2: Define variables .......................................................................................................................................... 4-4


4-4

Input parameters for QoS indicator primitives ............................................................................................................... 4-5


4-5

Input parameters for radio parameter primitives ........................................................................................................... 4-6


4-6

Topology navigation primitives ........................................................................................................................................... 4-7


4-7

BSC navigation primitives .................................................................................................................................................... 4-8


4-8

Cell navigation primitives ...................................................................................................................................................... 4-9


4-9

Adjacency navigation primitives ...................................................................................................................................... 4-10


4-10

Indicator and parameter generic primitives .................................................................................................................. 4-10


4-10

Threshold primitives ............................................................................................................................................................. 4-12


4-12

Filtering primitives ................................................................................................................................................................ 4-13


4-13

Tuning primitives ................................................................................................................................................................... 4-14


4-14
....................................................................................................................................................................................................................................
iv Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Contents

....................................................................................................................................................................................................................................
Manipulate lists ....................................................................................................................................................................... 4-16
4-16

Test syntax ................................................................................................................................................................................ 4-17


4-17

Debug traces ............................................................................................................................................................................. 4-20


4-20

5 Example Scenarios

Overview ...................................................................................................................................................................................... 5-1


5-1

V2_DR (GSM technology) scenario .................................................................................................................................. 5-1


5-1

V2_SDROP (GSM technology) scenario ......................................................................................................................... 5-9


5-9

WAC cluster configuration (WiMAX technology) scenario .................................................................................. 5-13


5-13

6 Introduction to Python

Overview ...................................................................................................................................................................................... 6-1


6-1

Getting started with Python ................................................................................................................................................... 6-1


6-1

Use Python .................................................................................................................................................................................. 6-9


6-9

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary v
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Contents

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
vi Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
List of tables

2-1 Scenario tree view icons ......................................................................................................................................... 2-8


2-8

2-2 Fly-out palette icons ............................................................................................................................................... 2-22


2-22

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary vii
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
List of tables

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
viii Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
List of figures

2-1 Diagnosis editor ......................................................................................................................................................... 2-2


2-2

2-2 Title bar ......................................................................................................................................................................... 2-2


2-2

2-3 Diagnosis editor window ........................................................................................................................................ 2-4

2-4 Diagnosis editor window ........................................................................................................................................ 2-8

2-5 Node outline view ..................................................................................................................................................... 2-9


2-9

2-6 Example node outline view ................................................................................................................................. 2-10

2-7 Property tool bar ..................................................................................................................................................... 2-11


2-11

2-8 Node property ........................................................................................................................................................... 2-12


2-12

2-9 Link property ............................................................................................................................................................ 2-12


2-12

2-10 Link with iteration property ................................................................................................................................ 2-13

2-11 Scenario property .................................................................................................................................................... 2-13


2-13

2-12 Problem view ............................................................................................................................................................ 2-14


2-14

2-13 Customize property view ..................................................................................................................................... 2-14

2-14 Error sorting criteria ............................................................................................................................................... 2-15


2-15

2-15 Error grouping criteria ........................................................................................................................................... 2-16

2-16 Filters window .......................................................................................................................................................... 2-16


2-16

2-17 Set item limits ........................................................................................................................................................... 2-18


2-18

2-18 Scenario graphical editor ...................................................................................................................................... 2-19

2-19 Node tooltip example ............................................................................................................................................. 2-20


2-20

2-20 Links and links with iteration in scenario graphical editor ...................................................................... 2-21

2-21 Fly-out palette .......................................................................................................................................................... 2-23


2-23

2-22 Fly-out palette settings .......................................................................................................................................... 2-24


2-24

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary ix
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
List of figures

....................................................................................................................................................................................................................................
2-23 Editing node code in scenario graphical editor ............................................................................................ 2-25

2-24 Scenario menu .......................................................................................................................................................... 2-26


2-26

2-25 Node menu ................................................................................................................................................................. 2-28


2-28

2-26 Help menu item ........................................................................................................................................................ 2-29


2-29

2-27 Tool bar icons ........................................................................................................................................................... 2-29


2-29

2-28 Context menu on scenario tree viewer ............................................................................................................ 2-30

2-29 Context menu in scenario graphical editor .................................................................................................... 2-31

2-30 Node context menu in graphical editor ........................................................................................................... 2-31

2-31 Example 1 context menu on property view - key and value ................................................................... 2-31

2-32 Context menu on indicator association in scenario wizard ...................................................................... 2-31

2-33 Context menu on indicator association in scenario wizard ...................................................................... 2-32

2-34 Context menu on view bar ................................................................................................................................... 2-32

2-35 Context menu on editor bar ................................................................................................................................. 2-32

3-1 Create scenario wizard ............................................................................................................................................. 3-5


3-5

3-2 Awaiting server response ...................................................................................................................................... 3-14

3-3 Dispatching request to get scenario information ......................................................................................... 3-15

3-4 Edit scenario wizard ............................................................................................................................................... 3-16


3-16

3-5 Node property ........................................................................................................................................................... 3-27


3-27

3-6 Link properties ......................................................................................................................................................... 3-29


3-29

3-7 Link properties (with iteration) .......................................................................................................................... 3-31

3-8 Example 1 link property ....................................................................................................................................... 3-34

3-9 Example 2 link property ....................................................................................................................................... 3-34

....................................................................................................................................................................................................................................
x Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
List of procedures

2 Diagnosis editor

2-1 Start diagnosis editor ................................................................................................................................................ 2-4


2-4

2-2 Display scenario ......................................................................................................................................................... 2-6


2-6

2-3 Close diagnosis editor .............................................................................................................................................. 2-7


2-7

3 Scenarios

3-1 Create scenario ........................................................................................................................................................... 3-4


3-4

3-2 Create scenario by copy ........................................................................................................................................ 3-13

3-3 Edit scenario / scenario properties .................................................................................................................... 3-15

3-4 Validate / check scenario ...................................................................................................................................... 3-17


3-17

3-5 Save scenario ............................................................................................................................................................ 3-18


3-18

3-6 Print scenario ............................................................................................................................................................ 3-19


3-19

3-7 Delete scenario ......................................................................................................................................................... 3-20


3-20

3-8 Create node ................................................................................................................................................................ 3-21


3-21

3-9 Edit node properties ............................................................................................................................................... 3-27


3-27

3-10 Edit node links .......................................................................................................................................................... 3-28


3-28

3-11 Edit link properties ................................................................................................................................................. 3-34


3-34

3-12 Copy node .................................................................................................................................................................. 3-35


3-35

3-13 Delete node / link .................................................................................................................................................... 3-38


3-38

4 Edit node code

4-1 Open node code editor ............................................................................................................................................. 4-2

4-2 Define variables ......................................................................................................................................................... 4-4


4-4

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary xi
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
List of procedures

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
xii Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Preface
Preface

Purpose
This document describes the diagnostic solutions provided by the NPO and the Diagnosis
Editor.

Reason for reissue


Refer to the following Editions for a list of technical and editorial updates to the current
guide.
In Edition 10
First official release of the document for Release M4 R5.
In Edition 02
First official release of the document for Release M4 R3.
In Edition 01
First official release of the document for Release M4.

Document pertinence
This document applies to the NPO M4.1 projects.

Audience
This guide is intended for operators responsible for diagnosing QoS problems.

Assumed knowledge
You must be familiar with the radio network and Network Performance Optimizer (NPO)
concepts.

Product names
This document uses the following NPO naming convention: 9959 NPO and the generic
term NPO refer to the Alcatel-Lucent 9959 Network Performance Optimizer.

How to comment
To comment on this document or indicate an error, please contact your customer
representative.
...................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary xiii
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Preface

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
xiv Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
1 Basic concepts
1

Overview
Purpose
This section provides an overview of the NPO Diagnosis tool architecture.

Contents

Terminology 1-1
Diagnosis module process 1-2

Terminology
The following table lists the frequently used terms and corresponding definitions.

Term Definition
Diagnosis A diagnosis scenario is an analysis tree that contains ways to investigate a
Scenario quality of service problem using the data available in the NPO. The
scenario can be system or user defined.
Node Nodes provide code that implements checks in order to evaluate the
possible cause of a problem.
Link Links provide the association between nodes. A link is oriented from a
consequence node to a causal node.
Eclipse Eclipse is the Diagnosis Development Tool, used to define diagnosis
scenarios.
Node Code The Node Code Editor is used to write the node code.
Editor

...................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 1-1
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Basic concepts Diagnosis module process

....................................................................................................................................................................................................................................

Diagnosis module process


The diagnosis functions in optimization are used to find the probable root cause of a QoS
or performance problem.
The operator can launch the diagnosis in different contexts:
For a detected QoS degradation (typically when a QoS indicator crosses a threshold)
For a network object (e.g. a cell) for which the operator wants to check (and to
identify the problem, if any)
For a set of network objects (typically a group of cells) that the operator wants to
check.
Once executed, the diagnosis returns the results to the operator, who then tunes radio
parameters to correct the degradations and optimize the network.
Use of the diagnosis functions is restricted to the owner of the MUSE_
DIAGNOSIS_LICENSE for all use cases.
The Diagnosis module includes the following logical blocks:
The Diagnosis Development Tool which allows experts to create the diagnosis
scenarios. A scenario language is defined to allow the description of scenarios
The Advanced Graphical User Interface mechanism (graphical tool, assisted
language):
Diagnosis user interface to launch the diagnosis and get the results
Diagnosis server engine to execute the diagnosis scenarios and provide reports.
The diagnosis scenario is defined and configured in the diagnosis tool by an expert
(Alcatel-Lucent or operator). The Expert Role can be handled by the system
administrator. The expert uses a dedicated tool in order to develop the diagnosis
scenarios. The Administrator imports/exports diagnosis scenarios in the system through
the Web administration interface.
The operator optimizer is in charge of optimizing the radio network and launches the
diagnosis scenario to discover the cause of the problem. The operator should only use the
Analysis desktop.
It is also possible to define Tuning Session applications in the Diagnosis Editor. These
applications trigger the execution of specific checks for tuning parameter validation.
Use the System Scheduler to schedule the diagnosis execution.

....................................................................................................................................................................................................................................
1-2 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
2 Diagnosis editor
2

Overview
Purpose
This section presents an overview of the Diagnosis Editor.

Contents

Eclipse environment 2-1


Procedure 2-1: Start diagnosis editor 2-4
Procedure 2-2: Display scenario 2-6
Procedure 2-3: Close diagnosis editor 2-7
Diagnosis editor GUI 2-7

Eclipse environment
Eclipse is an open source community whose projects are focused on providing an
extensible development platform and application frameworks for building software. It has
a generic set of development services that can be used by any plugin tool and includes a
built-in Java Development Tool plugin.
Eclipse provides the diagnosis expert with a graphical development environment for
diagnosis design and scenario creation. The user draws a diagnosis causal tree and then
writes each node code, all of them in a user-friendly environment.
The Eclipse Platform User Interface is built around the concept of a window that provides
an overall structure and presents an extensible user interface to the user. The following
complete window is known as the Diagnosis Editor (see the following figure).

...................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-1
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Eclipse environment

....................................................................................................................................................................................................................................

Figure 2-1 Diagnosis editor

The Diagnosis Editor is based on editors, views and perspectives.

Title bar
The title bar is the strip at the at the top of the Diagnosis Editor window.
It begins with an icon and is followed by the application name, the user name, server IP
address and the name of the currently opened scenario.
All these are configurable and mandatory. On the right, several icons allow you to
minimize, maximize or close the application.

Figure 2-2 Title bar

....................................................................................................................................................................................................................................
2-2 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Eclipse environment

....................................................................................................................................................................................................................................
Editors
Editors allow the user to open, edit, and save objects. They follow an open-save-close
lifecycle much like file system based tools, but are more tightly integrated into the
window. When active, an editor can contribute actions to the Diagnosis Editor window
menus and tool bar.
Two editors appear in tabs in the middle of the window:
Scenario Graphical Editor
Node Code Editor.

Views
Views provide information about the object that the user is working with in the Diagnosis
Editor window. Modifications made in a view (such as changing a property value) are
generally saved immediately, and the changes are reflected immediately in other, related
parts of the user interface.
There are four views in the Diagnosis Editor window:
Scenarios View
Node Outline View
Properties View
Problems View.
The Properties View and Problems View, corresponding to the Scenario Graphical Editor
and Node Code Editor, are also displayed in tabs.
The user can rearrange a view or an editor by dragging and dropping and by customizing
to better suit a particular task (resizing is possible, moving to the splitters that separate
views and editors to the left, to the right, to the bottom or to the top).

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-3
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Procedure 2-1: Start diagnosis editor

....................................................................................................................................................................................................................................

Procedure 2-1: Start diagnosis editor


...................................................................................................................................................................................................

1 Perform one of the following actions:


From the Wibox, select Diagnosis Editor, OR
In the Alcatel-Lucent Analysis Desktop window, select Data->Diagnosis..., OR
In the Alcatel-Lucent Analysis Desktop window, click on the icon.
Result: A splash screen appears to the user with a progress bar, displaying the
progress in bringing up the Diagnosis Editor.
...................................................................................................................................................................................................

2 Check that the Diagnosis Editor window appears to the user, with all parts displayed at
their default location, as shown in the following figure.
Result: The Diagnosis Editor window is complete.

Figure 2-3 Diagnosis editor window

E...................................................................................................................................................................................................
....................................................................................................................................................................................................................................
N D O F S T E P S

2-4 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO


Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Procedure 2-1: Start diagnosis editor

....................................................................................................................................................................................................................................
The Title bar of the Diagnosis Editor window displays:
The Alcatel-Lucent Diagnosis Editor
The user name
The server IP address or server hostname.
The title bar is updated once a scenario is opened with the name of scenario.
The customized menus appear below the Title bar:
Scenario Menu item, with all the options related to a scenario
Nodes Menu item, with all options related to a node
Help menu item.
Note: Each item in the menu is Enabled/Disabled according to the FAD available to
the current user.
Below the customized menus, there are the customized tool bars that provide a quick
access to the options available under the menus.
To the left is the Scenario Tree Viewer. On startup, a list of available scenario names is
provided from the server. A tree displaying the list of scenarios is populated and displayed
under this view.
On startup, these parts are empty and they are populated only when there is an active
scenario:
To the right, the Node Outline View
On the bottom, the Properties and Problems Views
In the center, the Scenario Graphical Editor.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-5
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Procedure 2-2: Display scenario

....................................................................................................................................................................................................................................

Procedure 2-2: Display scenario


Once the Diagnosis Editor is up and running, the Scenario Tree View is populated with
the list of available scenarios.
Displaying a scenario involves:
Displaying the Scenario Nodes as saved by the user in the Graphical Editor
Displaying each nodes code and properties
Populating the Outline and Properties View based on the user's context of interaction.
Note: Only the code for the nodes that belong to the current scenario appears.
The maximum number of scenarios that can be opened in the Scenario Graphical Viewer
is configurable.
...................................................................................................................................................................................................

1 Select a scenario from the Scenario Tree View.


Result: The scenario is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


From the menu bar, select Scenario->Display scenario, OR
Right click on the scenario. Then, from the popup menu, select Display 'Name of
Scenario', OR
Double click on the scenario, OR
Click on the icon from the tool bar, OR
Press CTRL and D.
The following figure shows the menu option to display a scenario, where V2_DR is the
scenario name:

Result: The scenario appears.


E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
2-6 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Procedure 2-3: Close diagnosis editor

....................................................................................................................................................................................................................................

Procedure 2-3: Close diagnosis editor


...................................................................................................................................................................................................

1 Select Scenario->Exit.
Result: If there are any unsaved scenarios, a dialog box listing the scenarios that need
to be saved appears.
...................................................................................................................................................................................................

2 Check the appropriate scenarios that need to be saved.


Result: The scenarios are selected.
...................................................................................................................................................................................................

3 Click on OK.
Result: The Diagnosis Editor closes.
E...................................................................................................................................................................................................
N D O F S T E P S

Diagnosis editor GUI


This section describes the Diagnosis Editor graphical user interface. It describes the
layout of different parts within the Diagnosis Editor window.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-7
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-4 Diagnosis editor window

Scenario tree view


The Scenario Tree View displays the list of available scenarios. Scenario names are
displayed at the root level of the tree if a Family is not defined.
Usually, scenarios are grouped on the basis of Family / Sub Family. To view the scenarios
from a family, click on + from the icon to expand the tree. All the scenarios
grouped within that family are displayed in a tree and the icons change into .
Each scenario has an associated icon that represents whether the scenario is a System
Scenario or Customer Scenario.

Table 2-1 Scenario tree view icons

Icon Description
If the scenario is a system scenario supplied by Alcatel-Lucent.
If the scenario is created by customer and it belongs to the
customer dictionary.
....................................................................................................................................................................................................................................
2-8 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................
Table 2-1 Scenario tree view icons (continued)

Icon Description
If the scenario is created by the customer and it is not validated.
If the scenario is a system scenario and it is not validated.

A scenario is available in the Analysis Desktop and can be executed only when it is
validated.
A single click selection of a scenario in Scenario Tree View does not imply that the
scenario appears in the Scenario Graphical Viewer. Similarly, a scenario selected in the
Scenario Graphical Viewer does not imply that the respective scenario is selected in the
Scenario Tree View.
By default, the Scenario Tree View part appears to the left of the Diagnosis Editor.
When the Link with Editor menu item from the Scenario Tree Tool bar
is enabled:
Selecting any scenario in the Scenario Tree brings to the front the corresponding
Graphical Editor for that scenario (if the scenario is currently opened)
On changing tabs between the Graphical Editor, the corresponding scenario name is
selected in the Scenario Tree View.

Node outline view


The Node Outline View displays a list of nodes available for the current active scenario. It
provides quick access to the nodes related to the current scenario. If there are no opened
scenarios, this view is empty.

Figure 2-5 Node outline view

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-9
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................
Available nodes are displayed in a list view format, in this order:
First Node
Standard Nodes in alphabetical order
External Nodes in alphabetical order.
Each node has a related icon representing the node type, as described in the following
table.

Type Icon Displayed String


First Node Node_Name
Node Node_Name
External Node External_Scenario_Name.Node_
Name

By default, the Node Outline View appears to the right of the Diagnosis Editor.
Once the Node Code Editor is opened for editing a node code, the Node Outline View
displays the libraries and the variables defined for the node.

Figure 2-6 Example node outline view

You can now select one of the following options.

To Click on
Sort the elements alphabetically
Hide the comments
Hide the libraries
Collapse all

....................................................................................................................................................................................................................................
2-10 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

To Click on
Expand all

Property view
Property View displays all properties linked to a Scenario, a Node or a Link. The
properties view gets populated based on the context of user operation.
If a scenario is opened and no nodes are selected in the scenario, then the property view
displays the details related to the scenario.
If a node is selected in the Scenario Graphical Editor or in Node Outline View, then it
displays the properties of the node.
If a link between two nodes is selected, then the properties for the link are displayed.
By default, the Property View appears at the bottom of the Diagnosis Editor.

Figure 2-7 Property tool bar

When selecting the first icon from the Property tool bar, a two option window opens that
allows the user to select the type of properties to display:
Show Categories
Show Advanced Properties.
Node property
If a node is selected in the Scenario Graphical Editor or in the Node Outline View, the
node details are displayed in the property view. If the user has editing rights, the user can
edit node information in the property view by double clicking on the value field for the
respective property.
The user can modify the name of the node, the description and the X and Y coordinates.
On changing any property, the Scenario Graphical Editor and Node Outline View are
automatically updated to reflect the changes.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-11
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-8 Node property

Link property
If a link is selected in the Scenario Graphical Editor, the Link Rank appears in the
Property View. If the user has the editing rights, the user can modify the rank associated
with that link. Each link also has a property called Cut off associated with it, meaning
that if the next node proves to be True, the evaluation of the scenario stops immediately
(this is a find first root cause mechanism).

Figure 2-9 Link property

If the link is a link with iteration, along with the rank, the Property window also displays
the Iteration List and the Iteration Variable.

....................................................................................................................................................................................................................................
2-12 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-10 Link with iteration property

Scenario property
If neither a node nor a link is selected in the Scenario Graphical Editor and a node is not
selected in the Node Outline View, the Property window displays the properties of the
currently active scenario.

Figure 2-11 Scenario property

The operator cannot modify the scenario properties.

Problem view
If there are any errors / problems in the Diagnosis Node Code Editor, the Problem View
displays these errors.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-13
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-12 Problem view

By default, Problem View appears at the bottom of the Diagnosis Editor.


When selecting the icon from the Problem tool bar, the following options allow the
user to customize the Property View.

Figure 2-13 Customize property view

To sort the errors, from the tool bar menu, click on the icon and then on Sorting. A
new window opens. Select the sorting criteria.

....................................................................................................................................................................................................................................
2-14 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-14 Error sorting criteria

Sort errors according to the following criteria (ascending or descending):


Severity and description
Path
Resource
Location
Creation time
ID.
To restore the default sorting criteria, click on Restore Defaults.
To group errors, click on the icon and then on Grouping, and choose one of the
following options:
Type
Java Problem Type
Severity
None.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-15
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-15 Error grouping criteria

To select filters to be applied on the Problem view, from the tool bar menu, click on the
icon and then on Filters. A list of available filters appears. Check the filters to apply.
To configure filters, select the icon from the tool bar.
The following widow opens.

Figure 2-16 Filters window

Perform one of the following actions.

To Do
Select one filter Check the box related to the filter.
Select all filters Click on Select All.
Deselect all filters Click on Deselect All.

....................................................................................................................................................................................................................................
2-16 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

To Do
Add a new filter Click on New.
A new window opens.
Fill in the filter name, then click on OK.
Remove a filter from the Check the filter and then click on Remove.
list The default filter cannot be removed.

Check the filter to configure, then select the type of elements on which the filter is
configured:
On any element
On any element in the same project
On a selected element only
On a selected element and its children
On a working set.
To select one working set, click on Select... and in the window that opens, check
Window Working Sets or Selected Working Sets.
If necessary, the user can add new working sets.
If required, add a description of the filter type:
Select and fill in the field with the appropriate comment
Select and fill in the field with the appropriate comment.
To filter errors of one severity type, check the box attached to Where severity is, then
check the box attached to the type of problem:
Error
Warning
Info.
Perform one of the following actions.

To Do
Select the type of items Check the box(es) attached to the possible
types (displayed to the right of the window).
Select all types of items Slick on Select All.
Deselect all types of items Click on Deselect All.
Restore the defaults characteristics of the filter Click on Restore Defaults.

To limit visible items per group, from the tool bar menu, click on the icon and then on
Preferences. A new window opens, as shown in the following figure.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-17
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-17 Set item limits

Check the Use marker limits field, fill in the number of visible items, then click on Ok.
To restore the default values (100 items / group), click on Restore Defaults.

Scenario graphical editor


The Scenario Graphical Editor is one of the major components of the Diagnosis Editor. It
appears in the center of the window, and displays the graphical representation of a
scenario (links and nodes).
The Scenario Editor (Tab) title displays the name of the Scenario. An additional * appears
if the current editor was modified, as in the following example: . The * is not
shown when the current editor is saved.
The scenario is colored in:
Orange , when it is a system scenario
Green , when the scenario is created by customer.
As long as a scenario is not validated, it is marked with /.

....................................................................................................................................................................................................................................
2-18 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-18 Scenario graphical editor

Nodes are represented in the Scenario Graphical Editor by specific icons. The node name
appears below the icon. Each node appears at its respective X and Y location, retrieved
from its node property.
When the operator runs the mouse over the node, a tool tip appears, displaying following
information about the node:
Mode name
Mode description
Mode code snipped (first 100 characters).
For an external node, only the node name appears when the operator runs the mouse over
the node.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-19
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-19 Node tooltip example

Select multiple nodes in the Scenario Graphical Editor by holding down the Ctrl or Shift
keys and clicking on various nodes, or by pressing the left mouse button and dragging the
selection box over the nodes to be selected.
Note: For a node to be selected, the node must be completely within the bounding
selection rectangle.
For example, in the following figure, six nodes are selected.

....................................................................................................................................................................................................................................
2-20 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................
Links
Links are also known as connections. The link orientation defines the causality between
two nodes (which node is the cause, which node is the consequence). A consequence node
can have several causal nodes. Links between nodes are directed to visually represent the
flow of execution. The rank associated with the links decides the order of execution of
casualty nodes.
The link can also carry an iteration variable enabling it to test the next node on a set of
variables (for example, for neighbor or adjacency checks provided for a given cell).
Links with iteration are represented using dotted blue directed lines.
Links can also be defined as cutoff, meaning that if the causal node proves to be true, the
evaluation of all sibling nodes is skipped. The rank of a cutoff link is displayed in pink, as
shown in the following figure.

Figure 2-20 Links and links with iteration in scenario graphical editor

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-21
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................
Fly-out palette
Use the fly-out palette to:
Select a node / link
Create new nodes / links.
Table 2-2 Fly-out palette icons

Normal Icon Large Icon Displayed Displayed String with Details


16x16 32x32 String without
Details
Link Link
Create a Link
Link with Link with iteration
iteration Create a Link with iteration
Node Node
Create a node
First Node First Node
Create a first node
External Node External Node
Create an external node

The following figure shows the fly-out palette.

....................................................................................................................................................................................................................................
2-22 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-21 Fly-out palette

Right click on the fly-out palette to access the following options:


Change the layout to columns, list, icons only and details
Display large icons
Change settings
Pinned. If unchecked, the palette hides itself when the cursor moves out of the palette
area.
To change the settings of the fly-out palette, click on Settings. A dialog box appears.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-23
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-22 Fly-out palette settings

The following settings are available.

Font To change the Diagnosis Editor window Dialog Font, click on


.
A new window opens, which allows user to change the settings.
To return to the system default font settings, click on .
Layout To change the Layout to Columns, check the Columns field.
To change the Layout to List, check the List field. When set to List,
Layout can use large icons, when the Use large icons field is checked.
To change the Layout to Icons only, check the Icons only field.
To change the Layout to Details, check the Details field.

....................................................................................................................................................................................................................................
2-24 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Drawer options Always close when opening another drawer.


Always close when opening another drawer.
Never close.

By default, the Fly-out palette appears to the right of the Scenario Graphical Editor.
To change the position of the palette, right click on Palette and select Dock on> Left.
To resize the palette, right click on Palette and select Resize.

Node code editor


The Pydev Editor is a plugin that enables users to use Eclipse for Python development in
order to write node code, using features such as code completion, syntax highlighting,
syntax analysis, and debug traces.
The following icon is used in the heading for the Node Code Editor: .
Editing node code opens a new Node Code Editor in the place of the Scenario Graphical
Editor. The user can use the tabs to switch between the editors.

Figure 2-23 Editing node code in scenario graphical editor

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-25
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................
In the case of a scenario, the Editor (Tab) title displays the name of the scenario. When
editing a node's code, the editor title displays the name of the corresponding node. An
additional * appears if the current editor is modified. The * is not shown if the current
editor is saved.
The Python libraries are used in the node code definition when the user wants to access to
QoS indicator, a parameter value, or to navigate in the topology. The QoS and parameters
libraries are generated by the offline tools when the dictionaries are imported. Only the
topology navigation are hard coded. The use of the libraries allows completion when
typing an indicator or parameter value.
By default, the Node Code Editor appears in the center of the Diagnosis Editor.

Menubar, tool bar and popup menu


Note: When the user (even if the user is the Administrator) does not have a particular
license for a feature, then all the popup menus, menu bar menus, and tool bar items
related to that feature are disabled.
Menu bar
The following figure shows the menu bar.

Figure 2-24 Scenario menu

The following table lists the scenario menu items and their corresponding descriptions.

Scenario Description Accelerator


Menu Item
Scenario Opens the submenu under Scenario Menu Item Alt + S
New Scenario Creates a new scenario Ctrl + N

....................................................................................................................................................................................................................................
2-26 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Scenario Description Accelerator


Menu Item
Copy Copies the selected scenario
Scenario Grayed when no scenario is currently selected
Name of
Scenario...
Display Displays the scenario Ctrl + D
Name of Grayed when no scenario is currently selected
Scenario
Save Name of Save the currently opened scenario Ctrl + S
Scenario Grayed when no scenario is currently opened or when no
changes were made to the scenario since last save
Properties of Displays properties of the selected scenario in a wizard Ctrl + Enter
Name of Grayed when no scenario is currently selected
Scenario
Print Print scenario details, scenario layout or scenario node details. Ctrl + P
Grayed when no scenarios are opened.
Validate/ Validates/invalidates the currently opened scenario
Invalidate Grayed when no scenario is currently opened or when the user
Name of does not have privileges to modify selected scenario
Scenario
Delete Deletes the selected scenario
Grayed when no scenario is currently selected or when the user
does not have privileges to delete selected scenario
Exit Exits Diagnosis Editor Alt +F4

The following figure shows the Node menu.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-27
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-25 Node menu

The following table lists the Node menu items and their corresponding descriptions.

Node Description Accelerator


Menu
Item
Node Opens the submenu under Node menu item
Create Create a new node in the currently opened scenario Ctrl + 2
Node Grayed when the user does not have the privilege to modify the
current scenario
Create Creates a new First Node in the currently open scenario Ctrl + 1
First Node Grayed when the user does not have the privilege to modify the
current scenario or when a First Node already exists in the
current scenario
Create Creates a new External Node in the currently open scenario Ctrl + 3
External Grayed when the user does not have the privilege to modify the
Node current scenario
Edit Node Opens PyDev Editor with the node code of the currently Ctrl + D
Code selected node
Grayed when no node is selected
Delete Deletes the currently selected Node Ctrl + Delete
Grayed when the user does not have the privilege to modify the
current scenario or when no nodes are selected
Copy Copies the currently selected Node Ctrl + Shift + C
Node Grayed when no nodes are selected

....................................................................................................................................................................................................................................
2-28 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Node Description Accelerator


Menu
Item
Paste Pastes the copied node in the current scenario Ctrl + Alt + V
Node as... Grayed when the user does not have the privilege to modify the
current scenario or when no node was previously copied
Auto Arranges all the nodes in the current scenario in a tree form Shift + F5
Layout Grayed when the user does not have the privilege to modify the
current scenario or when a node is selected

The following figure shows the Help menu.

Figure 2-26 Help menu item

Tool bar
The icons on the tool bar display associated tool tips, specifying the meaning of the icon
when mouse is moved over them, as described in the following table.

Figure 2-27 Tool bar icons

Icon Description Grayed when...


New Never
Scenario
Copy No scenario is currently selected
Scenario
Display No scenario is currently selected
Scenario
Save No scenario is currently opened or no changes made since last
Scenario save
Print No scenarios are opened
Validate/ No scenario is currently opened or user is not privileged to
Invalidate modify selected scenario
Scenario
Delete No scenario is currently selected or user is not privileged to
Scenario delete selected scenario

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-29
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Icon Description Grayed when...


Auto Layout The user is not privileged to modify the current scenario or a
node is selected
Create new The user is not privileged to modify the current scenario
Node
Create new The user is not privileged to modify the current scenario or a
First Node First Node already exists in the current scenario
Create new The user does is not privileged to modify the current scenario
External
Node
Edit Node No node is selected
Code
Delete Node No node is selected or user is not privileges to delete the current
node
Copy Node No node is selected
Paste Node The user is not privileged to modify the current scenario or no
node was previously copied

Popup menus
Note: All popup menus are context sensitive. Menu items are present / enabled /
disabled, based on the current context.
The following figure shows the context menu on the scenario tree viewer.

Figure 2-28 Context menu on scenario tree viewer

If there are no scenarios selected when the user right clicks on the Scenario Tree View, all
options on the context menu, except Create Scenario under the new menu, are disabled.
The following figure shows the context menu in the scenario graphical editor.

....................................................................................................................................................................................................................................
2-30 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

Figure 2-29 Context menu in scenario graphical editor

The following figure shows the node context menu in the graphical editor.

Figure 2-30 Node context menu in graphical editor

In the last two popup menus, the Create First Node option appears only when the first
node does not exist (it is deleted).

Figure 2-31 Example 1 context menu on property view - key and value

Figure 2-32 Context menu on indicator association in scenario wizard

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-31
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................
Figure 2-33 Context menu on indicator association in scenario wizard

Figure 2-34 Context menu on view bar

Figure 2-35 Context menu on editor bar

....................................................................................................................................................................................................................................
2-32 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................
Customize
You can maximize or minimize all views and editors, by clicking on one of the two
buttons situated in the top right corner of each window, or by clicking on one of the
following options.

To Do
Minimize the window Click on .
Maximize the window Click on .
Restore the window Click on .
This option is only available if one of the first
two was selected.
Modify the size of each window Drag and drop the splitters that separate the
windows.
Move views All windows can be moved from the default
position.
From the popup menu of the views, select:
Move-> View to move one view
Move-> Tab Group to move both the
Property View and Problem View.
Move editors All windows can be moved from the default
position.
From the popup menu of the Scenario
Graphical Editor, select:
Move->Editor to move one editor
Move-> Tab Group to move all open
editors.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 2-33
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Diagnosis editor Diagnosis editor GUI

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
2-34 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
3 Scenarios
3

Overview
Purpose
This section describes how to manipulate a scenario via the system.

Contents

Scenario Tree 3-2


Procedure 3-1: Create scenario 3-4
Procedure 3-2: Create scenario by copy 3-13
Procedure 3-3: Edit scenario / scenario properties 3-15
Procedure 3-4: Validate / check scenario 3-17
Procedure 3-5: Save scenario 3-18
Procedure 3-6: Print scenario 3-19
Procedure 3-7: Delete scenario 3-20
Procedure 3-8: Create node 3-21
Procedure 3-9: Edit node properties 3-27
Procedure 3-10: Edit node links 3-28
Procedure 3-11: Edit link properties 3-34
Procedure 3-12: Copy node 3-35
Procedure 3-13: Delete node / link 3-38

...................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-1
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Scenario Tree

....................................................................................................................................................................................................................................

Scenario Tree
A diagnosis scenario is a formal description of a causal graph expressed as a linked set of
nodes. Each node provides code that implements checks in order to evaluate the possible
cause of a problem.
The maximum number of nodes in a scenario is limited to 150 nodes.
There are three types of nodes.

Node Description
First node Appears at the beginning of a scenario and is the entry point
of the scenario execution. A scenario must have a first node.
Only one first node is accepted.
Classic node This is the basic node. There can be as many basic nodes as
required.
External node Represents a node from another scenario.

Nodes are associated by means of links. A link is oriented from a consequence node to a
causal node. A consequence node can have several causal nodes.
A link contains the variable associations between the casual and consequence nodes.
There are two types of links:
The classic link
The link with iteration (list and variable).
The arrow of the links differs depending on the link type.
The NPO concept of the Availability domain is reused to specify on which object types
the scenarios are valid at each temporal level. The availability domain is defined by the
scenario developer.
A diagnosis scenario can reference a QoS indicator that semiautomatically triggers the
execution of the scenario on the threshold crossing. If no reference indicator was set, the
execution of the scenario can be triggered through a manual Network Object selection
operation in the Analysis Desktop.
The maximum number of Network Objects in the execution context is configurable.
Diagnosis is the process of execution of a scenario applied on an initial context.
A diagnosis can be executed:
On one object
The textual output describes probable failure cause and the possible remedy.
On a set of objects.
The output provides the list of objects which were identified by the scenario.
The intent is to select cells candidate for further analysis.
Diagnosis scenario result reports are provided in a synthetic or detailed way, depending
on the execution mode.
....................................................................................................................................................................................................................................
3-2 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Scenario Tree

....................................................................................................................................................................................................................................
Execution modes / context

Mode Description
Detailed Mode Launches a diagnosis execution, specified by
the user, on a single network object, at a
specific date, for a given periodicity, with a
given QoS requirement level (taken from the
current working zone).
This mode is used to interactively launch the
diagnosis from the NPO application. An
HTML report is generated.
Synthetic Mode Available for one or many network objects
(with the associated parameter), and optionally
with a date and a periodicity if the input
context contains the corresponding variables.
The QoS requirement level is required if a date
and periodicity are given.
This execution mode is similar to a classical
view execution for QoS or parameter in the
NPO. The Analysis Desktop basically displays
a matrix of Boolean values, but it can also
return string values with the status. The
Synthetic mode implies that the diagnosis
execution stops at the first detected problem.
Tuning Session Mode Launches the execution of specific scenarios
(called complex rules) that are used to check
parameter validity.
Use a specific diagnosis tuning session
checking scenario when the simple grammar
defined for the rules is not sufficient to express
the complexity of the check, for example,
when some topology navigation is required.

For more information about the execution of a scenario, refer to the Network Performance
Optimizer User Guide document, to Execute diagnosis in synthetic mode and Execute
diagnosis in detailed mode.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-3
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................

Procedure 3-1: Create scenario


...................................................................................................................................................................................................

1 Perform one of the following actions:


From the menu bar, select Scenario->New Scenario..., OR
Right click in the Scenario Tree View and select Scenario->New Scenario..., OR
Click on the icon from the tool bar, OR
Press CTRL + N.
Use the two page wizard with default values and editable fields that appears (see below)
to set up the mandatory preconditions of a scenario.

....................................................................................................................................................................................................................................
3-4 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................

Figure 3-1 Create scenario wizard

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-5
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................
Result: A default scenario name is populated based on the current user. The title area
displays messages / errors, if any, while creating a scenario.
...................................................................................................................................................................................................

2 Fill in the appropriate fields, as described in the following table.

Field Description Read- Default Value


Name only
Scenario Name of scenario to create must be unique. No Scenario_<owner>_
Name n
Owner The name of the user who creates the scenario. Yes
Access Access rights for Public or Private. No Private
Dictionary Dictionary to which the scenario belongs Yes Current Dictionary
(always a customer dictionary in create mode). Name
Type Scenario type (Diagnosis or Complex rule). No Diagnosis
System Displays whether the scenario is a system Yes Unchecked
scenario.
The creation of system scenarios via an editor is
not supported.
Severity Error or Warning Flag, used to discriminate the Yes, if
complex rules (tuning checks). diagno-
sis
scenario
Visible Checked, if this scenario is visible in the No Checked
Analysis Desktop.
Unchecked, if this scenario is not visible in the
Analysis Desktop except by the Administrator.
Validated Displays whether the user has considered that Yes Unchecked
this scenario is correct and executable.
Descrip- Operator description for node. No
tion
Availabil- Contains the list of object types from which the No
ity user can choose.
Domain - The items in the list are based on the following
Object rules:
Type
If the Type is Complex Rule, all the object
types in the system are available
If the Type is Diagnosis, then it displays the
object types of those modes for which
scenario creation is allowed.

....................................................................................................................................................................................................................................
3-6 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................

Field Description Read- Default Value


Name only
Availabil- A tool tip mentioning Hourly appears. No Unchecked
ity
Domain -
H
Availabil- A tool tip mentioning Daily appears. No Checked
ity
Domain -
D
Availabil- A tool tip mentioning Weekly appears. No Unchecked
ity
Domain -
W
Availabil- A tool tip mentioning Monthly appears. No Unchecked
ity
Domain -
M

Result: The parameters are defined.


...................................................................................................................................................................................................

3 If necessary, add the appropriate Families.


An indicator can belong to a family and sub-family hierarchy. Up to four depths of
sub-family are currently supported.
The table cells are editable dropdown lists, proposing the existing values and allowing the
user to add new values.
A scroll bar appears if needed. Add new rows by right clicking on a cell and selecting Add
Row.
Result: Once the mandatory fields are filled in, the Next and Finish buttons are
enabled.
...................................................................................................................................................................................................

4 Click on Next.
Result: The Trigger Association Page appears, based on the scenario type selected.
For a Diagnosis type scenario, the Trigger Association Page appears as shown in the
following figure.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-7
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................

A tree containing the list of available Indicators associated with the selected object
type appears.
For a Complex Rule type scenario, the Trigger Association Page appears as shown in
the following figure.

....................................................................................................................................................................................................................................
3-8 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................

...................................................................................................................................................................................................

5 For a Diagnosis type scenario, double click on an indicator from the Indicator Tree to set
the selected indicator.
To clear the currently selected Indicator, click on Clear.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-9
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................
To search for an indicator:
From the popup menu, select Search
Fill in the indicator's name in the new open window and, if necessary, check one of
the search options
Click on Find Next.

For a Complex Rule type scenario, click on Add... to set the parameter.
Result: A new window opens (see the following figure), displaying the parameters
divided in two trees, in separate tabs:
Design Parameters
Logical Parameters.

....................................................................................................................................................................................................................................
3-10 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-11
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-1: Create scenario

....................................................................................................................................................................................................................................
...................................................................................................................................................................................................

6 For a Complex Rule type scenario, double click on a parameter from one of the lists.
Result: The parameter is selected.
...................................................................................................................................................................................................

7 Click on OK.
Click on Remove to remove the selected parameter.
Result: The Associate Parameter(s) with Scenario window closes.
...................................................................................................................................................................................................

8 Click on Finish.
Result: The scenario is created.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-12 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-2: Create scenario by copy

....................................................................................................................................................................................................................................

Procedure 3-2: Create scenario by copy


...................................................................................................................................................................................................

1 From the Scenario Tree View, select a scenario to copy.


Result: The scenario is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


From the menu bar, select Scenario->Copy Scenario <Name of Scenario>..., OR
Right click and, from the popup menu, select Scenario->Copy Scenario <Name of
Scenario>..., OR
Click on the icon from the tool bar.
Result: A question dialog windows appears, indicating that the external nodes are not
copied.

...................................................................................................................................................................................................

3 Click on Yes.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-13
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-2: Create scenario by copy

....................................................................................................................................................................................................................................
Result: If the scenario is not currently open in the Graphical Editor, a progress bar
appears while the scenario information is retrieved from the server.

Figure 3-2 Awaiting server response

All the scenario properties are copied, and the following properties are changed by
default:
The name of the scenario to oldname_copy_n, where oldname is the name of
the scenario being copied and n is the copy number
The owner is set to the current user name
Access rights are set to Public.
...................................................................................................................................................................................................

4 To modify any scenario properties, refer to Procedure 3-1: Create scenario (p. 3-4).
Result: The scenario properties are modified accordingly.
...................................................................................................................................................................................................

5 Click on Finish.
Result: The scenario details are only updated in the local files. The scenario must be
saved for it to be reflected on the server.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-14 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-3: Edit scenario / scenario properties

....................................................................................................................................................................................................................................

Procedure 3-3: Edit scenario / scenario properties


...................................................................................................................................................................................................

1 From the Scenario Tree View, select a scenario to edit.


Result: The scenario is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


From the menu bar, select Scenario-> Properties of <Name of Scenario>..., OR
Right click on the scenario and, from the popup menu, select Scenario-> Properties
of <Name of Scenario>..., OR
Press CTRL + Enter.
Result: If the scenario is not currently open in the Graphical Editor, a progress bar
appears to the user while the scenario information is retrieved from the server.

Figure 3-3 Dispatching request to get scenario information

Once the scenario information is retrieved, a two page wizard appears (one page after
the other) for editing the scenario properties.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-15
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-3: Edit scenario / scenario properties

....................................................................................................................................................................................................................................

Figure 3-4 Edit scenario wizard

If the scenario is not currently open in the graphical editor (or if the user does not
have the privilege to modify the selected scenario), the wizard displays scenario
properties with all fields disabled.
A user can edit the scenario if:
The scenario is not a system scenario, if the user is the owner of the scenario, and
if the scenario is not currently locked by another user
The user is an administrator and the scenario is not currently locked by another
user.
...................................................................................................................................................................................................

3 To modify any scenario properties, refer to Procedure 3-1: Create scenario (p. 3-4).
You can only modify enabled fields.
Result: The scenario properties are modified accordingly.
...................................................................................................................................................................................................

4 Click on Finish.
Result: The scenario details are only updated in the local files. The scenario must be
saved for it to be reflected on the server.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-16 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-4: Validate / check scenario

....................................................................................................................................................................................................................................

Procedure 3-4: Validate / check scenario


Before marking a scenario as validated, all nodes must be checked to detect syntax errors,
undefined functions or invalid parameters.
A scenario that is not validated is not be visible in the Analysis Desktop and cannot be
executed.
Note: Only saved scenario can be marked as validated.
A scenario that is linked with an invalid scenario must be tagged as invalid.
...................................................................................................................................................................................................

1 From the Scenario Tree View, select a scenario to validate.


Result: The scenario is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


From the menu bar, select Scenario->Validate <Name of Scenario>..., OR
Click on the icon from the tool bar.
Result: A question dialog appears.

...................................................................................................................................................................................................

3 Click on OK.
Result: The scenario is validated.
The following modifications to a validated scenario automatically mark the scenario
as invalid:
Adding / deleting nodes or links
Editing node code
Modifying scenario properties.

E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-17
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-5: Save scenario

....................................................................................................................................................................................................................................

Procedure 3-5: Save scenario


After a scenario is validated and saved, perform the manual refresh in the Analysis
Desktop on the impacted Diagnosis tree. From the tool bar of the Analysis Desktop, select
Edit -> Refresh -> All or press F5.
...................................................................................................................................................................................................

1 From the Scenario Tree View, select a scenario to save.


Result: The scenario is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


From the menu bar, select Scenario->Save <Name of Scenario>, OR
Click on the icon from the tool bar.
Result: An information message appears.

...................................................................................................................................................................................................

3 Click on OK.
Result: The scenario is saved.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-18 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-6: Print scenario

....................................................................................................................................................................................................................................

Procedure 3-6: Print scenario


...................................................................................................................................................................................................

1 Perform one of the following actions:


From the menu bar, select Scenario->Print, OR
Click on the icon from the tool bar.
Result: A message box appears to the user with the following options.

...................................................................................................................................................................................................

2 Perform one of the following actions.

To Click on
Print scenario graphical layout and scenario Scenario Details
details
Print all information (scenario node layout, All Information
scenario details, node details and node layout)
Cancel the print request Cancel

Result: The scenario is printed accordingly.


E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-19
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-7: Delete scenario

....................................................................................................................................................................................................................................

Procedure 3-7: Delete scenario


...................................................................................................................................................................................................

1 From the Scenario Tree View, select a scenario to delete.


Result: The scenario is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


From the menu bar, select Scenario->Delete, OR
Right click on the scenario and, from the popup menu, select Scenario->Delete, OR
Click on the icon from the tool bar left side.
Result: A question dialogue appears.

...................................................................................................................................................................................................

3 Click on Yes.
Result: If the scenario was opened in the Graphical Editor, the associate editors
(including the Node Code Editor) close.
The scenario is deleted and removed from the Scenario Tree View.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-20 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-8: Create node

....................................................................................................................................................................................................................................

Procedure 3-8: Create node


By default, a suggested node name appears. Node names must be unique.
A scenario must have a first node. Only one first node is accepted.
...................................................................................................................................................................................................

1 Procedure 3-8.1: First node (p. 3-22).


...................................................................................................................................................................................................

2 Procedure 3-8.2: Node (p. 3-23).


...................................................................................................................................................................................................

3 Procedure 3-8.3: External node (p. 3-25).


E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-21
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-8.1: First node

....................................................................................................................................................................................................................................

Procedure 3-8.1: First node


...................................................................................................................................................................................................

1 Perform one of the following actions:


From the menu bar, select Node->Create First Node, OR
Right click in the Scenario Graphical Editor and, from the popup menu, select
Node->Create First Node..., OR
Click on the icon from the Fly-out palette, then click in the Scenario Graphical
Editor, OR
Click on the icon from the tool bar, OR
Press CTRL + 1.
Result: The following dialog box appears.

...................................................................................................................................................................................................

2 Fill in the following fields:


Name with a name for the first node
Description with a short description of the node.
Result: The fields are defined.
...................................................................................................................................................................................................

3 Click on OK.
Result: The first node is created and displayed in the Scenario Editor and in the Node
Outline View.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-22 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-8.2: Node

....................................................................................................................................................................................................................................

Procedure 3-8.2: Node


...................................................................................................................................................................................................

1 Perform one of the following actions:


From the menu bar, select Node->Create Node, OR
Right click in the Scenario Graphical Editor and, from the popup menu, select
Node->Create Node..., OR
Right click in the Node Outline View and, from the popup menu, select
Node->Create Node..., OR
Click on the icon from the Fly-out palette, then click in the Scenario Graphical
Editor, OR
Click on the icon from the tool bar, OR
Press CTRL + 2.
Result: The following dialog box appears.

...................................................................................................................................................................................................

2 Fill in the following fields:


Name with a name for the first node
Description with a short description of the node.
Result: The fields are defined.
...................................................................................................................................................................................................

3 Click on OK.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-23
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-8.2: Node

....................................................................................................................................................................................................................................
Result: The node is created and displayed in the Scenario Editor and in the Node
Outline View.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-24 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-8.3: External node

....................................................................................................................................................................................................................................

Procedure 3-8.3: External node


Note: This function is only available from Release M3.1.
...................................................................................................................................................................................................

1 Perform one of the following actions:


From the menu bar, select Node->Create External Node, OR
Right click in the Scenario Graphical Editor and, from the popup menu, select
Node->Create External Node..., OR
Right click in the Node Outline View and, from the popup menu, select
Node->Create External Node..., OR
Click on the icon from the Fly-out palette, then click in the Scenario Graphical
Editor, OR
Click on the icon from the tool bar, OR
Press CTRL + 3.
Result: The following dialog box appears.

...................................................................................................................................................................................................

2 Fill in the Name field with the following:


External scenario name
.
Its node name.
For auto completion, simultaneously press the CTRL + Space keys:
When the Name field is empty
When the . is entered.
An example of an external node name is:
V2_DR_Copy.V2_DR_Copy_Problem of unsuccessful Directed retry.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-25
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-8.3: External node

....................................................................................................................................................................................................................................
Result: The name is defined.
...................................................................................................................................................................................................

3 Click on OK.
Result: The node is created and displayed in the Scenario Editor and in the Node
Outline View.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-26 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-9: Edit node properties

....................................................................................................................................................................................................................................

Procedure 3-9: Edit node properties


Once a node is selected, node properties are updated in the Property View.

Figure 3-5 Node property

...................................................................................................................................................................................................

1 Double click on the property value in the Value Column for the following values and fill
in the new values:
Node Name
Description
X and Y coordinate.
Only these fields are editable.
Result: The new values are defined.
...................................................................................................................................................................................................

2 Save the new properties. Click on Enter.


Result: The node properties are modified accordingly.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-27
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-10: Edit node links

....................................................................................................................................................................................................................................

Procedure 3-10: Edit node links


A link is oriented from a consequence node to a causal node. A consequence node can
have several causal nodes.
There are two types of links:
The classic link
The link with iteration list and variable, meaning that the following node must be
evaluated one time for each value of this iterator.
The arrow of the links differs depending on the link type.
Links can be defined as cut off, meaning that if the next node proves to be true, the
evaluation of the scenario is immediately stopped.
A link between two nodes is invalid; it cannot be created and a message appears to the
operator in the following cases:
The new link creates a loop within the scenario (inter scenario loops are checked on
save)
The target node is the First Node
The source node is an External Node.
...................................................................................................................................................................................................

1 Procedure 3-10.1: Create new link (p. 3-29).


...................................................................................................................................................................................................

2 Procedure 3-10.2: Link with iteration (p. 3-31).


...................................................................................................................................................................................................

3 Procedure 3-10.3: Move link (p. 3-33).


E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-28 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-10.1: Create new link

....................................................................................................................................................................................................................................

Procedure 3-10.1: Create new link


...................................................................................................................................................................................................

1 In the Fly-out palette in the Scenario Graphical Editor, click on Create a link.
Result: The cursor is updated to indicate that a link is selected.
...................................................................................................................................................................................................

2 Move the cursor in the Scenario Graphical Editor Node Area (white area) and put it over a
node.
Result: The node selected is called the Cause node.
...................................................................................................................................................................................................

3 Move the mouse to the target node (Consequence node ).


Result: A link is made on the fly.
If the consequence node is valid, a dialog box to set link properties appears.

Figure 3-6 Link properties

Note that the Cause node name and the Consequence node name are displayed in the
dialog box.
...................................................................................................................................................................................................

4 Fill in the rank of the node with the appropriate value (a default value appears).
Result: The node rank is defined.
...................................................................................................................................................................................................

5 If the link created is a cutoff link, then check the Cutoff field.
Result: The Cutoff field is completed.
...................................................................................................................................................................................................

6 Click on OK.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-29
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-10.1: Create new link

....................................................................................................................................................................................................................................
Result: The link is created and reflected with a directional line between the two nodes
(from the Cause node to the Consequence node).
The rank of the link appears closed to the target node (it is indicated in pink if the
Cutoff field was checked).
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-30 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-10.2: Link with iteration

....................................................................................................................................................................................................................................

Procedure 3-10.2: Link with iteration


...................................................................................................................................................................................................

1 In the Fly-out palette in the Scenario Graphical Editor, click on Link With Iteration.
Result: The cursor is updated to display that a link is selected.
...................................................................................................................................................................................................

2 Move the cursor in the Scenario Graphical Editor Node Area (white area) and put it over a
node.
Result: The selected node is called the Cause node.
...................................................................................................................................................................................................

3 Move the mouse to the target node (the Consequence node).


Result: A link is made on the fly.
If the Consequence node is valid, a dialog box to set link properties appears.

Figure 3-7 Link properties (with iteration)

Note that the Cause node name and the Consequence node name are displayed in the
dialog box.
...................................................................................................................................................................................................

4 Fill in the rank of the node with the appropriate value (a default value appears).
Result: The node rank is defined.
...................................................................................................................................................................................................

5 If the link created is a cutoff link, then check the Cutoff field.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-31
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-10.2: Link with iteration

....................................................................................................................................................................................................................................
Result: The Cutoff field is completed.
...................................................................................................................................................................................................

6 Click on OK.
Result: The link is created and reflected with a directional line between the two nodes
(from the Cause node to the Consequence node).
The rank of the link appears closed to the target node (it is indicated in pink if the
Cutoff field was checked).
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-32 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-10.3: Move link

....................................................................................................................................................................................................................................

Procedure 3-10.3: Move link


...................................................................................................................................................................................................

1 Select the link.


Result: The link is selected.
...................................................................................................................................................................................................

2 Put the mouse on the extremity you want to move and drag the link to the new node.
Result: The link is moved.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-33
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-11: Edit link properties

....................................................................................................................................................................................................................................

Procedure 3-11: Edit link properties


Once a link is selected, link properties are updated in the Property View.

Figure 3-8 Example 1 link property

Figure 3-9 Example 2 link property

...................................................................................................................................................................................................

1 Double click on the property value in the Value Column for the following values and fill
in the new values:
Rank
Cutoff
Iteration List (in the case of a link with iteration)
Iteration Variable (in the case of a link with iteration).
Only these fields are editable.
Result: The new values are defined.
...................................................................................................................................................................................................

2 Save the new properties. Click on Enter.


Result: The link properties are modified accordingly.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-34 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-12: Copy node

....................................................................................................................................................................................................................................

Procedure 3-12: Copy node


When copying a node, the node's link and node position are not copied. Only the node
description and node code are copied.
...................................................................................................................................................................................................

1 In the Scenario Graphical Editor, select a node to copy.


Result: The node is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


From the menu bar, select Node->Copy Node, OR
Right click and, from the node popup menu, select Copy Node, OR
Click on the icon from the tool bar.
Result: The node is ready to be copied.
...................................................................................................................................................................................................

3 In the Scenario Graphical Editor, perform one of the following actions:


From the menu bar, select Node->Paste Node As..., OR
From the popup menu, select Paste Node as..., OR
Click on the icon from the tool bar.
Note: Pasting a node as a First Node is possible only when the scenario does not
already have a first node.
To paste a node as an External Node, paste the node as an external node linking to the
scenario from which it was copied.
Pasting a node as an External Node is possible only when:
The current scenario is not the same as the copied node scenario, and
The copied node scenario is not a system scenario.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-35
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-12: Copy node

....................................................................................................................................................................................................................................
Result: A new dialog box opens that allows the user to select the type of node to paste
(by default, the standard node).

...................................................................................................................................................................................................

4 Select the type of node, then click on OK.


Result: If the selected node type is External Node, an external node linking to the
scenario the node was copied from is created in the existing scenario.
Alternatively, the Create new node dialog box opens.

By default, the fields are filled in:


Name with the name of the copied node_copy number
A brief description of the copied node.

....................................................................................................................................................................................................................................
3-36 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Scenarios Procedure 3-12: Copy node

....................................................................................................................................................................................................................................
...................................................................................................................................................................................................

5 Fill in the two fields with the appropriate values, then click on OK.
Result: The node is copied and pasted and displayed in the Scenario Graphical Editor
and Node Outline View.
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 3-37
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Scenarios Procedure 3-13: Delete node / link

....................................................................................................................................................................................................................................

Procedure 3-13: Delete node / link


...................................................................................................................................................................................................

1 In the Scenario Graphical Editor, select a node / link to delete.


Result: The node or link is selected.
...................................................................................................................................................................................................

2 Perform one of the following actions:


Only for a node, from the menu bar, select Node->Delete, OR
Right click in the Scenario Graphical Editor and, from the popup menu, select Delete,
OR
Only for a node, right click in the Node Outline View and, from the popup menu,
select Node->Delete Node..., OR
Click on the icon from the right side of the tool bar.
Result: The node or link is ready to be deleted.
...................................................................................................................................................................................................

3 From the popup menu, select Delete.


Result: A new dialog box opens.

...................................................................................................................................................................................................

4 Click on OK.
Result: The node / link is deleted.
If a node is deleted from a scenario, all the links associated to the node are also
deleted (the scenario links and the links defined in other scenarios).
E...................................................................................................................................................................................................
N D O F S T E P S

....................................................................................................................................................................................................................................
3-38 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
4 Edit node code
4

Overview
Purpose
This section describes how to edit a node in the Node Code Editor and how to manage the
telecom primitives.

Contents

Procedure 4-1: Open node code editor 4-2


Use node code template 4-2
Import libraries 4-3
Procedure 4-2: Define variables 4-4
Input parameters for QoS indicator primitives 4-5
Input parameters for radio parameter primitives 4-6
Topology navigation primitives 4-7
BSC navigation primitives 4-8
Cell navigation primitives 4-9
Adjacency navigation primitives 4-10
Indicator and parameter generic primitives 4-10
Threshold primitives 4-12
Filtering primitives 4-13
Tuning primitives 4-14
Manipulate lists 4-16
Test syntax 4-17
Debug traces 4-20

...................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-1
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Procedure 4-1: Open node code editor

....................................................................................................................................................................................................................................

Procedure 4-1: Open node code editor


The Code Editor supports the following functions:
Python syntax highlighting
Code auto completion
Auto indentation
Libraries for tracing
Standard libraries for indicators, parameters and topology navigation.
Note: The popup menu available in the Node Code Editor is not used for node code
development.
...................................................................................................................................................................................................

1 Select the node to edit the associated code.


Result: The node is selected.
...................................................................................................................................................................................................

2 From the pop up menu, select Edit Node Code.


Result: The Code Editor window opens in the center of the Diagnosis Editor, in a
switching tab with the Scenario Graphical Editor.
If there is no code associated with the node, a new empty code is created and
displayed, otherwise the node code is loaded in the Node Code Editor.
The code is editable based on the FAD. If the user does not have the valid privileges,
the Node Code Editor is read-only.
E...................................................................................................................................................................................................
N D O F S T E P S

Use node code template


Most of the nodes follow the same structure as shown below.
#import libraries
import library_name
# Define variable
variable_name = library_name.primitive_template(parameter1,...,
parameter n)
# Test part
if(variable_name == None):
unknown("Report when it is not possible to evaluate the node")
elif (condtion of a problem):
pbfound("Report when a problem has been found")
else:
nopbfound("Report when no problem has been found")
All words that come after the hash character # are considered to be comments.

....................................................................................................................................................................................................................................
4-2 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Import libraries

....................................................................................................................................................................................................................................

Import libraries
The NPO Diagnosis Library defines telecom primitives that are predefined to build test
expressions and node code.
Primitives are functions that allow access to the data (indicators, parameter, topology
object).
They are available only when the related library is imported into the code.
The libraries are imported in the Diagnosis Editor manually by the user each time a node
code is developed, by typing the following command:
import library_name
Due to Python Syntax highlighting, the word import is always written in blue.
The following table presents the types of library.

Library Definition
I_technology name QoS Indicator for specified technology
Example: I_GSM; I_WiMAX; I_UMTS
P_technology name Logical radio parameters and the radio network design for specified
technology
Example: P_GSM; P_WiMAX; P_UMTS
P_DN_technology Logical radio parameters and the radio network design for specified
name technology; the primitive name is constructed with the displayed names.
Example: P_DN_GSM.MNC()
N Generic topology primitives
N_Technology Navigation topology for a technology
Example: N_GSM
Generic Filtering and generic primitives
Example: Generic.filterOnParameter()
Tuning Tuning primitives
Example: Tuning.advice_tuning()
set Manipulation of list

Note: If you want to access the value of a customer indicator, you must use the
get_indicator(object, <customer_indicator_name>) primitive, because
only system indicators are present in the I_technology.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-3
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Procedure 4-2: Define variables

....................................................................................................................................................................................................................................

Procedure 4-2: Define variables


The template to define a variable is:
variable_name = library_name.primitive_template(parameter1,...,
parameter n)
All the parameters used to define a variable for a node code that are not specified are
global and can be reused in its consequence node. They are also called initial context.
Examples of global parameters are:
object, the identifier of the network object given at the execution context
object_list, the list of identifiers of all network objects on which the diagnosis is
executed.
bsc = N_GSM.BSCofOMC_R( object )
When this scenario is executed, this expression returns the list of all BSC of the given
OMC-R at the execution moment.
The user can also define local parameters for a variable:
bsc = N_GSM.BSCofOMC_R( omcr19 )
When executing the scenario, this expression returns the list of all BSC of the OMC-R 19.
...................................................................................................................................................................................................

1 In the command line, type:


variable_name = library_name.
Result: A list appears, displaying all the primitives available for that library, in green.

The global parameter related to that primitive appears in parenthesis.


If this list disappears, press Ctrl + Space to reload the templates.
The auto completion feature provides primitives filters once you start typing in the
command line to select an item from the dropdown list. Due to the huge number of
telecom primitives, the word completion proposition appears only when there is a
unique proposition.
....................................................................................................................................................................................................................................
4-4 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Procedure 4-2: Define variables

....................................................................................................................................................................................................................................
...................................................................................................................................................................................................

2 Double click on the primitive to select it.


Result: The primitive is selected.
...................................................................................................................................................................................................

3 If necessary, fill in the parameters related to that primitive with the appropriate value.
Result: The parameters are defined.
E...................................................................................................................................................................................................
N D O F S T E P S

Input parameters for QoS indicator primitives


The global variable (object) is passed by default to the primitives for the QoS indicator.
Once a primitive is selected, a textual description of the selected primitive appears to the
right of the list.

The following expressions are equivalent:


Ratio_HO = I_GSM.SDCCH_drop_HO_ratio ( object )
Ratio_HO = I_GSM.SDCCH_drop_HO_ratio ( )
To call a QoS indicator with a context that is not the initial context, use the following
syntax:
Ratio_HO = I_GSM.SDCCH_drop_HO_ratio ( value )

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-5
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Input parameters for radio parameter primitives

....................................................................................................................................................................................................................................

Input parameters for radio parameter primitives


By default, the operational value(s) of the radio parameter is (are) returned.
Once a primitive is selected, a textual description of the selected primitive appears to the
right of the list.
The following expressions are equivalent:
P_GSM.TIMER_T11( )
P_GSM.TIMER_T11( object, OP).
The input parameters for radio parameters primitives are:
Object
Type.
The following table lists the possible syntax for the parameter type.

Parameter Name Meaning


OP Operational
H Historical (value at execution context date, or date given in
the primitive)
REF Reference
REFMIN Reference Minimum
REFMAX Reference Maximum
P Planned
FC Forecast
ORV Operator Reference Value

Note: Usage of FC requires execution based on a Tuning Session, so it can only be


used in a complex rule.
Example:
To get the minimal value of a design parameter, use the following syntax:
P_GSM.TIMER_T11(object, REFMIN)
To get the planned value of a design parameter, use the following syntax:
P_GSM.TIMER_T11(object, P)

....................................................................................................................................................................................................................................
4-6 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Topology navigation primitives

....................................................................................................................................................................................................................................

Topology navigation primitives


These primitives provide facilities to navigate between related objects of the RNO data
model. These primitives use the special prefix N.
The generic primitives that allow navigation between Parent and Children Network
Objects can replace most of these primitives.
Adjacencies topology primitives (serving, target, neighbors) are also made accessible via
a Python primitive. Navigation primitives use some cartographical distance computing for
the interference computing. If no corresponding objects are found, the system returns
empty object lists.
The following table describes the existing NPO generic topology primitives.

Name Definition Parameters


get_children_objects Returns the children network elements related to the object
specified object for the specified technology. technology
get_filtered_children_ Returns the children network elements related to the object1
objects specified objects for the specified technology. object2
technology
get_parent_object Returns the parent network elements related to the object
specified object for the specified technology. technology
getObjectExternalId Returns the object external ID. object
getObjectType Returns the object type. object
getAllRelations Returns all the relations linked to an object object
(incoming and outgoing).
getIncomingRelations Returns all the incoming relations linked to an object
object.
getOutgoingRelations Returns all the outgoing relations linked to an object
object.
getSource Returns the source object of the relation. relation
getTarget Returns the target object of the relation. relation
getRelation Returns the relation between two objects. sourceOb-
ject
targetOb-
ject
hyperlink Returns the external ID of a given object with a object
hyperlink to permit the propagation to the mode
trees.
hyperlinkForList Returns the external IDs of a given objects with object list
hyperlinks to permit the propagation to the mode
trees.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-7
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Topology navigation primitives

....................................................................................................................................................................................................................................
Besides these primitives, there is a specific set of primitives for W-CDMA, as shown in
the following table.

Name Definition Parameters


getCellsFromRnc Returns the list of cells depending on an RNC. object
getCellsFromNodeB Returns the list of cells depending on a NodeB. object
getCellsFromMicroNodeB Returns the list of cells depending on a object
MicroNodeB.
getCellsFromOneNodeB Returns the list of cells depending on a OneNodeB. object
getTarget3GCells Returns the list of CELL3G who are the target of object
adjacencies leaving from the object.
getSource3GCells Returns the list of CELL3G who are the source of object
adjacencies coming to the object.
getTarget2GCells Returns the list of ECELL2G who are the target of object
adjacencies leaving from the object.
getNodeBFromCell Returns the NodeB object related to a Cell3G. object
getMicroNodeBFromCell Returns the MicroNodeB object related to a Cell3G. object
getOneNodeBFromCell Returns the OneNodeB object related to a Cell3G. object
getNodeBFromRNC Returns the list of NodeB related to a RNC. object
getMicroNodeBFromRNC Returns the list of MicroNodeB related to a RNC. object
getOneNodeBFromRNC Returns the list of OneNodeB related to a RNC. object
getIubFromRNC Returns the list of IUB related to a RNC. object

For GSM technology, the prefix is N_GSM. Refer to the following sections for the
proposed primitives.

BSC navigation primitives


Note: This section is not applicable for W-CDMA.

Name Definition Parameters


BSCOfOMC_R Returns the list of all BSCs that belong to the object
same OMC-R.
Cells Returns the list of all cells that belong to a given object
BSC.
MFSOfBSC Returns the MFS of a given BSC. object
OMC_ROfBSC Returns the OMC-R of a given BSC. object

....................................................................................................................................................................................................................................
4-8 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Cell navigation primitives

....................................................................................................................................................................................................................................

Cell navigation primitives


Note: This section is not applicable for W-CDMA.

Name Definition Parameters


Adjancencies Returns in a list the adjacencies for which a object
given cell is the serving cell.
Adjancency Returns the adjacency from serving cell to serving
FromServing target cell if it exists, or UNKNOWN. target
AndTarget
Ainterference Returns the probability of interference between serving
Probability the serving cell and target cell, considering that target
the two cells use adjacent frequencies
(D(ARFCN) = 1).
BSC Returns the BSC of the cell. object
BTS Returns the BTS of the cell. object
CellsInCircle Returns the list of cells (possibly empty) that object
are located inside a circle of specified radius, a
centred on the cell.
CellsOfBSC Returns the list of cells that belong to the BSC object
of a given cell.
CellsOfBTS Returns the list of cells that belong to the BTS object
of a given cell. For a split cell, the main BTS is
considered.
CellsOfMFS Returns the list of cells that belong to the MFS object
of a given cell.
CellsOfOMC_R Returns the list of cells that belong to the object
OMC-R of a given cell.
CellsOfRA Returns the list of cells that belong to the object
Routing Area of a given cell.
Cinterference Returns the probability of interference between object1
Probability the serving cell and target cell, considering that object2
the two cells use the same (co-channel)
frequency (D(ARFCN) = 0).
LA Returns the Location Area of the cell. object
MFSofCell Returns the MFS of the cell. object
OMC_RofCell Returns the OMC-R of the cell. object
ServingCells Returns the list of serving cells of a given cell, object
considering either the planned adjacencies or type
the operational adjacencies of the network.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-9
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Cell navigation primitives

....................................................................................................................................................................................................................................

Name Definition Parameters


TargetCells Returns the list of target cells of given cell C, object
considering either the planned adjacencies or type
the operational adjacencies of the network.
TRXs Returns the list of TRXs of the cell. object
TRXFromIndex Returns the TRX number of the cell (or object
UNKNOWN). TRX number must be an integer index
from 1 to n, n being the number of TRX in the
cell (available with the primitive
Number_Of_TRX).
FHS Returns the list of FHS of a given cell. object
TrafficZones Returns the list of traffic zone of a given cell. object

Adjacency navigation primitives


Note: This section is not applicable for W-CDMA.

Name Definition Parameters


Serving Returns the serving cell of the adjacency. object
Target Returns the target cell of the adjacency. object

Indicator and parameter generic primitives


These primitives allow the user to obtain the indicator or parameter value from a generic
call. The result is the same as a call or the corresponding primitive taken in the
I_<techno> or P_<techno> library.

Name Description Parameters


get_indicator Retrieves the value of a given indicator Indicator name
for the object on which the scenario is object
executed.
[aDate]
get_indicator_list Retrieves the values of a list of Indicator name list
indicators in a single call for a given list object list
of indicators for the objects on which
[aDate]
the scenario is executed.
get_parameter Retrieves the value of a given parameter Parameter system name
for the object on which the scenario is object
executed.
Type of value
[aDate]

....................................................................................................................................................................................................................................
4-10 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Indicator and parameter generic primitives

....................................................................................................................................................................................................................................

Name Description Parameters


get_parameter_from_ Retrieves the value of a given parameter Parameter displayed name
displayed_name for the object on which the scenario is object
executed.
Type of value
The given parameter name is the
[aDate]
displayed name instead of system name.
get_parameter_for_ Retrieves the value of a given parameter Parameter system name
tech for a given technology. object
Type of value
[aDate]
get_parameter_for_tech_ Retrieves the value of a given parameter Parameter displayed name
from_displayed_name for the specified technology (by the object
displayed name) for the object on which
technology
the scenario is executed.
Type of value
The given parameter name is the
displayed name instead of system name. [aDate]
get_parameter_list Retrieves the value of a list of Parameter system name list
parameters in a single call for a given object list
list of parameters for the objects on
technology
which the scenario is executed.
Type of value
[aDate]
shiftDate Calculates a date from another one. aDate
delta
period(DAY,WEEK,
MONTH)

Note: The date (aDate) input parameter is optional. By default, the date global
variable is used.
Example:
Generic.get_indicator(DR_Out_unsuccess_rate, object) has the same
effect as I_GSM.DR_Out_unsuccess_rate(object).
Generic.get_parameter(TIMER_T11,object,OP) has the same effect as
P_GSM.TIMER_T11(object, OP).

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-11
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Threshold primitives

....................................................................................................................................................................................................................................

Threshold primitives
Threshold primitives are used to test an indicator value with its threshold. Primitives are
provided in order to be able to verify the color of the indicator.

Name Description Parameters


hasThreshold Indicates if the indicator has a threshold or Indicator name
not. (QoS Requirement)
getYellowThreshold Returns the yellow threshold value. Indicator name
(QoS Requirement)
getOrangeThreshold Returns the orange threshold value. Indicator name
(QoS Requirement)
getRedThreshold Returns the red threshold value. Indicator name
(QoS Requirement)
isGreen Checks if the indicator is green for a given Indicator name
object. (QoS Requirement)
isYellow Checks if the indicator is yellow for a given Indicator name
object. (QoS Requirement)
isOrange Checks if the indicator is orange for a given Indicator name
object. (QoS Requirement)
isRed Checks if the indicator is red for a given Indicator name
object. (QoS Requirement)

When the QoS Requirement (optional parameter) is not provided in any of the above
primitives, it must be retrieved form the current working zone.
Possible QoS requirement values are:
LOW
MEDIUM
HIGH.

....................................................................................................................................................................................................................................
4-12 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Filtering primitives

....................................................................................................................................................................................................................................

Filtering primitives
Filtering primitives are provided to the user to permit the limitation of a Network Objects
number from a greater number, using selection criteria. One primitive is for filtering by
QoS indicator values, and the other is for filtering by parameter values.
These primitives are available once the Generic library is imported.

Name Description Parameters


FilterOnQoSIndicator Filters by QoS indicators value. objectlist
name
testoperator
thresholdvalue
FilterOnParameter Filters by parameter value. objectlist
name
testoperator
thresholdvalue
FilterOnParameterWith- Filters by parameter value. objectlist
Tech name
testoperator
thresholdvalue
technology

The thresholdvalue is a numerical value.


The object list represents the list of identifiers of all network object on which the
diagnosis is executed.
The list of operators that can be used in filtering is as follows.

Operator Meaning
> Greater than
< Smaller than
= Equal
>= Greater than or equal to
<= Smaller than or equal to
<> Not equal

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-13
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Filtering primitives

....................................................................................................................................................................................................................................
Example:

Parameters Results
FilterOnQosIndicator(Ec1,"RTCH_ From the cell list Ec1, returns a list of cells
duration_avg","=","0") where the indicator RTCH_duration_avg = 0
for a given date and periodicity.
FilterOnParameter(Ec1,"L_RXLEVMIN_ From the cell list Ec1, returns a list of cells
UHL","<","-100") where the parameter L_RXLEVMIN_UHL <
-100.

Tuning primitives
Tuning primitives permit the creation of tuning operations linked to the result of a
diagnosis execution. These operations are used for a tuning session creation in the
Analysis Desktop.

Name Description Parameters


advice_tuning Creates an tuning advice for a given object
object. advice string
user_defined_param_ Creates a tuning operation for object on object
tuning the parameter name with a given value. parameter name
value
parameter name type
historical_param_tuning Creates a tuning operation for object on object
the parameter name with the value that parameter name
had the parameter at a given date.
date
parameter name type
ref_param_tuning Creates a tuning operation for object on object
the parameter name with the reference parameter name
value of this parameter.
parameter name type
orv_param_tuning Creates a tuning operation for object on object
the parameter name with the operator parameter name
reference value of this parameter.
parameter name type
relation_tuning Creates a tuning operation to create object
relations of a given type (INCOMING, object List
OUTGOING, BIDIRECTIONAL)
type
between the object and all the objects of
a given list.

....................................................................................................................................................................................................................................
4-14 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Tuning primitives

....................................................................................................................................................................................................................................

Name Description Parameters


ref_object_param_tuning Creates a tuning operation for an object object
on the parameter name with the parameter name
parameter value on the reference object
ref object friendly
identified by its friendly name.
name
parameter name type
ref_object_param_tuning Creates a tuning operation for the object object
on the parameter name with the parameter name
parameter value on the reference object
ref object external ID
identified by its external ID.
parameter name type
get_date_from_indicator Retrieves the most recent date at which object
the indicator satisfies the criteria for a indicator name
given object.
test operator
threshold value
get_date_from_parameter Retrieves the most recent date at which object
the parameter satisfies the criteria for a parameter name
given object.
test operator
threshold value
parameter name type
get_indicator_at_date Retrieves the indicator value at a given object
date for a given object. indicator name
date
get_parameter_at_date Retrieves the parameter value at a given object
date for a given object. parameter name
date
parameter name type
Hopping_frequency_ Creates a Hopping Frequency tuning GSM cell
tuning operation for a given cell. Frequency range
The indexes of the table correspond to Zone type
the FHS indexes.
Sector type
BSIC
FHS Frequencies table

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-15
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Tuning primitives

....................................................................................................................................................................................................................................

Name Description Parameters


NonHopping_frequency_ Creates a Non Hopping frequency tuning GSM cell
tuning operation for a given cell. Frequency range
The indexes of the table correspond to Zone type
the TRX indexes.
Sector type
BSIC
TRX Frequencies table
NHRH_frequency_tuning Creates an NH/RH frequency tuning GSM cell
operation for a given cell. Frequency range
The indexes of the table correspond to Zone type
the FHS indexes. The indexes of the
Sector type
table correspond to the TRX indexes.
BSIC
FHS Frequencies table
TRX Frequencies table

For each primitive that requests parameter queries, the parameter name type is provided
in order to choose if the given parameter name is the system name or the displayed name.
The possible values are:
SYST
DISP.
The default value is SYST.

Manipulate lists
Once the set library is imported, lists can be manipulated using the following primitives.

Primitive Meaning
difference(a, Returns the difference of two sets as a new set (i.e. all elements that are in set a
b) and not in the other (b)).
intersection(a, Returns the intersection of two sets as a new set (i.e. all elements that are in both
b) sets).
isin(element, Reports whether an element is a member of a set. (Called in response to the
l) expression 'element in shelf'.)
issubset(a, Reports if a is a subset of b (if every element of set a is also in set b.
b)
union(a, b) Returns the union of two sets as a new set (i.e. all elements that are in either sets).

For example:
list1 = Generic.FilterOnParameter(cells, "Class", "<>", "URBAN")
....................................................................................................................................................................................................................................
4-16 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Manipulate lists

....................................................................................................................................................................................................................................
list2 = Generic.FilterOnQosIndicator(cells, "Call_setup_success_rate",
">", "10")
list3 = set.intersection(list, list2)
The first list filters and gets cells with a class different to URBAN.
The second list gets cells with Call_setup_success_rate > 10.
The third list gets only the cells with a class different to URBAN and a Call_setup_
success_rate > 10.

Test syntax
Use the Test field to enter the test expressions for the node. The conditional logic in
Python is handled with the if statement:
if(expression):
pbfound("Report when a problem has been found")
else:
nopbfound("Report when no problem has been found")
There can be none or more elif parts, and the else part is optional. The keyword elif
is short for else if and is used to avoid excessive indentation.
The if statement can contain multiple conditions.
The operators between conditions can be:
and
or
if(condition1) or (condition2)
if(condition1 and condition2)
When a loop is declared on a link, the operator indicates the looping variable and the
iteration list. The iteration list always and only contains network objects.
Example:
Test if the SDCCH dropped due to handover problems represent more than 40% of all
SDCCH dropped.
Note: In the Diagnosis Editor, the 10% value is seen as 0.1 value. In the internal
Diagnosis node code, multiply the indicator with 100 in its formula.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-17
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Test syntax

....................................................................................................................................................................................................................................

The possible execution results are:


pbfound contains the messages associated with the error found in the nodes
nopbfound contains the associated messages when no error is found in the nodes
unknown contains the associated messages if there is not enough information (empty
list, null variables...) to give a status for the node.
It is not an obligation to have a pbfound or nopbfound in a node. In this case, the node
is considered as green.
Execution Results messages are provided as string lists in order to allow the user to
provide multiple messages for a node.
Example:
Test if WAC is active.

As seen in the examples, the output message can also contain variables that are processed
during execution.

The variables are indicated with the %s symbol inside the message content.
....................................................................................................................................................................................................................................
4-18 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Test syntax

....................................................................................................................................................................................................................................
After the message, the ways to indicate variables are:
% primitive_name
% (str(<variable_name>))
The primitive str() is used to convert a numeral to string.
If there is more than one variable declared inside the message content, after the
message content, the syntax is:
% (variable_1, variable_2,..., variabile_n).
Highlighting in View is applied for a Diagnosis Executed View (report view), with the
following rules:
Diagnosis result is unknown - orange

Diagnosis result is nopbfound - green

Diagnosis result is pbfound - red.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-19
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Test syntax

....................................................................................................................................................................................................................................

For more information about the diagnosis report, refer to the Network Performance
Optimizer User Guide document, to Diagnosis.

Debug traces
Traces are used to detect problems. The examples below show the trace syntax.
bsc = N_GSM.BSC(object) # Get the BSC of the cell
trace("The BSC is %s" % N.getObjectExternalId(bsc))
This prints the external ID of the BSC to which the cell selected in Analysis Desktop
belongs.
cells = N_GSM.Cells(bsc) # get all the cells of the bsc
trace("BSC cells: %s" % str(cells))
This prints the cells of the BSC selected in the Analysis Desktop.
View the output of the traces by selecting, from the Report View, the
Click here to view the trace hyperlink.
A new window called Diagnosis Execution Logs opens, displaying the problems during
execution.

....................................................................................................................................................................................................................................
4-20 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Edit node code Debug traces

....................................................................................................................................................................................................................................

Some traces can still appear in the window even if nothing is defined in the case of
execution exceptions.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 4-21
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Edit node code Debug traces

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
4-22 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
5 Example Scenarios
5

Overview
Purpose
This section presents some example scenarios.

Contents

V2_DR (GSM technology) scenario 5-1


V2_SDROP (GSM technology) scenario 5-9
WAC cluster configuration (WiMAX technology) scenario 5-13

V2_DR (GSM technology) scenario


The following figure shows the V2_DR scenario.

...................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-1
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios V2_DR (GSM technology) scenario

....................................................................................................................................................................................................................................
This scenario is a system scenario that verifies why the Directed Retry feature is not
working properly.
Scenario properties appear in the Property View.

The list of nodes appears in the Node Outline View, once the scenario appears.

Unsuccessful directed retry problem


FIRST NODE: The Unsuccessful Directed Retry problem checks if there are too many
failures during the outgoing Directed Retry.
Node code:
....................................................................................................................................................................................................................................
5-2 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios V2_DR (GSM technology) scenario

....................................................................................................................................................................................................................................

Bad settings of directed retry parameters


NODE: Bad settings of Directed Retry parameters checks if Directed Retry parameters
have a correct value.
Node code:

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-3
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios V2_DR (GSM technology) scenario

....................................................................................................................................................................................................................................

Congestion on potential target cell


NODE: Congestion on potential target cell checks if the Directed Retry procedure is
unsuccessful because of congestion on a potential target cell.
Node code:

....................................................................................................................................................................................................................................
5-4 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios V2_DR (GSM technology) scenario

....................................................................................................................................................................................................................................

Failures on potential target cell


NODE: Failures on potential target cell checks if there are Directed Retry failures on a
potential target cell.
Node code:

External directed retry problem


NODE: External Directed Retry problem checks if failures happen during the external
Directed Retry.
Node code:

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-5
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios V2_DR (GSM technology) scenario

....................................................................................................................................................................................................................................
Incorrect A_PBGT_DR problem
NODE: Incorrect A_PBGT_DR problem checks if the A_PBGT_DR parameter has a
correct value.
Node code:

Incorrect FREE_LEVEL_DR problem


NODE: Incorrect FREE_LEVEL_DR problem checks if the FREE_LEVEL_DR
parameter has a correct value.
Node code:

Incorrect L_RXLEV_NCELL_DR problem


NODE: Incorrect L_RXLEV_NCELL_DR problem checks if the
L_RXLEV_NCELL_DR parameter has a correct value.
Node code:

....................................................................................................................................................................................................................................
5-6 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios V2_DR (GSM technology) scenario

....................................................................................................................................................................................................................................

Internal directed retry problem


NODE: Internal Directed Retry problem checks if failures happen during an internal
Directed Retry.
Node code:

V4_TCONG.Bad settings of queuing parameters


EXTERNAL NODE: V4_TCONG.Bad settings of queuing parameters checks if
queuing parameters have a correct value.
Node code:

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-7
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios V2_DR (GSM technology) scenario

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
5-8 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios V2_SDROP (GSM technology) scenario

....................................................................................................................................................................................................................................

V2_SDROP (GSM technology) scenario


This scenario is a system scenario that verifies why SDCCH channels are dropped during
the signalization phase.

Scenario properties are displayed in the Property View.

The list of nodes appear in the Node Outline View, once the scenario appears.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-9
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios V2_SDROP (GSM technology) scenario

....................................................................................................................................................................................................................................

SDCCH drop
FIRST NODE: SDCCH drop tests if an excessive percentage of SDCCH channels was
dropped during the signalization phase.
Node code:

BSS internal problem


NODE: BSS internal problem checks if no LAPD, TCU and BTS/FU alarms are present.
Node code:

Link failure
NODE: Link failure checks LAPD alarms with the following cause:
/"link failures/", /"link re-establishment/".
Node code:

....................................................................................................................................................................................................................................
5-10 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios V2_SDROP (GSM technology) scenario

....................................................................................................................................................................................................................................

Processor restart
NODE: Processor restart checks TCU alarms or BTS / FU alarms with the following
cause:
/"restart/", /"reset/", /"Access failure/".
Node code:

SDCCH drop HO
NODE: SDCCH drop HO checks if the dropped SDCCH come from a handover
problem.
Example 1 of the node code:

Example 2 of the node code:

Note: The result of the both examples is the same in the case of percentage use.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-11
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios V2_SDROP (GSM technology) scenario

....................................................................................................................................................................................................................................
SDCCH drop radio
NODE: SDCCH drop radio checks if the dropped SDCCH come from a radio problem.
Node code:

SDCCH drop system


NODE: SDCCH drop system checks if dropped SDCCH come from a system problem.
Node code:

SDCCH HO not activated


NODE: SDCCH HO not activated checks if handovers on SDCCH are activated.
Node code:

Standalone SDCCH HO problem


NODE: Standalone SDCCH HO problem checks if there is no TCH call drop coming
from a handover problem.
Node code:

....................................................................................................................................................................................................................................
5-12 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios V2_SDROP (GSM technology) scenario

....................................................................................................................................................................................................................................
TCH HO problem
NODE: TCH HO problem checks if there is also a TCH call drop coming from a
handover problem.
Node code:

TCH radio problem


NODE: TCH radio problem checks if there is also a TCH call drop coming from a radio
problem.
Node code:

WAC cluster configuration (WiMAX technology) scenario


This scenario is a system scenario that verifies the WAC cluster configuration.

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-13
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios WAC cluster configuration (WiMAX technology) scenario

....................................................................................................................................................................................................................................

Scenario properties appear in the Property View.

The list of nodes are displayed in the Node Outline View, once the scenario appears.

....................................................................................................................................................................................................................................
5-14 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios WAC cluster configuration (WiMAX technology) scenario

....................................................................................................................................................................................................................................

1st node description


FIRST NODE: 1st tests if macAddressBase is unique under a RAN.
Node code:

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-15
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios WAC cluster configuration (WiMAX technology) scenario

....................................................................................................................................................................................................................................

2nd test node description


NODE: 2nd test checks if pagingGroupId is unique under a WAC cluster.
Node code:

....................................................................................................................................................................................................................................
5-16 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Example Scenarios WAC cluster configuration (WiMAX technology) scenario

....................................................................................................................................................................................................................................

3rd node description


NODE: 3rd checks if there is also a TCH call drop coming from a radio problem.
Node code:

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 5-17
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Example Scenarios WAC cluster configuration (WiMAX technology) scenario

....................................................................................................................................................................................................................................

....................................................................................................................................................................................................................................
5-18 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
6 Introduction to Python
6

Overview
Purpose
This section describes how to use Python.

Contents

Getting started with Python 6-1


Use Python 6-9

Getting started with Python


Start the interpreter and wait for the primary prompt.
In a terminal window, to the shell, type:
python
The interpreter prints a welcome message stating its version number and a copyright
notice before printing the first prompt: three greater-than signs ( >>>)
When commands are read from a tty, the interpreter is said to be in interactive mode. In
this mode, it prompts for the next command with the primary prompt, usually three
greater-than signs ( >>>); for continuation lines, it prompts with the secondary prompt, by
default three dots ( ...).
Input and output are distinguished by the presence or absence of prompts ( >>> and ...);
to repeat the example, you must type everything after the prompt, when the prompt
appears; lines that do not begin with a prompt are output from the interpreter. Note that a
secondary prompt on a line by itself in an example means you must type a blank line; this
is used to end a multi-line command.
Comments in Python start with the hash character, # and extend to the end of the physical
line. A comment may appear at the start of a line or following whitespace or code, but not
within a string literal. A hash character within a string literal is just a hash character.
Here is an example:
# this is the first comment

...................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 6-1
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
SPAM=1 # and this is the second comment
#... and this is the third!
STRING="# This is not a comment"

Numbers
The interpreter acts as a simple calculator; you can type an expression at it and it writes
the value.
Expression syntax is straightforward: the operators +, -, * and / work in a similar way to
most other languages (for example, Pascal or C); parentheses can be used for grouping.
For example:
>>> 2+2
4
>>> # This is a comment
...2+2
4
>>> 2+2 # and a comment on the same line as code
4
>>> (30-3*6)/3
4
>>> # Integer division returns the floor:
... 7/3
2
>>> 7/-3
-3
The equal sign ( = ) is used to assign a value to a variable. Afterwards, no result appears
before the next interactive prompt:
>>> a=3
>>> b=3*10
>>> a+b
33
A value can be assigned to several variables simultaneously:
>>> x=y=z=0 #x, y and z have the value 0
>>> x
0
>>> y
0
>>> z
0
There is full support for a floating point; operators with mixed type operands convert the
integer operand to the floating point:
>>> 3*1.5/2
2.25
Complex numbers are also supported; imaginary numbers are written with a suffix of j or
J. Complex numbers with a nonzero real component are written as ( real + imag j), or
can be created with the complex(real, imag) function.
>>> 1j*1J
(-1+0j)

....................................................................................................................................................................................................................................
6-2 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
>>> 1j*complex(0,1)
(-1+0j)
>>> (1+2j)/complex(1,1)
(1.5+0.5j)
Complex numbers are always represented as two floating point numbers, the real and
imaginary part. To extract these parts from a complex number z, use z.real and
z.imag.
>>> z=2.5+1.5j
>>> z.real
2.5
>>> z.imag
1.5
The conversion functions to floating point and integer (float(), int() and long() )
do not work for complex numbers. There is no one correct way to convert a complex
number to a real number. Use abs(z) to get its magnitude (as a float) or z.real to get
its real part.
>>> z=3+4j
>>> z.real
3
>>> float(z)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: can't convert complex to float; use abs(z)
>>> abs(z) #sqrt(z.real**2+z.imag**2)
5
In interactive mode, the last printed expression is assigned to the variable _. This means
that when you are using Python as a desk calculator, it is somewhat easier to continue
calculations. For example:
>>> a=25
>>> b=0.025
>>> a+b
25.025
>>> round(_,2)
25.02
This variable should be treated as read-only by the user. Do not explicitly assign a value
to it as you would create an independent local variable with the same name, masking the
built-in variable with its magic behavior.

Strings
Besides numbers, Python can also manipulate strings, which can be expressed in several
ways. They can be enclosed in single quotes or double quotes:
>>> 'today is Monday'
'today is Monday'
>>> 'doesn/'t'
"doesn't"
>>> "today is Monday"
"today is Monday"
>>> "/"today/" is Monday"
....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 6-3
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
'"today" is Monday'
>>> '"today/'" is Monday'
'"today/'" is Monday'
String literals can span multiple lines in several ways. Continuation lines can be used,
with a backslash as the last character on the line indicating that the next line is a logical
continuation of the line:
>>> hello = "This is a rather long string containing/n/
several lines of text just as you would do in C./n/
Note that whitespace at the beginning of the line is/ significant."
print hello
Note that new lines still need to be embedded in the string using /n; the new line
following the trailing backslash is discarded. This example would print the following:
This is a rather long string containing
several lines of text just as you would do in C.
Note that whitespace at the beginning of the line is/ significant.
If we make the string literal a raw string, however, the /n sequences are not converted to
newlines, but the backslash at the end of the line, and the newline character in the source,
are both included in the string as data. For example:
>>> hello = r"This is a rather long string containing/n/
several lines of text just as you would do in C./n/
print hello
Would print as:
This is a rather long string containing/n/
several lines of text just as you would do in C.
Strings can be surrounded in a pair of matching triple-quotes: " " " or ' ' '. End of
lines do not need to be escaped when using triple-quotes, but they are included in the
string.
>>> print """
Usage: thingy [OPTIONS]
- h Display this usage message
- H hostname Hostname to connect to
"""
Produces the following output:
Usage: thingy [OPTIONS]
- h Display this usage message
- H hostname Hostname to connect to
The interpreter prints the result of string operations in the same way as they are typed for
input: inside quotes, and with quotes and other exceptional characters escaped by
backslashes, to show the precise value. The string is enclosed in double quotes if the
string contains a single quote and no double quotes, otherwise it is enclosed in single
quotes.
Strings can be concatenated (stuck together) with the + operator, and repeated with *:
>>> word='Good' + 'Morning'
>>> word
'GoodMorning'
>>> '<' + word*3 + '>'

....................................................................................................................................................................................................................................
6-4 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
'<GoodMorningGoodMorningGoodMorning'
Two string literals next to each other are automatically concatenated; the first line above
may also have "word = 'Help' 'A'" written; this only works with two literals, not with
arbitrary string expressions:
>>> 'str' 'ing'
'string'
>>> 'str'.strip() + 'ing' # This is ok
'string'
>>> 'str'.strip() 'ing' # This is invalid
File "<stdin>", line 1, in ?
'str'.strip() 'ing'
SyntaxError: invalid syntax
Strings can be subscripted (indexed); as in C, the first character of a string has subscript
(index) 0. There is no separate character type; a character is simply a string of size one.
Like in Icon, substrings can be specified with the slice notation: two indices separated by
a colon. Slice indices have useful defaults; an omitted first index defaults to zero, an
omitted second index defaults to the size of the string being sliced.
>>> word[2] # the second character
'o'
>>> word[0:4] # characters from the first to the fourth
'Good'
>>> word[:4] # the first four characters
'Good'
>>> word[4:] # everything except the first four characters
'Morning'
Unlike a C string, Python strings cannot be changed. Assigning to an indexed position in
the string results in an error.
However, creating a new string with the combined content is easy and efficient:
>>> word[0:4] + 'Night'
'GoodMorning'
Here is a useful invariant of slice operations: s[:i] + s[i:] equals s.
>>> word[:5] + word[5:]
'GoodMorning'
Degenerate slice indices are handled as follows: when an index that is too large is
replaced by the string size, and an upper bound smaller than the lower bound returns an
empty string.
>>> word[1:50]
'oodMorning'
>>> word[15:]
''
>>> word[5:3]
''
Indices may be negative numbers, to start counting from the right. Note that -0 is really
the same as 0, so it does not count from the right! For example:
>>> word[-1] # the last character
'g'
>>> word[-2] # the last-but-one character
....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 6-5
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
'g'
>>> word[-2:] # the last two characters
'ng'
>>> word[:-3] # everything except the last three characters
'GoodMorn'
>>> word[-0] # the first character
'G'
Out-of-range negative slice indices are truncated, but do not try this for single-element
(non-slice) indices:
>>> word[-100:]
'GoodMorning'
>>> word[-15] # error
Traceback (most recent call last):
File "<stdin>", line 1, in ?
IndexError: string index out of range
For non-negative indices, the length of a slice is the difference of the indices, if both are
within bounds. For example, the length of word [1:3] is 2.
The built-in len() function returns the length of a string:
>>> len(word)
11

Unicode strings
The Unicode object can be used to store and manipulate Unicode data (see
http://www.unicode.org/) and integrates well with the existing string objects,
providing auto-conversions where necessary. Unicode has the advantage of providing one
ordinal for every character in every script used in modern and ancient texts.
Previously, there were only 256 possible ordinals for script characters. Texts were
typically bound to a code page which mapped the ordinals to script characters. This lead
to very much confusion especially with respect to internationalization (usually written as
i18n - i + 18 characters + n) of software. Unicode solves these problems by defining
one code page for all scripts.
Creating Unicode strings in Python is just as simple as creating normal strings:
>>> u'Good Morning !'
u'Good Morning !'
The small u in front of the quote indicates that a Unicode string is supposed to be created.
If you want to include special characters in the string, you can do so by using the Python
Unicode-Escape encoding, as described in the following example:
>>> u'Good/u0020Morning !'
u'Good Morning !'
The escape sequence /u0020 indicates to insert the Unicode character with the ordinal
value 0x0020 (the space character) at the given position.
Other characters are interpreted by using their respective ordinal values directly as
Unicode ordinals. If you have literal strings in the standard Latin-1 encoding that is used
in many Western countries, you find it convenient that the lower 256 characters of
Unicode are the same as the 256 characters of Latin-1.
....................................................................................................................................................................................................................................
6-6 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
For experts, there is also a raw mode just like the one for normal strings. You have to
prefix the opening quote with ur to have Python use the Raw-Unicode-Escape encoding.
It only applies the above /uXXXX conversion if there is an uneven number of backslashes
in front of the small u.
>>> ur'Good/u0020Morning !'
u'Good Morning !'
>>> ur'Good//u0020Morning !'
u'Good////u0020Morning !'
The raw mode is most useful when you have to enter lots of backslashes, as can be
necessary in regular expressions.
Apart from these standard encodings, Python provides a whole set of other ways of
creating Unicode strings on the basis of a known encoding.
The built-in unicode() function provides access to all registered Unicode codecs
(COders and DECoders). Some of the more well known encodings which these codecs
can convert are Latin-1, ASCII, UTF-8, and UTF-16. The latter two are variable-length
encodings that store each Unicode character in one or more bytes. The default encoding is
normally set to ASCII, which passes through characters in the range 0 to 127 and rejects
any other characters with an error. When a Unicode string is printed, written to a file, or
converted with str(), conversion takes place using this default encoding.
>>> u"abc"
u'abc'
>>> str(u"abc")
'abc'
>>> u"[auml ][ouml ][uuml ]"
u'/xe4/xf6/xfc'
>>> str(u"[auml ][ouml ][uuml ]")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-
2: ordinal not in range(128)
To convert a Unicode string into an 8-bit string using a specific encoding, Unicode
objects provide an encode() method that takes one argument, the name of the encoding.
Lowercase names for encodings are preferred.
>>> u"[auml ][ouml ][uuml ]".encode('utf-8')
'/xc3/xa4/xc3/xb6/xc3/xbc'
If you have data in a specific encoding and want to produce a corresponding Unicode
string from it, you can use the unicode() function with the encoding name as the
second argument.
>>> unicode('/xc3/xa4/xc3/xb6/xc3/xbc', 'utf-8')
u'/xe4/xf6/xfc'

Lists
Python knows a number of compound data types, used to group together other values.
The most versatile is the list, which can be written as a list of comma-separated values
(items) between square brackets. List items need not all have the same type.
>>> a = ['spam', 'eggs', 100, 1234]
....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 6-7
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
>>>> a
['spam', 'eggs', 100, 1234]
Like string indices, list indices start at 0, and lists can be sliced, concatenated and so on:
>>> a[0]
'spam'
>>> a[-2]
100
>>> a[1:-1]
['eggs', 100]
>>> a[:2] + ['bacon', 3*3]
['spam', 'eggs', bacon, 9]
>>> 2*a[:2] + ['End!']
['spam', 'eggs', 'spam', 'eggs', 'End!']
Unlike strings, which are immutable, it is possible to change individual elements of a list:
a[2] = a[2] + 23
a
['spam', 'eggs', 123, 1234]
Assignment to slices is also possible, and this can even change the size of the list or clear
it entirely:
>>> # replace some items:
... a[0:2] = [1,12]
>>> a
[1, 12, 123, 1234]
>>> # remove some items:
... a[0:2] = []
>>> a
[123, 1234]
>>> # insert some items:
... a[1:1] = ['yes', 'no']
>>> a
[123, 'yes', 'no', 1234]
>>> # insert (a copy of) itself at the beginning
... a[:0] = a
>>> a
[123, 'yes', 'no', 1234, 123,'yes', 'no', 1234 ]
>>> # clear the list
... a[:] = []
>>> a
[]
The built-in len() function also applies to lists:
>>> len(a)
8
It is possible to nest lists (create lists containing other lists). Note that in the following
example, y[2] and x:
>>> x = [2, 3, 4]
>>> y = [1, x]
>>> y[2]
[2, 3, 4]
y[2][0]

....................................................................................................................................................................................................................................
6-8 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Introduction to Python Getting started with Python

....................................................................................................................................................................................................................................
2

Use Python
About programming
The following example introduces several new features:
>>> # Fibonacci series:
... # the sum of two elements defines the next
... a, b = 0, 1
>>> while b < 10:
... print b
... a, b = b, a+b
...
1
1
2
3
5
8
The first line contains a multiple assignment: the variables a and b simultaneously get
the new values 0 and 1. On the last line this is used again, demonstrating that the
expressions on the right-hand side are all evaluated first before any of the assignments
take place. The right-hand side expressions are evaluated from the left to the right.
The while loop executes as long as the condition (here: b < 10 ) remains true. In
Python, like in C, any non-zero integer value is true; zero is false. The condition may also
be a string or list value, in fact any sequence; anything with a non-zero length is true,
empty sequences are false. The test used in the example is a simple comparison. The
standard comparison operators are written the same as in C: < (less than), > (greater than),
== (equal to), <= (less than or equal to), >= (greater than or equal to) and != (not equal
to).
The body of the loop is indented : indentation is Python's way of grouping statements.
Python does not provide an intelligent input line editing facility, so you have to type a tab
or space(s) for each indented line. In practice, you prepare more complicated input for
Python with a text editor; most text editors have an auto-indent facility. When a
compound statement is entered interactively, it must be followed by a blank line to
indicate completion (since the parser cannot guess when you have typed the last line).
Note that each line within a basic block must be indented by the same amount.
The print statement writes the value of the expression(s) it is given. It differs from just
writing the expression you want to write (as we did earlier in the calculator examples) in
the way it handles multiple expressions and strings. Strings are printed without quotes,
and a space is inserted between items, so you can format things correctly, like this:
>>> i = 5*5
>>> print ' the value of i is', i
the value of i is 25

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 6-9
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Introduction to Python Use Python

....................................................................................................................................................................................................................................
A trailing comma avoids the newline after the output:
>>> a, b = 0, 1
>>> while b < 100:
... print b,
... a, b = b, a+b
...
1 1 2 3 5 8 13 21 34 55 89
Note that the interpreter inserts a new line before it prints the next prompt, if the last line
was not completed.

if statement
Besides the while statement, Python knows the usual control flow statements known
from other languages, with some differences.
The most well-known statement type is the if statement. For example:
>>> if x < 0:
... x = 0
... print 'Negative changed to zero'
... elif x == 0:
... print 'Zero'
... elif x == 1
... print 'Single'
... else:
... print 'More'
...
There can be zero or more elif parts, and the else part is optional. The elif keyword
is short for else if, and is used to avoid excessive indentation. An
if... elif... elif ... sequence is a substitute for the switch or case statements
found in other languages.

for statement
The for statement in Python differs a bit from what you may be used to in C or Pascal.
Rather than always iterating over an arithmetic progression of numbers (like in Pascal), or
giving the user the ability to define both the iteration step and halting condition (as C),
Python's for statement iterates over the items of any sequence (a list or a string), in the
order that they appear in the sequence. For example:
>>> # Measure some strings:
... a = ['cat', 'rose', 'carrot']
>>> for x in a:
... print x, len(x)
...
cat 3
rose 4
carrot 6
It is not safe to modify the sequence being iterated over in the loop (this can only happen
for mutable sequence types, such as lists). If you need to modify the list you are iterating
over (for example, to duplicate selected items), you must iterate over a copy. The slice
notation makes this particularly convenient:
....................................................................................................................................................................................................................................
6-10 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011
Introduction to Python Use Python

....................................................................................................................................................................................................................................
>>> for x in a[:]: # makes a slice copy of the entire list
... if len(x)>5: a.insert(0,x)
...
>>> a
['carrot', 'cat', 'rose', 'carrot']

range() function
If you do need to iterate over a sequence of numbers, the built-in range() function is
useful. It generates lists containing arithmetic progressions:
>>> range(5)
[0, 1, 2, 3, 4]
The given end point is never part of the generated list; range(5) generates a list of 5
values, the legal indices for items of a sequence of length 5. It is possible to let the range
start at another number, or to specify a different increment (even negative; sometimes this
is called the step):
>>> range(2, 5)
[2, 3, 4]
>>> range(0, 5, 3)
[0, 3]
>>> range(-10, -100, -30)
[-10, -40, -70]
To iterate over the indices of a sequence, combine range() and len() as follows:
>>> a = ['September', October', 'November', 'December']
>>> for i in range(len(a)):
... print i, a[i]
...
0 September
1 October
2 November
3 December

break and continue statements and else clauses on loop


The break statement, as in C, breaks out of the smallest enclosing for or while loop.
The continue statement, also borrowed from C, continues with the next iteration of the
loop.
Loop statements may have an else clause; it is executed when the loop terminates
through exhaustion of the list (with for) or when the condition becomes false (with
while), but not when the loop is terminated by a break statement. This is exemplified by
the following loop, which searches for prime numbers:
>>> for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print n, 'equals', x, '*', n/x
... break
... else:
... # loop fell through without finding a factor
... print n, 'is a prime number'

....................................................................................................................................................................................................................................
Alcatel-Lucent 9959 NPO Alcatel-Lucent Proprietary 6-11
diagug M4 Use pursuant to applicable agreements
Issue 10 March 2011
Introduction to Python Use Python

....................................................................................................................................................................................................................................
...
2 is a prime number
3 is a prime number
4 equals 2 * 2
5 is a prime number
6 equals 2 * 3
7 is a prime number
8 equals 2 * 4
9 equals 3 * 3

pass statement
The pass statement does nothing. It can be used when a statement is required
syntactically but the program requires no action. For example:
>>> while True:
... pass # Busy-wait for keyboard interrupt
...

....................................................................................................................................................................................................................................
6-12 Alcatel-Lucent Proprietary Alcatel-Lucent 9959 NPO
Use pursuant to applicable agreements diagug M4
Issue 10 March 2011

Вам также может понравиться