iron_titan 0.2.17 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -33
- data/lib/iron_titan/api/groups_api.rb +138 -0
- data/lib/iron_titan/api/jobs_api.rb +225 -189
- data/lib/iron_titan/api_client.rb +1 -1
- data/lib/iron_titan/api_error.rb +1 -1
- data/lib/iron_titan/models/error.rb +1 -1
- data/lib/iron_titan/models/error_body.rb +1 -1
- data/lib/iron_titan/models/group.rb +173 -0
- data/lib/iron_titan/models/group_wrapper.rb +161 -0
- data/lib/iron_titan/models/groups_wrapper.rb +163 -0
- data/lib/iron_titan/models/id_status.rb +2 -2
- data/lib/iron_titan/models/job.rb +26 -15
- data/lib/iron_titan/models/job_wrapper.rb +1 -1
- data/lib/iron_titan/models/jobs_wrapper.rb +1 -1
- data/lib/iron_titan/models/new_job.rb +3 -3
- data/lib/iron_titan/models/new_jobs_wrapper.rb +1 -1
- data/lib/iron_titan/models/reason.rb +2 -2
- data/lib/iron_titan/version.rb +2 -2
- data/lib/iron_titan.rb +5 -6
- data/spec/api/groups_api_spec.rb +66 -0
- data/spec/api/jobs_api_spec.rb +61 -53
- data/spec/models/Error_spec.rb +1 -1
- data/spec/models/Job_spec.rb +12 -2
- data/spec/models/error_body_spec.rb +1 -1
- data/spec/models/group_spec.rb +56 -0
- data/spec/models/group_wrapper_spec.rb +46 -0
- data/spec/models/groups_wrapper_spec.rb +46 -0
- data/spec/models/id_status_spec.rb +1 -1
- data/spec/models/job_wrapper_spec.rb +1 -1
- data/spec/models/jobs_wrapper_spec.rb +1 -1
- data/spec/models/new_job_spec.rb +1 -1
- data/spec/models/new_jobs_wrapper_spec.rb +1 -1
- data/spec/models/reason_spec.rb +1 -1
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfac4ee0ad95a09b88b99de22a44304c821979e3
|
4
|
+
data.tar.gz: 5d5d4c363049a50b874074ecf222e2b987eda3a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4676eadc4f4940e16b725f146d678ba60639f3469d4869900bb0ea0f04aee3d6b1380dd01ed66cc214fcf21caa01271b736206393d8d3c76ce85a02e96e3dcef
|
7
|
+
data.tar.gz: 873f62f9185f4d5c7e1df0f2f52e081cd3f5f67842729d471806d112b24bedd21e036b03c09c1c115b3e2dad159b02a372166d2528dc3cd271a42d9a5c99dddf
|
data/README.md
CHANGED
@@ -6,9 +6,9 @@ The ultimate, language agnostic, container based job processing framework.
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
|
-
- API version: 0.
|
10
|
-
- Package version: 0.
|
11
|
-
- Build date: 2016-04-
|
9
|
+
- API version: 0.3.0
|
10
|
+
- Package version: 0.3.0
|
11
|
+
- Build date: 2016-04-05T21:57:28.555Z
|
12
12
|
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
13
13
|
|
14
14
|
## Installation
|
@@ -24,14 +24,14 @@ gem build iron_titan.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./iron_titan-0.
|
27
|
+
gem install ./iron_titan-0.3.0.gem
|
28
28
|
```
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'iron_titan', '~> 0.
|
34
|
+
gem 'iron_titan', '~> 0.3.0'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -54,16 +54,14 @@ Please follow the [installation](#installation) procedure and then run the follo
|
|
54
54
|
# Load the gem
|
55
55
|
require 'iron_titan'
|
56
56
|
|
57
|
-
api_instance = IronTitan::
|
58
|
-
|
59
|
-
id = "id_example" # String | Job id
|
60
|
-
|
57
|
+
api_instance = IronTitan::GroupsApi.new
|
61
58
|
|
62
59
|
begin
|
63
|
-
#
|
64
|
-
api_instance.
|
60
|
+
#Get all group names.
|
61
|
+
result = api_instance.groups_get
|
62
|
+
p result
|
65
63
|
rescue IronTitan::ApiError => e
|
66
|
-
puts "Exception when calling
|
64
|
+
puts "Exception when calling GroupsApi->groups_get: #{e}"
|
67
65
|
end
|
68
66
|
|
69
67
|
```
|
@@ -74,34 +72,30 @@ All URIs are relative to *https://localhost:8080/v1*
|
|
74
72
|
|
75
73
|
Class | Method | HTTP request | Description
|
76
74
|
------------ | ------------- | ------------- | -------------
|
77
|
-
*IronTitan::
|
78
|
-
*IronTitan::
|
79
|
-
*IronTitan::
|
80
|
-
*IronTitan::
|
81
|
-
*IronTitan::
|
82
|
-
*IronTitan::
|
83
|
-
*IronTitan::JobsApi* | [**
|
84
|
-
*IronTitan::JobsApi* | [**
|
85
|
-
*IronTitan::JobsApi* | [**
|
86
|
-
*IronTitan::JobsApi* | [**
|
87
|
-
*IronTitan::JobsApi* | [**
|
88
|
-
*IronTitan::JobsApi* | [**
|
89
|
-
*IronTitan::JobsApi* | [**
|
90
|
-
*IronTitan::JobsApi* | [**
|
91
|
-
*IronTitan::JobsApi* | [**job_id_touch_post**](docs/JobsApi.md#job_id_touch_post) | **POST** /job/{id}/touch | Extend job timeout.
|
92
|
-
*IronTitan::JobsApi* | [**jobs_consume_get**](docs/JobsApi.md#jobs_consume_get) | **GET** /jobs/consume | Get next job.
|
93
|
-
*IronTitan::JobsApi* | [**jobs_get**](docs/JobsApi.md#jobs_get) | **GET** /jobs | Peek at list of jobs.
|
94
|
-
*IronTitan::JobsApi* | [**jobs_post**](docs/JobsApi.md#jobs_post) | **POST** /jobs | Enqueue Job
|
75
|
+
*IronTitan::GroupsApi* | [**groups_get**](docs/GroupsApi.md#groups_get) | **GET** /groups | Get all group names.
|
76
|
+
*IronTitan::GroupsApi* | [**groups_name_get**](docs/GroupsApi.md#groups_name_get) | **GET** /groups/{name} | Get information for a group.
|
77
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_get**](docs/JobsApi.md#groups_group_name_jobs_get) | **GET** /groups/{group_name}/jobs | Get job list by group name.
|
78
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_cancel_post**](docs/JobsApi.md#groups_group_name_jobs_id_cancel_post) | **POST** /groups/{group_name}/jobs/{id}/cancel | Cancel a job.
|
79
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_delete**](docs/JobsApi.md#groups_group_name_jobs_id_delete) | **DELETE** /groups/{group_name}/jobs/{id} | Delete the job.
|
80
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_error_post**](docs/JobsApi.md#groups_group_name_jobs_id_error_post) | **POST** /groups/{group_name}/jobs/{id}/error | Mark job as failed.
|
81
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_get**](docs/JobsApi.md#groups_group_name_jobs_id_get) | **GET** /groups/{group_name}/jobs/{id} | Gets job by id
|
82
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_log_get**](docs/JobsApi.md#groups_group_name_jobs_id_log_get) | **GET** /groups/{group_name}/jobs/{id}/log | Get the log of a completed job.
|
83
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_log_post**](docs/JobsApi.md#groups_group_name_jobs_id_log_post) | **POST** /groups/{group_name}/jobs/{id}/log | Send in a log for storage.
|
84
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_retry_post**](docs/JobsApi.md#groups_group_name_jobs_id_retry_post) | **POST** /groups/{group_name}/jobs/{id}/retry | Retry a job.
|
85
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_success_post**](docs/JobsApi.md#groups_group_name_jobs_id_success_post) | **POST** /groups/{group_name}/jobs/{id}/success | Mark job as succeeded.
|
86
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_id_touch_post**](docs/JobsApi.md#groups_group_name_jobs_id_touch_post) | **POST** /groups/{group_name}/jobs/{id}/touch | Extend job timeout.
|
87
|
+
*IronTitan::JobsApi* | [**groups_group_name_jobs_post**](docs/JobsApi.md#groups_group_name_jobs_post) | **POST** /groups/{group_name}/jobs | Enqueue Job
|
88
|
+
*IronTitan::JobsApi* | [**jobs_get**](docs/JobsApi.md#jobs_get) | **GET** /jobs | Get next job.
|
95
89
|
|
96
90
|
|
97
91
|
## Documentation for Models
|
98
92
|
|
99
93
|
- [IronTitan::Error](docs/Error.md)
|
100
94
|
- [IronTitan::ErrorBody](docs/ErrorBody.md)
|
95
|
+
- [IronTitan::Group](docs/Group.md)
|
96
|
+
- [IronTitan::GroupWrapper](docs/GroupWrapper.md)
|
97
|
+
- [IronTitan::GroupsWrapper](docs/GroupsWrapper.md)
|
101
98
|
- [IronTitan::IdStatus](docs/IdStatus.md)
|
102
|
-
- [IronTitan::Image](docs/Image.md)
|
103
|
-
- [IronTitan::ImageWrapper](docs/ImageWrapper.md)
|
104
|
-
- [IronTitan::ImagesWrapper](docs/ImagesWrapper.md)
|
105
99
|
- [IronTitan::Job](docs/Job.md)
|
106
100
|
- [IronTitan::JobWrapper](docs/JobWrapper.md)
|
107
101
|
- [IronTitan::JobsWrapper](docs/JobsWrapper.md)
|
@@ -0,0 +1,138 @@
|
|
1
|
+
=begin
|
2
|
+
Titan API
|
3
|
+
|
4
|
+
The ultimate, language agnostic, container based job processing framework.
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.3.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module IronTitan
|
16
|
+
class GroupsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Get all group names.
|
24
|
+
# Get a list of all the groups in the system.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [GroupsWrapper]
|
27
|
+
def groups_get(opts = {})
|
28
|
+
data, status_code, headers = groups_get_with_http_info(opts)
|
29
|
+
return data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get all group names.
|
33
|
+
# Get a list of all the groups in the system.
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(GroupsWrapper, Fixnum, Hash)>] GroupsWrapper data, response status code and response headers
|
36
|
+
def groups_get_with_http_info(opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug "Calling API: GroupsApi#groups_get ..."
|
39
|
+
end
|
40
|
+
|
41
|
+
# resource path
|
42
|
+
local_var_path = "/groups".sub('{format}','json')
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = {}
|
46
|
+
|
47
|
+
# header parameters
|
48
|
+
header_params = {}
|
49
|
+
|
50
|
+
# HTTP header 'Accept' (if needed)
|
51
|
+
_header_accept = ['application/json']
|
52
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
53
|
+
|
54
|
+
# HTTP header 'Content-Type'
|
55
|
+
_header_content_type = ['application/json']
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = nil
|
63
|
+
|
64
|
+
auth_names = []
|
65
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'GroupsWrapper')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: GroupsApi#groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
78
|
+
# Get information for a group.
|
79
|
+
# This gives more details about a job group, such as statistics.
|
80
|
+
# @param name name of the group.
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @return [GroupWrapper]
|
83
|
+
def groups_name_get(name, opts = {})
|
84
|
+
data, status_code, headers = groups_name_get_with_http_info(name, opts)
|
85
|
+
return data
|
86
|
+
end
|
87
|
+
|
88
|
+
# Get information for a group.
|
89
|
+
# This gives more details about a job group, such as statistics.
|
90
|
+
# @param name name of the group.
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
|
93
|
+
def groups_name_get_with_http_info(name, opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "Calling API: GroupsApi#groups_name_get ..."
|
96
|
+
end
|
97
|
+
|
98
|
+
# verify the required parameter 'name' is set
|
99
|
+
fail "Missing the required parameter 'name' when calling groups_name_get" if name.nil?
|
100
|
+
|
101
|
+
# resource path
|
102
|
+
local_var_path = "/groups/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
|
103
|
+
|
104
|
+
# query parameters
|
105
|
+
query_params = {}
|
106
|
+
|
107
|
+
# header parameters
|
108
|
+
header_params = {}
|
109
|
+
|
110
|
+
# HTTP header 'Accept' (if needed)
|
111
|
+
_header_accept = ['application/json']
|
112
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
113
|
+
|
114
|
+
# HTTP header 'Content-Type'
|
115
|
+
_header_content_type = ['application/json']
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = nil
|
123
|
+
|
124
|
+
auth_names = []
|
125
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
126
|
+
:header_params => header_params,
|
127
|
+
:query_params => query_params,
|
128
|
+
:form_params => form_params,
|
129
|
+
:body => post_body,
|
130
|
+
:auth_names => auth_names,
|
131
|
+
:return_type => 'GroupWrapper')
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug "API called: GroupsApi#groups_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
+
end
|
135
|
+
return data, status_code, headers
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|