Skip to content

docs: Document site setup API parity#3462

Open
kfelternv wants to merge 4 commits into
NVIDIA:mainfrom
kfelternv:docs-v21-site-setup-parity
Open

docs: Document site setup API parity#3462
kfelternv wants to merge 4 commits into
NVIDIA:mainfrom
kfelternv:docs-v21-site-setup-parity

Conversation

@kfelternv

@kfelternv kfelternv commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Resolves #2808

What this PR does

Documents the current v2.1 site-setup API parity and the preferred nicocli workflow for site-wide BMC credentials, host and DPU UEFI credentials, and Expected Machine registration and maintenance. It also links the remaining admin-only gaps and corrects the machine power-control examples so options precede the machine ID.

How we verified it

Final revision: 6394d26900e1cf92fd4558a3f1d793389de3ac88\n\nHands-on runtime revision: 4439eca6ea20812cf499db4e94b35dc021adc1cf

Environment: the integrated kind-kind stack on kfelter-nico-dev.nvidia.com. The CLI was built from the hands-on runtime revision above; the final follow-up changes only documentation and leaves the CLI and REST source unchanged. The REST API was exercised with localhost:5000/nico-rest-api:pr3462-b64b67de (manifest sha256:8b1fd0e0e89b54f0aee8bd405bcd44a1cade1e491f3c6654c881949262c80477); the REST subtree is unchanged by the final documentation-only commit. The original REST image was restored after the run.

Hands-on results:

  • GracefulRestart returned HTTP 202 for an unassigned simulated machine, and the machine returned to Ready.
  • Site-wide BMC, host UEFI, and DPU UEFI credential creates returned redacted responses; direct local Vault checks observed each write. The original local Vault values were restored afterward.
  • A single Expected Machine was created, two entries were batch-created, both batch entries were updated, and all three appeared in the list.
  • The temporary Expected Machine entries were deleted; the table count was 10 before and 10 after the run.

Supporting checks:

  • npx -y fern-api@4.81.0 check: 0 errors, 1 warning.
  • go test ./cli/pkg -run '^(TestBuildCommands_EmbeddedSpec|TestOperationAction|TestDetectMisorderedFlags)$' -count=1: PASS.
  • The corrected individual Expected Machine commands passed CLI validation and reached the HTTP request; the old flags-after-ID form was rejected before HTTP.\n- git diff --check: PASS.

How to reproduce the verification

Prerequisites: Docker, Go, jq, SSH access to the local NICo development VM, its kind-kind stack, a Provider Admin bearer token, and a disposable or backed-up local Vault state.

  1. Start from a clean checkout and build the CLI:
git checkout 6394d26900e1cf92fd4558a3f1d793389de3ac88
go build -o /tmp/nicocli ./cli/cmd/nicocli
  1. Build the matching REST image on the development VM, load it into kind, and roll out only the API:
git archive --format=tar HEAD:rest-api |
  ssh kfelter@kfelter-nico-dev.nvidia.com \
    'docker build -t localhost:5000/nico-rest-api:pr3462-b64b67de -f docker/local/Dockerfile.nico-rest-api -'

ssh kfelter@kfelter-nico-dev.nvidia.com '/bin/bash -lc '"'"'
  export KUBECONFIG=$HOME/.kube/config
  /home/kfelter/bin/kind load docker-image localhost:5000/nico-rest-api:pr3462-b64b67de --name kind
  /home/kfelter/bin/kubectl --context kind-kind -n nico-rest set image \
    deployment/nico-rest-api nico-rest-api=localhost:5000/nico-rest-api:pr3462-b64b67de
  /home/kfelter/bin/kubectl --context kind-kind -n nico-rest rollout status deployment/nico-rest-api
'"'"
  1. Forward Keycloak and REST on the VM, then tunnel both ports locally:
ssh kfelter@kfelter-nico-dev.nvidia.com \
  '/home/kfelter/bin/kubectl --context kind-kind -n nico-rest port-forward service/keycloak 18082:8082'
ssh kfelter@kfelter-nico-dev.nvidia.com \
  '/home/kfelter/bin/kubectl --context kind-kind -n nico-rest port-forward service/nico-rest-api 18388:8388'
ssh -N \
  -L 19082:127.0.0.1:18082 \
  -L 19388:127.0.0.1:18388 \
  kfelter@kfelter-nico-dev.nvidia.com

Run those three long-lived commands in separate terminals.

  1. Point the CLI at the forwarded API:
export NICO_BASE_URL=http://127.0.0.1:19388
export NICO_ORG=test-org
export NICO_API_NAME=nico
export NICO_TOKEN=<provider-admin-bearer-token>

SITE_ID=$(/tmp/nicocli site list --output json | jq -r '.[0].id')
MACHINE_ID=$(/tmp/nicocli machine list --output json |
  jq -r '[.[] | select(.status == "Ready" and .instanceId == null)][0].id')
  1. On a disposable local stack, back up the three local Vault values, then exercise the documented credential commands with temporary passwords:
/tmp/nicocli bmc-credential create \
  --site-id "$SITE_ID" --kind SiteWideRoot --password '<temporary-password>' --output json
/tmp/nicocli uefi-credential create \
  --site-id "$SITE_ID" --kind Host --password '<temporary-password>' --output json
/tmp/nicocli uefi-credential create \
  --site-id "$SITE_ID" --kind DPU --password '<temporary-password>' --output json

Expect each response to identify the site and credential kind without returning the password. Verify the corresponding local Vault values changed, then restore the backups.

  1. Create one Expected Machine, batch-create two more from the documented JSON shape, batch-update those two, list all entries, and delete the three temporary entries:
/tmp/nicocli expected-machine create \
  --site-id "$SITE_ID" \
  --bmc-mac-address 02:00:00:AA:34:62 \
  --chassis-serial-number PR3462-SINGLE \
  --default-bmc-username root \
  --default-bmc-password '<temporary-password>' \
  --output json

/tmp/nicocli expected-machine batch-create --data-file expected-machines.json --output json
/tmp/nicocli expected-machine batch-update --data-file expected-machine-updates.json --output json
/tmp/nicocli expected-machine list --all --output json
/tmp/nicocli expected-machine delete <expected-machine-id>

Expect the create and update responses to contain the new entries, the list to contain all temporary entries, and the table count after deletion to equal its starting count.

  1. Exercise the corrected power-control command:
/tmp/nicocli machine power-control-machine machine-power-control-machine \
  --action GracefulRestart \
  "$MACHINE_ID"
/tmp/nicocli machine get --output json "$MACHINE_ID"

Expect HTTP 202 from the power action and the machine to return to Ready. Restore the original REST image and stop the port forwards after the run.

Signed-off-by: Kyle Felter <kfelter@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The documentation updates add a site-setup API parity page, expose it in navigation, and replace supported nico-admin-cli provisioning and reboot instructions with nicocli workflows. Remaining parity gaps are documented for tracking.

Changes

Site Setup REST Documentation Parity

Layer / File(s) Summary
Document parity coverage and navigation
docs/provisioning/site-setup-api-parity.md, docs/index.yml
Adds a parity tracking page and links it under the Day 0 Provisioning section.
Update provisioning operator workflows
docs/provisioning/ingesting-hosts.md
Replaces supported credential, expected-machine, inspection, and management examples with nicocli commands.
Update machine reboot workflow
docs/playbooks/machine_reboot.md
Replaces the legacy reboot flow with nicocli power control and post-request lifecycle verification.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR documents the required site-setup command parity, remaining gaps, and updates the referenced playbooks.
Out of Scope Changes check ✅ Passed All changed files are documentation updates aligned with the linked parity and playbook objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title is concise and accurately summarizes the main change: documenting site setup API parity.
Description check ✅ Passed The description is directly related to the documentation updates, workflow guidance, and remaining parity gaps.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Kyle Felter <kfelter@nvidia.com>
@kfelternv kfelternv marked this pull request as ready for review July 14, 2026 05:37
@github-actions

Copy link
Copy Markdown

🔍 Container Scan Summary

No Grype artifacts were found to aggregate.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/provisioning/ingesting-hosts.md (1)

116-144: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use “Add/Store” here, not “Update.” These commands call nicocli ... create, and duplicate credential creation is rejected, so reruns are not safe retries. The UEFI section should also mention both the Host and DPU commands explicitly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/provisioning/ingesting-hosts.md` around lines 116 - 144, Update the
credential headings and descriptions to use “Add” or “Store” rather than
“Update,” reflecting that the nicocli bmc-credential and uefi-credential create
commands reject duplicates and are not safe to rerun. In the UEFI section,
explicitly identify both Host and DPU commands and retain their distinct --kind
values.

Source: Path instructions

🧹 Nitpick comments (1)
docs/playbooks/machine_reboot.md (1)

24-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add the executable ForceRestart variant.

The prose documents forced restart as a supported fallback, but the playbook provides only the graceful command. Include the exact forced command, or explicitly state that operators should replace GracefulRestart with ForceRestart.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/playbooks/machine_reboot.md` around lines 24 - 30, Add the executable
ForceRestart invocation alongside the existing GracefulRestart command in the
machine reboot playbook, or explicitly document replacing the action value with
ForceRestart. Preserve the existing guidance that ForceRestart is only for cases
where graceful restart is unavailable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/playbooks/machine_reboot.md`:
- Around line 27-29: Remove the duplicated machine-power-control-machine token
from the nicocli command in the reboot playbook, leaving the command as nicocli
machine power-control-machine followed by --action GracefulRestart and
<machine-id>, consistently in both snippets.
- Line 41: Update the reboot verification instructions to poll `nicocli machine
get <machine-id>` repeatedly after the HTTP 202 response, using a bounded
timeout. Document the expected successful terminal lifecycle state and the
terminal failure states, including explicit success and failure outcomes when
the timeout expires or a failure state is observed.
- Line 20: Update the authorization prerequisites in the nicocli configuration
step to document that the caller must have the PROVIDER_ADMIN role, own or be
authorized for the relevant Infrastructure Provider, and own or have access to
the target Site. Preserve the existing REST API configuration guidance.

In `@docs/provisioning/ingesting-hosts.md`:
- Around line 270-285: Replace the ellipsis placeholders in the individual
expected-machine command examples with complete, runnable syntax by including
the required flags and values for update and create. For batch-update, either
show the exact required --filename form and input structure or link to the
authoritative command contract and JSON schema, while preserving the existing
delete and batch-create examples.

In `@docs/provisioning/site-setup-api-parity.md`:
- Around line 12-15: Update the measured-boot and Site Explorer CLI examples in
the site setup API parity table to include the required nico-admin-cli
connection context, matching the flags documented in ingesting-hosts.md, or
explicitly state that those values are preconfigured. Ensure every referenced
command remains directly runnable with the documented API URL and CA, client
certificate, and client key configuration.
- Around line 7-11: Remove real password values from operator-facing CLI
examples in docs/provisioning/site-setup-api-parity.md lines 7-11 and
docs/provisioning/ingesting-hosts.md lines 121-158. Update the
credential-related commands, including bmc-credential, uefi-credential, and
expected-machine examples, to use a supported prompt, stdin, or secret-file
mechanism; if none exists, use an approved ephemeral invocation pattern and do
not document --password arguments.

---

Outside diff comments:
In `@docs/provisioning/ingesting-hosts.md`:
- Around line 116-144: Update the credential headings and descriptions to use
“Add” or “Store” rather than “Update,” reflecting that the nicocli
bmc-credential and uefi-credential create commands reject duplicates and are not
safe to rerun. In the UEFI section, explicitly identify both Host and DPU
commands and retain their distinct --kind values.

---

Nitpick comments:
In `@docs/playbooks/machine_reboot.md`:
- Around line 24-30: Add the executable ForceRestart invocation alongside the
existing GracefulRestart command in the machine reboot playbook, or explicitly
document replacing the action value with ForceRestart. Preserve the existing
guidance that ForceRestart is only for cases where graceful restart is
unavailable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a7d42570-d945-4545-aa38-55aa79a432b6

📥 Commits

Reviewing files that changed from the base of the PR and between 69cd51c and 4439eca.

📒 Files selected for processing (4)
  • docs/index.yml
  • docs/playbooks/machine_reboot.md
  • docs/provisioning/ingesting-hosts.md
  • docs/provisioning/site-setup-api-parity.md

Comment thread docs/playbooks/machine_reboot.md Outdated
Comment on lines +27 to +29
nicocli machine power-control-machine machine-power-control-machine \
--action GracefulRestart \
<machine-id>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant documentation section with line numbers.
sed -n '1,120p' docs/playbooks/machine_reboot.md | cat -n

# Look for other nicocli machine examples and usage patterns in the repo.
rg -n "nicocli machine|power-control-machine|GracefulRestart|GracefulShutdown|machine power-control-machine" docs . -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**'

Repository: NVIDIA/infra-controller

Length of output: 50383


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the CLI command definition and usage text for power-control-machine.
rg -n -C 4 "power-control-machine|machine-power-control-machine|GracefulRestart|AcknowledgeAttachedInstance|acknowledge-attached-instance" \
  rest-api/cli crates/admin-cli rest-api/openapi/spec.yaml docs/playbooks/machine_reboot.md

# Inspect the command-related test or usage strings if present.
sed -n '520,620p' rest-api/cli/pkg/commands_test.go | cat -n

# Inspect the OpenAPI operation around the relevant endpoint.
python3 - <<'PY'
from pathlib import Path
p = Path('rest-api/openapi/spec.yaml')
text = p.read_text()
for needle in ['machine-power-control-machine', 'power-control-machine', 'acknowledge-attached-instance']:
    idx = text.find(needle)
    print(f'NEEDLE={needle} IDX={idx}')
    if idx != -1:
        start = max(0, idx-400)
        end = min(len(text), idx+1200)
        print(text[start:end])
        print('---')
PY

Repository: NVIDIA/infra-controller

Length of output: 16588


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the exact playbook region with line numbers.
sed -n '20,45p' docs/playbooks/machine_reboot.md | cat -n

# Inspect the CLI command registration and generated usage around the operation.
rg -n -C 3 "machine-power-control-machine|power-control-machine" rest-api/cli crates/admin-cli

# Show the relevant OpenAPI path/operation block compactly.
python3 - <<'PY'
from pathlib import Path
import re
text = Path('rest-api/openapi/spec.yaml').read_text()
m = re.search(r'(?ms)^ {2}machine-power-control-machine:\n(?:.*\n){0,80}', text)
print(m.group(0) if m else 'NOT FOUND')
PY

Repository: NVIDIA/infra-controller

Length of output: 1165


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find the command-tree builder and the generated usage/command mapping for the machine power-control operation.
rg -n -C 4 "machine-power-control-machine|power-control-machine|acknowledgeAttachedInstance|acknowledge-attached-instance|UsageText|command options" rest-api/cli crates/admin-cli rest-api/openapi/spec.yaml

# Inspect the CLI command tests around usage generation for machine commands.
sed -n '1,220p' rest-api/cli/pkg/commands_test.go | cat -n

# Inspect the OpenAPI operation block and parameters around the machine power-control endpoint.
python3 - <<'PY'
from pathlib import Path
import re
text = Path('rest-api/openapi/spec.yaml').read_text()
for pat in [
    r"(?ms)^  /v2/org/\{org\}/nico/machine/\{machineId\}/power-control:\n(?:.*\n){0,120}",
    r"(?ms)^      operationId: machine-power-control-machine\n(?:.*\n){0,40}",
]:
    m = re.search(pat, text)
    print("MATCH" if m else "NO MATCH", pat)
    if m:
        print(m.group(0))
        print("----")
PY

Repository: NVIDIA/infra-controller

Length of output: 50379


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the exact OpenAPI path for the machine power-control endpoint.
python3 - <<'PY'
from pathlib import Path
import re
text = Path('rest-api/openapi/spec.yaml').read_text()
m = re.search(r'(?ms)^  /v2/org/\{org\}/nico/machine/\{machineId\}/power-control:\n(?:.*\n){0,180}', text)
print(m.group(0) if m else 'NOT FOUND')
PY

# Find the CLI machine command registration/usage strings if present in source.
rg -n -C 4 "power-control-machine|machine-id|machineId|acknowledgeAttachedInstance|acknowledge-attached-instance|command options" \
  rest-api/cli crates/admin-cli docs/playbooks/machine_reboot.md

Repository: NVIDIA/infra-controller

Length of output: 26807


Remove the repeated machine-power-control-machine token. Both snippets should read nicocli machine power-control-machine --action GracefulRestart <machine-id>.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/playbooks/machine_reboot.md` around lines 27 - 29, Remove the duplicated
machine-power-control-machine token from the nicocli command in the reboot
playbook, leaving the command as nicocli machine power-control-machine followed
by --action GracefulRestart and <machine-id>, consistently in both snippets.

<machine-id>
```

A successful request returns HTTP 202. Retrieve the Machine afterward with `nicocli machine get <machine-id>` and confirm that it returns to the expected lifecycle state.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the target document around the cited line
wc -l docs/playbooks/machine_reboot.md
sed -n '1,120p' docs/playbooks/machine_reboot.md

# Locate the referenced API/docs mention in the repository, if any
rg -n "power-control|HTTP 202|machine get|poll|polling|lifecycle state" docs -S

Repository: NVIDIA/infra-controller

Length of output: 19463


🏁 Script executed:

#!/bin/bash
set -euo pipefail

wc -l docs/playbooks/machine_reboot.md
sed -n '1,120p' docs/playbooks/machine_reboot.md

rg -n "power-control|HTTP 202|machine get|poll|polling|lifecycle state" docs -S

Repository: NVIDIA/infra-controller

Length of output: 19463


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find any API reference or runbook text for the machine power-control endpoint
rg -n "power-control-machine|GracefulRestart|ForceRestart|HTTP 202|accepted" docs -S

# Read the nearby sections in the machine reboot playbook and any lifecycle guidance
sed -n '1,120p' docs/playbooks/machine_reboot.md
sed -n '1,220p' docs/overview/lifecycle.md
sed -n '1,220p' docs/architecture/state_handling.md

Repository: NVIDIA/infra-controller

Length of output: 20670


🌐 Web query:

docs.nvidia.com infra-controller machine power-control-machine HTTP 202 accepted lifecycle state poll

💡 Result:

In the NVIDIA Infra Controller (NICo) architecture, power control operations—such as those managed via the machine power control endpoints—are typically handled asynchronously, returning an HTTP 202 Accepted status [1]. This status indicates that the request has been received and queued for processing, but the operation has not yet completed [2]. Because the state handling is asynchronous and designed for reliability, resources undergo lifecycle state transitions that may take time or require periodic retries by the controller [2]. NICo utilizes a state controller mechanism where handler functions are scheduled for execution periodically (typically every 30 seconds) to ensure resources reach their desired state, even in the event of intermittent failures [2]. To track the progress of these power control operations or determine the current state of a machine, users should: 1. Lifecycle State Polling: Instead of expecting an immediate result from the power control request, the system relies on the resource's lifecycle state machine [2][3][4]. Users can poll the specific machine's status via the REST API to observe transitions as the controller processes the request [5][6]. 2. Observability Metrics: NICo provides Prometheus metrics that expose detailed lifecycle timestamps, current states, and expected next transitions [7]. These metrics can be used to monitor whether a machine is stuck in a state or has successfully completed a transition (e.g., from a power-off state to an operational state) [7]. 3. Task/Status Tracking: For certain operations, the API provides task-based tracking or status history, allowing users to verify the completion of requested actions [5][6]. In summary, an HTTP 202 response signifies that the intent to change the machine's power state has been successfully enqueued [2]. Subsequent verification of the operation's success should be performed by monitoring the resource's lifecycle state or associated status metrics through the NICo REST API [5][6][7].

Citations:


Poll until the reboot reaches a terminal state. HTTP 202 only means the request was accepted; a single nicocli machine get can still observe the pre-restart lifecycle state. Document a bounded poll loop with a timeout and explicit success/failure terminal states.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/playbooks/machine_reboot.md` at line 41, Update the reboot verification
instructions to poll `nicocli machine get <machine-id>` repeatedly after the
HTTP 202 response, using a bounded timeout. Document the expected successful
terminal lifecycle state and the terminal failure states, including explicit
success and failure outcomes when the timeout expires or a failure state is
observed.

Comment thread docs/provisioning/ingesting-hosts.md
Comment on lines +7 to +11
| Store the site-wide BMC root credential | Covered | `nicocli bmc-credential create --site-id <site-uuid> --kind SiteWideRoot --password <password>` |
| Store the site-default host UEFI credential | Covered | `nicocli uefi-credential create --site-id <site-uuid> --kind Host --password <password>` |
| Store the site-default DPU UEFI credential | Covered | `nicocli uefi-credential create --site-id <site-uuid> --kind DPU --password <password>` |
| Register an Expected Machine | Covered | `nicocli expected-machine create --site-id <site-uuid> --bmc-mac-address <mac> --chassis-serial-number <serial> --default-bmc-username <user> --default-bmc-password <password>` |
| Register Expected Machines in a batch | Covered | `nicocli expected-machine batch-create --data-file expected-machines.json` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

rg -n --hidden --glob '!**/.git/**' -S "bmc-credential create|uefi-credential create|expected-machine create|--password|password.*stdin|prompt|secret-file|read-password|password-file|nicocli" docs .

Repository: NVIDIA/infra-controller

Length of output: 50380


🏁 Script executed:

sed -n '1,40p' docs/provisioning/site-setup-api-parity.md
printf '\n---\n'
sed -n '110,170p' docs/provisioning/ingesting-hosts.md
printf '\n---\n'
sed -n '180,210p' docs/manuals/nicocli-reference.md

Repository: NVIDIA/infra-controller

Length of output: 6460


🏁 Script executed:

sed -n '35,80p' docs/provisioning/ingesting-hosts-rest-api.md
printf '\n---\n'
sed -n '430,460p' docs/manuals/nicocli-reference.md
printf '\n---\n'
sed -n '1,80p' docs/manuals/nico-admin-cli/commands/credential/credential-add-bmc.md
printf '\n---\n'
sed -n '1,80p' docs/manuals/nico-admin-cli/commands/credential/credential-add-uefi.md

Repository: NVIDIA/infra-controller

Length of output: 6350


Stop documenting real secrets as command-line arguments.

These examples expose BMC and UEFI passwords in shell history and process listings. Use a supported prompt/stdin/secret-file path if the CLI has one; otherwise replace the examples with an approved ephemeral invocation pattern and avoid --password in operator-facing docs.

  • docs/provisioning/site-setup-api-parity.md#L7-L11
  • docs/provisioning/ingesting-hosts.md#L121-L158
📍 Affects 2 files
  • docs/provisioning/site-setup-api-parity.md#L7-L11 (this comment)
  • docs/provisioning/ingesting-hosts.md#L121-L158
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/provisioning/site-setup-api-parity.md` around lines 7 - 11, Remove real
password values from operator-facing CLI examples in
docs/provisioning/site-setup-api-parity.md lines 7-11 and
docs/provisioning/ingesting-hosts.md lines 121-158. Update the
credential-related commands, including bmc-credential, uefi-credential, and
expected-machine examples, to use a supported prompt, stdin, or secret-file
mechanism; if none exists, use an approved ephemeral invocation pattern and do
not document --password arguments.

Source: Path instructions

Comment on lines +12 to +15
| Approve, list, or remove measured-boot machine trust rules | Gap | Tracked by [#2801](https://github.com/NVIDIA/infra-controller/issues/2801). Use `nico-admin-cli attestation measured-boot site trusted-machine approve`, `list`, or `remove` until that issue is complete. |
| Approve, list, or remove measured-boot profile trust rules | Gap | Tracked by [#2801](https://github.com/NVIDIA/infra-controller/issues/2801). Use `nico-admin-cli attestation measured-boot site trusted-profile approve`, `list`, or `remove` until that issue is complete. |
| Clear a Site Explorer endpoint error | Gap | Tracked by [#2802](https://github.com/NVIDIA/infra-controller/issues/2802). Use `nico-admin-cli site-explorer clear-error <bmc-ip>` until that issue is complete. |
| Queue a Site Explorer endpoint for re-exploration | Gap | Tracked by [#2802](https://github.com/NVIDIA/infra-controller/issues/2802). Use `nico-admin-cli site-explorer re-explore <bmc-ip>` until that issue is complete. Bulk selection and execution also remain part of this gap. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== site-setup-api-parity.md ==\n'
nl -ba docs/provisioning/site-setup-api-parity.md | sed -n '1,80p'

printf '\n== ingesting-hosts.md (around lines 100-120) ==\n'
nl -ba docs/provisioning/ingesting-hosts.md | sed -n '100,120p'

printf '\n== ingesting-hosts.md (around lines 238-255) ==\n'
nl -ba docs/provisioning/ingesting-hosts.md | sed -n '238,255p'

Repository: NVIDIA/infra-controller

Length of output: 233


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== site-setup-api-parity.md (1-80) ==\n'
sed -n '1,80p' docs/provisioning/site-setup-api-parity.md | cat -n

printf '\n== ingesting-hosts.md (100-120) ==\n'
sed -n '100,120p' docs/provisioning/ingesting-hosts.md | cat -n

printf '\n== ingesting-hosts.md (238-255) ==\n'
sed -n '238,255p' docs/provisioning/ingesting-hosts.md | cat -n

Repository: NVIDIA/infra-controller

Length of output: 6169


Include the nico-admin-cli connection context here.
docs/provisioning/ingesting-hosts.md shows these commands require -a <api-url> plus the CA/client cert/key flags. Either add the full invocation to these gap examples or state that the values are already preconfigured; otherwise the documented workflow is not runnable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/provisioning/site-setup-api-parity.md` around lines 12 - 15, Update the
measured-boot and Site Explorer CLI examples in the site setup API parity table
to include the required nico-admin-cli connection context, matching the flags
documented in ingesting-hosts.md, or explicitly state that those values are
preconfigured. Ensure every referenced command remains directly runnable with
the documented API URL and CA, client certificate, and client key configuration.

Source: Path instructions

@github-actions

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4439eca6ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/provisioning/ingesting-hosts.md Outdated
Signed-off-by: Kyle Felter <kfelter@nvidia.com>
Signed-off-by: Kyle Felter <kfelter@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: document admin-cli site-setup commands and plan REST/nicocli parity

1 participant