Skip to content

Commit 310288e

Browse files
committed
merge gjcolombo/refactor-server-request-queue
2 parents e66e5de + 2412bbd commit 310288e

File tree

5 files changed

+632
-443
lines changed

5 files changed

+632
-443
lines changed

bin/propolis-server/src/lib/vm/active.rs

+6-9
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ impl ActiveVm {
6363

6464
self.state_driver_queue
6565
.queue_external_request(match requested {
66-
InstanceStateRequested::Run => ExternalRequest::Start,
67-
InstanceStateRequested::Stop => ExternalRequest::Stop,
68-
InstanceStateRequested::Reboot => ExternalRequest::Reboot,
66+
InstanceStateRequested::Run => ExternalRequest::start(),
67+
InstanceStateRequested::Stop => ExternalRequest::stop(),
68+
InstanceStateRequested::Reboot => ExternalRequest::reboot(),
6969
})
7070
.map_err(Into::into)
7171
}
@@ -79,10 +79,7 @@ impl ActiveVm {
7979
websock: dropshot::WebsocketConnection,
8080
) -> Result<(), VmError> {
8181
Ok(self.state_driver_queue.queue_external_request(
82-
ExternalRequest::MigrateAsSource {
83-
migration_id,
84-
websock: websock.into(),
85-
},
82+
ExternalRequest::migrate_as_source(migration_id, websock),
8683
)?)
8784
}
8885

@@ -107,11 +104,11 @@ impl ActiveVm {
107104
) -> Result<(), VmError> {
108105
self.state_driver_queue
109106
.queue_external_request(
110-
ExternalRequest::ReconfigureCrucibleVolume {
107+
ExternalRequest::reconfigure_crucible_volume(
111108
backend_id,
112109
new_vcr_json,
113110
result_tx,
114-
},
111+
),
115112
)
116113
.map_err(Into::into)
117114
}

0 commit comments

Comments
 (0)