MWTM NBAPI CLI Tools
MWTM provides utility tools to help you use the Northbound API (NBAPI). The following tools can be invoked from the command line (CLI) or wrapped within the script for Operations Support System (OSS) integration.
MWTM provides the following Northbound API CLI commands:
•
mwtm dbtool
•
mwtm eventtool
•
mwtm inventorytool
•
mwtm provisiontool
For information about other command line utilities available in MWTM, see the User Guide for the Cisco Mobile Wireless Transport Manager 6.1.5.
The MWTM NBAPI also provides support for Hypertext Transfer Protocol over Secure Socket Layer (HTTPS). To set up secure access, see "Implementing SSL Support in the MWTM" in Chapter 2 of the User Guide for the Cisco Mobile Wireless Transport Manager 6.1.5.
mwtm dbtool
Server Only
Syntax
mwtm dbtool {SQL}
Command Description
Issues a SQL query against the MWTM database. Use a standard SQL query, except replace any instances of the asterisk (*) with a question mark (?). For example, a sample SQL query might be:
Using the mwtm dbtool command, this SQL query would be:
mwtm dbtool "select ? from events"
Note
You must log in as the root user or superuser to use this command.
mwtm eventtool
Server Only
Syntax
mwtm eventtool {-a actionName} {parameters}
Command Description
Invokes MWTM event API operations.
These action names (and any corresponding required parameters) can be specified with the -a option:
|
|
|
-a |
acknowledgeEvents |
-l or -L -u -n |
appendNote |
-e -n -u |
changeSeverities |
-s -l or -L -u -n |
clearEvents |
-l or -L -u -n |
deleteEvents |
-l or -L -u -n |
getAllEventsAsTraps |
-t |
getFilteredEventsAsTraps |
-t -f -B -E -C -T -b -d -D -P -V |
getNote |
-e |
setNote |
-e -n -u |
These parameters can be used:
|
|
-e |
Specifies an event ID parameter. |
-f |
Specifies a file name for EventFilter, which is an XML element defined in MWTM WSDL definitions. |
-l |
Specifies a file name for EventIDList, which is an XML element defined in MWTM WSDL definitions. |
-n |
Specifies an event note string. |
-s |
Specifies an event severity. |
-t |
Specifies a file name for TrapTarget, which is an XML element defined in MWTM WSDL definitions. |
-u |
Specifies a user ID for event operation. |
-H |
Specifies a hostname to connect to. If unspecified, the default value is obtained from the MWTM server System.properties file, SERVER_NAME property. |
-p |
Specifies a port to connect to. If unspecified, the default value is obtained from the MWTM server System.properties file, WEB_PORT property. |
-L |
Specifies a list of event IDs, separated by '|'. |
-b |
Specifies the Starting change time of the alarm. |
-d |
Specifies the ending change time of the alarm. |
-B |
Specifies the start ID of the alarm. |
-E |
Specifies the end ID of the alarm. |
-N |
Specifies the target trap type. |
-S |
Specifies whether to use SSL (https) for NBAPI access. Default is no SSL. |
-h |
Prints help information. |
-D |
Specifies the target host name. |
-P |
Specifies the target server port. |
-V |
Specifies the target server snmp version. |
-C |
Specifies the target trap community. |
Note
You must log in as the root user or superuser to use this command.
mwtm inventorytool
Server Only
Syntax
mwtm inventorytool -a actionName [parameters]
Command Description
Invokes inventory API operations.
These action names (and any corresponding required parameters) can be specified with the -a option:
|
|
|
-a |
getAllNEs |
-c -H -p -S -h |
getAllNEsWithFeature |
-F -c -H -p -S -h |
getRootNEs |
-c -H -p -S -h |
getRootNEsWithFeature |
-F -c -H -p -S -h |
|
getNE |
-f -c -H -p -S -h |
getChildNEs |
-f -c -H -p -S -h |
getChildNEsWithFeature |
f -c -F -H -p -S -h |
getDescendantNEs |
-f -c -H -p -S -h |
getDescendantNEsWithFeature |
f -c -F -H -p -S -h |
|
getNote |
-f -c -H -p -S -h |
setNote |
-f -u -n -H -p -S -h |
appendNote |
You can use these parameters:
|
|
-c |
(Optional) Specifies the context of the inventory. Valid contexts include: config, physical, monitor, and all. If unspecified, the default value is all. |
-f |
Specifies a fully qualified domain name (FQDN). |
-F |
Specifies a feature name. |
-S |
(Optional) Specifies whether to use SSL (https) for NBAPI access. The default is no SSL. |
-n |
Specifies a note string. Enclose the string in double quotes. |
-u |
Specifies a user ID for inventory operation. |
-H |
(Optional) Specifies a hostname to connect to. If unspecified, the system obtains the default value from the MWTM server System.properties file, SERVER_NAME property. |
-p |
(Optional) Specifies a port to which to connect. If unspecified, the system obtains the default value from the MWTM server System.properties file, WEB_PORT property. |
-h |
(Optional) Prints help information. |
Note
You must log in as the root user or superuser to use this command.
mwtm provisiontool
Server Only
Syntax
mwtm provisiontool -a actionName [parameters]
Command Description
Invokes provisioning API operations.
You can specify these action names (and any corresponding required parameters) by using the -a option:
|
|
|
-a |
provision |
r -H -p -S -h |
syncFromDevice |
-f -H -p -S -h |
iosWriteToStartup |
You can use these parameters:
|
|
-r |
Specifies a file name for ProvisionRequest, which is an XML element from the MWTM WSDL definitions. |
-f |
Specifies a fully qualified domain name (FQDN). |
-H |
(Optional) Specifies a hostname to connect to. If unspecified, the system obtains the default value from the MWTM server System.properties file, SERVER_NAME property. |
-p |
(Optional) Specifies a port to which to connect. If unspecified, the system obtains the default value from the MWTM server System.properties file, WEB_PORT property. |
-S |
(Optional) Specifies whether to use SSL (https) for NBAPI access. The default is no SSL. |
-h |
(Optional) Print help information. |
Note
You must log in as the root user or superuser to use this command.