pub async fn exec(
infra: &InfraContext<'_>,
token: &str,
image_id: &str,
) -> Result<String, Error>Expand description
Launch an ephemeral IMS customize container against image_id and
return its SSH hostname.
The caller’s preferred username is read from the JWT and used to
look up their registered SSH public key in IMS. If no key is
registered, returns NotFound with a message pointing the user
at platform admins. The hostname is plucked from the IMS response
at /ssh_containers/0/connection_info/customer_access/host; a
missing field is reported as MissingField rather than a generic
error so operators can tell schema drift from real failures.
§Errors
- [
Error::JwtMalformed] (viawire_conv::to_backend) when the JWT carries nopreferred_username. - [
Error::BadRequest] if the Shasta HTTP client cannot be built or the IMS customize job submission fails. - [
Error::NotFound] when the caller has no SSH public key registered in IMS. - [
Error::MissingField] when the IMS response is missing the server-generated key id or the SSH container host field.