apcera 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/apcera.gemspec +31 -0
- data/lib/apcera/api/default_api.rb +128 -0
- data/lib/apcera/api/instances_api.rb +280 -0
- data/lib/apcera/api/jobs_api.rb +1428 -0
- data/lib/apcera/api/logs_api.rb +120 -0
- data/lib/apcera/api/metrics_api.rb +280 -0
- data/lib/apcera/api/packages_api.rb +541 -0
- data/lib/apcera/api/providers_api.rb +175 -0
- data/lib/apcera/api/rules_api.rb +228 -0
- data/lib/apcera/api/services_and_bindings_api.rb +278 -0
- data/lib/apcera/api/staging_pipelines_api.rb +281 -0
- data/lib/apcera/api/utilities_api.rb +327 -0
- data/lib/apcera/api_client.rb +294 -0
- data/lib/apcera/api_error.rb +24 -0
- data/lib/apcera/configuration.rb +173 -0
- data/lib/apcera/models/apc_version_object.rb +37 -0
- data/lib/apcera/models/api_error.rb +143 -0
- data/lib/apcera/models/audit_log_item.rb +117 -0
- data/lib/apcera/models/audit_log_item_old.rb +85 -0
- data/lib/apcera/models/base_object.rb +96 -0
- data/lib/apcera/models/binding.rb +137 -0
- data/lib/apcera/models/create_docker_job_request.rb +197 -0
- data/lib/apcera/models/create_docker_job_response.rb +37 -0
- data/lib/apcera/models/dependency.rb +53 -0
- data/lib/apcera/models/dependency_resolve.rb +45 -0
- data/lib/apcera/models/docker_origin.rb +63 -0
- data/lib/apcera/models/drain.rb +61 -0
- data/lib/apcera/models/drain_config.rb +53 -0
- data/lib/apcera/models/file_listing.rb +45 -0
- data/lib/apcera/models/info.rb +53 -0
- data/lib/apcera/models/instance_manager.rb +105 -0
- data/lib/apcera/models/instance_state.rb +117 -0
- data/lib/apcera/models/instances.rb +109 -0
- data/lib/apcera/models/job.rb +243 -0
- data/lib/apcera/models/job_health.rb +63 -0
- data/lib/apcera/models/job_preferences.rb +37 -0
- data/lib/apcera/models/log.rb +53 -0
- data/lib/apcera/models/metric_series.rb +49 -0
- data/lib/apcera/models/metric_series_hash.rb +29 -0
- data/lib/apcera/models/metrics.rb +49 -0
- data/lib/apcera/models/namespace.rb +37 -0
- data/lib/apcera/models/package.rb +183 -0
- data/lib/apcera/models/package_depends_request.rb +47 -0
- data/lib/apcera/models/package_info.rb +69 -0
- data/lib/apcera/models/package_resource.rb +61 -0
- data/lib/apcera/models/policy_error.rb +63 -0
- data/lib/apcera/models/port.rb +55 -0
- data/lib/apcera/models/process.rb +37 -0
- data/lib/apcera/models/process_object.rb +115 -0
- data/lib/apcera/models/provide.rb +53 -0
- data/lib/apcera/models/provider.rb +85 -0
- data/lib/apcera/models/resource.rb +69 -0
- data/lib/apcera/models/restart_config.rb +53 -0
- data/lib/apcera/models/rollout_config.rb +69 -0
- data/lib/apcera/models/route.rb +53 -0
- data/lib/apcera/models/rule.rb +101 -0
- data/lib/apcera/models/runtime.rb +47 -0
- data/lib/apcera/models/semi_pipe_rule.rb +101 -0
- data/lib/apcera/models/semi_pipe_rule_action.rb +37 -0
- data/lib/apcera/models/stager_job.rb +37 -0
- data/lib/apcera/models/staging_pipeline.rb +103 -0
- data/lib/apcera/models/sub_task.rb +61 -0
- data/lib/apcera/models/task.rb +87 -0
- data/lib/apcera/models/task_event.rb +113 -0
- data/lib/apcera/models/task_progress.rb +45 -0
- data/lib/apcera/models/unbind_parameter_object.rb +53 -0
- data/lib/apcera/models/unlink_parameter_object.rb +53 -0
- data/lib/apcera/version.rb +3 -0
- data/lib/apcera.rb +90 -0
- metadata +293 -0
@@ -0,0 +1,120 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module Apcera
|
4
|
+
class LogsApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = nil)
|
8
|
+
@api_client = api_client || Configuration.api_client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Returns audit log items for the cluster.
|
12
|
+
# Returns a list of audit log items.
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [String] :authorization
|
15
|
+
# @return [Array<AuditLogItemOld>]
|
16
|
+
def audit_logs_get(opts = {})
|
17
|
+
|
18
|
+
if Configuration.debugging
|
19
|
+
Configuration.logger.debug "Calling API: LogsApi#audit_logs_get ..."
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
# resource path
|
24
|
+
path = "/audit_logs".sub('{format}','json')
|
25
|
+
|
26
|
+
# query parameters
|
27
|
+
query_params = {}
|
28
|
+
|
29
|
+
# header parameters
|
30
|
+
header_params = {}
|
31
|
+
|
32
|
+
# HTTP header 'Accept' (if needed)
|
33
|
+
_header_accept = []
|
34
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
35
|
+
|
36
|
+
# HTTP header 'Content-Type'
|
37
|
+
_header_content_type = []
|
38
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
39
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
40
|
+
|
41
|
+
# form parameters
|
42
|
+
form_params = {}
|
43
|
+
|
44
|
+
# http body (model)
|
45
|
+
post_body = nil
|
46
|
+
|
47
|
+
|
48
|
+
auth_names = ['authorization']
|
49
|
+
result = @api_client.call_api(:GET, path,
|
50
|
+
:header_params => header_params,
|
51
|
+
:query_params => query_params,
|
52
|
+
:form_params => form_params,
|
53
|
+
:body => post_body,
|
54
|
+
:auth_names => auth_names,
|
55
|
+
:return_type => 'Array<AuditLogItemOld>')
|
56
|
+
if Configuration.debugging
|
57
|
+
Configuration.logger.debug "API called: LogsApi#audit_logs_get. Result: #{result.inspect}"
|
58
|
+
end
|
59
|
+
return result
|
60
|
+
end
|
61
|
+
|
62
|
+
# Streams logs for the specified channel.
|
63
|
+
#
|
64
|
+
# @param channel TBD
|
65
|
+
# @param [Hash] opts the optional parameters
|
66
|
+
# @option opts [String] :authorization
|
67
|
+
# @return [nil]
|
68
|
+
def logs_channel_get(channel, opts = {})
|
69
|
+
|
70
|
+
if Configuration.debugging
|
71
|
+
Configuration.logger.debug "Calling API: LogsApi#logs_channel_get ..."
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
# verify the required parameter 'channel' is set
|
76
|
+
fail "Missing the required parameter 'channel' when calling logs_channel_get" if channel.nil?
|
77
|
+
|
78
|
+
# resource path
|
79
|
+
path = "/logs/{channel}".sub('{format}','json').sub('{' + 'channel' + '}', channel.to_s)
|
80
|
+
|
81
|
+
# query parameters
|
82
|
+
query_params = {}
|
83
|
+
|
84
|
+
# header parameters
|
85
|
+
header_params = {}
|
86
|
+
|
87
|
+
# HTTP header 'Accept' (if needed)
|
88
|
+
_header_accept = []
|
89
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
90
|
+
|
91
|
+
# HTTP header 'Content-Type'
|
92
|
+
_header_content_type = []
|
93
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
94
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
95
|
+
|
96
|
+
# form parameters
|
97
|
+
form_params = {}
|
98
|
+
|
99
|
+
# http body (model)
|
100
|
+
post_body = nil
|
101
|
+
|
102
|
+
|
103
|
+
auth_names = ['authorization']
|
104
|
+
@api_client.call_api(:GET, path,
|
105
|
+
:header_params => header_params,
|
106
|
+
:query_params => query_params,
|
107
|
+
:form_params => form_params,
|
108
|
+
:body => post_body,
|
109
|
+
:auth_names => auth_names)
|
110
|
+
if Configuration.debugging
|
111
|
+
Configuration.logger.debug "API called: LogsApi#logs_channel_get"
|
112
|
+
end
|
113
|
+
return nil
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
@@ -0,0 +1,280 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module Apcera
|
4
|
+
class MetricsApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = nil)
|
8
|
+
@api_client = api_client || Configuration.api_client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Returns metrics data for the cluster.
|
12
|
+
# Returns metrics data for the cluster.
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [Array<String>] :metric Comma-delimited string that includes, in order, the following fields: \n * Job FQN (wildcards accepted) \n * Instance manager hostname (can be a wildcard)\n * Instance ID \n * Metric to evaluate \n * 'From' time (optional)\n * 'To' time (optional).
|
15
|
+
# @option opts [String] :authorization
|
16
|
+
# @return [Metrics]
|
17
|
+
def metrics_cluster_get(opts = {})
|
18
|
+
|
19
|
+
if Configuration.debugging
|
20
|
+
Configuration.logger.debug "Calling API: MetricsApi#metrics_cluster_get ..."
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# resource path
|
25
|
+
path = "/metrics/cluster".sub('{format}','json')
|
26
|
+
|
27
|
+
# query parameters
|
28
|
+
query_params = {}
|
29
|
+
query_params[:'metric'] = opts[:'metric'] if opts[:'metric']
|
30
|
+
|
31
|
+
# header parameters
|
32
|
+
header_params = {}
|
33
|
+
|
34
|
+
# HTTP header 'Accept' (if needed)
|
35
|
+
_header_accept = []
|
36
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
37
|
+
|
38
|
+
# HTTP header 'Content-Type'
|
39
|
+
_header_content_type = []
|
40
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
41
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
42
|
+
|
43
|
+
# form parameters
|
44
|
+
form_params = {}
|
45
|
+
|
46
|
+
# http body (model)
|
47
|
+
post_body = nil
|
48
|
+
|
49
|
+
|
50
|
+
auth_names = ['authorization']
|
51
|
+
result = @api_client.call_api(:GET, path,
|
52
|
+
:header_params => header_params,
|
53
|
+
:query_params => query_params,
|
54
|
+
:form_params => form_params,
|
55
|
+
:body => post_body,
|
56
|
+
:auth_names => auth_names,
|
57
|
+
:return_type => 'Metrics')
|
58
|
+
if Configuration.debugging
|
59
|
+
Configuration.logger.debug "API called: MetricsApi#metrics_cluster_get. Result: #{result.inspect}"
|
60
|
+
end
|
61
|
+
return result
|
62
|
+
end
|
63
|
+
|
64
|
+
# Returns metrics for instance managers.
|
65
|
+
# Returns metrics for instance managers.
|
66
|
+
# @param [Hash] opts the optional parameters
|
67
|
+
# @option opts [Array<String>] :metric
|
68
|
+
# @option opts [String] :authorization
|
69
|
+
# @return [Metrics]
|
70
|
+
def metrics_instance_managers_get(opts = {})
|
71
|
+
|
72
|
+
if Configuration.debugging
|
73
|
+
Configuration.logger.debug "Calling API: MetricsApi#metrics_instance_managers_get ..."
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
# resource path
|
78
|
+
path = "/metrics/instance_managers".sub('{format}','json')
|
79
|
+
|
80
|
+
# query parameters
|
81
|
+
query_params = {}
|
82
|
+
query_params[:'metric'] = opts[:'metric'] if opts[:'metric']
|
83
|
+
|
84
|
+
# header parameters
|
85
|
+
header_params = {}
|
86
|
+
|
87
|
+
# HTTP header 'Accept' (if needed)
|
88
|
+
_header_accept = []
|
89
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
90
|
+
|
91
|
+
# HTTP header 'Content-Type'
|
92
|
+
_header_content_type = []
|
93
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
94
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
95
|
+
|
96
|
+
# form parameters
|
97
|
+
form_params = {}
|
98
|
+
|
99
|
+
# http body (model)
|
100
|
+
post_body = nil
|
101
|
+
|
102
|
+
|
103
|
+
auth_names = ['authorization']
|
104
|
+
result = @api_client.call_api(:GET, path,
|
105
|
+
:header_params => header_params,
|
106
|
+
:query_params => query_params,
|
107
|
+
:form_params => form_params,
|
108
|
+
:body => post_body,
|
109
|
+
:auth_names => auth_names,
|
110
|
+
:return_type => 'Metrics')
|
111
|
+
if Configuration.debugging
|
112
|
+
Configuration.logger.debug "API called: MetricsApi#metrics_instance_managers_get. Result: #{result.inspect}"
|
113
|
+
end
|
114
|
+
return result
|
115
|
+
end
|
116
|
+
|
117
|
+
# Returns job metrics.
|
118
|
+
# Returns job metrics.
|
119
|
+
# @param [Hash] opts the optional parameters
|
120
|
+
# @option opts [Array<String>] :metric Comma-delimited string that includes, in order, the following fields: \n * Job FQN (wildcards accepted) \n * Instance manager hostname (can be a wildcard)\n * Instance ID \n * Metric to evaluate \n * 'From' time (optional)\n * 'To' time (optional).
|
121
|
+
# @option opts [String] :authorization
|
122
|
+
# @return [Metrics]
|
123
|
+
def metrics_jobs_get(opts = {})
|
124
|
+
|
125
|
+
if Configuration.debugging
|
126
|
+
Configuration.logger.debug "Calling API: MetricsApi#metrics_jobs_get ..."
|
127
|
+
end
|
128
|
+
|
129
|
+
|
130
|
+
# resource path
|
131
|
+
path = "/metrics/jobs".sub('{format}','json')
|
132
|
+
|
133
|
+
# query parameters
|
134
|
+
query_params = {}
|
135
|
+
query_params[:'metric'] = opts[:'metric'] if opts[:'metric']
|
136
|
+
|
137
|
+
# header parameters
|
138
|
+
header_params = {}
|
139
|
+
|
140
|
+
# HTTP header 'Accept' (if needed)
|
141
|
+
_header_accept = []
|
142
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
143
|
+
|
144
|
+
# HTTP header 'Content-Type'
|
145
|
+
_header_content_type = []
|
146
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
147
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
148
|
+
|
149
|
+
# form parameters
|
150
|
+
form_params = {}
|
151
|
+
|
152
|
+
# http body (model)
|
153
|
+
post_body = nil
|
154
|
+
|
155
|
+
|
156
|
+
auth_names = ['authorization']
|
157
|
+
result = @api_client.call_api(:GET, path,
|
158
|
+
:header_params => header_params,
|
159
|
+
:query_params => query_params,
|
160
|
+
:form_params => form_params,
|
161
|
+
:body => post_body,
|
162
|
+
:auth_names => auth_names,
|
163
|
+
:return_type => 'Metrics')
|
164
|
+
if Configuration.debugging
|
165
|
+
Configuration.logger.debug "API called: MetricsApi#metrics_jobs_get. Result: #{result.inspect}"
|
166
|
+
end
|
167
|
+
return result
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns metrics for counters on the route.
|
171
|
+
#
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [Array<String>] :metric
|
174
|
+
# @option opts [String] :authorization
|
175
|
+
# @return [Metrics]
|
176
|
+
def metrics_route_counters_get(opts = {})
|
177
|
+
|
178
|
+
if Configuration.debugging
|
179
|
+
Configuration.logger.debug "Calling API: MetricsApi#metrics_route_counters_get ..."
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
# resource path
|
184
|
+
path = "/metrics/route/counters".sub('{format}','json')
|
185
|
+
|
186
|
+
# query parameters
|
187
|
+
query_params = {}
|
188
|
+
query_params[:'metric'] = opts[:'metric'] if opts[:'metric']
|
189
|
+
|
190
|
+
# header parameters
|
191
|
+
header_params = {}
|
192
|
+
|
193
|
+
# HTTP header 'Accept' (if needed)
|
194
|
+
_header_accept = []
|
195
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
196
|
+
|
197
|
+
# HTTP header 'Content-Type'
|
198
|
+
_header_content_type = []
|
199
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
200
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
201
|
+
|
202
|
+
# form parameters
|
203
|
+
form_params = {}
|
204
|
+
|
205
|
+
# http body (model)
|
206
|
+
post_body = nil
|
207
|
+
|
208
|
+
|
209
|
+
auth_names = ['authorization']
|
210
|
+
result = @api_client.call_api(:GET, path,
|
211
|
+
:header_params => header_params,
|
212
|
+
:query_params => query_params,
|
213
|
+
:form_params => form_params,
|
214
|
+
:body => post_body,
|
215
|
+
:auth_names => auth_names,
|
216
|
+
:return_type => 'Metrics')
|
217
|
+
if Configuration.debugging
|
218
|
+
Configuration.logger.debug "API called: MetricsApi#metrics_route_counters_get. Result: #{result.inspect}"
|
219
|
+
end
|
220
|
+
return result
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns metrics for timers on the route.
|
224
|
+
#
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @option opts [Array<String>] :metric
|
227
|
+
# @option opts [String] :authorization
|
228
|
+
# @return [Metrics]
|
229
|
+
def metrics_route_timers_get(opts = {})
|
230
|
+
|
231
|
+
if Configuration.debugging
|
232
|
+
Configuration.logger.debug "Calling API: MetricsApi#metrics_route_timers_get ..."
|
233
|
+
end
|
234
|
+
|
235
|
+
|
236
|
+
# resource path
|
237
|
+
path = "/metrics/route/timers".sub('{format}','json')
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = {}
|
241
|
+
query_params[:'metric'] = opts[:'metric'] if opts[:'metric']
|
242
|
+
|
243
|
+
# header parameters
|
244
|
+
header_params = {}
|
245
|
+
|
246
|
+
# HTTP header 'Accept' (if needed)
|
247
|
+
_header_accept = []
|
248
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
249
|
+
|
250
|
+
# HTTP header 'Content-Type'
|
251
|
+
_header_content_type = []
|
252
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
253
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
254
|
+
|
255
|
+
# form parameters
|
256
|
+
form_params = {}
|
257
|
+
|
258
|
+
# http body (model)
|
259
|
+
post_body = nil
|
260
|
+
|
261
|
+
|
262
|
+
auth_names = ['authorization']
|
263
|
+
result = @api_client.call_api(:GET, path,
|
264
|
+
:header_params => header_params,
|
265
|
+
:query_params => query_params,
|
266
|
+
:form_params => form_params,
|
267
|
+
:body => post_body,
|
268
|
+
:auth_names => auth_names,
|
269
|
+
:return_type => 'Metrics')
|
270
|
+
if Configuration.debugging
|
271
|
+
Configuration.logger.debug "API called: MetricsApi#metrics_route_timers_get. Result: #{result.inspect}"
|
272
|
+
end
|
273
|
+
return result
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|