apcera 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/apcera.gemspec +31 -0
  3. data/lib/apcera/api/default_api.rb +128 -0
  4. data/lib/apcera/api/instances_api.rb +280 -0
  5. data/lib/apcera/api/jobs_api.rb +1428 -0
  6. data/lib/apcera/api/logs_api.rb +120 -0
  7. data/lib/apcera/api/metrics_api.rb +280 -0
  8. data/lib/apcera/api/packages_api.rb +541 -0
  9. data/lib/apcera/api/providers_api.rb +175 -0
  10. data/lib/apcera/api/rules_api.rb +228 -0
  11. data/lib/apcera/api/services_and_bindings_api.rb +278 -0
  12. data/lib/apcera/api/staging_pipelines_api.rb +281 -0
  13. data/lib/apcera/api/utilities_api.rb +327 -0
  14. data/lib/apcera/api_client.rb +294 -0
  15. data/lib/apcera/api_error.rb +24 -0
  16. data/lib/apcera/configuration.rb +173 -0
  17. data/lib/apcera/models/apc_version_object.rb +37 -0
  18. data/lib/apcera/models/api_error.rb +143 -0
  19. data/lib/apcera/models/audit_log_item.rb +117 -0
  20. data/lib/apcera/models/audit_log_item_old.rb +85 -0
  21. data/lib/apcera/models/base_object.rb +96 -0
  22. data/lib/apcera/models/binding.rb +137 -0
  23. data/lib/apcera/models/create_docker_job_request.rb +197 -0
  24. data/lib/apcera/models/create_docker_job_response.rb +37 -0
  25. data/lib/apcera/models/dependency.rb +53 -0
  26. data/lib/apcera/models/dependency_resolve.rb +45 -0
  27. data/lib/apcera/models/docker_origin.rb +63 -0
  28. data/lib/apcera/models/drain.rb +61 -0
  29. data/lib/apcera/models/drain_config.rb +53 -0
  30. data/lib/apcera/models/file_listing.rb +45 -0
  31. data/lib/apcera/models/info.rb +53 -0
  32. data/lib/apcera/models/instance_manager.rb +105 -0
  33. data/lib/apcera/models/instance_state.rb +117 -0
  34. data/lib/apcera/models/instances.rb +109 -0
  35. data/lib/apcera/models/job.rb +243 -0
  36. data/lib/apcera/models/job_health.rb +63 -0
  37. data/lib/apcera/models/job_preferences.rb +37 -0
  38. data/lib/apcera/models/log.rb +53 -0
  39. data/lib/apcera/models/metric_series.rb +49 -0
  40. data/lib/apcera/models/metric_series_hash.rb +29 -0
  41. data/lib/apcera/models/metrics.rb +49 -0
  42. data/lib/apcera/models/namespace.rb +37 -0
  43. data/lib/apcera/models/package.rb +183 -0
  44. data/lib/apcera/models/package_depends_request.rb +47 -0
  45. data/lib/apcera/models/package_info.rb +69 -0
  46. data/lib/apcera/models/package_resource.rb +61 -0
  47. data/lib/apcera/models/policy_error.rb +63 -0
  48. data/lib/apcera/models/port.rb +55 -0
  49. data/lib/apcera/models/process.rb +37 -0
  50. data/lib/apcera/models/process_object.rb +115 -0
  51. data/lib/apcera/models/provide.rb +53 -0
  52. data/lib/apcera/models/provider.rb +85 -0
  53. data/lib/apcera/models/resource.rb +69 -0
  54. data/lib/apcera/models/restart_config.rb +53 -0
  55. data/lib/apcera/models/rollout_config.rb +69 -0
  56. data/lib/apcera/models/route.rb +53 -0
  57. data/lib/apcera/models/rule.rb +101 -0
  58. data/lib/apcera/models/runtime.rb +47 -0
  59. data/lib/apcera/models/semi_pipe_rule.rb +101 -0
  60. data/lib/apcera/models/semi_pipe_rule_action.rb +37 -0
  61. data/lib/apcera/models/stager_job.rb +37 -0
  62. data/lib/apcera/models/staging_pipeline.rb +103 -0
  63. data/lib/apcera/models/sub_task.rb +61 -0
  64. data/lib/apcera/models/task.rb +87 -0
  65. data/lib/apcera/models/task_event.rb +113 -0
  66. data/lib/apcera/models/task_progress.rb +45 -0
  67. data/lib/apcera/models/unbind_parameter_object.rb +53 -0
  68. data/lib/apcera/models/unlink_parameter_object.rb +53 -0
  69. data/lib/apcera/version.rb +3 -0
  70. data/lib/apcera.rb +90 -0
  71. 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 * &#39;From&#39; time (optional)\n * &#39;To&#39; 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 * &#39;From&#39; time (optional)\n * &#39;To&#39; 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
+