Class: Apcera::UtilitiesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/apcera/api/utilities_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = nil) ⇒ UtilitiesApi

Returns a new instance of UtilitiesApi.



7
8
9
# File 'lib/apcera/api/utilities_api.rb', line 7

def initialize(api_client = nil)
  @api_client = api_client || Configuration.api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



5
6
7
# File 'lib/apcera/api/utilities_api.rb', line 5

def api_client
  @api_client
end

Instance Method Details

#apc_download_platform_get(platform, opts = {}) ⇒ nil

Downloads the APC utility. Downloads the APC command-line utility for the specified platform.

Parameters:

  • platform

    Target platform. Can be one of the following values: n * ‘linux` n * `osx` n * `linux_amd64` n * `osx_amd64` n * `darwin_amd64` n * `darwin`

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

Returns:

  • (nil)


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/apcera/api/utilities_api.rb', line 17

def apc_download_platform_get(platform, opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: UtilitiesApi#apc_download_platform_get ..."
  end
  
  
  # verify the required parameter 'platform' is set
  fail "Missing the required parameter 'platform' when calling apc_download_platform_get" if platform.nil?
  unless ['linux_amd64', 'linux', 'osx_amd64', 'darwin_amd64', 'darwin', 'osx'].include?(platform)
    fail "invalid value for 'platform', must be one of linux_amd64, linux, osx_amd64, darwin_amd64, darwin, osx"
  end
  
  # resource path
  path = "/apc/download/{platform}".sub('{format}','json').sub('{' + 'platform' + '}', platform.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if Configuration.debugging
    Configuration.logger.debug "API called: UtilitiesApi#apc_download_platform_get"
  end
  return nil
end

#apc_version_get(opts = {}) ⇒ APCVersionObject

Returns the version of APC available for download. Returns the version of APC available for download from the cluster.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

Returns:



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/apcera/api/utilities_api.rb', line 73

def apc_version_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: UtilitiesApi#apc_version_get ..."
  end
  
  
  # resource path
  path = "/apc/version".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'APCVersionObject')
  if Configuration.debugging
    Configuration.logger.debug "API called: UtilitiesApi#apc_version_get. Result: #{result.inspect}"
  end
  return result
end

#info_get(opts = {}) ⇒ Info

Returns information about the API server. Returns information about the API server.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/apcera/api/utilities_api.rb', line 124

def info_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: UtilitiesApi#info_get ..."
  end
  
  
  # resource path
  path = "/info".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Info')
  if Configuration.debugging
    Configuration.logger.debug "API called: UtilitiesApi#info_get. Result: #{result.inspect}"
  end
  return result
end

#namespace_default_get(opts = {}) ⇒ Namespace

Returns the default namespace for the currently logged-in user. Returns the default namespace for the currently logged-in user.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

Returns:



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/apcera/api/utilities_api.rb', line 175

def namespace_default_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: UtilitiesApi#namespace_default_get ..."
  end
  
  
  # resource path
  path = "/namespace/default".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Namespace')
  if Configuration.debugging
    Configuration.logger.debug "API called: UtilitiesApi#namespace_default_get. Result: #{result.inspect}"
  end
  return result
end

#runtimes_get(opts = {}) ⇒ Array<Runtime>

Lists available workload runtimes. Lists file names and patterns used to determine the appropriate runtime for a given workload.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

Returns:



226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/apcera/api/utilities_api.rb', line 226

def runtimes_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: UtilitiesApi#runtimes_get ..."
  end
  
  
  # resource path
  path = "/runtimes".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<Runtime>')
  if Configuration.debugging
    Configuration.logger.debug "API called: UtilitiesApi#runtimes_get. Result: #{result.inspect}"
  end
  return result
end

#version_get(opts = {}) ⇒ Object

Returns the version number of the API Server. Returns the version number of the API Server.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

Returns:

  • (Object)


277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/apcera/api/utilities_api.rb', line 277

def version_get(opts = {})

  if Configuration.debugging
    Configuration.logger.debug "Calling API: UtilitiesApi#version_get ..."
  end
  
  
  # resource path
  path = "/version".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = []
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
  header_params[:'authorization'] = opts[:'authorization'] if opts[:'authorization']

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['authorization']
  result = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if Configuration.debugging
    Configuration.logger.debug "API called: UtilitiesApi#version_get. Result: #{result.inspect}"
  end
  return result
end