VOL-1848 API for setting and querying loglevel of api-server;
Add source-router to support routing UpdateLogLevel to cores;
Add logging endpoints to rocore
Change-Id: I89eea3599ea3006fe92e6917221cd1fd235ec5e4
diff --git a/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/afrouter.proto b/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/afrouter.proto
index 2f2ec00..c10a00f 100644
--- a/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/afrouter.proto
+++ b/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/afrouter.proto
@@ -6,10 +6,15 @@
package afrouter;
+// For logging
+import "voltha_protos/common.proto";
+
service Configuration {
- rpc SetConnection (Conn) returns (Result) {}
+ rpc SetConnection (Conn) returns (Result) {}
rpc SetAffinity(Affinity) returns (Result) {}
rpc GetGoroutineCount(Empty) returns (Count) {}
+ rpc UpdateLogLevel(common.Logging) returns (Empty) {}
+ rpc GetLogLevels(common.LoggingComponent) returns (common.Loggings) {}
}
message Result {
@@ -43,3 +48,4 @@
string backend = 4;
string id = 5;
}
+
diff --git a/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/common.proto b/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/common.proto
index 880c4ad..f5e68c4 100644
--- a/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/common.proto
+++ b/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/common.proto
@@ -34,6 +34,22 @@
}
}
+message Logging {
+ common.LogLevel.LogLevel level = 1;
+ string package_name = 2;
+ string component_name = 3;
+}
+
+// For GetLogLevels(), select component to query
+message LoggingComponent {
+ string component_name = 1;
+}
+
+// For returning multiple log levels
+message Loggings {
+ repeated Logging items = 1;
+}
+
message AdminState {
option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
diff --git a/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/voltha.proto b/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/voltha.proto
index 75199aa..5e45033 100644
--- a/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/voltha.proto
+++ b/vendor/github.com/opencord/voltha-protos/protos/voltha_protos/voltha.proto
@@ -70,11 +70,6 @@
repeated AlarmFilter filters = 1;
}
-message Logging {
- common.LogLevel.LogLevel level = 1;
- string package_name = 2;
-}
-
// CoreInstance represents a core instance. It is data held in memory when a core
// is running. This data is not persistent.
message CoreInstance {
@@ -163,7 +158,14 @@
service VolthaService {
// Get more information on a given physical device
- rpc UpdateLogLevel(Logging) returns(google.protobuf.Empty) {
+ rpc UpdateLogLevel(common.Logging) returns(google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/api/v1/logs"
+ body: "*"
+ };
+ }
+
+ rpc GetLogLevels(common.LoggingComponent) returns (common.Loggings) {
option (google.api.http) = {
get: "/api/v1/logs"
};