query command

Use the query command to build a list of firmware and device driver updates installed in the command target by examining the contents of the update package XML files. The XML file that the query command generates can then be used by the compare command.

query command syntax

Onecli.exe update query --mt <machine_type> --ostype <operating_system> --osarch <architecture>
[--scope <scope>] [--type <type>] [--includeid <includeids>] [--forceid <forceids>] 
[--dir <folder>] [--output <folder>]
Table 1. query command parameters
Parameter Required/Optional Notes
--mt Required

machine_type specifies the four-digit machine type of target device (IMM or CMM).

For the I/O module target, the CMM machine type is specified.

--ostype Required

operating_system specifies operating system where you are running the ToolsCenter Suite CLI. Valid choices are win2008, win2012, win2012r2, win2016, rhel5, rhel6, rhel7, sles10, sles11, sles12, esxi5.0, esxi5.1, esxi5.5, esxi6.0, and none.

None is the default setting and is used for operating system independent operations, such as xFW Out -Of-Band (OOB) updates.

The --ostype parameter is not required for CMM or I/O module targets.

--osarch Required

architecture specifies operating system architecture where you are running the ToolsCenter Suite CLI. Valid choices are x86, x64, and none.

None is the default setting and is used for operating system independent operations, such as xFW OOB updates.

The --osarch parameter is not required for CMM or I/O module targets.

--type Optional

type specifies the type of package to query. Valid choices are:

  • fw|dd (default) to query firmware and device drivers

  • fw to query firmware

  • dd to query device drivers

Packages are not queried for the CMM and I/O module targets.

--scope Optional

scope specifies the update scope. Valid choices are:

  • uxsp (default) to query packages with UXSP.

  • latest to query the latest package updates.

  • individual to query packages specified by the --includeid or --forceid parameter.

The --scope parameter is not used when querying the CMM or I/O module targets.

--includeid Optional

The ids can be a comma-separated list that specifies the package IDs which are usually the package file name without file extension for queries.

For example: lnvgy_dd_sraidmr_7.700.20.00_sles12_x86-64

By default: none is included.

If the --includeid parameter is not specified, only the packages specified by the --scope parameter are queried.

If the --includeid parameter is specified, only the listed packages are queried in addition to those specified by the --scope parameter: if no packages are listed, no additional packages are queried.

--forceid Optional

The ids can be a comma-separated list that specifies the package IDs which are usually the package file name without file extension for queries. You can also specify an argument of all to force queries that can downgrade all listed packages.

For example: lnvgy_dd_sraidmr_7.700.20.00_sles12_x86-64

By default: none is included.

The --forceid parameter to force firmware or device driver queries to support package downgrade. It works in the following cases:
  • Query for downgrade packages.

  • Forces query of packages not listed in the scan.xml file.

  • Ignores the “never” tag in the package XML file. For example, when querying HBA updates for QLogic.

  • Ignores missing prerequisites, listing packages to install in all cases.

--dir Optional

folder specifies the path name location of the firmware package query directory.

If no directory is specified, the current directory is used for queries.

--output Optional

folder specifies the path name location and file name for the query result XML file.

By default, the log file output is saved to the ../Onecli-%PID%-%date%-%time%/ directory with a file name of Onecli-update-query.xml. Existing files are overwritten. Make sure that unique file names are specified, if multiple CLI commands are being run at the same time.

Example of the query command

In this example, we are building a list of firmware installed (update query command) in a machine type 8721 CMM (--mt 8721 argument), where the XML file listing installed firmware is in the “.\ 872102cn03e\” directory (--dir .\ 872102cn03e\ argument) and storing the query result XML file in the “.\872102cn03e\output\” directory (--output .\872102cn03e\output\ argument).
Onecli.exe update query --mt 8721 --ostype none --osarch none --scope latest --dir .\ 872102cn03e\ --output .\872102cn03e\output\

Lenovo ToolsCenterSuite CLI tcliXXX-X.X.X
Based on module version X.X.X
Licensed Materials - Property of Lenovo
(C) Copyright Lenovo Corp. 2013-2016 All Rights Reserved
Invoking SHOW command ...
Connected to IMM by IP address 10.240.252.102
Read the all the packages in folder .\872102cn03e\
Start to parse the packages
Finish the package parsing
Save the query result to .\872102cn03e \output\Onecli-update-query.xml successfully