Skip to content

Commit 31e7a1b

Browse files
authored
Releasing version 3.23.2
Releasing version 3.23.2
2 parents b590ae6 + 6bc2b11 commit 31e7a1b

File tree

7 files changed

+82
-5
lines changed

7 files changed

+82
-5
lines changed

CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ 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.23.2 - 2023-02-28
10+
--------------------
11+
Added
12+
~~~~~
13+
* Support for new command allowing on-demand bootstrap script execution in the Big Data service
14+
15+
* ``oci bds instance execute-bootstrap-script``
16+
17+
* Support for calling Oracle Cloud Infrastructure services in the eu-dcc-rating-1, eu-dcc-rating-2, eu-dcc-dublin-1, eu-dcc-dublin-2, and eu-dcc-milan-2 regions
18+
919
3.23.1 - 2023-02-21
1020
--------------------
1121
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.93.0
17+
oci==2.93.1
1818
packaging==20.2
1919
pluggy==0.13.0
2020
py==1.10.0

services/bds/src/oci_cli_bds/generated/bds_cli.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,67 @@ def delete_bds_metastore_configuration(ctx, from_json, wait_for_state, max_wait_
12281228
cli_util.render_response(result, ctx)
12291229

12301230

1231+
@bds_instance_group.command(name=cli_util.override('bds.execute_bootstrap_script.command_name', 'execute-bootstrap-script'), help=u"""Execute bootstrap script. \n[Command Reference](executeBootstrapScript)""")
1232+
@cli_util.option('--bds-instance-id', required=True, help=u"""The OCID of the cluster.""")
1233+
@cli_util.option('--cluster-admin-password', required=True, help=u"""Base-64 encoded password for the cluster admin user.""")
1234+
@cli_util.option('--bootstrap-script-url', help=u"""pre-authenticated URL of the bootstrap script in Object Store that can be downloaded and executed.""")
1235+
@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.""")
1236+
@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.""")
1237+
@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.""")
1238+
@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.""")
1239+
@json_skeleton_utils.get_cli_json_input_option({})
1240+
@cli_util.help_option
1241+
@click.pass_context
1242+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
1243+
@cli_util.wrap_exceptions
1244+
def execute_bootstrap_script(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, bds_instance_id, cluster_admin_password, bootstrap_script_url, if_match):
1245+
1246+
if isinstance(bds_instance_id, six.string_types) and len(bds_instance_id.strip()) == 0:
1247+
raise click.UsageError('Parameter --bds-instance-id cannot be whitespace or empty string')
1248+
1249+
kwargs = {}
1250+
if if_match is not None:
1251+
kwargs['if_match'] = if_match
1252+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1253+
1254+
_details = {}
1255+
_details['clusterAdminPassword'] = cluster_admin_password
1256+
1257+
if bootstrap_script_url is not None:
1258+
_details['bootstrapScriptUrl'] = bootstrap_script_url
1259+
1260+
client = cli_util.build_client('bds', 'bds', ctx)
1261+
result = client.execute_bootstrap_script(
1262+
bds_instance_id=bds_instance_id,
1263+
execute_bootstrap_script_details=_details,
1264+
**kwargs
1265+
)
1266+
if wait_for_state:
1267+
1268+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
1269+
try:
1270+
wait_period_kwargs = {}
1271+
if max_wait_seconds is not None:
1272+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1273+
if wait_interval_seconds is not None:
1274+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1275+
1276+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
1277+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
1278+
except oci.exceptions.MaximumWaitTimeExceeded as e:
1279+
# If we fail, we should show an error, but we should still provide the information to the customer
1280+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
1281+
cli_util.render_response(result, ctx)
1282+
sys.exit(2)
1283+
except Exception:
1284+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
1285+
cli_util.render_response(result, ctx)
1286+
raise
1287+
else:
1288+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
1289+
cli_util.render_response(result, ctx)
1290+
1291+
12311292
@bds_instance_group.command(name=cli_util.override('bds.get_auto_scaling_configuration.command_name', 'get-auto-scaling-configuration'), help=u"""Returns details of the autoscale configuration identified by the given ID. \n[Command Reference](getAutoScalingConfiguration)""")
12321293
@cli_util.option('--bds-instance-id', required=True, help=u"""The OCID of the cluster.""")
12331294
@cli_util.option('--auto-scaling-configuration-id', required=True, help=u"""Unique Oracle-assigned identifier of the autoscale configuration.""")

services/database/src/oci_cli_database/database_cli_extended.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,9 +2972,9 @@ def modify_pluggable_database_management_extended(ctx, **kwargs):
29722972

29732973

29742974
# renaming db-system-storage-performance command group to storage-performance
2975-
cli_util.rename_command(database_cli, database_cli.db_root_group, database_cli.db_system_storage_performance_group, "storage-performance")
2975+
# cli_util.rename_command(database_cli, database_cli.db_root_group, database_cli.db_system_storage_performance_group, "storage-performance")
29762976
# renaming db-system-compute-performance command group to compute-performance
2977-
cli_util.rename_command(database_cli, database_cli.db_root_group, database_cli.db_system_compute_performance_group, "compute-performance")
2977+
# cli_util.rename_command(database_cli, database_cli.db_root_group, database_cli.db_system_compute_performance_group, "compute-performance")
29782978

29792979

29802980
# CLI-341

services/rover/src/oci_cli_rover/rover_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ def get_object_storage_helper(ctx):
106106
object_cli = cli_util.build_client('object_storage', 'object_storage', ctx)
107107
ctx.obj['region'] = region
108108
return object_cli
109+
if 'default_values_from_file' in ctx.obj and 'os.endpoint' in ctx.obj['default_values_from_file']:
110+
endpoint = ctx.obj['endpoint']
111+
ctx.obj['endpoint'] = ctx.obj['default_values_from_file']['os.endpoint']
112+
object_cli = cli_util.build_client('object_storage', 'object_storage', ctx)
113+
ctx.obj['endpoint'] = endpoint
114+
return object_cli
109115
return cli_util.build_client('object_storage', 'object_storage', ctx)
110116

111117

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def open_relative(*path):
2929
readme = f.read()
3030

3131
requires = [
32-
'oci==2.93.0',
32+
'oci==2.93.1',
3333
'arrow>=1.0.0',
3434
'certifi',
3535
'click==7.1.2',

src/oci_cli/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
# 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.
44

5-
__version__ = '3.23.1'
5+
__version__ = '3.23.2'

0 commit comments

Comments
 (0)