Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions api/openapi.codegen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5313,6 +5313,44 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/workflows/{id}/slurm_job_correlations:
get:
tags:
- workflows
operationId: get_slurm_job_correlations
parameters:
- name: id
in: path
description: Workflow ID
required: true
schema:
type: integer
format: int64
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SlurmJobCorrelationsResponse'
'403':
description: User does not have access
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Workflow not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/workflows/{id}/status:
get:
tags:
Expand Down Expand Up @@ -7117,6 +7155,33 @@ components:
workflow_id:
type: integer
format: int64
SlurmJobCorrelationModel:
type: object
description: |-
One Slurm-job-to-Torc-job correlation row: the Slurm job that ran a given
Torc job, derived from scheduled_compute_node -> compute_node -> result.
required:
- slurm_job_id
- job_id
- job_name
properties:
job_id:
type: integer
format: int64
job_name:
type: string
slurm_job_id:
type: string
SlurmJobCorrelationsResponse:
type: object
description: All Slurm-job-to-Torc-job correlations for a workflow, computed server-side.
required:
- items
properties:
items:
type: array
items:
$ref: '#/components/schemas/SlurmJobCorrelationModel'
SlurmSchedulerModel:
type: object
required:
Expand Down
65 changes: 65 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5313,6 +5313,44 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/workflows/{id}/slurm_job_correlations:
get:
tags:
- workflows
operationId: get_slurm_job_correlations
parameters:
- name: id
in: path
description: Workflow ID
required: true
schema:
type: integer
format: int64
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SlurmJobCorrelationsResponse'
'403':
description: User does not have access
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Workflow not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/workflows/{id}/status:
get:
tags:
Expand Down Expand Up @@ -7117,6 +7155,33 @@ components:
workflow_id:
type: integer
format: int64
SlurmJobCorrelationModel:
type: object
description: |-
One Slurm-job-to-Torc-job correlation row: the Slurm job that ran a given
Torc job, derived from scheduled_compute_node -> compute_node -> result.
required:
- slurm_job_id
- job_id
- job_name
properties:
job_id:
type: integer
format: int64
job_name:
type: string
slurm_job_id:
type: string
SlurmJobCorrelationsResponse:
type: object
description: All Slurm-job-to-Torc-job correlations for a workflow, computed server-side.
required:
- items
properties:
items:
type: array
items:
$ref: '#/components/schemas/SlurmJobCorrelationModel'
SlurmSchedulerModel:
type: object
required:
Expand Down
31 changes: 31 additions & 0 deletions julia_client/Torc/src/api/apis/api_WorkflowsApi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,36 @@ function get_ready_job_requirements(_api::WorkflowsApi, response_stream::Channel
return OpenAPI.Clients.exec(_ctx, response_stream)
end

const _returntypes_get_slurm_job_correlations_WorkflowsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => SlurmJobCorrelationsResponse,
Regex("^" * replace("403", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("404", "x"=>".") * "\$") => ErrorResponse,
Regex("^" * replace("500", "x"=>".") * "\$") => ErrorResponse,
)

function _oacinternal_get_slurm_job_correlations(_api::WorkflowsApi, id::Int64; _mediaType=nothing)
_ctx = OpenAPI.Clients.Ctx(_api.client, "GET", _returntypes_get_slurm_job_correlations_WorkflowsApi, "/workflows/{id}/slurm_job_correlations", [])
OpenAPI.Clients.set_param(_ctx.path, "id", id) # type Int64
OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
return _ctx
end

@doc raw"""Params:
- id::Int64 (required)

Return: SlurmJobCorrelationsResponse, OpenAPI.Clients.ApiResponse
"""
function get_slurm_job_correlations(_api::WorkflowsApi, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_slurm_job_correlations(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx)
end

function get_slurm_job_correlations(_api::WorkflowsApi, response_stream::Channel, id::Int64; _mediaType=nothing)
_ctx = _oacinternal_get_slurm_job_correlations(_api, id; _mediaType=_mediaType)
return OpenAPI.Clients.exec(_ctx, response_stream)
end

const _returntypes_get_workflow_WorkflowsApi = Dict{Regex,Type}(
Regex("^" * replace("200", "x"=>".") * "\$") => WorkflowModel,
)
Expand Down Expand Up @@ -777,6 +807,7 @@ export create_workflow
export delete_workflow
export get_active_task_for_workflow
export get_ready_job_requirements
export get_slurm_job_correlations
export get_workflow
export get_workflow_status
export initialize_jobs
Expand Down
2 changes: 2 additions & 0 deletions julia_client/Torc/src/api/modelincludes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ include("models/model_ResourceRequirementsModel.jl")
include("models/model_ResultModel.jl")
include("models/model_RoCrateEntityModel.jl")
include("models/model_ScheduledComputeNodesModel.jl")
include("models/model_SlurmJobCorrelationModel.jl")
include("models/model_SlurmJobCorrelationsResponse.jl")
include("models/model_SlurmSchedulerModel.jl")
include("models/model_SlurmStatsModel.jl")
include("models/model_SpawnJobModel.jl")
Expand Down
53 changes: 53 additions & 0 deletions julia_client/Torc/src/api/models/model_SlurmJobCorrelationModel.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.


@doc raw"""SlurmJobCorrelationModel
One Slurm-job-to-Torc-job correlation row: the Slurm job that ran a given Torc job, derived from scheduled_compute_node -> compute_node -> result.

SlurmJobCorrelationModel(;
job_id=nothing,
job_name=nothing,
slurm_job_id=nothing,
)

- job_id::Int64
- job_name::String
- slurm_job_id::String
"""
Base.@kwdef mutable struct SlurmJobCorrelationModel <: OpenAPI.APIModel
job_id::Union{Nothing, Int64} = nothing
job_name::Union{Nothing, String} = nothing
slurm_job_id::Union{Nothing, String} = nothing

function SlurmJobCorrelationModel(job_id, job_name, slurm_job_id, )
o = new(job_id, job_name, slurm_job_id, )
OpenAPI.validate_properties(o)
return o
end
end # type SlurmJobCorrelationModel

const _property_types_SlurmJobCorrelationModel = Dict{Symbol,String}(Symbol("job_id")=>"Int64", Symbol("job_name")=>"String", Symbol("slurm_job_id")=>"String", )
OpenAPI.property_type(::Type{ SlurmJobCorrelationModel }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_SlurmJobCorrelationModel[name]))}

function OpenAPI.check_required(o::SlurmJobCorrelationModel)
o.job_id === nothing && (return false)
o.job_name === nothing && (return false)
o.slurm_job_id === nothing && (return false)
true
end

function OpenAPI.validate_properties(o::SlurmJobCorrelationModel)
OpenAPI.validate_property(SlurmJobCorrelationModel, Symbol("job_id"), o.job_id)
OpenAPI.validate_property(SlurmJobCorrelationModel, Symbol("job_name"), o.job_name)
OpenAPI.validate_property(SlurmJobCorrelationModel, Symbol("slurm_job_id"), o.slurm_job_id)
end

function OpenAPI.validate_property(::Type{ SlurmJobCorrelationModel }, name::Symbol, val)

if name === Symbol("job_id")
OpenAPI.validate_param(name, "SlurmJobCorrelationModel", :format, val, "int64")
end


end
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.


@doc raw"""SlurmJobCorrelationsResponse
All Slurm-job-to-Torc-job correlations for a workflow, computed server-side.

SlurmJobCorrelationsResponse(;
items=nothing,
)

- items::Vector{SlurmJobCorrelationModel}
"""
Base.@kwdef mutable struct SlurmJobCorrelationsResponse <: OpenAPI.APIModel
items::Union{Nothing, Vector} = nothing # spec type: Union{ Nothing, Vector{SlurmJobCorrelationModel} }

function SlurmJobCorrelationsResponse(items, )
o = new(items, )
OpenAPI.validate_properties(o)
return o
end
end # type SlurmJobCorrelationsResponse

const _property_types_SlurmJobCorrelationsResponse = Dict{Symbol,String}(Symbol("items")=>"Vector{SlurmJobCorrelationModel}", )
OpenAPI.property_type(::Type{ SlurmJobCorrelationsResponse }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_SlurmJobCorrelationsResponse[name]))}

function OpenAPI.check_required(o::SlurmJobCorrelationsResponse)
o.items === nothing && (return false)
true
end

function OpenAPI.validate_properties(o::SlurmJobCorrelationsResponse)
OpenAPI.validate_property(SlurmJobCorrelationsResponse, Symbol("items"), o.items)
end

function OpenAPI.validate_property(::Type{ SlurmJobCorrelationsResponse }, name::Symbol, val)

end
3 changes: 3 additions & 0 deletions julia_client/julia_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Class | Method
*WorkflowsApi* | [**delete_workflow**](docs/WorkflowsApi.md#delete_workflow)<br/>**DELETE** /workflows/{id}<br/>
*WorkflowsApi* | [**get_active_task_for_workflow**](docs/WorkflowsApi.md#get_active_task_for_workflow)<br/>**GET** /workflows/{id}/active_task<br/>
*WorkflowsApi* | [**get_ready_job_requirements**](docs/WorkflowsApi.md#get_ready_job_requirements)<br/>**GET** /workflows/{id}/ready_job_requirements<br/>
*WorkflowsApi* | [**get_slurm_job_correlations**](docs/WorkflowsApi.md#get_slurm_job_correlations)<br/>**GET** /workflows/{id}/slurm_job_correlations<br/>
*WorkflowsApi* | [**get_workflow**](docs/WorkflowsApi.md#get_workflow)<br/>**GET** /workflows/{id}<br/>
*WorkflowsApi* | [**get_workflow_status**](docs/WorkflowsApi.md#get_workflow_status)<br/>**GET** /workflows/{id}/status<br/>
*WorkflowsApi* | [**initialize_jobs**](docs/WorkflowsApi.md#initialize_jobs)<br/>**POST** /workflows/{id}/initialize_jobs<br/>
Expand Down Expand Up @@ -228,6 +229,8 @@ Class | Method
- [ResultModel](docs/ResultModel.md)
- [RoCrateEntityModel](docs/RoCrateEntityModel.md)
- [ScheduledComputeNodesModel](docs/ScheduledComputeNodesModel.md)
- [SlurmJobCorrelationModel](docs/SlurmJobCorrelationModel.md)
- [SlurmJobCorrelationsResponse](docs/SlurmJobCorrelationsResponse.md)
- [SlurmSchedulerModel](docs/SlurmSchedulerModel.md)
- [SlurmStatsModel](docs/SlurmStatsModel.md)
- [SpawnJobModel](docs/SpawnJobModel.md)
Expand Down
14 changes: 14 additions & 0 deletions julia_client/julia_client/docs/SlurmJobCorrelationModel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SlurmJobCorrelationModel


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**job_id** | **Int64** | | [default to nothing]
**job_name** | **String** | | [default to nothing]
**slurm_job_id** | **String** | | [default to nothing]


[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions julia_client/julia_client/docs/SlurmJobCorrelationsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SlurmJobCorrelationsResponse


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**Vector{SlurmJobCorrelationModel}**](SlurmJobCorrelationModel.md) | | [default to nothing]


[[Back to Model list]](../README.md#models) [[Back to API list]](../README.md#api-endpoints) [[Back to README]](../README.md)


29 changes: 29 additions & 0 deletions julia_client/julia_client/docs/WorkflowsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Method | HTTP request | Description
[**delete_workflow**](WorkflowsApi.md#delete_workflow) | **DELETE** /workflows/{id} |
[**get_active_task_for_workflow**](WorkflowsApi.md#get_active_task_for_workflow) | **GET** /workflows/{id}/active_task |
[**get_ready_job_requirements**](WorkflowsApi.md#get_ready_job_requirements) | **GET** /workflows/{id}/ready_job_requirements |
[**get_slurm_job_correlations**](WorkflowsApi.md#get_slurm_job_correlations) | **GET** /workflows/{id}/slurm_job_correlations |
[**get_workflow**](WorkflowsApi.md#get_workflow) | **GET** /workflows/{id} |
[**get_workflow_status**](WorkflowsApi.md#get_workflow_status) | **GET** /workflows/{id}/status |
[**initialize_jobs**](WorkflowsApi.md#initialize_jobs) | **POST** /workflows/{id}/initialize_jobs |
Expand Down Expand Up @@ -305,6 +306,34 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

# **get_slurm_job_correlations**
> get_slurm_job_correlations(_api::WorkflowsApi, id::Int64; _mediaType=nothing) -> SlurmJobCorrelationsResponse, OpenAPI.Clients.ApiResponse <br/>
> get_slurm_job_correlations(_api::WorkflowsApi, response_stream::Channel, id::Int64; _mediaType=nothing) -> Channel{ SlurmJobCorrelationsResponse }, OpenAPI.Clients.ApiResponse



### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**_api** | **WorkflowsApi** | API context |
**id** | **Int64** | Workflow ID |

### Return type

[**SlurmJobCorrelationsResponse**](SlurmJobCorrelationsResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

# **get_workflow**
> get_workflow(_api::WorkflowsApi, id::Int64; _mediaType=nothing) -> WorkflowModel, OpenAPI.Clients.ApiResponse <br/>
> get_workflow(_api::WorkflowsApi, response_stream::Channel, id::Int64; _mediaType=nothing) -> Channel{ WorkflowModel }, OpenAPI.Clients.ApiResponse
Expand Down
Loading
Loading