CLI command methods

Overview

An OSS client can send CLI commands to an NE using the methods listed in Table 9-7, CLI command methods . The NFM-P uses the CLI credentials in the associated mediation policy to gain CLI access. For some devices, you can use a site user profile to restrict the CLI commands that are available to a user.

Before executing the commands in a CLI script, the NFM-P executes the “environment no more” command to disable CLI output pagination. You must ensure that the “environment more” command is permitted in the site user profile.

Table 9-7: CLI command methods

Method

Description

executeCli

Sends a CLI command to an NE; see Figure 9-16, Single CLI command execution request example .

executeMultiCli

Sends multiple CLI commands to an NE; see Figure 9-17, Multiple CLI command execution request example .

Figure 9-16: Single CLI command execution request example
<?xml version="1.0" encoding="UTF-8"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP:Header>
      <header xmlns="xmlapi_1.0">
         <security>
            <user>username</user>
            <password hashed="false">password</password>
         </security>
         <requestID>XML_API_client@n</requestID>
      </header>
   </SOAP:Header>
   <SOAP:Body>
      <netw.NetworkElement.executeCli xmlns="xmlapi_1.0">
         <instanceFullName>network:10.1.186.183</instanceFullName>
         <command>ping 192.168.186.185</command>
      </netw.NetworkElement.executeCli>
   </SOAP:Body>
</SOAP:Envelope>
Figure 9-17: Multiple CLI command execution request example
<?xml version="1.0" encoding="UTF-8"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP:Header>
      <header xmlns="xmlapi_1.0">
         <security>
            <user>username</user>
            <password hashed="false">password</password>
         </security>
         <requestID>XML_API_client@n</requestID>
      </header>
   </SOAP:Header>
   <SOAP:Body>
      <netw.NetworkElement.executeMultiCli xmlns="xmlapi_1.0">
         <instanceFullName>network:35.121.20.56</instanceFullName>
         <commands>
      <string>environment no more</string>
      <string>show system info</string>
         </commands>
      </netw.NetworkElement.executeMultiCli>
   </SOAP:Body>
</SOAP:Envelope>

© 2023 Nokia. Nokia Confidential Information

Use subject to agreed restrictions on disclosure and use.