-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Today, we put the switch ID (0 or 1) in the shell prompt by asking the local MGS via curl
. #8975 added a manual api-version
header to this curl invocation (as required now that the MGS API is versioned), but @davepacheco pointed out several issues with this and suggested an alternative:
Maybe the switch zone should ship a Rust binary using a Progenitor client that does this? This way:
- the program would automatically pick up new changes to the API
- things would break at build-time if the API were broken
ls-apis
would see this consumer
We do already have a gateway-cli
binary that presents a CLI for talking to MGS generally, but (a) it's been a long time since it got any changes and is missing many API calls, including this one and (b) it's not included in the switch zone. We could dust this off, fix it up, and start shipping it, or add a smaller binary just for this one use; I don't have a strong feeling which would be nicer.