-
Notifications
You must be signed in to change notification settings - Fork 19
CLI Docs
Dariusz Jarosz edited this page Jun 14, 2022
·
2 revisions
This CLI allows a user to search for an item in CDB.
$ cdbSearch [searchString]
- When search string is not provided you will be prompted for it.
- The search string can include wildcards such as "*" and "?".
- The search string can be enclosed in quotes for multiple space seperated search criteria.
The user is prompted for search string (when not provided) and then can specify which domain to search. Once the search results are displayed the user can pull up cdbInfo for the items in the results.
NOTE: Interactive mode works nicely with --pager
switch to keep the console clean.
$ cdbSearch --interactive [--pager]
? Search String: CDB test
? Select search domain: Catalog
? Continue: Select for details
? Select Item: 2103- 001 - CDB Test Component
-
--interactive
- Allows user to interactively select domain and select item for details.
--search-domain
is ignored with this option.
- Allows user to interactively select domain and select item for details.
-
--search-domain
- Use can specify which item domain should be searched.
- The following options can be provided: All (Default),Catalog, Cable Catalog, Inventory, Cable Inventory, Machine Design, Cable Design, Location
-
--format
- Option will change if the print is displayed in
rich
cli format orjson
cli format.
- Option will change if the print is displayed in
-
--pager
- Option will print out results in a paginated form similar to command
less
.
- Option will print out results in a paginated form similar to command
-
--help
- Option will list all options and arguments.
This CLI allows a user to pull up information about an item in CDB.
The --qr
or --id-
input parameter is required and used to speficy the id or qrid of item to fetch info about.
$ cdbInfo --qr=123
$ cdbInfo --id=123
-
--id
- Required if qr is not provided.
- ID of item to fetch information.
-
--qr
- Required if id is not provided.
- QRID of item to fetch intormation.
-
--all
- Display more information about an item such as:
- Properties
- Logs
- Domain specific information suchs as inventory, machine install counts, inventory located in a locatation, etc.
- Display more information about an item such as:
-
--log-limit
- To be used with
--all
switch. The logs are limited to5
(default) but the user can increase this limit or specify-1
for infinite log list.
- To be used with
-
--inventory-mode
- To be used with catalog item with
--all
switch.full
can be specified for all inventory orspare
(default) can be specified to only show spare inventory items.
- To be used with catalog item with
-
--format
- Option will change if the print is displayed in
rich
cli format orjson
cli format.
- Option will change if the print is displayed in
-
--pager
- Option will print out results in a paginated form similar to command
less
.
- Option will print out results in a paginated form similar to command
-
--help
- Option will list all options and arguments.
Broad cdbCli tool that encapsulates all of the CLI functionality under one command.
$ cdb-cli --help
$ cdb-cli cdb-search # Equivalent to cdbSearch described above.
$ cdb-cli cdb-info # Equivalent to cdbInfo desribed above
$ cdb-cli --help # This will list all commands.
$ cdb-cli [command-name] --help
-
--help
- Option will list all cli tools