Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,62 @@ All notable changes to this project will be documented in this file.

The format is based on `Keep a Changelog <http://keepachangelog.com/>`__.

3.90.1 - 2026-08-04
-------------------
Added
~~~~~
* OpenSearch service

* Support for new optional parameter ``--nsg-id``

* ``oci opensearch cluster update --nsg-id``

* Self Service

* Support for Usage Based SaaS listings on Marketplace

* ``oci self partner-integeration create-subscription-usage-record-details submit-subscription-usage-batch``
* ``oci self partner-integeration create-subscription-usage-record-details submit-subscription-usage-records``
* ``oci self partner-integeration partner list``
* ``oci self subscription subscription cancel``

* Database Service

* Support for cloning Autonomous Container Databases from backup timestamp details

* ``oci db autonomous-container-database create-autonomous-container-database-create-autonomous-container-database-from-backup-timestamp-details``

* Support for retrieving Autonomous Container Database backups and listing Autonomous Databases in an Autonomous Container Database backup

* ``oci db autonomous-container-database-backup get``
* ``oci db autonomous-database-in-backup list-autonomous-databases-in-autonomous-container-database-backup``

* Support for new optional parameters when cloning an Autonomous Container Database from a backup ID

* ``oci db autonomous-container-database create-autonomous-container-database-create-autonomous-container-database-from-backup-details --autonomous-databases-to-clone --clone-band-width --clone-type``

* Support for a new optional parameter when listing Autonomous Database backups

* ``oci db autonomous-database-backup list --is-pitr-eligible``

* Support for enabling managed auto failover on existing Data Guard with multiple standby

* ``oci db database update --database-admin-password --protection-mode --transport-type --is-active-data-guard-enabled --auto-failover-configuration``
* ``oci db database list --managed-auto-failover --failover-targets``

* Marketplace Private Offer Service

* Support for the Marketplace Multi Party Private Offers feature

* ``oci marketplace-private-offer offer offer send``
* ``oci marketplace-private-offer offer offer withdraw``
* ``oci marketplace-private-offer offer-quote``
* ``oci marketplace-private-offer quote-attachment``

Security
~~~~~~~~
* Updated click dependency to `>=8.3.3,<=8.4.2` for python version `>3.11` per: https://www.cve.org/CVERecord?id=CVE-2026-7246

3.90.0 - 2026-07-28
-------------------
Added
Expand Down
28 changes: 27 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

from inspect import getsourcefile
from os.path import abspath
from packaging import version

try:
from importlib.metadata import version as pkg_version
except ImportError:
from importlib_metadata import version as pkg_version

this_file_path = abspath(getsourcefile(lambda: 0))
python_cli_root_dir = this_file_path[:-20]
Expand Down Expand Up @@ -194,7 +200,27 @@ def invoke(*args, **kwargs):
except TypeError:
new_output_bytes = cleaned_output
finally:
result = click.testing.Result(result.runner, new_output_bytes, result.stderr_bytes, result, result.exit_code, result.exception, result.exc_info)
if version.parse(pkg_version("click")) >= version.parse('8.2.0'):
result = click.testing.Result(
result.runner,
result.stdout_bytes,
result.stderr_bytes,
new_output_bytes,
result.return_value,
result.exit_code,
result.exception,
result.exc_info
)
else:
result = click.testing.Result(
result.runner,
new_output_bytes,
result.stderr_bytes,
result,
result.exit_code,
result.exception,
result.exc_info
)

return result

Expand Down
13 changes: 8 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ appdirs==1.4.3
arrow>=1.0.0,<2.0.0
certifi>=2025.1.31,<2026.0.0
cffi>=1.9.1,<=2.0.0
click<=8.1.2
click>=8.0.4,<=8.1.2; python_version < '3.11'
click>=8.3.3,<=8.4.2; python_version >= '3.11'
coverage==6.2; python_version < '3.9'
coverage==7.10.7; python_version >= '3.9'
cryptography>=3.2.1,<50.0.0
Expand All @@ -16,9 +17,10 @@ Jinja2>=3.1.5,<4.0.0; python_version >= '3.7'
jmespath>=0.10.0,<=1.0.1
ndg-httpsclient==0.4.2
mock==2.0.0
oci==2.183.0
packaging>=22.0,<25.0; python_version > '3.8'
packaging==20.2; python_version <= '3.8'
oci==2.184.0
packaging==20.2; python_version < '3.7'
packaging>=21.0,<25.0; python_version >= '3.7' and python_version < '3.9'
packaging>=22.0,<25.0; python_version >= '3.9'
pluggy==0.13.0; python_version < '3.9'
pluggy==1.6.0; python_version >= '3.9'
py==1.11.0
Expand All @@ -37,7 +39,8 @@ requests==2.27.0; python_version == '3.6'
requests==2.31.0; python_version == '3.7'
requests>=2.32.4,<3.0.0; python_version > '3.7'
six>=1.15.0,<2.0.0
sphinx==3.3.0; python_version < '3.13'
sphinx==3.3.0; python_version < '3.7'
sphinx==5.3.0; python_version >= '3.7' and python_version < '3.13'
sphinx==6.2.1; python_version == '3.13'
sphinx-rtd-theme==0.4.3
terminaltables==3.1.10
Expand Down
35 changes: 34 additions & 1 deletion services/database/src/oci_cli_database/database_cli_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ def create_database_from_backup(ctx, wait_for_state, max_wait_seconds, wait_inte
cli_util.render(database, None, ctx)


@cli_util.copy_params_from_generated_command(database_cli.update_database, params_to_exclude=['db_backup_config', 'managed_software_update_details'])
@cli_util.copy_params_from_generated_command(database_cli.update_database, params_to_exclude=['db_backup_config', 'auto_failover_configuration', 'managed_software_update_details'])
@database_cli.database_group.command(name='update', help="""Update a Database based on the request parameters you provide.""")
@cli_util.option('--msu-details', type=custom_types.CLI_COMPLEX_TYPE, help="""This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using
the file://path/to/file syntax.
Expand All @@ -1015,13 +1015,29 @@ def create_database_from_backup(ctx, wait_for_state, max_wait_seconds, wait_inte
@cli_util.option('--auto-full-backup-window', required=False, help="""Specifying a two hour slot when the full backup should kick in eg:- SLOT_ONE,SLOT_TWO. Default is anytime""")
@cli_util.option('--backup-destination', required=False, type=custom_types.CLI_COMPLEX_TYPE, help="""backup destination list""")
@cli_util.option('--zero-data-loss-enabled', required=False, type=click.BOOL, help=u"""Enable Zero Data loss feature""")
@cli_util.option('--manage-auto-failover', type=custom_types.CliCaseInsensitiveChoice(["ENABLE", "DISABLE"]), help=u"""The value to assign to the managed_auto_failover property of the standby to be created.
Allowed values for this property are: "ENABLE", "DISABLE".""")
@cli_util.option('--auto-failover-targets', type=click.STRING, help=u"""Defines auto failover targets for the current database. The value should be comma separated unique names of other data guard members.""")
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'backup-destination': {'module': 'database', 'class': 'list[BackupDestinationDetails]'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}}, output_type={'module': 'database', 'class': 'Database'})
@cli_util.wrap_exceptions
def update_database_extended(ctx, **kwargs):
if 'msu_details' in kwargs:
kwargs['managed_software_update_details'] = kwargs['msu_details']
kwargs.pop('msu_details')

database_auto_failover_details = {}
if 'manage_auto_failover' in kwargs and kwargs['manage_auto_failover']:
database_auto_failover_details['managed_auto_failover'] = kwargs['manage_auto_failover']
if 'auto_failover_targets' in kwargs and kwargs['auto_failover_targets'] is not None:
if kwargs['auto_failover_targets']:
database_auto_failover_details['failover_targets'] = kwargs['auto_failover_targets'].split(',')
else:
database_auto_failover_details['failover_targets'] = []

if database_auto_failover_details:
kwargs['auto_failover_configuration'] = json.dumps(database_auto_failover_details)

if kwargs['auto_backup_enabled'] is not None or kwargs['recovery_window_in_days'] is not None:
db_backup_config = {}
if 'auto_backup_window' in kwargs and kwargs['auto_backup_window'] and kwargs['auto_backup_enabled'] is not None:
Expand Down Expand Up @@ -1056,6 +1072,8 @@ def update_database_extended(ctx, **kwargs):
del kwargs['auto_full_backup_window']
del kwargs['backup_destination']
kwargs.pop('zero_data_loss_enabled', None)
del kwargs['manage_auto_failover']
del kwargs['auto_failover_targets']

ctx.invoke(database_cli.update_database, **kwargs)

Expand Down Expand Up @@ -4197,6 +4215,9 @@ def list_exadb_vm_clusters_extended(ctx, **kwargs):
@cli_util.option('--hsm-password', help=u"""Provide the HSM password as you would in RDBMS for External HSM.""")
@cli_util.option('--data-storage-size-in-gbs', type=click.INT, help=u"""Provide the DATA storage size, in gigabytes, that is applicable for the database.""")
@cli_util.option('--reco-storage-size-in-gbs', type=click.INT, help=u"""Provide the RECO storage size, in gigabytes, that is applicable for the database.""")
@cli_util.option('--manage-auto-failover', type=custom_types.CliCaseInsensitiveChoice(["ENABLE", "DISABLE"]), help=u"""The value to assign to the managed_auto_failover property of the standby to be created.
Allowed values for this property are: "ENABLE", "DISABLE".""")
@cli_util.option('--auto-failover-targets', type=click.STRING, help=u"""Defines auto failover targets for the current database. The value should be comma separated unique names of other data guard members.""")
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'database', 'class': 'DatabaseSummary'})
Expand Down Expand Up @@ -4254,6 +4275,18 @@ def create_standby_database_for_multiple_standby(ctx, wait_for_state, max_wait_s
if include_storage_details:
create_standby_details.storage_size_details = database_storage_size_details

database_auto_failover_details = oci.database.models.AutoFailoverConfiguration()
auto_failover_config_present = False
if 'manage_auto_failover' in kwargs and kwargs['manage_auto_failover']:
database_auto_failover_details.managed_auto_failover = kwargs['manage_auto_failover']
auto_failover_config_present = True
if 'auto_failover_targets' in kwargs and kwargs['auto_failover_targets']:
database_auto_failover_details.failover_targets = kwargs['auto_failover_targets'].split(',')
auto_failover_config_present = True

if auto_failover_config_present:
create_standby_details.auto_failover_configuration = database_auto_failover_details

_details['database'] = create_standby_details

if 'db_version' in kwargs and kwargs['db_version']:
Expand Down
Loading