You are on page 1of 46

Alcatel-Lucent

NPO Export Interface

NPO Document User Guide Release B10, M2, W3, UA5

3BK 21317 AAAA PCZZA Ed.07

BLANK PAGE BREAK

Status Short title

RELEASED NPO Document


All rights reserved. Passing on and copying of this document, use and communication of its contents not permitted without written authorization from Alcatel-Lucent.

2 / 46

3BK 21317 AAAA PCZZA Ed.07

Contents

Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Export Interfaces Using EQL Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Execute Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Execute Report Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Global Parameter Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.5 Execute Dynamic Excel Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Examples of Export Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7 Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7.1 Executed Data Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7.2 Executed Report Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7.3 Global Parameter Export Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Access EQL from a Programing Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Install Certificates on Java Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Java Client Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Initialize SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.3 Manage Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.4 Check Hostname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.5 Send Login/Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.6 SSL GET Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.7 Buffer xml Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Install/Uninstall SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Install SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Uninstall SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 View Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 QoS Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Parameter Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.3 Topology Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Examples of SQL Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Access the SQL Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.1 Access the SQL Interface Using SQL*Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.2 Access the SQL Interface Using iSQL*Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.3 Access the SQL Interface Using JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5.4 Access the SQL Interface Using Microsoft Query . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix A : Sample Code to Retrieve Certificate from a Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 5 7 8 9 11 12 13 15 16 16 19 23 25 26 26 27 27 27 27 28 28 28 28 29 30 30 30 30 31 31 33 35 38 39 39 39 40 41 43

Appendix B : Sample Code to Retrieve the xml Result of an EQL Query . . . . . . . . . . . . . . . . . . . . . . . . . . 45

3BK 21317 AAAA PCZZA Ed.07

3 / 46

Contents

4 / 46

3BK 21317 AAAA PCZZA Ed.07

Preface

Preface
Purpose Whats New
This guide describes how to access EQL from a programing language and export NPO public interfaces using EQL requests.

In Edition 07
Update the section Global Parameter Export Format (Section 1.7.3) by removing xml file format. Update the sections: Execute Data Query (Section 1.2) and Execute Dynamic Excel Page (Section 1.5) by adding the restrcition about the interpolation parameter.

In Edition 06
Update the Global Parameter Export (Section 1.4) by removing xml file format. A notice is added in Introduction (Section 1.1)

In Edition 05
The definition of <VersionNumber> is updated in Install SQL Interface (Section 3.2.1) A note on Oracle 10g JDBC Thin driver is added in Access the SQL Interface Using JDBC (Section 3.5.3) A note on Oracle 10g client for windows is added in Access the SQL Interface Using Microsoft Query (Section 3.5.4) A new chapter is added: Examples of SQL Commands (Section 3.4).

In Edition 04
Specify that <server_name> is the hostname or IP address of the server.

In Edition 03
New section is added: SQL Interface (Section 3).

In Edition 02

3BK 21317 AAAA PCZZA Ed.07

5 / 46

Preface

A notice is added in Execute Data Query (Section 1.2).

In Edition 01
Examples of Export Interfaces (Section 1.6) is updated. First proposal of document.

Audience

This document is intended for: Field service technicians Site administrators System support engineers (specialists) Occasional users (e.g. subcontractors).

Assumed Knowledge

You must have a basic understanding of the: Alcatel-Lucent operations and maintenance concepts for the BSS and RNS Java programming language.

6 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

1 Export Interfaces Using EQL Requests

3BK 21317 AAAA PCZZA Ed.07

7 / 46

1 Export Interfaces Using EQL Requests

1.1 Introduction
NPO offers a public web interface called EQL (Extensible Query Layer), used to retrieve data through external tools such as web-browsers (Mozilla, Internet Explorer) or web-enabled applications (Excel for instance). This can be done by executing queries or report requests. Both services are accessible over secured HTTP (HTTPS). The request is done via the URL using a: GET HTTPS request POST HTTPS request The objective is to be able to retrieve the result of these requests within any java application. The maximum URL length is usually around 2048 bytes (in Internet Explorer for instance), so for very large requests the POST method is preferred.

Note:

To be able to export interfaces, the exprole profile profile must be added to a user. The output report file used date with GMT as time zone and not the NPO server time zone.

8 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

1.2 Execute Data Query


Using the EQL interface, an external system can query QoS data (indicators) or Radio data (Telecom Parameters) and retrieve it in various formats (HTML, XML, CSV, SCSV, Excel (XLS & IQY)). There is a limitation when exporting interfaces in Excel to worksheets containing a maximum of 65,536 rows and 256 columns. To execute a data query the following URL is used: https://<server_name>:<server_port>/maat/report?otype=<type> &eids=<extid0,extid1...>&periodicity=<period>&&firstdate=<date> &seconddate=<date>&datalist=<data0,data1...>[&interpolation= <method>]&format=<output_format> Attribute Name <server_name> <server_port> Description

Server hostname or IP address running with Tomcat. TCP Port used by Tomcat Default value: 8443

<type> <extid>

Network object type List of network object external identifiers, under the following format: MCC / MNC / LAC / CI . {h|d|w|m} for Hourly, Daily, Weekly or Monthly. Any past date (not the current day), format: YYYY.MM.DD HH24.MI. Short name of a QoS indicator, or name of a radio telecom parameter prefixed by PARAM_. Interpolation method (DEFAULT, NONE or LINEAR). This is optional and applicable only for QoS indicators.

<period> <date>

<data>

<method>

<output_format> html | xml | csv | scsv | xls | pdf

The following restrictions apply to the EQL interface concerning QoS queries: Only Hourly, Daily, Weekly and Monthly data is available The interpolation parameter has no effect on Daily/Weekly/Monthly query because the interpolation is already done during the consolidation phases. The current day data is not available The number of objects is limited to 200 The number of indicators and radio telecom parameters is limited to 50

3BK 21317 AAAA PCZZA Ed.07

9 / 46

1 Export Interfaces Using EQL Requests

As the result of a QoS query must not exceed the size of 2MB (2097152 bytes), the MAAT server checks that the query fulfills the following rule: <nr objects> x <nr indicators> x <nr periods> x 8 < 2097152 Do not use the same indicator several times in the same query! Example of what not to do: https://gkar:8443/maat/report/?otype=CELL2G& eids=002/F02/2/10&periodicity==d&firstdate=2006.12.30%2018.00& seconddate=2006.12.31%2005.00&datalist=GTCAVAN,GTCAVAN&format=xml

10 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

1.3 Execute Report Request


Using the EQL interface, an external system can build its own report request and retrieve data in various formats (HTML, XML, CSV, SCSV, Excel or PDF). There is a limitation when exporting interfaces in Excel to worksheets containing a maximum of 65,536 rows and 256 columns. To execute a report request the following URL is used: https://<server_name>:<server_port>/maat/report? reporttemplatename=<rName>&otype=<type>&eids=<extid0, extid1...>&periodicity=<period>&&firstdate=<date> &seconddate=<date>&format=<output_format> [&scheduledate=<scheduledate>] Attribute Name <server_name> <server_port> Description Server hostname or IP address running with Tomcat. TCP Port used by Tomcat Default value: 8443 <rName> <type> <extid> Report template name Network object type List of network object external identifiers, under the following format: MCC / MNC / LAC / CI . {h|d|w|m} for Hourly, Daily, Weekly or Monthly. Any past date (not the current day), format: YYYY.MM.DD HH24.MI. html | xml | csv | scsv | xls | pdf Schedule date (YYYY.MM.DD) This is optional and applicable only for scheduled reports.

<period> <date>

<output_format> <scheduledate>

The following restrictions apply to EQL interface concerning report execution requests: Only Hourly, Daily, Weekly and Monthly data are available The current day data are not available The number of objects is limited to 200 Warning reports are not supported.

3BK 21317 AAAA PCZZA Ed.07

11 / 46

1 Export Interfaces Using EQL Requests

1.4 Global Parameter Export


An external system can query some or all the parameters for a given object type through the EQL interface and retrieve them in various formats (CSV, SCSV). This service allows the user to retrieve only the current values of the parameters. To execute a global parameter export, the following URL is used: https://<server_name>:<server_port>/maat/report/export? otype=<type>&datalist={<data0,data1...>|ALL&technology= <techno>}&format=<output_format> Attribute Name <server_name> <server_port> Description Server hostname or IP address running with Tomcat. TCP Port used by Tomcat Default value: 8443 <type> <data> Network object type name of a radio telecom parameter prefixed by PARAM_ | ALL . ALL is the attribute that requests all parameters. <techno> optional parameter used when ALL parameters are requested: UMTS | GSM | WiMAX csv | scsv

<output_format>

12 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

1.5 Execute Dynamic Excel Page


The execution of a data query is able to produce an IQY file. The IQY file contains an Excel Web Query that is itself a dynamic MUSE data query executed through the EQL. To execute a dynamic data query the following URL is used: https://<server_name>:<server_port>/maat/report/ dynamicquery?otype=<type>&eids=<extid0, extid1...> &periodicity=<period>&&firstdate=<date>&seconddate =<date> &datalist=<data0,data1...>[&interpolation=<method>] Attribute Name <server_name> <server_port> Description Server hostname or IP address running with Tomcat. TCP Port used by Tomcat Default value: 8443 <type> <extid> Network object type List of network object external identifiers, under the following format: MCC / MNC / LAC / CI . {h|d|w|m} for Hourly, Daily, Weekly or Monthly. A date expression relative to the current period, format: YYYY.MM.DD HH24.MI. See the table below. <data> Short or long name of a QoS indicator, or name of a radio telecom parameter prefixed by PARAM_. Interpolation method (DEFAULT, NONE or LINEAR). This is optional and applicable only for QoS indicators.

<period> <date>

<method>

The following table presents the Date Expressions for dynamic queries: Periodicity Valid Date Expression h H | H-x x is an integer value greater than or equal to 1 Examples H-1 H H-24 d D | Dx x is an integer value greater than or equal to 1 D-1 D D-30

3BK 21317 AAAA PCZZA Ed.07

13 / 46

1 Export Interfaces Using EQL Requests

Periodicity Valid Date Expression w Wx x is an integer value greater than or equal to 1 m Mx x is an integer value greater than or equal to 1

Examples W-1 W-52 M-1 M-12

The following restrictions apply to EQL interface concerning dynamic MUSE data query: Only Hourly, Daily, Weekly and Monthly data are available The interpolation parameter has no effect on Daily/Weekly/Monthly query because the interpolation is already done during the consolidation phases. The number of objects is limited to 200 The number of indicators and radio telecom parameters is limited to 50 As the result of a QoS query must not exceed the size of 2 Mega-Bytes (2097152 bytes); the MAAT server checks that the query fulfills the following rule: <nr objects> x <nr indicators> x <nr periods> x 8 < 2097152 Warning reports are not supported Depending on the chosen periodicity; the dates included in the request are expressions relative to the current hour, the current day, the current week, or the current month The output format is HTML.

14 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

1.6 Examples of Export Interfaces


The following examples show how to export interfaces: URL- multiple network object and single indicator https://10.203.201.156:8443/maat/report/?otype=CELL2G &eids=208/F01/34305/2810,208/F01/34306/32586,208/F01/34307/35678 &periodicity=d&firtstdate=2006.09.07 10.00 &seconddate=2006.09.09 15.00 &datalist=UHRLDDLSU_N&format=html URL- single network object and single indicator https://10.203.201.156:8443/maat/report/?otype=CELL2G &eids=208/F01/34305/2810&periodicity=d &firstdate=2006.09.07 10.00&seconddate=2006.09.09 15.00 &datalist=UHRLDDLFL_N&format=scsv URL- multiple network object and multiple indicator https://172.25.240.245:8443/maat/report/?otype=CELL3G &eids=305/F05/312/31251,305/F05/312/31252,305/F05/404/40401 &periodicity=d&firtstdate=2007.02.08.00.00 &datalist=UHRLDDLSU_N,UHRLDDLSU_R,UHRLDDLRQ_N, UHRLDDLFL_R,UHRLDDLFL_N,UHRLSDLSU_R,UHRLSDLSU_N, UHRLSDLRQ_N,UHRLSDLER_N, UHRLSDLFL_R&format=html URL - report with single network object and single report https://172.25.240.245:8443/maat/report/?reporttemplatename=11 &otype=CELL3G&eids=305/F05/312/31251&periodicity=d &firstdate=2007.02.07 10.00&seconddate=2007.02.09 15.00 &format=xls URL - Multiple Network objects and single report https://172.25.240.245:8443/maat/report/?reporttemplatename=11 &otype=CELL3G&eids=305/F05/312/31251,305/F05/312/31252, 305/F05/404/40401&periodicity=d&firstdate=2007.02.08 13.00 &format=csv URL - Global Parameter Export https://10.203.201.156:8443/maat/report/export?otype=CELL2G &datalist=ALL&technology=GSM&format=scsv URL - Dynamic Query https://10.203.201.156:8443/maat/report/dynamicquery? otype=CELL2G&eids=208/F01/34305/2810,208/F01/34306/32586, 208/F01/34307/35678&periodicity=d&firstdate=D-5& seconddate=D-1&datalist=UHRLDDLSU_N

3BK 21317 AAAA PCZZA Ed.07

15 / 46

1 Export Interfaces Using EQL Requests

1.7 Output Format


1.7.1 Executed Data Query
1.7.1.1 XML Format
The XML Schema (XSD) for the output result of a data query is as follows:

16 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

Item mt

Description Measurement types (QoS indicators or radio telecom parameters identifiers) Measurement results (per object results) Measurement values (per date results) Vectors data Matrixs data X axis for vector and matrix values Y axis for matrix values Holds vector and axis data Holds matrix and axis data Data (QoS indicators or radio telecom parameters actual values) Object external identifier. Each object OID must be reported only once per file

mr mv vector_data matrix_data axis_X axis_Y vector matrix r

oid

3BK 21317 AAAA PCZZA Ed.07

17 / 46

1 Export Interfaces Using EQL Requests

Find below is a generic example of the XML document generated for a data query:

1.7.1.2 IQY Format


The .IQY file for the dynamic data query contains three lines: WEB 1 <URL-QoS-Query> where <URL-QoS-Query> is: https://<server_name>:<server_port>/maat/report dynamicquery?otype=<type>&eids=<extid0, extid1...> &periodicity=<period>&&firstdate=<date>&seconddate =<date> &datalist=<data0,data1...>[&interpolation=<method>]

1.7.1.3 Other Formats


For other formats, the output layout is the same in case of QoS queries or executed reports.

18 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

1.7.2 Executed Report Request


The exported format for executed report requests may be: HTML, XML, CSV, SCSV, PDF or Excel (XLS) files. In HTML documents, data is presented using HTML tables so that they can be imported directly into Excel (Web queries into Excel).

1.7.2.1 XML Format


The XSD describing the XML format for the output result of an executed report request is as follows:

3BK 21317 AAAA PCZZA Ed.07

19 / 46

1 Export Interfaces Using EQL Requests

20 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

3BK 21317 AAAA PCZZA Ed.07

21 / 46

1 Export Interfaces Using EQL Requests

1.7.2.2 CSV/SCSV Format


The generic format of the CSV (SCSV) of executed report requests is as follows:

Note:

CSV documents use the character , as separator while the SCSV documents use ; . The values of type vector are exported as a string, with the character: | as column separator ! as axis separator. Example of a vector with 3 elements: 3.4|2.7|7.8![50[|[100[|[150[ The values of type matrix are exported as a string, with the character: | as column separator # as line separator ! as axis separator. Example of a 2x2 matrix: 1.2|3.4#5.6|6.7!]50]|]100]!]0]|]50].

1.7.2.3 Scheduled Reports


For the scheduled reports there is no immediate output but a confirmation page is expected. The result report must be stored with the name prefix given by the user and must be accessible with the following URL: https://<server_name>:<server_port>/maat/report/ scheduled_reports/<name><scheduledate>.<output_format> The complete listing of all the generated reports is accessible at the the following URL: https://<server_name>:<server_port>/maat/report/ scheduled_reports/

22 / 46

3BK 21317 AAAA PCZZA Ed.07

1 Export Interfaces Using EQL Requests

1.7.3 Global Parameter Export Format


The output layout is the same in case of QoS queries or executed reports (see CSV/SCSV Format (Section 1.7.2.2)).

3BK 21317 AAAA PCZZA Ed.07

23 / 46

1 Export Interfaces Using EQL Requests

24 / 46

3BK 21317 AAAA PCZZA Ed.07

2 Access EQL from a Programing Language

2 Access EQL from a Programing Language


This section describes how to access EQL from a Programing Language.

3BK 21317 AAAA PCZZA Ed.07

25 / 46

2 Access EQL from a Programing Language

2.1 Introduction
JSSE (Java Secure Socket Extension) from SUN is an API that authenticates peers over an untrusted network and protects the integrity and privacy of data transmitted between them. To implement a secure socket connexion with Muse HTTPS web services, the java application client must meet the following criteria: Own and give trusts to the certificates of the web server Verify the hostname Authenticate with login password Open the connexion and send the query.

2.2 Install Certificates on Java Client


This task is performed offline. It allows taking the certificate stored on a web server. 1. Take the certificate stored on a web server. An example of how to take the certificate from the server to a file, is presented in Sample Code to Retrieve Certificate from a Web Server (Section A) java code. This operation must be done only once. Further calls to the Web server use the downloaded certificate. 2. Copy the certificate to the jre/lib/security directory of the NPO Web Server. 3. Compile this file and run it giving the right parameters, host and port of the MUSE NPO HTTP access. The password is the password of the security access of the java JRE, by default it is changeit. The execution produces a file that must be put under the current jre/lib/security directory.

Note:

This initialization can be done at the first connexion, directly copying the certificates in the current JRE.

26 / 46

3BK 21317 AAAA PCZZA Ed.07

2 Access EQL from a Programing Language

2.3 Java Client Application


2.3.1 Introduction
To start java application to connect to the MUSE HTTPS, perform the following: 1. Initialize SSL (Section 2.3.2) 2. Manage Certificates (Section 2.3.3) 3. Check Hostname (Section 2.3.4) 4. Send Login/Password (Section 2.3.5) 5. SSL GET Command (Section 2.3.6) 6. Buffer xml Result (Section 2.3.7) See more information in Sample Code to Retrieve the xml Result of an EQL Query (Section B).

2.3.2 Initialize SSL


The SSL connexion must be initialized using the URL of the EQL request (Refer to Export Interfaces Using EQL Requests (Section 1)). For example, the follwoing EQL request is used: https://172.25.240.134:8443/maat/report/?otype=CELL2G &eids=110/F10/111/1&periodicity=h&firstdate=2006.12.30%2020.30 &secondate=2006.12.31%2003.15&datalist=GAAGCHCTT&format=xml The following commands are needed:
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); Properties properties = System.getProperties(); System.setProperty("java.protocol.handler.pkgs","javax.net.ssl"); System.setProperties(properties); // put the updated properties back in System try { URL page = new URL(fullURL); // Process the URL far enough to find the right handler SSLContext sslContext = SSLContext.getInstance("SSLV3"); HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());

2.3.3 Manage Certificates


The certificates trust manager is declared. It automatically uses the information from jre/lib/security directory.
TrustManager[] trustManagerArray = getAllTrustingTrustManager(); sslContext.init(null, trustManagerArray, new java.security.SecureRandom());

The implementations methods are:


public static TrustManager[] getAllTrustingTrustManager(){ return new TrustManager[]{ new X509TrustManager(){ public boolean checkClientTrusted(java.security.cert.X509Certificate[] chain){ return true; } public boolean isServerTrusted(java.security.cert.X509Certificate[] chain){ return true; } public boolean isClientTrusted(java.security.cert.X509Certificate[] chain){ return true; }

3BK 21317 AAAA PCZZA Ed.07

27 / 46

2 Access EQL from a Programing Language

public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {} public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {} }

2.3.4 Check Hostname


A hostname verifier must be implemented. The following example always returns true, but in a real secured connexion, the hostname should be verified here.
HostnameVerifier hv = new HostnameVerifier() { public boolean verify(String urlHostName, SSLSession session) { System.out.println("Warning: URL Host: "+urlHostName+" vs. "+session.getPeerHost()) return true; } }; HttpsURLConnection.setDefaultHostnameVerifier(hv);

2.3.5 Send Login/Password


The login password of the MUSE HTTPS connexion must be given to the SSL connexion:
String authString = "osmadmin:alcatel"; String auth = "Basic " + new sun.misc.BASE64Encoder().encode(authString.getBytes()); connect.setRequestProperty("Authorization", auth);

2.3.6 SSL GET Command


The URL can be sent to the MUSE NPO WEB server HTTPS connexion:
connect.setRequestMethod("GET"); connect.setRequestProperty("Content-type","text/xml"); connect.setDoOutput(true); connect.setDoInput(true); connect.connect();

2.3.7 Buffer xml Result


The XML result is stored in a string buffer:
BufferedReader br = new BufferedReader(new InputStreamReader(connect.getInputStream())); String buffer = ""; while (buffer != null) { try { System.out.println(buffer); buffer = br.readLine(); } catch (IOException ioe) { ioe.printStackTrace(); break; }

28 / 46

3BK 21317 AAAA PCZZA Ed.07

3 SQL Interface

3 SQL Interface
This section describes how to use the SQL Interface to access the MUSE Database.

3BK 21317 AAAA PCZZA Ed.07

29 / 46

3 SQL Interface

3.1 Introduction
This feature is only available starting with B10 MR2, M2.3, UA5.

This feature is only available with the purchased Application Specific Full Use (ASFU) Oracle license. The SQL Interface offers access to a limited part of the NPO database. To use this information in a Muse external software, you can export the NPO table data from the server. For this, a special user npo is automatically created, that is allowed to use a little amount of NPO server availability. Due to the potential big CPU load when exporting the whole database content, a load limitation is set in order to prevent performance degradation for other users. The SQL interface users can only use the remaining available CPU, after giving the needed CPU for the other MUSE users. For security reasons, the user has access to a set of SQL views that are referencing inner tables of NPO. A view is a virtual table based on the results of a SELECT statement. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database. This allows restricting the access to a predefined amount of tables and columns of these tables. A view is read-only, so the user of the SQL interface cannot modify the database. The SQL interface views give access to the following information: Metadata information of the NPO topology Topology objects and relations Parameter values of the topology objects QoS values of the topology objects. To be able to run SQL views, the SQL interface must be installed.

3.2 Install/Uninstall SQL Interface


3.2.1 Install SQL Interface
To install the SQL interface, perform the following steps as root: cd /alcatel/muse/MUSE_COMMON/SQLInterface/bin sh createNpoSQLInterface.sh <VersionNumber> where <VersionNumber> is 1. The version number is used to indicate in the name of each view what its version is. The Parameters, QoS, Topology Views and the npo user are created.

3.2.2 Uninstall SQL Interface


To uninstall the SQL interface, perform the following steps as root: cd /alcatel/muse/MUSE_COMMON/SQLInterface/bin sh deleteNpoSQLInterface.sh

30 / 46

3BK 21317 AAAA PCZZA Ed.07

3 SQL Interface

All packages, views, and the user created by the SQL interface are deleted.

3.3 View Types


3.3.1 QoS Views
3.3.1.1 QoS Views Definition
QoS Views correspond to the indicators stored in the database. There is one view per QoS group and per spatial level. There is also an index view recapitulating each KPI.

3.3.1.2 QoS Views Naming


Due to Oracle constraints, QoS view names cannot be longer than 32 bytes. The following scheme applies:
VQOS_GroupName_SpatialLevel_<VersionNumber>.

If the name is longer than 32 bytes, the VQOS_GroupName_SpatialLevel part is truncated to 29 bytes, allowing 2 bytes for the version number. The index view is called VQOS_INDICATORSNAME_<VersionNumber>.

3.3.1.3 QoS Views Description


The following table presents the VQOS_IndicatorGroup_SpatialLevel (Simple Object) QoS View: Field Name timeStamp Type Date Description Start time of the period on which the indicator is calculated. Temporary level on which the indicator is calculated. Can be RRAW, HRAW, NORMALIZED, DAY, WEEK or MONTH. External Id of the object. Value of an indicator.

granularityPeriod

VARCHAR2(10)

OEXID Indicator

VARCHAR2(128) NUMBER

The following table presents the VQOS_IndicatorGroup_SpatialLevel (Relation) QoS View: Field Name timeStamp Type Date Description Start time of the period on which the indicator is calculated. Temporary level on which the indicator is calculated. Can be RRAW, HRAW, NORMALIZED, DAY, WEEK or MONTH. External Id of the relation source.

granularityPeriod

VARCHAR2(10)

SourceID

VARCHAR2(128)

3BK 21317 AAAA PCZZA Ed.07

31 / 46

3 SQL Interface

Field Name TargetID Indicator

Type VARCHAR2(128) NUMBER

Description External Id of the relation target. Value of an indicator.

The following table presents the VQOS_INDICATORSNAME QoS View: Field Name Longname Reference_extension Type VARCHAR2(200) VARCHAR2(100) Description Long name of the indicator. Reference of the indicator, which serves as column in the table which contains this indicator values. Group of the Indicator. Spatial level on which daily data are available for the indicator. Spatial level on which weekly data are available for the indicator. Spatial level on which monthly data are available for the indicator.

Indicator_group Daily_Availability_Domain

VARCHAR2(30) VARCHAR2(1000)

Weekly_Availability_Domain

VARCHAR2(1000)

Monthly_Availability_Domain

VARCHAR2(1000)

32 / 46

3BK 21317 AAAA PCZZA Ed.07

3 SQL Interface

3.3.2 Parameter Views


3.3.2.1 Parameter Views Definition
Parameters are stored in many different tables. They include both operational and historic data. The SQL interface has to provide access for both of them. However, due to the difference between the two kinds of data, it is not possible to provide the same interface to both of them. There is one view showing all parameters history. For operational data, there is one view per spatial level. There is also one index view recapitulating each parameter.

3.3.2.2 Parameter Views Naming


Due to Oracle constraints, Parameter view names cannot be longer than 32 bytes. The parameter history view is called VPARAM_HISTORY_<VersionNumber>. The parameter operational data views are called VPARAM_TechnoName_ObjectType_<VersionNumber>. If this is longer than 32 bytes, the VPARAM_TechnoName_ObjectType is truncated to 29 bytes to allow a 2-byte version number. The index view is called VPARAM_PARAMNAME_<VersionNumber>.

3.3.2.3 Parameter Views Description


The following table presents the VParam_History Parameter View: Field Name OEXID Param_Name Change_Date Old_Param_Value New_Param_Value Type VARCHAR2 (128) VARCHAR2(50) Date VARCHAR2 (4000) VARCHAR2 (4000) Description External Id of the object. Name of the Parameter. Date of the parameter value change. Former value of the parameter. Value of the parameter after the change.

The following table presents the VPARAM_TechnoName_ObjectType Parameter View: Field Name OEXID First Parameter Type VARCHAR2 (128) VARCHAR2 (4000) Description External Id of the object. Value of the first parameter (the name of the field depends of the table). Number and name of the other fields depends of the TechnoName and of the ObjectType.

...

VARCHAR2 (4000) for all

3BK 21317 AAAA PCZZA Ed.07

33 / 46

3 SQL Interface

The following table presents the VPARAM_PARAMNAME Parameter View: Field Name PARAM_ID PARAM_NAME TECHNO OBJECT_TYPE Type VARCHAR2 (50) VARCHAR2 (50) VARCHAR2 (4) VARCHAR2(50) Description Id of the Parameter. Name of the Parameter. Name of the Techno. Type of the object the parameters refers.

34 / 46

3BK 21317 AAAA PCZZA Ed.07

3 SQL Interface

3.3.3 Topology Views


3.3.3.1 Topology Views Definition
Topology views show the current NPO topology tree model with all the nodes, objects, and relations, based on externalIDs. To browse the Topology with the views, the Generic NPO Topology model must be used. The Topology metadata views give the: Father type for any object type Relation per relationType List of the QOS/PARAM views per object type.

3.3.3.2 Topology Views Description


The following tables present the Generic NPO Topology Description. The following table presents the Object Types Metadata, Table VTOPO_OBJECTYPES: Field Name objectType fatherType Properties Primary Key Type VARCHAR(100) VARCHAR(100) Description System name of the Object type. System name of the father of the ObjectType.

The following table presents the Relation Types Metadata, Table VTOPO_RELATIONTYPES: Field Name NAME Type VARCHAR2(128 BYTE) VARCHAR2(128 BYTE) VARCHAR2(128 BYTE) NUMBER(1,0) Description System name of the Object type.

STYPE

ObjectType name of the source of the relation.

TTYPE

ObjectType name of the target of the relation.

IS_ADJACENCY

Tells if the relation is an adjacency between cells.

3BK 21317 AAAA PCZZA Ed.07

35 / 46

3 SQL Interface

Field Name MAIN_SOURCE_TYPE

Type VARCHAR2(128 BYTE)

Description Given the NPO topology , this gives the name of the object Type of the cell source of the relation (adjacency). Example: CELL2G <- relationA -> ECELL2 <- relationB -> ECELL2G <- relationA -> CELL2G MAIN_SOURCE_TYPE(relationB)=CELL2G

MAIN_TARGET_TYPE

VARCHAR2(128 BYTE)

Given the NPO topology, this gives the name of the object Type of the cell target of the relation (adjacency).

The following table presents the Topology Objects, Table VTOPO_OBJECT: Field Name objectExternalId objectType FatherExternalId UserLabel Properties Primary Key Type VARCHAR(100) VARCHAR(100) VARCHAR(100) VARCHAR(100) Description Id of the topology object. Object type of the current id. Id of the father of the object. Friendly name of the object.

The following table presents the Topology Relations, Table VTOPO_RELATIONS: Field Name objectExternalId objectType sourceExternalId targetExternalId UserLabel Properties Primary Key Type VARCHAR(100) VARCHAR(100) VARCHAR(100) VARCHAR(100) VARCHAR(100) Description Id of the relation link. Object type of the current relation id. Id of the source of the relation. Id of the target of the relation. Friendly name of the relation.

36 / 46

3BK 21317 AAAA PCZZA Ed.07

3 SQL Interface

The following table presents the Qos and Param Table Name per Object Type, Table VTOPO_QOSPARAMTABLESLIST: Field Name qosParamViews objectType Type VARCHAR(100) VARCHAR(100) Description Name of the table in Oracle. Object type related to the table.

3BK 21317 AAAA PCZZA Ed.07

37 / 46

3 SQL Interface

3.4 Examples of SQL Commands


Due to the nature of the SQL views and of the npo account, when you connect to the SQL interface, precede the name of the view with the schema name (MUSE). For example: The following command does not work: select * from VTOPO_RELATIONTYPES; But the following command must be used: select * from MUSE.VTOPO_RELATIONTYPES; Find below examples of SQL commands: To retrieve the cell list under the BTS with oexid RAJA/3/1: select * from MUSE.VTOPO_OBJECTS where FATHEREXTERNALID=RAJA/3/1 and OBJECTTYPE=CELL2G; 001/F01/3/41 001/F01/3/42 CELL2G CELL2G RAJA/3/1 RAJA/3/1 RAJA_300041:3_1:1 (3/41) RAJA_300042:3_1:2 (3/42)

To see the QOS value of indicator GTRPDUN from CELL2G QOS view VQOS_GPQOS_CELL2G_1 for the CELL2G with OEXID=001/F01/1/1 on the date 03/01/08: select OEXID,GTRPDUN, timestamp from MUSE.VQOS_GPQOS_CELL2G_1 where OEXID=001/F01/1/1and GRANULARITYPERIOD=DAY and timestamp=03/01/08 00:00:00; 001/F01/1/1 848 03/01/08 00:00:00

To retrieve the operational parameter value , use the VPARAM_PARAMNAME_1 to get the column name from the name of the parameter: select PARAM_ID from MUSE.VPARAM_PARAMNAME_1 where PARAM_NAME=EN_PBGT_FILTERING; PARAM_GSM_201

To retrieve the parameter value from the VPARAM_GSM_CELL2G_1 for the cell 001/F01/1/1: select OEXID,PARAM_GSM_201 from MUSE.VPARAM_GSM_CELL2G_1 where OEXID=001/F01/1/1; 001/F01/1/1 ENABLE

38 / 46

3BK 21317 AAAA PCZZA Ed.07

3 SQL Interface

3.5 Access the SQL Interface


Note:
The information presented below is introductive only. Please refer to the tools specific tutorials for more details.

3.5.1 Access the SQL Interface Using SQL*Plus


SQL*Plus is an Oracle command line utility which allows users to run SQL commands interactively or from a script. The complete documentation for the SQL*Plus interpreter can be found on the Oracle website. To use the SQL interface with SQL*Plus, connect to the SQL database typing the following command: sqlplus npo/npo@SNM

3.5.2 Access the SQL Interface Using iSQL*Plus


iSQL*Plus is a web-browser-based interface to SQL*Plus. iSQL*Plus is shipped with the Oracle10g Database Server, allowing a user to launch SQL queries without using a command-line tool. 1. Start iSQL*Plus: cd /opt/app/oracle/product/10.2.0/bin ./isqlplusctl start 2. Connect to the iSQL*Plus interface via your web browser. The address is: http://<hostname>:5560/isqlplus/ 3. In the "Login" window, type the following values: Username: npo Password: npo Connect Identifier: SNM. 4. Click on [ Login ]. 5. In the "Workspace" window, type the appropriate query, then click on [ Execute ]. The result is displayed in table format.

3BK 21317 AAAA PCZZA Ed.07

39 / 46

3 SQL Interface

3.5.3 Access the SQL Interface Using JDBC


JDBC is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database. Oracle 10g JDBC Thin driver must be installed to work with JDBC. Using the SQL interface with JDBC is fairly standard. Depending on the context (application using JDBC, or developer writing an application using JDBC access), the commands are different. In case of an SQLDeveloper: Double-click on [ Connection ], then complete the New/Select Database connection windows with the following values: Connection Name: your own choice Username: npo Password: npo Hostname: name of the station on which NPO is installed Port: 1521 SID: SNM. Click on [ Connect ].

40 / 46

3BK 21317 AAAA PCZZA Ed.07

3 SQL Interface

In case of a Developer, depending of the implementation of the database access classes, the query can vary. The connection creation command is of the following type: Connection con = DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521 :SNM", "npo", "npo");

3.5.4 Access the SQL Interface Using Microsoft Query


Microsoft Query is a program for bringing data from external sources into other Microsoft Office programs - in particular, Microsoft Excel. Oracle 10g client for windows must be installed to work with Microsoft Query. By using Query to retrieve data from your corporate databases and files, you dont have to retype the data you want to analyze in Excel. You can also update your Excel reports and summaries automatically from the original source database whenever the database is updated with new information. To use the SQL interface with Microsoft Query, perform the following actions: 1. Select from Excel: Data -> Import External Data -> New Database Query -> New Data Source. 2. In the "Choose Data Source" window, Database tab, select <New Data Source>, then click on [ OK ]. 3. In the "Create New Data Source" window: Type the name of the new data source Select Microsoft ODBC for Oracle driver for the database you want to access Click on [ Connect ]. 4. Type the following information: User name: npo Password: npo

3BK 21317 AAAA PCZZA Ed.07

41 / 46

3 SQL Interface

Server: name of the server /SNM (for example: Tealc/SNM). 5. Click on [ OK ]. Queries from Excel can now be executed.

42 / 46

3BK 21317 AAAA PCZZA Ed.07

Appendix A : Sample Code to Retrieve Certificate from a Web Server

Appendix A: Sample Code to Retrieve Certificate from a Web Server

3BK 21317 AAAA PCZZA Ed.07

43 / 46

Appendix A : Sample Code to Retrieve Certificate from a Web Server

44 / 46

3BK 21317 AAAA PCZZA Ed.07

Appendix B : Sample Code to Retrieve the xml Result of an EQL Query

Appendix B: Sample Code to Retrieve the xml Result of an EQL Query

3BK 21317 AAAA PCZZA Ed.07

45 / 46

Appendix B : Sample Code to Retrieve the xml Result of an EQL Query

46 / 46

3BK 21317 AAAA PCZZA Ed.07

You might also like