From c89b9485df5d540943e1aaca3eeac7d35e57e228 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Fri, 12 Jan 2024 10:48:21 -0300 Subject: [PATCH] include update in request protos --- protos/workflow.proto | 43 +++++-- python/naas_models/pydantic/workflow_p2p.py | 52 ++++++-- python/naas_models/workflow_pb2.py | 133 ++++++++++++++------ 3 files changed, 167 insertions(+), 61 deletions(-) diff --git a/protos/workflow.proto b/protos/workflow.proto index 6cb0fb0..304eb27 100644 --- a/protos/workflow.proto +++ b/protos/workflow.proto @@ -62,16 +62,20 @@ message DagTemplate { } message ScriptTemplate { - optional string source = 1; + optional string image = 1; + repeated string command = 2; + map resources = 3; + optional string source = 4; } message Template { optional string name = 1; optional string container = 2; - optional Inputs inputs = 3; - optional Outputs outputs = 4; - optional DagTemplate dag = 5; - optional ScriptTemplate script = 6; + map metadata = 3; + optional Inputs inputs = 4; + optional Outputs outputs = 5; + optional DagTemplate dag = 6; + optional ScriptTemplate script = 7; } message Spec { @@ -80,6 +84,16 @@ message Spec { repeated Template templates = 3; } +message Metadata { + optional string generateName = 1; + optional string namespace = 2; + map labels = 3; +} + +message Workflow { + Metadata metadata = 1; + Spec spec = 2; +} /** * Argo workflow CRUD resources @@ -87,9 +101,11 @@ message Spec { message WorkflowCreationRequest { optional string name = 1; - optional string namespace = 2; - optional string workflowTemplate = 4; - optional string workflowSpec = 5; + optional string description = 2; + optional string user_uid = 3; + optional string namespace = 4; + optional bool serverDryRun = 5; + optional Workflow workflow = 6; } message WorkflowCreationResponse { @@ -100,8 +116,7 @@ message WorkflowCreationResponse { message WorkflowUpdateRequest { optional string name = 1; optional string namespace = 2; - optional string workflowTemplate = 4; - optional string workflowSpec = 5; + optional Workflow workflow = 3; } message WorkflowUpdateResponse { @@ -110,7 +125,7 @@ message WorkflowUpdateResponse { } message WorkflowDeleteRequest { - optional string name = 1; + optional string workflow_name = 1; optional string namespace = 2; } @@ -120,7 +135,7 @@ message WorkflowDeleteResponse { } message WorkflowGetRequest { - optional string name = 1; + optional string workflow_name = 1; optional string namespace = 2; } @@ -129,7 +144,9 @@ message WorkflowGetResponse { optional string message = 2; } -message WorkflowListRequest {} +message WorkflowListRequest { + optional string namespace = 1; +} message WorkflowListResponse { repeated WorkflowGetResponse workflows = 1; diff --git a/python/naas_models/pydantic/workflow_p2p.py b/python/naas_models/pydantic/workflow_p2p.py index ff09132..694dc96 100644 --- a/python/naas_models/pydantic/workflow_p2p.py +++ b/python/naas_models/pydantic/workflow_p2p.py @@ -107,9 +107,12 @@ class DagTemplate(BaseModel): class ScriptTemplate(BaseModel): - _one_of_dict = {"ScriptTemplate._source": {"fields": {"source"}}} + _one_of_dict = {"ScriptTemplate._image": {"fields": {"image"}}, "ScriptTemplate._source": {"fields": {"source"}}} _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) + image: str = FieldInfo(default="") + command: typing.List[str] = FieldInfo(default_factory=list) + resources: typing.Dict[str, str] = FieldInfo(default_factory=dict) source: str = FieldInfo(default="") @@ -122,6 +125,7 @@ class Template(BaseModel): name: str = FieldInfo(default="") container: str = FieldInfo(default="") + metadata: typing.Dict[str, str] = FieldInfo(default_factory=dict) inputs: Inputs = FieldInfo() outputs: Outputs = FieldInfo() dag: DagTemplate = FieldInfo() @@ -142,15 +146,37 @@ class Spec(BaseModel): +class Metadata(BaseModel): + + _one_of_dict = {"Metadata._generateName": {"fields": {"generateName"}}, "Metadata._namespace": {"fields": {"namespace"}}} + _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) + + generateName: str = FieldInfo(default="") + namespace: str = FieldInfo(default="") + labels: typing.Dict[str, str] = FieldInfo(default_factory=dict) + + + + +class Workflow(BaseModel): + + metadata: Metadata = FieldInfo() + spec: Spec = FieldInfo() + + + + class WorkflowCreationRequest(BaseModel): - _one_of_dict = {"WorkflowCreationRequest._name": {"fields": {"name"}}, "WorkflowCreationRequest._namespace": {"fields": {"namespace"}}, "WorkflowCreationRequest._workflowSpec": {"fields": {"workflowSpec"}}, "WorkflowCreationRequest._workflowTemplate": {"fields": {"workflowTemplate"}}} + _one_of_dict = {"WorkflowCreationRequest._description": {"fields": {"description"}}, "WorkflowCreationRequest._name": {"fields": {"name"}}, "WorkflowCreationRequest._namespace": {"fields": {"namespace"}}, "WorkflowCreationRequest._serverDryRun": {"fields": {"serverDryRun"}}, "WorkflowCreationRequest._user_uid": {"fields": {"user_uid"}}, "WorkflowCreationRequest._workflow": {"fields": {"workflow"}}} _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) name: str = FieldInfo(default="") + description: str = FieldInfo(default="") + user_uid: str = FieldInfo(default="") namespace: str = FieldInfo(default="") - workflowTemplate: str = FieldInfo(default="") - workflowSpec: str = FieldInfo(default="") + serverDryRun: bool = FieldInfo(default=False) + workflow: Workflow = FieldInfo() @@ -168,13 +194,12 @@ class WorkflowCreationResponse(BaseModel): class WorkflowUpdateRequest(BaseModel): - _one_of_dict = {"WorkflowUpdateRequest._name": {"fields": {"name"}}, "WorkflowUpdateRequest._namespace": {"fields": {"namespace"}}, "WorkflowUpdateRequest._workflowSpec": {"fields": {"workflowSpec"}}, "WorkflowUpdateRequest._workflowTemplate": {"fields": {"workflowTemplate"}}} + _one_of_dict = {"WorkflowUpdateRequest._name": {"fields": {"name"}}, "WorkflowUpdateRequest._namespace": {"fields": {"namespace"}}, "WorkflowUpdateRequest._workflow": {"fields": {"workflow"}}} _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) name: str = FieldInfo(default="") namespace: str = FieldInfo(default="") - workflowTemplate: str = FieldInfo(default="") - workflowSpec: str = FieldInfo(default="") + workflow: Workflow = FieldInfo() @@ -192,10 +217,10 @@ class WorkflowUpdateResponse(BaseModel): class WorkflowDeleteRequest(BaseModel): - _one_of_dict = {"WorkflowDeleteRequest._name": {"fields": {"name"}}, "WorkflowDeleteRequest._namespace": {"fields": {"namespace"}}} + _one_of_dict = {"WorkflowDeleteRequest._namespace": {"fields": {"namespace"}}, "WorkflowDeleteRequest._workflow_name": {"fields": {"workflow_name"}}} _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) - name: str = FieldInfo(default="") + workflow_name: str = FieldInfo(default="") namespace: str = FieldInfo(default="") @@ -214,10 +239,10 @@ class WorkflowDeleteResponse(BaseModel): class WorkflowGetRequest(BaseModel): - _one_of_dict = {"WorkflowGetRequest._name": {"fields": {"name"}}, "WorkflowGetRequest._namespace": {"fields": {"namespace"}}} + _one_of_dict = {"WorkflowGetRequest._namespace": {"fields": {"namespace"}}, "WorkflowGetRequest._workflow_name": {"fields": {"workflow_name"}}} _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) - name: str = FieldInfo(default="") + workflow_name: str = FieldInfo(default="") namespace: str = FieldInfo(default="") @@ -236,6 +261,11 @@ class WorkflowGetResponse(BaseModel): class WorkflowListRequest(BaseModel): + _one_of_dict = {"WorkflowListRequest._namespace": {"fields": {"namespace"}}} + _check_one_of = root_validator(pre=True, allow_reuse=True)(check_one_of) + + namespace: str = FieldInfo(default="") + diff --git a/python/naas_models/workflow_pb2.py b/python/naas_models/workflow_pb2.py index 2977ebf..b06e942 100644 --- a/python/naas_models/workflow_pb2.py +++ b/python/naas_models/workflow_pb2.py @@ -15,7 +15,7 @@ import naas_models.validate_pb2 as validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eworkflow.proto\x12\x08workflow\x1a\x0evalidate.proto\"a\n\x07\x41rchive\x12)\n\x04none\x18\x01 \x03(\x0b\x32\x1b.workflow.Archive.NoneEntry\x1a+\n\tNoneEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\nArtifactS3\x12\x10\n\x03key\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x62ucket\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\t\n\x07_bucket\"\xdd\x01\n\x08\x41rtifact\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04path\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04mode\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12\x11\n\x04\x66rom\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\'\n\x07\x61rchive\x18\x05 \x01(\x0b\x32\x11.workflow.ArchiveH\x04\x88\x01\x01\x12%\n\x02s3\x18\x06 \x01(\x0b\x32\x14.workflow.ArtifactS3H\x05\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_pathB\x07\n\x05_modeB\x07\n\x05_fromB\n\n\x08_archiveB\x05\n\x03_s3\"X\n\x06Inputs\x12\'\n\nparameters\x18\x01 \x03(\x0b\x32\x13.workflow.Parameter\x12%\n\tartifacts\x18\x02 \x03(\x0b\x32\x12.workflow.Artifact\"Y\n\x07Outputs\x12\'\n\nparameters\x18\x01 \x03(\x0b\x32\x13.workflow.Parameter\x12%\n\tartifacts\x18\x02 \x03(\x0b\x32\x12.workflow.Artifact\"g\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x08\n\x06_valueB\n\n\x08_default\"\xe0\x01\n\tArguments\x12\x37\n\nparameters\x18\x01 \x03(\x0b\x32#.workflow.Arguments.ParametersEntry\x12\x35\n\tartifacts\x18\x02 \x03(\x0b\x32\".workflow.Arguments.ArtifactsEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x30\n\x0e\x41rtifactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x01\n\x08\x44\x61gTasks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08template\x18\x02 \x01(\t\x12\x14\n\x07\x64\x65pends\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\targuments\x18\x04 \x01(\x0b\x32\x13.workflow.ArgumentsH\x01\x88\x01\x01\x42\n\n\x08_dependsB\x0c\n\n_arguments\"P\n\x0b\x44\x61gTemplate\x12!\n\x05tasks\x18\x01 \x03(\x0b\x32\x12.workflow.DagTasks\x12\x13\n\x06target\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_target\"0\n\x0eScriptTemplate\x12\x13\n\x06source\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_source\"\x9e\x02\n\x08Template\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tcontainer\x18\x02 \x01(\tH\x01\x88\x01\x01\x12%\n\x06inputs\x18\x03 \x01(\x0b\x32\x10.workflow.InputsH\x02\x88\x01\x01\x12\'\n\x07outputs\x18\x04 \x01(\x0b\x32\x11.workflow.OutputsH\x03\x88\x01\x01\x12\'\n\x03\x64\x61g\x18\x05 \x01(\x0b\x32\x15.workflow.DagTemplateH\x04\x88\x01\x01\x12-\n\x06script\x18\x06 \x01(\x0b\x32\x18.workflow.ScriptTemplateH\x05\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_containerB\t\n\x07_inputsB\n\n\x08_outputsB\x06\n\x04_dagB\t\n\x07_script\"|\n\x04Spec\x12\x12\n\nentrypoint\x18\x01 \x01(\t\x12+\n\targuments\x18\x02 \x01(\x0b\x32\x13.workflow.ArgumentsH\x00\x88\x01\x01\x12%\n\ttemplates\x18\x03 \x03(\x0b\x32\x12.workflow.TemplateB\x0c\n\n_arguments\"\xbb\x01\n\x17WorkflowCreationRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10workflowTemplate\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0cworkflowSpec\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_namespaceB\x13\n\x11_workflowTemplateB\x0f\n\r_workflowSpec\"X\n\x18WorkflowCreationResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"\xb9\x01\n\x15WorkflowUpdateRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x10workflowTemplate\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0cworkflowSpec\x18\x05 \x01(\tH\x03\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_namespaceB\x13\n\x11_workflowTemplateB\x0f\n\r_workflowSpec\"V\n\x16WorkflowUpdateResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"Y\n\x15WorkflowDeleteRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_namespace\"V\n\x16WorkflowDeleteResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"V\n\x12WorkflowGetRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_namespace\"S\n\x13WorkflowGetResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"\x15\n\x13WorkflowListRequest\"H\n\x14WorkflowListResponse\x12\x30\n\tworkflows\x18\x01 \x03(\x0b\x32\x1d.workflow.WorkflowGetResponse\"U\n\x15WorkflowCreationError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"S\n\x13WorkflowUpdateError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"S\n\x13WorkflowDeleteError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"P\n\x10WorkflowGetError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"Q\n\x11WorkflowListError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_messageB1Z/github.com/jupyter-naas/naas-models/go/workflowb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eworkflow.proto\x12\x08workflow\x1a\x0evalidate.proto\"a\n\x07\x41rchive\x12)\n\x04none\x18\x01 \x03(\x0b\x32\x1b.workflow.Archive.NoneEntry\x1a+\n\tNoneEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\nArtifactS3\x12\x10\n\x03key\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x62ucket\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\t\n\x07_bucket\"\xdd\x01\n\x08\x41rtifact\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04path\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04mode\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12\x11\n\x04\x66rom\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\'\n\x07\x61rchive\x18\x05 \x01(\x0b\x32\x11.workflow.ArchiveH\x04\x88\x01\x01\x12%\n\x02s3\x18\x06 \x01(\x0b\x32\x14.workflow.ArtifactS3H\x05\x88\x01\x01\x42\x07\n\x05_nameB\x07\n\x05_pathB\x07\n\x05_modeB\x07\n\x05_fromB\n\n\x08_archiveB\x05\n\x03_s3\"X\n\x06Inputs\x12\'\n\nparameters\x18\x01 \x03(\x0b\x32\x13.workflow.Parameter\x12%\n\tartifacts\x18\x02 \x03(\x0b\x32\x12.workflow.Artifact\"Y\n\x07Outputs\x12\'\n\nparameters\x18\x01 \x03(\x0b\x32\x13.workflow.Parameter\x12%\n\tartifacts\x18\x02 \x03(\x0b\x32\x12.workflow.Artifact\"g\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x03 \x01(\tH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x08\n\x06_valueB\n\n\x08_default\"\xe0\x01\n\tArguments\x12\x37\n\nparameters\x18\x01 \x03(\x0b\x32#.workflow.Arguments.ParametersEntry\x12\x35\n\tartifacts\x18\x02 \x03(\x0b\x32\".workflow.Arguments.ArtifactsEntry\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x30\n\x0e\x41rtifactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x01\n\x08\x44\x61gTasks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08template\x18\x02 \x01(\t\x12\x14\n\x07\x64\x65pends\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\targuments\x18\x04 \x01(\x0b\x32\x13.workflow.ArgumentsH\x01\x88\x01\x01\x42\n\n\x08_dependsB\x0c\n\n_arguments\"P\n\x0b\x44\x61gTemplate\x12!\n\x05tasks\x18\x01 \x03(\x0b\x32\x12.workflow.DagTasks\x12\x13\n\x06target\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_target\"\xcd\x01\n\x0eScriptTemplate\x12\x12\n\x05image\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x07\x63ommand\x18\x02 \x03(\t\x12:\n\tresources\x18\x03 \x03(\x0b\x32\'.workflow.ScriptTemplate.ResourcesEntry\x12\x13\n\x06source\x18\x04 \x01(\tH\x01\x88\x01\x01\x1a\x30\n\x0eResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06_imageB\t\n\x07_source\"\x83\x03\n\x08Template\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tcontainer\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x32\n\x08metadata\x18\x03 \x03(\x0b\x32 .workflow.Template.MetadataEntry\x12%\n\x06inputs\x18\x04 \x01(\x0b\x32\x10.workflow.InputsH\x02\x88\x01\x01\x12\'\n\x07outputs\x18\x05 \x01(\x0b\x32\x11.workflow.OutputsH\x03\x88\x01\x01\x12\'\n\x03\x64\x61g\x18\x06 \x01(\x0b\x32\x15.workflow.DagTemplateH\x04\x88\x01\x01\x12-\n\x06script\x18\x07 \x01(\x0b\x32\x18.workflow.ScriptTemplateH\x05\x88\x01\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05_nameB\x0c\n\n_containerB\t\n\x07_inputsB\n\n\x08_outputsB\x06\n\x04_dagB\t\n\x07_script\"|\n\x04Spec\x12\x12\n\nentrypoint\x18\x01 \x01(\t\x12+\n\targuments\x18\x02 \x01(\x0b\x32\x13.workflow.ArgumentsH\x00\x88\x01\x01\x12%\n\ttemplates\x18\x03 \x03(\x0b\x32\x12.workflow.TemplateB\x0c\n\n_arguments\"\xbb\x01\n\x08Metadata\x12\x19\n\x0cgenerateName\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12.\n\x06labels\x18\x03 \x03(\x0b\x32\x1e.workflow.Metadata.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0f\n\r_generateNameB\x0c\n\n_namespace\"N\n\x08Workflow\x12$\n\x08metadata\x18\x01 \x01(\x0b\x32\x12.workflow.Metadata\x12\x1c\n\x04spec\x18\x02 \x01(\x0b\x32\x0e.workflow.Spec\"\x8d\x02\n\x17WorkflowCreationRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08user_uid\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x16\n\tnamespace\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x19\n\x0cserverDryRun\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12)\n\x08workflow\x18\x06 \x01(\x0b\x32\x12.workflow.WorkflowH\x05\x88\x01\x01\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\x0b\n\t_user_uidB\x0c\n\n_namespaceB\x0f\n\r_serverDryRunB\x0b\n\t_workflow\"X\n\x18WorkflowCreationResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"\x91\x01\n\x15WorkflowUpdateRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12)\n\x08workflow\x18\x03 \x01(\x0b\x32\x12.workflow.WorkflowH\x02\x88\x01\x01\x42\x07\n\x05_nameB\x0c\n\n_namespaceB\x0b\n\t_workflow\"V\n\x16WorkflowUpdateResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"k\n\x15WorkflowDeleteRequest\x12\x1a\n\rworkflow_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_workflow_nameB\x0c\n\n_namespace\"V\n\x16WorkflowDeleteResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"h\n\x12WorkflowGetRequest\x12\x1a\n\rworkflow_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x10\n\x0e_workflow_nameB\x0c\n\n_namespace\"S\n\x13WorkflowGetResponse\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\";\n\x13WorkflowListRequest\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"H\n\x14WorkflowListResponse\x12\x30\n\tworkflows\x18\x01 \x03(\x0b\x32\x1d.workflow.WorkflowGetResponse\"U\n\x15WorkflowCreationError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"S\n\x13WorkflowUpdateError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"S\n\x13WorkflowDeleteError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"P\n\x10WorkflowGetError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_message\"Q\n\x11WorkflowListError\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\n\n\x08_messageB1Z/github.com/jupyter-naas/naas-models/go/workflowb\x06proto3') @@ -32,8 +32,13 @@ _DAGTASKS = DESCRIPTOR.message_types_by_name['DagTasks'] _DAGTEMPLATE = DESCRIPTOR.message_types_by_name['DagTemplate'] _SCRIPTTEMPLATE = DESCRIPTOR.message_types_by_name['ScriptTemplate'] +_SCRIPTTEMPLATE_RESOURCESENTRY = _SCRIPTTEMPLATE.nested_types_by_name['ResourcesEntry'] _TEMPLATE = DESCRIPTOR.message_types_by_name['Template'] +_TEMPLATE_METADATAENTRY = _TEMPLATE.nested_types_by_name['MetadataEntry'] _SPEC = DESCRIPTOR.message_types_by_name['Spec'] +_METADATA = DESCRIPTOR.message_types_by_name['Metadata'] +_METADATA_LABELSENTRY = _METADATA.nested_types_by_name['LabelsEntry'] +_WORKFLOW = DESCRIPTOR.message_types_by_name['Workflow'] _WORKFLOWCREATIONREQUEST = DESCRIPTOR.message_types_by_name['WorkflowCreationRequest'] _WORKFLOWCREATIONRESPONSE = DESCRIPTOR.message_types_by_name['WorkflowCreationResponse'] _WORKFLOWUPDATEREQUEST = DESCRIPTOR.message_types_by_name['WorkflowUpdateRequest'] @@ -137,18 +142,34 @@ _sym_db.RegisterMessage(DagTemplate) ScriptTemplate = _reflection.GeneratedProtocolMessageType('ScriptTemplate', (_message.Message,), { + + 'ResourcesEntry' : _reflection.GeneratedProtocolMessageType('ResourcesEntry', (_message.Message,), { + 'DESCRIPTOR' : _SCRIPTTEMPLATE_RESOURCESENTRY, + '__module__' : 'workflow_pb2' + # @@protoc_insertion_point(class_scope:workflow.ScriptTemplate.ResourcesEntry) + }) + , 'DESCRIPTOR' : _SCRIPTTEMPLATE, '__module__' : 'workflow_pb2' # @@protoc_insertion_point(class_scope:workflow.ScriptTemplate) }) _sym_db.RegisterMessage(ScriptTemplate) +_sym_db.RegisterMessage(ScriptTemplate.ResourcesEntry) Template = _reflection.GeneratedProtocolMessageType('Template', (_message.Message,), { + + 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { + 'DESCRIPTOR' : _TEMPLATE_METADATAENTRY, + '__module__' : 'workflow_pb2' + # @@protoc_insertion_point(class_scope:workflow.Template.MetadataEntry) + }) + , 'DESCRIPTOR' : _TEMPLATE, '__module__' : 'workflow_pb2' # @@protoc_insertion_point(class_scope:workflow.Template) }) _sym_db.RegisterMessage(Template) +_sym_db.RegisterMessage(Template.MetadataEntry) Spec = _reflection.GeneratedProtocolMessageType('Spec', (_message.Message,), { 'DESCRIPTOR' : _SPEC, @@ -157,6 +178,28 @@ }) _sym_db.RegisterMessage(Spec) +Metadata = _reflection.GeneratedProtocolMessageType('Metadata', (_message.Message,), { + + 'LabelsEntry' : _reflection.GeneratedProtocolMessageType('LabelsEntry', (_message.Message,), { + 'DESCRIPTOR' : _METADATA_LABELSENTRY, + '__module__' : 'workflow_pb2' + # @@protoc_insertion_point(class_scope:workflow.Metadata.LabelsEntry) + }) + , + 'DESCRIPTOR' : _METADATA, + '__module__' : 'workflow_pb2' + # @@protoc_insertion_point(class_scope:workflow.Metadata) + }) +_sym_db.RegisterMessage(Metadata) +_sym_db.RegisterMessage(Metadata.LabelsEntry) + +Workflow = _reflection.GeneratedProtocolMessageType('Workflow', (_message.Message,), { + 'DESCRIPTOR' : _WORKFLOW, + '__module__' : 'workflow_pb2' + # @@protoc_insertion_point(class_scope:workflow.Workflow) + }) +_sym_db.RegisterMessage(Workflow) + WorkflowCreationRequest = _reflection.GeneratedProtocolMessageType('WorkflowCreationRequest', (_message.Message,), { 'DESCRIPTOR' : _WORKFLOWCREATIONREQUEST, '__module__' : 'workflow_pb2' @@ -272,6 +315,12 @@ _ARGUMENTS_PARAMETERSENTRY._serialized_options = b'8\001' _ARGUMENTS_ARTIFACTSENTRY._options = None _ARGUMENTS_ARTIFACTSENTRY._serialized_options = b'8\001' + _SCRIPTTEMPLATE_RESOURCESENTRY._options = None + _SCRIPTTEMPLATE_RESOURCESENTRY._serialized_options = b'8\001' + _TEMPLATE_METADATAENTRY._options = None + _TEMPLATE_METADATAENTRY._serialized_options = b'8\001' + _METADATA_LABELSENTRY._options = None + _METADATA_LABELSENTRY._serialized_options = b'8\001' _ARCHIVE._serialized_start=44 _ARCHIVE._serialized_end=141 _ARCHIVE_NONEENTRY._serialized_start=98 @@ -296,40 +345,50 @@ _DAGTASKS._serialized_end=1088 _DAGTEMPLATE._serialized_start=1090 _DAGTEMPLATE._serialized_end=1170 - _SCRIPTTEMPLATE._serialized_start=1172 - _SCRIPTTEMPLATE._serialized_end=1220 - _TEMPLATE._serialized_start=1223 - _TEMPLATE._serialized_end=1509 - _SPEC._serialized_start=1511 - _SPEC._serialized_end=1635 - _WORKFLOWCREATIONREQUEST._serialized_start=1638 - _WORKFLOWCREATIONREQUEST._serialized_end=1825 - _WORKFLOWCREATIONRESPONSE._serialized_start=1827 - _WORKFLOWCREATIONRESPONSE._serialized_end=1915 - _WORKFLOWUPDATEREQUEST._serialized_start=1918 - _WORKFLOWUPDATEREQUEST._serialized_end=2103 - _WORKFLOWUPDATERESPONSE._serialized_start=2105 - _WORKFLOWUPDATERESPONSE._serialized_end=2191 - _WORKFLOWDELETEREQUEST._serialized_start=2193 - _WORKFLOWDELETEREQUEST._serialized_end=2282 - _WORKFLOWDELETERESPONSE._serialized_start=2284 - _WORKFLOWDELETERESPONSE._serialized_end=2370 - _WORKFLOWGETREQUEST._serialized_start=2372 - _WORKFLOWGETREQUEST._serialized_end=2458 - _WORKFLOWGETRESPONSE._serialized_start=2460 - _WORKFLOWGETRESPONSE._serialized_end=2543 - _WORKFLOWLISTREQUEST._serialized_start=2545 - _WORKFLOWLISTREQUEST._serialized_end=2566 - _WORKFLOWLISTRESPONSE._serialized_start=2568 - _WORKFLOWLISTRESPONSE._serialized_end=2640 - _WORKFLOWCREATIONERROR._serialized_start=2642 - _WORKFLOWCREATIONERROR._serialized_end=2727 - _WORKFLOWUPDATEERROR._serialized_start=2729 - _WORKFLOWUPDATEERROR._serialized_end=2812 - _WORKFLOWDELETEERROR._serialized_start=2814 - _WORKFLOWDELETEERROR._serialized_end=2897 - _WORKFLOWGETERROR._serialized_start=2899 - _WORKFLOWGETERROR._serialized_end=2979 - _WORKFLOWLISTERROR._serialized_start=2981 - _WORKFLOWLISTERROR._serialized_end=3062 + _SCRIPTTEMPLATE._serialized_start=1173 + _SCRIPTTEMPLATE._serialized_end=1378 + _SCRIPTTEMPLATE_RESOURCESENTRY._serialized_start=1309 + _SCRIPTTEMPLATE_RESOURCESENTRY._serialized_end=1357 + _TEMPLATE._serialized_start=1381 + _TEMPLATE._serialized_end=1768 + _TEMPLATE_METADATAENTRY._serialized_start=1656 + _TEMPLATE_METADATAENTRY._serialized_end=1703 + _SPEC._serialized_start=1770 + _SPEC._serialized_end=1894 + _METADATA._serialized_start=1897 + _METADATA._serialized_end=2084 + _METADATA_LABELSENTRY._serialized_start=2008 + _METADATA_LABELSENTRY._serialized_end=2053 + _WORKFLOW._serialized_start=2086 + _WORKFLOW._serialized_end=2164 + _WORKFLOWCREATIONREQUEST._serialized_start=2167 + _WORKFLOWCREATIONREQUEST._serialized_end=2436 + _WORKFLOWCREATIONRESPONSE._serialized_start=2438 + _WORKFLOWCREATIONRESPONSE._serialized_end=2526 + _WORKFLOWUPDATEREQUEST._serialized_start=2529 + _WORKFLOWUPDATEREQUEST._serialized_end=2674 + _WORKFLOWUPDATERESPONSE._serialized_start=2676 + _WORKFLOWUPDATERESPONSE._serialized_end=2762 + _WORKFLOWDELETEREQUEST._serialized_start=2764 + _WORKFLOWDELETEREQUEST._serialized_end=2871 + _WORKFLOWDELETERESPONSE._serialized_start=2873 + _WORKFLOWDELETERESPONSE._serialized_end=2959 + _WORKFLOWGETREQUEST._serialized_start=2961 + _WORKFLOWGETREQUEST._serialized_end=3065 + _WORKFLOWGETRESPONSE._serialized_start=3067 + _WORKFLOWGETRESPONSE._serialized_end=3150 + _WORKFLOWLISTREQUEST._serialized_start=3152 + _WORKFLOWLISTREQUEST._serialized_end=3211 + _WORKFLOWLISTRESPONSE._serialized_start=3213 + _WORKFLOWLISTRESPONSE._serialized_end=3285 + _WORKFLOWCREATIONERROR._serialized_start=3287 + _WORKFLOWCREATIONERROR._serialized_end=3372 + _WORKFLOWUPDATEERROR._serialized_start=3374 + _WORKFLOWUPDATEERROR._serialized_end=3457 + _WORKFLOWDELETEERROR._serialized_start=3459 + _WORKFLOWDELETEERROR._serialized_end=3542 + _WORKFLOWGETERROR._serialized_start=3544 + _WORKFLOWGETERROR._serialized_end=3624 + _WORKFLOWLISTERROR._serialized_start=3626 + _WORKFLOWLISTERROR._serialized_end=3707 # @@protoc_insertion_point(module_scope)