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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003
|
// Copyright 2018 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
// This file defines messages used for interacting directly with containers
// running inside of a VM.
package vm_tools.cicerone;
option go_package = "go.chromium.org/chromiumos/system_api/vm_cicerone_proto";
import "vm_applications/apps.proto";
// Message sent from concierge to cicerone when a VM has started up. This is
// just for tracking purposes by cicerone.
message NotifyVmStartedRequest {
// Name of the VM.
string vm_name = 1;
// The owner of the VM.
string owner_id = 2;
// The virtual socket context id assigned to the VM.
uint32 cid = 3;
// The token to identify the VM, only used with plugin VMs that don't have
// containers.
string vm_token = 4;
// The pid of the main VM process.
uint32 pid = 5;
// The type of VM.
vm_tools.apps.VmType vm_type = 6;
}
// Message sent to cicerone when concierge is about to stop a VM.
// This is just for tracking purposes by cicerone. This may not be
// sent if the VM stops unexpectedly.
message NotifyVmStoppingRequest {
// Name of the VM.
string vm_name = 1;
// The owner of the VM.
string owner_id = 2;
}
// Message sent to cicerone when a VM stopped or failed to complete startup.
// This is just for tracking purposes by cicerone.
message NotifyVmStoppedRequest {
// Name of the VM.
string vm_name = 1;
// The owner of the VM.
string owner_id = 2;
}
// Message sent to cicerone when requesting a token for linking to a container
// that is going to be started for a VM.
message ContainerTokenRequest {
// Name of the VM.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM.
string owner_id = 3;
}
// Reply to the GetContainerToken method.
message ContainerTokenResponse {
// A token that should be passed into the container to identify itself. This
// token will be the empty string if the request was invalid.
string container_token = 1;
}
// Message used in the signal for when tremplin has started.
message TremplinStartedSignal {
// Name of the VM the container is in.
string vm_name = 1;
// The owner of the VM.
string owner_id = 2;
}
// Message used in the signal for when a container has started up.
message ContainerStartedSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// The username of uid 1000 in the container.
string container_username = 4;
// The home directory of uid 1000 in the container.
string container_homedir = 5;
// The IPv4 address of the container.
string ipv4_address = 6;
// The vsock port that sftp-server runs on.
uint32 sftp_vsock_port = 7;
// A token used to identify the container, usually stored in
// /.dev/container_token.
string container_token = 8;
}
// Message used in the signal for when a container has shut down.
message ContainerShutdownSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
}
enum ContainerFeature {
UNKNOWN = 0;
ENABLE_GTK3_IME_SUPPORT = 1;
ENABLE_VIRTUAL_KEYBOARD_SUPPORT = 2;
ENABLE_QT_IME_SUPPORT = 3;
}
// Request to launch on application in the specified VM/container. Used with the
// LaunchContainerApplication D-Bus message into vm_cicerone.
message LaunchContainerApplicationRequest {
// Display scaling of the app windows.
enum DisplayScaling {
// Default scaling.
UNSCALED = 0;
// Windows scaled. Used to scale up older app windows that don't show well
// with HiDPI display otherwise.
SCALED = 1;
}
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target, if empty the default
// container name will be used.
string container_name = 2;
// ID of the application to launch, should map to the desktop_file_id that
// is in the application list sent back from the container.
string desktop_file_id = 3;
// The owner of the vm and container.
string owner_id = 4;
// Files to pass as arguments when launching the application, if any, given
// as absolute paths within the container's filesystem.
repeated string files = 5;
// Display scaling requested.
DisplayScaling display_scaling = 6;
// Features to enable in the container.
repeated ContainerFeature container_features = 7;
}
// Response sent back by vm_cicerone when it receives a
// LaunchContainerApplication D-Bus message.
message LaunchContainerApplicationResponse {
// If true, the requested application launched successfully.
bool success = 1;
// The failure_reason if the requested application could not be started.
string failure_reason = 2;
}
// Request to get application icons in the specified VM/container. Used with the
// GetContainerAppIcon D-Bus message into vm_cicerone.
message ContainerAppIconRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target, if empty the default
// container name will be used.
string container_name = 2;
// IDs of the application to get icons for, should map to the desktop_file_id
// that is in the application list sent back from the container.
repeated string desktop_file_ids = 3;
// The icon size with both its height and width equal to this number.
int32 size = 4;
// The target scale of this icon. This is the scale factor at which this icon
// is designed to be used.
int32 scale = 5;
// The owner of the VM and container.
string owner_id = 6;
}
// One desktop file ID and the icon found for it.
message DesktopIcon {
enum Format {
PNG = 0;
SVG = 1;
}
string desktop_file_id = 1;
// Icon data as uninterpreted bytes.
bytes icon = 2;
// Interpretation hint for icon bytes
Format format = 3;
}
// Response sent back by vm_cicerone when it receives a
// GetContainerAppIcon D-Bus message.
// Some desktop_file_id may not have an icon.
message ContainerAppIconResponse {
repeated DesktopIcon icons = 1;
}
// Launch vshd request.
message LaunchVshdRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target.
string container_name = 2;
// The port for vshd to connect to.
uint32 port = 3;
// The owner of the VM and container.
string owner_id = 4;
// Features to enable in the container.
repeated ContainerFeature container_features = 5;
}
// Response sent back by vm_cicerone when it receives a LaunchVshd
// call.
message LaunchVshdResponse {
// True if vshd was successfully spawned in the VM.
bool success = 1;
// The reason vshd could not be started, if |success| is false.
string failure_reason = 2;
// The cid the LaunchVshd request was sent to. Only valid if |success|
// is true.
uint32 cid = 3;
}
// Request to get information about a Linux package in the container.
message LinuxPackageInfoRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Path to the package file (e.g. .deb) in the container's filesystem.
string file_path = 4;
// Name (not package_id) of package to look up. Used when |file_path| is
// empty.
string package_name = 5;
}
// Response sent back from a GetLinuxPackageInfo call.
message LinuxPackageInfoResponse {
// True if the file was successfully parsed and the other fields are valid.
bool success = 1;
// Contains a textual reason for the failure in case success is false.
string failure_reason = 2;
// The package identifier is in the form of a semicolon delimited string of
// the format: name;version;arch;data
// name, version and arch are as expected. data is somewhat variant and refers
// to the state of the package as well as potentially remote repository
// information.
string package_id = 3;
// The license associated with the package. So far only the value of
// 'unknown' has been observed for this field.
string license = 4;
// The description of the package, can be a multi-line text string.
string description = 5;
// The URL for the homepage of the project.
string project_url = 6;
// Size of the package file in bytes.
uint64 size = 7;
// Usually more of a title for a package, but sometimes less descriptive
// than that.
string summary = 8;
}
// Request to install a Linux package in the container.
message InstallLinuxPackageRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Path to the package file (e.g. .deb) in the container's filesystem.
string file_path = 4;
// Package ID to install in the form "package_name;version;arch;data". Used
// when |file_path| is empty.
string package_id = 5;
// Command identifier to track installation progress.
string command_uuid = 6;
}
// Response sent back from a InstallLinuxPackage call.
message InstallLinuxPackageResponse {
enum Status {
// Install process was successfully started, all further updates will be
// sent via the InstallLinuxPackageProgress signal.
STARTED = 0;
// Failed to start up for a general reason, specific details are given in
// failure_reason.
FAILED = 1;
// Indicates another install is already in process, this one will not be
// started.
INSTALL_ALREADY_ACTIVE = 2;
}
Status status = 1;
// Contains a textual reason for the failure in case of a FAILED status.
string failure_reason = 2;
}
// Message used in a signal for updates on Linux package installations.
message InstallLinuxPackageProgressSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// Install has completed and was successful. No further signals will be
// sent after this one.
SUCCEEDED = 0;
// Install failed to complete, the specific reason will be in
// failure_details. No further signals will be sent after this one.
FAILED = 1;
// This is sent periodically while packages are being downloaded.
DOWNLOADING = 2;
// This is sent periodically during the general installation phase for
// package and dependency installation.
INSTALLING = 3;
}
// Current status of the installation progress.
Status status = 4;
// Overall percentage progress.
uint32 progress_percent = 5;
// Details relating to the failure state. This can be a multi-line string in
// some cases (that's how it comes out of PackageKit, for example in the case
// of an unsatisfiable dependency).
string failure_details = 6;
// Command identifier that is specified in |InstallLinuxPackageRequest| to
// track installation progress.
string command_uuid = 7;
}
// Request to uninstall the package owning the indicated file. Identifying the
// package-to-be-uninstalled by desktop file name is safer than using
// package_id; we don't watch for package upgrades so the package_id may be
// stale.
message UninstallPackageOwningFileRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// The ID of the .desktop file inside the container. The container will find
// the owning package and remove it.
string desktop_file_id = 4;
}
// Response sent back from a UninstallPackageOwningFile call.
message UninstallPackageOwningFileResponse {
enum Status {
// Uninstall process was successfully started, all further updates will be
// sent via the UninstallPackageProgress signal.
STARTED = 0;
// Failed to start up for a general reason, specific details are given in
// failure_reason.
FAILED = 1;
// Indicates another blocking operation (uninstall, install, etc) is already
// in progress, this one will not be started.
BLOCKING_OPERATION_IN_PROGRESS = 2;
}
Status status = 1;
// Contains a textual reason for the failure in case status is FAILED.
string failure_reason = 2;
}
// Message used in a signal for updates on UninstallPackageOwningFile calls.
message UninstallPackageProgressSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// Uninstall has completed and was successful. No further signals will be
// sent after this one.
SUCCEEDED = 0;
// Uninstall failed to complete, the specific reason will be in
// failure_details. No further signals will be sent after this one.
FAILED = 1;
// This is sent while the uninstall is in progress. progress_percent will be
// filled in.
UNINSTALLING = 2;
}
// Current status of the uninstallation progress.
Status status = 4;
// Overall percentage progress.
uint32 progress_percent = 5;
// Details relating to the failure state.
string failure_details = 6;
}
// Request for creating an LXD container.
message CreateLxdContainerRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container to start within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// LXD image server URL. Only simplestreams is supported for now.
string image_server = 4;
// LXD image alias.
string image_alias = 5;
// rootfs path to create the container from.
string rootfs_path = 6;
// metadata path to create the container from.
string metadata_path = 7;
}
// Response for creating an LXD container.
message CreateLxdContainerResponse {
enum Status {
// The status of creating the container is unknown.
UNKNOWN = 0;
// The container is now being created. An LxdContainerCreated signal will
// relay the final result.
CREATING = 1;
// A container with this name already exists.
EXISTS = 2;
// The container could not be created.
FAILED = 3;
}
// Container creation status.
Status status = 1;
// The failure_reason if the container could not be created.
string failure_reason = 2;
}
// Message used in the LxdContainerCreated signal for the outcome of an
// LxdCreateContainer message.
message LxdContainerCreatedSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// The container creation status is unknown.
UNKNOWN = 0;
// The container was successfully created.
CREATED = 1;
// The container download timed out.
DOWNLOAD_TIMED_OUT = 2;
// The container creation was cancelled.
CANCELLED = 3;
// The container creation failed for an unspecified reason.
FAILED = 4;
}
// Container creation status.
Status status = 4;
// The failure_reason if the container was not successfully created.
string failure_reason = 5;
}
// Request for deleting an LXD container.
message DeleteLxdContainerRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container to start within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
}
// Response for deleting an LXD container.
message DeleteLxdContainerResponse {
enum Status {
// The status of deleting the container is unknown
UNKNOWN = 0;
// The container is being deleted.
DELETING = 1;
// The named container doesn't exist.
DOES_NOT_EXIST = 2;
// The container could not be deleted.
FAILED = 3;
}
// Container deletion status.
Status status = 1;
// The failure_reason if the container could not be deleted.
string failure_reason = 2;
}
// Message used in the LxdContainerDeleted signal for the outcome of an
// LxdDeleteContainer message.
message LxdContainerDeletedSignal {
enum Status {
// Deletion status is unknown.
UNKNOWN = 0;
// The container has been deleted.
DELETED = 1;
// The container deletion was cancelled.
CANCELLED = 2;
// One or more steps failed and the container could not be deleted.
FAILED = 3;
}
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Container deletion status.
Status status = 4;
// The failure_reason if the container was not successfully deleted.
string failure_reason = 5;
}
// Request to set timezone for all containers in all VMs known to cicerone.
message SetTimezoneRequest {
// The timezone name to set, for example "America/Denver" or "Etc/UTC".
// See /usr/share/zoneinfo, 'timedatectl list-timezones', or the timezone-data
// package for other valid names.
//
// This name will also specify the zoneinfo file from which cicerone will
// parse a posix TZ string. That string will be used as a fallback in the
// case that the VM does not support zoneinfo files for timezones.
string timezone_name = 1;
}
// Response to setting timezone for all containers in all VMs known to cicerone.
message SetTimezoneResponse {
// The number of containers for which the timezone was successfully set.
int32 successes = 1;
// The failure reason for each container for which the timezone could not be
// set.
repeated string failure_reasons = 2;
}
// Message used in the signal for when a container is downloading.
message LxdContainerDownloadingSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Container download progress, as a percentage.
int32 download_progress = 4;
}
// Request for starting an LXD container.
message StartLxdContainerRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container to start within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Deprecated. All calls are async.
bool async = 4 [deprecated = true];
// Full path where drivefs is mounted (/media/fuse/drivefs-<drivefs-hash>).
string drivefs_mount_path = 5;
// Represents the privilege level with which a container should be started. If
// the container is already running this should take effect on the next boot.
enum PrivilegeLevel {
// Don't change the privilege level of the container.
UNCHANGED = 0;
// Make the container unprivileged.
UNPRIVILEGED = 1;
// Make the container privileged.
PRIVILEGED = 2;
}
PrivilegeLevel privilege_level = 6;
// Audio capture should not be allowed in the container even if the host VM
// supports it.
bool disable_audio_capture = 7;
}
// OsRelease encapsulates a subset of the os-release info as documented
// at https://www.freedesktop.org/software/systemd/man/os-release.html.
message OsRelease {
// A pretty operating system name in a format suitable for presentation to the
// user. May or may not contain a release code name or OS version of some
// kind, as suitable. (e.g. "Debian GNU/Linux 10 (buster)").
string pretty_name = 1;
// A string identifying the operating system, without a version component,
// and suitable for presentation to the user (e.g. "Debian GNU/Linux").
string name = 2;
// String identifying OS version possibly including release codename.
// (e.g. "10 (buster)").
string version = 3;
// Lower case string (mostly numeric) identifying OS version (e.g. "10").
string version_id = 4;
// Lower case string identifying the operating system (e.g. "debian").
string id = 5;
}
// Response for starting an LXD container.
message StartLxdContainerResponse {
enum Status {
// The status of starting the container is unknown.
UNKNOWN = 0;
// The container has started. This is only valid if async was false in the
// request.
STARTED = 1;
// The container was already running.
RUNNING = 2;
// The container could not be started.
FAILED = 3;
// The container is starting. This is only valid if async was true in the
// request.
STARTING = 4;
// The container is remapping its rootfs uids/gids and will take longer than
// usual to start up. This is only valid if async was true in the request.
REMAPPING = 5;
}
// Container startup status.
Status status = 1;
// The failure_reason if the container could not be started.
string failure_reason = 2;
// OS strings found in the container's /etc/os-release, e.g. "stretch".
OsRelease os_release = 3;
}
// Message used in the signal for when a container is starting.
message LxdContainerStartingSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// Start status is unknown.
UNKNOWN = 0;
// The container has started. No more signals are expected.
STARTED = 1;
// The container start was cancelled. No more signals are expected.
CANCELLED = 2;
// One or more steps failed and the container could not be started. No
// more signals are expected.
FAILED = 3;
// Still starting, this is sent as a heartbeat on an interval.
STARTING = 4;
}
// The current status of starting the container.
Status status = 4;
// The failure_reason if the container was not successfully started.
string failure_reason = 5;
// OS strings found in the container's /etc/os-release, e.g. "stretch".
OsRelease os_release = 6;
}
message StopLxdContainerRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
}
message StopLxdContainerResponse {
enum Status {
// The status of stopping the container is unknown
UNKNOWN = 0;
// The container is already stopped.
STOPPED = 1;
// The container is being stopped.
STOPPING = 2;
// The named container doesn't exist.
DOES_NOT_EXIST = 3;
// The container could not be stopped.
FAILED = 4;
}
// Container stopping status.
Status status = 1;
// The failure_reason if the container could not be stopped.
string failure_reason = 2;
}
message LxdContainerStoppingSignal {
enum Status {
// Stopping status is unknown.
UNKNOWN = 0;
// The container has been stopped.
STOPPED = 1;
// The container is stopping.
STOPPING = 2;
// The container stop was cancelled.
CANCELLED = 3;
// One or more steps failed and the container could not be stopped.
FAILED = 4;
}
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// The current stopping status of the container.
Status status = 4;
// The failure_reason if the container could not be stopped.
string failure_reason = 5;
}
// Request for getting the primary user for an LXD container.
message GetLxdContainerUsernameRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container to get the primary user for.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
}
// Response for getting the primary user for an LXD container.
message GetLxdContainerUsernameResponse {
enum Status {
// The status is unknown.
UNKNOWN = 0;
// The primary username is stored in the username field.
SUCCESS = 1;
// A container with the specified name doesn't exist.
CONTAINER_NOT_FOUND = 2;
// The container is not running, so the username could not be found.
CONTAINER_NOT_RUNNING = 3;
// The primary user doesn't exist.
USER_NOT_FOUND = 4;
// Some part of the operation failed.
FAILED = 5;
}
// Status of getting the primary username.
Status status = 1;
// The primary username of the container, if successful.
string username = 2;
// The failure_reason if the username could not be retrieved.
string failure_reason = 3;
// The home directory of uid 1000 in the container.
string homedir = 4;
}
// Request for setting up the user for an LXD container.
message SetUpLxdContainerUserRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container to start within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Username for the first user in the container.
string container_username = 4;
}
// Response for setting up the user on an LXD container.
message SetUpLxdContainerUserResponse {
enum Status {
// The status of setting up the user is unknown.
UNKNOWN = 0;
// The user has been set up sucessfully.
SUCCESS = 1;
// The user already exists.
EXISTS = 2;
// Setting up the user failed.
FAILED = 3;
}
// Status of setting up the user.
Status status = 1;
// The failure_reason if the user was not set up successfully.
string failure_reason = 2;
// The username of uid 1000 in the container.
string container_username = 3;
}
// Request for debug information about virtual machine and container state.
message GetDebugInformationRequest {}
// Response for debug information about virtual machine and container state.
message GetDebugInformationResponse {
// Debug information about virtual machine and container state in arbitrary
// format.
string debug_information = 1;
}
message ExportLxdContainerRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container exporting.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Path to write the exported container. This path, or a parent
// must have already been shared using seneschal. It is the path relative
// to the VM root mount point (/mnt/shared) as returned in seneschal
// SharePathResponse.path. E.g.: "MyFiles/export". If path is a directory,
// it must already exist, and the export will be named <fingerprint>.tar.gz
// otherwise this path must already exist as a file, or its parent directory
// must exist.
string export_path = 4;
}
message ExportLxdContainerResponse {
enum Status {
// The result is unknown.
UNKNOWN = 0;
// The container is exporting. Further updates will be delievered via
// ExportLxdContainerProgressSignal.
EXPORTING = 1;
// One or more steps failed and the container could not be exported.
FAILED = 2;
}
// Current container status.
Status status = 1;
// Details relating to the failure state.
string failure_reason = 2;
}
message CancelExportLxdContainerRequest {
// Name of the VM the container is in.
string vm_name = 1;
// The owner of the VM and container.
string owner_id = 2;
// The container name of the in-progress export.
string in_progress_container_name = 3;
}
message CancelExportLxdContainerResponse {
enum Status {
// The result is unknown.
UNKNOWN = 0;
// The cancel for the in-progress request has been queued.
// The in-progress request may yet complete before the cancel is processed.
CANCEL_QUEUED = 1;
// No in-progress request was found with that container name.
OPERATION_NOT_FOUND = 2;
// One or more steps failed and the cancel could not be scheduled.
FAILED = 3;
}
// The status of the cancellation.
Status status = 1;
// Details relating to the failure state.
string failure_reason = 2;
}
message ExportLxdContainerProgressSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container exporting.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// The result is unknown.
UNKNOWN = 0;
// Export is completed.
DONE = 1;
// One or more steps failed and the container could not be exported.
FAILED = 2;
// Deprecated. The container is exporting into a tar file.
EXPORTING_TAR = 3 [deprecated = true];
// Deprecated. The container tar file is being compressed into an image
// file.
EXPORTING_COMPRESS = 4 [deprecated = true];
// Deprecated. The exported image file is being downloaded.
EXPORTING_DOWNLOAD = 5 [deprecated = true];
// Deprecated. The exported image file is being packed. This is equivalent
// to tar/compress.
EXPORTING_PACK = 6 [deprecated = true];
// EXPORTING_PACK and EXPORTING_DOWNLOAD have been combined into
// EXPORTING_STREAMING. The exported image file is being tar'd, compressed'd
// and download'd out of the container.
EXPORTING_STREAMING = 7;
// The export was cancelled by a CancelExportLxdContainerRequest.
CANCELLED = 8;
}
// Container status.
Status status = 4;
// Deprecated. Percentage progress for the current stage given in status.
uint32 progress_percent = 5 [deprecated = true];
// Deprecated. Speed (bytes per second) for the current stage given in status.
uint64 progress_speed = 6 [deprecated = true];
// Details relating to the failure state.
string failure_reason = 7;
// Total number of files in the input container.
uint32 total_input_files = 8;
// Total size of the files in the input container.
uint64 total_input_bytes = 9;
// Number of files in the input container that have been downloaded.
uint32 input_files_streamed = 10;
// Size of the files in the input container that have been downloaded.
uint64 input_bytes_streamed = 11;
// Number of compressed bytes that have been exported.
uint64 bytes_exported = 12;
}
message ImportLxdContainerRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container importing.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Path to read the imported container. This is a file which
// must have already been shared using seneschal. It is the path relative
// to the VM root mount point (/mnt/shared) as returned in seneschal
// SharePathResponse.path. E.g.: "MyFiles/export/backup.tar.gz".
string import_path = 4;
}
message ImportLxdContainerResponse {
enum Status {
// The result is unknown.
UNKNOWN = 0;
// The container is importing. Further updates will be delievered via
// ImportLxdContainerProgressSignal.
IMPORTING = 1;
// One or more steps failed and the container could not be imported.
FAILED = 2;
}
// Current container status.
Status status = 1;
// Details relating to the failure state.
string failure_reason = 2;
}
message CancelImportLxdContainerRequest {
// Name of the VM the container is in.
string vm_name = 1;
// The owner of the VM and container.
string owner_id = 2;
// The container name of the in-progress import.
string in_progress_container_name = 3;
}
message CancelImportLxdContainerResponse {
enum Status {
// The result is unknown.
UNKNOWN = 0;
// The cancel for the in-progress request has been queued.
// The in-progress request may yet complete before the cancel is processed.
CANCEL_QUEUED = 1;
// No in-progress request was found with that container name.
OPERATION_NOT_FOUND = 2;
// One or more steps failed and the cancel could not be scheduled.
FAILED = 3;
}
// The status of the cancellation.
Status status = 1;
// Details relating to the failure state.
string failure_reason = 2;
}
message ImportLxdContainerProgressSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container importing.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// The result is unknown.
UNKNOWN = 0;
// Import is completed.
DONE = 1;
// One or more steps failed and the container could not be imported.
FAILED = 2;
// The image is being uploaded.
IMPORTING_UPLOAD = 3;
// The image is being unpacked to create a container.
IMPORTING_UNPACK = 4;
// The container could not be imported due to mismatched architecture.
FAILED_ARCHITECTURE = 5;
// The container could not be imported due to insufficient space.
FAILED_SPACE = 6;
// The import was cancelled by a CancelImportLxdContainerRequest.
CANCELLED = 7;
}
// Container status.
Status status = 4;
// Percentage progress for the current stage given in status.
uint32 progress_percent = 5;
// Speed (bytes per second) for the current stage given in status.
uint64 progress_speed = 6;
// Details relating to the failure state.
string failure_reason = 7;
// Architecture of device. Set when status is FAILED_ARCHITECTURE.
string architecture_device = 8;
// Architecture of container which failed to import.
// Set when status is FAILED_ARCHITECTURE.
string architecture_container = 9;
// Available space for import. Set when status is FAILED_SPACE.
uint64 available_space = 10;
// Minimum required space for import. Set when status is FAILED_SPACE.
uint64 min_required_space = 11;
}
message PendingAppListUpdatesSignal {
// Name of the VM on which the app list updates will run.
string vm_name = 1;
// Name of the container on which the app list updates will run.
string container_name = 2;
// Number of currently scheduled app list updates for this container.
uint32 count = 3;
}
message ApplyAnsiblePlaybookRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Ansible playbook to be applied.
string playbook = 4;
}
message ApplyAnsiblePlaybookResponse {
enum Status {
// The status is unknown.
UNKNOWN = 0;
// Application process was successfully started, all further updates will be
// sent via the ApplyAnsiblePlaybookProgress signal.
STARTED = 1;
// Failed to start up for a general reason, specific details are given in
// failure_reason.
FAILED = 2;
}
Status status = 1;
// Contains a textual reason for the failure in case of a FAILED status.
string failure_reason = 2;
}
message ApplyAnsiblePlaybookProgressSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// The signal has unknown status.
UNKNOWN = 0;
// Application has completed and was successfull. No further signals will be
// sent after this one.
SUCCEEDED = 1;
// Application failed to complete, the specific reason will be in
// failure_details. No further signals will be sent after this one.
FAILED = 2;
// Ansible playbook is being currently applied.
IN_PROGRESS = 3;
}
// Current status of the application progress.
Status status = 4;
// Contains a textual reason for the failure in case of a FAILED status.
string failure_details = 5;
// Displays details of the current progress of the Ansible process.
repeated string status_string = 6;
}
message ConfigureForArcSideloadRequest {
// Name of the VM to target.
string vm_name = 1;
// Name of the container within the VM to target.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
}
message ConfigureForArcSideloadResponse {
enum Status {
// The status is unknown.
UNKNOWN = 0;
// The configuration succeeded.
SUCCEEDED = 2;
// The configuration failed.
FAILED = 3;
}
// Status of the request.
Status status = 1;
// If status is FAILED, contains the reason the request failed.
string failure_reason = 2;
}
// Request for a container to create a tunnel to a prepared port on the host.
message ConnectChunnelRequest {
// Name of the VM to tunnel traffic to.
string vm_name = 1;
// Name of the container within the VM to target.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Name of the container to tunnel traffic to.
// Target vsock port to forward traffic from. This port must be listening
// and ready to accept a connection from the chunnel client.
uint32 chunneld_port = 4;
// Target TCPv4 port to forward traffic to. Chunnel in the guest will connect
// to localhost:target_tcp4_port.
uint32 target_tcp4_port = 5;
}
// Response to ConnectChunnelRequest.
message ConnectChunnelResponse {
enum Status {
// The result is unknown.
UNKNOWN = 0;
// Chunnel was successfully launched in the container.
SUCCESS = 1;
// One or more steps failed and chunnel could not be connected.
FAILED = 2;
}
// Status of the request.
Status status = 1;
// If status is FAILED, contains the reason the request failed.
string failure_reason = 2;
}
message UpgradeContainerRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container to upgrade.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Version {
// Uknown OS version.
UNKNOWN = 0;
// Debian 9 AKA Stretch.
DEBIAN_STRETCH = 1;
// Debian 10 AKA Buster.
DEBIAN_BUSTER = 2;
// Debian 11 AKA Bullseye.
DEBIAN_BULLSEYE = 3;
// Debian 12 AKA Bookworm.
DEBIAN_BOOKWORM = 4;
}
// Version from which the container will upgrade.
// Ignored, since tremplin is in a better place to determine this
// then the caller.
Version source_version = 4 [deprecated = true];
// Version to which the container will be upgraded.
Version target_version = 5;
}
message UpgradeContainerResponse {
enum Status {
// The result is unknown.
UNKNOWN = 0;
// Upgrade successfully started.
STARTED = 1;
// An upgrade is already running.
ALREADY_RUNNING = 2;
// Upgrade path not supported e.g. buster->stretch.
NOT_SUPPORTED = 3;
// The container is already upgraded to the requested target_version.
ALREADY_UPGRADED = 4;
// Failed to start the upgrade for some other reason.
FAILED = 5;
}
// Status of the request.
Status status = 1;
// If status is FAILED, contains the reason the request failed.
string failure_reason = 2;
}
message CancelUpgradeContainerRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container being upgraded.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
}
message CancelUpgradeContainerResponse {
enum Status {
// The status is unknown.
UNKNOWN = 0;
// Upgrade was not in progress, nothing to do.
NOT_RUNNING = 1;
// Upgrade cancelled.
CANCELLED = 2;
// Failed to cancel.
FAILED = 3;
}
// Status of the request.
Status status = 1;
// If status is FAILED, contains the reason the request failed.
string failure_reason = 2;
}
message UpgradeContainerProgressSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container to upgrade.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
enum Status {
// The current status is unknown.
UNKNOWN = 0;
// Still in progress.
IN_PROGRESS = 1;
// Completed successfully.
SUCCEEDED = 2;
// Failed to complete.
FAILED = 3;
}
// Status of the upgrade.
Status status = 4;
// If status is FAILED, contains the reason the upgrade failed.
string failure_reason = 5;
// Human readable upgrade progress.
repeated string progress_messages = 6;
}
message StartLxdRequest {
// Name of the VM to start LXD in.
string vm_name = 1;
// The owner of the VM.
string owner_id = 2;
// If true, opt-in to resetting the LXD DB on launch. If false, use whatever
// the default behaviour is.
bool reset_lxd_db = 3;
}
message StartLxdResponse {
enum Status {
// The status of creating the container is unknown.
UNKNOWN = 0;
// LXD is starting.
STARTING = 1;
// LXD is already running.
ALREADY_RUNNING = 2;
// Could not launch LXD.
FAILED = 3;
}
// LXD launch status
Status status = 1;
// The failure_reason if LXD could not be started.
string failure_reason = 2;
}
// Sent by tremplin to update the host on the start progress of starting LXD.
message StartLxdProgressSignal {
enum Status {
// The status of creating the container is unknown.
UNKNOWN = 0;
// LXD is starting.
STARTING = 1;
// Something went wrong, Tremplin is trying to recover LXD.
// This is still an in-progress status.
RECOVERING = 2;
// LXD is now running.
STARTED = 3;
// Could not launch LXD.
FAILED = 4;
}
// Name of the VM to start LXD in.
string vm_name = 1;
// The owner of the VM.
string owner_id = 2;
// LXD launch status
Status status = 3;
// The failure_reason if LXD could not be started.
string failure_reason = 4;
}
// Request to watch files and notify if there are changes. Used by FilesApp.
message AddFileWatchRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Directory in container relative to $HOME to watch.
string path = 4;
}
message AddFileWatchResponse {
enum Status {
// The current status is unknown.
UNKNOWN = 0;
// Watch added successfully.
SUCCEEDED = 2;
// Add watch failed.
FAILED = 1;
}
// Add watch status.
Status status = 1;
// The failure_reason if the watcher could not be added.
string failure_reason = 2;
}
// Request to stop watching files.
message RemoveFileWatchRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Directory in container relative to $HOME to stop watching.
string path = 4;
}
message RemoveFileWatchResponse {
enum Status {
// The current status is unknown.
UNKNOWN = 0;
// Watch removed successfully.
SUCCEEDED = 2;
// Remove watch failed.
FAILED = 1;
}
// Remove watch status.
Status status = 1;
// The failure_reason if the watcher could not be removed.
string failure_reason = 2;
}
// Sent by garcon to notify that a file in a watched directory has changed. Used
// by FilesApp.
message FileWatchTriggeredSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Path in container relative to $HOME that has changed.
string path = 4;
}
// Sent by garcon to notify that a container is running low on disk space.
message LowDiskSpaceTriggeredSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// How much free space is left in bytes.
uint64 free_bytes = 4;
}
// Sent by vsh to register session information such as the container shell pid,
// keyed from the host vsh pid. Crostini terminal will look up this info for
// features such as starting new terminals in the same cwd.
message RegisterVshSessionRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Process ID of vsh running in host.
int32 host_vsh_pid = 4;
// Process ID of shell spawned from vshd running in container. Set to 0 to
// remove mapping.
int32 container_shell_pid = 5;
}
message RegisterVshSessionResponse {
// True if pid mapping was completed.
bool success = 1;
// The reason the pid mapping failed.
string failure_reason = 2;
}
// Sent by chrome to query the container shell pid associated with vsh.
message GetVshSessionRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Process ID of vsh running in host.
int32 host_vsh_pid = 4;
}
message GetVshSessionResponse {
// True if container pid was found.
bool success = 1;
// The reason the pid was not found.
string failure_reason = 2;
// Process ID of shell spawned from vshd running in container.
int32 container_shell_pid = 3;
}
// Sent by chrome in response to a SelectFile dialog request.
message FileSelectedSignal {
// Name of the VM.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM.
string owner_id = 3;
// Token sent in request to match with response signal.
string select_file_token = 4;
// Files selected by user in SelectFile dialog.
repeated string files = 5;
}
// Sent by chrome to attach a USB device in a VM to a container.
message AttachUsbToContainerRequest {
// Name of the VM.
string vm_name = 1;
// Name of the container within the VM to attach to.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Attach USB devices on to this port.
int32 port_num = 4;
}
message AttachUsbToContainerResponse {
enum Status {
// The status is unknown.
UNKNOWN = 0;
// The USB port will be attached.
OK = 1;
// The container doesn't exist.
NO_SUCH_CONTAINER = 2;
// Failed to attach.
FAILED = 3;
}
// The status.
Status status = 1;
// Human-readable failure reason.
string failure_reason = 2;
}
// Sent by chrome to detach a USB device in a VM from a container.
message DetachUsbFromContainerRequest {
// Name of the VM.
string vm_name = 1;
// The owner of the VM.
string owner_id = 2;
// Detach USB devices on to this port.
int32 port_num = 3;
}
message DetachUsbFromContainerResponse {
enum Status {
// The status is unknown.
UNKNOWN = 0;
// The USB port will be detached.
OK = 1;
// Failed to detach.
FAILED = 2;
}
// The status.
Status status = 1;
// Human-readable failure reason.
string failure_reason = 2;
}
message ContainerInfo {
// The name of the VM.
string vm_name = 1;
// The name of the container within the VM.
string container_name = 2;
// OPTIONAL: If using LXD, information about the OS.
OsRelease os_release = 3;
// The token for the container. An empty string if not available.
string container_token = 4;
}
// Sent by chrome to query the list of containers and VMs that Cicerone knows
// about.
message ListRunningContainersRequest {
// The owner to list VMs and Containers for.
string owner_id = 1;
}
message ListRunningContainersResponse {
// List of known vms and containers.
repeated ContainerInfo containers = 1;
}
// Sent by chrome to get session info from Garcon.
message GetGarconSessionInfoRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
}
message GetGarconSessionInfoResponse {
enum Status {
// The current status is unknown.
UNKNOWN = 0;
// Generic error.
FAILED = 1;
// Unknown container.
NOT_FOUND = 2;
// Got info successfully.
SUCCEEDED = 3;
}
// Status.
Status status = 1;
// The failure reason if not successful.
string failure_reason = 2;
// The username of the user garcon is running as.
string container_username = 3;
// The home directory of the user garcon is running as.
string container_homedir = 4;
// The vsock port that sftp-server runs on.
uint32 sftp_vsock_port = 5;
}
// Sent to notify that a VM requests to inhibit sleep.
message InhibitScreensaverSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Identifier for the request, same cookie will be used to uninhibit
uint32 cookie = 4;
// The client which sent this request
string client = 5;
// The reason for inhibiting
string reason = 6;
}
// Sent to notify that a VM requests to uninhibit sleep.
message UninhibitScreensaverSignal {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Identifier for the request, corresponding inhibit should have been sent
uint32 cookie = 4;
}
// Devices hosted by a VM that are optional in a container
enum VmDevice {
MICROPHONE = 0;
CAMERA = 1;
}
enum VmDeviceAction {
// VmDevice should be enabled.
ENABLE = 0;
// VmDevice should be disabled.
DISABLE = 1;
}
message UpdateContainerDevicesRequest {
// Name of the VM the container is in.
string vm_name = 1;
// Name of the container within the VM.
string container_name = 2;
// The owner of the VM and container.
string owner_id = 3;
// Actions to take per VmDevice.
// The keys are really VmDevice, but proto doesn't allow enum keys.
map<string, VmDeviceAction> updates = 4;
}
message UpdateContainerDevicesResponse {
enum Status {
// The status is unknown.
UNKNOWN = 0;
// The actions were applied to the container where possible.
OK = 1;
// The requested container wasn't found.
NO_SUCH_CONTAINER = 2;
// Generic grpc error.
FAILED = 3;
}
enum UpdateResult {
// The VmDevice action was successful.
SUCCESS = 0;
// The VM had no such device so the action didn't apply.
NO_SUCH_VM_DEVICE = 1;
// The action could not be applied to the VmDevice.
ACTION_FAILED = 2;
}
// Status of the entire operation. Individual results should be checked even
// if status is OK.
Status status = 1;
// Human readable failure reason.
string failure_reason = 2;
// Results of actions per VmDevice.
// The keys are really VmDevice, but proto doesn't allow enum keys.
map<string, UpdateResult> results = 3;
}
|