Skip to content

Commit 6cb0c02

Browse files
authored
Merge pull request #396 from Dstack-TEE/vmm-rpc-updatevm
vmm: Add rpc UpdateVm replacing UpgradeApp and ResizeVm
2 parents 5c26751 + b0707a8 commit 6cb0c02

5 files changed

Lines changed: 401 additions & 179 deletions

File tree

vmm/rpc/proto/vmm_rpc.proto

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ message PortMapping {
118118
}
119119

120120
// Message for upgrading an app request
121-
message UpgradeAppRequest {
121+
message UpdateVmRequest {
122122
// ID of the VM
123123
string id = 1;
124124
// Compose file to be used for the VM
@@ -133,6 +133,11 @@ message UpgradeAppRequest {
133133
repeated PortMapping ports = 7;
134134
// gpus
135135
GpuConfig gpus = 13;
136+
// Optional compute resource updates. Leave unset to keep current configuration.
137+
optional uint32 vcpu = 14;
138+
optional uint32 memory = 15;
139+
optional uint32 disk_size = 16;
140+
optional string image = 17;
136141
}
137142

138143
// Message for Status request
@@ -254,11 +259,13 @@ service Vmm {
254259
rpc StopVm(Id) returns (google.protobuf.Empty);
255260
// RPC to remove a VM
256261
rpc RemoveVm(Id) returns (google.protobuf.Empty);
257-
// RPC to upgrade an app
258-
rpc UpgradeApp(UpgradeAppRequest) returns (Id);
262+
// RPC to upgrade an app. Deprecated, use UpdateVm instead.
263+
rpc UpgradeApp(UpdateVmRequest) returns (Id);
264+
// RPC to update a VM
265+
rpc UpdateVm(UpdateVmRequest) returns (Id);
259266
// Shutdown a VM
260267
rpc ShutdownVm(Id) returns (google.protobuf.Empty);
261-
// RPC to resize a VM
268+
// RPC to resize a VM. Deprecated, use UpdateVm instead.
262269
rpc ResizeVm(ResizeVmRequest) returns (google.protobuf.Empty);
263270
// RPC to compute the compose hash, it's helpful for debugging & developing SDK.
264271
rpc GetComposeHash(VmConfiguration) returns (ComposeHash);

0 commit comments

Comments
 (0)