rpc.proto 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607
  1. syntax = "proto2";
  2. option go_package = "github.com/ydb-platform/ydb/library/cpp/porto/proto;myapi";
  3. /*
  4. Portod daemon listens on /run/portod.socket unix socket.
  5. Request: Varint32 length, TPortoRequest request
  6. Response: Varint32 length, TPortoResponse response
  7. Command is defined by optional nested message field.
  8. Result will be in nested message with the same name.
  9. Push notification is send as out of order response.
  10. Access level depends on client container and uid.
  11. See defails in porto.md or manpage porto
  12. TContainer, TVolume and related methods are Porto v5 API.
  13. */
  14. package Porto;
  15. // List of error codes
  16. enum EError {
  17. // No errors occured.
  18. Success = 0;
  19. // Unclassified error, usually unexpected syscall fail.
  20. Unknown = 1;
  21. // Unknown method or bad request.
  22. InvalidMethod = 2;
  23. // Container with specified name already exists.
  24. ContainerAlreadyExists = 3;
  25. // Container with specified name doesn't exist.
  26. ContainerDoesNotExist = 4;
  27. // Unknown property specified.
  28. InvalidProperty = 5;
  29. // Unknown data specified.
  30. InvalidData = 6;
  31. // Invalid value of property or data.
  32. InvalidValue = 7;
  33. // Can't perform specified operation in current container state.
  34. InvalidState = 8;
  35. // Permanent faulure: old kernel version, missing feature, configuration, etc.
  36. NotSupported = 9;
  37. // Temporary failure: too much objects, not enough memory, etc.
  38. ResourceNotAvailable = 10;
  39. // Insufficient rights for performing requested operation.
  40. Permission = 11;
  41. // Can't create new volume with specified name, because there is already one.
  42. VolumeAlreadyExists = 12;
  43. // Volume with specified name doesn't exist.
  44. VolumeNotFound = 13;
  45. // Not enough disk space.
  46. NoSpace = 14;
  47. // Object in use.
  48. Busy = 15;
  49. // Volume already linked with container.
  50. VolumeAlreadyLinked = 16;
  51. // Volume not linked with container.
  52. VolumeNotLinked = 17;
  53. // Layer with this name already exists.
  54. LayerAlreadyExists = 18;
  55. // Layer with this name not found.
  56. LayerNotFound = 19;
  57. // Property has no value, data source permanently not available.
  58. NoValue = 20;
  59. // Volume under construction or destruction.
  60. VolumeNotReady = 21;
  61. // Cannot parse or execute command.
  62. InvalidCommand = 22;
  63. // Error code is lost or came from future.
  64. LostError = 23;
  65. // Device node not found.
  66. DeviceNotFound = 24;
  67. // Path does not match restricitons or does not exist.
  68. InvalidPath = 25;
  69. // Wrong or unuseable ip address.
  70. InvalidNetworkAddress = 26;
  71. // Porto in system maintenance state.
  72. PortoFrozen = 27;
  73. // Label with this name is not set.
  74. LabelNotFound = 28;
  75. // Label name does not meet restrictions.
  76. InvalidLabel = 29;
  77. // Errors in tar, on archive extraction
  78. HelperError = 30;
  79. HelperFatalError = 31;
  80. // Generic object not found.
  81. NotFound = 404;
  82. // Reserved error code for client library.
  83. SocketError = 502;
  84. // Reserved error code for client library.
  85. SocketUnavailable = 503;
  86. // Reserved error code for client library.
  87. SocketTimeout = 504;
  88. // Portod close client connections on reload
  89. PortodReloaded = 505;
  90. // Reserved error code for taints.
  91. Taint = 666;
  92. // Reserved error codes 700-800 to docker
  93. Docker = 700;
  94. DockerImageNotFound = 701;
  95. // Internal error code, not for users.
  96. Queued = 1000;
  97. }
  98. message TPortoRequest {
  99. /* System methods */
  100. // Get portod version
  101. optional TVersionRequest Version = 14;
  102. // Get portod statistics
  103. optional TGetSystemRequest GetSystem = 300;
  104. // Change portod state (for host root user only)
  105. optional TSetSystemRequest SetSystem = 301;
  106. /* Container methods */
  107. // Create new container
  108. optional TCreateRequest Create = 1;
  109. // Create new contaienr and auto destroy when client disconnects
  110. optional TCreateRequest CreateWeak = 17;
  111. // Force kill all and destroy container and nested containers
  112. optional TDestroyRequest Destroy = 2;
  113. // List container names in current namespace
  114. optional TListRequest List = 3;
  115. // Start contianer and parents if needed
  116. optional TStartRequest Start = 7;
  117. // Kill all and stop container
  118. optional TStopRequest Stop = 8;
  119. // Freeze execution
  120. optional TPauseRequest Pause = 9;
  121. // Resume execution
  122. optional TResumeRequest Resume = 10;
  123. // Send signal to main process
  124. optional TKillRequest Kill = 13;
  125. // Restart dead container
  126. optional TRespawnRequest Respawn = 18;
  127. // Wait for process finish or change of labels
  128. optional TWaitRequest Wait = 16;
  129. // Subscribe to push notifictaions
  130. optional TWaitRequest AsyncWait = 19;
  131. optional TWaitRequest StopAsyncWait = 128;
  132. /* Container properties */
  133. // List supported container properties
  134. optional TListPropertiesRequest ListProperties = 11;
  135. // Get one property
  136. optional TGetPropertyRequest GetProperty = 4;
  137. // Set one property
  138. optional TSetPropertyRequest SetProperty = 5;
  139. // Deprecated, now data properties are also read-only properties
  140. optional TListDataPropertiesRequest ListDataProperties = 12;
  141. optional TGetDataPropertyRequest GetDataProperty = 6;
  142. // Get multiple properties for multiple containers
  143. optional TGetRequest Get = 15;
  144. /* Container API based on TContainer (Porto v5 API) */
  145. // Create, configure and start container with volumes
  146. optional TCreateFromSpecRequest CreateFromSpec = 230;
  147. // Set multiple container properties
  148. optional TUpdateFromSpecRequest UpdateFromSpec = 231;
  149. // Get multiple properties for multiple containers
  150. optional TListContainersRequest ListContainersBy = 232;
  151. // Modify symlink in container
  152. optional TSetSymlinkRequest SetSymlink = 125;
  153. /* Container labels - user defined key-value */
  154. // Find containers with labels
  155. optional TFindLabelRequest FindLabel = 20;
  156. // Atomic compare and set for label
  157. optional TSetLabelRequest SetLabel = 21;
  158. // Atomic add and return for counter in label
  159. optional TIncLabelRequest IncLabel = 22;
  160. /* Volume methods */
  161. optional TListVolumePropertiesRequest ListVolumeProperties = 103;
  162. // List layers and their properties
  163. optional TListVolumesRequest ListVolumes = 107;
  164. // Create, configure and build volume
  165. optional TCreateVolumeRequest CreateVolume = 104;
  166. // Change volume properties - for now only resize
  167. optional TTuneVolumeRequest TuneVolume = 108;
  168. // Volume API based on TVolume (Porto v5 API)
  169. optional TNewVolumeRequest NewVolume = 126;
  170. optional TGetVolumeRequest GetVolume = 127;
  171. // Add link between container and volume
  172. optional TLinkVolumeRequest LinkVolume = 105;
  173. // Same as LinkVolume but fails if target is not supported
  174. optional TLinkVolumeRequest LinkVolumeTarget = 120;
  175. // Del link between container and volume
  176. optional TUnlinkVolumeRequest UnlinkVolume = 106;
  177. // Same as UnlinkVolume but fails if target is not supported
  178. optional TUnlinkVolumeRequest UnlinkVolumeTarget = 121;
  179. /* Layer methods */
  180. // Import layer from tarball
  181. optional TImportLayerRequest ImportLayer = 110;
  182. // Remove layer
  183. optional TRemoveLayerRequest RemoveLayer = 111;
  184. // List layers
  185. optional TListLayersRequest ListLayers = 112;
  186. // Export volume or layer into tarball
  187. optional TExportLayerRequest ExportLayer = 113;
  188. // Get/set layer private (user defined string)
  189. optional TGetLayerPrivateRequest GetLayerPrivate = 114;
  190. optional TSetLayerPrivateRequest SetLayerPrivate = 115;
  191. /* Storage methods */
  192. // Volume creation creates required storage if missing
  193. // List storages and meta storages
  194. optional TListStoragesRequest ListStorages = 116;
  195. optional TRemoveStorageRequest RemoveStorage = 117;
  196. // Import storage from tarball
  197. optional TImportStorageRequest ImportStorage = 118;
  198. // Export storage into tarball
  199. optional TExportStorageRequest ExportStorage = 119;
  200. // Meta storage (bundle for storages and layers)
  201. optional TMetaStorage CreateMetaStorage = 122;
  202. optional TMetaStorage ResizeMetaStorage = 123;
  203. optional TMetaStorage RemoveMetaStorage = 124;
  204. // Convert path between containers
  205. optional TConvertPathRequest ConvertPath = 200;
  206. /* Process methods */
  207. // Attach process to nested container
  208. optional TAttachProcessRequest AttachProcess = 201;
  209. // Find container for process
  210. optional TLocateProcessRequest LocateProcess = 202;
  211. // Attach one thread to nexted container
  212. optional TAttachProcessRequest AttachThread = 203;
  213. /* Docker images API */
  214. optional TDockerImageStatusRequest dockerImageStatus = 303;
  215. optional TDockerImageListRequest listDockerImages = 304;
  216. optional TDockerImagePullRequest pullDockerImage = 305;
  217. optional TDockerImageRemoveRequest removeDockerImage = 306;
  218. }
  219. message TPortoResponse {
  220. // Actually always set, hack for adding new error codes
  221. optional EError error = 1 [ default = LostError ];
  222. // Human readable comment - must be shown to user as is
  223. optional string errorMsg = 2;
  224. optional uint64 timestamp = 1000; // for next changed_since
  225. /* System methods */
  226. optional TVersionResponse Version = 8;
  227. optional TGetSystemResponse GetSystem = 300;
  228. optional TSetSystemResponse SetSystem = 301;
  229. /* Container methods */
  230. optional TListResponse List = 3;
  231. optional TWaitResponse Wait = 11;
  232. optional TWaitResponse AsyncWait = 19;
  233. /* Container properties */
  234. optional TListPropertiesResponse ListProperties = 6;
  235. optional TGetPropertyResponse GetProperty = 4;
  236. // Deprecated
  237. optional TListDataPropertiesResponse ListDataProperties = 7;
  238. optional TGetDataPropertyResponse GetDataProperty = 5;
  239. optional TGetResponse Get = 10;
  240. /* Container API based on TContainer (Porto v5 API) */
  241. optional TListContainersResponse ListContainersBy = 232;
  242. /* Container Labels */
  243. optional TFindLabelResponse FindLabel = 20;
  244. optional TSetLabelResponse SetLabel = 21;
  245. optional TIncLabelResponse IncLabel = 22;
  246. /* Volume methods */
  247. optional TListVolumePropertiesResponse ListVolumeProperties = 12;
  248. optional TListVolumesResponse ListVolumes = 9;
  249. optional TVolumeDescription CreateVolume = 13;
  250. optional TNewVolumeResponse NewVolume = 126;
  251. optional TGetVolumeResponse GetVolume = 127;
  252. optional TListLayersResponse ListLayers = 14;
  253. optional TGetLayerPrivateResponse GetLayerPrivate = 16;
  254. // List storages and meta storages
  255. optional TListStoragesResponse ListStorages = 17;
  256. optional TConvertPathResponse ConvertPath = 15;
  257. // Process
  258. optional TLocateProcessResponse LocateProcess = 18;
  259. /* Docker images API */
  260. optional TDockerImageStatusResponse dockerImageStatus = 302;
  261. optional TDockerImageListResponse listDockerImages = 303;
  262. optional TDockerImagePullResponse pullDockerImage = 304;
  263. }
  264. // Common objects
  265. message TStringMap {
  266. message TStringMapEntry {
  267. optional string key = 1;
  268. optional string val = 2;
  269. }
  270. // TODO replace with map
  271. // map<string, string> map = 1;
  272. repeated TStringMapEntry map = 1;
  273. optional bool merge = 2; // in, default: replace
  274. }
  275. message TUintMap {
  276. message TUintMapEntry {
  277. optional string key = 1;
  278. optional uint64 val = 2;
  279. }
  280. // TODO replace with map
  281. // map<string, uint64> map = 1;
  282. repeated TUintMapEntry map = 1;
  283. optional bool merge = 2; // in, default: replace
  284. }
  285. message TError {
  286. optional EError error = 1 [ default = LostError ];
  287. optional string msg = 2;
  288. }
  289. message TCred {
  290. optional string user = 1; // requires user or uid or both
  291. optional fixed32 uid = 2;
  292. optional string group = 3;
  293. optional fixed32 gid = 4;
  294. repeated fixed32 grp = 5; // out, supplementary groups
  295. }
  296. message TCapabilities {
  297. repeated string cap = 1;
  298. optional string hex = 2; // out
  299. }
  300. message TContainerCommandArgv {
  301. repeated string argv = 1;
  302. }
  303. // Container
  304. message TContainerEnvVar {
  305. optional string name = 1; //required
  306. optional string value = 2;
  307. optional bool unset = 3; // out
  308. optional string salt = 4;
  309. optional string hash = 5;
  310. }
  311. message TContainerEnv {
  312. repeated TContainerEnvVar var = 1;
  313. optional bool merge = 2; // in, default: replace
  314. }
  315. message TContainerUlimit {
  316. optional string type = 1; //required
  317. optional bool unlimited = 2;
  318. optional uint64 soft = 3;
  319. optional uint64 hard = 4;
  320. optional bool inherited = 5; // out
  321. }
  322. message TContainerUlimits {
  323. repeated TContainerUlimit ulimit = 1;
  324. optional bool merge = 2; // in, default: replace
  325. }
  326. message TContainerControllers {
  327. repeated string controller = 1;
  328. }
  329. message TContainerCgroup {
  330. optional string controller = 1; //required
  331. optional string path = 2; //required
  332. optional bool inherited = 3;
  333. }
  334. message TContainerCgroups {
  335. repeated TContainerCgroup cgroup = 1;
  336. }
  337. message TContainerCpuSet {
  338. optional string policy = 1; // inherit|set|node|reserve|threads|cores
  339. optional uint32 arg = 2; // for node|reserve|threads|cores
  340. optional string list = 3; // for set
  341. repeated uint32 cpu = 4; // for set (used if list isn't set)
  342. optional uint32 count = 5; // out
  343. optional string mems = 6;
  344. }
  345. message TContainerBindMount {
  346. optional string source = 1; //required
  347. optional string target = 2; //required
  348. repeated string flag = 3;
  349. }
  350. message TContainerBindMounts {
  351. repeated TContainerBindMount bind = 1;
  352. }
  353. message TContainerVolumeLink {
  354. optional string volume = 1; //required
  355. optional string target = 2;
  356. optional bool required = 3;
  357. optional bool read_only = 4;
  358. }
  359. message TContainerVolumeLinks {
  360. repeated TContainerVolumeLink link = 1;
  361. }
  362. message TContainerVolumes {
  363. repeated string volume = 1;
  364. }
  365. message TContainerPlace {
  366. optional string place = 1; //required
  367. optional string alias = 2;
  368. }
  369. message TContainerPlaceConfig {
  370. repeated TContainerPlace cfg = 1;
  371. }
  372. message TContainerDevice {
  373. optional string device = 1; //required
  374. optional string access = 2; //required
  375. optional string path = 3;
  376. optional string mode = 4;
  377. optional string user = 5;
  378. optional string group = 6;
  379. }
  380. message TContainerDevices {
  381. repeated TContainerDevice device = 1;
  382. optional bool merge = 2; // in, default: replace
  383. }
  384. message TContainerNetOption {
  385. optional string opt = 1; //required
  386. repeated string arg = 2;
  387. }
  388. message TContainerNetConfig {
  389. repeated TContainerNetOption cfg = 1;
  390. optional bool inherited = 2; // out
  391. }
  392. message TContainerIpLimit {
  393. optional string policy = 1; //required any|none|some
  394. repeated string ip = 2;
  395. }
  396. message TContainerIpConfig {
  397. message TContainerIp {
  398. optional string dev = 1; //required
  399. optional string ip = 2; //required
  400. }
  401. repeated TContainerIp cfg = 1;
  402. }
  403. message TVmStat {
  404. optional uint64 count = 1;
  405. optional uint64 size = 2;
  406. optional uint64 max_size = 3;
  407. optional uint64 used = 4;
  408. optional uint64 max_used = 5;
  409. optional uint64 anon = 6;
  410. optional uint64 file = 7;
  411. optional uint64 shmem = 8;
  412. optional uint64 huge = 9;
  413. optional uint64 swap = 10;
  414. optional uint64 data = 11;
  415. optional uint64 stack = 12;
  416. optional uint64 code = 13;
  417. optional uint64 locked = 14;
  418. optional uint64 table = 15;
  419. }
  420. message TContainerStatus {
  421. optional string absolute_name = 1; // out, "/porto/..."
  422. optional string state = 2; // out
  423. optional uint64 id = 3; // out
  424. optional uint32 level = 4; // out
  425. optional string parent = 5; // out, "/porto/..."
  426. optional string absolute_namespace = 6; // out
  427. optional int32 root_pid = 7; // out
  428. optional int32 exit_status = 8; // out
  429. optional int32 exit_code = 9; // out
  430. optional bool core_dumped = 10; // out
  431. optional TError start_error = 11; // out
  432. optional uint64 time = 12; // out
  433. optional uint64 dead_time = 13; // out
  434. optional TCapabilities capabilities_allowed = 14; // out
  435. optional TCapabilities capabilities_ambient_allowed = 15; // out
  436. optional string root_path = 16; // out, in client namespace
  437. optional uint64 stdout_offset = 17; // out
  438. optional uint64 stderr_offset = 18; // out
  439. optional string std_err = 69; // out
  440. optional string std_out = 70; // out
  441. optional uint64 creation_time = 19; // out
  442. optional uint64 start_time = 20; // out
  443. optional uint64 death_time = 21; // out
  444. optional uint64 change_time = 22; // out
  445. optional bool no_changes = 23; // out, change_time < changed_since
  446. optional string extra_properties = 73;
  447. optional TContainerCgroups cgroups = 24; // out
  448. optional TContainerCpuSet cpu_set_affinity = 25; // out
  449. optional uint64 cpu_usage = 26; // out
  450. optional uint64 cpu_usage_system = 27; // out
  451. optional uint64 cpu_wait = 28; // out
  452. optional uint64 cpu_throttled = 29; // out
  453. optional uint64 process_count = 30; // out
  454. optional uint64 thread_count = 31; // out
  455. optional TUintMap io_read = 32; // out, bytes
  456. optional TUintMap io_write = 33; // out, bytes
  457. optional TUintMap io_ops = 34; // out, ops
  458. optional TUintMap io_read_ops = 341; // out, ops
  459. optional TUintMap io_write_ops = 342; // out, ops
  460. optional TUintMap io_time = 35; // out, ns
  461. optional TUintMap io_pressure = 351; // out
  462. optional TUintMap place_usage = 36;
  463. optional uint64 memory_usage = 37; // out, bytes
  464. optional uint64 memory_guarantee_total = 38; // out
  465. optional uint64 memory_limit_total = 39; // out
  466. optional uint64 anon_limit_total = 40;
  467. optional uint64 anon_usage = 41; // out, bytes
  468. optional double cpu_guarantee_total = 42;
  469. optional double cpu_guarantee_bound = 421;
  470. optional double cpu_limit_total = 422;
  471. optional double cpu_limit_bound = 423;
  472. optional uint64 cache_usage = 43; // out, bytes
  473. optional uint64 hugetlb_usage = 44; // out, bytes
  474. optional uint64 hugetlb_limit = 45;
  475. optional uint64 minor_faults = 46; // out
  476. optional uint64 major_faults = 47; // out
  477. optional uint64 memory_reclaimed = 48; // out
  478. optional TVmStat virtual_memory = 49; // out
  479. optional uint64 shmem_usage = 71; // out, bytes
  480. optional uint64 mlock_usage = 72; // out, bytes
  481. optional uint64 oom_kills = 50; // out
  482. optional uint64 oom_kills_total = 51; // out
  483. optional bool oom_killed = 52; // out
  484. optional TUintMap net_bytes = 54; // out
  485. optional TUintMap net_packets = 55; // out
  486. optional TUintMap net_drops = 56; // out
  487. optional TUintMap net_overlimits = 57; // out
  488. optional TUintMap net_rx_bytes = 58; // out
  489. optional TUintMap net_rx_packets = 59; // out
  490. optional TUintMap net_rx_drops = 60; // out
  491. optional TUintMap net_tx_bytes = 61; // out
  492. optional TUintMap net_tx_packets = 62; // out
  493. optional TUintMap net_tx_drops = 63; // out
  494. optional TContainerVolumeLinks volumes_linked = 64; // out
  495. optional TContainerVolumes volumes_owned = 65;
  496. repeated TError error = 66; // out
  497. repeated TError warning = 67; // out
  498. repeated TError taint = 68; // out
  499. }
  500. message TContainerSpec {
  501. optional string name = 1; // required / in client namespace
  502. optional bool weak = 2;
  503. optional string private = 3;
  504. optional TStringMap labels = 4;
  505. optional string command = 5;
  506. optional TContainerCommandArgv command_argv = 76;
  507. optional TContainerEnv env = 6;
  508. optional TContainerEnv env_secret = 90; // in, out hides values
  509. optional TContainerUlimits ulimit = 7;
  510. optional string core_command = 8;
  511. optional bool isolate = 9;
  512. optional string virt_mode = 10;
  513. optional string enable_porto = 11;
  514. optional string porto_namespace = 12;
  515. optional string cgroupfs = 78;
  516. optional bool userns = 79;
  517. optional uint64 aging_time = 13;
  518. optional TCred task_cred = 14;
  519. optional string user = 15;
  520. optional string group = 16;
  521. optional TCred owner_cred = 17;
  522. optional string owner_user = 18;
  523. optional string owner_group = 19;
  524. optional string owner_containers = 77;
  525. optional TCapabilities capabilities = 20;
  526. optional TCapabilities capabilities_ambient = 21;
  527. optional string root = 22; // in parent namespace
  528. optional bool root_readonly = 23;
  529. optional TContainerBindMounts bind = 24;
  530. optional TStringMap symlink = 25;
  531. optional TContainerDevices devices = 26;
  532. optional TContainerPlaceConfig place = 27;
  533. optional TUintMap place_limit = 28;
  534. optional string cwd = 29;
  535. optional string stdin_path = 30;
  536. optional string stdout_path = 31;
  537. optional string stderr_path = 32;
  538. optional uint64 stdout_limit = 33;
  539. optional uint32 umask = 34;
  540. optional bool respawn = 35;
  541. optional uint64 respawn_count = 36;
  542. optional int64 max_respawns = 37;
  543. optional uint64 respawn_delay = 38;
  544. optional TContainerControllers controllers = 39;
  545. optional string cpu_policy = 40; // normal|idle|batch|high|rt
  546. optional double cpu_weight = 41; // 0.01 .. 100
  547. optional double cpu_guarantee = 42; // in cores
  548. optional double cpu_limit = 43; // in cores
  549. optional double cpu_limit_total = 44; // deprecated (value moved to TContainerStatus)
  550. optional uint64 cpu_period = 45; // ns
  551. optional TContainerCpuSet cpu_set = 46;
  552. optional uint64 thread_limit = 47;
  553. optional string io_policy = 48; // none|rt|high|normal|batch|idle
  554. optional double io_weight = 49; // 0.01 .. 100
  555. optional TUintMap io_limit = 50; // bps
  556. optional TUintMap io_guarantee = 84; // bps
  557. optional TUintMap io_ops_limit = 51; // iops
  558. optional TUintMap io_ops_guarantee = 85; // iops
  559. optional uint64 memory_guarantee = 52; // bytes
  560. optional uint64 memory_limit = 53; // bytes
  561. optional uint64 anon_limit = 54;
  562. optional uint64 anon_max_usage = 55;
  563. optional uint64 dirty_limit = 56;
  564. optional uint64 hugetlb_limit = 57;
  565. optional bool recharge_on_pgfault = 58;
  566. optional bool pressurize_on_death = 59;
  567. optional bool anon_only = 60;
  568. optional int32 oom_score_adj = 61; // -1000 .. +1000
  569. optional bool oom_is_fatal = 62;
  570. optional TContainerNetConfig net = 63;
  571. optional TContainerIpLimit ip_limit = 64;
  572. optional TContainerIpConfig ip = 65;
  573. optional TContainerIpConfig default_gw = 66;
  574. optional string hostname = 67;
  575. optional string resolv_conf = 68;
  576. optional string etc_hosts = 69;
  577. optional TStringMap sysctl = 70;
  578. optional TUintMap net_guarantee = 71; // bytes per second
  579. optional TUintMap net_limit = 72; // bytes per second
  580. optional TUintMap net_rx_limit = 73; // bytes per second
  581. optional TContainerVolumes volumes_required = 75;
  582. }
  583. message TContainer {
  584. optional TContainerSpec spec = 1; //required
  585. optional TContainerStatus status = 2;
  586. optional TError error = 3;
  587. }
  588. // Volumes
  589. message TVolumeDescription {
  590. required string path = 1; // path in client namespace
  591. map<string, string> properties = 2;
  592. repeated string containers = 3; // linked containers (legacy)
  593. repeated TVolumeLink links = 4; // linked containers with details
  594. optional uint64 change_time = 5; // sec since epoch
  595. optional bool no_changes = 6; // change_time < changed_since
  596. }
  597. message TVolumeLink {
  598. optional string container = 1;
  599. optional string target = 2; // absolute path in container, default: anon
  600. optional bool required = 3; // container cannot work without it
  601. optional bool read_only = 4;
  602. optional string host_target = 5; // out, absolute path in host
  603. optional bool container_root = 6; // in, set container root
  604. optional bool container_cwd = 7; // in, set container cwd
  605. }
  606. message TVolumeResource {
  607. optional uint64 limit = 1; // bytes or inodes
  608. optional uint64 guarantee = 2; // bytes or inodes
  609. optional uint64 usage = 3; // out, bytes or inodes
  610. optional uint64 available = 4; // out, bytes or inodes
  611. }
  612. message TVolumeDirectory {
  613. optional string path = 1; // relative path in volume
  614. optional TCred cred = 2; // default: volume cred
  615. optional fixed32 permissions = 3; // default: volume permissions
  616. }
  617. message TVolumeSymlink {
  618. optional string path = 1; // relative path in volume
  619. optional string target_path = 2;
  620. }
  621. message TVolumeShare {
  622. optional string path = 1; // relative path in volume
  623. optional string origin_path = 2; // absolute path to origin
  624. optional bool cow = 3; // default: mutable share
  625. }
  626. // Structured Volume description (Porto V5 API)
  627. message TVolumeSpec {
  628. optional string path = 1; // path in container, default: auto
  629. optional string container = 2; // defines root for paths, default: self (client container)
  630. repeated TVolumeLink links = 3; // initial links, default: anon link to self
  631. optional string id = 4; // out
  632. optional string state = 5; // out
  633. optional string private_value = 6; // at most 4096 bytes
  634. optional string device_name = 7; // out
  635. optional string backend = 10; // default: auto
  636. optional string place = 11; // path in host or alias, default from client container
  637. optional string storage = 12; // persistent storage, path or name, default: non-persistent
  638. optional string image = 52;
  639. repeated string layers = 13; // name or path
  640. optional bool read_only = 14;
  641. // defines root directory user, group and permissions
  642. optional TCred cred = 20; // default: self task cred
  643. optional fixed32 permissions = 21; // default: 0775
  644. optional TVolumeResource space = 22;
  645. optional TVolumeResource inodes = 23;
  646. optional TCred owner = 30; // default: self owner
  647. optional string owner_container = 31; // default: self
  648. optional string place_key = 32; // out, key for place_limit
  649. optional string creator = 33; // out
  650. optional bool auto_path = 34; // out
  651. optional uint32 device_index = 35; // out
  652. optional uint64 build_time = 37; // out, sec since epoch
  653. // customization at creation
  654. repeated TVolumeDirectory directories = 40; // in
  655. repeated TVolumeSymlink symlinks = 41; // in
  656. repeated TVolumeShare shares = 42; // in
  657. optional uint64 change_time = 50; // out, sec since epoch
  658. optional bool no_changes = 51; // out, change_time < changed_since
  659. }
  660. message TLayer {
  661. optional string name = 1; // name or meta/name
  662. optional string owner_user = 2;
  663. optional string owner_group = 3;
  664. optional uint64 last_usage = 4; // out, sec since last usage
  665. optional string private_value = 5;
  666. }
  667. message TStorage {
  668. optional string name = 1; // name or meta/name
  669. optional string owner_user = 2;
  670. optional string owner_group = 3;
  671. optional uint64 last_usage = 4; // out, sec since last usage
  672. optional string private_value = 5;
  673. }
  674. message TMetaStorage {
  675. optional string name = 1;
  676. optional string place = 2;
  677. optional string private_value = 3;
  678. optional uint64 space_limit = 4; // bytes
  679. optional uint64 inode_limit = 5; // inodes
  680. optional uint64 space_used = 6; // out, bytes
  681. optional uint64 space_available = 7; // out, bytes
  682. optional uint64 inode_used = 8; // out, inodes
  683. optional uint64 inode_available = 9; // out, inodes
  684. optional string owner_user = 10; // out
  685. optional string owner_group = 11; // out
  686. optional uint64 last_usage = 12; // out, sec since last usage
  687. }
  688. // COMMANDS
  689. // System
  690. // Get porto version
  691. message TVersionRequest {
  692. }
  693. message TVersionResponse {
  694. optional string tag = 1;
  695. optional string revision = 2;
  696. }
  697. // Get porto statistics
  698. message TGetSystemRequest {
  699. }
  700. message TGetSystemResponse {
  701. optional string porto_version = 1;
  702. optional string porto_revision = 2;
  703. optional string kernel_version = 3;
  704. optional fixed64 errors = 4;
  705. optional fixed64 warnings = 5;
  706. optional fixed64 porto_starts = 6;
  707. optional fixed64 porto_uptime = 7;
  708. optional fixed64 master_uptime = 8;
  709. optional fixed64 taints = 9;
  710. optional bool frozen = 10;
  711. optional bool verbose = 100;
  712. optional bool debug = 101;
  713. optional fixed64 log_lines = 102;
  714. optional fixed64 log_bytes = 103;
  715. optional fixed64 stream_rotate_bytes = 104;
  716. optional fixed64 stream_rotate_errors = 105;
  717. optional fixed64 log_lines_lost = 106;
  718. optional fixed64 log_bytes_lost = 107;
  719. optional fixed64 log_open = 108;
  720. optional fixed64 container_count = 200;
  721. optional fixed64 container_limit = 201;
  722. optional fixed64 container_running = 202;
  723. optional fixed64 container_created = 203;
  724. optional fixed64 container_started = 204;
  725. optional fixed64 container_start_failed = 205;
  726. optional fixed64 container_oom = 206;
  727. optional fixed64 container_buried = 207;
  728. optional fixed64 container_lost = 208;
  729. optional fixed64 container_tainted = 209;
  730. optional fixed64 volume_count = 300;
  731. optional fixed64 volume_limit = 301;
  732. optional fixed64 volume_created = 303;
  733. optional fixed64 volume_failed = 304;
  734. optional fixed64 volume_links = 305;
  735. optional fixed64 volume_links_mounted = 306;
  736. optional fixed64 volume_lost = 307;
  737. optional fixed64 layer_import = 390;
  738. optional fixed64 layer_export = 391;
  739. optional fixed64 layer_remove = 392;
  740. optional fixed64 client_count = 400;
  741. optional fixed64 client_max = 401;
  742. optional fixed64 client_connected = 402;
  743. optional fixed64 request_queued = 500;
  744. optional fixed64 request_completed = 501;
  745. optional fixed64 request_failed = 502;
  746. optional fixed64 request_threads = 503;
  747. optional fixed64 request_longer_1s = 504;
  748. optional fixed64 request_longer_3s = 505;
  749. optional fixed64 request_longer_30s = 506;
  750. optional fixed64 request_longer_5m = 507;
  751. optional fixed64 fail_system = 600;
  752. optional fixed64 fail_invalid_value = 601;
  753. optional fixed64 fail_invalid_command = 602;
  754. optional fixed64 fail_memory_guarantee = 603;
  755. optional fixed64 fail_invalid_netaddr = 604;
  756. optional fixed64 porto_crash = 666;
  757. optional fixed64 network_count = 700;
  758. optional fixed64 network_created = 701;
  759. optional fixed64 network_problems = 702;
  760. optional fixed64 network_repairs = 703;
  761. }
  762. // Change porto state
  763. message TSetSystemRequest {
  764. optional bool frozen = 10;
  765. optional bool verbose = 100;
  766. optional bool debug = 101;
  767. }
  768. message TSetSystemResponse {
  769. }
  770. message TCreateFromSpecRequest {
  771. optional TContainerSpec container = 1; //required
  772. repeated TVolumeSpec volumes = 2;
  773. optional bool start = 3;
  774. }
  775. message TUpdateFromSpecRequest {
  776. optional TContainerSpec container = 1; //required
  777. optional bool start = 2;
  778. }
  779. message TListContainersFilter {
  780. optional string name = 1; // name or wildcards, default: all
  781. optional TStringMap labels = 2;
  782. optional uint64 changed_since = 3; // change_time >= changed_since
  783. }
  784. message TStreamDumpOptions {
  785. optional uint64 stdstream_offset = 2; // default: 0
  786. optional uint64 stdstream_limit = 3; // default: 8Mb
  787. }
  788. message TListContainersFieldOptions {
  789. repeated string properties = 1; // property names, default: all
  790. optional TStreamDumpOptions stdout_options = 2; // for GetIndexed stdout
  791. optional TStreamDumpOptions stderr_options = 3; // for GetIndexed stderr
  792. }
  793. message TListContainersRequest {
  794. repeated TListContainersFilter filters = 1;
  795. optional TListContainersFieldOptions field_options = 2;
  796. }
  797. message TListContainersResponse {
  798. repeated TContainer containers = 1;
  799. }
  800. // List available properties
  801. message TListPropertiesRequest {
  802. }
  803. message TListPropertiesResponse {
  804. message TContainerPropertyListEntry {
  805. optional string name = 1;
  806. optional string desc = 2;
  807. optional bool read_only = 3;
  808. optional bool dynamic = 4;
  809. }
  810. repeated TContainerPropertyListEntry list = 1;
  811. }
  812. // deprecated, use ListProperties
  813. message TListDataPropertiesRequest {
  814. }
  815. message TListDataPropertiesResponse {
  816. message TContainerDataListEntry {
  817. optional string name = 1;
  818. optional string desc = 2;
  819. }
  820. repeated TContainerDataListEntry list = 1;
  821. }
  822. // Create stopped container
  823. message TCreateRequest {
  824. optional string name = 1;
  825. }
  826. // Stop and destroy container
  827. message TDestroyRequest {
  828. optional string name = 1;
  829. }
  830. // List container names
  831. message TListRequest {
  832. optional string mask = 1;
  833. optional uint64 changed_since = 2; // change_time >= changed_since
  834. }
  835. message TListResponse {
  836. repeated string name = 1;
  837. optional string absolute_namespace = 2;
  838. }
  839. // Read one property
  840. message TGetPropertyRequest {
  841. optional string name = 1;
  842. optional string property = 2;
  843. // update cached counters
  844. optional bool sync = 3;
  845. optional bool real = 4;
  846. }
  847. message TGetPropertyResponse {
  848. optional string value = 1;
  849. }
  850. // Alias for GetProperty, deprecated
  851. message TGetDataPropertyRequest {
  852. optional string name = 1;
  853. optional string data = 2;
  854. // update cached counters
  855. optional bool sync = 3;
  856. optional bool real = 4;
  857. }
  858. message TGetDataPropertyResponse {
  859. optional string value = 1;
  860. }
  861. // Change one property
  862. message TSetPropertyRequest {
  863. optional string name = 1;
  864. optional string property = 2;
  865. optional string value = 3;
  866. }
  867. // Get multiple properties/data of many containers with one request
  868. message TGetRequest {
  869. // list of containers or wildcards, "***" - all
  870. repeated string name = 1;
  871. // list of properties/data
  872. repeated string variable = 2;
  873. // do not wait busy containers
  874. optional bool nonblock = 3;
  875. // update cached counters
  876. optional bool sync = 4;
  877. optional bool real = 5;
  878. // change_time >= changed_since
  879. optional uint64 changed_since = 6;
  880. }
  881. message TGetResponse {
  882. message TContainerGetValueResponse {
  883. optional string variable = 1;
  884. optional EError error = 2;
  885. optional string errorMsg = 3;
  886. optional string value = 4;
  887. }
  888. message TContainerGetListResponse {
  889. optional string name = 1;
  890. repeated TContainerGetValueResponse keyval = 2;
  891. optional uint64 change_time = 3;
  892. optional bool no_changes = 4; // change_time < changed_since
  893. }
  894. repeated TContainerGetListResponse list = 1;
  895. }
  896. // Start stopped container
  897. message TStartRequest {
  898. optional string name = 1;
  899. }
  900. // Restart dead container
  901. message TRespawnRequest {
  902. optional string name = 1;
  903. }
  904. // Stop dead or running container
  905. message TStopRequest {
  906. optional string name = 1;
  907. // Timeout in 1/1000 seconds between SIGTERM and SIGKILL, default 30s
  908. optional uint32 timeout_ms = 2;
  909. }
  910. // Freeze running container
  911. message TPauseRequest {
  912. optional string name = 1;
  913. }
  914. // Unfreeze paused container
  915. message TResumeRequest {
  916. optional string name = 1;
  917. }
  918. // Translate filesystem path between containers
  919. message TConvertPathRequest {
  920. optional string path = 1;
  921. optional string source = 2;
  922. optional string destination = 3;
  923. }
  924. message TConvertPathResponse {
  925. optional string path = 1;
  926. }
  927. // Wait while container(s) is/are in running state
  928. message TWaitRequest {
  929. // list of containers or wildcards, "***" - all
  930. repeated string name = 1;
  931. // timeout in 1/1000 seconds, 0 - nonblock
  932. optional uint32 timeout_ms = 2;
  933. // list of label names or wildcards
  934. repeated string label = 3;
  935. // async wait with target_state works only once
  936. optional string target_state = 4;
  937. }
  938. message TWaitResponse {
  939. optional string name = 1; // container name
  940. optional string state = 2; // container state or "timeout"
  941. optional uint64 when = 3; // unix time stamp in seconds
  942. optional string label = 4;
  943. optional string value = 5;
  944. }
  945. // Send signal main process in container
  946. message TKillRequest {
  947. optional string name = 1;
  948. optional int32 sig = 2;
  949. }
  950. // Move process into container
  951. message TAttachProcessRequest {
  952. optional string name = 1;
  953. optional uint32 pid = 2;
  954. optional string comm = 3; // ignored if empty
  955. }
  956. // Determine container by pid
  957. message TLocateProcessRequest {
  958. optional uint32 pid = 1;
  959. optional string comm = 2; // ignored if empty
  960. }
  961. message TLocateProcessResponse {
  962. optional string name = 1;
  963. }
  964. // Labels
  965. message TFindLabelRequest {
  966. optional string mask = 1; // containers name or wildcard
  967. optional string state = 2; // filter by container state
  968. optional string label = 3; // label name or wildcard
  969. optional string value = 4; // filter by label value
  970. }
  971. message TFindLabelResponse {
  972. message TFindLabelEntry {
  973. optional string name = 1;
  974. optional string state = 2;
  975. optional string label = 3;
  976. optional string value = 4;
  977. }
  978. repeated TFindLabelEntry list = 1;
  979. }
  980. message TSetLabelRequest {
  981. optional string name = 1;
  982. optional string label = 2;
  983. optional string value = 3;
  984. optional string prev_value = 4; // fail with Busy if does not match
  985. optional string state = 5; // fail with InvalidState if not match
  986. }
  987. message TSetLabelResponse {
  988. optional string prev_value = 1;
  989. optional string state = 2;
  990. }
  991. message TIncLabelRequest {
  992. optional string name = 1;
  993. optional string label = 2; // missing label starts from 0
  994. optional int64 add = 3 [ default = 1];
  995. }
  996. message TIncLabelResponse {
  997. optional int64 result = 1;
  998. }
  999. message TSetSymlinkRequest {
  1000. optional string container = 1;
  1001. optional string symlink = 2;
  1002. optional string target = 3;
  1003. }
  1004. // Volumes
  1005. message TNewVolumeRequest {
  1006. optional TVolumeSpec volume = 1;
  1007. }
  1008. message TNewVolumeResponse {
  1009. optional TVolumeSpec volume = 1;
  1010. }
  1011. message TGetVolumeRequest {
  1012. optional string container = 1; // get paths in container, default: self (client container)
  1013. repeated string path = 2; // volume path in container, default: all
  1014. optional uint64 changed_since = 3; // change_time >= changed_since
  1015. repeated string label = 4; // labels or wildcards
  1016. }
  1017. message TGetVolumeResponse {
  1018. repeated TVolumeSpec volume = 1;
  1019. }
  1020. // List available volume properties
  1021. message TListVolumePropertiesRequest {
  1022. }
  1023. message TListVolumePropertiesResponse {
  1024. message TVolumePropertyDescription {
  1025. optional string name = 1;
  1026. optional string desc = 2;
  1027. }
  1028. repeated TVolumePropertyDescription list = 1;
  1029. }
  1030. // Create new volume
  1031. // "createVolume" returns TVolumeDescription in "volume"
  1032. message TCreateVolumeRequest {
  1033. optional string path = 1;
  1034. map<string, string> properties = 2;
  1035. }
  1036. message TLinkVolumeRequest {
  1037. optional string path = 1;
  1038. optional string container = 2; // default - self (client container)
  1039. optional string target = 3; // path in container, "" - anon
  1040. optional bool required = 4; // stop container at fail
  1041. optional bool read_only = 5;
  1042. }
  1043. message TUnlinkVolumeRequest {
  1044. optional string path = 1;
  1045. optional string container = 2; // default - self, "***" - all
  1046. optional bool strict = 3; // non-lazy umount
  1047. optional string target = 4; // path in container, "" - anon, default - "***" - all
  1048. }
  1049. message TListVolumesRequest {
  1050. optional string path = 1; // volume path or wildcard
  1051. optional string container = 2;
  1052. optional uint64 changed_since = 3; // change_time >= changed_since
  1053. }
  1054. message TListVolumesResponse {
  1055. repeated TVolumeDescription volumes = 1;
  1056. }
  1057. message TTuneVolumeRequest {
  1058. optional string path = 1;
  1059. map<string, string> properties = 2;
  1060. }
  1061. // Layers
  1062. message TListLayersRequest {
  1063. optional string place = 1; // default from client container
  1064. optional string mask = 2;
  1065. }
  1066. message TListLayersResponse {
  1067. repeated string layer = 1; // layer names (legacy)
  1068. repeated TLayer layers = 2; // layer with description
  1069. }
  1070. message TImportLayerRequest {
  1071. optional string layer = 1;
  1072. optional string tarball = 2;
  1073. optional bool merge = 3;
  1074. optional string place = 4;
  1075. optional string private_value = 5;
  1076. optional string compress = 6;
  1077. optional bool verbose_error = 7;
  1078. }
  1079. message TExportLayerRequest {
  1080. optional string volume = 1;
  1081. optional string tarball = 2;
  1082. optional string layer = 3;
  1083. optional string place = 4;
  1084. optional string compress = 5;
  1085. }
  1086. message TRemoveLayerRequest {
  1087. optional string layer = 1;
  1088. optional string place = 2;
  1089. optional bool async = 3;
  1090. }
  1091. message TGetLayerPrivateRequest {
  1092. optional string layer = 1;
  1093. optional string place = 2;
  1094. }
  1095. message TGetLayerPrivateResponse {
  1096. optional string private_value = 1;
  1097. }
  1098. message TSetLayerPrivateRequest {
  1099. optional string layer = 1;
  1100. optional string place = 2;
  1101. optional string private_value = 3;
  1102. }
  1103. // Storages
  1104. message TListStoragesRequest {
  1105. optional string place = 1;
  1106. optional string mask = 2; // "name" - storage, "name/" - meta-storage
  1107. }
  1108. message TListStoragesResponse {
  1109. repeated TStorage storages = 1;
  1110. repeated TMetaStorage meta_storages = 2;
  1111. }
  1112. message TRemoveStorageRequest {
  1113. optional string name = 1;
  1114. optional string place = 2;
  1115. }
  1116. message TImportStorageRequest {
  1117. optional string name = 1;
  1118. optional string tarball = 2;
  1119. optional string place = 3;
  1120. optional string private_value = 5;
  1121. optional string compress = 6;
  1122. }
  1123. message TExportStorageRequest {
  1124. optional string name = 1;
  1125. optional string tarball = 2;
  1126. optional string place = 3;
  1127. optional string compress = 4;
  1128. }
  1129. // Docker images API
  1130. message TDockerImageConfig {
  1131. repeated string cmd = 1;
  1132. repeated string env = 2;
  1133. }
  1134. message TDockerImage {
  1135. required string id = 1;
  1136. repeated string tags = 2;
  1137. repeated string digests = 3;
  1138. repeated string layers = 4;
  1139. optional uint64 size = 5;
  1140. optional TDockerImageConfig config = 6;
  1141. }
  1142. message TDockerImageStatusRequest {
  1143. required string name = 1;
  1144. optional string place = 2;
  1145. }
  1146. message TDockerImageStatusResponse {
  1147. optional TDockerImage image = 1;
  1148. }
  1149. message TDockerImageListRequest {
  1150. optional string place = 1;
  1151. optional string mask = 2;
  1152. }
  1153. message TDockerImageListResponse {
  1154. repeated TDockerImage images = 1;
  1155. }
  1156. message TDockerImagePullRequest {
  1157. required string name = 1;
  1158. optional string place = 2;
  1159. optional string auth_token = 3;
  1160. optional string auth_path = 4;
  1161. optional string auth_service = 5;
  1162. }
  1163. message TDockerImagePullResponse {
  1164. optional TDockerImage image = 1;
  1165. }
  1166. message TDockerImageRemoveRequest {
  1167. required string name = 1;
  1168. optional string place = 2;
  1169. }