Class: Harbor2Client::RegistryApi
- Inherits:
-
Object
- Object
- Harbor2Client::RegistryApi
- Defined in:
- lib/harbor2_client/api/registry_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_registry(registry, opts = {}) ⇒ nil
Create a registry Create a registry.
-
#create_registry_with_http_info(registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a registry Create a registry.
-
#delete_registry(id, opts = {}) ⇒ nil
Delete the specific registry Delete the specific registry.
-
#delete_registry_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete the specific registry Delete the specific registry.
-
#get_registry(id, opts = {}) ⇒ Registry
Get the specific registry Get the specific registry.
-
#get_registry_info(id, opts = {}) ⇒ RegistryInfo
Get the registry info Get the registry info.
-
#get_registry_info_with_http_info(id, opts = {}) ⇒ Array<(RegistryInfo, Fixnum, Hash)>
Get the registry info Get the registry info.
-
#get_registry_with_http_info(id, opts = {}) ⇒ Array<(Registry, Fixnum, Hash)>
Get the specific registry Get the specific registry.
-
#initialize(api_client = ApiClient.default) ⇒ RegistryApi
constructor
A new instance of RegistryApi.
-
#list_registries(opts = {}) ⇒ Array<Registry>
List the registries List the registries.
-
#list_registries_with_http_info(opts = {}) ⇒ Array<(Array<Registry>, Fixnum, Hash)>
List the registries List the registries.
-
#list_registry_provider_infos(opts = {}) ⇒ Hash<String, RegistryProviderInfo>
List all registered registry provider information List all registered registry provider information.
-
#list_registry_provider_infos_with_http_info(opts = {}) ⇒ Array<(Hash<String, RegistryProviderInfo>, Fixnum, Hash)>
List all registered registry provider information List all registered registry provider information.
-
#list_registry_provider_types(opts = {}) ⇒ Array<String>
List registry adapters List registry adapters.
-
#list_registry_provider_types_with_http_info(opts = {}) ⇒ Array<(Array<String>, Fixnum, Hash)>
List registry adapters List registry adapters.
-
#ping_registry(registry, opts = {}) ⇒ nil
Check status of a registry Check status of a registry.
-
#ping_registry_with_http_info(registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Check status of a registry Check status of a registry.
-
#update_registry(id, registry, opts = {}) ⇒ nil
Update the registry Update the registry.
-
#update_registry_with_http_info(id, registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update the registry Update the registry.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RegistryApi
Returns a new instance of RegistryApi.
19 20 21 |
# File 'lib/harbor2_client/api/registry_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/harbor2_client/api/registry_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_registry(registry, opts = {}) ⇒ nil
Create a registry Create a registry
28 29 30 31 |
# File 'lib/harbor2_client/api/registry_api.rb', line 28 def create_registry(registry, opts = {}) create_registry_with_http_info(registry, opts) nil end |
#create_registry_with_http_info(registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a registry Create a registry
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 |
# File 'lib/harbor2_client/api/registry_api.rb', line 39 def create_registry_with_http_info(registry, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.create_registry ...' end # verify the required parameter 'registry' is set if @api_client.config.client_side_validation && registry.nil? fail ArgumentError, "Missing the required parameter 'registry' when calling RegistryApi.create_registry" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.create_registry, the character length must be great than or equal to 1.' end # resource path local_var_path = '/registries' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(registry) auth_names = ['basic'] 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: RegistryApi#create_registry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_registry(id, opts = {}) ⇒ nil
Delete the specific registry Delete the specific registry
88 89 90 91 |
# File 'lib/harbor2_client/api/registry_api.rb', line 88 def delete_registry(id, opts = {}) delete_registry_with_http_info(id, opts) nil end |
#delete_registry_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete the specific registry Delete the specific registry
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 138 139 140 141 |
# File 'lib/harbor2_client/api/registry_api.rb', line 99 def delete_registry_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.delete_registry ...' 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 RegistryApi.delete_registry" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.delete_registry, the character length must be great than or equal to 1.' end # resource path local_var_path = '/registries/{id}'.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] 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: RegistryApi#delete_registry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_registry(id, opts = {}) ⇒ Registry
Get the specific registry Get the specific registry
148 149 150 151 |
# File 'lib/harbor2_client/api/registry_api.rb', line 148 def get_registry(id, opts = {}) data, _status_code, _headers = get_registry_with_http_info(id, opts) data end |
#get_registry_info(id, opts = {}) ⇒ RegistryInfo
Get the registry info Get the registry info
209 210 211 212 |
# File 'lib/harbor2_client/api/registry_api.rb', line 209 def get_registry_info(id, opts = {}) data, _status_code, _headers = get_registry_info_with_http_info(id, opts) data end |
#get_registry_info_with_http_info(id, opts = {}) ⇒ Array<(RegistryInfo, Fixnum, Hash)>
Get the registry info Get the registry info
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 260 261 262 263 |
# File 'lib/harbor2_client/api/registry_api.rb', line 220 def get_registry_info_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.get_registry_info ...' 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 RegistryApi.get_registry_info" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.get_registry_info, the character length must be great than or equal to 1.' end # resource path local_var_path = '/registries/{id}/info'.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] 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 => 'RegistryInfo') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegistryApi#get_registry_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_registry_with_http_info(id, opts = {}) ⇒ Array<(Registry, Fixnum, Hash)>
Get the specific registry Get the specific registry
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 199 200 201 202 |
# File 'lib/harbor2_client/api/registry_api.rb', line 159 def get_registry_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.get_registry ...' 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 RegistryApi.get_registry" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.get_registry, the character length must be great than or equal to 1.' end # resource path local_var_path = '/registries/{id}'.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] 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 => 'Registry') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegistryApi#get_registry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_registries(opts = {}) ⇒ Array<Registry>
List the registries List the registries
274 275 276 277 |
# File 'lib/harbor2_client/api/registry_api.rb', line 274 def list_registries(opts = {}) data, _status_code, _headers = list_registries_with_http_info(opts) data end |
#list_registries_with_http_info(opts = {}) ⇒ Array<(Array<Registry>, Fixnum, Hash)>
List the registries List the registries
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/harbor2_client/api/registry_api.rb', line 289 def list_registries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.list_registries ...' end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.list_registries, the character length must be great than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RegistryApi.list_registries, must be smaller than or equal to 100.' end # resource path local_var_path = '/registries' # query parameters query_params = {} query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] 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<Registry>') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegistryApi#list_registries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_registry_provider_infos(opts = {}) ⇒ Hash<String, RegistryProviderInfo>
List all registered registry provider information List all registered registry provider information
343 344 345 346 |
# File 'lib/harbor2_client/api/registry_api.rb', line 343 def list_registry_provider_infos(opts = {}) data, _status_code, _headers = list_registry_provider_infos_with_http_info(opts) data end |
#list_registry_provider_infos_with_http_info(opts = {}) ⇒ Array<(Hash<String, RegistryProviderInfo>, Fixnum, Hash)>
List all registered registry provider information List all registered registry provider information
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/harbor2_client/api/registry_api.rb', line 353 def list_registry_provider_infos_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.list_registry_provider_infos ...' end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.list_registry_provider_infos, the character length must be great than or equal to 1.' end # resource path local_var_path = '/replication/adapterinfos' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] 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 => 'Hash<String, RegistryProviderInfo>') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegistryApi#list_registry_provider_infos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_registry_provider_types(opts = {}) ⇒ Array<String>
List registry adapters List registry adapters
398 399 400 401 |
# File 'lib/harbor2_client/api/registry_api.rb', line 398 def list_registry_provider_types(opts = {}) data, _status_code, _headers = list_registry_provider_types_with_http_info(opts) data end |
#list_registry_provider_types_with_http_info(opts = {}) ⇒ Array<(Array<String>, Fixnum, Hash)>
List registry adapters List registry adapters
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/harbor2_client/api/registry_api.rb', line 408 def list_registry_provider_types_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.list_registry_provider_types ...' end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.list_registry_provider_types, the character length must be great than or equal to 1.' end # resource path local_var_path = '/replication/adapters' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] 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<String>') if @api_client.config.debugging @api_client.config.logger.debug "API called: RegistryApi#list_registry_provider_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#ping_registry(registry, opts = {}) ⇒ nil
Check status of a registry Check status of a registry
454 455 456 457 |
# File 'lib/harbor2_client/api/registry_api.rb', line 454 def ping_registry(registry, opts = {}) ping_registry_with_http_info(registry, opts) nil end |
#ping_registry_with_http_info(registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Check status of a registry Check status of a registry
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 |
# File 'lib/harbor2_client/api/registry_api.rb', line 465 def ping_registry_with_http_info(registry, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.ping_registry ...' end # verify the required parameter 'registry' is set if @api_client.config.client_side_validation && registry.nil? fail ArgumentError, "Missing the required parameter 'registry' when calling RegistryApi.ping_registry" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.ping_registry, the character length must be great than or equal to 1.' end # resource path local_var_path = '/registries/ping' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(registry) auth_names = ['basic'] 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: RegistryApi#ping_registry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_registry(id, registry, opts = {}) ⇒ nil
Update the registry Update the registry
515 516 517 518 |
# File 'lib/harbor2_client/api/registry_api.rb', line 515 def update_registry(id, registry, opts = {}) update_registry_with_http_info(id, registry, opts) nil end |
#update_registry_with_http_info(id, registry, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update the registry Update the registry
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 570 571 572 573 |
# File 'lib/harbor2_client/api/registry_api.rb', line 527 def update_registry_with_http_info(id, registry, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RegistryApi.update_registry ...' 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 RegistryApi.update_registry" end # verify the required parameter 'registry' is set if @api_client.config.client_side_validation && registry.nil? fail ArgumentError, "Missing the required parameter 'registry' when calling RegistryApi.update_registry" end if @api_client.config.client_side_validation && !opts[:'x_request_id'].nil? && opts[:'x_request_id'].to_s.length < 1 fail ArgumentError, 'invalid value for "opts[:"x_request_id"]" when calling RegistryApi.update_registry, the character length must be great than or equal to 1.' end # resource path local_var_path = '/registries/{id}'.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Request-Id'] = opts[:'x_request_id'] if !opts[:'x_request_id'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(registry) auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:PUT, 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: RegistryApi#update_registry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |