添加notebook proto
This commit is contained in:
parent
e4170d2a58
commit
15f6dbf517
|
@ -1541,6 +1541,171 @@ message CreateDataSetResq{
|
|||
}
|
||||
/******************create dataset end*************************/
|
||||
|
||||
/******************Notebook Start*************************/
|
||||
message ListNotebookReq{
|
||||
string project_id = 1;
|
||||
ListNotebookParam param = 2;
|
||||
}
|
||||
message ListNotebookResp{
|
||||
int32 current = 1;
|
||||
repeated NotebookResp data = 2;
|
||||
int32 pages = 3;
|
||||
int32 size = 4;
|
||||
int64 total = 5;
|
||||
}
|
||||
message ListNotebookParam{
|
||||
string feature = 1;
|
||||
int32 limit = 2;
|
||||
string name = 3;
|
||||
string pool_id = 4;
|
||||
int32 offset = 5;
|
||||
string owner = 6;
|
||||
string sort_dir = 7;
|
||||
string sort_key = 8;
|
||||
string status = 9;
|
||||
string workspaceId = 10;
|
||||
}
|
||||
|
||||
message CreateNotebookReq{
|
||||
string project_id = 1;
|
||||
CreateNotebookParam param = 2;
|
||||
}
|
||||
message CreateNotebookResp{
|
||||
NotebookResp notebookResp = 1;
|
||||
}
|
||||
message CreateNotebookParam{
|
||||
string description = 1;
|
||||
int64 duration = 2;
|
||||
repeated EndpointsReq endpoints = 3;
|
||||
string feature = 4;
|
||||
string flavor = 5;
|
||||
string image_id = 6;
|
||||
string name = 7;
|
||||
string pool_id = 8;
|
||||
VolumeReq volume = 9;
|
||||
string workspace_id = 10;
|
||||
CustomHooks hooks = 11;
|
||||
LeaseReq lease = 12;
|
||||
}
|
||||
|
||||
message StartNotebookReq{
|
||||
string id = 1;
|
||||
string project_id = 2;
|
||||
}
|
||||
message StartNotebookResp{
|
||||
NotebookResp notebookResp = 1;
|
||||
}
|
||||
message StartNotebookParam{
|
||||
int64 duration = 1;
|
||||
string type = 2;
|
||||
}
|
||||
|
||||
message StopNotebookReq{
|
||||
string id = 1;
|
||||
string project_id = 2;
|
||||
}
|
||||
message StopNotebookResp{
|
||||
NotebookResp notebookResp = 1;
|
||||
}
|
||||
|
||||
message NotebookResp{
|
||||
repeated JobProgress action_progress = 1;
|
||||
string description = 2;
|
||||
repeated EndpointsRes endpoints = 3;
|
||||
string fail_reason = 4;
|
||||
string flavor = 5;
|
||||
string id = 6;
|
||||
Image image = 7;
|
||||
Lease lease = 8;
|
||||
string name = 9;
|
||||
Pool pool = 10;
|
||||
string status = 11;
|
||||
string token = 12;
|
||||
string url = 13;
|
||||
VolumeRes volume = 14;
|
||||
string workspace_id = 15;
|
||||
string feature = 16;
|
||||
}
|
||||
message JobProgress{
|
||||
string notebook_id = 1;
|
||||
string status = 2;
|
||||
int32 step = 3;
|
||||
string step_description = 4;
|
||||
}
|
||||
message EndpointsRes{
|
||||
repeated string allowed_access_ips = 1;
|
||||
string dev_service = 2;
|
||||
repeated string ssh_keys = 3;
|
||||
}
|
||||
message Image{
|
||||
string arch = 1;
|
||||
int64 create_at = 2;
|
||||
string description = 3;
|
||||
repeated string dev_services = 4;
|
||||
string id = 5;
|
||||
string name = 6;
|
||||
string namespace = 7;
|
||||
string origin = 8;
|
||||
repeated string resource_categories = 9;
|
||||
string service_type = 10;
|
||||
int64 size = 11;
|
||||
string status = 12;
|
||||
string status_message = 13;
|
||||
repeated string support_res_categories = 14;
|
||||
string swr_path = 15;
|
||||
string tag = 16;
|
||||
string type = 17;
|
||||
int64 update_at = 18;
|
||||
string visibility = 19;
|
||||
string workspace_id = 20;
|
||||
}
|
||||
message Lease{
|
||||
int64 create_at = 1;
|
||||
int64 duration = 2;
|
||||
bool enable = 3;
|
||||
string type = 4;
|
||||
int64 update_at = 5;
|
||||
}
|
||||
message Pool{
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
}
|
||||
message VolumeRes{
|
||||
int64 capacity = 1;
|
||||
string category = 2;
|
||||
string mount_path = 3;
|
||||
string ownership = 4;
|
||||
string status = 5;
|
||||
}
|
||||
message EndpointsReq{
|
||||
repeated string allowed_access_ips = 1;
|
||||
string dev_service = 2;
|
||||
repeated string ssh_keys = 3;
|
||||
}
|
||||
message VolumeReq{
|
||||
int64 capacity = 1;
|
||||
string category = 2;
|
||||
string ownership = 3;
|
||||
string uri = 4;
|
||||
}
|
||||
message CustomHooks{
|
||||
ContainerHooks container_hooks = 1;
|
||||
}
|
||||
message ContainerHooks{
|
||||
Config post_start = 1;
|
||||
Config pre_start = 2;
|
||||
}
|
||||
message Config{
|
||||
string script = 1;
|
||||
string type = 2;
|
||||
}
|
||||
message LeaseReq{
|
||||
int64 duration = 1;
|
||||
string type = 2;
|
||||
}
|
||||
|
||||
/******************Notebook End*************************/
|
||||
|
||||
// Slurm Services for Shuguang Branch
|
||||
service ModelArts {
|
||||
|
||||
|
@ -1590,4 +1755,10 @@ service ModelArts {
|
|||
rpc ShowService(ShowServiceReq) returns (ShowServiceResp);
|
||||
rpc DeleteService(DeleteServiceReq) returns (DeleteServiceResp);
|
||||
rpc ListClusters(ListClustersReq) returns (ListClustersResp);
|
||||
|
||||
//notebook task
|
||||
rpc ListNotebook(ListNotebookReq) returns (ListNotebookResp);
|
||||
rpc CreateNotebook(CreateNotebookReq) returns (CreateNotebookResp);
|
||||
rpc StartNotebook(StartNotebookReq) returns (StartNotebookResp);
|
||||
rpc StopNotebook(StopNotebookReq) returns (StopNotebookResp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue