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.
- 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,175 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module Apcera
|
4
|
+
class ProvidersApi
|
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 a list of providers defined on the cluster.
|
12
|
+
# Returns a list of providers defined on the cluster.
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [String] :authorization
|
15
|
+
# @return [Array<Provider>]
|
16
|
+
def providers_get(opts = {})
|
17
|
+
|
18
|
+
if Configuration.debugging
|
19
|
+
Configuration.logger.debug "Calling API: ProvidersApi#providers_get ..."
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
# resource path
|
24
|
+
path = "/providers".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<Provider>')
|
56
|
+
if Configuration.debugging
|
57
|
+
Configuration.logger.debug "API called: ProvidersApi#providers_get. Result: #{result.inspect}"
|
58
|
+
end
|
59
|
+
return result
|
60
|
+
end
|
61
|
+
|
62
|
+
# Creates a new provider.
|
63
|
+
# Creates a new provider.
|
64
|
+
# @param job An object that defines the properties of the new provider.
|
65
|
+
# @param [Hash] opts the optional parameters
|
66
|
+
# @option opts [String] :authorization
|
67
|
+
# @return [Array<Provider>]
|
68
|
+
def providers_post(job, opts = {})
|
69
|
+
|
70
|
+
if Configuration.debugging
|
71
|
+
Configuration.logger.debug "Calling API: ProvidersApi#providers_post ..."
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
# verify the required parameter 'job' is set
|
76
|
+
fail "Missing the required parameter 'job' when calling providers_post" if job.nil?
|
77
|
+
|
78
|
+
# resource path
|
79
|
+
path = "/providers".sub('{format}','json')
|
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 = @api_client.object_to_http_body(job)
|
101
|
+
|
102
|
+
|
103
|
+
auth_names = ['authorization']
|
104
|
+
result = @api_client.call_api(:POST, 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 => 'Array<Provider>')
|
111
|
+
if Configuration.debugging
|
112
|
+
Configuration.logger.debug "API called: ProvidersApi#providers_post. Result: #{result.inspect}"
|
113
|
+
end
|
114
|
+
return result
|
115
|
+
end
|
116
|
+
|
117
|
+
# Deletes the specified provider.
|
118
|
+
# Deletes the specified provider.
|
119
|
+
# @param uuid UUID of the provider to delete.
|
120
|
+
# @param [Hash] opts the optional parameters
|
121
|
+
# @option opts [String] :authorization
|
122
|
+
# @return [nil]
|
123
|
+
def providers_uuid_delete(uuid, opts = {})
|
124
|
+
|
125
|
+
if Configuration.debugging
|
126
|
+
Configuration.logger.debug "Calling API: ProvidersApi#providers_uuid_delete ..."
|
127
|
+
end
|
128
|
+
|
129
|
+
|
130
|
+
# verify the required parameter 'uuid' is set
|
131
|
+
fail "Missing the required parameter 'uuid' when calling providers_uuid_delete" if uuid.nil?
|
132
|
+
|
133
|
+
# resource path
|
134
|
+
path = "/providers/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s)
|
135
|
+
|
136
|
+
# query parameters
|
137
|
+
query_params = {}
|
138
|
+
|
139
|
+
# header parameters
|
140
|
+
header_params = {}
|
141
|
+
|
142
|
+
# HTTP header 'Accept' (if needed)
|
143
|
+
_header_accept = []
|
144
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
145
|
+
|
146
|
+
# HTTP header 'Content-Type'
|
147
|
+
_header_content_type = []
|
148
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
149
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
150
|
+
|
151
|
+
# form parameters
|
152
|
+
form_params = {}
|
153
|
+
|
154
|
+
# http body (model)
|
155
|
+
post_body = nil
|
156
|
+
|
157
|
+
|
158
|
+
auth_names = ['authorization']
|
159
|
+
@api_client.call_api(:DELETE, path,
|
160
|
+
:header_params => header_params,
|
161
|
+
:query_params => query_params,
|
162
|
+
:form_params => form_params,
|
163
|
+
:body => post_body,
|
164
|
+
:auth_names => auth_names)
|
165
|
+
if Configuration.debugging
|
166
|
+
Configuration.logger.debug "API called: ProvidersApi#providers_uuid_delete"
|
167
|
+
end
|
168
|
+
return nil
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
@@ -0,0 +1,228 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module Apcera
|
4
|
+
class RulesApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = nil)
|
8
|
+
@api_client = api_client || Configuration.api_client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Lists all policy rules.
|
12
|
+
#
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [String] :authorization
|
15
|
+
# @return [nil]
|
16
|
+
def rules_get(opts = {})
|
17
|
+
|
18
|
+
if Configuration.debugging
|
19
|
+
Configuration.logger.debug "Calling API: RulesApi#rules_get ..."
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
# resource path
|
24
|
+
path = "/rules".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 = []
|
49
|
+
@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
|
+
if Configuration.debugging
|
56
|
+
Configuration.logger.debug "API called: RulesApi#rules_get"
|
57
|
+
end
|
58
|
+
return nil
|
59
|
+
end
|
60
|
+
|
61
|
+
# Creates a new semantic pipeline rule for governing a given provider's behavior.
|
62
|
+
#
|
63
|
+
# @param rule An object that defines the properties of the new rule.
|
64
|
+
# @param [Hash] opts the optional parameters
|
65
|
+
# @option opts [String] :authorization
|
66
|
+
# @return [nil]
|
67
|
+
def rules_post(rule, opts = {})
|
68
|
+
|
69
|
+
if Configuration.debugging
|
70
|
+
Configuration.logger.debug "Calling API: RulesApi#rules_post ..."
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
# verify the required parameter 'rule' is set
|
75
|
+
fail "Missing the required parameter 'rule' when calling rules_post" if rule.nil?
|
76
|
+
|
77
|
+
# resource path
|
78
|
+
path = "/rules".sub('{format}','json')
|
79
|
+
|
80
|
+
# query parameters
|
81
|
+
query_params = {}
|
82
|
+
|
83
|
+
# header parameters
|
84
|
+
header_params = {}
|
85
|
+
|
86
|
+
# HTTP header 'Accept' (if needed)
|
87
|
+
_header_accept = []
|
88
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
89
|
+
|
90
|
+
# HTTP header 'Content-Type'
|
91
|
+
_header_content_type = []
|
92
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
93
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
94
|
+
|
95
|
+
# form parameters
|
96
|
+
form_params = {}
|
97
|
+
|
98
|
+
# http body (model)
|
99
|
+
post_body = @api_client.object_to_http_body(rule)
|
100
|
+
|
101
|
+
|
102
|
+
auth_names = ['authorization']
|
103
|
+
@api_client.call_api(:POST, path,
|
104
|
+
:header_params => header_params,
|
105
|
+
:query_params => query_params,
|
106
|
+
:form_params => form_params,
|
107
|
+
:body => post_body,
|
108
|
+
:auth_names => auth_names)
|
109
|
+
if Configuration.debugging
|
110
|
+
Configuration.logger.debug "API called: RulesApi#rules_post"
|
111
|
+
end
|
112
|
+
return nil
|
113
|
+
end
|
114
|
+
|
115
|
+
# Returns information about a rule that that controls the behavior of semantic pipelines.
|
116
|
+
# Returns information about a rule that that controls the behavior of semantic pipelines.
|
117
|
+
# @param uuid UUID of the rule.
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @option opts [String] :authorization
|
120
|
+
# @return [Rule]
|
121
|
+
def rules_uuid_get(uuid, opts = {})
|
122
|
+
|
123
|
+
if Configuration.debugging
|
124
|
+
Configuration.logger.debug "Calling API: RulesApi#rules_uuid_get ..."
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
# verify the required parameter 'uuid' is set
|
129
|
+
fail "Missing the required parameter 'uuid' when calling rules_uuid_get" if uuid.nil?
|
130
|
+
|
131
|
+
# resource path
|
132
|
+
path = "/rules/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s)
|
133
|
+
|
134
|
+
# query parameters
|
135
|
+
query_params = {}
|
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 => 'Rule')
|
164
|
+
if Configuration.debugging
|
165
|
+
Configuration.logger.debug "API called: RulesApi#rules_uuid_get. Result: #{result.inspect}"
|
166
|
+
end
|
167
|
+
return result
|
168
|
+
end
|
169
|
+
|
170
|
+
# Deletes a policy event rule.
|
171
|
+
#
|
172
|
+
# @param uuid UUID of the rule.
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @option opts [String] :authorization
|
175
|
+
# @return [nil]
|
176
|
+
def rules_uuid_delete(uuid, opts = {})
|
177
|
+
|
178
|
+
if Configuration.debugging
|
179
|
+
Configuration.logger.debug "Calling API: RulesApi#rules_uuid_delete ..."
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
# verify the required parameter 'uuid' is set
|
184
|
+
fail "Missing the required parameter 'uuid' when calling rules_uuid_delete" if uuid.nil?
|
185
|
+
|
186
|
+
# resource path
|
187
|
+
path = "/rules/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s)
|
188
|
+
|
189
|
+
# query parameters
|
190
|
+
query_params = {}
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = {}
|
194
|
+
|
195
|
+
# HTTP header 'Accept' (if needed)
|
196
|
+
_header_accept = []
|
197
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
198
|
+
|
199
|
+
# HTTP header 'Content-Type'
|
200
|
+
_header_content_type = []
|
201
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
202
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
203
|
+
|
204
|
+
# form parameters
|
205
|
+
form_params = {}
|
206
|
+
|
207
|
+
# http body (model)
|
208
|
+
post_body = nil
|
209
|
+
|
210
|
+
|
211
|
+
auth_names = ['authorization']
|
212
|
+
@api_client.call_api(:DELETE, path,
|
213
|
+
:header_params => header_params,
|
214
|
+
:query_params => query_params,
|
215
|
+
:form_params => form_params,
|
216
|
+
:body => post_body,
|
217
|
+
:auth_names => auth_names)
|
218
|
+
if Configuration.debugging
|
219
|
+
Configuration.logger.debug "API called: RulesApi#rules_uuid_delete"
|
220
|
+
end
|
221
|
+
return nil
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
@@ -0,0 +1,278 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module Apcera
|
4
|
+
class ServicesAndBindingsApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = nil)
|
8
|
+
@api_client = api_client || Configuration.api_client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Creates a new binding between a job and a service, or between two jobs (a job link).
|
12
|
+
#
|
13
|
+
# @param binding An object that defines the properties of the new binding.
|
14
|
+
# @param [Hash] opts the optional parameters
|
15
|
+
# @option opts [String] :authorization
|
16
|
+
# @return [Binding]
|
17
|
+
def bindings_post(binding, opts = {})
|
18
|
+
|
19
|
+
if Configuration.debugging
|
20
|
+
Configuration.logger.debug "Calling API: ServicesAndBindingsApi#bindings_post ..."
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# verify the required parameter 'binding' is set
|
25
|
+
fail "Missing the required parameter 'binding' when calling bindings_post" if binding.nil?
|
26
|
+
|
27
|
+
# resource path
|
28
|
+
path = "/bindings".sub('{format}','json')
|
29
|
+
|
30
|
+
# query parameters
|
31
|
+
query_params = {}
|
32
|
+
|
33
|
+
# header parameters
|
34
|
+
header_params = {}
|
35
|
+
|
36
|
+
# HTTP header 'Accept' (if needed)
|
37
|
+
_header_accept = []
|
38
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
39
|
+
|
40
|
+
# HTTP header 'Content-Type'
|
41
|
+
_header_content_type = []
|
42
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
43
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
44
|
+
|
45
|
+
# form parameters
|
46
|
+
form_params = {}
|
47
|
+
|
48
|
+
# http body (model)
|
49
|
+
post_body = @api_client.object_to_http_body(binding)
|
50
|
+
|
51
|
+
|
52
|
+
auth_names = ['authorization']
|
53
|
+
result = @api_client.call_api(:POST, path,
|
54
|
+
:header_params => header_params,
|
55
|
+
:query_params => query_params,
|
56
|
+
:form_params => form_params,
|
57
|
+
:body => post_body,
|
58
|
+
:auth_names => auth_names,
|
59
|
+
:return_type => 'Binding')
|
60
|
+
if Configuration.debugging
|
61
|
+
Configuration.logger.debug "API called: ServicesAndBindingsApi#bindings_post. Result: #{result.inspect}"
|
62
|
+
end
|
63
|
+
return result
|
64
|
+
end
|
65
|
+
|
66
|
+
# List available services.
|
67
|
+
#
|
68
|
+
# @param [Hash] opts the optional parameters
|
69
|
+
# @option opts [String] :authorization
|
70
|
+
# @return [nil]
|
71
|
+
def services_get(opts = {})
|
72
|
+
|
73
|
+
if Configuration.debugging
|
74
|
+
Configuration.logger.debug "Calling API: ServicesAndBindingsApi#services_get ..."
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
# resource path
|
79
|
+
path = "/services".sub('{format}','json')
|
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: ServicesAndBindingsApi#services_get"
|
112
|
+
end
|
113
|
+
return nil
|
114
|
+
end
|
115
|
+
|
116
|
+
# Creates a new service.
|
117
|
+
#
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @option opts [String] :authorization
|
120
|
+
# @return [nil]
|
121
|
+
def services_post(opts = {})
|
122
|
+
|
123
|
+
if Configuration.debugging
|
124
|
+
Configuration.logger.debug "Calling API: ServicesAndBindingsApi#services_post ..."
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
# resource path
|
129
|
+
path = "/services".sub('{format}','json')
|
130
|
+
|
131
|
+
# query parameters
|
132
|
+
query_params = {}
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = {}
|
136
|
+
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
_header_accept = []
|
139
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
140
|
+
|
141
|
+
# HTTP header 'Content-Type'
|
142
|
+
_header_content_type = []
|
143
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
144
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
145
|
+
|
146
|
+
# form parameters
|
147
|
+
form_params = {}
|
148
|
+
|
149
|
+
# http body (model)
|
150
|
+
post_body = nil
|
151
|
+
|
152
|
+
|
153
|
+
auth_names = ['authorization']
|
154
|
+
@api_client.call_api(:POST, path,
|
155
|
+
:header_params => header_params,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body,
|
159
|
+
:auth_names => auth_names)
|
160
|
+
if Configuration.debugging
|
161
|
+
Configuration.logger.debug "API called: ServicesAndBindingsApi#services_post"
|
162
|
+
end
|
163
|
+
return nil
|
164
|
+
end
|
165
|
+
|
166
|
+
# Deletes the specified service.
|
167
|
+
#
|
168
|
+
# @param uuid UUID of the service.
|
169
|
+
# @param [Hash] opts the optional parameters
|
170
|
+
# @option opts [String] :authorization
|
171
|
+
# @return [nil]
|
172
|
+
def services_uuid_delete(uuid, opts = {})
|
173
|
+
|
174
|
+
if Configuration.debugging
|
175
|
+
Configuration.logger.debug "Calling API: ServicesAndBindingsApi#services_uuid_delete ..."
|
176
|
+
end
|
177
|
+
|
178
|
+
|
179
|
+
# verify the required parameter 'uuid' is set
|
180
|
+
fail "Missing the required parameter 'uuid' when calling services_uuid_delete" if uuid.nil?
|
181
|
+
|
182
|
+
# resource path
|
183
|
+
path = "/services/{uuid}".sub('{format}','json').sub('{' + 'uuid' + '}', uuid.to_s)
|
184
|
+
|
185
|
+
# query parameters
|
186
|
+
query_params = {}
|
187
|
+
|
188
|
+
# header parameters
|
189
|
+
header_params = {}
|
190
|
+
|
191
|
+
# HTTP header 'Accept' (if needed)
|
192
|
+
_header_accept = []
|
193
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
194
|
+
|
195
|
+
# HTTP header 'Content-Type'
|
196
|
+
_header_content_type = []
|
197
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
198
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
199
|
+
|
200
|
+
# form parameters
|
201
|
+
form_params = {}
|
202
|
+
|
203
|
+
# http body (model)
|
204
|
+
post_body = nil
|
205
|
+
|
206
|
+
|
207
|
+
auth_names = ['authorization']
|
208
|
+
@api_client.call_api(:DELETE, path,
|
209
|
+
:header_params => header_params,
|
210
|
+
:query_params => query_params,
|
211
|
+
:form_params => form_params,
|
212
|
+
:body => post_body,
|
213
|
+
:auth_names => auth_names)
|
214
|
+
if Configuration.debugging
|
215
|
+
Configuration.logger.debug "API called: ServicesAndBindingsApi#services_uuid_delete"
|
216
|
+
end
|
217
|
+
return nil
|
218
|
+
end
|
219
|
+
|
220
|
+
# Removes a service binding from a job.
|
221
|
+
# Removes a service binding from a job.
|
222
|
+
# @param job An object that specifies the job and service to unbind.
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @option opts [String] :authorization
|
225
|
+
# @return [nil]
|
226
|
+
def unbind_post(job, opts = {})
|
227
|
+
|
228
|
+
if Configuration.debugging
|
229
|
+
Configuration.logger.debug "Calling API: ServicesAndBindingsApi#unbind_post ..."
|
230
|
+
end
|
231
|
+
|
232
|
+
|
233
|
+
# verify the required parameter 'job' is set
|
234
|
+
fail "Missing the required parameter 'job' when calling unbind_post" if job.nil?
|
235
|
+
|
236
|
+
# resource path
|
237
|
+
path = "/unbind".sub('{format}','json')
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = {}
|
241
|
+
|
242
|
+
# header parameters
|
243
|
+
header_params = {}
|
244
|
+
|
245
|
+
# HTTP header 'Accept' (if needed)
|
246
|
+
_header_accept = []
|
247
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
248
|
+
|
249
|
+
# HTTP header 'Content-Type'
|
250
|
+
_header_content_type = []
|
251
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
252
|
+
header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']
|
253
|
+
|
254
|
+
# form parameters
|
255
|
+
form_params = {}
|
256
|
+
|
257
|
+
# http body (model)
|
258
|
+
post_body = @api_client.object_to_http_body(job)
|
259
|
+
|
260
|
+
|
261
|
+
auth_names = ['authorization']
|
262
|
+
@api_client.call_api(:POST, path,
|
263
|
+
:header_params => header_params,
|
264
|
+
:query_params => query_params,
|
265
|
+
:form_params => form_params,
|
266
|
+
:body => post_body,
|
267
|
+
:auth_names => auth_names)
|
268
|
+
if Configuration.debugging
|
269
|
+
Configuration.logger.debug "API called: ServicesAndBindingsApi#unbind_post"
|
270
|
+
end
|
271
|
+
return nil
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|