Skip to content

Commit 0ce8142

Browse files
authored
Merge pull request #60 from oracle/release_2018-04-20
Releasing version 2.4.21
2 parents 07c72dd + 3b43e03 commit 0ce8142

24 files changed

+529
-338
lines changed

CHANGELOG.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@ Change Log
44

55
All notable changes to this project will be documented in this file.
66

7-
The format is based on `Keep a
8-
Changelog <http://keepachangelog.com/>`__.
7+
The format is based on `Keep a Changelog <http://keepachangelog.com/>`__.
8+
9+
2.4.21 - 2018-04-19
10+
---------------------
11+
Added
12+
~~~~~~~~
13+
* Support for the following features for the Database service:
14+
15+
* Tagging support for the following resources
16+
17+
* Update database (``oci db database update --defined-tags --freeform-tags``)
18+
* Launch and update database system (``oci db system launch|update --defined-tags --freeform-tags``)
19+
20+
* Filter set of database versions based on database system ID (``oci db version list --db-system-id``)
921

1022
2.4.20 - 2018-04-05
1123
---------------------

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Jinja2==2.9.6
1212
jmespath==0.9.3
1313
ndg-httpsclient==0.4.2
1414
mock==2.0.0
15-
oci==1.3.18
15+
oci==1.3.19
1616
packaging==16.8
1717
pluggy==0.4.0
1818
py==1.4.33
@@ -32,3 +32,4 @@ terminaltables==3.1.0
3232
tox==2.9.1
3333
vcrpy==1.11.1
3434
virtualenv==15.1.0
35+
pytest-xdist==1.22.2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def open_relative(*path):
3030

3131

3232
requires = [
33-
'oci==1.3.18',
33+
'oci==1.3.19',
3434
'arrow==0.10.0',
3535
'certifi',
3636
'click==6.7',

src/oci_cli/bin/OciTabExpansion.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ $ociCommandsToLongParams = @{
194194
'db database list' = 'compartment-id db-system-id from-json help limit'
195195
'db database patch' = 'database-id from-json help patch-action patch-id'
196196
'db database restore' = 'database-id database-scn from-json help if-match latest timestamp'
197-
'db database update' = 'auto-backup-enabled database-id force from-json help if-match max-wait-seconds wait-for-state wait-interval-seconds'
197+
'db database update' = 'auto-backup-enabled database-id defined-tags force freeform-tags from-json help if-match max-wait-seconds wait-for-state wait-interval-seconds'
198198
'db node get' = 'db-node-id from-json help'
199199
'db node list' = 'all compartment-id db-system-id from-json help limit page page-size'
200200
'db node reset' = 'db-node-id from-json help if-match max-wait-seconds wait-for-state wait-interval-seconds'
@@ -210,13 +210,13 @@ $ociCommandsToLongParams = @{
210210
'db patch-history list by-database' = 'all database-id from-json help limit page page-size'
211211
'db patch-history list by-db-system' = 'all db-system-id from-json help limit page page-size'
212212
'db system get' = 'db-system-id from-json help'
213-
'db system launch' = 'admin-password availability-domain backup-subnet-id character-set cluster-name compartment-id cpu-core-count data-storage-percentage database-edition db-name db-version db-workload disk-redundancy display-name domain from-json help hostname initial-data-storage-size-in-gb license-model max-wait-seconds ncharacter-set node-count pdb-name shape ssh-authorized-keys-file subnet-id wait-for-state wait-interval-seconds'
213+
'db system launch' = 'admin-password availability-domain backup-subnet-id character-set cluster-name compartment-id cpu-core-count data-storage-percentage database-edition db-name db-version db-workload defined-tags disk-redundancy display-name domain freeform-tags from-json help hostname initial-data-storage-size-in-gb license-model max-wait-seconds ncharacter-set node-count pdb-name shape ssh-authorized-keys-file subnet-id wait-for-state wait-interval-seconds'
214214
'db system list' = 'all backup-id compartment-id from-json help limit page page-size'
215215
'db system patch' = 'db-system-id from-json help patch-action patch-id'
216216
'db system terminate' = 'db-system-id force from-json help if-match max-wait-seconds wait-for-state wait-interval-seconds'
217-
'db system update' = 'cpu-core-count data-storage-size-in-gbs db-system-id force from-json help if-match max-wait-seconds patch-action patch-id ssh-authorized-keys-file wait-for-state wait-interval-seconds'
217+
'db system update' = 'cpu-core-count data-storage-size-in-gbs db-system-id defined-tags force freeform-tags from-json help if-match max-wait-seconds patch-action patch-id ssh-authorized-keys-file wait-for-state wait-interval-seconds'
218218
'db system-shape list' = 'all availability-domain compartment-id from-json help limit page page-size'
219-
'db version list' = 'all compartment-id db-system-shape from-json help limit page page-size'
219+
'db version list' = 'all compartment-id db-system-id db-system-shape from-json help limit page page-size'
220220
'dns record domain delete' = 'compartment-id domain force from-json help if-match if-unmodified-since zone-name-or-id'
221221
'dns record domain get' = 'all compartment-id domain from-json help if-modified-since if-none-match limit page page-size rtype sort-by sort-order zone-name-or-id zone-version'
222222
'dns record domain patch' = 'compartment-id domain from-json help if-match if-unmodified-since items zone-name-or-id'

src/oci_cli/core_cli_extended.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,9 @@ def detach_vnic(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
589589
if hasattr(compute_client, 'get_vnic_attachment') and callable(getattr(compute_client, 'get_vnic_attachment')):
590590
try:
591591
wait_period_kwargs = {}
592-
if max_wait_seconds:
592+
if max_wait_seconds is not None:
593593
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
594-
if wait_interval_seconds:
594+
if wait_interval_seconds is not None:
595595
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
596596

597597
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)

src/oci_cli/database_cli_extended.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def create_database_from_backup(ctx, **kwargs):
129129
@database_cli.database_group.command(name='update', help="""Update a Database based on the request parameters you provide.""")
130130
@cli_util.option('--auto-backup-enabled', type=click.BOOL, help="""If set to true, schedules backups automatically. Default is false.""")
131131
@click.pass_context
132-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'Database'})
132+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}}, output_type={'module': 'database', 'class': 'Database'})
133133
@cli_util.wrap_exceptions
134134
def update_database_extended(ctx, **kwargs):
135135
if kwargs['auto_backup_enabled'] is not None:
@@ -292,7 +292,7 @@ def db_node_reset(ctx, **kwargs):
292292
@cli_util.option('--pdb-name', help="""Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.""")
293293
@cli_util.option('--ssh-authorized-keys-file', type=click.File('r'), help="""A file containing one or more public SSH keys to use for SSH access to the DB System. Use a newline character to separate multiple keys. The length of the combined keys cannot exceed 10,000 characters.""")
294294
@click.pass_context
295-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'DbSystem'})
295+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}}, output_type={'module': 'database', 'class': 'DbSystem'})
296296
@cli_util.wrap_exceptions
297297
def launch_db_system_extended(ctx, **kwargs):
298298
create_db_home_details = {}
@@ -345,7 +345,7 @@ def launch_db_system_extended(ctx, **kwargs):
345345
@cli_util.option('--patch-id', help="""The OCID of the patch.""")
346346
@cli_util.option('--ssh-authorized-keys-file', type=click.File('r'), help="""A file containing one or more public SSH keys to use for SSH access to the DB System. Use a newline character to separate multiple keys. The length of the combined keys cannot exceed 10,000 characters.""")
347347
@click.pass_context
348-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'DbSystem'})
348+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}}, output_type={'module': 'database', 'class': 'DbSystem'})
349349
@cli_util.wrap_exceptions
350350
def update_db_system_extended(ctx, **kwargs):
351351
if 'ssh_authorized_keys_file' in kwargs and kwargs['ssh_authorized_keys_file']:

src/oci_cli/generated/audit_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ def update_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_
114114
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
115115
try:
116116
wait_period_kwargs = {}
117-
if max_wait_seconds:
117+
if max_wait_seconds is not None:
118118
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
119-
if wait_interval_seconds:
119+
if wait_interval_seconds is not None:
120120
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
121121

122122
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)

src/oci_cli/generated/blockstorage_cli.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ def create_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
125125
if hasattr(client, 'get_volume') and callable(getattr(client, 'get_volume')):
126126
try:
127127
wait_period_kwargs = {}
128-
if max_wait_seconds:
128+
if max_wait_seconds is not None:
129129
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
130-
if wait_interval_seconds:
130+
if wait_interval_seconds is not None:
131131
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
132132

133133
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -187,9 +187,9 @@ def create_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_
187187
if hasattr(client, 'get_volume_backup') and callable(getattr(client, 'get_volume_backup')):
188188
try:
189189
wait_period_kwargs = {}
190-
if max_wait_seconds:
190+
if max_wait_seconds is not None:
191191
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
192-
if wait_interval_seconds:
192+
if wait_interval_seconds is not None:
193193
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
194194

195195
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -253,9 +253,9 @@ def delete_boot_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
253253
if hasattr(client, 'get_boot_volume') and callable(getattr(client, 'get_boot_volume')):
254254
try:
255255
wait_period_kwargs = {}
256-
if max_wait_seconds:
256+
if max_wait_seconds is not None:
257257
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
258-
if wait_interval_seconds:
258+
if wait_interval_seconds is not None:
259259
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
260260

261261
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -308,9 +308,9 @@ def delete_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
308308
if hasattr(client, 'get_volume') and callable(getattr(client, 'get_volume')):
309309
try:
310310
wait_period_kwargs = {}
311-
if max_wait_seconds:
311+
if max_wait_seconds is not None:
312312
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
313-
if wait_interval_seconds:
313+
if wait_interval_seconds is not None:
314314
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
315315

316316
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -363,9 +363,9 @@ def delete_volume_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_
363363
if hasattr(client, 'get_volume_backup') and callable(getattr(client, 'get_volume_backup')):
364364
try:
365365
wait_period_kwargs = {}
366-
if max_wait_seconds:
366+
if max_wait_seconds is not None:
367367
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
368-
if wait_interval_seconds:
368+
if wait_interval_seconds is not None:
369369
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
370370

371371
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -806,9 +806,9 @@ def update_boot_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
806806
if hasattr(client, 'get_boot_volume') and callable(getattr(client, 'get_boot_volume')):
807807
try:
808808
wait_period_kwargs = {}
809-
if max_wait_seconds:
809+
if max_wait_seconds is not None:
810810
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
811-
if wait_interval_seconds:
811+
if wait_interval_seconds is not None:
812812
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
813813

814814
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -873,9 +873,9 @@ def update_volume(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_
873873
if hasattr(client, 'get_volume') and callable(getattr(client, 'get_volume')):
874874
try:
875875
wait_period_kwargs = {}
876-
if max_wait_seconds:
876+
if max_wait_seconds is not None:
877877
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
878-
if wait_interval_seconds:
878+
if wait_interval_seconds is not None:
879879
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
880880

881881
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -940,9 +940,9 @@ def update_volume_backup(ctx, from_json, force, wait_for_state, max_wait_seconds
940940
if hasattr(client, 'get_volume_backup') and callable(getattr(client, 'get_volume_backup')):
941941
try:
942942
wait_period_kwargs = {}
943-
if max_wait_seconds:
943+
if max_wait_seconds is not None:
944944
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
945-
if wait_interval_seconds:
945+
if wait_interval_seconds is not None:
946946
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
947947

948948
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)

0 commit comments

Comments
 (0)