From 1664b618de2b880f0c226bbb4eb78cce735bcae5 Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 15 Sep 2026 09:26:14 +0000 Subject: [PATCH] Releasing version 3.93.0 Co-authored-by: Harsh Kumar --- CHANGELOG.rst | 54 +++ requirements.txt | 2 +- .../generated/database_cli.py | 2 +- .../databasemigration_cli_extended.py | 62 +++ .../generated/databasemigration_cli.py | 394 +++++++++++++++++- .../test_databasemigration_cli_extended.py | 20 + .../tests/util/generated/command_to_api.py | 5 + .../src/oci_cli_sddc/generated/sddc_cli.py | 56 +++ .../generated/postgresql_cli.py | 16 +- .../generated/partnerintegeration_cli.py | 123 +++++- setup.py | 2 +- src/oci_cli/version.py | 2 +- 12 files changed, 716 insertions(+), 22 deletions(-) create mode 100644 services/database_migration/tests/unit/test_databasemigration_cli_extended.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f4a17c791..88272026b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,60 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `__. +3.93.0 - 2026-09-15 +------------------- +Added +~~~~~ +* Database Service + + * Support for Basic Data Validation in Database Migration Service + + * ``oci database-migration migration data-verification get-detail --migration-id`` + * ``oci database-migration migration data-verification list-object-type-counts --compartment-id --migration-id`` + * ``oci database-migration migration data-verification list-table-row-counts --compartment-id --migration-id`` + * ``oci database-migration migration data-verification list-object-statuses --compartment-id --migration-id`` + * ``oci database-migration migration data-verification run --migration-id --type`` + * ``oci database-migration migration data-verification run-default --migration-id`` + + * Support for new optional parameters ``--migration-settings`` + + * ``oci database-migration migration clone-oracle-migration`` + * ``oci database-migration migration create-oracle-migration`` + * ``oci database-migration migration update-oracle-migration`` + +* SELF Service + + * Support for Usage Based SaaS listings on Marketplace + + * ``oci self partner-integeration listing-subs-collection listing-subscriptions-deprecated`` + * ``oci self partner-integeration partner-subscription activate-subscription-deprecated`` + * ``oci self partner-integeration partner-subscription resolve-subscription-deprecated`` + +* Oracle Cloud VMware Solution + + * Support for configurable initial fault domain host distribution + + * ``oci ocvs cluster create --initial-fault-domain-host-distribution`` + * ``oci ocvs esxi-host create --initial-fault-domain-host-distribution`` + * ``oci ocvs esxi-host inplace-upgrade --initial-fault-domain-host-distribution`` + * ``oci ocvs esxi-host replace-host --initial-fault-domain-host-distribution`` + * ``oci ocvs cluster generate-host-distribution-report`` + + * Support for VMware Binary Distribution + + * ``oci ocvs sddc retrieve-vmware-binaries --sddc-id`` + * ``oci ocvs sddc generate-vmware-binary-download-info --sddc-id --vmware-binary-file-name`` + +* PGSQL Control Plane + + * Support for new optional parameters ``--kms-key-ids`` + + * ``oci psql backup backup-copy`` + + * Support for new optional parameters ``--storage-details-kms-key-id`` + + * ``oci psql db-system create-db-system-oci-optimized-storage-details`` + 3.92.1 - 2026-09-08 ------------------- Added diff --git a/requirements.txt b/requirements.txt index 456fc3fde..265e7f589 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ jmespath>=0.10.0,<=1.0.1 importlib-metadata; python_version < '3.8' ndg-httpsclient==0.4.2 mock==2.0.0 -oci==2.185.2 +oci==2.186.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' diff --git a/services/database/src/oci_cli_database/generated/database_cli.py b/services/database/src/oci_cli_database/generated/database_cli.py index 4af156094..d8de3bbdb 100644 --- a/services/database/src/oci_cli_database/generated/database_cli.py +++ b/services/database/src/oci_cli_database/generated/database_cli.py @@ -30073,7 +30073,7 @@ def list_flex_components(ctx, from_json, all_pages, page_size, compartment_id, n @gi_home_group.command(name=cli_util.override('db.list_gi_homes.command_name', 'list'), help=u"""Lists the Grid Infrastructure Homes. \n[Command Reference](listGiHomes)""") @cli_util.option('--compartment-id', required=True, help=u"""The compartment [OCID].""") -@cli_util.option('--db-system-id', help=u"""The DB system [OCID]. If provided, filters the results to the set of gi home versions which are supported for the DB system.""") +@cli_util.option('--db-system-id', help=u"""The DB system [OCID]. If provided, filters the results to the set of database versions which are supported for the DB system.""") @cli_util.option('--gi-version', help=u"""The Grid Infrastructure version. If provided, filters the results matching the provided grid infrastructure version.""") @cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return per page.""") @cli_util.option('--page', help=u"""The pagination token to continue listing from.""") diff --git a/services/database_migration/src/oci_cli_database_migration/databasemigration_cli_extended.py b/services/database_migration/src/oci_cli_database_migration/databasemigration_cli_extended.py index 26aaf77d3..ffe71ea6b 100644 --- a/services/database_migration/src/oci_cli_database_migration/databasemigration_cli_extended.py +++ b/services/database_migration/src/oci_cli_database_migration/databasemigration_cli_extended.py @@ -32,6 +32,7 @@ from oci_cli import custom_types # noqa: F401 from oci_cli import json_skeleton_utils # noqa: F401 from oci_cli import cli_exceptions +from oci_cli.aliasing import CommandGroupWithAlias # oci database-migration agent-image-summary -> oci database-migration agent-image @@ -395,3 +396,64 @@ def create_connection_create_oracle_connection_details_extended(ctx, **kwargs): raise click.ClickException(str(e)) ctx.invoke(databasemigration_cli.create_connection_create_oracle_connection_details, **kwargs) + + +# oci database-migration data-verification-detail get -> oci database-migration data-verification-detail get-detail +cli_util.rename_command(databasemigration_cli, databasemigration_cli.data_verification_detail_group, databasemigration_cli.get_data_verification_detail, "get-detail") + + +# oci database-migration data-verification-object-status-collection list-data-verification-object-statuses -> oci database-migration data-verification-object-status-collection list-object-statuses +cli_util.rename_command(databasemigration_cli, databasemigration_cli.data_verification_object_status_collection_group, databasemigration_cli.list_data_verification_object_statuses, "list-object-statuses") + + +# oci database-migration data-verification-object-type-count-collection list-data-verification-object-type-counts -> oci database-migration data-verification-object-type-count-collection list-object-type-counts +cli_util.rename_command(databasemigration_cli, databasemigration_cli.data_verification_object_type_count_collection_group, databasemigration_cli.list_data_verification_object_type_counts, "list-object-type-counts") + + +# oci database-migration data-verification-table-row-count-collection list-data-verification-table-row-counts -> oci database-migration data-verification-table-row-count-collection list-table-row-counts +cli_util.rename_command(databasemigration_cli, databasemigration_cli.data_verification_table_row_count_collection_group, databasemigration_cli.list_data_verification_table_row_counts, "list-table-row-counts") + + +# oci database-migration migration run-data-verification -> oci database-migration migration run +cli_util.rename_command(databasemigration_cli, databasemigration_cli.migration_group, databasemigration_cli.run_data_verification, "run") + + +# oci database-migration migration run-data-verification-default-run-data-verification-details -> oci database-migration migration run-default +cli_util.rename_command(databasemigration_cli, databasemigration_cli.migration_group, databasemigration_cli.run_data_verification_default_run_data_verification_details, "run-default") + + +# oci database-migration migration data-verification +@click.command('data-verification', cls=CommandGroupWithAlias, help="""Data Verification commands for a migration.""") +@cli_util.help_option_group +def data_verification_group(): + pass + + +databasemigration_cli.migration_group.add_command(data_verification_group) + + +# Move the renamed Data Verification commands under migration data-verification. +databasemigration_cli.data_verification_detail_group.commands.pop(databasemigration_cli.get_data_verification_detail.name) +data_verification_group.add_command(databasemigration_cli.get_data_verification_detail) + +databasemigration_cli.data_verification_object_status_collection_group.commands.pop(databasemigration_cli.list_data_verification_object_statuses.name) +data_verification_group.add_command(databasemigration_cli.list_data_verification_object_statuses) + +databasemigration_cli.data_verification_object_type_count_collection_group.commands.pop(databasemigration_cli.list_data_verification_object_type_counts.name) +data_verification_group.add_command(databasemigration_cli.list_data_verification_object_type_counts) + +databasemigration_cli.data_verification_table_row_count_collection_group.commands.pop(databasemigration_cli.list_data_verification_table_row_counts.name) +data_verification_group.add_command(databasemigration_cli.list_data_verification_table_row_counts) + +databasemigration_cli.migration_group.commands.pop(databasemigration_cli.run_data_verification.name) +data_verification_group.add_command(databasemigration_cli.run_data_verification) + +databasemigration_cli.migration_group.commands.pop(databasemigration_cli.run_data_verification_default_run_data_verification_details.name) +data_verification_group.add_command(databasemigration_cli.run_data_verification_default_run_data_verification_details) + + +# Remove the generated root groups after their commands have moved. +databasemigration_cli.database_migration_root_group.commands.pop(databasemigration_cli.data_verification_detail_group.name) +databasemigration_cli.database_migration_root_group.commands.pop(databasemigration_cli.data_verification_object_status_collection_group.name) +databasemigration_cli.database_migration_root_group.commands.pop(databasemigration_cli.data_verification_object_type_count_collection_group.name) +databasemigration_cli.database_migration_root_group.commands.pop(databasemigration_cli.data_verification_table_row_count_collection_group.name) diff --git a/services/database_migration/src/oci_cli_database_migration/generated/databasemigration_cli.py b/services/database_migration/src/oci_cli_database_migration/generated/databasemigration_cli.py index 4d7135d20..26c6295e9 100644 --- a/services/database_migration/src/oci_cli_database_migration/generated/databasemigration_cli.py +++ b/services/database_migration/src/oci_cli_database_migration/generated/databasemigration_cli.py @@ -28,6 +28,12 @@ def assessor_check_group(): pass +@click.command(cli_util.override('database_migration.data_verification_object_status_collection_group.command_name', 'data-verification-object-status-collection'), cls=CommandGroupWithAlias, help="""Results of an Object Status listing.""") +@cli_util.help_option_group +def data_verification_object_status_collection_group(): + pass + + @click.command(cli_util.override('database_migration.assessment_summary_group.command_name', 'assessment-summary'), cls=CommandGroupWithAlias, help="""Assessment Summary resource""") @cli_util.help_option_group def assessment_summary_group(): @@ -106,12 +112,24 @@ def connection_group(): pass +@click.command(cli_util.override('database_migration.data_verification_detail_group.command_name', 'data-verification-detail'), cls=CommandGroupWithAlias, help="""Summary/status information used to enable and drive the Data Verification UI.""") +@cli_util.help_option_group +def data_verification_detail_group(): + pass + + @click.command(cli_util.override('database_migration.assessment_object_type_summary_group.command_name', 'assessment-object-type-summary'), cls=CommandGroupWithAlias, help="""Assessment Object Type""") @cli_util.help_option_group def assessment_object_type_summary_group(): pass +@click.command(cli_util.override('database_migration.data_verification_object_type_count_collection_group.command_name', 'data-verification-object-type-count-collection'), cls=CommandGroupWithAlias, help="""Results of an Object Type Count Comparison listing.""") +@cli_util.help_option_group +def data_verification_object_type_count_collection_group(): + pass + + @click.command(cli_util.override('database_migration.assessor_check_summary_group.command_name', 'assessor-check-summary'), cls=CommandGroupWithAlias, help="""Assessor Check Summary""") @cli_util.help_option_group def assessor_check_summary_group(): @@ -142,6 +160,12 @@ def excluded_object_summary_group(): pass +@click.command(cli_util.override('database_migration.data_verification_table_row_count_collection_group.command_name', 'data-verification-table-row-count-collection'), cls=CommandGroupWithAlias, help="""Results of a Table Row Count Comparison listing.""") +@cli_util.help_option_group +def data_verification_table_row_count_collection_group(): + pass + + @click.command(cli_util.override('database_migration.assessor_summary_group.command_name', 'assessor-summary'), cls=CommandGroupWithAlias, help="""Assessor Summary""") @cli_util.help_option_group def assessor_summary_group(): @@ -185,6 +209,7 @@ def binary_group(): database_migration_root_group.add_command(assessor_check_group) +database_migration_root_group.add_command(data_verification_object_status_collection_group) database_migration_root_group.add_command(assessment_summary_group) database_migration_root_group.add_command(assessor_group) database_migration_root_group.add_command(work_request_summary_group) @@ -198,12 +223,15 @@ def binary_group(): database_migration_root_group.add_command(migration_object_type_summary_group) database_migration_root_group.add_command(work_request_error_group) database_migration_root_group.add_command(connection_group) +database_migration_root_group.add_command(data_verification_detail_group) database_migration_root_group.add_command(assessment_object_type_summary_group) +database_migration_root_group.add_command(data_verification_object_type_count_collection_group) database_migration_root_group.add_command(assessor_check_summary_group) database_migration_root_group.add_command(assessment_object_collection_group) database_migration_root_group.add_command(migration_object_collection_group) database_migration_root_group.add_command(work_request_log_entry_group) database_migration_root_group.add_command(excluded_object_summary_group) +database_migration_root_group.add_command(data_verification_table_row_count_collection_group) database_migration_root_group.add_command(assessor_summary_group) database_migration_root_group.add_command(job_summary_group) database_migration_root_group.add_command(migration_group) @@ -900,18 +928,19 @@ def clone_migration(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter @cli_util.option('--assessment-id', help=u"""The OCID of the resource being referenced.""") @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--migration-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--source-container-database-connection-id', help=u"""The OCID of the resource being referenced.""") @cli_util.option('--source-standby-database-connection-id', help=u"""The OCID of the resource being referenced.""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}}) +@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'migration-settings': {'module': 'database_migration', 'class': 'CloneOracleMigrationSettings'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'database_migration', 'class': 'Migration'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'migration-settings': {'module': 'database_migration', 'class': 'CloneOracleMigrationSettings'}}, output_type={'module': 'database_migration', 'class': 'Migration'}) @cli_util.wrap_exceptions -def clone_migration_oracle_clone_migration_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, migration_id, source_database_connection_id, target_database_connection_id, display_name, compartment_id, assessment_id, freeform_tags, defined_tags, source_container_database_connection_id, source_standby_database_connection_id, if_match): +def clone_migration_oracle_clone_migration_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, migration_id, source_database_connection_id, target_database_connection_id, display_name, compartment_id, assessment_id, freeform_tags, defined_tags, migration_settings, source_container_database_connection_id, source_standby_database_connection_id, if_match): if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') @@ -940,6 +969,9 @@ def clone_migration_oracle_clone_migration_details(ctx, from_json, wait_for_stat if defined_tags is not None: _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + if migration_settings is not None: + _details['migrationSettings'] = cli_util.parse_json_parameter("migration_settings", migration_settings) + if source_container_database_connection_id is not None: _details['sourceContainerDatabaseConnectionId'] = source_container_database_connection_id @@ -2028,6 +2060,7 @@ def create_migration_create_my_sql_migration_details(ctx, from_json, wait_for_st @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--assessment-id', help=u"""The OCID of the resource being referenced.""") +@cli_util.option('--migration-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--data-transfer-medium-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--initial-load-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--advisor-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -2048,12 +2081,12 @@ def create_migration_create_my_sql_migration_details(ctx, from_json, wait_for_st @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'CreateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'CreateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'CreateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'CreateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'CreateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}, 'exclude-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}, 'include-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}}) +@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'migration-settings': {'module': 'database_migration', 'class': 'CreateOracleMigrationSettings'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'CreateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'CreateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'CreateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'CreateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'CreateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}, 'exclude-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}, 'include-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'CreateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'CreateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'CreateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'CreateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'CreateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}, 'exclude-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}, 'include-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}}, output_type={'module': 'database_migration', 'class': 'Migration'}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'migration-settings': {'module': 'database_migration', 'class': 'CreateOracleMigrationSettings'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'CreateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'CreateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'CreateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'CreateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'CreateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}, 'exclude-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}, 'include-objects': {'module': 'database_migration', 'class': 'list[OracleDatabaseObject]'}}, output_type={'module': 'database_migration', 'class': 'Migration'}) @cli_util.wrap_exceptions -def create_migration_create_oracle_migration_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, type, description, display_name, source_database_connection_id, target_database_connection_id, freeform_tags, defined_tags, assessment_id, data_transfer_medium_details, initial_load_settings, advisor_settings, hub_details, ggs_details, advanced_parameters, source_container_database_connection_id, source_standby_database_connection_id, exclude_objects, include_objects, bulk_include_exclude_data): +def create_migration_create_oracle_migration_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, type, description, display_name, source_database_connection_id, target_database_connection_id, freeform_tags, defined_tags, assessment_id, migration_settings, data_transfer_medium_details, initial_load_settings, advisor_settings, hub_details, ggs_details, advanced_parameters, source_container_database_connection_id, source_standby_database_connection_id, exclude_objects, include_objects, bulk_include_exclude_data): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -2083,6 +2116,9 @@ def create_migration_create_oracle_migration_details(ctx, from_json, wait_for_st if assessment_id is not None: _details['assessmentId'] = assessment_id + if migration_settings is not None: + _details['migrationSettings'] = cli_util.parse_json_parameter("migration_settings", migration_settings) + if data_transfer_medium_details is not None: _details['dataTransferMediumDetails'] = cli_util.parse_json_parameter("data_transfer_medium_details", data_transfer_medium_details) @@ -2720,6 +2756,31 @@ def get_connection(ctx, from_json, connection_id): cli_util.render_response(result, ctx) +@data_verification_detail_group.command(name=cli_util.override('database_migration.get_data_verification_detail.command_name', 'get'), help=u"""Returns availability and report status information used by the Data Verification UI. \n[Command Reference](getDataVerificationDetail)""") +@cli_util.option('--migration-id', required=True, help=u"""The OCID of the migration""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_migration', 'class': 'DataVerificationDetail'}) +@cli_util.wrap_exceptions +def get_data_verification_detail(ctx, from_json, migration_id, if_match): + + if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: + raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('database_migration', 'database_migration', ctx) + result = client.get_data_verification_detail( + migration_id=migration_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @job_group.command(name=cli_util.override('database_migration.get_job.command_name', 'get'), help=u"""Get a migration job. \n[Command Reference](getJob)""") @cli_util.option('--job-id', required=True, help=u"""The OCID of the job""") @json_skeleton_utils.get_cli_json_input_option({}) @@ -3469,6 +3530,251 @@ def list_connections(ctx, from_json, all_pages, page_size, compartment_id, techn cli_util.render_response(result, ctx) +@data_verification_object_status_collection_group.command(name=cli_util.override('database_migration.list_data_verification_object_statuses.command_name', 'list-data-verification-object-statuses'), help=u"""Lists per-object status comparison results for a migration. + +The `objectType` filter is a database-specific string and is validated by the backend. \n[Command Reference](listDataVerificationObjectStatuses)""") +@cli_util.option('--migration-id', required=True, help=u"""The OCID of the migration""") +@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""") +@cli_util.option('--owner', help=u"""A filter to return only results for a specific owner.""") +@cli_util.option('--object-type', help=u"""A filter to return only results for a specific object type. + +The allowed values depend on the migration's `databaseCombination`: - Oracle migrations: `OracleDatabaseObjectTypes` - MySQL migrations: `MySqlDatabaseObjectTypes`""") +@cli_util.option('--filter', help=u"""Free-text filter applied by the service to relevant fields for the report.""") +@cli_util.option('--is-match', type=click.BOOL, help=u"""Match filter for object status results. + +When `true`, returns only rows where source and target match. When `false`, returns only rows with mismatches. When omitted, returns all rows, ordered by mismatch first.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") +@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["isMatch", "owner", "objectType", "objectName"]), help=u"""The field to sort by. Only one sort order may be provided. By default, non-matching object statuses are returned first, followed by matching statuses. Rows with the same match result are then sorted by owner, object type, and object name.""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") +@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""") +@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_migration', 'class': 'DataVerificationObjectStatusCollection'}) +@cli_util.wrap_exceptions +def list_data_verification_object_statuses(ctx, from_json, all_pages, page_size, migration_id, compartment_id, if_match, name, owner, object_type, filter, is_match, limit, page, sort_by, sort_order): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: + raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + if name is not None: + kwargs['name'] = name + if owner is not None: + kwargs['owner'] = owner + if object_type is not None: + kwargs['object_type'] = object_type + if filter is not None: + kwargs['filter'] = filter + if is_match is not None: + kwargs['is_match'] = is_match + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + if sort_by is not None: + kwargs['sort_by'] = sort_by + if sort_order is not None: + kwargs['sort_order'] = sort_order + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('database_migration', 'database_migration', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_data_verification_object_statuses, + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_data_verification_object_statuses, + limit, + page_size, + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + else: + result = client.list_data_verification_object_statuses( + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@data_verification_object_type_count_collection_group.command(name=cli_util.override('database_migration.list_data_verification_object_type_counts.command_name', 'list-data-verification-object-type-counts'), help=u"""Lists object type count comparison results for a migration. + +The `objectType` filter is a database-specific string and is validated by the backend. \n[Command Reference](listDataVerificationObjectTypeCounts)""") +@cli_util.option('--migration-id', required=True, help=u"""The OCID of the migration""") +@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--schema-name', help=u"""A filter to return only results for a specific schema/owner.""") +@cli_util.option('--object-type', help=u"""A filter to return only results for a specific object type. + +The allowed values depend on the migration's `databaseCombination`: - Oracle migrations: `OracleDatabaseObjectTypes` - MySQL migrations: `MySqlDatabaseObjectTypes`""") +@cli_util.option('--filter', help=u"""Free-text filter applied by the service to relevant fields for the report.""") +@cli_util.option('--min-abs-delta-percent', help=u"""Minimum absolute deltaPercent threshold (magnitude) to return. The service filters results where `abs(deltaPercent) >= minAbsDeltaPercent`. Must be non-negative. + +Note: This filter applies to the object type counts report, which uses `deltaPercent`. Table row count reports use `variancePercent` instead.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") +@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["deltaPercent", "schemaName", "objectType", "sourceObjectCount", "targetObjectCount", "sourceInvalidCount", "targetInvalidCount"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for deltaPercent is descending.""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") +@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""") +@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_migration', 'class': 'DataVerificationObjectTypeCountCollection'}) +@cli_util.wrap_exceptions +def list_data_verification_object_type_counts(ctx, from_json, all_pages, page_size, migration_id, compartment_id, if_match, schema_name, object_type, filter, min_abs_delta_percent, limit, page, sort_by, sort_order): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: + raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + if schema_name is not None: + kwargs['schema_name'] = schema_name + if object_type is not None: + kwargs['object_type'] = object_type + if filter is not None: + kwargs['filter'] = filter + if min_abs_delta_percent is not None: + kwargs['min_abs_delta_percent'] = min_abs_delta_percent + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + if sort_by is not None: + kwargs['sort_by'] = sort_by + if sort_order is not None: + kwargs['sort_order'] = sort_order + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('database_migration', 'database_migration', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_data_verification_object_type_counts, + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_data_verification_object_type_counts, + limit, + page_size, + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + else: + result = client.list_data_verification_object_type_counts( + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@data_verification_table_row_count_collection_group.command(name=cli_util.override('database_migration.list_data_verification_table_row_counts.command_name', 'list-data-verification-table-row-counts'), help=u"""Lists table row count comparison results for a migration. \n[Command Reference](listDataVerificationTableRowCounts)""") +@cli_util.option('--migration-id', required=True, help=u"""The OCID of the migration""") +@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@cli_util.option('--owner', help=u"""A filter to return only results for a specific owner.""") +@cli_util.option('--table-name', help=u"""A filter to return only results for a specific table.""") +@cli_util.option('--filter', help=u"""Free-text filter applied by the service to relevant fields for the report.""") +@cli_util.option('--min-abs-delta-percent', help=u"""Minimum absolute deltaPercent threshold (magnitude) to return. The service filters results where `abs(deltaPercent) >= minAbsDeltaPercent`. Must be non-negative. + +Note: This filter applies to the object type counts report, which uses `deltaPercent`. Table row count reports use `variancePercent` instead.""") +@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""") +@cli_util.option('--page', help=u"""The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["variancePercent", "owner", "tableName", "timeLastSourceStatisticsCollection", "timeLastTargetStatisticsCollection", "sourceRowCount", "targetRowCount"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for variancePercent is descending.""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'asc' or 'desc'.""") +@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""") +@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_migration', 'class': 'DataVerificationTableRowCountCollection'}) +@cli_util.wrap_exceptions +def list_data_verification_table_row_counts(ctx, from_json, all_pages, page_size, migration_id, compartment_id, if_match, owner, table_name, filter, min_abs_delta_percent, limit, page, sort_by, sort_order): + + if all_pages and limit: + raise click.UsageError('If you provide the --all option you cannot provide the --limit option') + + if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: + raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + if owner is not None: + kwargs['owner'] = owner + if table_name is not None: + kwargs['table_name'] = table_name + if filter is not None: + kwargs['filter'] = filter + if min_abs_delta_percent is not None: + kwargs['min_abs_delta_percent'] = min_abs_delta_percent + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + if sort_by is not None: + kwargs['sort_by'] = sort_by + if sort_order is not None: + kwargs['sort_order'] = sort_order + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('database_migration', 'database_migration', ctx) + if all_pages: + if page_size: + kwargs['limit'] = page_size + + result = cli_util.list_call_get_all_results( + client.list_data_verification_table_row_counts, + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + elif limit is not None: + result = cli_util.list_call_get_up_to_limit( + client.list_data_verification_table_row_counts, + limit, + page_size, + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + else: + result = client.list_data_verification_table_row_counts( + migration_id=migration_id, + compartment_id=compartment_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @database_connection_type_summary_group.command(name=cli_util.override('database_migration.list_database_connection_type.command_name', 'list-database-connection-type'), help=u"""List supported Database Types, Sub-types and Versions. \n[Command Reference](listDatabaseConnectionType)""") @cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""") @cli_util.option('--technology-type', type=custom_types.CliCaseInsensitiveChoice(["OCI_AUTONOMOUS_DATABASE", "OCI_MYSQL", "ORACLE_DATABASE", "ORACLE_EXADATA", "AMAZON_RDS_ORACLE", "AMAZON_AURORA_MYSQL", "AMAZON_RDS_MYSQL", "AZURE_MYSQL", "GOOGLE_CLOUD_SQL_MYSQL", "MYSQL_SERVER"]), multiple=True, help=u"""The array of technology types.""") @@ -4735,6 +5041,68 @@ def retrieve_supported_phases(ctx, from_json, migration_id): cli_util.render_response(result, ctx) +@migration_group.command(name=cli_util.override('database_migration.run_data_verification.command_name', 'run-data-verification'), help=u"""Runs Data Verification for a migration and returns the updated Data Verification summary. \n[Command Reference](runDataVerification)""") +@cli_util.option('--migration-id', required=True, help=u"""The OCID of the migration""") +@cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["DEFAULT"]), help=u"""The type discriminator for Run Data Verification details.""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_migration', 'class': 'DataVerificationDetail'}) +@cli_util.wrap_exceptions +def run_data_verification(ctx, from_json, migration_id, type, if_match): + + if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: + raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['type'] = type + + client = cli_util.build_client('database_migration', 'database_migration', ctx) + result = client.run_data_verification( + migration_id=migration_id, + run_data_verification_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@migration_group.command(name=cli_util.override('database_migration.run_data_verification_default_run_data_verification_details.command_name', 'run-data-verification-default-run-data-verification-details'), help=u"""Runs Data Verification for a migration and returns the updated Data Verification summary. \n[Command Reference](runDataVerification)""") +@cli_util.option('--migration-id', required=True, help=u"""The OCID of the migration""") +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database_migration', 'class': 'DataVerificationDetail'}) +@cli_util.wrap_exceptions +def run_data_verification_default_run_data_verification_details(ctx, from_json, migration_id, if_match): + + if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: + raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + + _details['type'] = 'DEFAULT' + + client = cli_util.build_client('database_migration', 'database_migration', ctx) + result = client.run_data_verification( + migration_id=migration_id, + run_data_verification_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + @job_group.command(name=cli_util.override('database_migration.start_migration.command_name', 'start-migration'), help=u"""Start Migration job. \n[Command Reference](startMigration)""") @cli_util.option('--migration-id', required=True, help=u"""The OCID of the migration""") @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @@ -6214,6 +6582,7 @@ def update_migration_update_my_sql_migration_details(ctx, from_json, force, wait @cli_util.option('--target-database-connection-id', help=u"""The OCID of the resource being referenced.""") @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--migration-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--data-transfer-medium-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--initial-load-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--advisor-settings', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @@ -6229,18 +6598,18 @@ def update_migration_update_my_sql_migration_details(ctx, from_json, force, wait @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'UpdateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'UpdateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'UpdateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'UpdateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'UpdateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}}) +@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'migration-settings': {'module': 'database_migration', 'class': 'UpdateOracleMigrationSettings'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'UpdateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'UpdateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'UpdateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'UpdateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'UpdateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'UpdateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'UpdateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'UpdateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'UpdateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'UpdateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'database_migration', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'database_migration', 'class': 'dict(str, dict(str, object))'}, 'migration-settings': {'module': 'database_migration', 'class': 'UpdateOracleMigrationSettings'}, 'data-transfer-medium-details': {'module': 'database_migration', 'class': 'UpdateOracleDataTransferMediumDetails'}, 'initial-load-settings': {'module': 'database_migration', 'class': 'UpdateOracleInitialLoadSettings'}, 'advisor-settings': {'module': 'database_migration', 'class': 'UpdateOracleAdvisorSettings'}, 'hub-details': {'module': 'database_migration', 'class': 'UpdateGoldenGateHubDetails'}, 'ggs-details': {'module': 'database_migration', 'class': 'UpdateOracleGgsDeploymentDetails'}, 'advanced-parameters': {'module': 'database_migration', 'class': 'list[MigrationParameterDetails]'}}) @cli_util.wrap_exceptions -def update_migration_update_oracle_migration_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, migration_id, description, type, display_name, source_database_connection_id, target_database_connection_id, freeform_tags, defined_tags, data_transfer_medium_details, initial_load_settings, advisor_settings, hub_details, ggs_details, advanced_parameters, source_container_database_connection_id, source_standby_database_connection_id, if_match): +def update_migration_update_oracle_migration_details(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, migration_id, description, type, display_name, source_database_connection_id, target_database_connection_id, freeform_tags, defined_tags, migration_settings, data_transfer_medium_details, initial_load_settings, advisor_settings, hub_details, ggs_details, advanced_parameters, source_container_database_connection_id, source_standby_database_connection_id, if_match): if isinstance(migration_id, six.string_types) and len(migration_id.strip()) == 0: raise click.UsageError('Parameter --migration-id cannot be whitespace or empty string') if not force: - if freeform_tags or defined_tags or data_transfer_medium_details or initial_load_settings or advisor_settings or hub_details or ggs_details or advanced_parameters: - if not click.confirm("WARNING: Updates to freeform-tags and defined-tags and data-transfer-medium-details and initial-load-settings and advisor-settings and hub-details and ggs-details and advanced-parameters will replace any existing values. Are you sure you want to continue?"): + if freeform_tags or defined_tags or migration_settings or data_transfer_medium_details or initial_load_settings or advisor_settings or hub_details or ggs_details or advanced_parameters: + if not click.confirm("WARNING: Updates to freeform-tags and defined-tags and migration-settings and data-transfer-medium-details and initial-load-settings and advisor-settings and hub-details and ggs-details and advanced-parameters will replace any existing values. Are you sure you want to continue?"): ctx.abort() kwargs = {} @@ -6271,6 +6640,9 @@ def update_migration_update_oracle_migration_details(ctx, from_json, force, wait if defined_tags is not None: _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + if migration_settings is not None: + _details['migrationSettings'] = cli_util.parse_json_parameter("migration_settings", migration_settings) + if data_transfer_medium_details is not None: _details['dataTransferMediumDetails'] = cli_util.parse_json_parameter("data_transfer_medium_details", data_transfer_medium_details) diff --git a/services/database_migration/tests/unit/test_databasemigration_cli_extended.py b/services/database_migration/tests/unit/test_databasemigration_cli_extended.py new file mode 100644 index 000000000..ff9ade59d --- /dev/null +++ b/services/database_migration/tests/unit/test_databasemigration_cli_extended.py @@ -0,0 +1,20 @@ +# coding: utf-8 +# Copyright (c) 2026, Oracle and/or its affiliates. + +import unittest + +from click.testing import CliRunner +from oci_cli.cli_root import cli + + +class TestDatabaseMigrationCliExtended(unittest.TestCase): + def test_data_verification_group(self): + result = CliRunner().invoke(cli, ['database-migration', 'migration', 'data-verification', '--help']) + + assert result.exit_code == 0 + assert 'get-detail' in result.output + assert 'list-object-statuses' in result.output + assert 'list-object-type-counts' in result.output + assert 'list-table-row-counts' in result.output + assert 'run' in result.output + assert 'run-default' in result.output diff --git a/services/database_migration/tests/util/generated/command_to_api.py b/services/database_migration/tests/util/generated/command_to_api.py index 541023a33..75603fe75 100644 --- a/services/database_migration/tests/util/generated/command_to_api.py +++ b/services/database_migration/tests/util/generated/command_to_api.py @@ -27,6 +27,7 @@ "database_migration.get_assessor": "oci.database_migration.DatabaseMigrationClient.get_assessor", "database_migration.get_assessor_check": "oci.database_migration.DatabaseMigrationClient.get_assessor_check", "database_migration.get_connection": "oci.database_migration.DatabaseMigrationClient.get_connection", + "database_migration.get_data_verification_detail": "oci.database_migration.DatabaseMigrationClient.get_data_verification_detail", "database_migration.get_job": "oci.database_migration.DatabaseMigrationClient.get_job", "database_migration.get_job_output_content": "oci.database_migration.DatabaseMigrationClient.get_job_output_content", "database_migration.get_migration": "oci.database_migration.DatabaseMigrationClient.get_migration", @@ -42,6 +43,9 @@ "database_migration.list_assessor_checks": "oci.database_migration.DatabaseMigrationClient.list_assessor_checks", "database_migration.list_assessors": "oci.database_migration.DatabaseMigrationClient.list_assessors", "database_migration.list_connections": "oci.database_migration.DatabaseMigrationClient.list_connections", + "database_migration.list_data_verification_object_statuses": "oci.database_migration.DatabaseMigrationClient.list_data_verification_object_statuses", + "database_migration.list_data_verification_object_type_counts": "oci.database_migration.DatabaseMigrationClient.list_data_verification_object_type_counts", + "database_migration.list_data_verification_table_row_counts": "oci.database_migration.DatabaseMigrationClient.list_data_verification_table_row_counts", "database_migration.list_database_connection_type": "oci.database_migration.DatabaseMigrationClient.list_database_connection_type", "database_migration.list_excluded_objects": "oci.database_migration.DatabaseMigrationClient.list_excluded_objects", "database_migration.list_job_outputs": "oci.database_migration.DatabaseMigrationClient.list_job_outputs", @@ -62,6 +66,7 @@ "database_migration.remove_migration_objects": "oci.database_migration.DatabaseMigrationClient.remove_migration_objects", "database_migration.resume_job": "oci.database_migration.DatabaseMigrationClient.resume_job", "database_migration.retrieve_supported_phases": "oci.database_migration.DatabaseMigrationClient.retrieve_supported_phases", + "database_migration.run_data_verification": "oci.database_migration.DatabaseMigrationClient.run_data_verification", "database_migration.start_migration": "oci.database_migration.DatabaseMigrationClient.start_migration", "database_migration.suspend_job": "oci.database_migration.DatabaseMigrationClient.suspend_job", "database_migration.update_advisor_report_check": "oci.database_migration.DatabaseMigrationClient.update_advisor_report_check", diff --git a/services/ocvp/src/oci_cli_sddc/generated/sddc_cli.py b/services/ocvp/src/oci_cli_sddc/generated/sddc_cli.py index 22fe94a41..8ac16965d 100644 --- a/services/ocvp/src/oci_cli_sddc/generated/sddc_cli.py +++ b/services/ocvp/src/oci_cli_sddc/generated/sddc_cli.py @@ -361,6 +361,34 @@ def downgrade_hcx(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva cli_util.render_response(result, ctx) +@sddc_group.command(name=cli_util.override('sddc.generate_vmware_binary_download_info.command_name', 'generate-vmware-binary-download-info'), help=u"""Generate the VMware binary download information. \n[Command Reference](generateVmwareBinaryDownloadInfo)""") +@cli_util.option('--sddc-id', required=True, help=u"""The [OCID] of the SDDC.""") +@cli_util.option('--vmware-binary-file-name', required=True, help=u"""The name of the VMware binary file.""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ocvp', 'class': 'VmwareBinaryDownloadInfo'}) +@cli_util.wrap_exceptions +def generate_vmware_binary_download_info(ctx, from_json, sddc_id, vmware_binary_file_name): + + if isinstance(sddc_id, six.string_types) and len(sddc_id.strip()) == 0: + raise click.UsageError('Parameter --sddc-id cannot be whitespace or empty string') + + kwargs = {} + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['vmwareBinaryFileName'] = vmware_binary_file_name + + client = cli_util.build_client('ocvp', 'sddc', ctx) + result = client.generate_vmware_binary_download_info( + sddc_id=sddc_id, + generate_vmware_binary_download_info_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + @sddc_group.command(name=cli_util.override('sddc.get_sddc.command_name', 'get'), help=u"""Gets the specified SDDC's information. \n[Command Reference](getSddc)""") @cli_util.option('--sddc-id', required=True, help=u"""The [OCID] of the SDDC.""") @json_skeleton_utils.get_cli_json_input_option({}) @@ -697,6 +725,34 @@ def retrieve_password(ctx, from_json, sddc_id, type, if_match): cli_util.render_response(result, ctx) +@sddc_group.command(name=cli_util.override('sddc.retrieve_vmware_binaries.command_name', 'retrieve-vmware-binaries'), help=u"""Retrieve the list of available VMware binaries for the SDDC. \n[Command Reference](retrieveVmwareBinaries)""") +@cli_util.option('--sddc-id', required=True, help=u"""The [OCID] of the SDDC.""") +@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""") +@cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ocvp', 'class': 'VmwareBinaryCollection'}) +@cli_util.wrap_exceptions +def retrieve_vmware_binaries(ctx, from_json, sddc_id, limit, page): + + if isinstance(sddc_id, six.string_types) and len(sddc_id.strip()) == 0: + raise click.UsageError('Parameter --sddc-id cannot be whitespace or empty string') + + kwargs = {} + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('ocvp', 'sddc', ctx) + result = client.retrieve_vmware_binaries( + sddc_id=sddc_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @sddc_group.command(name=cli_util.override('sddc.update_sddc.command_name', 'update'), help=u"""Updates the specified SDDC. **Important:** Updating an SDDC affects only certain attributes in the `Sddc` object and does not affect the VMware environment currently running in the SDDC. For more information, see [UpdateSddcDetails]. \n[Command Reference](updateSddc)""") diff --git a/services/psql/src/oci_cli_postgresql/generated/postgresql_cli.py b/services/psql/src/oci_cli_postgresql/generated/postgresql_cli.py index f8e3cc1cd..bbfb91904 100644 --- a/services/psql/src/oci_cli_postgresql/generated/postgresql_cli.py +++ b/services/psql/src/oci_cli_postgresql/generated/postgresql_cli.py @@ -142,16 +142,17 @@ def backup_collection_group(): @cli_util.option('--compartment-id', required=True, help=u"""target compartment to place a new backup""") @cli_util.option('--regions', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of region names of the remote regions""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--retention-period', type=click.INT, help=u"""Retention period in days of the backup copy.""") +@cli_util.option('--kms-key-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of key ids of the remote regions""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") -@json_skeleton_utils.get_cli_json_input_option({'regions': {'module': 'psql', 'class': 'list[string]'}}) +@json_skeleton_utils.get_cli_json_input_option({'regions': {'module': 'psql', 'class': 'list[string]'}, 'kms-key-ids': {'module': 'psql', 'class': 'list[string]'}}) @cli_util.help_option @click.pass_context -@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'regions': {'module': 'psql', 'class': 'list[string]'}}) +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'regions': {'module': 'psql', 'class': 'list[string]'}, 'kms-key-ids': {'module': 'psql', 'class': 'list[string]'}}) @cli_util.wrap_exceptions -def backup_copy(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, backup_id, compartment_id, regions, retention_period, if_match): +def backup_copy(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, backup_id, compartment_id, regions, retention_period, kms_key_ids, if_match): if isinstance(backup_id, six.string_types) and len(backup_id.strip()) == 0: raise click.UsageError('Parameter --backup-id cannot be whitespace or empty string') @@ -168,6 +169,9 @@ def backup_copy(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_ if retention_period is not None: _details['retentionPeriod'] = retention_period + if kms_key_ids is not None: + _details['kmsKeyIds'] = cli_util.parse_json_parameter("kms_key_ids", kms_key_ids) + client = cli_util.build_client('psql', 'postgresql', ctx) result = client.backup_copy( backup_id=backup_id, @@ -794,6 +798,7 @@ def create_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte @cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @cli_util.option('--storage-details-availability-domain', help=u"""Specifies the availability domain of AD-local storage. If `isRegionallyDurable` is set to true, `availabilityDomain` should not be specified. If `isRegionallyDurable` is set to false, `availabilityDomain` must be specified.""") +@cli_util.option('--storage-details-kms-key-id', help=u"""The OCID of the Vault service key to assign as the master encryption key for the database system.""") @cli_util.option('--storage-details-iops', type=click.INT, help=u"""Guaranteed input/output storage requests per second (IOPS) available to the database system.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @@ -803,7 +808,7 @@ def create_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte @click.pass_context @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'instances-details': {'module': 'psql', 'class': 'list[CreateDbInstanceDetails]'}, 'credentials': {'module': 'psql', 'class': 'Credentials'}, 'network-details': {'module': 'psql', 'class': 'NetworkDetails'}, 'management-policy': {'module': 'psql', 'class': 'ManagementPolicyDetails'}, 'source': {'module': 'psql', 'class': 'SourceDetails'}, 'replication-config': {'module': 'psql', 'class': 'CreateReplicationConfigDetails'}, 'odsp-insight-details': {'module': 'psql', 'class': 'OdspInsightDetails'}, 'freeform-tags': {'module': 'psql', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'psql', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'psql', 'class': 'DbSystem'}) @cli_util.wrap_exceptions -def create_db_system_oci_optimized_storage_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, db_version, shape, network_details, storage_details_is_regionally_durable, description, system_type, config_id, instance_ocpu_count, instance_memory_size_in_gbs, instance_count, instances_details, credentials, management_policy, source, replication_config, odsp_insight_details, freeform_tags, defined_tags, storage_details_availability_domain, storage_details_iops): +def create_db_system_oci_optimized_storage_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, db_version, shape, network_details, storage_details_is_regionally_durable, description, system_type, config_id, instance_ocpu_count, instance_memory_size_in_gbs, instance_count, instances_details, credentials, management_policy, source, replication_config, odsp_insight_details, freeform_tags, defined_tags, storage_details_availability_domain, storage_details_kms_key_id, storage_details_iops): kwargs = {} kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) @@ -862,6 +867,9 @@ def create_db_system_oci_optimized_storage_details(ctx, from_json, wait_for_stat if storage_details_availability_domain is not None: _details['storageDetails']['availabilityDomain'] = storage_details_availability_domain + if storage_details_kms_key_id is not None: + _details['storageDetails']['kmsKeyId'] = storage_details_kms_key_id + if storage_details_iops is not None: _details['storageDetails']['iops'] = storage_details_iops diff --git a/services/self/src/oci_cli_partner_integeration/generated/partnerintegeration_cli.py b/services/self/src/oci_cli_partner_integeration/generated/partnerintegeration_cli.py index 13c7b5ea2..b1cbc4817 100644 --- a/services/self/src/oci_cli_partner_integeration/generated/partnerintegeration_cli.py +++ b/services/self/src/oci_cli_partner_integeration/generated/partnerintegeration_cli.py @@ -96,6 +96,49 @@ def activate_subscription(ctx, from_json, subscription_id, product_id, freeform_ cli_util.render_response(result, ctx) +@partner_subscription_group.command(name=cli_util.override('partner_integeration.activate_subscription_deprecated.command_name', 'activate-subscription-deprecated'), help=u"""Deprecated. This endpoint has moved permanently to `/partners/subscriptions/{subscriptionId}/actions/activate`. \n[Command Reference](activateSubscriptionDeprecated)""") +@cli_util.option('--subscription-id', required=True, help=u"""The unique identifier for the subscription.""") +@cli_util.option('--product-id', required=True, help=u"""The unique identifier of the marketplace product listing.""") +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags]. + +Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. + +Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'self', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'self', 'class': 'dict(str, dict(str, object))'}}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'self', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'self', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'self', 'class': 'ActivateSubscriptionResult'}) +@cli_util.wrap_exceptions +def activate_subscription_deprecated(ctx, from_json, subscription_id, product_id, freeform_tags, defined_tags, if_match): + + if isinstance(subscription_id, six.string_types) and len(subscription_id.strip()) == 0: + raise click.UsageError('Parameter --subscription-id cannot be whitespace or empty string') + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['productId'] = product_id + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('self', 'partner_integeration', ctx) + result = client.activate_subscription_deprecated( + subscription_id=subscription_id, + activate_subscription_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + @partner_group.command(name=cli_util.override('partner_integeration.list_partners.command_name', 'list'), help=u"""Lists marketplace publisher partner info for a compartment. \n[Command Reference](listPartners)""") @cli_util.option('--compartment-id', help=u"""The [OCID] of the compartment in which to list resources.""") @cli_util.option('--display-name', help=u"""A filter to return only resources that match the given name.""") @@ -186,6 +229,40 @@ def listing_subscriptions(ctx, from_json, listing_id, display_name, sort_by, sor cli_util.render_response(result, ctx) +@listing_subscriptions_collection_group.command(name=cli_util.override('partner_integeration.listing_subscriptions_deprecated.command_name', 'listing-subscriptions-deprecated'), help=u"""Deprecated. This endpoint has moved permanently to `/partners/subscriptions`. \n[Command Reference](listingSubscriptionsDeprecated)""") +@cli_util.option('--listing-id', required=True, help=u"""The unique identifier for the listing.""") +@cli_util.option('--display-name', help=u"""A filter to return only resources that match the given name.""") +@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName", "productId"]), help=u"""The field to sort by. Only one sort order may be provided.""") +@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""") +@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""") +@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""") +@json_skeleton_utils.get_cli_json_input_option({}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'self', 'class': 'ListingSubscriptionsCollection'}) +@cli_util.wrap_exceptions +def listing_subscriptions_deprecated(ctx, from_json, listing_id, display_name, sort_by, sort_order, limit, page): + + kwargs = {} + if display_name is not None: + kwargs['display_name'] = display_name + if sort_by is not None: + kwargs['sort_by'] = sort_by + if sort_order is not None: + kwargs['sort_order'] = sort_order + if limit is not None: + kwargs['limit'] = limit + if page is not None: + kwargs['page'] = page + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + client = cli_util.build_client('self', 'partner_integeration', ctx) + result = client.listing_subscriptions_deprecated( + listing_id=listing_id, + **kwargs + ) + cli_util.render_response(result, ctx) + + @partner_subscription_group.command(name=cli_util.override('partner_integeration.resolve_subscription.command_name', 'resolve-subscription'), help=u"""This API returns the subscription details by resolving JWT token to corresponding subscription and move its state to Pending Activation state. \n[Command Reference](resolveSubscription)""") @cli_util.option('--self-token', required=True, help=u"""The base 64 encoded JWT token which is mapped to a particular subscription""") @cli_util.option('--product-id', required=True, help=u"""The [OCID] of the marketplace product listing.""") @@ -226,9 +303,49 @@ def resolve_subscription(ctx, from_json, self_token, product_id, freeform_tags, cli_util.render_response(result, ctx) -@create_subscription_usage_record_details_group.command(name=cli_util.override('partner_integeration.submit_subscription_usage_batch.command_name', 'submit-subscription-usage-batch'), help=u"""Asynchronously submits a UTF-8 CSV usage file for marketplace offers. The file must not exceed 50 MB or 10,000 rows and must include required usage columns. \n[Command Reference](submitSubscriptionUsageBatch)""") +@partner_subscription_group.command(name=cli_util.override('partner_integeration.resolve_subscription_deprecated.command_name', 'resolve-subscription-deprecated'), help=u"""Deprecated. This endpoint has moved permanently to `/partners/subscriptions/actions/resolve`. It returns a 301 response and does not resolve a subscription. \n[Command Reference](resolveSubscriptionDeprecated)""") +@cli_util.option('--self-token', required=True, help=u"""The base 64 encoded JWT token which is mapped to a particular subscription""") +@cli_util.option('--product-id', required=True, help=u"""The [OCID] of the marketplace product listing.""") +@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags]. + +Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags]. + +Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""") +@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'self', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'self', 'class': 'dict(str, dict(str, object))'}}) +@cli_util.help_option +@click.pass_context +@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'self', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'self', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'self', 'class': 'PartnerSubscription'}) +@cli_util.wrap_exceptions +def resolve_subscription_deprecated(ctx, from_json, self_token, product_id, freeform_tags, defined_tags, if_match): + + kwargs = {} + if if_match is not None: + kwargs['if_match'] = if_match + kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id']) + + _details = {} + _details['selfToken'] = self_token + _details['productId'] = product_id + + if freeform_tags is not None: + _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags) + + if defined_tags is not None: + _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags) + + client = cli_util.build_client('self', 'partner_integeration', ctx) + result = client.resolve_subscription_deprecated( + resolve_subscription_details=_details, + **kwargs + ) + cli_util.render_response(result, ctx) + + +@create_subscription_usage_record_details_group.command(name=cli_util.override('partner_integeration.submit_subscription_usage_batch.command_name', 'submit-subscription-usage-batch'), help=u"""Asynchronously submits a UTF-8 CSV usage file for marketplace offers. The file must not exceed 50 MB or 30,000 rows and must include required usage columns. \n[Command Reference](submitSubscriptionUsageBatch)""") @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment associated with the usage records request.""") -@cli_util.option('--submit-subscription-usage-batch-details', required=True, help=u"""UTF-8 CSV file with no more than 10,000 usage records and a maximum size of 50 MB. Required columns are `MarketplaceOfferId`, `Id`, `Amount`, `CurrencyCode`, `UsageStartTime`, `UsageEndTime`, and `UsageDimensionName`. Optional columns are `ConsumedQuantity`, `CustomerTenancyId`, `BillingIdentifier`, `ProductSku`, `UnitOfMeasure`, `UnitPrice`, `ContractDuration`, and `AdditionalMetadata`. When provided in CSV, `AdditionalMetadata` must be a JSON array of `ExtendedMetadata` objects. `MarketplaceOfferId` must be a subscription or private offer OCID.""") +@cli_util.option('--submit-subscription-usage-batch-details', required=True, help=u"""UTF-8 CSV file with no more than 30,000 usage records and a maximum size of 50 MB. Required columns are `MarketplaceOfferId`, `Id`, `Amount`, `CurrencyCode`, `UsageStartTime`, `UsageEndTime`, and `UsageDimensionName`. Optional columns are `ConsumedQuantity`, `CustomerTenancyId`, `BillingIdentifier`, `ProductSku`, `UnitOfMeasure`, `UnitPrice`, `ContractDuration`, and `AdditionalMetadata`. When provided in CSV, `AdditionalMetadata` must be a JSON array of `ExtendedMetadata` objects. `MarketplaceOfferId` must be a subscription or private offer OCID.""") @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state ACCEPTED --wait-for-state CANCELED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""") @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""") @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""") @@ -283,7 +400,7 @@ def submit_subscription_usage_batch(ctx, from_json, wait_for_state, max_wait_sec @create_subscription_usage_record_details_group.command(name=cli_util.override('partner_integeration.submit_subscription_usage_records.command_name', 'submit-subscription-usage-records'), help=u"""Synchronously submits usage records for marketplace offers. Each record must include `id`, `marketplaceOfferId`, `amount`, `currencyCode`, `timeUsageStarted`, `timeUsageEnded`, and `usageDimensionName`. \n[Command Reference](submitSubscriptionUsageRecords)""") @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment associated with the usage records request.""") -@cli_util.option('--subscription-usage-records', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The usage records to submit. The array must contain at least one record and no more than 100 records.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) +@cli_util.option('--subscription-usage-records', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The usage records to submit. The array must contain at least one record and no more than 1,000 records.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP) @json_skeleton_utils.get_cli_json_input_option({'subscription-usage-records': {'module': 'self', 'class': 'list[CreateSubscriptionUsageRecordDetails]'}}) @cli_util.help_option @click.pass_context diff --git a/setup.py b/setup.py index a395982de..b6c1e0e93 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ def open_relative(*path): readme = f.read() requires = [ - 'oci==2.185.2', + 'oci==2.186.0', 'arrow>=1.0.0,<2.0.0', 'certifi>=2025.1.31,<2026.0.0', 'click>=8.0.4,<=8.1.2; python_version < "3.11"', diff --git a/src/oci_cli/version.py b/src/oci_cli/version.py index 8b4f8987f..23c9c6bed 100644 --- a/src/oci_cli/version.py +++ b/src/oci_cli/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. -__version__ = '3.92.1' +__version__ = '3.93.0'