-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3/3 sled-agent] convert bootstrap agent API into a trait #6124
[3/3 sled-agent] convert bootstrap agent API into a trait #6124
Conversation
Created using spr 1.3.6-beta.1 [skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1 [skip ci]
bootstrap-agent-api/src/lib.rs
Outdated
rqctx: RequestContext<Self::Context>, | ||
) -> Result<HttpResponseOk<Baseboard>, HttpError>; | ||
|
||
/// Provide a list of components known to the bootstrap agent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed these to be "Provide" instead of "Provides" etc, because that's the general style we use within Omicron. (I personally prefer "Provides" in my own projects, but I think consistency is more important.)
"title": "Oxide Bootstrap Agent API", | ||
"description": "API for interacting with individual sleds", | ||
"title": "Bootstrap Agent API", | ||
"description": "Per-sled API for setup and teardown", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also changed this.
bootstrap-agent-api/Cargo.toml
Outdated
@@ -0,0 +1,19 @@ | |||
[package] | |||
name = "bootstrap-agent-api" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this live under sled-agent, just like nexus-internal-api lives under nexus? I think the actual sled-agent API would live under sled-agent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda think that makes sense, though I acknowledge "clearly either way could work".
Just having the directory within sled-agent
makes it more clear to me, IMO, that the bootstrap agent is software running within the sled agent process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
bootstrap-agent-api/Cargo.toml
Outdated
@@ -0,0 +1,19 @@ | |||
[package] | |||
name = "bootstrap-agent-api" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda think that makes sense, though I acknowledge "clearly either way could work".
Just having the directory within sled-agent
makes it more clear to me, IMO, that the bootstrap agent is software running within the sled agent process.
Created using spr 1.3.6-beta.1
Make a new bootstrap-agent-api crate which has the bootstrap agent trait in it,
and implement it within the sled agent.
Changed some of the comments slightly to align their style generally with
omicron ("Resets" -> "Reset").