Skip to content

Commit b8558d0

Browse files
committed
driver(external): complete proto file for driver interface
Signed-off-by: Ansuman Sahoo <[email protected]>
1 parent 76e73f9 commit b8558d0

File tree

1 file changed

+86
-64
lines changed

1 file changed

+86
-64
lines changed

pkg/driver/external/proto/driver.proto

Lines changed: 86 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -15,74 +15,29 @@ service Driver {
1515
rpc Start(google.protobuf.Empty) returns (StartResponse);
1616
rpc Stop(google.protobuf.Empty) returns (StopResponse);
1717

18+
rpc CanRunGUI(google.protobuf.Empty) returns (CanRunGUIResponse);
19+
rpc RunGUI(google.protobuf.Empty) returns (RunGUIResponse);
20+
rpc ChangeDisplayPassword(ChangeDisplayPasswordRequest) returns (ChangeDisplayPasswordResponse);
21+
rpc GetDisplayConnection(google.protobuf.Empty) returns (GetDisplayConnectionResponse);
22+
23+
rpc CreateSnapshot(CreateSnapshotRequest) returns (CreateSnapshotResponse);
24+
rpc ApplySnapshot(ApplySnapshotRequest) returns (ApplySnapshotResponse);
25+
rpc DeleteSnapshot(DeleteSnapshotRequest) returns (DeleteSnapshotResponse);
26+
rpc ListSnapshots(google.protobuf.Empty) returns (ListSnapshotsResponse);
27+
28+
rpc Register(google.protobuf.Empty) returns (RegisterResponse);
29+
rpc Unregister(google.protobuf.Empty) returns (UnregisterResponse);
30+
31+
rpc ForwardGuestAgent(google.protobuf.Empty) returns (ForwardGuestAgentResponse);
32+
rpc GuestAgentConn(google.protobuf.Empty) returns (GuestAgentConnResponse);
33+
1834
rpc Name(google.protobuf.Empty) returns (NameResponse);
1935
rpc SetConfig(SetConfigRequest) returns (SetConfigResponse);
2036

2137
rpc GetVSockPort(google.protobuf.Empty) returns (GetVSockPortResponse);
2238
rpc GetVirtioPort(google.protobuf.Empty) returns (GetVirtioPortResponse);
2339
}
2440

25-
message Empty {}
26-
27-
message InstanceConfig {
28-
string id = 1;
29-
string name = 2;
30-
string dir = 3;
31-
string arch = 4;
32-
string cpuType = 5;
33-
repeated string rosetta = 6;
34-
int32 cpus = 7;
35-
string memory = 8;
36-
string disk = 9;
37-
string kernel = 10;
38-
string initrd = 11;
39-
bool headless = 12;
40-
bool mountHostUsers = 13;
41-
bool enableSharing = 14;
42-
string ssh = 15;
43-
string sshLocalPort = 16;
44-
repeated Mount mounts = 17;
45-
repeated Port ports = 18;
46-
repeated Network networks = 19;
47-
string containerd = 20;
48-
string containerdUser = 21;
49-
string containerdNamespace = 22;
50-
string vmType = 23;
51-
repeated string requirements = 24;
52-
repeated string firmware = 25;
53-
repeated AdditionalDisk additionalDisks = 26;
54-
ProxyCommand proxyCommand = 27;
55-
}
56-
57-
message Mount {
58-
string location = 1;
59-
string mountPoint = 2;
60-
bool writable = 3;
61-
string sshfs = 4;
62-
int32 ninep = 5;
63-
}
64-
65-
message Port {
66-
string guestPort = 1;
67-
string hostPort = 2;
68-
string proto = 3;
69-
}
70-
71-
message Network {
72-
string lima = 1;
73-
string socket_vmnet = 2;
74-
}
75-
76-
message AdditionalDisk {
77-
string location = 1;
78-
bool writable = 2;
79-
string size = 3;
80-
}
81-
82-
message ProxyCommand {
83-
string command = 1;
84-
}
85-
8641
message ValidateResponse {
8742
bool valid = 1;
8843
string error = 2;
@@ -113,7 +68,6 @@ message RegisterResponse {
11368
string error = 2;
11469
}
11570

116-
11771
message UnregisterResponse {
11872
bool success = 1;
11973
string error = 2;
@@ -133,12 +87,80 @@ message SetConfigResponse {
13387
string error = 2;
13488
}
13589

136-
13790
message GetVSockPortResponse {
13891
int32 port = 1;
13992
}
14093

141-
14294
message GetVirtioPortResponse {
14395
string port = 1;
14496
}
97+
98+
message CanRunGUIResponse {
99+
bool can_run = 1;
100+
}
101+
102+
message RunGUIResponse {
103+
bool success = 1;
104+
string error = 2;
105+
}
106+
107+
message ChangeDisplayPasswordRequest {
108+
string password = 1;
109+
}
110+
111+
message ChangeDisplayPasswordResponse {
112+
bool success = 1;
113+
string error = 2;
114+
}
115+
116+
message GetDisplayConnectionResponse {
117+
string connection = 1;
118+
string error = 2;
119+
}
120+
121+
message CreateSnapshotRequest {
122+
string tag = 1;
123+
}
124+
125+
message CreateSnapshotResponse {
126+
bool success = 1;
127+
string error = 2;
128+
}
129+
130+
message ApplySnapshotRequest {
131+
string tag = 1;
132+
}
133+
134+
message ApplySnapshotResponse {
135+
bool success = 1;
136+
string error = 2;
137+
}
138+
139+
message DeleteSnapshotRequest {
140+
string tag = 1;
141+
}
142+
143+
message DeleteSnapshotResponse {
144+
bool success = 1;
145+
string error = 2;
146+
}
147+
148+
message ListSnapshotsResponse {
149+
string snapshots = 1;
150+
string error = 2;
151+
}
152+
153+
message ForwardGuestAgentResponse {
154+
bool should_forward = 1;
155+
}
156+
157+
message GuestAgentConnResponse {
158+
string connection_id = 1;
159+
string error = 2;
160+
}
161+
162+
message ConnectionData {
163+
string connection_id = 1;
164+
bytes data = 2;
165+
bool close = 3;
166+
}

0 commit comments

Comments
 (0)