Solstice Enterprise Manager 4.1 Developing C++ Applications Doc Set ContentsPreviousNextIndex


Chapter 16

Integrating Applications With Solstice EM

Integrating applications with Solstice EM enables users to start your applications from the Solstice EM platform. Applications you develop will typically be used in conjunction with other Solstice EM components to provide a complete network management solution. Integrating applications with Solstice EM enhances the usability of your network management solution by providing users with the most convenient means to start applications. Integrating applications with Solstice EM also ensures that information required by the applications when they are started is always passed to them. Depending on the purpose of an application, you can integrate the application by adding it to a tools window, extending the Tools menu of a Solstice EM tool, or customizing the Network Views tool.

This chapter explains how to integrate applications with Solstice EM.

16.1 Adding an Application to a Tools Window

Users of the Solstice EM platform start tools from a tools window. Each tools window groups together a number of related tools and provides for each tool an icon which, when clicked, starts the tool. Integrate an application with Solstice EM by adding the application to a tools window if the application is independent of other Solstice EM components in your network management solution.

Add an application to one of the following tools windows, depending on the purpose of the application:

To add an application to a tools window, edit one of the configuration files given in TABLE 16-1, depending on the window you want to add the application to.

TABLE 16-1   Configuration Files for Solstice EM Tools Windows 
Window Configuration File
Network Tools
/opt/SUNWconn/em/config/em_panel.cf
Administration
/opt/SUNWconn/em/config/em_admintool.cf



Note – The tools windows enable you to add applications to them interactively instead of by editing a configuration file. For information on how to add applications interactively to a tools window, refer to Managing Your Network.

Each configuration file for a tools window contains an entry for each application that you can start from the tools window. The format of an entry is as follows:

toolsWindow.glyphn: glyphFile
toolsWindow.labeln: labelText
toolsWindow.commandn: command
toolsWindow.responsen: response
toolsWindow.app_namen: applicationName

The variable parts of this format are explained in TABLE 16-2.

TABLE 16-2   Variable Parts in a Configuration File Entry for a Tools Window 
toolsWindow
Specifies the tools window that the entry applies to. toolsWindow is one of the following keywords:

  • em_panel - Network Tools window

  • em_admintool - Administration window

  • n
    An integer that specifies where in relation to other icons the icon for this application is displayed in the tools window. Icons in a tools window are displayed left to right and top to bottom.
    glyphFile
    The name of the file, including the full path, that contains icon that is displayed in the tools window. By default, Solstice EM glyph files are located in the /opt/SUNWconn/em/glyphs directory.
    labelText
    The text label displayed beneath the icon in the tools window. To create a multiline label, insert \n where you want a line break.
    command
    The command to start the application, including:

  • The full path to the command

  • Any arguments that must be passed to the application when it is started

  • response
    Specifies whether the tools window waits for a response from the application when a user starts the application. response is one of the following values:

  • 0 - The tools window does not wait for a response. The icon for the application in the tools window remains grayed out and inactive for 5 seconds after a user starts the application.

  • 1 - The tools window waits for a response from the application to confirm that the application has started. The icon for the application in the tools window remains grayed out and inactive until the tools window receives a response.

  • applicationName
    The name of the application as registered when the application was placed under security control. For information on how to place an application under security control, refer to Managing Your Network.


    CODE EXAMPLE 16 -1 shows an entry in the configuration file for the Network Tools window.

    CODE EXAMPLE 16-1    Network Tools Window Configuration File Entry 
    em_panel.glyph4: 
    /opt/SUNWconn/em/glyphs/em_datacollector.pm
    
    em_panel.label4: Data\nCollections
    
    em_panel.command4: /opt/SUNWconn/em/bin/em_datacollector 
    -host EM_MIS
    
    em_panel.response4: 1
    
    em_panel.app_name4: em_datacollector
    

    In this example, an application is added in the fourth position of the Network Tools window. The properties of this application are as follows:

    16.2 Extending the Tools Menu of a Solstice EM Tool

    Extending the Tools menu of a Solstice EM tool enables users to start your application by choosing a command from the Tools menu of a Solstice EM tool. Integrate an application by extending a Solstice EM tool if the purpose of the application is to provide additional features that the tool does not already provide, or if the application operates on a selection made in the tool.

    For example, consider an application that processes alarms in a specialized manner. Any alarm that the application processes must be selected in the Alarms tool. To integrate this application with Solstice EM, the Alarms tool would be extended to add the command for starting the application to the Tools menu of the Alarms tool.

    To extend the Tools menu of a Solstice EM tool, edit one of the configuration files given in TABLE 16-3, depending on the tool.

    TABLE 16-3   Configuration Files for Solstice EM Tools 
    Solstice EM Tool Configuration File
    Network Views
    /opt/SUNWconn/em/config/em_viewer.cf
    Alarms
    /opt/SUNWconn/em/config/em_alarmmgr_tp.cf
    Event Logs
    /opt/SUNWconn/em/config/em_logmgr_tp.cf
    Log Entries
    /opt/SUNWconn/em/config/em_logview_tp.cf



    Note – Solstice EM tools enable you to extend their Tools menus interactively instead of by editing a configuration file. For information on how to extend the Tools menu of a Solstice EM tool interactively, refer to Managing Your Network.

    Each configuration file for a Solstice EM tool contains an entry for each command on the Tools menu of the tool. To extend the Tools menu of a Solstice EM tool, add an entry to the configuration file for the tool. The format of an entry is as follows:

    Application
    
    {
    
    name: commandLabel
    
    path: command
    
    args: argList
    
    }
    

    Each entry starts with the keyword Application. The remainder of the entry is enclosed in braces.

    The variable parts of a configuration file entry for a Solstice EM tool are explained in TABLE 16-4.

    TABLE 16-4   Variable Parts in a Configuration File Entry for a Solstice EM Tool 
    commandLabel
    The name of the command for starting the application as it appears on the Tools menu. If choosing this command opens another window, append an ellipsis to the command name.
    command
    The command to start the application, including the full path to the command.
    argList
    A list of arguments that must be passed to the application when the application is started. Each argument in argList is separated from the argument that precedes it by a space.


    CODE EXAMPLE 16 -2 shows an entry for extending the Tools menu in the configuration file for a Solstice EM tool.

    CODE EXAMPLE 16-2   Configuration File Entry for Extending the Tools Menu 
    Application
    
    {
    
    name: Alarms...
    
    path: /opt/SUNWconn/em/bin/em_alarmmgr
    
    args: -host EM_MIS
    
    }
    

    In this example, the Alarms command is added to the Tools menu of a Solstice EM tool. When a user chooses this command, the application that has the executable file /opt/SUNWconn/em/bin/em_alarmmgr is started. The argument -host EM_MIS is passed to the application when it is started. The ellipsis indicates that another window is opened when a user chooses this command.

    16.3 Customizing the Network Views Tool

    The actions that the Network Views tool provides depend on the topology type of the object selected in the Network Views window. Integrate an application by customizing the Network Views tool if the application is intended to process objects of a particular topology type. Depending on the purpose of the application, you can customize the Network Views tool by:

    16.3.1 Extending the Actions Menu of the Network Views Tool

    Extending the Actions menu of the Network Views tool enables users to start your application by choosing a command from the Actions menu of the Network Views tool. The Actions menu of the Network Views tool provides additional custom commands that depend on the topology type of the object selected in the Network Views window. Integrate an application by extending the Actions menu of the Network Views tool if the application provides a specialized action for a particular topology type.

    To extend the Actions menu of the Network Views tool, edit the /opt/SUNWconn/em/config/em_viewer.cf configuration file. This file contains an entry for each topology type to specify the custom commands on the Actions menu. The format of an entry that defines custom commands for a topology type is as follows:

    Menu topoType
    
    {
    
    "commandText1" command1
    
    .
    
    .
    
    .
    
    "commandTextN" commandN
    
    }
    

    Each entry starts with the keyword Menu followed by the topology type. Each command that you want to add to the Actions menu is specified on a separate line. The commands are enclosed in braces.

    The variable parts of a configuration file entry that defines custom commands on the Actions menu for a topology type are explained in TABLE 16-5.

    TABLE 16-5   Variable Parts in a Configuration File Entry for the Actions Menu 
    topoType
    The topology type that the custom commands apply to.
    commandText1
    The name of the first custom command on the Actions menu. If choosing this command opens another window, append an ellipsis to the command name. commandText1 is enclosed in double quotes.
    command1
    The command to start the application associated with the first custom command, including:

  • The full path to the command

  • Any arguments that must be passed to the application when it is started

  • commandTextN
    The name of the Nth custom command on the Actions menu. If choosing this command opens another window, append an ellipsis to the command name. commandTextN is enclosed in double quotes
    commandN
    The command to start the application associated with the Nth custom command, including:

  • The full path to the command

  • Any arguments that must be passed to the application when it is started


  • CODE EXAMPLE 16 -3 shows an entry for extending the Actions menu of the Network Views tool for a topology type.

    CODE EXAMPLE 16-3   Extending the Actions Menu of the Network Views Tool 
    Menu Satellite
    
    {
    
    "Display View"     EM_GOTOVIEW
    
    "Alarms..."       /op
    t/SUNWconn/em/bin/em_alarmmgr -host EM_MIS -id EM_UNIQUE_ID
    
    "Dish Watcher..." /opt/SUNWconn/em/bin/graphics
    
    "Properties..."   /opt/SUNWconn/em/bin/em
    _oct -host EM_MIS -id EM_UNIQUE_ID
    
    }
    

    In this example, the following commands are added to the Actions menu of the Network Views tool for the Satellite topology type:

    16.3.2 Setting the Activation of a Topology Type

    Setting the activation of a topology type specifies the action carried out when a topology node of the type in the Network Tools window is double clicked. Integrate an application by setting the activation of a topology type if the application performs the default action for the topology type. The application is run when a topology node of the type in the Network Tools window is double clicked.

    To set the activation of a topology type, edit the /opt/SUNWconn/em/config/em_viewer.cf configuration file. This file contains an entry that sets the activations of all topology types that are displayed in the Network Tools window. The format of this entry is as follows:

    Activations
    
    {
    
    "topoType1" 
    command1
    
    .
    
    .
    
    .
    
    "topoTypeN" 
    commandN
    
    }
    

    This entry starts with the keyword Activations. The activation setting for each topology type is specified on a separate line. The activation settings are enclosed in braces.

    The variable parts of the configuration file entry that sets activations of topology types are explained in TABLE 16-6.

    TABLE 16-6   Variable Parts of the Configuration File Entry That Sets Activations 
    topoType1
    The first topology type that you want to set the activation of. topoType1 is enclosed in double quotes.
    command1
    The command that specifies the action carried out when a topology node of type topoType1 is double clicked. You must include:

  • The full path to the command

  • Any arguments that must be passed to the application when it is started

  • topoTypeN
    The Nth topology type that you want to set the activation of. topoTypeN is enclosed in double quotes.
    commandN
    The command that specifies the action carried out when a topology node of type topoTypeN is double clicked. You must include:

  • The full path to the command

  • Any arguments that must be passed to the application when it is started


  • CODE EXAMPLE 1 6-4 shows an example of the configuration file entry that defines activations of topology types.

    CODE EXAMPLE 16-4   Setting the Activations of Topology Types 
    Activations
    
    {
    
    "Array"     EM_GOTOVIEW
    
    "Bridge"    /opt/SUNWconn/em/bin/em_
    alarmmgr -host EM_MIS -id EM_UNIQUE_ID
    
    "Dish"      /opt/SUNWconn/
    em/bin/graphics
    
    }
    

    In this example, activations of topology types are set as follows:


    Sun Microsystems, Inc.
    Copyright information. All rights reserved.
    Doc Set  |   Contents   |   Previous   |   Next   |   Index