diff --git a/proto/orb_commands/v1/commands.proto b/proto/orb_commands/v1/commands.proto new file mode 100644 index 0000000..80bb8db --- /dev/null +++ b/proto/orb_commands/v1/commands.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package orb_commands.v1; + +message OrbCommandIssue { + uint64 command_id = 1; + oneof command { + OrbDetailsRequest orb_details = 2; + RebootRequest reboot = 3; + } +} + +message OrbCommandResult { + uint64 command_id = 1; + oneof result { + OrbCommandSuccess success = 2; + OrbCommandError error = 3; + OrbDetailsResponse orb_details = 4; + } +} + +message OrbCommandSuccess {} + +message OrbCommandError { + string error = 1; +} + +message OrbDetailsRequest {} + +message OrbDetailsResponse { + string orb_id = 1; + string orb_name = 2; + string jabil_id = 3; + string hardware_version = 4; + string software_version = 5; + string software_update_version = 6; + string os_release_type = 7; + string active_slot = 8; + uint64 uptime_seconds = 9; +} + +message RebootRequest { + uint64 delay_seconds = 1; +} diff --git a/rust/build.rs b/rust/build.rs index b5fc8f3..670d4a8 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -16,6 +16,7 @@ fn main() { "./proto/relay.proto", "./proto/common/v1/orb.proto", "./proto/common/v1/misc.proto", + "./proto/orb_commands/v1/commands.proto", "./proto/self_serve/app/v1/app.proto", "./proto/self_serve/orb/v1/orb.proto", "./proto/config/backend.proto", diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 0538e1d..18eaf75 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -52,3 +52,9 @@ pub mod self_serve { pub mod config { tonic::include_proto!("config"); } + +pub mod orb_commands { + pub mod v1 { + tonic::include_proto!("orb_commands.v1"); + } +}