AETHER-3162 Remove magma leftover iptables rule from enodebd
AETHER-3198 Add REUSE compliant to enodebd
AETHER-3196 Support identify IP from X-Real IP in enodebd
AETHER-3229 Documentation of configuration and state machine for enodebd
AETHER-3292 Adding new parameter to support in enodebd Sercomm driver
AETHER-3311 Remove unused protobuf definition from enodebd
Change-Id: Ie69f0141eff70cb3d4447cd9575c8224d42dd5e3
diff --git a/proto_files/orc8r/protos/magmad.proto b/proto_files/orc8r/protos/magmad.proto
new file mode 100644
index 0000000..41192da
--- /dev/null
+++ b/proto_files/orc8r/protos/magmad.proto
@@ -0,0 +1,147 @@
+// SPDX-FileCopyrightText: 2020 The Magma Authors.
+// SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+//
+// SPDX-License-Identifier: BSD-3-Clause
+
+syntax = "proto3";
+
+import "orc8r/protos/common.proto";
+import "orc8r/protos/mconfig.proto";
+import "google/protobuf/struct.proto";
+
+package magma.orc8r;
+option go_package = "magma/orc8r/lib/go/protos";
+
+
+message PingParams {
+ string host_or_ip = 1;
+ int32 num_packets = 2;
+}
+
+message TracerouteParams {
+ string host_or_ip = 1;
+ int32 max_hops = 2;
+ int32 bytes_per_packet = 3;
+}
+
+message NetworkTestRequest {
+ repeated PingParams pings = 1;
+ repeated TracerouteParams traceroutes = 2;
+}
+
+message PingResult {
+ string host_or_ip = 1;
+ int32 num_packets = 2;
+ string error = 3;
+ int32 packets_transmitted = 4;
+ int32 packets_received = 5;
+ float avg_response_ms = 6;
+}
+
+message TracerouteProbe {
+ string hostname = 1;
+ string ip = 2;
+ float rtt_ms = 3;
+}
+
+message TracerouteHop {
+ int32 idx = 1;
+ repeated TracerouteProbe probes = 2;
+}
+
+message TracerouteResult {
+ string error = 1;
+ string host_or_ip = 2;
+ repeated TracerouteHop hops = 3;
+}
+
+message NetworkTestResponse {
+ repeated PingResult pings = 1;
+ repeated TracerouteResult traceroutes = 2;
+}
+
+message GetGatewayIdResponse {
+ string gateway_id = 1;
+}
+
+message RestartServicesRequest {
+ repeated string services = 1;
+}
+
+message GenericCommandParams {
+ string command = 1;
+ google.protobuf.Struct params = 2;
+}
+
+message GenericCommandResponse {
+ google.protobuf.Struct response = 1;
+}
+
+message TailLogsRequest {
+ string service = 1;
+}
+
+message LogLine {
+ string line = 1;
+}
+
+message CheckStatelessResponse{
+ enum AGWMode {
+ INVALID = 0;
+ STATELESS = 1;
+ STATEFUL = 2;
+ CORRUPT = 3;
+ }
+ AGWMode agw_mode = 1;
+}
+
+message ConfigureStatelessRequest {
+ enum Cmd {
+ CHECK = 0;
+ DISABLE = 1;
+ ENABLE = 2;
+ }
+ Cmd config_cmd = 1;
+}
+
+// --------------------------------------------------------------------------
+// Magmad service definition.
+// --------------------------------------------------------------------------
+service Magmad {
+
+ // Starts all magma services
+ rpc StartServices (Void) returns (Void) {}
+
+ // Stops all magma services
+ rpc StopServices (Void) returns (Void) {}
+
+ // Reboot the gateway device
+ rpc Reboot (Void) returns (Void) {}
+
+ // Restart specified magma services
+ rpc RestartServices (RestartServicesRequest) returns (Void) {}
+
+ // Updates AG configs and restarts affected AG services
+ rpc SetConfigs (GatewayConfigs) returns (Void) {}
+
+ // Get current AG configs
+ rpc GetConfigs (Void) returns (GatewayConfigs) {}
+
+ // Execute some network commands to check gateway network health
+ rpc RunNetworkTests (NetworkTestRequest) returns (NetworkTestResponse) {}
+
+ // Get gateway hardware ID
+ rpc GetGatewayId (Void) returns (GetGatewayIdResponse) {}
+
+ // Execute generic command
+ rpc GenericCommand (GenericCommandParams) returns (GenericCommandResponse) {}
+
+ // Get stream of logs
+ rpc TailLogs (TailLogsRequest) returns (stream LogLine) {}
+
+ // CheckStateless returns whether AGW is stateless or stateful
+ rpc CheckStateless (Void) returns (CheckStatelessResponse) {}
+
+ // ConfigureStateless configures the stateless mode of AGW
+ rpc ConfigureStateless (ConfigureStatelessRequest) returns (Void) {}
+}