4 Managing Nodes Using NMShell Command-Line Components

This chapter provides an overview of managing nodes using Oracle Communications Offline Mediation Controller NMShell command-line components.

Using NMShell, you can perform the following tasks at the command line:

Adding Mediation Hosts to Node Manager

Before you import the node configuration or customization into a mediation host, you must first add the mediation host to Node Manager.

To add a mediation host to Node Manager:

  1. Start Administration Server and Node Manager daemons. See the discussion about starting component daemons in Offline Mediation Controller Installation Guide.

  2. Go to OMC_home/bin/tools, where OMC_home is the directory in which Offline Mediation Controller is installed and enter the following command:

    ./NMShell
    

    The prompt changes to nmsh>.

  3. Enter the following command:

    login server_hostname port
    

    where:

    • server_hostname is the IP address or host name of the computer on which Administration Server is running.

    • port is the Administration Server port number.

  4. When prompted, enter the user name and password.

    You are connected to Administration Server.

  5. Enter the following command:

    addhost -n mediation_name -ip node_mgr_hostname -p port
    

    where:

    • mediation_name is the name of the mediation host you are adding to Node Manager.

    • node_mgr_hostname is the IP address or host name of the computer on which Node Manager is running.

    • port is the port number at which the mediation host communicates with Node Manager.

    The mediation host is added to Node Manager.

Exporting Node Configuration and Node Customization

To export the mediation host's node configuration and customization:

  1. Start Administration Server and Node Manager daemons. See the discussion about starting component daemons in Offline Mediation Controller Installation Guide.

  2. Go to OMC_home/bin/tools and enter the following command:

    ./NMShell
    

    The prompt changes to nmsh>.

  3. Enter the following command:

    login server_hostname port
    

    where:

    • server_hostname is the IP address or host name of the computer on which Administration Server is running.

    • port is the Administration Server port number.

  4. When prompted, enter the user name and password.

    You are connected to Administration Server.

  5. Enter the following command:

    export [-n ALL | -n mediation_name@host_name:port] -f filename [-c value]
    

    where:

    • -n ALL specifies to export from all the mediation hosts configured in Node Manager. This is default.

      -n mediation_name@mediation_hostname:port exports the mediation host's node configuration or node customization.

      where:

      • mediation_name is the mediation host's name configured in Node Manager.

      • mediation_hostname is the mediation host's IP address or host name.

      • port is the port number at which the mediation host communicates with Node Manager.

      To export multiple hosts, enter the mediation hosts separated by comma (,).

    • -f filename specifies the name and path of the output files. Do not include the file extension.

    • -c value specifies whether to export both the node configuration and customization or only the node configuration.

      where value is:

      • Y to export both the node configuration and node customization. Two files are generated; a filename.xml file with the node configuration and a filename.nmx file with the node customization. This is default.

      • N to export only the node configuration. One file is generated: a filename.xml file with the node configuration.

    For example:

    export -n linux1@10.10.10.111:55109,linux2@10.10.10.112:55110 -f export -c N
    

    Only the node configuration from the mediation hosts (linux1@10.10.10.111:55109 and linux2@10.10.10.112:55110) is exported to the export.xml file.

Importing Node Configuration and Node Customization

To import the mediation host's node configuration and customization:

  1. Start Administration Server and Node Manager daemons. See the discussion about starting component daemons in Offline Mediation Controller Installation Guide.

  2. Go to OMC_home/bin/tools and enter the following command:

    ./NMShell
    

    The prompt changes to nmsh>.

  3. Enter the following command:

    login server_hostname port
    

    where:

    • server_hostname is the IP address or host name of the computer on which Administration Server is running.

    • port is the Administration Server port number.

  4. When prompted, enter the user name and password.

    You are connected to Administration Server.

  5. Enter the following command:

    import -n mediation_name@mediation_hostname:port -f filename -c value
    

    where:

    • -n mediation_name@mediation_hostname:port specifies the mediation host configured in Node Manager.

      where:

      • mediation_name is the mediation host's name configured in Node Manager.

      • mediation_hostname is the IP address or host name of the mediation host you are importing to.

      • port is the port number at which the mediation host you are importing to communicates with Node Manager.

      The command verifies whether the mediation host exists in Node Manager. If the mediation host does not exist, the command generates an error.

    • -f filename specifies the name and path of the input file. Use filename.xml file to import the node configuration and use filename.nmx file to import the node customization.

    • -c value specifies whether to import the node customization or the node configuration.

      where value is:

      • Y to import only the node customization. Use this value with the filename.nmx file.

      • N to import only the node configuration. Use this value with the filename.xml file.

    The node configuration and node customization are imported into the specified mediation host.

    For example:

    import -n linux1@10.10.10.111:55109 -f import.xml -c N
    

    The node configuration is imported from the import.xml file into the specified mediation hosts (linux1@10.10.10.111:55109).

Starting All Nodes

To start all nodes:

  1. Start Administration Server and Node Manager daemons. See the discussion about starting component daemons in Offline Mediation Controller Installation Guide.

  2. Go to OMC_home/bin/tools and enter the following command:

    ./NMShell
    

    The prompt changes to nmsh>.

  3. Enter the following command:

    login server_hostname port
    

    where:

    • server_hostname is the IP address or host name of the computer on which Administration Server is running.

    • port is the Administration Server port number.

  4. When prompted, enter the user name and password.

    You are connected to Administration Server.

  5. Enter the following command:

    startNodes
    

    All the nodes for the currently running mediation host are started.