Skip to content

Add --additionalParameterJSON to agents import and tools import - #64

Merged
esnible merged 1 commit into
mainfrom
additional-parameter-json
Aug 17, 2026
Merged

Add --additionalParameterJSON to agents import and tools import#64
esnible merged 1 commit into
mainfrom
additional-parameter-json

Conversation

@esnible

@esnible esnible commented Aug 17, 2026

Copy link
Copy Markdown
Member

Sends request fields the CLI has no flag for. Each value is a JSON dict or the name of a file containing one; the flag is repeatable and all the dicts are merged before the POST.

rossoctl agents import from-image --name orders --containerImage img \
    --additionalParameterJSON ./base.json \
    --additionalParameterJSON '{"serviceAccount":"orders-sa"}'
  • A value starting with { is the document itself, anything else is a filename, so a misspelled path reports a missing file rather than a JSON syntax error.
  • Merging is shallow and last-wins by top-level key, so a later value replaces a nested structure an earlier one set.
  • Keys naming a field the other flags populate override them, --storage-size and --ports included.

Applied in MarshalJSON on the encoded request, so client signatures are unchanged and a request without the flag encodes byte-identically to before.

Assisted by Claude.

Sends request fields the CLI has no flag for. Each value is a JSON dict or
the name of a file containing one; the flag is repeatable and all the dicts
are merged before the POST.

A value starting with '{' is the document itself, anything else is a
filename, so a misspelled path reports a missing file rather than a JSON
syntax error in text the user meant as a path. Merging is shallow and
last-wins by top-level key, which lets a later value replace a nested
structure an earlier one set. Keys naming a field the other flags populate
override them.

The overlay is applied in MarshalJSON, on the encoded request rather than
the struct: that is where the JSON names exist, it makes the omitempty
fields settable, and it catches --storage-size, which is assigned after the
request literal is built. Client signatures are unchanged. With no
additional parameters the encoding is byte-identical to before.

Assisted by Claude.

Signed-off-by: Ed Snible <snible@us.ibm.com>
@esnible
esnible merged commit 6c65be9 into main Aug 17, 2026
2 checks passed
@esnible
esnible deleted the additional-parameter-json branch August 17, 2026 15:38
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.

1 participant