Class: SwaggyJenkinsClient::RemoteAccessApi

Inherits:
Object
  • Object
show all
Defined in:
lib/swaggy_jenkins/api/remote_access_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RemoteAccessApi

Returns a new instance of RemoteAccessApi.



19
20
21
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_computer(depth, opts = {}) ⇒ ComputerSet

Retrieve computer details

Parameters:

  • depth (Integer)

    Recursion depth in response model

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

    the optional parameters

Returns:



26
27
28
29
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 26

def get_computer(depth, opts = {})
  data, _status_code, _headers = get_computer_with_http_info(depth, opts)
  data
end

#get_computer_with_http_info(depth, opts = {}) ⇒ Array<(ComputerSet, Integer, Hash)>

Retrieve computer details

Parameters:

  • depth (Integer)

    Recursion depth in response model

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

    the optional parameters

Returns:

  • (Array<(ComputerSet, Integer, Hash)>)

    ComputerSet data, response status code and response headers



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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 35

def get_computer_with_http_info(depth, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_computer ...'
  end
  # verify the required parameter 'depth' is set
  if @api_client.config.client_side_validation && depth.nil?
    fail ArgumentError, "Missing the required parameter 'depth' when calling RemoteAccessApi.get_computer"
  end
  # resource path
  local_var_path = '/computer/api/json'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'depth'] = depth

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ComputerSet'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_computer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_computer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_jenkins(opts = {}) ⇒ Hudson

Retrieve Jenkins details

Parameters:

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

    the optional parameters

Returns:



87
88
89
90
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 87

def get_jenkins(opts = {})
  data, _status_code, _headers = get_jenkins_with_http_info(opts)
  data
end

#get_jenkins_with_http_info(opts = {}) ⇒ Array<(Hudson, Integer, Hash)>

Retrieve Jenkins details

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Hudson, Integer, Hash)>)

    Hudson data, response status code and response headers



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 95

def get_jenkins_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_jenkins ...'
  end
  # resource path
  local_var_path = '/api/json'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Hudson'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_jenkins",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_jenkins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_job(name, opts = {}) ⇒ FreeStyleProject

Retrieve job details

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Returns:



143
144
145
146
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 143

def get_job(name, opts = {})
  data, _status_code, _headers = get_job_with_http_info(name, opts)
  data
end

#get_job_config(name, opts = {}) ⇒ String

Retrieve job configuration

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Returns:

  • (String)


204
205
206
207
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 204

def get_job_config(name, opts = {})
  data, _status_code, _headers = get_job_config_with_http_info(name, opts)
  data
end

#get_job_config_with_http_info(name, opts = {}) ⇒ Array<(String, Integer, Hash)>

Retrieve job configuration

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



213
214
215
216
217
218
219
220
221
222
223
224
225
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
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 213

def get_job_config_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_job_config ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job_config"
  end
  # resource path
  local_var_path = '/job/{name}/config.xml'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'String'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_job_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_job_last_build(name, opts = {}) ⇒ FreeStyleBuild

Retrieve job’s last build details

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Returns:



265
266
267
268
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 265

def get_job_last_build(name, opts = {})
  data, _status_code, _headers = get_job_last_build_with_http_info(name, opts)
  data
end

#get_job_last_build_with_http_info(name, opts = {}) ⇒ Array<(FreeStyleBuild, Integer, Hash)>

Retrieve job&#39;s last build details

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Returns:

  • (Array<(FreeStyleBuild, Integer, Hash)>)

    FreeStyleBuild data, response status code and response headers



274
275
276
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
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 274

def get_job_last_build_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_job_last_build ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job_last_build"
  end
  # resource path
  local_var_path = '/job/{name}/lastBuild/api/json'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FreeStyleBuild'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_job_last_build",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job_last_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_job_progressive_text(name, number, start, opts = {}) ⇒ nil

Retrieve job’s build progressive text output

Parameters:

  • name (String)

    Name of the job

  • number (String)

    Build number

  • start (String)

    Starting point of progressive text output

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

    the optional parameters

Returns:

  • (nil)


328
329
330
331
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 328

def get_job_progressive_text(name, number, start, opts = {})
  get_job_progressive_text_with_http_info(name, number, start, opts)
  nil
end

#get_job_progressive_text_with_http_info(name, number, start, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Retrieve job&#39;s build progressive text output

Parameters:

  • name (String)

    Name of the job

  • number (String)

    Build number

  • start (String)

    Starting point of progressive text output

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

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 339

def get_job_progressive_text_with_http_info(name, number, start, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_job_progressive_text ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job_progressive_text"
  end
  # verify the required parameter 'number' is set
  if @api_client.config.client_side_validation && number.nil?
    fail ArgumentError, "Missing the required parameter 'number' when calling RemoteAccessApi.get_job_progressive_text"
  end
  # verify the required parameter 'start' is set
  if @api_client.config.client_side_validation && start.nil?
    fail ArgumentError, "Missing the required parameter 'start' when calling RemoteAccessApi.get_job_progressive_text"
  end
  # resource path
  local_var_path = '/job/{name}/{number}/logText/progressiveText'.sub('{' + 'name' + '}', CGI.escape(name.to_s)).sub('{' + 'number' + '}', CGI.escape(number.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'start'] = start

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_job_progressive_text",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job_progressive_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_job_with_http_info(name, opts = {}) ⇒ Array<(FreeStyleProject, Integer, Hash)>

Retrieve job details

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Returns:

  • (Array<(FreeStyleProject, Integer, Hash)>)

    FreeStyleProject data, response status code and response headers



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 152

def get_job_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_job ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_job"
  end
  # resource path
  local_var_path = '/job/{name}/api/json'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FreeStyleProject'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_job",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_queue(opts = {}) ⇒ Queue

Retrieve queue details

Parameters:

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

    the optional parameters

Returns:



397
398
399
400
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 397

def get_queue(opts = {})
  data, _status_code, _headers = get_queue_with_http_info(opts)
  data
end

#get_queue_item(number, opts = {}) ⇒ Queue

Retrieve queued item details

Parameters:

  • number (String)

    Queue number

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

    the optional parameters

Returns:



453
454
455
456
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 453

def get_queue_item(number, opts = {})
  data, _status_code, _headers = get_queue_item_with_http_info(number, opts)
  data
end

#get_queue_item_with_http_info(number, opts = {}) ⇒ Array<(Queue, Integer, Hash)>

Retrieve queued item details

Parameters:

  • number (String)

    Queue number

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

    the optional parameters

Returns:

  • (Array<(Queue, Integer, Hash)>)

    Queue data, response status code and response headers



462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 462

def get_queue_item_with_http_info(number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_queue_item ...'
  end
  # verify the required parameter 'number' is set
  if @api_client.config.client_side_validation && number.nil?
    fail ArgumentError, "Missing the required parameter 'number' when calling RemoteAccessApi.get_queue_item"
  end
  # resource path
  local_var_path = '/queue/item/{number}/api/json'.sub('{' + 'number' + '}', CGI.escape(number.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Queue'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_queue_item",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_queue_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_queue_with_http_info(opts = {}) ⇒ Array<(Queue, Integer, Hash)>

Retrieve queue details

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Queue, Integer, Hash)>)

    Queue data, response status code and response headers



405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 405

def get_queue_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_queue ...'
  end
  # resource path
  local_var_path = '/queue/api/json'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Queue'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_queue",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_view(name, opts = {}) ⇒ ListView

Retrieve view details

Parameters:

  • name (String)

    Name of the view

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

    the optional parameters

Returns:



514
515
516
517
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 514

def get_view(name, opts = {})
  data, _status_code, _headers = get_view_with_http_info(name, opts)
  data
end

#get_view_config(name, opts = {}) ⇒ String

Retrieve view configuration

Parameters:

  • name (String)

    Name of the view

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

    the optional parameters

Returns:

  • (String)


575
576
577
578
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 575

def get_view_config(name, opts = {})
  data, _status_code, _headers = get_view_config_with_http_info(name, opts)
  data
end

#get_view_config_with_http_info(name, opts = {}) ⇒ Array<(String, Integer, Hash)>

Retrieve view configuration

Parameters:

  • name (String)

    Name of the view

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

    the optional parameters

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 584

def get_view_config_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_view_config ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_view_config"
  end
  # resource path
  local_var_path = '/view/{name}/config.xml'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'String'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_view_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_view_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_view_with_http_info(name, opts = {}) ⇒ Array<(ListView, Integer, Hash)>

Retrieve view details

Parameters:

  • name (String)

    Name of the view

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

    the optional parameters

Returns:

  • (Array<(ListView, Integer, Hash)>)

    ListView data, response status code and response headers



523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 523

def get_view_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.get_view ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.get_view"
  end
  # resource path
  local_var_path = '/view/{name}/api/json'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListView'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.get_view",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#get_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#head_jenkins(opts = {}) ⇒ nil

Retrieve Jenkins headers

Parameters:

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

    the optional parameters

Returns:

  • (nil)


635
636
637
638
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 635

def head_jenkins(opts = {})
  head_jenkins_with_http_info(opts)
  nil
end

#head_jenkins_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Retrieve Jenkins headers

Parameters:

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

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 643

def head_jenkins_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.head_jenkins ...'
  end
  # resource path
  local_var_path = '/api/json'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.head_jenkins",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:HEAD, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#head_jenkins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_create_item(name, opts = {}) ⇒ nil

Create a new job using job configuration, or copied from an existing job

Parameters:

  • name (String)

    Name of the new job

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

    the optional parameters

Options Hash (opts):

  • :from (String)

    Existing job to copy from

  • :mode (String)

    Set to &#39;copy&#39; for copying an existing job

  • :jenkins_crumb (String)

    CSRF protection token

  • :content_type (String)

    Content type header application/xml

  • :body (String)

    Job configuration in config.xml format

Returns:

  • (nil)


694
695
696
697
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 694

def post_create_item(name, opts = {})
  post_create_item_with_http_info(name, opts)
  nil
end

#post_create_item_with_http_info(name, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create a new job using job configuration, or copied from an existing job

Parameters:

  • name (String)

    Name of the new job

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

    the optional parameters

Options Hash (opts):

  • :from (String)

    Existing job to copy from

  • :mode (String)

    Set to &#39;copy&#39; for copying an existing job

  • :jenkins_crumb (String)

    CSRF protection token

  • :content_type (String)

    Content type header application/xml

  • :body (String)

    Job configuration in config.xml format

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 708

def post_create_item_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_create_item ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_create_item"
  end
  # resource path
  local_var_path = '/createItem'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = name
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?
  header_params[:'Content-Type'] = opts[:'content_type'] if !opts[:'content_type'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_create_item",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_create_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_create_view(name, opts = {}) ⇒ nil

Create a new view using view configuration

Parameters:

  • name (String)

    Name of the new view

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

  • :content_type (String)

    Content type header application/xml

  • :body (String)

    View configuration in config.xml format

Returns:

  • (nil)


773
774
775
776
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 773

def post_create_view(name, opts = {})
  post_create_view_with_http_info(name, opts)
  nil
end

#post_create_view_with_http_info(name, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create a new view using view configuration

Parameters:

  • name (String)

    Name of the new view

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

  • :content_type (String)

    Content type header application/xml

  • :body (String)

    View configuration in config.xml format

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 785

def post_create_view_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_create_view ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_create_view"
  end
  # resource path
  local_var_path = '/createView'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = name

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?
  header_params[:'Content-Type'] = opts[:'content_type'] if !opts[:'content_type'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_create_view",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_create_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_job_build(name, json, opts = {}) ⇒ nil

Build a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :token (String)
  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (nil)


848
849
850
851
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 848

def post_job_build(name, json, opts = {})
  post_job_build_with_http_info(name, json, opts)
  nil
end

#post_job_build_with_http_info(name, json, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Build a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :token (String)
  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 860

def post_job_build_with_http_info(name, json, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_job_build ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_build"
  end
  # verify the required parameter 'json' is set
  if @api_client.config.client_side_validation && json.nil?
    fail ArgumentError, "Missing the required parameter 'json' when calling RemoteAccessApi.post_job_build"
  end
  # resource path
  local_var_path = '/job/{name}/build'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'json'] = json
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_job_build",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_build\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_job_config(name, body, opts = {}) ⇒ nil

Update job configuration

Parameters:

  • name (String)

    Name of the job

  • body (String)

    Job configuration in config.xml format

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (nil)


919
920
921
922
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 919

def post_job_config(name, body, opts = {})
  post_job_config_with_http_info(name, body, opts)
  nil
end

#post_job_config_with_http_info(name, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update job configuration

Parameters:

  • name (String)

    Name of the job

  • body (String)

    Job configuration in config.xml format

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 930

def post_job_config_with_http_info(name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_job_config ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_config"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling RemoteAccessApi.post_job_config"
  end
  # resource path
  local_var_path = '/job/{name}/config.xml'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_job_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_job_delete(name, opts = {}) ⇒ nil

Delete a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (nil)


993
994
995
996
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 993

def post_job_delete(name, opts = {})
  post_job_delete_with_http_info(name, opts)
  nil
end

#post_job_delete_with_http_info(name, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1003

def post_job_delete_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_job_delete ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_delete"
  end
  # resource path
  local_var_path = '/job/{name}/doDelete'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_job_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_job_disable(name, opts = {}) ⇒ nil

Disable a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (nil)


1055
1056
1057
1058
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1055

def post_job_disable(name, opts = {})
  post_job_disable_with_http_info(name, opts)
  nil
end

#post_job_disable_with_http_info(name, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Disable a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1065

def post_job_disable_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_job_disable ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_disable"
  end
  # resource path
  local_var_path = '/job/{name}/disable'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_job_disable",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_disable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_job_enable(name, opts = {}) ⇒ nil

Enable a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (nil)


1117
1118
1119
1120
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1117

def post_job_enable(name, opts = {})
  post_job_enable_with_http_info(name, opts)
  nil
end

#post_job_enable_with_http_info(name, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Enable a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1127

def post_job_enable_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_job_enable ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_enable"
  end
  # resource path
  local_var_path = '/job/{name}/enable'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_job_enable",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_job_last_build_stop(name, opts = {}) ⇒ nil

Stop a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (nil)


1179
1180
1181
1182
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1179

def post_job_last_build_stop(name, opts = {})
  post_job_last_build_stop_with_http_info(name, opts)
  nil
end

#post_job_last_build_stop_with_http_info(name, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Stop a job

Parameters:

  • name (String)

    Name of the job

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1189

def post_job_last_build_stop_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_job_last_build_stop ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_job_last_build_stop"
  end
  # resource path
  local_var_path = '/job/{name}/lastBuild/stop'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_job_last_build_stop",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_job_last_build_stop\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_view_config(name, body, opts = {}) ⇒ nil

Update view configuration

Parameters:

  • name (String)

    Name of the view

  • body (String)

    View configuration in config.xml format

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (nil)


1242
1243
1244
1245
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1242

def post_view_config(name, body, opts = {})
  post_view_config_with_http_info(name, body, opts)
  nil
end

#post_view_config_with_http_info(name, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update view configuration

Parameters:

  • name (String)

    Name of the view

  • body (String)

    View configuration in config.xml format

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

    the optional parameters

Options Hash (opts):

  • :jenkins_crumb (String)

    CSRF protection token

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
# File 'lib/swaggy_jenkins/api/remote_access_api.rb', line 1253

def post_view_config_with_http_info(name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RemoteAccessApi.post_view_config ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling RemoteAccessApi.post_view_config"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling RemoteAccessApi.post_view_config"
  end
  # resource path
  local_var_path = '/view/{name}/config.xml'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Jenkins-Crumb'] = opts[:'jenkins_crumb'] if !opts[:'jenkins_crumb'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['jenkins_auth']

  new_options = opts.merge(
    :operation => :"RemoteAccessApi.post_view_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RemoteAccessApi#post_view_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end