Skip to content

Commit

Permalink
normalize function names
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcolombo committed Apr 12, 2023
1 parent 7672fcf commit 09a68fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions nexus/src/app/instance.rs
Expand Up @@ -629,8 +629,8 @@ impl super::Nexus {

let sa = self.instance_sled(&db_instance).await?;

let instance_put_result = sa
.instance_put(
let instance_register_result = sa
.instance_register(
&db_instance.id(),
&sled_agent_client::types::InstanceEnsureBody {
initial: instance_hardware,
Expand All @@ -639,7 +639,7 @@ impl super::Nexus {
.await
.map(|res| Some(res.into_inner()));

self.handle_instance_put_result(db_instance, instance_put_result)
self.handle_instance_put_result(db_instance, instance_register_result)
.await
.map(|_| ())
}
Expand Down
2 changes: 1 addition & 1 deletion openapi/sled-agent.json
Expand Up @@ -82,7 +82,7 @@
},
"/instances/{instance_id}": {
"put": {
"operationId": "instance_put",
"operationId": "instance_register",
"parameters": [
{
"in": "path",
Expand Down
6 changes: 3 additions & 3 deletions sled-agent/src/http_entrypoints.rs
Expand Up @@ -32,7 +32,7 @@ pub fn api() -> SledApiDescription {
api.register(services_put)?;
api.register(zpools_get)?;
api.register(filesystem_put)?;
api.register(instance_put)?;
api.register(instance_register)?;
api.register(instance_put_state)?;
api.register(disk_put)?;
api.register(update_artifact)?;
Expand Down Expand Up @@ -107,7 +107,7 @@ struct InstancePathParam {
method = PUT,
path = "/instances/{instance_id}",
}]
async fn instance_put(
async fn instance_register(
rqctx: RequestContext<SledAgent>,
path_params: Path<InstancePathParam>,
body: TypedBody<InstanceEnsureBody>,
Expand All @@ -116,7 +116,7 @@ async fn instance_put(
let instance_id = path_params.into_inner().instance_id;
let body_args = body.into_inner();
Ok(HttpResponseOk(
sa.instance_ensure(instance_id, body_args.initial)
sa.instance_ensure_registered(instance_id, body_args.initial)
.await
.map_err(Error::from)?,
))
Expand Down
2 changes: 1 addition & 1 deletion sled-agent/src/sled_agent.rs
Expand Up @@ -518,7 +518,7 @@ impl SledAgent {
/// Idempotently ensures that a given instance is registered with this sled,
/// i.e., that it can be addressed by future calls to
/// [`instance_ensure_state`].
pub async fn instance_ensure(
pub async fn instance_ensure_registered(
&self,
instance_id: Uuid,
initial: InstanceHardware,
Expand Down

0 comments on commit 09a68fb

Please sign in to comment.