Class: Harbor1Client::ChartRepositoryApi

Inherits:
Object
  • Object
show all
Defined in:
lib/harbor1_client/api/chart_repository_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ChartRepositoryApi

Returns a new instance of ChartRepositoryApi.



19
20
21
# File 'lib/harbor1_client/api/chart_repository_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/harbor1_client/api/chart_repository_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#chartrepo_charts_post(chart, opts = {}) ⇒ nil

Upload a chart file to the defult ‘library’ project. Upload a chart file to the default ‘library’ project. Uploading together with the prov file at the same time is also supported.

Parameters:

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

  • (nil)


28
29
30
31
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 28

def chartrepo_charts_post(chart, opts = {})
  chartrepo_charts_post_with_http_info(chart, opts)
  nil
end

#chartrepo_charts_post_with_http_info(chart, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Upload a chart file to the defult &#39;library&#39; project. Upload a chart file to the default &#39;library&#39; project. Uploading together with the prov file at the same time is also supported.

Parameters:

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

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

    nil, response status code and response headers



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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 39

def chartrepo_charts_post_with_http_info(chart, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_charts_post ...'
  end
  # verify the required parameter 'chart' is set
  if @api_client.config.client_side_validation && chart.nil?
    fail ArgumentError, "Missing the required parameter 'chart' when calling ChartRepositoryApi.chartrepo_charts_post"
  end
  # resource path
  local_var_path = '/chartrepo/charts'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['chart'] = chart
  form_params['prov'] = opts[:'prov'] if !opts[:'prov'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_charts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_health_get(opts = {}) ⇒ InlineResponse200

Check the health of chart repository service. Check the health of chart repository service.

Parameters:

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

    the optional parameters

Returns:



83
84
85
86
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 83

def chartrepo_health_get(opts = {})
  data, _status_code, _headers = chartrepo_health_get_with_http_info(opts)
  data
end

#chartrepo_health_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

Check the health of chart repository service. Check the health of chart repository service.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(InlineResponse200, Fixnum, Hash)>)

    InlineResponse200 data, response status code and response headers



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
118
119
120
121
122
123
124
125
126
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 92

def chartrepo_health_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_health_get ...'
  end
  # resource path
  local_var_path = '/chartrepo/health'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse200')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_health_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_get(repo, opts = {}) ⇒ Array<ChartInfoEntry>

Get all the charts under the specified project Get all the charts under the specified project

Parameters:

  • repo

    The project name

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

    the optional parameters

Returns:



132
133
134
135
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 132

def chartrepo_repo_charts_get(repo, opts = {})
  data, _status_code, _headers = chartrepo_repo_charts_get_with_http_info(repo, opts)
  data
end

#chartrepo_repo_charts_get_with_http_info(repo, opts = {}) ⇒ Array<(Array<ChartInfoEntry>, Fixnum, Hash)>

Get all the charts under the specified project Get all the charts under the specified project

Parameters:

  • repo

    The project name

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

    the optional parameters

Returns:

  • (Array<(Array<ChartInfoEntry>, Fixnum, Hash)>)

    Array<ChartInfoEntry> data, response status code and response headers



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
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 142

def chartrepo_repo_charts_get_with_http_info(repo, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts'.sub('{' + 'repo' + '}', repo.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ChartInfoEntry>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_delete(repo, name, opts = {}) ⇒ nil

Delete all the versions of the specified chart Delete all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:

  • (nil)


187
188
189
190
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 187

def chartrepo_repo_charts_name_delete(repo, name, opts = {})
  chartrepo_repo_charts_name_delete_with_http_info(repo, name, opts)
  nil
end

#chartrepo_repo_charts_name_delete_with_http_info(repo, name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete all the versions of the specified chart Delete all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 198

def chartrepo_repo_charts_name_delete_with_http_info(repo, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_delete ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_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 ChartRepositoryApi.chartrepo_repo_charts_name_delete"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_get(repo, name, opts = {}) ⇒ ChartVersions

Get all the versions of the specified chart Get all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:



246
247
248
249
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 246

def chartrepo_repo_charts_name_get(repo, name, opts = {})
  data, _status_code, _headers = chartrepo_repo_charts_name_get_with_http_info(repo, name, opts)
  data
end

#chartrepo_repo_charts_name_get_with_http_info(repo, name, opts = {}) ⇒ Array<(ChartVersions, Fixnum, Hash)>

Get all the versions of the specified chart Get all the versions of the specified chart

Parameters:

  • repo

    The project name

  • name

    The chart name

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

    the optional parameters

Returns:

  • (Array<(ChartVersions, Fixnum, Hash)>)

    ChartVersions data, response status code and response headers



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 257

def chartrepo_repo_charts_name_get_with_http_info(repo, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_get"
  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 ChartRepositoryApi.chartrepo_repo_charts_name_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChartVersions')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_delete(repo, name, version, opts = {}) ⇒ nil

Delete the specified chart version Delete the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

  • (nil)


307
308
309
310
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 307

def chartrepo_repo_charts_name_version_delete(repo, name, version, opts = {})
  chartrepo_repo_charts_name_version_delete_with_http_info(repo, name, version, opts)
  nil
end

#chartrepo_repo_charts_name_version_delete_with_http_info(repo, name, version, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the specified chart version Delete the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 319

def chartrepo_repo_charts_name_version_delete_with_http_info(repo, name, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_delete ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_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 ChartRepositoryApi.chartrepo_repo_charts_name_version_delete"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_delete"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_get(repo, name, version, opts = {}) ⇒ ChartVersionDetails

Get the specified chart version Get the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:



372
373
374
375
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 372

def chartrepo_repo_charts_name_version_get(repo, name, version, opts = {})
  data, _status_code, _headers = chartrepo_repo_charts_name_version_get_with_http_info(repo, name, version, opts)
  data
end

#chartrepo_repo_charts_name_version_get_with_http_info(repo, name, version, opts = {}) ⇒ Array<(ChartVersionDetails, Fixnum, Hash)>

Get the specified chart version Get the specified chart version

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

  • (Array<(ChartVersionDetails, Fixnum, Hash)>)

    ChartVersionDetails data, response status code and response headers



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 384

def chartrepo_repo_charts_name_version_get_with_http_info(repo, name, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_get"
  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 ChartRepositoryApi.chartrepo_repo_charts_name_version_get"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ChartVersionDetails')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_labels_get(repo, name, version, opts = {}) ⇒ nil

Return the attahced labels of chart. Return the attahced labels of the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

  • (nil)


438
439
440
441
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 438

def chartrepo_repo_charts_name_version_labels_get(repo, name, version, opts = {})
  chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts)
  nil
end

#chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Return the attahced labels of chart. Return the attahced labels of the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



450
451
452
453
454
455
456
457
458
459
460
461
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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 450

def chartrepo_repo_charts_name_version_labels_get_with_http_info(repo, name, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get"
  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 ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_get"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_labels_id_delete(repo, name, version, id, opts = {}) ⇒ nil

Remove label from chart. Remove label from the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • id

    The label ID

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

    the optional parameters

Returns:

  • (nil)


504
505
506
507
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 504

def chartrepo_repo_charts_name_version_labels_id_delete(repo, name, version, id, opts = {})
  chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts)
  nil
end

#chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove label from chart. Remove label from the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • id

    The label ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



517
518
519
520
521
522
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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 517

def chartrepo_repo_charts_name_version_labels_id_delete_with_http_info(repo, name, version, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_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 ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_id_delete"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels/{id}'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s).sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_labels_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_name_version_labels_post(repo, name, version, label, opts = {}) ⇒ nil

Mark label to chart. Mark label to the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • label

    The label being marked to the chart version

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

    the optional parameters

Returns:

  • (nil)


575
576
577
578
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 575

def chartrepo_repo_charts_name_version_labels_post(repo, name, version, label, opts = {})
  chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts)
  nil
end

#chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Mark label to chart. Mark label to the specified chart version.

Parameters:

  • repo

    The project name

  • name

    The chart name

  • version

    The chart version

  • label

    The label being marked to the chart version

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
631
632
633
634
635
636
637
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 588

def chartrepo_repo_charts_name_version_labels_post_with_http_info(repo, name, version, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
  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 ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling ChartRepositoryApi.chartrepo_repo_charts_name_version_labels_post"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts/{name}/{version}/labels'.sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'name' + '}', name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(label)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_name_version_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_charts_post(repo, chart, opts = {}) ⇒ nil

Upload a chart file to the specified project. Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once.

Parameters:

  • repo

    The project name

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

  • (nil)


645
646
647
648
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 645

def chartrepo_repo_charts_post(repo, chart, opts = {})
  chartrepo_repo_charts_post_with_http_info(repo, chart, opts)
  nil
end

#chartrepo_repo_charts_post_with_http_info(repo, chart, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Upload a chart file to the specified project. Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once.

Parameters:

  • repo

    The project name

  • chart

    The chart file

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

    the optional parameters

Options Hash (opts):

  • :prov (File)

    The provance file

Returns:

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

    nil, response status code and response headers



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
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 657

def chartrepo_repo_charts_post_with_http_info(repo, chart, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_charts_post ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_charts_post"
  end
  # verify the required parameter 'chart' is set
  if @api_client.config.client_side_validation && chart.nil?
    fail ArgumentError, "Missing the required parameter 'chart' when calling ChartRepositoryApi.chartrepo_repo_charts_post"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/charts'.sub('{' + 'repo' + '}', repo.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['chart'] = chart
  form_params['prov'] = opts[:'prov'] if !opts[:'prov'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_charts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#chartrepo_repo_prov_post(repo, prov, opts = {}) ⇒ nil

Upload a provance file to the specified project. Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.

Parameters:

  • repo

    The project name

  • prov

    The provance file

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

    the optional parameters

Returns:

  • (nil)


707
708
709
710
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 707

def chartrepo_repo_prov_post(repo, prov, opts = {})
  chartrepo_repo_prov_post_with_http_info(repo, prov, opts)
  nil
end

#chartrepo_repo_prov_post_with_http_info(repo, prov, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Upload a provance file to the specified project. Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.

Parameters:

  • repo

    The project name

  • prov

    The provance file

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/harbor1_client/api/chart_repository_api.rb', line 718

def chartrepo_repo_prov_post_with_http_info(repo, prov, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChartRepositoryApi.chartrepo_repo_prov_post ...'
  end
  # verify the required parameter 'repo' is set
  if @api_client.config.client_side_validation && repo.nil?
    fail ArgumentError, "Missing the required parameter 'repo' when calling ChartRepositoryApi.chartrepo_repo_prov_post"
  end
  # verify the required parameter 'prov' is set
  if @api_client.config.client_side_validation && prov.nil?
    fail ArgumentError, "Missing the required parameter 'prov' when calling ChartRepositoryApi.chartrepo_repo_prov_post"
  end
  # resource path
  local_var_path = '/chartrepo/{repo}/prov'.sub('{' + 'repo' + '}', repo.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['prov'] = prov

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChartRepositoryApi#chartrepo_repo_prov_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end