OAPI: add endpoint for getting a single job type

This will be used by the web frontend to determine which job settings
to show and which to hide.
This commit is contained in:
Sybren A. Stüvel 2022-04-15 16:21:48 +02:00
parent d30befa2d7
commit d099a31531
19 changed files with 625 additions and 104 deletions

View File

@ -10,7 +10,7 @@
""" """
__version__ = "61618531-dirty" __version__ = "70584ce9-dirty"
# import ApiClient # import ApiClient
from flamenco.manager.api_client import ApiClient from flamenco.manager.api_client import ApiClient

View File

@ -21,6 +21,7 @@ from flamenco.manager.model_utils import ( # noqa: F401
none_type, none_type,
validate_and_convert_types validate_and_convert_types
) )
from flamenco.manager.model.available_job_type import AvailableJobType
from flamenco.manager.model.available_job_types import AvailableJobTypes from flamenco.manager.model.available_job_types import AvailableJobTypes
from flamenco.manager.model.error import Error from flamenco.manager.model.error import Error
from flamenco.manager.model.job import Job from flamenco.manager.model.job import Job
@ -89,6 +90,55 @@ class JobsApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.get_job_type_endpoint = _Endpoint(
settings={
'response_type': (AvailableJobType,),
'auth': [],
'endpoint_path': '/api/jobs/type/{typeName}',
'operation_id': 'get_job_type',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'type_name',
],
'required': [
'type_name',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'type_name':
(str,),
},
'attribute_map': {
'type_name': 'typeName',
},
'location_map': {
'type_name': 'path',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.get_job_types_endpoint = _Endpoint( self.get_job_types_endpoint = _Endpoint(
settings={ settings={
'response_type': (AvailableJobTypes,), 'response_type': (AvailableJobTypes,),
@ -309,6 +359,83 @@ class JobsApi(object):
job_id job_id
return self.fetch_job_endpoint.call_with_http_info(**kwargs) return self.fetch_job_endpoint.call_with_http_info(**kwargs)
def get_job_type(
self,
type_name,
**kwargs
):
"""Get single job type and its parameters. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_job_type(type_name, async_req=True)
>>> result = thread.get()
Args:
type_name (str):
Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously
Returns:
AvailableJobType
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['type_name'] = \
type_name
return self.get_job_type_endpoint.call_with_http_info(**kwargs)
def get_job_types( def get_job_types(
self, self,
**kwargs **kwargs

View File

@ -76,7 +76,7 @@ class ApiClient(object):
self.default_headers[header_name] = header_value self.default_headers[header_name] = header_value
self.cookie = cookie self.cookie = cookie
# Set default User-Agent. # Set default User-Agent.
self.user_agent = 'Flamenco/61618531-dirty (Blender add-on)' self.user_agent = 'Flamenco/70584ce9-dirty (Blender add-on)'
def __enter__(self): def __enter__(self):
return self return self

View File

@ -404,7 +404,7 @@ conf = flamenco.manager.Configuration(
"OS: {env}\n"\ "OS: {env}\n"\
"Python Version: {pyversion}\n"\ "Python Version: {pyversion}\n"\
"Version of the API: 1.0.0\n"\ "Version of the API: 1.0.0\n"\
"SDK Package Version: 61618531-dirty".\ "SDK Package Version: 70584ce9-dirty".\
format(env=sys.platform, pyversion=sys.version) format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self): def get_host_settings(self):

View File

@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**fetch_job**](JobsApi.md#fetch_job) | **GET** /api/jobs/{job_id} | Fetch info about the job. [**fetch_job**](JobsApi.md#fetch_job) | **GET** /api/jobs/{job_id} | Fetch info about the job.
[**get_job_type**](JobsApi.md#get_job_type) | **GET** /api/jobs/type/{typeName} | Get single job type and its parameters.
[**get_job_types**](JobsApi.md#get_job_types) | **GET** /api/jobs/types | Get list of job types and their parameters. [**get_job_types**](JobsApi.md#get_job_types) | **GET** /api/jobs/types | Get list of job types and their parameters.
[**query_jobs**](JobsApi.md#query_jobs) | **POST** /api/jobs/query | Fetch list of jobs. [**query_jobs**](JobsApi.md#query_jobs) | **POST** /api/jobs/query | Fetch list of jobs.
[**submit_job**](JobsApi.md#submit_job) | **POST** /api/jobs | Submit a new job for Flamenco Manager to execute. [**submit_job**](JobsApi.md#submit_job) | **POST** /api/jobs | Submit a new job for Flamenco Manager to execute.
@ -75,6 +76,71 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_job_type**
> AvailableJobType get_job_type(type_name)
Get single job type and its parameters.
### Example
```python
import time
import flamenco.manager
from flamenco.manager.api import jobs_api
from flamenco.manager.model.available_job_type import AvailableJobType
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = flamenco.manager.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with flamenco.manager.ApiClient() as api_client:
# Create an instance of the API class
api_instance = jobs_api.JobsApi(api_client)
type_name = "typeName_example" # str |
# example passing only required values which don't have defaults set
try:
# Get single job type and its parameters.
api_response = api_instance.get_job_type(type_name)
pprint(api_response)
except flamenco.manager.ApiException as e:
print("Exception when calling JobsApi->get_job_type: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**type_name** | **str**| |
### Return type
[**AvailableJobType**](AvailableJobType.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Job type | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_job_types** # **get_job_types**
> AvailableJobTypes get_job_types() > AvailableJobTypes get_job_types()

View File

@ -4,7 +4,7 @@ Render Farm manager API
The `flamenco.manager` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: The `flamenco.manager` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.0 - API version: 1.0.0
- Package version: 61618531-dirty - Package version: 70584ce9-dirty
- Build package: org.openapitools.codegen.languages.PythonClientCodegen - Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://flamenco.io/](https://flamenco.io/) For more information, please visit [https://flamenco.io/](https://flamenco.io/)
@ -32,6 +32,7 @@ import time
import flamenco.manager import flamenco.manager
from pprint import pprint from pprint import pprint
from flamenco.manager.api import jobs_api from flamenco.manager.api import jobs_api
from flamenco.manager.model.available_job_type import AvailableJobType
from flamenco.manager.model.available_job_types import AvailableJobTypes from flamenco.manager.model.available_job_types import AvailableJobTypes
from flamenco.manager.model.error import Error from flamenco.manager.model.error import Error
from flamenco.manager.model.job import Job from flamenco.manager.model.job import Job
@ -67,6 +68,7 @@ All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*JobsApi* | [**fetch_job**](flamenco/manager/docs/JobsApi.md#fetch_job) | **GET** /api/jobs/{job_id} | Fetch info about the job. *JobsApi* | [**fetch_job**](flamenco/manager/docs/JobsApi.md#fetch_job) | **GET** /api/jobs/{job_id} | Fetch info about the job.
*JobsApi* | [**get_job_type**](flamenco/manager/docs/JobsApi.md#get_job_type) | **GET** /api/jobs/type/{typeName} | Get single job type and its parameters.
*JobsApi* | [**get_job_types**](flamenco/manager/docs/JobsApi.md#get_job_types) | **GET** /api/jobs/types | Get list of job types and their parameters. *JobsApi* | [**get_job_types**](flamenco/manager/docs/JobsApi.md#get_job_types) | **GET** /api/jobs/types | Get list of job types and their parameters.
*JobsApi* | [**query_jobs**](flamenco/manager/docs/JobsApi.md#query_jobs) | **POST** /api/jobs/query | Fetch list of jobs. *JobsApi* | [**query_jobs**](flamenco/manager/docs/JobsApi.md#query_jobs) | **POST** /api/jobs/query | Fetch list of jobs.
*JobsApi* | [**submit_job**](flamenco/manager/docs/JobsApi.md#submit_job) | **POST** /api/jobs | Submit a new job for Flamenco Manager to execute. *JobsApi* | [**submit_job**](flamenco/manager/docs/JobsApi.md#submit_job) | **POST** /api/jobs | Submit a new job for Flamenco Manager to execute.

View File

@ -81,6 +81,7 @@ var _ ChangeBroadcaster = (*webupdates.BiDirComms)(nil)
type JobCompiler interface { type JobCompiler interface {
ListJobTypes() api.AvailableJobTypes ListJobTypes() api.AvailableJobTypes
GetJobType(typeName string) (api.AvailableJobType, error)
Compile(ctx context.Context, job api.SubmittedJob) (*job_compilers.AuthoredJob, error) Compile(ctx context.Context, job api.SubmittedJob) (*job_compilers.AuthoredJob, error)
} }

View File

@ -7,6 +7,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"git.blender.org/flamenco/internal/manager/job_compilers"
"git.blender.org/flamenco/internal/manager/persistence" "git.blender.org/flamenco/internal/manager/persistence"
"git.blender.org/flamenco/internal/manager/webupdates" "git.blender.org/flamenco/internal/manager/webupdates"
"git.blender.org/flamenco/pkg/api" "git.blender.org/flamenco/pkg/api"
@ -28,6 +29,26 @@ func (f *Flamenco) GetJobTypes(e echo.Context) error {
return e.JSON(http.StatusOK, &jobTypes) return e.JSON(http.StatusOK, &jobTypes)
} }
func (f *Flamenco) GetJobType(e echo.Context, typeName string) error {
logger := requestLogger(e)
if f.jobCompiler == nil {
logger.Error().Msg("Flamenco is running without job compiler")
return sendAPIError(e, http.StatusInternalServerError, "no job types available")
}
logger.Debug().Str("typeName", typeName).Msg("getting job type")
jobType, err := f.jobCompiler.GetJobType(typeName)
if err != nil {
if err == job_compilers.ErrJobTypeUnknown {
return sendAPIError(e, http.StatusNotFound, "no such job type known")
}
return sendAPIError(e, http.StatusInternalServerError, "error getting job type")
}
return e.JSON(http.StatusOK, jobType)
}
func (f *Flamenco) SubmitJob(e echo.Context) error { func (f *Flamenco) SubmitJob(e echo.Context) error {
logger := requestLogger(e) logger := requestLogger(e)

View File

@ -4,6 +4,8 @@ package api_impl
import ( import (
"context" "context"
"errors"
"net/http"
"testing" "testing"
"time" "time"
@ -138,3 +140,58 @@ func TestTaskUpdate(t *testing.T) {
assert.Equal(t, "pre-update activity", statusChangedtask.Activity) // the 'save' should come from the change in status. assert.Equal(t, "pre-update activity", statusChangedtask.Activity) // the 'save' should come from the change in status.
assert.Equal(t, "testing", actUpdatedTask.Activity) // the activity should be saved separately. assert.Equal(t, "testing", actUpdatedTask.Activity) // the activity should be saved separately.
} }
func TestGetJobTypeHappy(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mf := newMockedFlamenco(mockCtrl)
// Get an existing job type.
jt := api.AvailableJobType{
Name: "test-job-type",
Label: "Test Job Type",
Settings: []api.AvailableJobSetting{
{Key: "setting", Type: api.AvailableJobSettingTypeString},
},
}
mf.jobCompiler.EXPECT().GetJobType("test-job-type").
Return(jt, nil)
echoCtx := mf.prepareMockedRequest(nil)
err := mf.flamenco.GetJobType(echoCtx, "test-job-type")
assert.NoError(t, err)
assertJSONResponse(t, echoCtx, http.StatusOK, jt)
}
func TestGetJobTypeUnknown(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mf := newMockedFlamenco(mockCtrl)
// Get a non-existing job type.
mf.jobCompiler.EXPECT().GetJobType("nonexistent-type").
Return(api.AvailableJobType{}, job_compilers.ErrJobTypeUnknown)
echoCtx := mf.prepareMockedRequest(nil)
err := mf.flamenco.GetJobType(echoCtx, "nonexistent-type")
assert.NoError(t, err)
assertJSONResponse(t, echoCtx, http.StatusNotFound, api.Error{
Code: http.StatusNotFound,
Message: "no such job type known",
})
}
func TestGetJobTypeError(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mf := newMockedFlamenco(mockCtrl)
// Get an error situation.
mf.jobCompiler.EXPECT().GetJobType("error").
Return(api.AvailableJobType{}, errors.New("didn't expect this"))
echoCtx := mf.prepareMockedRequest(nil)
err := mf.flamenco.GetJobType(echoCtx, "error")
assert.NoError(t, err)
assertAPIErrorResponse(t, echoCtx, http.StatusInternalServerError, "error getting job type")
}

View File

@ -287,6 +287,21 @@ func (mr *MockJobCompilerMockRecorder) Compile(arg0, arg1 interface{}) *gomock.C
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Compile", reflect.TypeOf((*MockJobCompiler)(nil).Compile), arg0, arg1) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Compile", reflect.TypeOf((*MockJobCompiler)(nil).Compile), arg0, arg1)
} }
// GetJobType mocks base method.
func (m *MockJobCompiler) GetJobType(arg0 string) (api.AvailableJobType, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetJobType", arg0)
ret0, _ := ret[0].(api.AvailableJobType)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetJobType indicates an expected call of GetJobType.
func (mr *MockJobCompilerMockRecorder) GetJobType(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJobType", reflect.TypeOf((*MockJobCompiler)(nil).GetJobType), arg0)
}
// ListJobTypes mocks base method. // ListJobTypes mocks base method.
func (m *MockJobCompiler) ListJobTypes() api.AvailableJobTypes { func (m *MockJobCompiler) ListJobTypes() api.AvailableJobTypes {
m.ctrl.T.Helper() m.ctrl.T.Helper()

View File

@ -111,6 +111,13 @@ func assertJSONResponse(t *testing.T, echoCtx echo.Context, expectStatusCode int
assert.JSONEq(t, string(expectJSON), string(actualJSON)) assert.JSONEq(t, string(expectJSON), string(actualJSON))
} }
func assertAPIErrorResponse(t *testing.T, echoCtx echo.Context, expectStatusCode int, expectMessage string) {
assertJSONResponse(t, echoCtx, expectStatusCode, api.Error{
Code: int32(expectStatusCode),
Message: expectMessage,
})
}
func testWorker() persistence.Worker { func testWorker() persistence.Worker {
return persistence.Worker{ return persistence.Worker{
Model: gorm.Model{ID: 1}, Model: gorm.Model{ID: 1},

View File

@ -147,6 +147,16 @@ func (s *Service) ListJobTypes() api.AvailableJobTypes {
return api.AvailableJobTypes{JobTypes: jobTypes} return api.AvailableJobTypes{JobTypes: jobTypes}
} }
// GetJobType returns information about the named job type.
// Returns ErrJobTypeUnknown when the name doesn't correspond with a known job type.
func (s *Service) GetJobType(typeName string) (api.AvailableJobType, error) {
compiler, err := s.compilerForJobType(typeName)
if err != nil {
return api.AvailableJobType{}, err
}
return compiler.getJobTypeInfo()
}
func (vm *VM) getCompileJob() (jobCompileFunc, error) { func (vm *VM) getCompileJob() (jobCompileFunc, error) {
compileJob, isCallable := goja.AssertFunction(vm.runtime.Get("compileJob")) compileJob, isCallable := goja.AssertFunction(vm.runtime.Get("compileJob"))
if !isCallable { if !isCallable {

View File

@ -76,6 +76,26 @@ func (mr *MockFlamencoClientMockRecorder) GetConfigurationWithResponse(arg0 inte
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfigurationWithResponse", reflect.TypeOf((*MockFlamencoClient)(nil).GetConfigurationWithResponse), varargs...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfigurationWithResponse", reflect.TypeOf((*MockFlamencoClient)(nil).GetConfigurationWithResponse), varargs...)
} }
// GetJobTypeWithResponse mocks base method.
func (m *MockFlamencoClient) GetJobTypeWithResponse(arg0 context.Context, arg1 string, arg2 ...api.RequestEditorFn) (*api.GetJobTypeResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetJobTypeWithResponse", varargs...)
ret0, _ := ret[0].(*api.GetJobTypeResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetJobTypeWithResponse indicates an expected call of GetJobTypeWithResponse.
func (mr *MockFlamencoClientMockRecorder) GetJobTypeWithResponse(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetJobTypeWithResponse", reflect.TypeOf((*MockFlamencoClient)(nil).GetJobTypeWithResponse), varargs...)
}
// GetJobTypesWithResponse mocks base method. // GetJobTypesWithResponse mocks base method.
func (m *MockFlamencoClient) GetJobTypesWithResponse(arg0 context.Context, arg1 ...api.RequestEditorFn) (*api.GetJobTypesResponse, error) { func (m *MockFlamencoClient) GetJobTypesWithResponse(arg0 context.Context, arg1 ...api.RequestEditorFn) (*api.GetJobTypesResponse, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()

View File

@ -236,6 +236,24 @@ paths:
application/json: application/json:
schema: {$ref: "#/components/schemas/AvailableJobTypes"} schema: {$ref: "#/components/schemas/AvailableJobTypes"}
/api/jobs/type/{typeName}:
summary: Info about a specific job type.
get:
operationId: getJobType
summary: Get single job type and its parameters.
tags: [jobs]
parameters:
- name: typeName
in: path
required: true
schema: {type: string}
responses:
"200":
description: Job type
content:
application/json:
schema: {$ref: "#/components/schemas/AvailableJobType"}
/api/jobs: /api/jobs:
summary: Job submission endpoint. summary: Job submission endpoint.
post: post:

View File

@ -103,6 +103,9 @@ type ClientInterface interface {
QueryJobs(ctx context.Context, body QueryJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) QueryJobs(ctx context.Context, body QueryJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetJobType request
GetJobType(ctx context.Context, typeName string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetJobTypes request // GetJobTypes request
GetJobTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) GetJobTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
@ -218,6 +221,18 @@ func (c *Client) QueryJobs(ctx context.Context, body QueryJobsJSONRequestBody, r
return c.Client.Do(req) return c.Client.Do(req)
} }
func (c *Client) GetJobType(ctx context.Context, typeName string, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewGetJobTypeRequest(c.Server, typeName)
if err != nil {
return nil, err
}
req = req.WithContext(ctx)
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
return c.Client.Do(req)
}
func (c *Client) GetJobTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { func (c *Client) GetJobTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewGetJobTypesRequest(c.Server) req, err := NewGetJobTypesRequest(c.Server)
if err != nil { if err != nil {
@ -565,6 +580,40 @@ func NewQueryJobsRequestWithBody(server string, contentType string, body io.Read
return req, nil return req, nil
} }
// NewGetJobTypeRequest generates requests for GetJobType
func NewGetJobTypeRequest(server string, typeName string) (*http.Request, error) {
var err error
var pathParam0 string
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "typeName", runtime.ParamLocationPath, typeName)
if err != nil {
return nil, err
}
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
operationPath := fmt.Sprintf("/api/jobs/type/%s", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
queryURL, err := serverURL.Parse(operationPath)
if err != nil {
return nil, err
}
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
return req, nil
}
// NewGetJobTypesRequest generates requests for GetJobTypes // NewGetJobTypesRequest generates requests for GetJobTypes
func NewGetJobTypesRequest(server string) (*http.Request, error) { func NewGetJobTypesRequest(server string) (*http.Request, error) {
var err error var err error
@ -1143,6 +1192,9 @@ type ClientWithResponsesInterface interface {
QueryJobsWithResponse(ctx context.Context, body QueryJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryJobsResponse, error) QueryJobsWithResponse(ctx context.Context, body QueryJobsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryJobsResponse, error)
// GetJobType request
GetJobTypeWithResponse(ctx context.Context, typeName string, reqEditors ...RequestEditorFn) (*GetJobTypeResponse, error)
// GetJobTypes request // GetJobTypes request
GetJobTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJobTypesResponse, error) GetJobTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJobTypesResponse, error)
@ -1266,6 +1318,28 @@ func (r QueryJobsResponse) StatusCode() int {
return 0 return 0
} }
type GetJobTypeResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AvailableJobType
}
// Status returns HTTPResponse.Status
func (r GetJobTypeResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
return http.StatusText(0)
}
// StatusCode returns HTTPResponse.StatusCode
func (r GetJobTypeResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
type GetJobTypesResponse struct { type GetJobTypesResponse struct {
Body []byte Body []byte
HTTPResponse *http.Response HTTPResponse *http.Response
@ -1627,6 +1701,15 @@ func (c *ClientWithResponses) QueryJobsWithResponse(ctx context.Context, body Qu
return ParseQueryJobsResponse(rsp) return ParseQueryJobsResponse(rsp)
} }
// GetJobTypeWithResponse request returning *GetJobTypeResponse
func (c *ClientWithResponses) GetJobTypeWithResponse(ctx context.Context, typeName string, reqEditors ...RequestEditorFn) (*GetJobTypeResponse, error) {
rsp, err := c.GetJobType(ctx, typeName, reqEditors...)
if err != nil {
return nil, err
}
return ParseGetJobTypeResponse(rsp)
}
// GetJobTypesWithResponse request returning *GetJobTypesResponse // GetJobTypesWithResponse request returning *GetJobTypesResponse
func (c *ClientWithResponses) GetJobTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJobTypesResponse, error) { func (c *ClientWithResponses) GetJobTypesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJobTypesResponse, error) {
rsp, err := c.GetJobTypes(ctx, reqEditors...) rsp, err := c.GetJobTypes(ctx, reqEditors...)
@ -1893,6 +1976,32 @@ func ParseQueryJobsResponse(rsp *http.Response) (*QueryJobsResponse, error) {
return response, nil return response, nil
} }
// ParseGetJobTypeResponse parses an HTTP response from a GetJobTypeWithResponse call
func ParseGetJobTypeResponse(rsp *http.Response) (*GetJobTypeResponse, error) {
bodyBytes, err := ioutil.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
response := &GetJobTypeResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
var dest AvailableJobType
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
response.JSON200 = &dest
}
return response, nil
}
// ParseGetJobTypesResponse parses an HTTP response from a GetJobTypesWithResponse call // ParseGetJobTypesResponse parses an HTTP response from a GetJobTypesWithResponse call
func ParseGetJobTypesResponse(rsp *http.Response) (*GetJobTypesResponse, error) { func ParseGetJobTypesResponse(rsp *http.Response) (*GetJobTypesResponse, error) {
bodyBytes, err := ioutil.ReadAll(rsp.Body) bodyBytes, err := ioutil.ReadAll(rsp.Body)

View File

@ -22,6 +22,9 @@ type ServerInterface interface {
// Fetch list of jobs. // Fetch list of jobs.
// (POST /api/jobs/query) // (POST /api/jobs/query)
QueryJobs(ctx echo.Context) error QueryJobs(ctx echo.Context) error
// Get single job type and its parameters.
// (GET /api/jobs/type/{typeName})
GetJobType(ctx echo.Context, typeName string) error
// Get list of job types and their parameters. // Get list of job types and their parameters.
// (GET /api/jobs/types) // (GET /api/jobs/types)
GetJobTypes(ctx echo.Context) error GetJobTypes(ctx echo.Context) error
@ -99,6 +102,22 @@ func (w *ServerInterfaceWrapper) QueryJobs(ctx echo.Context) error {
return err return err
} }
// GetJobType converts echo context to params.
func (w *ServerInterfaceWrapper) GetJobType(ctx echo.Context) error {
var err error
// ------------- Path parameter "typeName" -------------
var typeName string
err = runtime.BindStyledParameterWithLocation("simple", false, "typeName", runtime.ParamLocationPath, ctx.Param("typeName"), &typeName)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter typeName: %s", err))
}
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetJobType(ctx, typeName)
return err
}
// GetJobTypes converts echo context to params. // GetJobTypes converts echo context to params.
func (w *ServerInterfaceWrapper) GetJobTypes(ctx echo.Context) error { func (w *ServerInterfaceWrapper) GetJobTypes(ctx echo.Context) error {
var err error var err error
@ -347,6 +366,7 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL
router.GET(baseURL+"/api/configuration", wrapper.GetConfiguration) router.GET(baseURL+"/api/configuration", wrapper.GetConfiguration)
router.POST(baseURL+"/api/jobs", wrapper.SubmitJob) router.POST(baseURL+"/api/jobs", wrapper.SubmitJob)
router.POST(baseURL+"/api/jobs/query", wrapper.QueryJobs) router.POST(baseURL+"/api/jobs/query", wrapper.QueryJobs)
router.GET(baseURL+"/api/jobs/type/:typeName", wrapper.GetJobType)
router.GET(baseURL+"/api/jobs/types", wrapper.GetJobTypes) router.GET(baseURL+"/api/jobs/types", wrapper.GetJobTypes)
router.GET(baseURL+"/api/jobs/:job_id", wrapper.FetchJob) router.GET(baseURL+"/api/jobs/:job_id", wrapper.FetchJob)
router.GET(baseURL+"/api/version", wrapper.GetVersion) router.GET(baseURL+"/api/version", wrapper.GetVersion)

View File

@ -18,105 +18,106 @@ import (
// Base64 encoded, gzipped, json marshaled Swagger object // Base64 encoded, gzipped, json marshaled Swagger object
var swaggerSpec = []string{ var swaggerSpec = []string{
"H4sIAAAAAAAC/+Q823LcOHa/guKmanYr7IsuvukpWnu8I2dmrFjyTqrGLgkkD7thkUAPAKrd41LVfkT+", "H4sIAAAAAAAC/+Q823LcOHa/guKmyrsV9kUXW7aeorXHO3JmbMWSd1I1dkkgedgNiwQ4AKh2j0tV+xH5",
"JNmqPGSf8gPeP0rhHPDWREstW/J6N35wtUgQODj3G/AhSlW5UBKkNdHBh8ikcyg5/jw0RswkZKfcXLi/", "k2Sr8pB9yg94/ygFHICXJlrdsiWvd+MHV4sEgYNzvwEfo1SUleDAtYoOP0YqnUNJ7c8jpdiMQ3ZG1aX5",
"MzCpFgsrlIwOem+ZMIwz635xw4R1f2tIQVxCxpIVs3NgPyl9AXocxdFCqwVoKwBXSVVZcpnhb2GhxB//", "OwOVSlZpJnh02HtLmCKUaPOLKsK0+VtCCuwKMpIsiZ4D+UnIS5DjKI4qKSqQmoFdJRVlSXlmfzMNpf3x",
"pCGPDqLfTFrgJh6yyVP6ILqKI7taQHQQca35yv39TiXua//YWC3kzD8/W2ihtLCrzgAhLcxA1yPoaeBz", "TxLy6DD6zaQFbuIgmzzFD6LrONLLCqLDiEpJl+bv9yIxX7vHSkvGZ+75eSWZkEwvOwMY1zAD6Ufg08Dn",
"ycvwi+vnNJbb6sbtOPyd0Ei3I24uNgNSVSJzL3KlS26jA3oQrw+8iiMNv1RCQxYd/F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GxVoQOiaHZBXaconbposPt5FuxQNYyuNzdertDXgqb",
"uE8yVTnvjj4w4zeypuo3eOsASZPnhQRCFGCJylYbTWk35YPXlTZhxRAtPofkfpNBpR7vSdSpeQ2uWu93", "/KB6+NLKZy5kypJiSdJCKEyT2FtOU8E52Kv33J14LkPkFG/OOFNzUD16AYEPNNVE0RKcC6mFPXNkPslE",
"OA26RoU1UOTjVp9hH89Q9b5QSV2SxdzQLxVoASbudJLGa01R417rmAlMenh81O9l7VbkVFlW0h9Qcip9", "bbw7/ECN33JP1Qf2KgiUJscLCYQoQBKRLdea0m7Kx94h24QVQ7S4HJL5jQYVG+8nUafmNbj/vt/hNGjl",
"2ArdTO9TWwFbT/g7PD6KcSFkuZb4fkOYXnF/0119FHWazvyeXldvr/4vAAD//zuOfr8UZAAA", "ZVpBkY9bfWb7eIaq94VIfEnW5oZ+qUEyUHGnvTdeaYoa91rHVGDSo5PjfoNxtyInyrLm7tSYUenD/vRm",
"epfaCth6xN/RyXFsF7Is1xLfbcimV8zfeIEiRp2qM7+j1/W76/8LAAD//1fmENKpZQAA",
} }
// GetSwagger returns the content of the embedded swagger specification file // GetSwagger returns the content of the embedded swagger specification file

View File

@ -55,7 +55,7 @@ class ApiClient {
* @default {} * @default {}
*/ */
this.defaultHeaders = { this.defaultHeaders = {
'User-Agent': 'Flamenco/61618531-dirty / webbrowser' 'User-Agent': 'Flamenco/70584ce9-dirty / webbrowser'
}; };
/** /**

View File

@ -13,6 +13,7 @@
import ApiClient from "../ApiClient"; import ApiClient from "../ApiClient";
import AvailableJobType from '../model/AvailableJobType';
import AvailableJobTypes from '../model/AvailableJobTypes'; import AvailableJobTypes from '../model/AvailableJobTypes';
import Error from '../model/Error'; import Error from '../model/Error';
import Job from '../model/Job'; import Job from '../model/Job';
@ -86,6 +87,52 @@ export default class JobsApi {
} }
/**
* Get single job type and its parameters.
* @param {String} typeName
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AvailableJobType} and HTTP response
*/
getJobTypeWithHttpInfo(typeName) {
let postBody = null;
// verify the required parameter 'typeName' is set
if (typeName === undefined || typeName === null) {
throw new Error("Missing the required parameter 'typeName' when calling getJobType");
}
let pathParams = {
'typeName': typeName
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = AvailableJobType;
return this.apiClient.callApi(
'/api/jobs/type/{typeName}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* Get single job type and its parameters.
* @param {String} typeName
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AvailableJobType}
*/
getJobType(typeName) {
return this.getJobTypeWithHttpInfo(typeName)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/** /**
* Get list of job types and their parameters. * Get list of job types and their parameters.
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AvailableJobTypes} and HTTP response * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AvailableJobTypes} and HTTP response