Open askfongjojo opened 1 year ago
Ugh. That's very annoying. I'll get to work on it.
I ran into similar behavior with oxide image create
. I assume it's the same cause:
dap@ivanova ~ $ echo '{"source": { "type": "url", "url": "http://catacomb.eng.oxide.computer/media/cloud/debian-11-genericcloud-amd64.raw", "block_size": 512 } }' | oxide image create --name my-image --description my-description --os debian --version 11 --json-body /dev/stdin
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Error("missing field `description`", line: 1, column: 139)', cli/src/generated_cli.rs:5801:84
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(17), ...)', cli/src/main.rs:59:10
dap@ivanova ~ $ echo '{"description": "dummy", "source": { "type": "url", "url": "http://catacomb.eng.oxide.computer/media/cloud/debian-11-genericcloud-amd64.raw", "block_size": 512 } }' | oxide image create --name my-image --description my-description --os debian --version 11 --json-body /dev/stdin
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Error("missing field `name`", line: 1, column: 163)', cli/src/generated_cli.rs:5801:84
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(17), ...)', cli/src/main.rs:59:10
With #162, when attempting to pass the full request body, including idp metadata, via
--json-body
, it complains that--metadata-url|--metadata-value
is missing.If I exclude the idp metadata block within the json file, i.e. removing
and try
oxide silo idp saml create --silo test --json-body idp.json --metadata-value $IDP_METADATA
, it also doesn't like it:To use json-body (which is required when specifying a signing key pair), the only way to make it work is to include in the json the idp metadata (
type
populated,data
as an empty string) AND supply the actual base64-encoded xml or url via--metadata-value|--metadata-url
in the command line.