Skip to content

Commit 4e72831

Browse files
Releasing version 3.10.2
Releasing version 3.10.2
2 parents bfca643 + 7be2fdb commit 4e72831

File tree

12 files changed

+944
-63
lines changed

12 files changed

+944
-63
lines changed

CHANGELOG.rst

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,39 @@ 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.10.2 - 2022-06-07
10+
--------------------
11+
Added
12+
~~~~~
13+
* Support for private endpoint in the Resource Manager service
14+
15+
* ``oci resource-manager private-endpoint``
16+
17+
* Support for generated downloading terraform plan output in json or binary format in the Resource Manager service
18+
19+
* ``oci resource-manager job get-job-tf-plan``
20+
21+
* Support for query OPSI Data Objects
22+
23+
* ``oci opsi opsi-data-objects``
24+
25+
Changed
26+
~~~~~~~
27+
* Modified supported version for the following package: prompt-toolkit (==3.0.29)
28+
29+
Fixed
30+
~~~~~~~
31+
* Bug fix for --arguments property to be able to correctly convert string to json in dataflow service
32+
33+
* ``oci data-flow run create --arguments``
34+
35+
* Bug in --wait-for-state param for following commands in the Key management system service
36+
37+
* ``oci kms management key-version create``
38+
* ``oci kms management key-version cancel-key-version-deletion``
39+
* ``oci kms management key-version schedule-key-version-deletion``
40+
41+
942
3.10.1 - 2022-05-31
1043
--------------------
1144
Added
@@ -90,7 +123,6 @@ Added
90123

91124
Changed
92125
~~~~~~~
93-
94126
* Improved service error exception for all CLI commands
95127

96128
* [BREAKING] The parameter --specification is now required in the below command

requirements.txt

Lines changed: 2 additions & 2 deletions
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.70.0
17+
oci==2.70.1
1818
packaging==20.2
1919
pluggy==0.13.0
2020
py==1.10.0
@@ -39,4 +39,4 @@ pytest-xdist==1.22.2
3939
pytest-forked==1.0.2
4040
PyYAML>=5.4,<6
4141
docutils==0.15.2
42-
prompt-toolkit==3.0.16
42+
prompt-toolkit==3.0.29

services/data_flow/src/oci_cli_data_flow/dataflow_cli_extended.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def update_application(ctx, **kwargs):
205205
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'arguments': {'module': 'data_flow', 'class': 'list[string]'}, 'configuration': {'module': 'data_flow', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_flow', 'class': 'dict(str, dict(str, object))'}, 'driver-shape-config': {'module': 'data_flow', 'class': 'ShapeConfig'}, 'executor-shape-config': {'module': 'data_flow', 'class': 'ShapeConfig'}, 'freeform-tags': {'module': 'data_flow', 'class': 'dict(str, string)'}, 'parameters': {'module': 'data_flow', 'class': 'list[ApplicationParameter]'}}, output_type={'module': 'data_flow', 'class': 'Run'})
206206
@cli_util.wrap_exceptions
207207
def submit_run(ctx, **kwargs):
208+
updateKwargs(kwargs)
208209
ctx.invoke(dataflow_cli.create_run, **kwargs)
209210

210211

@@ -217,4 +218,5 @@ def submit_run(ctx, **kwargs):
217218
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'arguments': {'module': 'data_flow', 'class': 'list[string]'}, 'configuration': {'module': 'data_flow', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'data_flow', 'class': 'dict(str, dict(str, object))'}, 'driver-shape-config': {'module': 'data_flow', 'class': 'ShapeConfig'}, 'executor-shape-config': {'module': 'data_flow', 'class': 'ShapeConfig'}, 'freeform-tags': {'module': 'data_flow', 'class': 'dict(str, string)'}, 'parameters': {'module': 'data_flow', 'class': 'list[ApplicationParameter]'}}, output_type={'module': 'data_flow', 'class': 'Run'})
218219
@cli_util.wrap_exceptions
219220
def create_run_extended(ctx, **kwargs):
221+
updateKwargs(kwargs)
220222
ctx.invoke(dataflow_cli.create_run, **kwargs)

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

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

services/key_management/src/oci_cli_kms_management/kms_management_cli_extended.py

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
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

55
import click
6+
import oci # noqa: F401
7+
import six # noqa: F401
8+
import sys # noqa: F401
69
from services.key_management.src.oci_cli_kms_management.generated import kmsmanagement_cli
710
from oci_cli import cli_util
811
from oci_cli import json_skeleton_utils
@@ -134,3 +137,162 @@ def restore_from_file(ctx, **kwargs):
134137
ctx.invoke(kmsmanagement_cli.restore_key_from_file, **kwargs)
135138
except Exception:
136139
click.echo("Can't open the file")
140+
141+
142+
@cli_util.copy_params_from_generated_command(kmsmanagement_cli.create_key_version, params_to_exclude=[''])
143+
@kmsmanagement_cli.key_version_group.command(name=cli_util.override('kms_management.create_key_version.command_name', 'create'), help=u"""Generates a new [KeyVersion] resource that provides new cryptographic material for a master encryption key. The key must be in an `ENABLED` state to be rotated.
144+
145+
As a management operation, this call is subject to a Key Management limit that applies to the total number of requests across all management write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of management write operations exceeds 10 requests per second for a given tenancy.
146+
147+
The top level --endpoint parameter must be supplied for this operation. \n[Command Reference](createKeyVersion)""")
148+
@click.pass_context
149+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'key_management', 'class': 'KeyVersion'})
150+
@cli_util.wrap_exceptions
151+
def create_key_version_extended(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, key_id):
152+
153+
if isinstance(key_id, six.string_types) and len(key_id.strip()) == 0:
154+
raise click.UsageError('Parameter --key-id cannot be whitespace or empty string')
155+
156+
kwargs = {}
157+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
158+
client = cli_util.build_client('key_management', 'kms_management', ctx)
159+
result = client.create_key_version(
160+
key_id=key_id,
161+
**kwargs
162+
)
163+
if wait_for_state:
164+
165+
if hasattr(client, 'get_key_version') and callable(getattr(client, 'get_key_version')):
166+
try:
167+
wait_period_kwargs = {}
168+
if max_wait_seconds is not None:
169+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
170+
if wait_interval_seconds is not None:
171+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
172+
173+
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
174+
result = oci.wait_until(client, client.get_key_version(key_id, result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
175+
except oci.exceptions.MaximumWaitTimeExceeded as e:
176+
# If we fail, we should show an error, but we should still provide the information to the customer
177+
click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
178+
cli_util.render_response(result, ctx)
179+
sys.exit(2)
180+
except Exception:
181+
click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
182+
cli_util.render_response(result, ctx)
183+
raise
184+
else:
185+
click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
186+
cli_util.render_response(result, ctx)
187+
188+
189+
@cli_util.copy_params_from_generated_command(kmsmanagement_cli.schedule_key_version_deletion, params_to_exclude=[''])
190+
@kmsmanagement_cli.key_version_group.command(name=cli_util.override('kms_management.schedule_key_version_deletion.command_name', 'schedule-key-version-deletion'), help=u"""Schedules the deletion of the specified key version. This sets the lifecycle state of the key version to `PENDING_DELETION` and then deletes it after the specified retention period ends.
191+
192+
As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.
193+
194+
The top level --endpoint parameter must be supplied for this operation. \n[Command Reference](scheduleKeyVersionDeletion)""")
195+
@click.pass_context
196+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'key_management', 'class': 'KeyVersion'})
197+
@cli_util.wrap_exceptions
198+
def schedule_key_version_deletion_extended(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, key_id, key_version_id, time_of_deletion, if_match):
199+
200+
if isinstance(key_id, six.string_types) and len(key_id.strip()) == 0:
201+
raise click.UsageError('Parameter --key-id cannot be whitespace or empty string')
202+
203+
if isinstance(key_version_id, six.string_types) and len(key_version_id.strip()) == 0:
204+
raise click.UsageError('Parameter --key-version-id cannot be whitespace or empty string')
205+
206+
kwargs = {}
207+
if if_match is not None:
208+
kwargs['if_match'] = if_match
209+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
210+
211+
_details = {}
212+
213+
if time_of_deletion is not None:
214+
_details['timeOfDeletion'] = time_of_deletion
215+
216+
client = cli_util.build_client('key_management', 'kms_management', ctx)
217+
result = client.schedule_key_version_deletion(
218+
key_id=key_id,
219+
key_version_id=key_version_id,
220+
schedule_key_version_deletion_details=_details,
221+
**kwargs
222+
)
223+
if wait_for_state:
224+
225+
if hasattr(client, 'get_key_version') and callable(getattr(client, 'get_key_version')):
226+
try:
227+
wait_period_kwargs = {}
228+
if max_wait_seconds is not None:
229+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
230+
if wait_interval_seconds is not None:
231+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
232+
233+
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
234+
result = oci.wait_until(client, client.get_key_version(key_id, result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
235+
except oci.exceptions.MaximumWaitTimeExceeded as e:
236+
# If we fail, we should show an error, but we should still provide the information to the customer
237+
click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
238+
cli_util.render_response(result, ctx)
239+
sys.exit(2)
240+
except Exception:
241+
click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
242+
cli_util.render_response(result, ctx)
243+
raise
244+
else:
245+
click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
246+
cli_util.render_response(result, ctx)
247+
248+
249+
@cli_util.copy_params_from_generated_command(kmsmanagement_cli.cancel_key_version_deletion, params_to_exclude=[''])
250+
@kmsmanagement_cli.key_version_group.command(name=cli_util.override('kms_management.cancel_key_version_deletion.command_name', 'cancel-key-version-deletion'), help=u"""Cancels the scheduled deletion of the specified key version. Canceling a scheduled deletion restores the key version to its lifecycle state from before its scheduled deletion.
251+
252+
As a provisioning operation, this call is subject to a Key Management limit that applies to the total number of requests across all provisioning write operations. Key Management might throttle this call to reject an otherwise valid request when the total rate of provisioning write operations exceeds 10 requests per second for a given tenancy.
253+
254+
The top level --endpoint parameter must be supplied for this operation. \n[Command Reference](cancelKeyVersionDeletion)""")
255+
@click.pass_context
256+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'key_management', 'class': 'KeyVersion'})
257+
@cli_util.wrap_exceptions
258+
def cancel_key_version_deletion_extended(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, key_id, key_version_id, if_match):
259+
260+
if isinstance(key_id, six.string_types) and len(key_id.strip()) == 0:
261+
raise click.UsageError('Parameter --key-id cannot be whitespace or empty string')
262+
263+
if isinstance(key_version_id, six.string_types) and len(key_version_id.strip()) == 0:
264+
raise click.UsageError('Parameter --key-version-id cannot be whitespace or empty string')
265+
266+
kwargs = {}
267+
if if_match is not None:
268+
kwargs['if_match'] = if_match
269+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
270+
client = cli_util.build_client('key_management', 'kms_management', ctx)
271+
result = client.cancel_key_version_deletion(
272+
key_id=key_id,
273+
key_version_id=key_version_id,
274+
**kwargs
275+
)
276+
if wait_for_state:
277+
278+
if hasattr(client, 'get_key_version') and callable(getattr(client, 'get_key_version')):
279+
try:
280+
wait_period_kwargs = {}
281+
if max_wait_seconds is not None:
282+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
283+
if wait_interval_seconds is not None:
284+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
285+
286+
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
287+
result = oci.wait_until(client, client.get_key_version(key_id, result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
288+
except oci.exceptions.MaximumWaitTimeExceeded as e:
289+
# If we fail, we should show an error, but we should still provide the information to the customer
290+
click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
291+
cli_util.render_response(result, ctx)
292+
sys.exit(2)
293+
except Exception:
294+
click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
295+
cli_util.render_response(result, ctx)
296+
raise
297+
else:
298+
click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)

0 commit comments

Comments
 (0)