Skip to content

Commit e8e4fa5

Browse files
authored
Merge pull request #604 from oracle/release_2022-11-01
Releasing version 3.20.0
2 parents a2b9345 + f21da21 commit e8e4fa5

File tree

16 files changed

+2751
-505
lines changed

16 files changed

+2751
-505
lines changed

CHANGELOG.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,57 @@ All notable changes to this project will be documented in this file.
66

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

9+
3.20.0 - 2022-11-01
10+
--------------------
11+
12+
Added
13+
~~~~~
14+
15+
* Database service
16+
17+
* Support for Clone from backup from last available timestamp
18+
19+
* ``oci db autonomous-database create-from-backup-timestamp --use-latest-available-backup-time-stamp ``
20+
21+
* The required parameter --timestamp is now optional in the below command
22+
23+
* ``oci db autonomous-database create-from-backup-timestamp``
24+
25+
* The required parameter --display-name is now optional in the below command
26+
27+
* ``oci db autonomous-database-backup create``
28+
29+
* Support for agent settings parameter for specifying third-party Qualys scanner when creating or updating a host scan recipe in the Vulnerability Scanning service
30+
31+
* ``oci vulnerability-scanning host scan recipe create --agent-settings ``
32+
* ``oci vulnerability-scanning host scan recipe update --agent-settings ``
33+
34+
* Support for the below commands in the Logging Analytics service
35+
36+
* ``oci log-analytics storage list-encryption-key-info``
37+
* ``oci log-analytics storage assign-encryption-key``
38+
39+
* Golden Gate service
40+
41+
* Support for Connections for Database Resources
42+
43+
* ``oci golden-gate connection``
44+
45+
* Support for the below new command
46+
47+
* ``oci goldengate deployment-type-collection list-deployment-types``
48+
49+
* Support for the parameters --assignable-connection-id, --assigned-connection-id and --supported-connection-type in the below command
50+
51+
* ``oci goldengate deployment list``
52+
53+
Changed
54+
~~~~~~~~
55+
56+
* [BREAKING] The command oci organizations work-request-log-entry list has been changed to oci organizations work-request-log list in the Organization service
57+
58+
* Improved CLI error message on incorrect JSON input
59+
960
3.19.0 - 2022-10-25
1061
--------------------
1162
Added

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Jinja2==3.0.3
1414
jmespath==0.10.0
1515
ndg-httpsclient==0.4.2
1616
mock==2.0.0
17-
oci==2.86.0
17+
oci==2.87.0
1818
packaging==20.2
1919
pluggy==0.13.0
2020
py==1.10.0

services/ai_language/src/oci_cli_ai_service_language/aiservicelanguage_cli_extended.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,3 @@ def language_group():
110110
# Add work-request error and logs messages to work-request group
111111
aiservicelanguage_cli.work_request_group.add_command(aiservicelanguage_cli.work_request_error_group)
112112
aiservicelanguage_cli.work_request_group.add_command(aiservicelanguage_cli.work_request_log_group)
113-

services/database/src/oci_cli_database/generated/database_cli.py

Lines changed: 19 additions & 11 deletions
Large diffs are not rendered by default.

services/disaster_recovery/src/oci_cli_disaster_recovery/disasterrecovery_cli_extended.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ def create_dr_plan_execution_switchover_precheck_execution_option_details_extend
121121
kwargs['execution_options_are_warnings_ignored'] = kwargs['warnings_ignored']
122122
kwargs.pop('warnings_ignored')
123123

124-
ctx.invoke(disasterrecovery_cli.create_dr_plan_execution_switchover_precheck_execution_option_details, **kwargs)
124+
ctx.invoke(disasterrecovery_cli.create_dr_plan_execution_switchover_precheck_execution_option_details, **kwargs)

services/golden_gate/src/oci_cli_golden_gate/generated/goldengate_cli.py

Lines changed: 2290 additions & 368 deletions
Large diffs are not rendered by default.

services/golden_gate/src/oci_cli_golden_gate/golden_gate_cli_extended.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,81 @@ def update_deployment_extended(ctx, **kwargs):
173173

174174
# oci goldengate deployment-backup cancel-deployment-backup-default-cancel-deployment-backup-details -> oci goldengate deployment-backup cancel
175175
cli_util.rename_command(goldengate_cli, goldengate_cli.deployment_backup_group, goldengate_cli.cancel_deployment_backup_default_cancel_deployment_backup_details, "cancel")
176+
177+
178+
# oci goldengate connection create-connection-create-golden-gate-connection-details -> oci goldengate connection create-goldengate-connection
179+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.create_connection_create_golden_gate_connection_details, "create-goldengate-connection")
180+
181+
182+
# oci goldengate connection create-connection-create-kafka-connection-details -> oci goldengate connection create-kafka-connection
183+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.create_connection_create_kafka_connection_details, "create-kafka-connection")
184+
185+
186+
# oci goldengate connection create-connection-create-mysql-connection-details -> oci goldengate connection create-mysql-connection
187+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.create_connection_create_mysql_connection_details, "create-mysql-connection")
188+
189+
190+
# oci goldengate connection create-connection-create-oci-object-storage-connection-details -> oci goldengate connection create-object-storage-connection
191+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.create_connection_create_oci_object_storage_connection_details, "create-object-storage-connection")
192+
193+
194+
# oci goldengate connection create-connection-create-oracle-connection-details -> oci goldengate connection create-oracle-connection
195+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.create_connection_create_oracle_connection_details, "create-oracle-connection")
196+
197+
198+
# oci goldengate connection update-connection-update-golden-gate-connection-details -> oci goldengate connection update-goldengate-connection
199+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.update_connection_update_golden_gate_connection_details, "update-goldengate-connection")
200+
201+
202+
# oci goldengate connection update-connection-update-kafka-connection-details -> oci goldengate connection update-kafka-connection
203+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.update_connection_update_kafka_connection_details, "update-kafka-connection")
204+
205+
206+
# oci goldengate connection update-connection-update-mysql-connection-details -> oci goldengate connection update-mysql-connection
207+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.update_connection_update_mysql_connection_details, "update-mysql-connection")
208+
209+
210+
# oci goldengate connection update-connection-update-oci-object-storage-connection-details -> oci goldengate connection update-object-storage-connection
211+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.update_connection_update_oci_object_storage_connection_details, "update-object-storage-connection")
212+
213+
214+
# oci goldengate connection update-connection-update-oracle-connection-details -> oci goldengate connection update-oracle-connection
215+
cli_util.rename_command(goldengate_cli, goldengate_cli.connection_group, goldengate_cli.update_connection_update_oracle_connection_details, "update-oracle-connection")
216+
217+
218+
# Remove create from oci goldengate connection
219+
goldengate_cli.connection_group.commands.pop(goldengate_cli.create_connection.name)
220+
221+
222+
# Remove update from oci goldengate connection
223+
goldengate_cli.connection_group.commands.pop(goldengate_cli.update_connection.name)
224+
225+
226+
@cli_util.copy_params_from_generated_command(goldengate_cli.create_connection_create_oci_object_storage_connection_details, params_to_exclude=['region_parameterconflict'])
227+
@goldengate_cli.connection_group.command(name=goldengate_cli.create_connection_create_oci_object_storage_connection_details.name, help=goldengate_cli.create_connection_create_oci_object_storage_connection_details.help)
228+
@cli_util.option('--os-region', help=u"""The name of the region. e.g.: us-ashburn-1""")
229+
@click.pass_context
230+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}}, output_type={'module': 'golden_gate', 'class': 'Connection'})
231+
@cli_util.wrap_exceptions
232+
def create_connection_create_oci_object_storage_connection_details_extended(ctx, **kwargs):
233+
234+
if 'os_region' in kwargs:
235+
kwargs['region_parameterconflict'] = kwargs['os_region']
236+
kwargs.pop('os_region')
237+
238+
ctx.invoke(goldengate_cli.create_connection_create_oci_object_storage_connection_details, **kwargs)
239+
240+
241+
@cli_util.copy_params_from_generated_command(goldengate_cli.update_connection_update_oci_object_storage_connection_details, params_to_exclude=['region_parameterconflict'])
242+
@goldengate_cli.connection_group.command(name=goldengate_cli.update_connection_update_oci_object_storage_connection_details.name, help=goldengate_cli.update_connection_update_oci_object_storage_connection_details.help)
243+
@cli_util.option('--os-region', help=u"""The name of the region. e.g.: us-ashburn-1""")
244+
@click.pass_context
245+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'golden_gate', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'golden_gate', 'class': 'dict(str, dict(str, object))'}, 'nsg-ids': {'module': 'golden_gate', 'class': 'list[string]'}})
246+
@cli_util.wrap_exceptions
247+
def update_connection_update_oci_object_storage_connection_details_extended(ctx, **kwargs):
248+
249+
if 'os_region' in kwargs:
250+
kwargs['region_parameterconflict'] = kwargs['os_region']
251+
kwargs.pop('os_region')
252+
253+
ctx.invoke(goldengate_cli.update_connection_update_oci_object_storage_connection_details, **kwargs)

services/log_analytics/src/oci_cli_log_analytics/generated/loganalytics_cli.py

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,65 @@ def append_lookup_data(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
384384
cli_util.render_response(result, ctx)
385385

386386

387+
@storage_group.command(name=cli_util.override('log_analytics.assign_encryption_key.command_name', 'assign-encryption-key'), help=u"""This API submits a work request to assign customer encryption key. \n[Command Reference](assignEncryptionKey)""")
388+
@cli_util.option('--namespace-name', required=True, help=u"""The Logging Analytics namespace used for the request.""")
389+
@cli_util.option('--key-id', required=True, help=u"""This is the key OCID for encryption key.""")
390+
@cli_util.option('--key-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["ACTIVE_DATA", "ARCHIVAL_DATA", "ALL"]), help=u"""This is the type of data to be encrypted. It can be either active or archival.""")
391+
@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.""")
392+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "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 SUCCEEDED --wait-for-state FAILED 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.""")
393+
@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.""")
394+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request to see if it has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
395+
@json_skeleton_utils.get_cli_json_input_option({})
396+
@cli_util.help_option
397+
@click.pass_context
398+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
399+
@cli_util.wrap_exceptions
400+
def assign_encryption_key(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, namespace_name, key_id, key_type, if_match):
401+
402+
if isinstance(namespace_name, six.string_types) and len(namespace_name.strip()) == 0:
403+
raise click.UsageError('Parameter --namespace-name cannot be whitespace or empty string')
404+
405+
kwargs = {}
406+
if if_match is not None:
407+
kwargs['if_match'] = if_match
408+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
409+
410+
_details = {}
411+
_details['keyId'] = key_id
412+
_details['keyType'] = key_type
413+
414+
client = cli_util.build_client('log_analytics', 'log_analytics', ctx)
415+
result = client.assign_encryption_key(
416+
namespace_name=namespace_name,
417+
assign_encryption_key_details=_details,
418+
**kwargs
419+
)
420+
if wait_for_state:
421+
422+
if hasattr(client, 'get_storage_work_request') and callable(getattr(client, 'get_storage_work_request')):
423+
try:
424+
wait_period_kwargs = {}
425+
if max_wait_seconds is not None:
426+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
427+
if wait_interval_seconds is not None:
428+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
429+
430+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
431+
result = oci.wait_until(client, client.get_storage_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
432+
except oci.exceptions.MaximumWaitTimeExceeded as e:
433+
# If we fail, we should show an error, but we should still provide the information to the customer
434+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
435+
cli_util.render_response(result, ctx)
436+
sys.exit(2)
437+
except Exception:
438+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
439+
cli_util.render_response(result, ctx)
440+
raise
441+
else:
442+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
443+
cli_util.render_response(result, ctx)
444+
445+
387446
@log_analytics_label_group.command(name=cli_util.override('log_analytics.batch_get_basic_info.command_name', 'batch-get-basic-info'), help=u"""Lists basic information about a specified set of labels in batch. \n[Command Reference](batchGetBasicInfo)""")
388447
@cli_util.option('--namespace-name', required=True, help=u"""The Logging Analytics namespace used for the request.""")
389448
@cli_util.option('--is-include-deleted', required=True, type=click.BOOL, help=u"""A flag specifying whether or not to include information on deleted labels.""")
@@ -4312,6 +4371,29 @@ def list_config_work_requests(ctx, from_json, all_pages, page_size, namespace_na
43124371
cli_util.render_response(result, ctx)
43134372

43144373

4374+
@storage_group.command(name=cli_util.override('log_analytics.list_encryption_key_info.command_name', 'list-encryption-key-info'), help=u"""This API returns the list of customer owned encryption key info. \n[Command Reference](listEncryptionKeyInfo)""")
4375+
@cli_util.option('--namespace-name', required=True, help=u"""The Logging Analytics namespace used for the request.""")
4376+
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results.""")
4377+
@json_skeleton_utils.get_cli_json_input_option({})
4378+
@cli_util.help_option
4379+
@click.pass_context
4380+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'log_analytics', 'class': 'EncryptionKeyInfoCollection'})
4381+
@cli_util.wrap_exceptions
4382+
def list_encryption_key_info(ctx, from_json, all_pages, namespace_name):
4383+
4384+
if isinstance(namespace_name, six.string_types) and len(namespace_name.strip()) == 0:
4385+
raise click.UsageError('Parameter --namespace-name cannot be whitespace or empty string')
4386+
4387+
kwargs = {}
4388+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
4389+
client = cli_util.build_client('log_analytics', 'log_analytics', ctx)
4390+
result = client.list_encryption_key_info(
4391+
namespace_name=namespace_name,
4392+
**kwargs
4393+
)
4394+
cli_util.render_response(result, ctx)
4395+
4396+
43154397
@log_analytics_entity_group.command(name=cli_util.override('log_analytics.list_entity_associations.command_name', 'list-entity-associations'), help=u"""Return a list of log analytics entities associated with input source log analytics entity. \n[Command Reference](listEntityAssociations)""")
43164398
@cli_util.option('--namespace-name', required=True, help=u"""The Logging Analytics namespace used for the request.""")
43174399
@cli_util.option('--log-analytics-entity-id', required=True, help=u"""The log analytics entity OCID.""")
@@ -6526,7 +6608,7 @@ def list_storage_work_request_errors(ctx, from_json, all_pages, page_size, compa
65266608
@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.""")
65276609
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`).""")
65286610
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeAccepted", "timeExpires", "timeFinished"]), help=u"""This is the query parameter of which field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. If no value is specified timeAccepted is default.""")
6529-
@cli_util.option('--operation-type', type=custom_types.CliCaseInsensitiveChoice(["OFFBOARD_TENANCY", "PURGE_STORAGE_DATA", "RECALL_ARCHIVED_STORAGE_DATA", "RELEASE_RECALLED_STORAGE_DATA", "ARCHIVE_STORAGE_DATA", "CLEANUP_ARCHIVAL_STORAGE_DATA"]), help=u"""The is the work request type query parameter""")
6611+
@cli_util.option('--operation-type', type=custom_types.CliCaseInsensitiveChoice(["OFFBOARD_TENANCY", "PURGE_STORAGE_DATA", "RECALL_ARCHIVED_STORAGE_DATA", "RELEASE_RECALLED_STORAGE_DATA", "ARCHIVE_STORAGE_DATA", "CLEANUP_ARCHIVAL_STORAGE_DATA", "ENCRYPT_ACTIVE_DATA", "ENCRYPT_ARCHIVAL_DATA"]), help=u"""The is the work request type query parameter""")
65306612
@cli_util.option('--status', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "CANCELED", "FAILED", "IN_PROGRESS", "SUCCEEDED"]), help=u"""The is the work request status query parameter""")
65316613
@cli_util.option('--time-started', type=custom_types.CLI_DATETIME, help=u"""The is the query parameter of when the processing of work request was started""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)
65326614
@cli_util.option('--time-finished', type=custom_types.CLI_DATETIME, help=u"""The is the query parameter of when the processing of work request was finished""" + custom_types.CLI_DATETIME.VALID_DATETIME_CLI_HELP_MESSAGE)

0 commit comments

Comments
 (0)