2021-07-22 12:47:08 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package rascsi_interface;
|
|
|
|
|
|
|
|
// The supported device types
|
2021-07-24 00:13:05 +00:00
|
|
|
enum PbDeviceType {
|
2021-07-22 12:47:08 +00:00
|
|
|
UNDEFINED = 0;
|
|
|
|
SASI_HD = 1;
|
|
|
|
SCSI_HD = 2;
|
|
|
|
MO = 3;
|
|
|
|
CD = 4;
|
|
|
|
BR = 5;
|
|
|
|
NUVOLINK = 6;
|
|
|
|
DAYNAPORT = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
// rascsi remote operations
|
2021-07-24 00:13:05 +00:00
|
|
|
enum PbOperation {
|
2021-07-22 12:47:08 +00:00
|
|
|
NONE = 0;
|
2021-08-10 01:24:56 +00:00
|
|
|
// Returns the full server information
|
2021-08-06 01:56:07 +00:00
|
|
|
SERVER_INFO = 1;
|
2021-08-10 01:24:56 +00:00
|
|
|
// Returns the device list only (required for rasctl/logging semantics compatibility)
|
|
|
|
LIST = 2 [deprecated = true];
|
|
|
|
LOG_LEVEL = 3;
|
2021-08-08 15:08:58 +00:00
|
|
|
ATTACH = 4;
|
|
|
|
DETACH = 5;
|
|
|
|
INSERT = 6;
|
|
|
|
EJECT = 7;
|
|
|
|
PROTECT = 8;
|
|
|
|
UNPROTECT = 9;
|
2021-07-22 12:47:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Commands rascsi can execute
|
2021-07-24 00:13:05 +00:00
|
|
|
message PbCommand {
|
|
|
|
PbOperation cmd = 1;
|
2021-07-22 12:47:08 +00:00
|
|
|
int32 id = 2;
|
|
|
|
int32 un = 3;
|
2021-07-24 00:13:05 +00:00
|
|
|
PbDeviceType type = 4;
|
2021-07-22 12:47:08 +00:00
|
|
|
string params = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The result of a command
|
2021-07-24 00:13:05 +00:00
|
|
|
message PbResult {
|
2021-07-22 12:47:08 +00:00
|
|
|
bool status = 1;
|
|
|
|
string msg = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The device meta data
|
2021-07-24 00:13:05 +00:00
|
|
|
message PbDevice {
|
2021-07-22 12:47:08 +00:00
|
|
|
int32 id = 1;
|
|
|
|
int32 un = 2;
|
2021-08-08 15:08:58 +00:00
|
|
|
PbDeviceType type = 3;
|
2021-07-22 12:47:08 +00:00
|
|
|
string file = 4;
|
2021-08-08 15:08:58 +00:00
|
|
|
bool read_only = 5;
|
|
|
|
// Note: Read-only media (e.g. CD-ROMs) are not protectable
|
|
|
|
bool protectable = 6;
|
2021-08-10 01:24:56 +00:00
|
|
|
// Note: Read-only media (e.g. CD-ROMs) are not protected but just read-only
|
2021-08-08 15:08:58 +00:00
|
|
|
bool protected = 7;
|
|
|
|
bool removable = 8;
|
|
|
|
bool removed = 9;
|
|
|
|
bool lockable = 10;
|
|
|
|
bool locked = 11;
|
|
|
|
bool supports_file = 12;
|
2021-07-22 12:47:08 +00:00
|
|
|
}
|
|
|
|
|
2021-07-24 00:13:05 +00:00
|
|
|
message PbDevices {
|
|
|
|
repeated PbDevice devices = 1;
|
2021-08-06 01:56:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// The rascsi server information
|
|
|
|
message PbServerInfo {
|
|
|
|
string rascsi_version = 1;
|
|
|
|
// Sorted by severity
|
|
|
|
repeated string available_log_levels = 2;
|
|
|
|
string current_log_level = 3;
|
|
|
|
string default_image_folder = 4;
|
|
|
|
// Files in the default folder
|
|
|
|
repeated string available_image_files = 5;
|
2021-08-10 01:24:56 +00:00
|
|
|
// The attached devices
|
|
|
|
PbDevices devices = 6;
|
2021-07-22 12:47:08 +00:00
|
|
|
}
|