可以在集群中查看待安装节点、并直接安装节点

This commit is contained in:
GoEdgeLab
2020-10-26 21:15:13 +08:00
parent e643de4132
commit f52c8e7cda
6 changed files with 918 additions and 373 deletions

View File

@@ -6,6 +6,7 @@ package pb;
import "model_node_cluster.proto";
import "model_node_login.proto";
import "model_node_install_status.proto";
import "model_node_ip_address.proto";
message Node {
int64 id = 1;
@@ -25,4 +26,5 @@ message Node {
NodeCluster cluster = 32;
NodeLogin login = 33;
NodeInstallStatus installStatus = 34;
repeated NodeIPAddress ipAddresses = 35;
}

View File

@@ -8,5 +8,6 @@ message NodeInstallStatus {
bool isFinished = 2;
bool isOk = 3;
string error = 4;
string errorCode = 6;
int64 updatedAt = 5;
}

View File

@@ -2,8 +2,10 @@ syntax = "proto3";
option go_package = "./pb";
package pb;
import "model_node.proto";
import "model_node_login.proto";
import "model_node_install_status.proto";
import "rpc_messages.proto";
service NodeService {
@@ -63,6 +65,15 @@ service NodeService {
// 查找使用某个认证的所有节点
rpc findAllEnabledNodesWithGrantId (FindAllEnabledNodesWithGrantIdRequest) returns (FindAllEnabledNodesWithGrantIdResponse);
// 列出所有未安装的节点
rpc findAllNotInstalledNodesWithClusterId (FindAllNotInstalledNodesWithClusterIdRequest) returns (FindAllNotInstalledNodesWithClusterIdResponse);
// 读取节点安装状态
rpc findNodeInstallStatus (FindNodeInstallStatusRequest) returns (FindNodeInstallStatusResponse);
// 修改节点登录信息
rpc updateNodeLogin (UpdateNodeLoginRequest) returns (RPCUpdateSuccess);
}
// 创建节点
@@ -227,4 +238,28 @@ message FindAllEnabledNodesWithGrantIdRequest {
message FindAllEnabledNodesWithGrantIdResponse {
repeated Node nodes = 1;
}
}
// 列出所有未安装的节点
message FindAllNotInstalledNodesWithClusterIdRequest {
int64 clusterId = 1;
}
message FindAllNotInstalledNodesWithClusterIdResponse {
repeated Node nodes = 1;
}
// 读取节点安装状态
message FindNodeInstallStatusRequest {
int64 nodeId = 1;
}
message FindNodeInstallStatusResponse {
NodeInstallStatus installStatus = 1;
}
// 修改节点登录信息
message UpdateNodeLoginRequest {
int64 nodeId = 1;
NodeLogin Login = 2;
}