-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsnapshot_service.proto
62 lines (49 loc) · 1.7 KB
/
snapshot_service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
syntax = "proto3";
package cloud.disk_manager;
import "cloud/disk_manager/api/disk.proto";
import "cloud/disk_manager/api/operation.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/ydb-platform/nbs/cloud/disk_manager/api;disk_manager";
// Snapshots are stored in global AZ (for redundancy), but are tied to a concrete disk in regional AZ.
// Creating initial snapshot is slow. The following snapshots will be created (generally) faster thanks
// to incremental snapshotting. Also, since we checkpoint the disk, it's possible to resume the VM
// right after we create the checkpoint (very quick operation) and continue data copying in the background.
service SnapshotService {
// Returns operation with:
// metadata: CreateSnapshotMetadata
// response: CreateSnapshotResponse
rpc Create(CreateSnapshotRequest) returns (Operation);
// Returns operation with:
// metadata: DeleteSnapshotMetadata
// response: DeleteSnapshotResponse
rpc Delete(DeleteSnapshotRequest) returns (Operation);
}
message CreateSnapshotRequest {
reserved 4, 5, 6;
DiskId src = 1;
string snapshot_id = 2;
string folder_id = 3;
bool zonal = 7;
}
message CreateSnapshotMetadata {
double progress = 1;
}
message CreateSnapshotResponse {
int64 size = 1;
int64 storage_size = 2;
}
message DeleteSnapshotRequest {
reserved 2, 3;
string snapshot_id = 1;
}
message DeleteSnapshotMetadata {
string snapshot_id = 1;
}
message DeleteSnapshotResponse {
message ChangedSnapshot {
string snapshot_id = 1;
google.protobuf.Timestamp timestamp = 2;
int64 storage_size = 3;
}
repeated ChangedSnapshot changed_snapshots = 1;
}