Class: OCI::OsManagementHub::SoftwareSourceClient
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::SoftwareSourceClient
- Defined in:
- lib/oci/os_management_hub/software_source_client.rb
Overview
Use the OS Management Hub API to manage and monitor updates and patches for instances in OCI, your private data center, or 3rd-party clouds. For more information, see Overview of OS Management Hub.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#add_packages_to_software_source(software_source_id, add_packages_to_software_source_details, opts = {}) ⇒ Response
Adds packages to a software source.
-
#change_availability_of_software_sources(change_availability_of_software_sources_details, opts = {}) ⇒ Response
Updates the availability for a list of specified software sources.
-
#change_software_source_compartment(software_source_id, change_software_source_compartment_details, opts = {}) ⇒ Response
Moves the specified software sources to a different compartment within the same tenancy.
-
#create_entitlement(create_entitlement_details, opts = {}) ⇒ Response
Registers the necessary entitlement credentials for OS vendor software sources for a tenancy.
-
#create_software_source(create_software_source_details, opts = {}) ⇒ Response
Creates a new software source.
-
#delete_software_source(software_source_id, opts = {}) ⇒ Response
Deletes the specified software source.
-
#get_erratum(compartment_id, name, opts = {}) ⇒ Response
Returns information about the specified erratum based on its advisory name.
-
#get_module_stream(software_source_id, module_name, stream_name, opts = {}) ⇒ Response
Returns information about the specified module stream in a software source.
-
#get_module_stream_profile(software_source_id, profile_name, module_name, stream_name, opts = {}) ⇒ Response
Returns information about the specified module stream profile in a software source.
-
#get_package_group(software_source_id, package_group_id, opts = {}) ⇒ Response
Returns information about the specified package group from a software source.
-
#get_software_package(software_source_id, software_package_name, opts = {}) ⇒ Response
Returns information about the specified software package.
-
#get_software_package_by_name(software_package_name, opts = {}) ⇒ Response
Returns information about the specified software package based on its fully qualified name (NVRA or NEVRA).
-
#get_software_source(software_source_id, opts = {}) ⇒ Response
Returns information about the specified software source.
-
#get_software_source_manifest(software_source_id, opts = {}, &block) ⇒ Response
Returns an archive containing the list of packages in the software source.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ SoftwareSourceClient
constructor
Creates a new SoftwareSourceClient.
-
#list_all_software_packages(opts = {}) ⇒ Response
Lists software packages available through the OS Management Hub service.
-
#list_available_software_packages(software_source_id, opts = {}) ⇒ Response
Lists software packages that are available to be added to a custom software source of type MANIFEST.
-
#list_entitlements(compartment_id, opts = {}) ⇒ Response
Lists entitlements in the specified tenancy OCID.
-
#list_errata(compartment_id, opts = {}) ⇒ Response
Lists all of the currently available errata.
-
#list_module_stream_profiles(software_source_id, opts = {}) ⇒ Response
Lists module stream profiles from the specified software source OCID.
-
#list_module_streams(software_source_id, opts = {}) ⇒ Response
Lists module streams from the specified software source OCID.
-
#list_package_groups(software_source_id, opts = {}) ⇒ Response
Lists package groups that are associated with the specified software source OCID.
-
#list_software_package_software_sources(software_package_name, compartment_id, opts = {}) ⇒ Response
Lists the software sources in the tenancy that contain the software package.
-
#list_software_packages(software_source_id, opts = {}) ⇒ Response
Lists software packages in the specified software source.
-
#list_software_source_vendors(compartment_id, opts = {}) ⇒ Response
Lists available software source vendors.
-
#list_software_sources(opts = {}) ⇒ Response
Lists software sources that match the specified tenancy or software source OCID.
-
#logger ⇒ Logger
The logger for this client.
-
#remove_packages_from_software_source(software_source_id, remove_packages_from_software_source_details, opts = {}) ⇒ Response
Removes packages from a software source.
-
#replace_packages_in_software_source(software_source_id, replace_packages_in_software_source_details, opts = {}) ⇒ Response
Replaces packages in a software source with the provided list of packages.
-
#search_software_source_module_streams(search_software_source_module_streams_details, opts = {}) ⇒ Response
Returns a list of module streams from the specified software sources.
-
#search_software_source_modules(search_software_source_modules_details, opts = {}) ⇒ Response
Lists modules from a list of software sources.
-
#search_software_source_package_groups(search_software_source_package_groups_details, opts = {}) ⇒ Response
Searches the package groups from the specified list of software sources.
-
#software_source_generate_metadata(software_source_id, opts = {}) ⇒ Response
Regenerates metadata for the specified custom software source.
-
#update_software_source(software_source_id, update_software_source_details, opts = {}) ⇒ Response
Updates the specified software source's details, including but not limited to name, description, and tags.
-
#update_software_source_manifest(update_software_source_manifest_details, software_source_id, opts = {}) ⇒ Response
Updates the package list document for the software source.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ SoftwareSourceClient
Creates a new SoftwareSourceClient. Notes: If a config is not specified, then the global OCI.config will be used.
This client is not thread-safe
Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 56 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20220901' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "SoftwareSourceClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
16 17 18 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 16 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
20 21 22 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 20 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
30 31 32 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 30 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil
, which means that an operation will not perform any retries
26 27 28 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 26 def retry_config @retry_config end |
Instance Method Details
#add_packages_to_software_source(software_source_id, add_packages_to_software_source_details, opts = {}) ⇒ Response
Click here to see an example of how to use add_packages_to_software_source API.
Adds packages to a software source. This operation can only be done for custom and versioned custom software sources that are not created using filters. For a versioned custom software source, you can only add packages when the source is created. Once content is added to a versioned custom software source, it is immutable. Packages can be of the format: * name (for example: git). If isLatestContentOnly is true, only the latest version of the package will be added, otherwise all versions of the package will be added. * name-version-release.architecture (for example: git-2.43.5-1.el8_10.x86_64) * name-epoch:version-release.architecture (for example: git-0:2.43.5-1.el8_10.x86_64)
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 131 def add_packages_to_software_source(software_source_id, add_packages_to_software_source_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#add_packages_to_software_source.' if logger raise "Missing the required parameter 'software_source_id' when calling add_packages_to_software_source." if software_source_id.nil? raise "Missing the required parameter 'add_packages_to_software_source_details' when calling add_packages_to_software_source." if add_packages_to_software_source_details.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/actions/addPackages'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(add_packages_to_software_source_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#add_packages_to_software_source') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_availability_of_software_sources(change_availability_of_software_sources_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_availability_of_software_sources API.
Updates the availability for a list of specified software sources.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 195 def change_availability_of_software_sources(change_availability_of_software_sources_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#change_availability_of_software_sources.' if logger raise "Missing the required parameter 'change_availability_of_software_sources_details' when calling change_availability_of_software_sources." if change_availability_of_software_sources_details.nil? path = '/softwareSources/actions/changeAvailability' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_availability_of_software_sources_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#change_availability_of_software_sources') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_software_source_compartment(software_source_id, change_software_source_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_software_source_compartment API.
Moves the specified software sources to a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
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 300 301 302 303 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 264 def change_software_source_compartment(software_source_id, change_software_source_compartment_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#change_software_source_compartment.' if logger raise "Missing the required parameter 'software_source_id' when calling change_software_source_compartment." if software_source_id.nil? raise "Missing the required parameter 'change_software_source_compartment_details' when calling change_software_source_compartment." if change_software_source_compartment_details.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/actions/changeCompartment'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_software_source_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#change_software_source_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#create_entitlement(create_entitlement_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_entitlement API.
Registers the necessary entitlement credentials for OS vendor software sources for a tenancy.
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/oci/os_management_hub/software_source_client.rb', line 328 def create_entitlement(create_entitlement_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#create_entitlement.' if logger raise "Missing the required parameter 'create_entitlement_details' when calling create_entitlement." if create_entitlement_details.nil? path = '/entitlements' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_entitlement_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#create_entitlement') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#create_software_source(create_software_source_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_software_source API.
Creates a new software source.
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 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 389 def create_software_source(create_software_source_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#create_software_source.' if logger raise "Missing the required parameter 'create_software_source_details' when calling create_software_source." if create_software_source_details.nil? path = '/softwareSources' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_software_source_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#create_software_source') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwareSource' ) end # rubocop:enable Metrics/BlockLength end |
#delete_software_source(software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_software_source API.
Deletes the specified software source.
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 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 450 def delete_software_source(software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#delete_software_source.' if logger raise "Missing the required parameter 'software_source_id' when calling delete_software_source." if software_source_id.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#delete_software_source') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#get_erratum(compartment_id, name, opts = {}) ⇒ Response
Click here to see an example of how to use get_erratum API.
Returns information about the specified erratum based on its advisory name.
506 507 508 509 510 511 512 513 514 515 516 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 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 506 def get_erratum(compartment_id, name, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#get_erratum.' if logger raise "Missing the required parameter 'compartment_id' when calling get_erratum." if compartment_id.nil? raise "Missing the required parameter 'name' when calling get_erratum." if name.nil? raise "Parameter value for 'name' must not be blank" if OCI::Internal::Util.blank_string?(name) path = '/errata/{name}'.sub('{name}', name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_erratum') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::Erratum' ) end # rubocop:enable Metrics/BlockLength end |
#get_module_stream(software_source_id, module_name, stream_name, opts = {}) ⇒ Response
Click here to see an example of how to use get_module_stream API.
Returns information about the specified module stream in a software source.
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 566 def get_module_stream(software_source_id, module_name, stream_name, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#get_module_stream.' if logger raise "Missing the required parameter 'software_source_id' when calling get_module_stream." if software_source_id.nil? raise "Missing the required parameter 'module_name' when calling get_module_stream." if module_name.nil? raise "Missing the required parameter 'stream_name' when calling get_module_stream." if stream_name.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) raise "Parameter value for 'module_name' must not be blank" if OCI::Internal::Util.blank_string?(module_name) path = '/softwareSources/{softwareSourceId}/moduleStreams/{moduleName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{moduleName}', module_name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:streamName] = stream_name # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_module_stream') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ModuleStream' ) end # rubocop:enable Metrics/BlockLength end |
#get_module_stream_profile(software_source_id, profile_name, module_name, stream_name, opts = {}) ⇒ Response
Click here to see an example of how to use get_module_stream_profile API.
Returns information about the specified module stream profile in a software source.
630 631 632 633 634 635 636 637 638 639 640 641 642 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 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 630 def get_module_stream_profile(software_source_id, profile_name, module_name, stream_name, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#get_module_stream_profile.' if logger raise "Missing the required parameter 'software_source_id' when calling get_module_stream_profile." if software_source_id.nil? raise "Missing the required parameter 'profile_name' when calling get_module_stream_profile." if profile_name.nil? raise "Missing the required parameter 'module_name' when calling get_module_stream_profile." if module_name.nil? raise "Missing the required parameter 'stream_name' when calling get_module_stream_profile." if stream_name.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) raise "Parameter value for 'profile_name' must not be blank" if OCI::Internal::Util.blank_string?(profile_name) path = '/softwareSources/{softwareSourceId}/moduleStreamProfiles/{profileName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{profileName}', profile_name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:moduleName] = module_name query_params[:streamName] = stream_name # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_module_stream_profile') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ModuleStreamProfile' ) end # rubocop:enable Metrics/BlockLength end |
#get_package_group(software_source_id, package_group_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_package_group API.
Returns information about the specified package group from a software source.
692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 692 def get_package_group(software_source_id, package_group_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#get_package_group.' if logger raise "Missing the required parameter 'software_source_id' when calling get_package_group." if software_source_id.nil? raise "Missing the required parameter 'package_group_id' when calling get_package_group." if package_group_id.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) raise "Parameter value for 'package_group_id' must not be blank" if OCI::Internal::Util.blank_string?(package_group_id) path = '/softwareSources/{softwareSourceId}/packageGroups/{packageGroupId}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{packageGroupId}', package_group_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_package_group') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::PackageGroup' ) end # rubocop:enable Metrics/BlockLength end |
#get_software_package(software_source_id, software_package_name, opts = {}) ⇒ Response
Click here to see an example of how to use get_software_package API.
Returns information about the specified software package.
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 750 def get_software_package(software_source_id, software_package_name, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#get_software_package.' if logger raise "Missing the required parameter 'software_source_id' when calling get_software_package." if software_source_id.nil? raise "Missing the required parameter 'software_package_name' when calling get_software_package." if software_package_name.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) raise "Parameter value for 'software_package_name' must not be blank" if OCI::Internal::Util.blank_string?(software_package_name) path = '/softwareSources/{softwareSourceId}/softwarePackages/{softwarePackageName}'.sub('{softwareSourceId}', software_source_id.to_s).sub('{softwarePackageName}', software_package_name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_software_package') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwarePackage' ) end # rubocop:enable Metrics/BlockLength end |
#get_software_package_by_name(software_package_name, opts = {}) ⇒ Response
Click here to see an example of how to use get_software_package_by_name API.
Returns information about the specified software package based on its fully qualified name (NVRA or NEVRA).
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 840 841 842 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 806 def get_software_package_by_name(software_package_name, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#get_software_package_by_name.' if logger raise "Missing the required parameter 'software_package_name' when calling get_software_package_by_name." if software_package_name.nil? raise "Parameter value for 'software_package_name' must not be blank" if OCI::Internal::Util.blank_string?(software_package_name) path = '/softwarePackages/{softwarePackageName}'.sub('{softwarePackageName}', software_package_name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_software_package_by_name') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwarePackage' ) end # rubocop:enable Metrics/BlockLength end |
#get_software_source(software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_software_source API.
Returns information about the specified software source.
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 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 860 def get_software_source(software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#get_software_source.' if logger raise "Missing the required parameter 'software_source_id' when calling get_software_source." if software_source_id.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_software_source') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwareSource' ) end # rubocop:enable Metrics/BlockLength end |
#get_software_source_manifest(software_source_id, opts = {}, &block) ⇒ Response
Click here to see an example of how to use get_software_source_manifest API.
Returns an archive containing the list of packages in the software source.
917 918 919 920 921 922 923 924 925 926 927 928 929 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 987 988 989 990 991 992 993 994 995 996 997 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 917 def get_software_source_manifest(software_source_id, opts = {}, &block) logger.debug 'Calling operation SoftwareSourceClient#get_software_source_manifest.' if logger raise "Missing the required parameter 'software_source_id' when calling get_software_source_manifest." if software_source_id.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/manifest'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'application/octet-stream' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#get_software_source_manifest') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#list_all_software_packages(opts = {}) ⇒ Response
Click here to see an example of how to use list_all_software_packages API.
Lists software packages available through the OS Management Hub service. Filter the list against a variety of criteria including but not limited to its name.
Allowed values are: displayName
1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 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 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1036 def list_all_software_packages(opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_all_software_packages.' if logger if opts[:architecture] && !OCI::OsManagementHub::Models::SOFTWARE_PACKAGE_ARCHITECTURE_ENUM.include?(opts[:architecture]) raise 'Invalid value for "architecture", must be one of the values in OCI::OsManagementHub::Models::SOFTWARE_PACKAGE_ARCHITECTURE_ENUM.' end if opts[:os_family] && !OCI::OsManagementHub::Models::OS_FAMILY_ENUM.include?(opts[:os_family]) raise 'Invalid value for "os_family", must be one of the values in OCI::OsManagementHub::Models::OS_FAMILY_ENUM.' end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of displayName.' end path = '/softwarePackages' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:version] = opts[:version] if opts[:version] query_params[:architecture] = opts[:architecture] if opts[:architecture] query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil? query_params[:osFamily] = opts[:os_family] if opts[:os_family] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_all_software_packages') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwarePackageCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_available_software_packages(software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_available_software_packages API.
Lists software packages that are available to be added to a custom software source of type MANIFEST. Filter the list against a variety of criteria including but not limited to its name.
Allowed values are: timeCreated, displayName
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 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1133 def list_available_software_packages(software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_available_software_packages.' if logger raise "Missing the required parameter 'software_source_id' when calling list_available_software_packages." if software_source_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/availableSoftwarePackages'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil? query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_available_software_packages') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwarePackageCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_entitlements(compartment_id, opts = {}) ⇒ Response
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1220 def list_entitlements(compartment_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_entitlements.' if logger raise "Missing the required parameter 'compartment_id' when calling list_entitlements." if compartment_id.nil? if opts[:vendor_name] && !OCI::OsManagementHub::Models::VENDOR_NAME_ENUM.include?(opts[:vendor_name]) raise 'Invalid value for "vendor_name", must be one of the values in OCI::OsManagementHub::Models::VENDOR_NAME_ENUM.' end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[csi vendorName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of csi, vendorName.' end path = '/entitlements' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:csi] = opts[:csi] if opts[:csi] query_params[:vendorName] = opts[:vendor_name] if opts[:vendor_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_entitlements') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::EntitlementCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_errata(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_errata API.
Lists all of the currently available errata. Filter the list against a variety of criteria including but not limited to its name, classification type, advisory severity, and OS family.
Allowed values are: timeIssued, name
1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1329 def list_errata(compartment_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_errata.' if logger raise "Missing the required parameter 'compartment_id' when calling list_errata." if compartment_id.nil? classification_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT OTHER] if opts[:classification_type] && !opts[:classification_type].empty? opts[:classification_type].each do |val_to_check| unless classification_type_allowable_values.include?(val_to_check) raise 'Invalid value for "classification_type", must be one of SECURITY, BUGFIX, ENHANCEMENT, OTHER.' end end end advisory_type_allowable_values = %w[SECURITY BUGFIX ENHANCEMENT] if opts[:advisory_type] && !opts[:advisory_type].empty? opts[:advisory_type].each do |val_to_check| unless advisory_type_allowable_values.include?(val_to_check) raise 'Invalid value for "advisory_type", must be one of SECURITY, BUGFIX, ENHANCEMENT.' end end end if opts[:os_family] && !OCI::OsManagementHub::Models::OS_FAMILY_ENUM.include?(opts[:os_family]) raise 'Invalid value for "os_family", must be one of the values in OCI::OsManagementHub::Models::OS_FAMILY_ENUM.' end advisory_severity_allowable_values = %w[LOW MODERATE IMPORTANT CRITICAL] if opts[:advisory_severity] && !opts[:advisory_severity].empty? opts[:advisory_severity].each do |val_to_check| unless advisory_severity_allowable_values.include?(val_to_check) raise 'Invalid value for "advisory_severity", must be one of LOW, MODERATE, IMPORTANT, CRITICAL.' end end end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeIssued name].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeIssued, name.' end path = '/errata' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty? query_params[:nameContains] = opts[:name_contains] if opts[:name_contains] query_params[:classificationType] = OCI::ApiClient.build_collection_params(opts[:classification_type], :multi) if opts[:classification_type] && !opts[:classification_type].empty? query_params[:advisoryType] = OCI::ApiClient.build_collection_params(opts[:advisory_type], :multi) if opts[:advisory_type] && !opts[:advisory_type].empty? query_params[:osFamily] = opts[:os_family] if opts[:os_family] query_params[:advisorySeverity] = OCI::ApiClient.build_collection_params(opts[:advisory_severity], :multi) if opts[:advisory_severity] && !opts[:advisory_severity].empty? query_params[:timeIssueDateStart] = opts[:time_issue_date_start] if opts[:time_issue_date_start] query_params[:timeIssueDateEnd] = opts[:time_issue_date_end] if opts[:time_issue_date_end] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_errata') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ErratumCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_module_stream_profiles(software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_module_stream_profiles API.
Lists module stream profiles from the specified software source OCID. Filter the list against a variety of criteria including but not limited to its module name, stream name, and profile name.
Allowed values are: moduleName
1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1458 def list_module_stream_profiles(software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_module_stream_profiles.' if logger raise "Missing the required parameter 'software_source_id' when calling list_module_stream_profiles." if software_source_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[moduleName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of moduleName.' end raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/moduleStreamProfiles'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:moduleName] = opts[:module_name] if opts[:module_name] query_params[:streamName] = opts[:stream_name] if opts[:stream_name] query_params[:name] = opts[:name] if opts[:name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_module_stream_profiles') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ModuleStreamProfileCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_module_streams(software_source_id, opts = {}) ⇒ Response
1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1549 def list_module_streams(software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_module_streams.' if logger raise "Missing the required parameter 'software_source_id' when calling list_module_streams." if software_source_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[moduleName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of moduleName.' end raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/moduleStreams'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:moduleName] = opts[:module_name] if opts[:module_name] query_params[:name] = opts[:name] if opts[:name] query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil? query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:moduleNameContains] = opts[:module_name_contains] if opts[:module_name_contains] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_module_streams') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ModuleStreamCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_package_groups(software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_package_groups API.
Lists package groups that are associated with the specified software source OCID. Filter the list against a variety of criteria including but not limited to its name, and package group type.
Allowed values are: timeCreated, displayName
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1639 def list_package_groups(software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_package_groups.' if logger raise "Missing the required parameter 'software_source_id' when calling list_package_groups." if software_source_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/packageGroups'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:name] = opts[:name] if opts[:name] query_params[:nameContains] = opts[:name_contains] if opts[:name_contains] query_params[:groupType] = OCI::ApiClient.build_collection_params(opts[:group_type], :multi) if opts[:group_type] && !opts[:group_type].empty? query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_package_groups') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::PackageGroupCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_software_package_software_sources(software_package_name, compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_software_package_software_sources API.
Lists the software sources in the tenancy that contain the software package. Filter the list against a variety of criteria including but not limited to its name, type, architecture, and OS family.
Allowed values are: timeCreated, displayName
1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1741 def list_software_package_software_sources(software_package_name, compartment_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_software_package_software_sources.' if logger raise "Missing the required parameter 'software_package_name' when calling list_software_package_software_sources." if software_package_name.nil? raise "Missing the required parameter 'compartment_id' when calling list_software_package_software_sources." if compartment_id.nil? software_source_type_allowable_values = %w[VENDOR CUSTOM VERSIONED PRIVATE THIRD_PARTY] if opts[:software_source_type] && !opts[:software_source_type].empty? opts[:software_source_type].each do |val_to_check| unless software_source_type_allowable_values.include?(val_to_check) raise 'Invalid value for "software_source_type", must be one of VENDOR, CUSTOM, VERSIONED, PRIVATE, THIRD_PARTY.' end end end os_family_allowable_values = %w[ORACLE_LINUX_9 ORACLE_LINUX_8 ORACLE_LINUX_7 ORACLE_LINUX_6 WINDOWS_SERVER_2016 WINDOWS_SERVER_2019 WINDOWS_SERVER_2022 ALL] if opts[:os_family] && !opts[:os_family].empty? opts[:os_family].each do |val_to_check| unless os_family_allowable_values.include?(val_to_check) raise 'Invalid value for "os_family", must be one of ORACLE_LINUX_9, ORACLE_LINUX_8, ORACLE_LINUX_7, ORACLE_LINUX_6, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, ALL.' end end end arch_type_allowable_values = %w[X86_64 AARCH64 I686 NOARCH SRC I386] if opts[:arch_type] && !opts[:arch_type].empty? opts[:arch_type].each do |val_to_check| unless arch_type_allowable_values.include?(val_to_check) raise 'Invalid value for "arch_type", must be one of X86_64, AARCH64, I686, NOARCH, SRC, I386.' end end end availability_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE] if opts[:availability] && !opts[:availability].empty? opts[:availability].each do |val_to_check| unless availability_allowable_values.include?(val_to_check) raise 'Invalid value for "availability", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.' end end end availability_at_oci_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE] if opts[:availability_at_oci] && !opts[:availability_at_oci].empty? opts[:availability_at_oci].each do |val_to_check| unless availability_at_oci_allowable_values.include?(val_to_check) raise 'Invalid value for "availability_at_oci", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.' end end end availability_anywhere_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE] if opts[:availability_anywhere] && !opts[:availability_anywhere].empty? opts[:availability_anywhere].each do |val_to_check| unless availability_anywhere_allowable_values.include?(val_to_check) raise 'Invalid value for "availability_anywhere", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.' end end end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end raise "Parameter value for 'software_package_name' must not be blank" if OCI::Internal::Util.blank_string?(software_package_name) path = '/softwarePackages/{softwarePackageName}/softwareSources'.sub('{softwarePackageName}', software_package_name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:softwareSourceType] = OCI::ApiClient.build_collection_params(opts[:software_source_type], :multi) if opts[:software_source_type] && !opts[:software_source_type].empty? query_params[:osFamily] = OCI::ApiClient.build_collection_params(opts[:os_family], :multi) if opts[:os_family] && !opts[:os_family].empty? query_params[:archType] = OCI::ApiClient.build_collection_params(opts[:arch_type], :multi) if opts[:arch_type] && !opts[:arch_type].empty? query_params[:availability] = OCI::ApiClient.build_collection_params(opts[:availability], :multi) if opts[:availability] && !opts[:availability].empty? query_params[:availabilityAtOci] = OCI::ApiClient.build_collection_params(opts[:availability_at_oci], :multi) if opts[:availability_at_oci] && !opts[:availability_at_oci].empty? query_params[:availabilityAnywhere] = OCI::ApiClient.build_collection_params(opts[:availability_anywhere], :multi) if opts[:availability_anywhere] && !opts[:availability_anywhere].empty? query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty? # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_software_package_software_sources') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwareSourceCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_software_packages(software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_software_packages API.
Lists software packages in the specified software source. Filter the list against a variety of criteria including but not limited to its name.
Allowed values are: timeCreated, displayName
1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1897 def list_software_packages(software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_software_packages.' if logger raise "Missing the required parameter 'software_source_id' when calling list_software_packages." if software_source_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/softwarePackages'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:isLatest] = opts[:is_latest] if !opts[:is_latest].nil? query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_software_packages') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwarePackageCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_software_source_vendors(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_software_source_vendors API.
Lists available software source vendors. Filter the list against a variety of criteria including but not limited to its name.
Allowed values are: name
1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 1973 def list_software_source_vendors(compartment_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_software_source_vendors.' if logger raise "Missing the required parameter 'compartment_id' when calling list_software_source_vendors." if compartment_id.nil? if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[name].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of name.' end path = '/softwareSourceVendors' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:name] = opts[:name] if opts[:name] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_software_source_vendors') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwareSourceVendorCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_software_sources(opts = {}) ⇒ Response
Click here to see an example of how to use list_software_sources API.
Lists software sources that match the specified tenancy or software source OCID. Filter the list against a variety of criteria including but not limited to its name, status, architecture, and OS family.
Allowed values are: timeCreated, displayName
2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2074 def list_software_sources(opts = {}) logger.debug 'Calling operation SoftwareSourceClient#list_software_sources.' if logger software_source_type_allowable_values = %w[VENDOR CUSTOM VERSIONED PRIVATE THIRD_PARTY] if opts[:software_source_type] && !opts[:software_source_type].empty? opts[:software_source_type].each do |val_to_check| unless software_source_type_allowable_values.include?(val_to_check) raise 'Invalid value for "software_source_type", must be one of VENDOR, CUSTOM, VERSIONED, PRIVATE, THIRD_PARTY.' end end end if opts[:vendor_name] && !OCI::OsManagementHub::Models::VENDOR_NAME_ENUM.include?(opts[:vendor_name]) raise 'Invalid value for "vendor_name", must be one of the values in OCI::OsManagementHub::Models::VENDOR_NAME_ENUM.' end os_family_allowable_values = %w[ORACLE_LINUX_9 ORACLE_LINUX_8 ORACLE_LINUX_7 ORACLE_LINUX_6 WINDOWS_SERVER_2016 WINDOWS_SERVER_2019 WINDOWS_SERVER_2022 ALL] if opts[:os_family] && !opts[:os_family].empty? opts[:os_family].each do |val_to_check| unless os_family_allowable_values.include?(val_to_check) raise 'Invalid value for "os_family", must be one of ORACLE_LINUX_9, ORACLE_LINUX_8, ORACLE_LINUX_7, ORACLE_LINUX_6, WINDOWS_SERVER_2016, WINDOWS_SERVER_2019, WINDOWS_SERVER_2022, ALL.' end end end arch_type_allowable_values = %w[X86_64 AARCH64 I686 NOARCH SRC I386] if opts[:arch_type] && !opts[:arch_type].empty? opts[:arch_type].each do |val_to_check| unless arch_type_allowable_values.include?(val_to_check) raise 'Invalid value for "arch_type", must be one of X86_64, AARCH64, I686, NOARCH, SRC, I386.' end end end availability_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE] if opts[:availability] && !opts[:availability].empty? opts[:availability].each do |val_to_check| unless availability_allowable_values.include?(val_to_check) raise 'Invalid value for "availability", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.' end end end availability_at_oci_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE] if opts[:availability_at_oci] && !opts[:availability_at_oci].empty? opts[:availability_at_oci].each do |val_to_check| unless availability_at_oci_allowable_values.include?(val_to_check) raise 'Invalid value for "availability_at_oci", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.' end end end availability_anywhere_allowable_values = %w[AVAILABLE SELECTED RESTRICTED UNAVAILABLE] if opts[:availability_anywhere] && !opts[:availability_anywhere].empty? opts[:availability_anywhere].each do |val_to_check| unless availability_anywhere_allowable_values.include?(val_to_check) raise 'Invalid value for "availability_anywhere", must be one of AVAILABLE, SELECTED, RESTRICTED, UNAVAILABLE.' end end end if opts[:sort_order] && !OCI::OsManagementHub::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::OsManagementHub::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/softwareSources' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:softwareSourceId] = opts[:software_source_id] if opts[:software_source_id] query_params[:softwareSourceType] = OCI::ApiClient.build_collection_params(opts[:software_source_type], :multi) if opts[:software_source_type] && !opts[:software_source_type].empty? query_params[:vendorName] = opts[:vendor_name] if opts[:vendor_name] query_params[:osFamily] = OCI::ApiClient.build_collection_params(opts[:os_family], :multi) if opts[:os_family] && !opts[:os_family].empty? query_params[:archType] = OCI::ApiClient.build_collection_params(opts[:arch_type], :multi) if opts[:arch_type] && !opts[:arch_type].empty? query_params[:availability] = OCI::ApiClient.build_collection_params(opts[:availability], :multi) if opts[:availability] && !opts[:availability].empty? query_params[:availabilityAtOci] = OCI::ApiClient.build_collection_params(opts[:availability_at_oci], :multi) if opts[:availability_at_oci] && !opts[:availability_at_oci].empty? query_params[:availabilityAnywhere] = OCI::ApiClient.build_collection_params(opts[:availability_anywhere], :multi) if opts[:availability_anywhere] && !opts[:availability_anywhere].empty? query_params[:isMandatoryForAutonomousLinux] = opts[:is_mandatory_for_autonomous_linux] if !opts[:is_mandatory_for_autonomous_linux].nil? query_params[:isMirrorSyncAllowed] = opts[:is_mirror_sync_allowed] if !opts[:is_mirror_sync_allowed].nil? query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:displayNameContains] = opts[:display_name_contains] if opts[:display_name_contains] query_params[:displayNameNotEqualTo] = OCI::ApiClient.build_collection_params(opts[:display_name_not_equal_to], :multi) if opts[:display_name_not_equal_to] && !opts[:display_name_not_equal_to].empty? query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty? # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#list_software_sources') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwareSourceCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
95 96 97 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 95 def logger @api_client.config.logger end |
#remove_packages_from_software_source(software_source_id, remove_packages_from_software_source_details, opts = {}) ⇒ Response
Click here to see an example of how to use remove_packages_from_software_source API.
Removes packages from a software source. This operation can only be done for custom software sources that are not created using filters. Packages can be of the format: * name (for example: git). This removes all versions of the package. * name-version-release.architecture (for example: git-2.43.5-1.el8_10.x86_64) * name-epoch:version-release.architecture (for example: git-0:2.43.5-1.el8_10.x86_64)
2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2235 def remove_packages_from_software_source(software_source_id, remove_packages_from_software_source_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#remove_packages_from_software_source.' if logger raise "Missing the required parameter 'software_source_id' when calling remove_packages_from_software_source." if software_source_id.nil? raise "Missing the required parameter 'remove_packages_from_software_source_details' when calling remove_packages_from_software_source." if remove_packages_from_software_source_details.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/actions/removePackages'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(remove_packages_from_software_source_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#remove_packages_from_software_source') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#replace_packages_in_software_source(software_source_id, replace_packages_in_software_source_details, opts = {}) ⇒ Response
Click here to see an example of how to use replace_packages_in_software_source API.
Replaces packages in a software source with the provided list of packages. This operation can only be done for custom software sources that are not created using filters. Packages can be of the format: * name (for example: git). If isLatestContentOnly is true, only the latest version of the package will be added, otherwise all versions of the package will be added. * name-version-release.architecture (for example: git-2.43.5-1.el8_10.x86_64) * name-epoch:version-release.architecture (for example: git-0:2.43.5-1.el8_10.x86_64)
2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2310 def replace_packages_in_software_source(software_source_id, replace_packages_in_software_source_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#replace_packages_in_software_source.' if logger raise "Missing the required parameter 'software_source_id' when calling replace_packages_in_software_source." if software_source_id.nil? raise "Missing the required parameter 'replace_packages_in_software_source_details' when calling replace_packages_in_software_source." if replace_packages_in_software_source_details.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/actions/replacePackages'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(replace_packages_in_software_source_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#replace_packages_in_software_source') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#search_software_source_module_streams(search_software_source_module_streams_details, opts = {}) ⇒ Response
Click here to see an example of how to use search_software_source_module_streams API.
Returns a list of module streams from the specified software sources. Filter the list against a variety of criteria including the module name.
2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2379 def search_software_source_module_streams(search_software_source_module_streams_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#search_software_source_module_streams.' if logger raise "Missing the required parameter 'search_software_source_module_streams_details' when calling search_software_source_module_streams." if search_software_source_module_streams_details.nil? path = '/softwareSourceModuleStreams/actions/search' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(search_software_source_module_streams_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#search_software_source_module_streams') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ModuleStreamCollection' ) end # rubocop:enable Metrics/BlockLength end |
#search_software_source_modules(search_software_source_modules_details, opts = {}) ⇒ Response
Click here to see an example of how to use search_software_source_modules API.
Lists modules from a list of software sources. Filter the list against a variety of criteria including the module name.
2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2446 def search_software_source_modules(search_software_source_modules_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#search_software_source_modules.' if logger raise "Missing the required parameter 'search_software_source_modules_details' when calling search_software_source_modules." if search_software_source_modules_details.nil? path = '/softwareSourceModules/actions/search' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(search_software_source_modules_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#search_software_source_modules') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::ModuleCollection' ) end # rubocop:enable Metrics/BlockLength end |
#search_software_source_package_groups(search_software_source_package_groups_details, opts = {}) ⇒ Response
Click here to see an example of how to use search_software_source_package_groups API.
Searches the package groups from the specified list of software sources. Filter the list against a variety of criteria including but not limited to its name, and group type.
2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2513 def search_software_source_package_groups(search_software_source_package_groups_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#search_software_source_package_groups.' if logger raise "Missing the required parameter 'search_software_source_package_groups_details' when calling search_software_source_package_groups." if search_software_source_package_groups_details.nil? path = '/softwareSourcePackageGroups/actions/search' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(search_software_source_package_groups_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#search_software_source_package_groups') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::PackageGroupCollection' ) end # rubocop:enable Metrics/BlockLength end |
#software_source_generate_metadata(software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use software_source_generate_metadata API.
Regenerates metadata for the specified custom software source.
2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2580 def (software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#software_source_generate_metadata.' if logger raise "Missing the required parameter 'software_source_id' when calling software_source_generate_metadata." if software_source_id.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/actions/generateMetadata'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#software_source_generate_metadata') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_software_source(software_source_id, update_software_source_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_software_source API.
Updates the specified software source's details, including but not limited to name, description, and tags.
2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2644 def update_software_source(software_source_id, update_software_source_details, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#update_software_source.' if logger raise "Missing the required parameter 'software_source_id' when calling update_software_source." if software_source_id.nil? raise "Missing the required parameter 'update_software_source_details' when calling update_software_source." if update_software_source_details.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_software_source_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#update_software_source') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwareSource' ) end # rubocop:enable Metrics/BlockLength end |
#update_software_source_manifest(update_software_source_manifest_details, software_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use update_software_source_manifest API.
Updates the package list document for the software source.
2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 |
# File 'lib/oci/os_management_hub/software_source_client.rb', line 2714 def update_software_source_manifest(update_software_source_manifest_details, software_source_id, opts = {}) logger.debug 'Calling operation SoftwareSourceClient#update_software_source_manifest.' if logger raise "Missing the required parameter 'update_software_source_manifest_details' when calling update_software_source_manifest." if update_software_source_manifest_details.nil? raise "Missing the required parameter 'software_source_id' when calling update_software_source_manifest." if software_source_id.nil? raise "Parameter value for 'software_source_id' must not be blank" if OCI::Internal::Util.blank_string?(software_source_id) path = '/softwareSources/{softwareSourceId}/manifest'.sub('{softwareSourceId}', software_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'content-type'] ||= 'application/octet-stream' header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(update_software_source_manifest_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'SoftwareSourceClient#update_software_source_manifest') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::OsManagementHub::Models::SoftwareSource' ) end # rubocop:enable Metrics/BlockLength end |