dpsctl import#
dpsctl import Usage Guide#
Overview#
dpsctl import includes commands for importing entities from external sources into DPS.
Entity import uses an asynchronous workflow:
Start import —
dpsctl import entityinitiates entity generation from the specified source (BCM or Nautobot). The server runs generation in the background and returns a request ID immediately.Check status —
dpsctl import entity-statuspolls the server with the request ID, waits for completion, and then streams the generated entities.Cancel or delete —
dpsctl import entity-cancelcancels a request by ID, anddpsctl import entity-deleteremoves a request and its stored results.
Generation runs with a server default timeout of 10 minutes (maximum 30 minutes). Request state is cleaned up 30 minutes after the request is created.
Supported Sources#
Source |
|
Description |
|---|---|---|
Base Command Manager (BCM) |
|
Generate entities from BCM cluster inventory |
Nautobot |
|
Generate entities from Nautobot DCIM inventory via the Topology Management gRPC service |
Usage#
dpsctl import [command [command options]]
Commands#
entity- Start entity generation from an external sourceentity-status- Get status and results for an entity import requestentity-cancel- Cancel an entity import requestentity-delete- Delete an entity import request and stored resultshelp,h- Shows a list of commands or help for one command
Flags#
Includes global dpsctl options.
Flag |
Source |
Description |
|---|---|---|
|
both |
Entity source: |
|
BCM |
Authentication username (required when |
|
BCM |
Authentication password (required when |
|
BCM |
Skip TLS certificate verification |
|
Nautobot |
Comma-separated locations (UUIDs or names) to filter by |
|
Nautobot |
Comma-separated racks (UUIDs or names) to filter by |
|
Nautobot |
Comma-separated device types (UUIDs or names) to filter by |
|
Nautobot |
Optional free-form URL param string; defined fields ( |
|
both |
Show help |
When --source=nautobot, BCM flags (--username, --password, --tls-insecure-skip-verify) are ignored. When --source=bcm, Nautobot filter flags are ignored.
Examples#
Generate Entities from BCM#
$ dpsctl import entity \
--source bcm \
--username admin \
--password secretpassword
{
"request_id": "abc123-def456-ghi789"
}
The command returns a request_id that you use to retrieve the generated entities.
Retrieve Entities Using Request ID#
After starting entity generation, use the request ID with import entity-status:
$ dpsctl import entity-status --request-id abc123-def456-ghi789
Refer to dpsctl import entity-status for full details.
Generate Entities with TLS Skip Verify#
$ dpsctl import entity \
--source bcm \
--username admin \
--password secretpassword \
--tls-insecure-skip-verify
Generate Entities from Nautobot with Filters#
$ dpsctl import entity \
--source nautobot \
--locations "dc1,dc2" \
--racks "rack-a" \
--device-types "server-type-1" \
--request-string "status=active"
{
"request_id": "abc123-def456-ghi789"
}
Nautobot connects to the Topology Management gRPC service (configured via dpsctl login/connection).
Notes#
The
--sourceflag is required. Supported values arebcmandnautobot.BCM:
--usernameand--passwordare required. BCM credentials must have sufficient privileges to read cluster inventory.Nautobot: Uses the Topology Management gRPC service. No BCM credentials are needed. Filters (
--locations,--racks,--device-types,--request-string) scope the import to a subset of Nautobot DCIM inventory.Entity generation runs asynchronously on the server. The command returns immediately with a request ID.
Use
dpsctl import entity-statuswith the returned request ID to poll for and retrieve the generated entities.Use
dpsctl import entity-cancelto cancel an in-flight request, ordpsctl import entity-deleteto delete stored request state and generated results.