62
Netcool Configuration Manager Version 6 Release 3 SMI API Reference Guide R2E2

Netcool Configuration Manager Version 6 Release 3€¦ · About the SMI API XML configuration file ... Integration Guide, ... Information Processing Standard Java Secure Socket Extension

Embed Size (px)

Citation preview

Netcool Configuration ManagerVersion 6 Release 3

SMI API Reference GuideR2E2

���

Netcool Configuration ManagerVersion 6 Release 3

SMI API Reference GuideR2E2

���

NoteBefore using this information and the product it supports, read the information in “Notices” on page 37.

This edition applies to version 6, release 3 of IBM Tivoli Netcool Configuration Manager (product number 5725-F56)and to all subsequent releases and modifications until otherwise indicated in new editions.

© Copyright IBM Corporation 2011, 2014.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

Contents

About this publication . . . . . . . . vIntended audience . . . . . . . . . . . . vWhat this publication contains . . . . . . . . vWhat's new in this release . . . . . . . . . . vPublications . . . . . . . . . . . . . . xiAccessibility . . . . . . . . . . . . . . xvTivoli technical training . . . . . . . . . . xvSupport information . . . . . . . . . . . xvConventions used in this publication . . . . . . xv

Chapter 1. Introduction to the SMI API. . 1About the SMI API . . . . . . . . . . . . 1

RESTful Web services interface . . . . . . . 1Spring MVC framework . . . . . . . . . 2Service Management Component . . . . . . 2Java packages that the SMI API supplies . . . . 2SMI API XML configuration file . . . . . . . 5Example SMI application . . . . . . . . . 5

Chapter 2. Understanding the SMI APIXML configuration file. . . . . . . . . 7About the SMI API XML configuration file . . . . 7

The smi-client-app-context.xml configuration file . 7

Chapter 3. Understanding SMI API dataobjects. . . . . . . . . . . . . . . 11About SMI data objects . . . . . . . . . . 11

CommandSet object. . . . . . . . . . . 11Device object . . . . . . . . . . . . . 12NcmCommandSet object . . . . . . . . . 14Realm object . . . . . . . . . . . . . 15Service object . . . . . . . . . . . . . 16ServiceDefinition object . . . . . . . . . 17

Chapter 4. Specifying SMI HTTPrequests . . . . . . . . . . . . . . 19About SMI HTTP requests . . . . . . . . . 19Making SMI HTTP requests on realm resources . . 19

Using the /realm URL. . . . . . . . . . 19Using the /realm/{realm-id} URL . . . . . . 20Using the /realm/{realm-id}/device URL . . . 21

Making SMI HTTP requests on device resources . . 21Using the /device URL . . . . . . . . . 21

Using the /device/{device-id} URL . . . . . 22Making SMI HTTP requests on service definitionresources . . . . . . . . . . . . . . . 22

Using the /servicedefinition URL . . . . . . 22Using the /servicedefinition/{service-definition-id} URL . . . . . . . . . . . . . . 23Using the /servicedefinition/{service-definition-id}/version URL. . . . . . . . . . . . 24Using the /servicedefinition/{service-definition-id}/version/{version-id} URL . . . . . . . 25Using the /servicedefinition/{service-definition-id}/service URL . . . . . . . . . . . . 25Using the /servicedefinition/{service-definition-id}/service/{service-id} URL. . . . . . . . 26Using the /servicedefinition/{service-definition-id}/version/{version-id}/service URL . . . . 27Using the /servicedefinition/{service-definition-id}/version/{version-id}/service/{service-id}URL . . . . . . . . . . . . . . . . 27Using the /servicedefinition/{service-definition-id}/version/{version-id}/commandset URL. . . 28Using the /servicedefinition/{service-definition-id}/version/{version-id}/commandset/{commandset-id} URL . . . . . . . . . . 29

Making SMI HTTP requests on service resources . . 30Using the /service URL . . . . . . . . . 30Using the /service/{service-id} URL . . . . . 30

Making SMI HTTP requests on command setresources . . . . . . . . . . . . . . . 31

Using the /commandset URL . . . . . . . 31Using the /commandset/{commandset-id} URL 31

Chapter 5. Understanding SMI APImessage and HTTP status codes . . . 33About SMI message and HTTP status codes . . . 33Understanding HTTP status codes . . . . . . . 33Understanding SMI message codes . . . . . . 33

Notices . . . . . . . . . . . . . . 37Trademarks . . . . . . . . . . . . . . 39

Index . . . . . . . . . . . . . . . 41

© Copyright IBM Corp. 2011, 2014 iii

iv IBM Tivoli Netcool Configuration Manager: SMI API

About this publication

IBM Tivoli Netcool Configuration Manager provides network management andconfiguration capabilities. Netcool Configuration Manager - Base provides theconfiguration management capabilities for network devices, and NetcoolConfiguration Manager - Compliance provides extensive configuration policythresholding capabilities.

The IBM Tivoli Netcool Configuration Manager SMI API Guide describes the ServiceManagement Interface (SMI).

Intended audienceThis publication is intended for network engineers who need to use the SMI API.

What this publication containsThis publication contains the following sections:v Chapter 1, “Introduction to the SMI API,” on page 1

Provides an introduction to the SMI API.v Chapter 2, “Understanding the SMI API XML configuration file,” on page 7

Provides information about the XML configuration files that the SMI APIprovides.

v Chapter 3, “Understanding SMI API data objects,” on page 11Describes the data objects that the SMI API provides.

v Chapter 4, “Specifying SMI HTTP requests,” on page 19Describes how to specify SMI HTTP requests.

v Chapter 5, “Understanding SMI API message and HTTP status codes,” on page33Describes the SMI message and HTTP status codes.

What's new in this releaseIBM Tivoli Netcool Configuration Manager 6.3 provides greater alignment with theIBM Tivoli portfolio, specifically with Tivoli Netcool/OMNIbus and NetworkManager IP Edition. Netcool Configuration Manager 6.3 also provides the ability torun on a variety of operating systems and databases, including AIX and DB2.

Summary of new features

Netcool Configuration Manager 6.3.0 offers the following new categories offeatures:

New TIP-based functionalityAvailable only if Netcool Configuration Manager has been integrated withNetwork Manager and Tivoli Netcool/OMNIbus. This functionality isinstalled into the Network Manager instance of the Tivoli Integrated Portal.

Activity ViewerThe Activity Viewer presents information about configuration andcompliance events recorded against network devices in a sequential

© Copyright IBM Corp. 2011, 2014 v

timeline view. This data is extracted from historical and audit logs.You can launch the wizards, some reports, as well as some of thethick-client interfaces from the Activity Viewer.

You access the Activity Viewer from the context menus in NetworkManager IP Edition or Tivoli Netcool/OMNIbus.

TIP-based wizardsThe wizards allow you to perform many of the standard NetcoolConfiguration Manager configuration and compliance activities.

You access the wizards from the context menus in NetworkManager IP Edition or Tivoli Netcool/OMNIbus, and from theActivity Viewer.

Thick-client launch portalThe Netcool Configuration Manager thick-client UIs can belaunched from a new portal in TIP, which simplifies access toNetcool Configuration Manager from the integrated TIPenvironment.

You access the thick-client launch portal from the Tivoli IntegratedPortal navigation bar.

Context launchYou can access the Netcool Configuration Manager Activity Viewer,wizards, Tivoli Common Reporting reports, as well as some of thethick-client interfaces, in the context of selected devices or eventsfrom within appropriate Network Manager and TivoliNetcool/OMNIbus interfaces.

For more information, see Using the TIP portletsthe IBM Tivoli NetcoolConfiguration Manager User Guide, which is available as part of the NetcoolConfiguration Manager PDF documentation set.

Single sign on integration with TIPThe single sign-on (SSO) capability in Tivoli® products means that you canlog on to one Tivoli application and then launch to other Tivoli Web-basedor Web-enabled applications without having to re-enter your usercredentials. Single sign-on can be achieved between applications deployedto Tivoli Integrated Portal servers on multiple machines.

For more information on Single sign on integration with TIP, seeConfiguring single sign-onthe IBM Tivoli Netcool Configuration ManagerIntegration Guide, which is available as part of the Netcool ConfigurationManager PDF documentation set.

Support for head end devicesHead end devices are another type of resource on which NetcoolConfiguration Manager operates. Specifically, Netcool ConfigurationManager provides a framework that makes it easier to administer and usehead end devices. A head end device is a central control device requiredby some networks (for example, Local Area Networks (LANs) orMetropolitan Area Networks (MANs)). Head end devices providecentralized functions such as re-modulation, re-timing, messageaccountability, contention control, diagnostic control, and access to agateway. A head end device can also refer to a central control devicewithin CATV systems that provides centralized functions such asre-modulation.

vi IBM Tivoli Netcool Configuration Manager: SMI API

For more information on head end devices, see About head end devicestheIBM Tivoli Netcool Configuration Manager User Guide, which is available aspart of the Netcool Configuration Manager PDF documentation set.

Support for DB2In addition to Oracle databases, Netcool Configuration Manager 6.3 nowalso supports DB2 versions 9.5 and 9.7.

For more prerequisite, installation and configuration information for DB2,see Software requirements and Preparing the DB2 databasethe IBM TivoliNetcool Configuration Manager Installation and Configuration Guide, which isavailable as part of the Netcool Configuration Manager PDFdocumentation set.

Support for AIXIn addition to Linux and Solaris platforms, Netcool Configuration Manager6.3 now also supports AIX platforms versions 6.1 and 7.1 (32 and 64 Bitversions).

For more prerequisite, installation and configuration information for AIX,see Software requirements and Preparing an AIX installationthe IBM TivoliNetcool Configuration Manager Installation and Configuration Guide, which isavailable as part of the Netcool Configuration Manager PDFdocumentation set.

Support for FIPS 140-2 complianceUsers can configure Netcool Configuration Manager to use FederalInformation Processing Standard Java Secure Socket Extension files.

For more information on support for FIPS 140-2 compliance, see FIPS 140-2requirements and Enabling and disabling FIPS 140-2 modethe IBM TivoliNetcool Configuration Manager Installation and Configuration Guide, which isavailable as part of the Netcool Configuration Manager PDFdocumentation set.

JReports replaced with Tivoli Common ReportingThe integration of JReports within Netcool Configuration Manager wasremoved. Now, Netcool Configuration Manager reports are provided byTivoli Common Reporting and are accessed via the Tivoli Integrated Portal.You can access them from the TCR/COGNOS portlet or via NetcoolConfiguration Manager Network View.

For more information on installing, configuring and viewing reports, seeSoftware requirements, Installing the Tivoli Integrated Portal components,and Viewing reportsthe IBM Tivoli Netcool Configuration Manager UserGuide, which is available as part of the Netcool Configuration ManagerPDF documentation set.

Streamlined integrationIntegration with Network Manager and Tivoli Netcool/OMNIbus has beensimplified by the application of a tarball, which is applied to NetworkManager TIP servers, and which automates some of the processes thatwere manual in 6.2.

For more information on integration, see Integrating with NetworkManager and Tivoli Netcool/OMNIbusthe IBM Tivoli Netcool ConfigurationManager Integration Guide, which is available as part of the NetcoolConfiguration ManagerPDF documentation set.

About this publication vii

Installation processThe Netcool Configuration Manager installation process has beenstreamlined for both integrated and non-integrated scenarios.

The base and compliance installers have been consolidated into oneinstaller.

Non-integrated scenariosIf Netcool Configuration Manager is not being integrated withNetwork Manager and Tivoli Netcool/OMNIbus, the installer alsoinstalls Tivoli Common Reporting and the new reports togetherwith Tivoli Integrated Portal.

Integrated scenariosIf Netcool Configuration Manager is being integrated withNetwork Manager and Tivoli Netcool/OMNIbus, the installer doesnot install Tivoli Common Reporting and the new reports.

Instead, when performing integration tasks, an additional TIPinstaller deploys the Tivoli Common Reporting reports togetherwith the Activity Viewer, the wizards and the thick-client launchportals into the existing Network Manager Tivoli Integrated Portaland Tivoli Common Reporting environment.

Additionally, an integration tarball is applied to Network Managerservers to facilitate a more streamlined integration.

For more information on installation, see Installingthe IBM TivoliNetcool Configuration Manager Installation and Configuration Guide,which is available as part of the Netcool ConfigurationManagerPDF documentation set.

For more information on integration, see Integrating with NetworkManager and Tivoli Netcool/OMNIbusthe IBM Tivoli NetcoolConfiguration Manager Integration Guide, which is available as partof the Netcool Configuration ManagerPDF documentation set.

Upgrading to Netcool Configuration Manager 6.3The procedures for upgrading from Netcool Configuration Managerversion 6.2.x to version 6.3 have changed to accommodate the newinstallation procedures and functionality.

For more information on upgrading to Netcool Configuration Manager 6.3,see Upgrading the productthe IBM Tivoli Netcool Configuration ManagerInstallation and Configuration Guide, which is available as part of the NetcoolConfiguration Manager PDF documentation set.

Important: To upgrade to Netcool Configuration Manager 6.3 fromversions 6.1 and older, you first migrate to version 6.2, before upgrading toversion 6.3.For more information on migrating to Netcool Configuration Manager 6.2from earlier versions, see Migratingthe IBM Tivoli Netcool ConfigurationManager Installation and Configuration Guide, which is available as part ofthe Netcool Configuration Manager PDF documentation set.

SMI APIThe SMI API provides a framework that makes it easier to add servicemanagement capabilities to Netcool Configuration Manager. Using thisframework, application developers write SMI client applications that makeURL requests to execute HTTP GET, POST, PUT, and DELETE operationson SMI resources (for example, command set, device, realm, and so forth).

viii IBM Tivoli Netcool Configuration Manager: SMI API

For more information on the SMI API, see Service Management InterfaceAPI referencethe IBM Tivoli Netcool Configuration Manager SMI API Guide,which is available as part of the Netcool Configuration Manager PDFdocumentation set.

Information Center changes

The documentation is now single sourced into PDF books and an Eclipse XHMTL“plugin” that reside on the Information Center. In keeping with the other IBMTivoli products, such as Tivoli Netcool/OMNIbus and Network Manager, theNetcool Configuration Manager Information Center is organized as follows:v Product overviewv Planningv Installingv Upgrading and migratingv Configuringv Integratingv Discovering network devicesv Configuring network devicesv Managing network compliancev Using the TIP portletsv Viewing reportsv Administeringv Uninstallingv Troubleshootingv Referencev Release notes (HTML version)

For more information see, http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/topic/com.ibm.netcool_configurationmgr.doc_6.3.0/ncm/wip/welcome/welcome.html

New guides for Netcool Configuration Manager 6.3

The following table identifies the new guides for Netcool Configuration Manager6.3:

New guide Description

IBM Tivoli Netcool Configuration ManagerInstallation and Configuration Guide

v Contains all of the installation andconfiguration information that wascontained in the seven Intelliden legacyinstallation and configuration guides.

v Updated to reflect the NetcoolConfiguration Manager 6.3 installationand configuration.

Note: Information that was previouslycontained in the Migration Guide and theUpgrade Guide will now be part of theInstallation and Configuration Guide.

About this publication ix

New guide Description

IBM Tivoli Netcool Configuration Manager UserGuide

v Contains all of the user information thatwas contained in the five Intelliden legacyuser guides.

v Updated to reflect the NetcoolConfiguration Manager 6.3 userinformation.

IBM Tivoli Netcool Configuration ManagerAdministration Guide

v Contains all of the administrationinformation that was contained in thethree Intelliden legacy administrationguides.

v Updated to reflect the NetcoolConfiguration Manager 6.3 administrationinformation.

IBM Tivoli Netcool Configuration ManagerReference Guide

v Includes reference information on portnumbering scheme.

v Will be adding reference topics insubsequent releases.

IBM Tivoli Netcool Configuration Manager SMIAPI Guide

v Describes the Service ManagementInterface (SMI) API.

v SMI provides the framework to make iteasier to develop SMI client and controllerapplications.

Updated guides for Netcool Configuration Manager 6.3

The following table identifies the updated guides for Netcool ConfigurationManager 6.3:

New guide Description

IBM Tivoli Netcool Configuration Manager APIGuide

v Updated to reflect changes in NetcoolConfiguration Manager 6.3.

IBM Tivoli Netcool Configuration ManagerIntegration Guide

v Describes how to integrate NetcoolConfiguration Manager with NetworkManager and Tivoli Netcool/OMNIbus.

v Extended the guide with morescenario-based information.

v Integration with Network Managermoving from Perl scripts to an API.

Quick Start Guide v Provides a two-page overview of theinstallation process for NetcoolConfiguration Manager, with links tomore detailed information.

Release Notes v Summarizes the new features,prerequisites, and critical installationissues for Netcool Configuration Manager.

v Links are also provided to the technotesknowledge base for known issues.

x IBM Tivoli Netcool Configuration Manager: SMI API

New Eclipse Help

The FrameMaker WebWorks help system has been replaced with the Eclipse Helpthat adheres to the IBM corporate standard and is single sourced from DITA XML.

Retiring part numbers

To reduce documentation process overhead, we are replacing part numbers(SCXX-XXXX-01) on the title page with a revision/edition scheme. Therevision/edition scheme:v Contains an R2E1 revision/edition number on the title page.v Uses R2 to indicate documentation for a live product.v Increments the E number each time an update to a guide is made. For example,

R2E2 indicates that the document was revised once after publication (the firstpublished version would have been R2E1).

v Makes it easier for support and customers to identify editions of the guides.v Can be used in APARs to identify the specific edition of the guide where an

issue has been found.v Can be used to corroborate new edition of the guide when posted to the

InfoCenter.

PublicationsThis section lists publications in the Netcool Configuration Manager PDFdocument set. The prerequisite publications in the IBM Tivoli Network Manager IPEdition and IBM Tivoli Netcool/OMNIbus library are also listed here. The sectionalso describes how to access Tivoli publications online and how to order Tivolipublications.

Netcool Configuration Manager PDF document set

The following documents are available in the Netcool Configuration Managerlibrary:v IBM Tivoli Netcool Configuration Manager Installation and Configuration Guide

Describes how to install IBM Tivoli Netcool Configuration Manager. It alsodescribes necessary and optional post-installation configuration tasks. Thispublication is for administrators who need to install and set up IBM TivoliNetcool Configuration Manager.

v IBM Tivoli Netcool Configuration Manager User Guide

Describes user tasks for IBM Tivoli Netcool Configuration Manager, such as howto access reports, use devices, and execute the different utilities to maintain andsupport Auto-Discovery. This publication is for users working with IBM TivoliNetcool Configuration Manager.

v IBM Tivoli Netcool Configuration Manager Administration Guide

Describes administration tasks for IBM Tivoli Netcool Configuration Manager,such as how to set up user accounts, create and manage the OS registry,administer database and policy exports and imports, and perform housekeepingand security tasks. This publication is for administrators who are responsible forthe maintenance and availability of IBM Tivoli Netcool Configuration Manager.

v IBM Tivoli Netcool Configuration Manager Reference Guide

Contains reference information about IBM Tivoli Netcool ConfigurationManager.

About this publication xi

v IBM Tivoli Netcool Configuration Manager API Guide

Provides information about how to use the Java API to programmatically accessNCM.

v IBM Tivoli Netcool Configuration Manager SMI API Guide

Describes the Service Management Interface API.v IBM Tivoli Netcool Configuration Manager Integration Guide

Describes how to integrate Netcool Configuration Manager with TivoliNetcool/OMNIbus and Network Manager.

v IBM Tivoli Netcool Configuration Manager Quick Start Guide

Gets you started with a typical installation for IBM Tivoli Netcool ConfigurationManager.

v IBM Tivoli Netcool Configuration Manager Release NotesProvide information on work carried out in respect of the current version ofNetcool Configuration Manager.

Prerequisite publications: IBM Tivoli Network Manager IP Edition

To use the information in this publication effectively, you must have someprerequisite knowledge, which you can obtain from the following NetworkManager publications:v IBM Tivoli Network Manager IP Edition Release Notes, GI11-9354-00

Gives important and late-breaking information about IBM Tivoli NetworkManager IP Edition. This publication is for deployers and administrators, andshould be read first.

v IBM Tivoli Network Manager Getting Started Guide, GI11-9353-00Describes Describes how to set up IBM Tivoli Network Manager IP Edition afteryou have installed the product. This guide describes how to start the product,make sure it is running correctly, and discover the network. Getting a goodnetwork discovery is central to using Network Manager IP Edition successfully.This guide describes how to configure and monitor a first discovery, verify theresults of the discovery, configure a production discovery, and how to keep thenetwork topology up to date. Once you have an up-to-date network topology,this guide describes how to make the network topology available to NetworkOperators, and how to monitor the network. The essential tasks are covered inthis short guide, with references to the more detailed, optional, or advancedtasks and reference material in the rest of the documentation set.

v IBM Tivoli Network Manager IP Edition Product Overview, GC27-2759-00Gives an overview of IBM Tivoli Network Manager IP Edition. It describes theproduct architecture, components and functionality. This publication is foranyone interested in IBM Tivoli Network Manager IP Edition.

v IBM Tivoli Network Manager IP Edition Installation and Configuration Guide,SC27-2760-00Describes how to install IBM Tivoli Network Manager IP Edition. It alsodescribes necessary and optional post-installation configuration tasks. Thispublication is for administrators who need to install and set up IBM TivoliNetwork Manager IP Edition.

v IBM Tivoli Network Manager IP Edition Administration Guide, SC27-2761-00Describes administration tasks for IBM Tivoli Network Manager IP Edition, suchas how to administer processes, query databases and start and stop the product.This publication is for administrators who are responsible for the maintenanceand availability of IBM Tivoli Network Manager IP Edition.

xii IBM Tivoli Netcool Configuration Manager: SMI API

v IBM Tivoli Network Manager IP Edition Discovery Guide, SC27-2762-00Describes how to use IBM Tivoli Network Manager IP Edition to discover yournetwork. This publication is for administrators who are responsible forconfiguring and running network discovery.

v IBM Tivoli Network Manager IP Edition Event Management Guide, SC27-2763-00Describes how to use IBM Tivoli Network Manager IP Edition to poll networkdevices, to configure the enrichment of events from network devices, and tomanage plug-ins to the Tivoli Netcool/OMNIbus Event Gateway, includingconfiguration of the RCA plug-in for root-cause analysis purposes. Thispublication is for administrators who are responsible for configuring andrunning network polling, event enrichment, root-cause analysis, and EventGateway plug-ins.

v IBM Tivoli Network Manager IP Edition Network Troubleshooting Guide,GC27-2765-00Describes how to use IBM Tivoli Network Manager IP Edition to troubleshootnetwork problems identified by the product. This publication is for networkoperators who are responsible for identifying or resolving network problems.

v IBM Tivoli Network Manager IP Edition Network Visualization Setup Guide,SC27-2764-00Describes how to configure the IBM Tivoli Network Manager IP Edition networkvisualization tools to give your network operators a customized workingenvironment. This publication is for product administrators or team leaders whoare responsible for facilitating the work of network operators.

v IBM Tivoli Network Manager IP Edition Management Database Reference,SC27-2767-00Describes the schemas of the component databases in IBM Tivoli NetworkManager IP Edition. This publication is for advanced users who need to querythe component databases directly.

v IBM Tivoli Network Manager IP Edition Topology Database Reference, SC27-2766-00Describes the schemas of the database used for storing topology data in IBMTivoli Network Manager IP Edition. This publication is for advanced users whoneed to query the topology database directly.

v IBM Tivoli Network Manager IP Edition Language Reference, SC27-2768-00Describes the system languages used by IBM Tivoli Network Manager IPEdition, such as the Stitcher language, and the Object Query Language. Thispublication is for advanced users who need to customize the operation of IBMTivoli Network Manager IP Edition.

v IBM Tivoli Network Manager IP Edition Perl API Guide, SC27-2769-00Describes the Perl modules that allow developers to write custom applicationsthat interact with the IBM Tivoli Network Manager IP Edition. Examples ofcustom applications that developers can write include Polling and DiscoveryAgents. This publication is for advanced Perl developers who need to write suchcustom applications.

v IBM Tivoli Monitoring for Tivoli Network Manager IP User's Guide, SC27-2770-00Provides information about installing and using IBM Tivoli Monitoring for IBMTivoli Network Manager IP Edition. This publication is for systemadministrators who install and use IBM Tivoli Monitoring for IBM TivoliNetwork Manager IP Edition to monitor and manage IBM Tivoli NetworkManager IP Edition resources.

About this publication xiii

Prerequisite publications: IBM Tivoli Netcool/OMNIbus

To use the information in this publication effectively, you must have someprerequisite knowledge, which you can obtain from the following TivoliNetcool/OMNIbus publications:v IBM Tivoli Netcool/OMNIbus Installation and Deployment Guide, SC23-9680

Includes installation and upgrade procedures for Tivoli Netcool/OMNIbus, anddescribes how to configure security and component communications. Thepublication also includes examples of Tivoli Netcool/OMNIbus architectures anddescribes how to implement them.

v IBM Tivoli Netcool/OMNIbus User's Guide, SC23-9683Provides an overview of the desktop tools and describes the operator tasksrelated to event management using these tools.

v IBM Tivoli Netcool/OMNIbus Administration Guide, SC23-9681Describes how to perform administrative tasks using the TivoliNetcool/OMNIbus Administrator GUI, command-line tools, and process control.The publication also contains descriptions and examples of ObjectServer SQLsyntax and automations.

v IBM Tivoli Netcool/OMNIbus Probe and Gateway Guide, SC23-9684Contains introductory and reference information about probes and gateways,including probe rules file syntax and gateway commands.

v IBM Tivoli Netcool/OMNIbus Web GUI Administration and User's Guide SC23-9682Describes how to perform administrative and event visualization tasks using theTivoli Netcool/OMNIbus Web GUI.

Accessing terminology online

The IBM Terminology website consolidates the terminology from IBM productlibraries in one convenient location. You can access the Terminology website at thefollowing Web address:

http://www.ibm.com/software/globalization/terminology

Accessing publications online

IBM posts publications for this and all other Tivoli products, as they becomeavailable and whenever they are updated, to the Tivoli Information Center websiteat:

http://publib.boulder.ibm.com/infocenter/tivihelp/v3r1/index.jsp

Note: If you print PDF documents on other than letter-sized paper, set the optionin the File > Print window that allows Adobe Reader to print letter-sized pages onyour local paper.

Ordering publications

You can order many Tivoli publications online at the following website:

http://www.elink.ibmlink.ibm.com/publications/servlet/pbi.wss

You can also order by telephone by calling one of these numbers:v In the United States: 800-879-2755

xiv IBM Tivoli Netcool Configuration Manager: SMI API

v In Canada: 800-426-4968

In other countries, contact your software account representative to order Tivolipublications. To locate the telephone number of your local representative, performthe following steps:1. Go to the following website:

http://www.elink.ibmlink.ibm.com/publications/servlet/pbi.wss2. Select your country from the list and click Go. The Welcome to the IBM

Publications Center page is displayed for your country.3. On the left side of the page, click About this site to see an information page

that includes the telephone number of your local representative.

AccessibilityAccessibility features help users with a physical disability, such as restrictedmobility or limited vision, to use software products successfully.

With this product, you can use assistive technologies to hear and navigate theinterface. You can also use the keyboard instead of the mouse to operate allfeatures of the graphical user interface.

Tivoli technical training

For Tivoli technical training information, refer to the following IBM TivoliEducation website:

http://www.ibm.com/software/tivoli/education

Support informationIf you have a problem with your IBM software, you want to resolve it quickly. IBMprovides the following ways for you to obtain the support you need:

OnlineGo to the IBM Software Support site at http://www.ibm.com/software/support/probsub.html and follow the instructions.

IBM Support AssistantThe IBM Support Assistant (ISA) is a free local software serviceabilityworkbench that helps you resolve questions and problems with IBMsoftware products. The ISA provides quick access to support-relatedinformation and serviceability tools for problem determination. To installthe ISA software, go to http://www.ibm.com/software/support/isa

Conventions used in this publicationThis publication uses several conventions for special terms and actions andoperating system-dependent commands and paths.

Typeface conventions

This publication uses the following typeface conventions:

Bold

About this publication xv

v Lowercase commands and mixed case commands that are otherwisedifficult to distinguish from surrounding text

v Interface controls (check boxes, push buttons, radio buttons, spinbuttons, fields, folders, icons, list boxes, items inside list boxes,multicolumn lists, containers, menu choices, menu names, tabs, propertysheets), labels (such as Tip: and Operating system considerations:)

v Keywords and parameters in text

Italic

v Citations (examples: titles of publications, diskettes, and CDs)v Words defined in text (example: a nonswitched line is called a

point-to-point line)v Emphasis of words and letters (words as words example: "Use the word

that to introduce a restrictive clause."; letters as letters example: "TheLUN address must start with the letter L.")

v New terms in text (except in a definition list): a view is a frame in aworkspace that contains data

v Variables and values you must provide: ... where myname represents....

Monospace

v Examples and code examplesv File names, programming keywords, and other elements that are difficult

to distinguish from surrounding textv Message text and prompts addressed to the userv Text that the user must typev Values for arguments or command options

Operating system-dependent variables and paths

This publication uses the UNIX convention for specifying environment variablesand for directory notation.

When using the Windows command line, replace $variable with %variable% forenvironment variables, and replace each forward slash (/) with a backslash (\) indirectory paths. For example, on UNIX systems, the $NCHOME environmentvariable specifies the directory where the Network Manager core components areinstalled. On Windows systems, the same environment variable is %NCHOME%.The names of environment variables are not always the same in the Windows andUNIX environments. For example, %TEMP% in Windows environments isequivalent to $TMPDIR in UNIX environments.

If you are using the bash shell on a Windows system, you can use the UNIXconventions.

xvi IBM Tivoli Netcool Configuration Manager: SMI API

Chapter 1. Introduction to the SMI API

Use this information to obtain an overview of the Service Management Interface(SMI) API.

About the SMI APIThe SMI API provides a framework that makes it easier to add servicemanagement capabilities to Netcool Configuration Manager. Using this framework,application developers write SMI client applications that make URL requests toexecute HTTP GET, POST, PUT, and DELETE operations on SMI resources (forexample, command set, device, realm, and so forth).

The SMI API makes use of the following components:v RESTful Web Services interfacev Spring MVC frameworkv Service Management Component (SMC)v SMI Java packagesv XML configuration file

RESTful Web services interfaceThe SMI API is implemented using the RESTful Web services interface.

The Representational State Transfer (REST) is an architecture that makes it easier todevelop web services. A RESTful web service or RESTful web API refers to asimple web service, for example the SMI API, that is implemented using the HTTPprotocol and that adheres to the principles of REST. A RESTful web API is acollection of resources that exhibits the following characteristics:v A base URI for the web servicev Internet media type of the supported data (For example, the SMI API supports

JSON and XML media types.)v Set of supported operations that SMI supports using HTTP methods (For

example, the SMI API supports the HTTP methods GET, POST, PUT, andDELETE.)

The SMI client application used in subsequent examples requires that you arefamiliar with the objects and methods related to credentials and passwords. Theseobjects and methods are encapsulated in the following packages:v org.apache.commons.httpclient.Credentialsv org.apache.commons.httpclient.UsernamePasswordCredentialsv org.apache.commons.httpclient.auth.AuthScope

It is assumed that application developers are familiar with the concepts andfacilities that the RESTful web services interface provides. See the articles andother publications that are readily available on the web for more information.

© Copyright IBM Corp. 2011, 2014 1

Spring MVC frameworkThe Spring MVC framework provides an environment for developing web-basedapplications. Applications implemented using the Spring MVC framework canmake use of Representational State Transfer (REST) to access and provideinformation.

The SMI client application used in subsequent examples require that you arefamiliar with the objects and methods that the Spring MVC framework provides.These objects and methods are encapsulated in the following packages:v org.springframework.context.ApplicationContextv org.springframework.context.support.FileSystemXmlApplicationContextv org.springframework.http.HttpEntityv org.springframework.http.HttpHeadersv org.springframework.http.HttpMethodv org.springframework.http.MediaTypev org.springframework.http.ResponseEntityv org.springframework.http.client.CommonsClientHttpRequestFactoryv org.springframework.web.client.RestTemplate

It is assumed that application developers are familiar with the concepts andfacilities that the Spring MVC framework provides. See the articles and otherpublications that are readily available on the web for more information.

Service Management ComponentThe Service Management Component (SMC) services all requests to the RESTfulweb services interface. The SMC creates, updates, and deletes service definitionsand services.

Java packages that the SMI API suppliesThe SMI API supplies the Java packages that contain the Java source files that anySMI client application requires.

Specifically, the SMI API provides the following Java packages that SMI clientapplications require:v com.ibm.tivoli.ncm.servicemanagement.messagev com.ibm.tivoli.ncm.servicemanagement.model

The com.ibm.tivoli.ncm.servicemanagement.message packageThe com.ibm.tivoli.ncm.servicemanagement.message package contains the Javasource files that declare objects that define the resources associated with the SMImessage manager service.

SMI client applications use this package and its associated objects and methods toperform message handling operations in a standard way.

The following table briefly describes the objects defined in thecom.ibm.tivoli.ncm.servicemanagement.message package.

2 IBM Tivoli Netcool Configuration Manager: SMI API

Java source file Summary description

SmiMessage.java Defines the SmiMessage object thatencapsulates the constructor and methodsused to operate on SMI messages.

SmiMessageCode.java Defines the SmiMessageCode enumerated typethat defines SMI message codes. Thefollowing list identifies some of these SMImessage codes:

v SMI_ERR_00001

v SMI_ERR_00002

SmiRequest.java Defines the SmiRequest enumerated typethat defines HTTP requests. These requestsare passed to the SmiMessage constructor(which is defined in the SmiMessage.javasource file). The following list provides someexamples of the HTTP requests defined inthe SmiRequest enumerated type:

v SERVICE_DEFINITION_POST

v SERVICE_DEFINITION_PUT

v SERVICE_DEFINITION_DELETE

See Chapter 5, “Understanding SMI API message and HTTP status codes,” on page33 for information about the SMI message manager service.

The com.ibm.tivoli.ncm.servicemanagement.model packageThe com.ibm.tivoli.ncm.servicemanagement.model package contains the Javasource files that declare objects that define the data associated with SMI APIresources.

These objects define data for the following SMI API resources:v Command setv Devicev NCM command setv Realmv Servicev Service definition

SMI client applications use this package and its associated objects and methods tomanipulate the previously listed data objects.

The following table briefly describes the objects defined in thecom.ibm.tivoli.ncm.servicemanagement.model package.

Java source file Summary description

CommandSet.java Defines the CommandSet object thatencapsulates the data that describes acommand set. This object also defines:

v A constructor that instantiates aCommandSet object.

v Get methods that operate on the data in aCommandSet object.

Chapter 1. Introduction to the SMI API 3

Java source file Summary description

CommandSetType.java Defines the CommandSetType enumerated typethat defines the command set type: eithernative or SmartModel.

Device.java Defines the Device object that encapsulatesthe data that describes a device. This objectalso defines:

v A constructor that instantiates a Deviceobject.

v Get methods that operate on the data in aDevice object.

NcmCommandSet.java Defines the NcmCommandSet object thatencapsulates the data that describes an NCMcommand set. This object also defines:

v A constructor that instantiates anNcmCommandSet object.

v Get methods that operate on the data inan NcmCommandSet object.

Realm.java Defines the Realm object that encapsulatesthe data that describes a realm. This objectalso defines:

v A constructor that instantiates a Realmobject.

v Get methods that operate on the data in aRealm object.

Service.java Defines the Service object that encapsulatesthe data that describes a service. This objectalso defines:

v A constructor that instantiates a Serviceobject.

v Get and set methods that operate on thedata in a Service object.

ServiceDefinition.java Defines the ServiceDefinition object thatencapsulates the data that describes a servicedefinition. This object also defines:

v A constructor that instantiates aServiceDefinition object.

v Get and set methods that operate on thedata in a ServiceDefinition object.

See Chapter 3, “Understanding SMI API data objects,” on page 11 for details on theSMI API data objects.

4 IBM Tivoli Netcool Configuration Manager: SMI API

SMI API XML configuration fileThe SMI API supplies an XML configuration file that controls different clientapplication properties.

Specifically, the SMI API supplies the following XML configuration file:v smi-client-app-context.xml

Example SMI applicationUsing the SMI API, you can implement SMI client applications.

The examples used in subsequent topics come from the SmiClient.java exampleapplication.

Chapter 1. Introduction to the SMI API 5

6 IBM Tivoli Netcool Configuration Manager: SMI API

Chapter 2. Understanding the SMI API XML configuration file

Use this information to obtain an understanding of the XML configuration file thatthe Service Management Interface (SMI) API supplies.

About the SMI API XML configuration fileThe SMI API provides an XML configuration file that defines elements expected bythe Spring MVC framework.

For example, one XML element that the Spring MVC framework expects is the listof Java source files that the SMI API provides. Specifically, the SMI API providesthe following XML configuration file:v smi-client-servlet.xml

The smi-client-app-context.xml configuration fileThe SMI API supplies an XML configuration file called smi-client-app-context.xml that contains the XML elements that provide information about theSMI API to the Spring MVC framework.

XML Syntax

The following shows the smi-client-app-context.xml configuration file that theSMI API supplies:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:context="http://www.springframework.org/schema/context"xmlns:p="http://www.springframework.org/schema/p"xmlns:util="http://www.springframework.org/schema/util"xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsdhttp://www.springframework.org/schema/utilhttp://www.springframework.org/schema/util/spring-util.xsd">

<context:component-scan base-package="com.ibm.tivoli.ncm.servicemanagement"use-default-filters="false">

<context:include-filter expression="org.springframework.stereotype.Controller"type="annotation" />

</context:component-scan><bean id="xstreamMarshaller"

class="org.springframework.oxm.xstream.XStreamMarshaller"p:autodetectAnnotations="true">

<property name="supportedClasses"><list>

<value>java.util.List</value> �1�<value>com.ibm.tivoli.ncm.servicemanagement.message.SmiMessage</value> �2�<value>com.ibm.tivoli.ncm.servicemanagement.model.CommandSet</value> �3�<value>com.ibm.tivoli.ncm.servicemanagement.model.Device</value> �4�<value>com.ibm.tivoli.ncm.servicemanagement.model.NcmCommandSet</value> �5�<value>com.ibm.tivoli.ncm.servicemanagement.model.Realm</value> �6�<value>com.ibm.tivoli.ncm.servicemanagement.model.Service</value> �7�<value>com.ibm.tivoli.ncm.servicemanagement.model.ServiceDefinition</value> �8�

</list></property>

</bean><bean id="marshallingHttpMessageConverter"

class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter"><property name="marshaller" ref="xstreamMarshaller"/><property name="unmarshaller" ref="xstreamMarshaller"/>

</bean><bean id="httpClientParams" class="org.apache.commons.httpclient.params.HttpClientParams">

<property name="authenticationPreemptive" value="true"/><property name="connectionManagerClass"

value="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager"/></bean><bean id="httpClient" class="org.apache.commons.httpclient.HttpClient">

<constructor-arg ref="httpClientParams"/>

© Copyright IBM Corp. 2011, 2014 7

</bean><bean id="httpClientFactory" class="org.springframework.http.client.CommonsClientHttpRequestFactory">

<constructor-arg ref="httpClient"/></bean><bean id="restTemplate" class="org.springframework.web.client.RestTemplate">

<constructor-arg ref="httpClientFactory"/><property name="messageConverters"><list><ref bean="marshallingHttpMessageConverter" />

<bean class="org.springframework.http.converter.StringHttpMessageConverter"/><bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" />

</list></property></bean></beans>

XML Elements

Note:

It is assumed that application developers are familiar with the XML elementscontained in this configuration file. See the articles and other publicationsassociated with the Spring MVC framework for details on these XML elements.

The following numbered list provides additional explanations of the numbereditems in the XML syntax section:1. <value>java.util.List</value> — Specifies the Java List interface. This

interface provides methods that operate on ordered collections.2. <value>com.ibm.tivoli.ncm.servicemanagement.message.SmiMessage</value>

— Specifies the SmiMessage.java source file contained in thecom.ibm.tivoli.ncm.servicemanagement.message package.

3. <value>com.ibm.tivoli.ncm.servicemanagement.model.CommandSet</value> —Specifies the CommandSet.java source file contained in thecom.ibm.tivoli.ncm.servicemanagement.model package. This source file definesthe CommandSet object.For details on the CommandSet object, see “CommandSet object” on page 11.

4. <value>com.ibm.tivoli.ncm.servicemanagement.model.Device</value> —Specifies the Device.java source file contained in thecom.ibm.tivoli.ncm.servicemanagement.model package. This source file definesthe Device object.For details on the Device object, see “Device object” on page 12.

5. <value>com.ibm.tivoli.ncm.servicemanagement.model.NcmCommandSet</value>— Specifies the NcmCommandSet.java source file contained in thecom.ibm.tivoli.ncm.servicemanagement.model package. This source file definesthe NcmCommandSet object.For details on the NcmCommandSet object, see “NcmCommandSet object” on page14.

6. <value>com.ibm.tivoli.ncm.servicemanagement.model.Realm</value> —Specifies the Realm.java source file contained in thecom.ibm.tivoli.ncm.servicemanagement.model package. This source file definesthe Realm object.For details on the Realm object, see “Realm object” on page 15.

7. <value>com.ibm.tivoli.ncm.servicemanagement.model.Service</value> —Specifies the Service.java source file contained in thecom.ibm.tivoli.ncm.servicemanagement.model package. This source file definesthe Service object.For details on the Service object, see “Service object” on page 16.

8 IBM Tivoli Netcool Configuration Manager: SMI API

8. <value>com.ibm.tivoli.ncm.servicemanagement.model.ServiceDefinition</value> — Specifies the ServiceDefinition.java source file contained in thecom.ibm.tivoli.ncm.servicemanagement.model package. This source file definesthe ServiceDefinition object.For details on the ServiceDefinition object, see “ServiceDefinition object” onpage 17“Service object” on page 16.

Chapter 2. Understanding the SMI API XML configuration file 9

10 IBM Tivoli Netcool Configuration Manager: SMI API

Chapter 3. Understanding SMI API data objects

Use this information to understand the data objects that the Service ManagementInterface (SMI) API provides.

About SMI data objectsThe SMI API provides a framework for marshalling the SMI data into an XML orJSP structure, depending on the URL base. The JSP pages provide an HTMLinterface for easy testing of SMI applications.

The SMI API provides the get and set methods for manipulating data defined bythe following SMI API objects:v CommandSet

v Device

v NcmCommandSet

v Realm

v Service

v ServiceDefinition

CommandSet objectThe CommandSet object encapsulates information about a command set.

Purpose

The CommandSet object defines the data associated with a command set. TheCommandSet object also provides the methods used to manipulate this data. Use theCommandSet constructor to instantiate a CommandSet object.

Members

keySpecifies the identifier of this command set as stored by the ServiceManagement Component (SMC). Use the getKey method to obtain thecommand set identifier.

id Specifies the identifier of this container. Use the getContainerId andsetContainerId methods to manipulate the container identifier.

versionSpecifies the version of this command set as stored by the SMC. Use thegetVersion method to obtain the command set version.

nameSpecifies the name of this command set. Use the getName method to obtain thecommand set name.

deviceVendorSpecifies the vendor of this device. Use the getDeviceVendor method to obtainthe device vendor.

deviceModelSpecifies the model of this device. Use the getDeviceModel method to obtainthe device model.

© Copyright IBM Corp. 2011, 2014 11

getDeviceOsSpecifies the operating system on this device. Use the getDeviceOs method toobtain the device operating system.

exactModelSpecifies the exact device model. This member allows a user to add an exactdevice model for model matching. Use the getExactModel method to obtain theexact device model.

regexModelSpecifies a regular expression. This member allows a user to add a regularexpression for model matching. Use the getRegexModel method to obtain theregular expression.

exactOsSpecifies the exact operating system. This member allows a user to add anexact operating system for model matching. Use the getExactOs method toobtain the exact operating system.

regexOsSpecifies a regular expression. This member allows a user to add a regularexpression for operating system matching. Use the getRegexOs method toobtain the regular expression.

CommandSetTypeSpecifies the type of the command set. This member can be set to one of theenumerated type values — SMARTMODEL or NATIVE — to specify the commandset type. Use the getType method to obtain the command set type.

documentSpecifies the document.

Device objectThe Device object encapsulates information about a device.

Purpose

The Device object defines the data associated with a device. The Device object alsoprovides the methods used to manipulate this data. Use the Device constructor toinstantiate a Device object.

The following members of the Device object are required for the List interface(java.util.List):v id

v name

Members

id Specifies the device identification as supplied by NCM. Use the getId methodto obtain the device identification.

nameSpecifies the name of the device. Use the getName method to obtain the nameof the device.

fqNameSpecifies the fqueue name.

12 IBM Tivoli Netcool Configuration Manager: SMI API

parentIdSpecifies the parent realm identification or null if the base realm. Use thegetParentId method to obtain the identification of the parent realm.

parentNameSpecifies the name of the parent realm. Use the getParentName method toobtain the parent realm name.

vendorSpecifies the manufacturer of the device. Use the getVendor method to obtainthe manufacturer of the device.

typeSpecifies the type (for example, router, switch, and so forth) of the device. Usethe getType method to obtain the type of the device.

modelSpecifies the model of the device. Use the getModel method to obtain themodel of the device.

os Specifies the operating system on the device. Use the getOs method to obtainthe operating system on the device.

configurationSpecifies the native configuration of the device. Use the getConfigurationmethod to obtain the native configuration of the device.

smartConfigurationSpecifies the SmartModel configuration. Use the getSmartConfigurationmethod to obtain the SmartModel configuration.

informationSpecifies the result of native commands issued on the device. These nativecommands are used to obtain system information. Use the getInformationmethod to obtain the result of native commands issued on the device.

Sample

The following example shows how the SmiClient.java application calls thegetFqName method:...import com.ibm.tivoli.ncm.servicemanagement.model.Device;...private static void printDevices(List<Device> devices) {

for (Device device : devices) {System.out.println(device.getFqName());

}}

.

.

.

Chapter 3. Understanding SMI API data objects 13

NcmCommandSet objectThe CommandSet object encapsulates information about a command set.

Purpose

The NcmCommandSet object defines the data associated with an NCM command set.The NcmCommandSet object also provides the methods used to manipulate this data.Use the NcmCommandSet constructor to instantiate an NcmCommandSet object.

Members

id Specifies the identifier of this NCM command set. Use the getId method toobtain the NCM command set identifier.

nameSpecifies the name of this NCM command set. Use the getName method toobtain the NCM command set name.

fqnameSpecifies the fqueue name.

parentIdSpecifies the parent realm identification or null if the base realm. Use thegetParentId method to obtain the identification of the parent realm.

parentNameSpecifies the name of the parent realm. Use the getParentName method toobtain the parent realm name.

deviceVendorSpecifies the vendor of this device. Use the getDeviceVendor method to obtainthe device vendor.

deviceTypeSpecifies the type (for example, router, switch, and so forth) of the device. Usethe getDeviceType method to obtain the type of the device.

deviceModelSpecifies the model of this device. Use the getDeviceModel method to obtainthe device model.

deviceOsSpecifies the operating system on this device. Use the getDeviceOs method toobtain the device operating system.

CommandSetTypeSpecifies the type of the command set. This member can be set to one of theenumerated type values — SMARTMODEL or NATIVE — to specify the commandset type. Use the getType method to obtain the command set type.

documentSpecifies the document.

Sample

The following example shows how the SmiClient.java application calls thegetFqName method:...import com.ibm.tivoli.ncm.servicemanagement.model.NcmCommandSet;

14 IBM Tivoli Netcool Configuration Manager: SMI API

.

.

.private static void printNcmCommandSets(List<NcmCommandSet> ncmCommandSets) {

for (NcmCommandSet ncmCs : ncmCommandSets) {System.out.println(ncmCs.getFqName());

}}

.

.

.

Realm objectThe Realm object encapsulates information about a realm.

Purpose

The Realm object defines the data associated with a realm. The Realm object alsoprovides the methods used to manipulate this data. Use the Realm constructor toinstantiate a Realm object.

The following members of the Realm object are required for the List interface(java.util.List):v id

v name

Members

fqNameSpecifies the fqueue name.

id Specifies the realm identification as supplied by NCM. Use the getId methodto obtain the realm identification.

nameSpecifies the name of the realm. Use the getName method to obtain the realmname.

parentIdSpecifies the parent realm identification or null if the base realm. Use thegetParentId method to obtain the identification of the parent realm.

parentNameSpecifies the name of the parent realm. Use the getParentName method toobtain the parent realm name.

Sample

The following example shows how the SmiClient.java application calls thegetFqName method:...import com.ibm.tivoli.ncm.servicemanagement.model.Realm;...private static void printRealms(List<Realm> realms) {

for (Realm realm : realms) {System.out.println(realm.getFqName());

}

Chapter 3. Understanding SMI API data objects 15

}...

Service objectThe Service object encapsulates information about a service.

Purpose

The Service object defines the data associated with a service. The Service objectalso provides the methods used to manipulate this data. Use the Serviceconstructor to instantiate a Service object.

The following members of the Service object are required for the List interface(java.util.List):v serviceId

v serviceDescription

Members

uniqueKeySpecifies the service key. Use the getUniqueKey and setUniqueKey methods toget or set the service key.

serviceIdSpecifies the service identification as generated or defined by the user. Use thegetServiceId and setServiceId methods to get or set the service identification.

versionSpecifies the version of the service. Use the getVersion and setVersionmethods to get or set the service version.

serviceDescriptionSpecifies the description of the service. Use the getServiceDescription andsetServiceDescription methods to get or set the service description.

serviceDefinitionIdSpecifies the service definition identifier from which the service was built. Usethe getServiceDefinitionId and setServiceDefinitionId methods to get or setthe service definition identifier.

serviceDefinitionVersionSpecifies the version of the service definition from which the service was built.Use the getServiceDefinitionId and setServiceDefinitionId methods to getor set the service definition version.

flowParametersSpecifies the input parameters for this service. Use the getFlowParameters andsetFlowParameters methods to get or set the input parameters for this service.

deviceParametersSpecifies the input device parameters for this service. Use thegetDeviceParameters and setDeviceParameters methods to get or set the inputdevice parameters for this service. Use the getDeviceParametersAsHashMapmethod to get the device parameters as a hash table.

16 IBM Tivoli Netcool Configuration Manager: SMI API

ServiceDefinition objectThe ServiceDefinition object encapsulates information about a service definition.

Purpose

The ServiceDefinition object defines the data associated with a service definition.The ServiceDefinition object also provides the methods used to manipulate thisdata. Use the ServiceDefinition constructor to instantiate a ServiceDefinitionobject.

The following members of the ServiceDefinition object are required for the Listinterface (java.util.List):v id

v version

Members

keySpecifies the service definition key. Use the getKey and setKey methods tomanipulate the service definition key.

id Specifies the service definition identification as generated or defined by theuser. Use the getId and setId methods to manipulate the service definitionidentification.

versionSpecifies the version of the service definition. Use the getVersion andsetVersion methods to manipulate the service definition version.

typeSpecifies an enumerated type that describes the type of the service definition.The following list identifies the valid types for the service definition:v Commandset

v POLICY

v WORKFLOW

Use the getType and setType methods to manipulate the service definitiontype.

isFinalSpecifies a boolean value that indicates whether the user wants to save theservice definition as draft or final. This member gets set to the value true toindicate the service definition is final and the value false to indicate the servicedefinition is a draft.

Use the isFinal method to return and the setFinal method to set a value forthe isFinal member.

monitorChangesSpecifies a boolean value that indicates whether any configuration changes willbe monitored. This member is available only when using SmartModelcommand sets. This member gets set to the value true to indicate the servicedefinition is final and the value false to indicate the service definition is adraft. Use the isFinal method to return the current value for the isFinalmember.

Use the isMonitorChanges method to return and the setMonitorChangesmethod to set a value for the monitorChanges member.

Chapter 3. Understanding SMI API data objects 17

Sample

In the following example, the SmiClient.java application: makes calls tofollowingexample shows a call to the ServiceDefinition constructor and calls to thesetFinal, setId, setMonitorChange, setType, and setVersion methods:v Calls the ServiceDefinition constructor to instantiate a ServiceDefinition

object.v Calls the setFinal, setId, setMonitorChange, setType, and setVersion methods

to specify values for the data associated with a ServiceDefinition object....private void putDefinition(RestTemplate restTemplate) {

ServiceDefinition newSd = new ServiceDefinition();newSd.setFinal(false);newSd.setId("Test3");newSd.setMonitorChanges(false);newSd.setType(ServiceDefinitionType.CommandSet);newSd.setVersion(1);

.

.

.

18 IBM Tivoli Netcool Configuration Manager: SMI API

Chapter 4. Specifying SMI HTTP requests

Use this information to learn about the valid Service Management Interface (SMI)HTTP requests that can be specified.

About SMI HTTP requestsThe SMI API uses a RESTful web service model. REST (Representational StateTransfer) uses the HTTP protocol because this protocol provides an extensivevocabulary for specifying a variety of operations on specific resources.

Specifically, the SMI API makes use of the following HTTP methods to operate onSMI resources:v GET — Lists the specified resource or collection of resourcesv POST — Creates the specified resourcev PUT — Updates or replaces the specified resourcev DELETE — Removes the specified resource

The SMI resources on which the previously listed HTTP operations can beperformed include the following:v Realmv Devicev Service definitionv Servicev Command set

Making SMI HTTP requests on realm resourcesThe SMI API provides the methods used to make HTTP requests on realmresources.

Using the /realm URLThe /realm URL instructs the HTTP GET method to perform a list operation on therealm resource.

URL syntax/realm

Arguments

None.

Description

The /realm URL instructs the HTTP GET method to return a list of all the realmsin NCM.

© Copyright IBM Corp. 2011, 2014 19

Notes

The HTTP POST, PUT, and DELETE methods are not supported on realmresources. Realm resource manipulation must be done in NCM.

The specified URL is relative to the root path.

Sample

The following example show how the SmiClient.java application uses the /realmURL and the HTTP GET method to return a list of all the realms in NCM:...@SuppressWarnings({ "rawtypes", "unchecked" })

private List<Realm> getRealms(RestTemplate restTemplate, MediaType mediaType) {HttpEntity<String> entity = prepareGet(mediaType);ResponseEntity<List> response = restTemplate.exchange(

this.createUrl(baseUrl, "/realm", mediaType), HttpMethod.GET,entity, List.class);

List<Realm> realms = response.getBody();return realms;

}.

.

.

Using the /realm/{realm-id} URLThe /realm/{realm-id} URL instructs the HTTP GET method to perform a listoperation on the specified realm resource.

URL syntax/realm/{realm-id}

Arguments

realm-idSpecifies the identifier of the realm on which the HTTP operation should beperformed.

Description

The /realm/{realm-id} URL instructs the HTTP GET method to return the realmspecified in realm-id.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on realmresources. Realm resource manipulation must be done in NCM.

The specified URL is relative to the root path.

20 IBM Tivoli Netcool Configuration Manager: SMI API

Using the /realm/{realm-id}/device URLThe /realm/{realm-id}/device URL instructs the HTTP GET method to perform alist operation on the specified realm and device resources.

URL syntax/realm/{realm-id}/device

Arguments

realm-idSpecifies the identifier of the realm on which the HTTP operation should beperformed.

Description

The /realm/{realm-id}/device URL instructs the HTTP GET method to return alist of all the devices in the realm specified in realm-id.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on realmresources. Realm resource manipulation must be done in NCM.

The specified URL is relative to the root path.

Making SMI HTTP requests on device resourcesThe SMI API provides the methods used to make HTTP requests on deviceresources.

Using the /device URLThe /device URL instructs the HTTP GET method to perform a list operation onthe device resource.

URL syntax/device

Arguments

None.

Description

The /device URL instructs the HTTP GET method to return a list of all the devicesin NCM.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on deviceresources. Device resource manipulation must be done in NCM.

The specified URL is relative to the root path.

Chapter 4. Specifying SMI HTTP requests 21

Sample

The following example show how the SmiClient.java application uses the /deviceURL and the HTTP GET method to return a list of all the devices in NCM:@SuppressWarnings({ "rawtypes", "unchecked" })

private List<Device> getDevices(RestTemplate restTemplate,MediaType mediaType) {

HttpEntity<String> entity = prepareGet(mediaType);ResponseEntity<List> response = restTemplate.exchange(

this.createUrl(baseUrl, "/device", mediaType), HttpMethod.GET,entity, List.class);

List<Device> devices = response.getBody();return devices;

}

Using the /device/{device-id} URLThe /device/{device-id} URL instructs the HTTP GET method to perform a listoperation on the specified device resource.

URL syntax/device/{device-id}

Arguments

device-idSpecifies the identifier of the device on which the HTTP operation should beperformed.

Description

The /device/{device-id} URL instructs the HTTP GET method to return thedevice specified in device-id.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on deviceresources. Device resource manipulation must be done in NCM.

The specified URL is relative to the root path.

Making SMI HTTP requests on service definition resourcesThe SMI API provides the methods used to make HTTP requests on servicedefinition resources.

Using the /servicedefinition URLThe /servicedefinition URL instructs the HTTP GET and DELETE methods toperform the appropriate operation on the service definition resource.

URL syntax/servicedefinition

Arguments

None.

22 IBM Tivoli Netcool Configuration Manager: SMI API

Description

The /servicedefinition URL instructs the HTTP GET and DELETE methods toperform the following operations on the service definition resource:v GET — Returns a list of all the saved service definitions in NCM.v DELETE — Deletes all saved service definitions in NCM.

Notes

The HTTP POST and PUT methods are not supported for the /servicedefinitionURL.

The specified URL is relative to the root path.

Sample

The following example show how the SmiClient.java application uses the/servicedefinition URL and the HTTP GET method to return a list of all therealms in NCM:@SuppressWarnings({ "rawtypes", "unchecked" })

private List<ServiceDefinition> getDefinitions(RestTemplate restTemplate,MediaType mediaType) {

HttpEntity<String> entity = prepareGet(mediaType);ResponseEntity<List> response = restTemplate.exchange(

this.createUrl(baseUrl, "/servicedefinition", mediaType),HttpMethod.GET, entity, List.class);

List<ServiceDefinition> defs = response.getBody();return defs;

}

Using the /servicedefinition/{service-definition-id} URLThe /servicedefinition/{service-definition-id} URL instructs the HTTP GET,POST, PUT, and DELETE methods to perform the appropriate operation on theservice definition resource.

URL syntax/servicedefinition/{service-definition-id}

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

Description

The /servicedefinition/{service-definition-id} URL instructs the HTTP GET,POST, PUT, and DELETE methods to perform the following operations on theservice definition resource:v GET — Returns the most current version of the service definition specified in

service-definition-id.v POST — Creates the service definition with the specified service-definition-id.v PUT — Updates the service definition specified in service-definition-id. If the

service definition is finalized, then PUT increments the version. Otherwise, PUTis supplied with a temporary version of the service definition until it is finalized.

Chapter 4. Specifying SMI HTTP requests 23

v DELETE — Deletes the service definition specified in service-definition-id.

Notes

The specified URL is relative to the root path.

Sample

The following example show how the SmiClient.java application uses the/servicedefinition/{service-definition-id} URL and the HTTP GET method toreturn the most current version of the service definition specified inservice-definition-id. In this example, the service-definition-id is Test3.private SmiMessage postDefinition(RestTemplate restTemplate) {

ServiceDefinition newSd = new ServiceDefinition();newSd.setFinal(false);newSd.setId("Test3");newSd.setMonitorChanges(false);newSd.setType(ServiceDefinitionType.CommandSet);newSd.setVersion(1);HttpEntity<ServiceDefinition> entity = new HttpEntity<ServiceDefinition>(

newSd);

ResponseEntity<SmiMessage> response = restTemplate.postForEntity(baseUrl + "/servicedefinition/Test3", entity, SmiMessage.class);

SmiMessage message = response.getBody();return message;

}

Using the /servicedefinition/{service-definition-id}/version URLThe /servicedefinition/{service-definition-id}/version URL instructs theHTTP GET method to perform the appropriate operation on the service resource.

URL syntax/servicedefinition/{service-definition-id}/version

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

Description

The /servicedefinition/{service-definition-id}/version URL instructs theHTTP GET method to return all versions of the service definition that match theidentifier specified in service-definition-id.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on this URL.

The specified URL is relative to the root path.

24 IBM Tivoli Netcool Configuration Manager: SMI API

Using the /servicedefinition/{service-definition-id}/version/{version-id} URL

The /servicedefinition/{service-definition-id}/version URL instructs theHTTP GET method to perform the appropriate operation on the service resource.

URL syntax/servicedefinition/{service-definition-id}/version/{version-id}

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

version-idSpecifies the identifier of the version on which the HTTP operation should beperformed.

Description

The /servicedefinition/{service-definition-id}/version/{version-id} URLinstructs the HTTP GET method to return the version of the service definition thatmatches the identifiers specified in service-definition-id and version-id.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on this URL.

The specified URL is relative to the root path.

Using the /servicedefinition/{service-definition-id}/service URLThe /servicedefinition/{service-definition-id}/service URL instructs theHTTP GET and DELETE methods to perform the appropriate operation on theservice definition and service resources.

URL syntax/servicedefinition/{service-definition-id}/service

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

Description

The /servicedefinition/{service-definition-id}/service URL instructs theHTTP GET and DELETE methods to perform the following operations on theservice definition and service resources:v GET — Returns a list of all the services created by the service definition that

matches the identifier specified in service-definition-id.v DELETE — Deletes all of the services created by the service definition that

matches the identifier specified in service-definition-id.

Chapter 4. Specifying SMI HTTP requests 25

Notes

The HTTP POST and PUT methods are not supported for the /servicedefinition/{service-definition-id}/service URL.

The specified URL is relative to the root path.

Using the /servicedefinition/{service-definition-id}/service/{service-id} URL

The /servicedefinition/{service-definition-id}/service/{service-id} URLinstructs the HTTP GET, POST, PUT, and DELETE methods to perform theappropriate operation on the service definition and service resources.

URL syntax/servicedefinition/{service-definition-id}/service/{service-id}

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

service-idSpecifies the identifier of the service on which the HTTP operation should beperformed.

Description

The /servicedefinition/{service-definition-id}/service/{service-id} URLinstructs the HTTP GET, POST, PUT, and DELETE methods to perform thefollowing operations on the service definition and service resources:v GET — Returns the service that matches the identifier specified in service-id. This

service was created by the service definition that matches the identifier specifiedin service-definition-id.

v POST — Creates the service using the supplied service-id and the most currentversion of the service definition that matches the identifier specified inservice-definition-id. The POST method creates this service when supplied with acorrect service definition and parameters.

v POST — Updates the service specified in service-id. The PUT method updatesthis service when supplied with a correct service definition and parameters.

v DELETE — Deletes the service that matches the identifier specified in service-id.

Notes

The specified URL is relative to the root path.

26 IBM Tivoli Netcool Configuration Manager: SMI API

Using the /servicedefinition/{service-definition-id}/version/{version-id}/service URL

The /servicedefinition/{service-definition-id}/version/{version-id}/serviceURL instructs the HTTP GET and DELETE methods to perform the appropriateoperation on the service definition and service resources.

URL syntax/servicedefinition/{service-definition-id}/version/{version-id}/service

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

service-idSpecifies the identifier of the service on which the HTTP operation should beperformed.

version-idSpecifies the identifier of the version on which the HTTP operation should beperformed.

Description

The /servicedefinition/{service-definition-id}/version/{version-id}/serviceURL instructs the HTTP GET and DELETE methods to perform the followingoperations on the service definition and service resources:v GET — Returns all services created by the service definition that matches the

identifiers specified in service-id and version-id.v DELETE — Deletes all services created by the service definition that matches the

identifiers specified in service-id and version-id.

Notes

The HTTP POST and PUT methods are not supported on this URL.

The specified URL is relative to the root path.

Using the /servicedefinition/{service-definition-id}/version/{version-id}/service/{service-id} URL

The /servicedefinition/{service-definition-id}/version/{version-id}/service/{service-id} URL instructs the HTTP GET, POST, PUT, and DELETEmethods to perform the appropriate operation on the service definition and serviceresources.

URL syntax/servicedefinition/{service-definition-id}/version/{version-id}/service/{service-id}

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

Chapter 4. Specifying SMI HTTP requests 27

version-idSpecifies the identifier of the version on which the HTTP operation should beperformed.

service-idSpecifies the identifier of the service on which the HTTP operation should beperformed.

Description

The /servicedefinition/{service-definition-id}/version/{version-id}/service/{service-id} URL instructs the HTTP GET, POST, PUT, and DELETEmethods to perform the following operations on the service definition and serviceresources:v GET — Returns the service that matches the identifer specified in service-id. This

service was created by the service definition that matches the identifiersspecified in service-definition-id and version-id.

v POST — Creates the service with the identifier specified in service-id. This serviceis created with the service definition that matches the identifiers specified inservice-definition-id and version-id.

v PUT — Updates the service with the identifier specified in service-id. This servicewas created by the service definition that matches the identifiers specified inservice-definition-id and version-id.

v DELETE — Deletes the service that matches the identifer specified in service-id.This service was created by the service definition that matches the identifiersspecified in service-definition-id and version-id.

Notes

The specified URL is relative to the root path.

Using the /servicedefinition/{service-definition-id}/version/{version-id}/commandset URL

The /servicedefinition/{service-definition-id}/version/{version-id}/commandset URL instructs the HTTP GET and DELETE methods to perform theappropriate operation on the service definition and command set resources.

URL syntax/servicedefinition/{service-definition-id}/version/{version-id}/commandset

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

version-idSpecifies the identifier of the version on which the HTTP operation should beperformed.

Description

The /servicedefinition/{service-definition-id}/version/{version-id}/commandset URL instructs the HTTP GET and DELETE methods to perform thefollowing operations on the service definition and command set resources:

28 IBM Tivoli Netcool Configuration Manager: SMI API

v GET — If the service definition is of the type command set, returns all thecommand sets associated with the service definition that matches the identifiersspecified in service-definition-id and version-id.

v DELETE — If the service definition is of the type command set, deletes all thecommand sets associated with the service definition that matches the identifiersspecified in service-definition-id and version-id. Otherwise, nothing happens.

Notes

The HTTP POST and PUT methods are not supported on this URL.

The specified URL is relative to the root path.

Using the /servicedefinition/{service-definition-id}/version/{version-id}/commandset/{commandset-id} URL

The /servicedefinition/{service-definition-id}/version/{version-id}/commandset/{commandset-id} URL instructs the HTTP GET, POST, PUT, andDELETE methods to perform the appropriate operation on the service definitionand command set resources.

URL syntax/servicedefinition/{service-definition-id}/version/{version-id}/commandset/{commandset-id}

Arguments

service-definition-idSpecifies the identifier of the service definition on which the HTTP operationshould be performed.

version-idSpecifies the identifier of the version on which the HTTP operation should beperformed.

commandset-idSpecifies the identifier of the command set on which the HTTP operationshould be performed.

Description

The /servicedefinition/{service-definition-id}/version/{version-id}/commandset/{commandset-id} URL instructs the HTTP GET, POST, and DELETEmethods to perform the following operations on the service definition andcommand set resources:v GET — If the service definition is of the type command set, returns the

command set specified in commandset-id. Otherwise, no command set is returned.The command set to be returned resides in the service definition specified inservice-definition-id and version-id.

v POST — If the service definition is of the type command set, adds the commandset specified in commandset-id to the service definition specified inservice-definition-id and version-id. Otherwise, no command set is added.

v PUT — If the service definition is of the type command set and the commandset already exists, updates the command set specified in commandset-id in theservice definition specified in service-definition-id and version-id. Otherwise, nocommand set is updated.

Chapter 4. Specifying SMI HTTP requests 29

v DELETE — If the service definition is of the type command set, deletes thecommand set specified in commandset-id. Otherwise, no command set is deleted.The command set to be deleted resides in the service definition specified inservice-definition-id and version-id.

Notes

The specified URL is relative to the root path.

Making SMI HTTP requests on service resourcesThe SMI API provides the methods used to make HTTP requests on serviceresources.

Using the /service URLThe /service URL instructs the HTTP GET, POST, and DELETE methods toperform the appropriate operation on the service resource.

URL syntax/service

Arguments

None.

Description

The /service URL instructs the HTTP GET, POST, and DELETE methods toperform the following operations on the service resource:v GET — Returns a list of the services in NCM.v POST — Creates the service with a generated service-id. The POST method

creates this service when supplied with a correct service definition andparameters.

v DELETE — Deletes all services in NCM.

Notes

The HTTP PUT method is not supported for the /service URL.

The specified URL is relative to the root path.

Using the /service/{service-id} URLThe /service/{service-id} URL instructs the HTTP GET, POST, PUT, andDELETE methods to perform the appropriate operation on the service resource.

URL syntax/service/{service-id}

Arguments

service-idSpecifies the identifier of the service on which the HTTP operation should beperformed.

30 IBM Tivoli Netcool Configuration Manager: SMI API

Description

The /service/{service-id} URL instructs the HTTP GET, POST, PUT, andDELETE methods to perform the following operations on the service resource:v GET — Returns the service specified in service-id.v POST — Creates the service using the supplied service-id. The POST method

creates this service when supplied with a correct service definition andparameters.

v PUT — Updates the service specified in service-id. The PUT method updates thisservice when supplied with a correct service definition and parameters.

v DELETE — Deletes the service specified in service-id.

Notes

The specified URL is relative to the root path.

Making SMI HTTP requests on command set resourcesThe SMI API provides the methods used to make HTTP requests on command setresources.

Using the /commandset URLThe /commandset URL instructs the HTTP GET method to perform a list operationon the command set resource.

URL syntax/commandset

Arguments

None.

Description

The /commandset URL instructs the HTTP GET method to return a list of all thecommand sets in NCM.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on command setresources. Command set resource manipulation must be done in NCM.

The specified URL is relative to the root path.

Using the /commandset/{commandset-id} URLThe /commandset/{commandset-id} URL instructs the HTTP GET method toperform a list operation on the specified command set resource.

URL syntax/commandset/{commandset-id}

Chapter 4. Specifying SMI HTTP requests 31

Arguments

commandset-idSpecifies the identifier of the command set on which the HTTP operationshould be performed.

Description

The /commandset/{commandset-id} URL instructs the HTTP GET method to returnthe command set specified in commandset-id.

Notes

The HTTP POST, PUT, and DELETE methods are not supported on command setresources. Command set resource manipulation must be done in NCM.

The specified URL is relative to the root path.

32 IBM Tivoli Netcool Configuration Manager: SMI API

Chapter 5. Understanding SMI API message and HTTP statuscodes

Use this information to learn about the SMI API message and HTTP status codes.

About SMI message and HTTP status codesThe SMI API provides message codes that SMI client and SMI controllerapplications can use.

Specifically, the SMI API provides the following categories of message-relatedcodes:v HTTP status codesv SMI message codes

Understanding HTTP status codesThe SMI API makes use of HTTP status codes.

Specifically, the SMI API uses the HTTP status codes in the following scenarios:v Incorrectly formed URLv Unauthorized accessv Not found resources

See http://en.wikipedia.org/wiki/List_ofHTTP_status_codes for a list of the HTTPstatus codes

Note: The embedded WebSphere server may make use of HTTP status codes forother associated uses that are beyond the scope or control of the SMI API.

Understanding SMI message codesThe SMI API provides a message manager service that provides a framework thatthe API support methods use to consistently manage messages associated with SMIrequests.

When an SMI client application calls one of the support methods to initiate an SMIrequest, the support method makes use of the message manager service to return amessage code that maps to an appropriate description. Consider the followingcode snippet from a support method:...ServiceDefinitionFunctions servDefFunc = new ServiceDefinitionFunctions();�1�

SmiMessage message = servDefFunc.createServiceDefinition(�2�perm.getUserkey(), serviceDefId, serviceDefinition);

.

.

.

1. Calls the ServiceDefinitionFunctions constructor to instantiate aServiceDefinitionFunctions object.

© Copyright IBM Corp. 2011, 2014 33

2. Calls the createServiceDefinition method to create a service definition. Thisline also declares an SmiMessage object to contain the SMI message status code.Upon success, the createServiceDefinition method creates the servicedefinition using the values specified in the passed parameters(perm.getUserkey(), serviceDefId, and serviceDefinition).When the createServiceDefinition method detects an issue, it returns one ofthe following SMI message codes:

v SMI_ERR_00002

v SMI_ERR_00005

v SMI_ERR_00006

All of the SMI API support methods use the previous strategy for returning theSMI message codes.

Currently, the SMI API message manager service defines the following categoriesof message codes:v Error message codes — Error message codes use this naming scheme:

SMI_ERR_message_number. For example: SMI_ERR_00002, SMI_ERR_00005, andSMI_ERR_00006.

v Informational message codes — Informational message codes use this namingscheme: SMI_MSG_message_number. For example: SMI_MSG_00001.

The following table identifies the SMI API message codes, their associated strings,and descriptions of their meaning.

SMI message code Message String Description

SMI_ERR_00001 A command set does notexist for the supplied ID

The support method returnsthis error string when thespecified command set IDmaps to a command set thatdoes not exist. To correct theissue, supply a command setID for an existing commandset.

SMI_ERR_00002 The requested operationcould not be completed dueto an internal error

The support method returnsthis error string when thespecified operation could notbe deleted due to an internalerror. Check the log files onthe Netcool ConfigurationManager server to determinethe cause of the internalerror.

SMI_ERR_00003 The command set alreadyexists. Please use PUTinstead

The support method returnsthis error string typicallywhen an POST (create) HTTPrequest is made on acommand set that alreadyexists. The message stringrecommends making a PUT(update or replace) HTTPrequest instead.

34 IBM Tivoli Netcool Configuration Manager: SMI API

SMI message code Message String Description

SMI_ERR_00004 The service definitiondoes not exist for thesupplied ID

The support method returnsthis error string when thespecified service definitionID maps to a servicedefinition that does not exist.To correct the issue, supply aservice definition ID for anexisting service definition.

SMI_ERR_00005 The service does not existfor the supplied servicedefinition ID

The support method returnsthis error string when thespecified service definitionID maps to a service thatdoes not exist. To correct theissue, supply a servicedefinition ID for an existingservice.

SMI_ERR_00006 The service definitionalready exists. Please usePUT instead

The support method returnsthis error string typicallywhen an POST (create) HTTPrequest is made on a servicedefinition that already exists.To correct the issue, make aPUT (update or replace)HTTP request on the servicedefinition resource.

SMI_ERR_00007 The service alreadyexists. Please use PUTinstead

The support method returnsthis error string typicallywhen an POST (create) HTTPrequest is made on a servicethat already exists. To correctthe issue, make a PUT(update or replace) HTTPrequest on the serviceresource.

SMI_ERR_00008 The SMI command set doesnot exist. Please use POSTinstead

The support method returnsthis error string typicallywhen a GET (list), PUT(update or replace), orDELETE (remove) HTTPrequest is made on an SMIcommand set that does notexist. To correct the issue,make a POST (create) HTTPrequest on the SMI commandset resource.

SMI_ERR_00009 The service definition isof an incorrect type forthe requested operation

The support method returnsthis error string when therequested service definitionoperation is made on thewrong type of servicedefinition. To correct theissue, make a servicedefinition request on thecorrect type of servicedefinition.

Chapter 5. Understanding SMI API message and HTTP status codes 35

SMI message code Message String Description

SMI_MSG_00001 The requested operationhas been completedsuccessfully

The support method returnsthis message string when therequested operationcompletes successfully. Forexample, the support methodreturns this string when anSMI command set has beensuccessfully added to theservice definition.

36 IBM Tivoli Netcool Configuration Manager: SMI API

Notices

This information was developed for products and services offered in the U.S.A.

IBM® may not offer the products, services, or features discussed in this documentin other countries. Consult your local IBM representative for information on theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not grant youany license to these patents. You can send license inquiries, in writing, to:

IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBMIntellectual Property Department in your country or send inquiries, in writing, to:

Intellectual Property LicensingLegal and Intellectual Property LawIBM Japan Ltd.1623-14, Shimotsuruma, Yamato-shiKanagawa 242-8502 Japan

The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law: INTERNATIONALBUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS"WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFNON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULARPURPOSE. Some states do not allow disclaimer of express or implied warranties incertain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvementsand/or changes in the product(s) and/or the program(s) described in thispublication at any time without notice.

Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of those Websites. The materials at those Web sites are not part of the materials for this IBMproduct and use of those Web sites is at your own risk.

© Copyright IBM Corp. 2011, 2014 37

IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

IBM Corporation958/NH04IBM Centre, St Leonards601 Pacific HwySt Leonards, NSW, 2069Australia

IBM Corporation896471/H128B76 Upper GroundLondon SE1 9PZUnited Kingdom

IBM CorporationJBF1/SOM1294 Route 100Somers, NY, 10589-0100United States of America

Such information may be available, subject to appropriate terms and conditions,including in some cases, payment of a fee.

The licensed program described in this document and all licensed materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement or any equivalent agreementbetween us.

Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environments mayvary significantly. Some measurements may have been made on development-levelsystems and there is no guarantee that these measurements will be the same ongenerally available systems. Furthermore, some measurements may have beenestimated through extrapolation. Actual results may vary. Users of this documentshould verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly available sources.IBM has not tested those products and cannot confirm the accuracy ofperformance, compatibility or any other claims related to non-IBM products.Questions on the capabilities of non-IBM products should be addressed to thesuppliers of those products.

All statements regarding IBM's future direction or intent are subject to change orwithdrawal without notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily businessoperations. To illustrate them as completely as possible, the examples include the

38 IBM Tivoli Netcool Configuration Manager: SMI API

names of individuals, companies, brands, and products. All of these names arefictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, whichillustrate programming techniques on various operating platforms. You may copy,modify, and distribute these sample programs in any form without payment toIBM, for the purposes of developing, using, marketing or distributing applicationprograms conforming to the application programming interface for the operatingplatform for which the sample programs are written. These examples have notbeen thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs. The sampleprograms are provided "AS IS", without warranty of any kind. IBM shall not beliable for any damages arising out of your use of the sample programs.

If you are viewing this information softcopy, the photographs and colorillustrations may not appear.

TrademarksIBM, the IBM logo, ibm.com®, Netcool®, Passport Advantage®, Tivoli®, the Tivolilogo and WebSphere are trademarks or registered trademarks of InternationalBusiness Machines Corp., registered in many jurisdictions worldwide. Otherproduct and service names might be trademarks of IBM or other companies. Acurrent list of IBM trademarks is available on the Web at “Copyright andtrademark information” at www.ibm.com/legal/copytrade.shtml.

Adobe, Acrobat, Portable Document Format (PDF), PostScript, and all Adobe-basedtrademarks are either registered trademarks or trademarks of Adobe SystemsIncorporated in the United States, other countries, or both.

Java™ and all Java-based trademarks and logos are trademarks orregistered trademarks of Sun Microsystems, Inc. in the United States,other countries, or both.

Linux is a registered trademark of Linus Torvalds in the United States, othercountries, or both.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks ofMicrosoft Corporation in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and othercountries.

Other company, product, or service names may be trademarks or service marks ofothers.

Notices 39

40 IBM Tivoli Netcool Configuration Manager: SMI API

Index

Aaccessibility xv

Cconventions, typeface xv

Eeducation

see Tivoli technical training xvenvironment variables, notation xv

Mmanuals xi

Oonline publications xiordering publications xi

Ppublications xi

Ssupport information xv

TTivoli software information center xiTivoli technical training xvtraining, Tivoli technical xvtypeface conventions xv

Vvariables, notation for xv

© Copyright IBM Corp. 2011, 2014 41

42 IBM Tivoli Netcool Configuration Manager: SMI API

����

Printed in the Republic of Ireland