Cisco Transport Manager GateWay/CORBA User's Guide and Programmer Manual, 6.0
Appendix C: OSS Client Development and Use Cases

Table Of Contents

OSS Client Development and Use Cases

C.1  Use Cases to Resynchronize the NMS from the EMS

C.2  Developing a CTM Gateway/CORBA Client

C.2.1  Recommended Tools

C.2.2  Sample Code for Receiving Notifications

C.2.3  Sample Code in Java


OSS Client Development and Use Cases


This appendix lists interceptors and use cases to resynchronize the NMS from the EMS.

Use Cases to Resynchronize the NMS from the EMS

Developing a CTM Gateway/CORBA Client

C.1  Use Cases to Resynchronize the NMS from the EMS

Table C-1, Table C-2, and Table C-3 list use cases to resynchronize the NMS from the EMS.

Table C-1 NMS Retrieves CTM Information When the GateWay/CORBA Service Is Started or Restarted 

Information
Detail

Name

The NMS retrieves CTM information.

Summary

The NMS retrieves all EMS and ManagedElement alarms and information for existing MultiLayerSubnetworks, ManagedElements, PTPs, CTPs, SNCs, and protection groups from GateWay/CORBA interfaces.

Actor(s)

NMS.

Pre-Conditions

The NMS locates the EmsSessionFactory object and obtains references to EMSMgr_I, MultiLayerSubnetworkMgr_I, ManagedElementMgr_I, EquipmentInventoryMgr_I, MaintenanceMgr_I, ProtectionMgr_I, and PerformanceManagementMgr_I interfaces.

Begins When

The NMS sends a request to retrieve all CTM information.

Description

The NMS requests the following information from the GateWay/CORBA interface:

1. The NMS uses the emsMgr::EMSMgr_I::getAllEMSSystemActiveAlarms interface to request all EMS alarms.

2. The NMS uses the emsMgr::EMSMgr_I::getAllTopLevelSubnetworks interface to request all multilayer subnetworks in CTM.

CTM returns a list of MultiLayerSubnetwork_T objects with detailed information about a MultiLayerSubnetwork.

3. For each MultiLayerSubnetwork_T object, the NMS uses the multiLayerSubnetwork::MultiLayerSubnetworkMgr_I::getAllManagedElements interface to request all MEs that belong to the same multilayer subnetwork.

CTM returns a list of ManagedElement_T objects with detailed information about a ManagedElement.

For each ManagedElement object, the NMS executes the use case "NMS (Re)synchronizes information specific to a Managed Element."

4. The NMS uses the emsMgr::EMSMgr_I::getAllTopLevelTopologicalLinks interface to request all topological links associated with the multilayer subnetwork.

CTM returns a list of TopologicalLink_T objects with detailed information about a topological link.

5. The NMS uses the multiLayerSubnetwork::MultiLayerSubnetworkMgr_I::getAllVLANs interface to request all VLANs associated with the multilayer subnetwork.

Ends When

The NMS retrieves all CTM information.

Exceptions

Refer to the exceptions thrown by the individual interface method.

Post-Conditions

The NMS synchronizes with CTM.

The NMS registers with CTM to retrieve notifications related to changes in the managed object on CTM, new alarms, and TCAs.

Traceability


Table C-2 NMS Resynchronizes Information Specific to a Managed Element 

Information
Detail

Name

The NMS retrieves CTM information specific to the ME.

Summary

The NMS retrieves all PTP, CTP, SNC, and protection group information for the specific ME.

Actor(s)

NMS

Pre-Conditions

The NMS obtains references to ManagedElementMgr_I, EquipmentInventoryMgr_I, MaintenanceMgr_I, ProtectionMgr_I, and PerformanceManagementMgr_I interfaces. The NMS also obtains the ManagedElement name.

Begins When

The NMS sends a request to retrieve all information about an ME. The NMS identifies the name of the ME for which information is to be retrieved.

Description

The NMS requests the following information from the GateWay/CORBA interface:

1. The NMS uses the managedElementManager::ManagedElementManager_I::getAllActiveAlarms interface to request all current alarms on the ME.

2. The NMS uses the equipment::EquipmentInventoryMgr_I::getAllEquipment interface to request all existing equipment on the ME.

CTM returns a list of EquipmentHolder_T objects with detailed information about equipment holders and equipment on the ME.

3. For the equipment information retrieved in EquipmentorHolder_T object, the NMS uses the equipment::EquipmentInventoryMgr_I::getAllSupportedPTPs interface to request all the supported PTPs on the equipment.

CTM returns a list of TerminationPoint_T objects with detailed PTP information, such as SDH_SONET port, ServiceState, LineCode, FrameFormat, and so on.

4. For each TerminationPoint_T object, the NMS executes the "NMS (re)synchronizes information specific to termination point" use case.

5. The NMS uses the managedElementManager::ManagedElementManager_I::getAllSNCs interface to request all SNCs originating, terminating, or passing through the ME.

CTM returns a list of SubnetworkConnection_T objects with detailed SNC information, such as layer rate, SNC state, SNC protection state, aEnd CTP, zEnd CTP, and so on.

6. The NMS uses the protection::ProtectionMgr_I::getAllProtectionGroups interface to request all protection groups created on the ME.

CTM returns a list of ProtectionGroup_T objects with detailed protection group information, such as 1:1, 1+1, or 2F-BLSR; revertive or nonrevertive, and so on.

Ends When

The NMS retrieves all ME-specific information.

Exceptions

Refer to the exceptions thrown by the individual interface method.

Post-Conditions

The NMS synchronizes information about an ME with CTM.

Traceability


Table C-3 NMS Resynchronizes Information Specific to a Termination Point 

Information
Detail

Name

The NMS retrieves CTM information specific to the TP.

Summary

The NMS retrieves all loopback and threshold information for PTPs and CTPs in use by the SNC.

Actor(s)

NMS

Pre-Conditions

The NMS obtains references to ManagedElementMgr_I, MaintenanceMgr_I, and PerformanceManagementMgr_I interfaces. The NMS also obtains a list of PTPs.

Begins When

The NMS sends a request to retrieve all threshold and loopback information on a PTP and on any in-use CTPs. The NMS identifies the name and type (PTP/CTP) of the TP for which the information is to be retrieved.

Description

The NMS requests the following information from the GateWay/CORBA interface:

1. The NMS uses the maintenanceOps::MaintenanceMgr_I::getActiveMaintenanceOperations interface to request all the loopback information on the TP.

CTM returns a list of CurrentMaintenanceOperation_T objects with detailed information about the type of loopback set on the PTP, if any. CTM supports two types of loopback, FACILITY_LOOPBACK and TERMINAL_LOOPBACK. If there are no loopbacks set on the TP, the returned list is empty.

2. The NMS uses the performance::PerformanceManagementMgr_I::getTCATPParameter interface to request the threshold values set for all the PM thresholds on the given TP object.

CTM returns the TCAParameter_T object with detailed information about all the PM threshold name/value pairs for the PTP.

3. For each PTP specified by the NMS as the TP, the NMS uses the managedElementManager::ManagedElementManager_I::getContainedInUseTPs interface to request all the CTPs contained in the PTP participating in an SNC.

CTM returns a list of TerminationPoint_T objects with detailed information about the CTPs participating in an SNC and the associated provisioning details, such as IPPMMonitor status, J1 Path trace status, and so on.

4. For each CTP object, the NMS uses the performance::PerformanceManagementMgr_I::getTCATPParameter interface to request threshold information.

CTM returns a list of TCAParameter_T objects with detailed information about the PM threshold name/value pairs for the CTP.

Ends When

The NMS retrieves loopback and threshold information for all PTPs and CTPs.

Exceptions

Refer to the exceptions thrown by the individual interface method.

Post-Conditions

The NMS synchronizes information about a TP object with CTM.

Traceability


C.2  Developing a CTM Gateway/CORBA Client

CTM GateWay/CORBA implements Application Programming Interfaces (APIs) defined by the TeleManagement Forum's Multi-Technology Network Management (MTNM) group. These APIs are defined for communication between an NMS and the EMS. The NMS must develop a client application that uses these APIs.

The following sections describe the tools required for developing a client application. Sample code is provided.

C.2.1  Recommended Tools

You can develop the CORBA client on a UNIX or PC platform using the following tools:

Sun Microsystems Java Development Kit (JDK) 1.4.2 (available on www.javasoft.com)


Note This website is Copyright © 1995-2004, Sun Microsystems, Inc.


JacORB 2.x

C.2.2  Sample Code for Receiving Notifications

A typical CORBA client application involves the following steps:


Step 1 Initialize the client connection to the object request broker (ORB).

Step 2 Get a reference to an object.

Step 3 Invoke operations on this object.

If you want your client to receive notifications from CTM GateWay/CORBA, the following additional steps are required:

Step 4 Obtain a reference to an EventChannel object in the notification server in Step 2.

Step 5 Obtain a ConsumerAdmin object reference.

Step 6 Invoke obtain_notification_push_consumer() on the SupplierAdmin object, specifying CosNotifyChannelAdmin::STRUCTURED_EVENT as a parameter. This operation returns a reference to StructuredProxyPushSupplier.

Step 7 Implement an instance of StructuredPushConsumer (defined by OMG).

Step 8 Invoke the operation connect_structured_push_consumer() on the StructuredProxyPushSupplier object to connect the StructuredPushConsumer implementation object to the notification channel.

Step 9 Monitor incoming notifications.


C.2.3  Sample Code in Java

The following sections show sample Java code for the steps required to develop a client application.


Note The sample code shown is for example purposes only; the code might not compile as shown. The sample code does not handle all exceptions.


C.2.3.1  Initialize the Client Connection

// Import OMG packages 
import org.omg.CORBA.*; 
import org.omg.CosNaming.*; 
import org.omg.CosNaming.NamingContextPackage.*; 
import org.omg.CosNotifyChannelAdmin.*; 
public static void main(String[] args) 
{ 
try { 
orb = ORB.init(args, null); 
} 
catch (SystemException ex) { 
// Exception handling 
} 
} 

C.2.3.2  Get Reference to Naming Service

// Get Nameservice reference 
NamingContext nsRootContext = null; 
try { 
org.omg.CORBA.Object objRef = 
orb.resolve_initial_references ("NameService"); 
nsRootContext = NamingContextHelper.narrow (objRef); 
} 
catch (org.omg.CORBA.ORBPackage.InvalidName inEx) { 
// Exception handling 
} 

C.2.3.3  Sample Code for Operations on Supported Managers

To perform operations from CTM GateWay/CORBA, your client must log in using a username and password created on the CTM client. You can create a maximum of eight user profiles for CTM GateWay/CORBA.

You can use the username and password in your code to retrieve inventory. The general procedure follows:


Step 1 Resolve reference to EMSSessionFactory. See the "Get Reference to EMSSessionFactory" section.

Step 2 Retrieve EMSSession by supplying the username and password. See the "Log In and Retrieve EmsSession" section.

Step 3 Query EMSSession and get a list of managers available for operations. See the "Retrieve List of Managers" section.

Step 4 Invoke the desired method on one of the managers in the list. See the "Perform getEMS Operation on EMS Manager" section.


C.2.3.3.1  Get Reference to EMSSessionFactory

NameComponent name = new NameComponent[6];
name[0] = new NameComponent(classString,"Class"); 
name[1] = new NameComponent(vendorString, "Vendor"); 
name[2] = new NameComponent(emsInstanceString, "EMSInstance"); 
name[3] = new NameComponent(versionString,"Version"); 
name[4] = new NameComponent(ctm_sys_id, "EMS"); 
name[5] = new NameComponent("SessionFactory", "EmsSessionFactory"); 
try { 
org.omg.CORBA.Object obj = nsRootContext.resolve(name); 
} 
catch (InvalidName inEx) { 
// Exception handling 
} 
catch (NotFound nfEx) { 
// Exception handling 
}

Follow the example in the "Get Reference to Naming Service" section to get a reference to Naming Service.

C.2.3.3.2  Log In and Retrieve EmsSession

EmsSessionFactory_I m_emsFactory = EmsSessionFactory_IHelper.narrow(obj); 
NmsSession_I csession = new _tie_Session_I(new NmsSessionImpl()); 
orb.connect(csession); 
EmsSession_IHolder sessionHolder = new EmsSession_IHolder(); 
m_emsFactory.getEmsSession("<userid>", "<password>", csession,sessionHolder); 
EmsSession_I emsSession = sessionHolder.value;

C.2.3.3.3  Retrieve List of Managers

managerNames_THolder names = new managerNames_THolder(); 
emsSession.getSupportedManagers(names); 
managers = names.value; 
for (i = 0; i < managers.length; i++ ) 
{ 
System.out.print("Manager "); 
System.out.print(i); 
System.out.println(" " + managers[i]); 
}

C.2.3.3.4  Perform getEMS Operation on EMS Manager

EMS_T m_ems; 
EMS_THolder m_emsHolder = new EMS_THolder(); 
try { 
Common_IHolder mgrHolder = new Common_IHolder(); 
    emsSession.getManager("EMS", mgrHolder); 
    EMSMgr_I emsMgr = EMSMgr_IHelper.narrow(mgrHolder.value); 
    emsMgr.getEMS(m_emsHolder); 
} 
catch (ProcessingFailureException pfe) { 
System.out.println("Processing Exception" + pfe.getMessage()); 
    pfe.printStackTrace(); 
} 
m_ems = m_emsHolder.value; 
System.out.println("Native EMS Name" + m_ems.nativeEMSName);

C.2.3.4  Get Reference to EventChannel

EventChannel notifChannel; 
EventChannelHolder chanHolder = new EventChannelHolder(); 
try { 
	...
emsSession.getEventChannel(chanHolder); 
} 
catch (Exception ex){ 
// handle exceptions 
} 
notifChannel = chanHolder.value; 

C.2.3.5  Obtain ConsumerAdmin Reference

//retrieve default consumer admin 
try { 
ConsumerAdmin cadmin = notifChannel.get_consumeradmin(0); 
} 
catch (AdminNotFound anfSe) { 
// Exception handling 
} 

C.2.3.6  Obtain ProxyPushSupplier

try { 
ProxySupplier baseSupplier = 
cadmin.obtain_notification_push_supplier( 
ClientType.STRUCTURED_EVENT, id); 
structuredProxyPushSupplier = 
StructuredProxyPushSupplierHelper.narrow(baseSupplier); 
} 
catch (AdminLimitExceeded aleEx) { 
// Exception handling 
}

C.2.3.7  Implement StructuredPushConsumer

class StructuredPushConsumerImpl extends _StructuredPushConsumerImplBase 
{ 
StructuredPushConsumerImpl() { 
super(); 
System.out.println("StructuredPushConsumerImpl created."); 
} 
public void disconnect_structured_push_consumer() { 
System.out.println("Disconnect structured push consumer.:"); 
} 
public void push_structured_event(StructuredEvent notification) { 
System.out.println("Received notification."); 
} 
public void offer_change(EventType[] added, 
EventType[] removed) 
throws InvalidEventType 
{ 
System.out.println("Offer changed."); 
}
}

C.2.3.8  Connect StructuredPushConsumerImpl

try { 
structuredProxyPushSupplier.connect_structured_push_consumer( 
new StructuredPushConsumerImpl()); 
System.out.println( 
"Connected to structured proxy push supplier."); 
} 
catch (AlreadyConnected acEx) { 
// Exception handling 
} 
catch (TypeError teEx) { 
// Exception handling 
}