fixed protobuf generation to avoid grpc generation for files with no definitions, added service config tab display to coretk

This commit is contained in:
Blake Harnden 2020-01-20 16:25:56 -08:00
parent a4f3abf27c
commit 83e7853821
9 changed files with 65 additions and 33 deletions

View file

@ -1,5 +1,6 @@
all:
$(PYTHON) -m grpc_tools.protoc -I . --python_out=.. --grpc_python_out=.. core/api/grpc/*.proto
$(PYTHON) -m grpc_tools.protoc -I . --python_out=.. core/api/grpc/*.proto
$(PYTHON) -m grpc_tools.protoc -I . --grpc_python_out=.. core/api/grpc/core.proto
clean:
-rm -f ../core/api/grpc/*_pb2*

View file

@ -0,0 +1,12 @@
syntax = "proto3";
package common;
message ConfigOption {
string label = 1;
string name = 2;
string value = 3;
int32 type = 4;
repeated string select = 5;
string group = 6;
}

View file

@ -2,6 +2,8 @@ syntax = "proto3";
package configservices;
import "core/api/grpc/common.proto";
message ConfigServiceValidationMode {
enum Enum {
BLOCKING = 0;
@ -39,7 +41,7 @@ message GetConfigServiceDefaultsRequest {
message GetConfigServiceDefaultsResponse {
map<string, string> templates = 1;
map<string, string> config = 2;
map<string, common.ConfigOption> config = 2;
}
message GetNodeConfigServiceRequest {

View file

@ -6,6 +6,7 @@ option java_package = "com.core.client.grpc";
option java_outer_classname = "CoreProto";
import "core/api/grpc/configservices.proto";
import "core/api/grpc/common.proto";
service CoreApi {
// session rpc
@ -217,7 +218,7 @@ message GetSessionOptionsRequest {
}
message GetSessionOptionsResponse {
map<string, ConfigOption> config = 2;
map<string, common.ConfigOption> config = 2;
}
message SetSessionOptionsRequest {
@ -508,7 +509,7 @@ message GetMobilityConfigRequest {
}
message GetMobilityConfigResponse {
map<string, ConfigOption> config = 1;
map<string, common.ConfigOption> config = 1;
}
message SetMobilityConfigRequest {
@ -633,7 +634,7 @@ message GetWlanConfigRequest {
}
message GetWlanConfigResponse {
map<string, ConfigOption> config = 1;
map<string, common.ConfigOption> config = 1;
}
message SetWlanConfigRequest {
@ -650,7 +651,7 @@ message GetEmaneConfigRequest {
}
message GetEmaneConfigResponse {
map<string, ConfigOption> config = 1;
map<string, common.ConfigOption> config = 1;
}
message SetEmaneConfigRequest {
@ -678,7 +679,7 @@ message GetEmaneModelConfigRequest {
}
message GetEmaneModelConfigResponse {
map<string, ConfigOption> config = 1;
map<string, common.ConfigOption> config = 1;
}
message SetEmaneModelConfigRequest {
@ -699,7 +700,7 @@ message GetEmaneModelConfigsResponse {
int32 node_id = 1;
string model = 2;
int32 interface = 3;
map<string, ConfigOption> config = 4;
map<string, common.ConfigOption> config = 4;
}
repeated ModelConfig configs = 1;
}
@ -917,16 +918,7 @@ message NodeServiceData {
}
message MappedConfig {
map<string, ConfigOption> config = 1;
}
message ConfigOption {
string label = 1;
string name = 2;
string value = 3;
int32 type = 4;
repeated string select = 5;
string group = 6;
map<string, common.ConfigOption> config = 1;
}
message Session {