-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathimage_service.proto
70 lines (55 loc) · 1.63 KB
/
image_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
63
64
65
66
67
68
69
70
syntax = "proto3";
package cloud.disk_manager;
import "cloud/disk_manager/api/disk.proto";
import "cloud/disk_manager/api/image.proto";
import "cloud/disk_manager/api/operation.proto";
option go_package = "github.com/ydb-platform/nbs/cloud/disk_manager/api;disk_manager";
// Images are stored in global AZ and there's also a pool of base disks in each regional AZ.
// Size of pools are managed automatically, these disks are assigned to a special cloud+folder.
service ImageService {
// Returns operation with:
// metadata: CreateImageMetadata
// response: CreateImageResponse
rpc Create(CreateImageRequest) returns (Operation);
// Returns operation with:
// metadata: UpdateImageMetadata
// response: google.protobuf.Empty
rpc Update(UpdateImageRequest) returns (Operation);
// Returns operation with:
// metadata: DeleteImageMetadata
// response: google.protobuf.Empty
rpc Delete(DeleteImageRequest) returns (Operation);
}
message CreateImageRequest {
reserved 8, 9;
oneof src {
string src_snapshot_id = 1;
string src_image_id = 2;
ImageUrl src_url = 3;
DiskId src_disk_id = 5;
}
string dst_image_id = 6;
string folder_id = 7;
bool pooled = 10;
}
message CreateImageMetadata {
double progress = 1;
}
message CreateImageResponse {
int64 size = 1;
int64 storage_size = 2;
}
message UpdateImageRequest {
string image_id = 1;
bool pooled = 2;
}
message UpdateImageMetadata {
string image_id = 1;
}
message DeleteImageRequest {
reserved 2, 3;
string image_id = 1;
}
message DeleteImageMetadata {
string image_id = 1;
}