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-06 01:56:07 +00:00
|
|
|
SERVER_INFO = 1;
|
|
|
|
LIST = 2;
|
|
|
|
ATTACH = 3;
|
|
|
|
DETACH = 4;
|
|
|
|
INSERT = 5;
|
|
|
|
EJECT = 6;
|
|
|
|
PROTECT = 7;
|
|
|
|
LOG_LEVEL = 8;
|
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;
|
|
|
|
string type = 3;
|
|
|
|
string file = 4;
|
2021-08-07 00:50:20 +00:00
|
|
|
bool removable = 5;
|
|
|
|
bool read_only = 6;
|
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-07-22 12:47:08 +00:00
|
|
|
}
|