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>]
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:
Packages are not queried for the CMM and I/O module targets. |
--scope | Optional | scope specifies the update scope. Valid choices are:
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:
|
--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
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