diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 3ce58c609..76c6088fe 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -4,8 +4,20 @@ Change Log
All notable changes to this project will be documented in this file.
-The format is based on `Keep a
-Changelog `__.
+The format is based on `Keep a Changelog `__.
+
+2.4.21 - 2018-04-19
+---------------------
+Added
+~~~~~~~~
+* Support for the following features for the Database service:
+
+ * Tagging support for the following resources
+
+ * Update database (``oci db database update --defined-tags --freeform-tags``)
+ * Launch and update database system (``oci db system launch|update --defined-tags --freeform-tags``)
+
+ * Filter set of database versions based on database system ID (``oci db version list --db-system-id``)
2.4.20 - 2018-04-05
---------------------
diff --git a/requirements.txt b/requirements.txt
index d9cbbbf89..2929896a7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,7 +12,7 @@ Jinja2==2.9.6
jmespath==0.9.3
ndg-httpsclient==0.4.2
mock==2.0.0
-oci==1.3.18
+oci==1.3.19
packaging==16.8
pluggy==0.4.0
py==1.4.33
@@ -32,3 +32,4 @@ terminaltables==3.1.0
tox==2.9.1
vcrpy==1.11.1
virtualenv==15.1.0
+pytest-xdist==1.22.2
diff --git a/setup.py b/setup.py
index 9e9d1b0b7..be6546f5d 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ def open_relative(*path):
requires = [
- 'oci==1.3.18',
+ 'oci==1.3.19',
'arrow==0.10.0',
'certifi',
'click==6.7',
diff --git a/src/oci_cli/bin/OciTabExpansion.ps1 b/src/oci_cli/bin/OciTabExpansion.ps1
index 0632e4ba1..60a66c119 100644
--- a/src/oci_cli/bin/OciTabExpansion.ps1
+++ b/src/oci_cli/bin/OciTabExpansion.ps1
@@ -194,7 +194,7 @@ $ociCommandsToLongParams = @{
'db database list' = 'compartment-id db-system-id from-json help limit'
'db database patch' = 'database-id from-json help patch-action patch-id'
'db database restore' = 'database-id database-scn from-json help if-match latest timestamp'
- 'db database update' = 'auto-backup-enabled database-id force from-json help if-match max-wait-seconds wait-for-state wait-interval-seconds'
+ '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'
'db node get' = 'db-node-id from-json help'
'db node list' = 'all compartment-id db-system-id from-json help limit page page-size'
'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 = @{
'db patch-history list by-database' = 'all database-id from-json help limit page page-size'
'db patch-history list by-db-system' = 'all db-system-id from-json help limit page page-size'
'db system get' = 'db-system-id from-json help'
- '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'
+ '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'
'db system list' = 'all backup-id compartment-id from-json help limit page page-size'
'db system patch' = 'db-system-id from-json help patch-action patch-id'
'db system terminate' = 'db-system-id force from-json help if-match max-wait-seconds wait-for-state wait-interval-seconds'
- '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'
+ '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'
'db system-shape list' = 'all availability-domain compartment-id from-json help limit page page-size'
- 'db version list' = 'all compartment-id db-system-shape from-json help limit page page-size'
+ 'db version list' = 'all compartment-id db-system-id db-system-shape from-json help limit page page-size'
'dns record domain delete' = 'compartment-id domain force from-json help if-match if-unmodified-since zone-name-or-id'
'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'
'dns record domain patch' = 'compartment-id domain from-json help if-match if-unmodified-since items zone-name-or-id'
diff --git a/src/oci_cli/core_cli_extended.py b/src/oci_cli/core_cli_extended.py
index 058f5116f..32b462833 100644
--- a/src/oci_cli/core_cli_extended.py
+++ b/src/oci_cli/core_cli_extended.py
@@ -589,9 +589,9 @@ def detach_vnic(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(compute_client, 'get_vnic_attachment') and callable(getattr(compute_client, 'get_vnic_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/database_cli_extended.py b/src/oci_cli/database_cli_extended.py
index c557f9fee..62e7f4be9 100644
--- a/src/oci_cli/database_cli_extended.py
+++ b/src/oci_cli/database_cli_extended.py
@@ -129,7 +129,7 @@ def create_database_from_backup(ctx, **kwargs):
@database_cli.database_group.command(name='update', help="""Update a Database based on the request parameters you provide.""")
@cli_util.option('--auto-backup-enabled', type=click.BOOL, help="""If set to true, schedules backups automatically. Default is false.""")
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'Database'})
+@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'})
@cli_util.wrap_exceptions
def update_database_extended(ctx, **kwargs):
if kwargs['auto_backup_enabled'] is not None:
@@ -292,7 +292,7 @@ def db_node_reset(ctx, **kwargs):
@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.""")
@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.""")
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'DbSystem'})
+@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'})
@cli_util.wrap_exceptions
def launch_db_system_extended(ctx, **kwargs):
create_db_home_details = {}
@@ -345,7 +345,7 @@ def launch_db_system_extended(ctx, **kwargs):
@cli_util.option('--patch-id', help="""The OCID of the patch.""")
@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.""")
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'DbSystem'})
+@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'})
@cli_util.wrap_exceptions
def update_db_system_extended(ctx, **kwargs):
if 'ssh_authorized_keys_file' in kwargs and kwargs['ssh_authorized_keys_file']:
diff --git a/src/oci_cli/generated/audit_cli.py b/src/oci_cli/generated/audit_cli.py
index 35f4fd696..3a5ab1831 100644
--- a/src/oci_cli/generated/audit_cli.py
+++ b/src/oci_cli/generated/audit_cli.py
@@ -114,9 +114,9 @@ def update_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/blockstorage_cli.py b/src/oci_cli/generated/blockstorage_cli.py
index 284ba026c..232c27df7 100644
--- a/src/oci_cli/generated/blockstorage_cli.py
+++ b/src/oci_cli/generated/blockstorage_cli.py
@@ -125,9 +125,9 @@ def create_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_volume') and callable(getattr(client, 'get_volume')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
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_
if hasattr(client, 'get_volume_backup') and callable(getattr(client, 'get_volume_backup')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
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
if hasattr(client, 'get_boot_volume') and callable(getattr(client, 'get_boot_volume')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
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
if hasattr(client, 'get_volume') and callable(getattr(client, 'get_volume')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
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_
if hasattr(client, 'get_volume_backup') and callable(getattr(client, 'get_volume_backup')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
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
if hasattr(client, 'get_boot_volume') and callable(getattr(client, 'get_boot_volume')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
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_
if hasattr(client, 'get_volume') and callable(getattr(client, 'get_volume')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
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
if hasattr(client, 'get_volume_backup') and callable(getattr(client, 'get_volume_backup')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/compute_cli.py b/src/oci_cli/generated/compute_cli.py
index 4b2306356..74715f478 100644
--- a/src/oci_cli/generated/compute_cli.py
+++ b/src/oci_cli/generated/compute_cli.py
@@ -129,9 +129,9 @@ def attach_boot_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_boot_volume_attachment') and callable(getattr(client, 'get_boot_volume_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -179,9 +179,9 @@ def attach_vnic(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(client, 'get_vnic_attachment') and callable(getattr(client, 'get_vnic_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -231,9 +231,9 @@ def attach_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_volume_attachment') and callable(getattr(client, 'get_volume_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -291,9 +291,9 @@ def capture_console_history(ctx, from_json, wait_for_state, max_wait_seconds, wa
if hasattr(client, 'get_console_history') and callable(getattr(client, 'get_console_history')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -375,9 +375,9 @@ def create_image(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
if hasattr(client, 'get_image') and callable(getattr(client, 'get_image')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -431,9 +431,9 @@ def create_instance_console_connection(ctx, from_json, wait_for_state, max_wait_
if hasattr(client, 'get_instance_console_connection') and callable(getattr(client, 'get_instance_console_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -474,9 +474,9 @@ def delete_console_history(ctx, from_json, wait_for_state, max_wait_seconds, wai
if hasattr(client, 'get_console_history') and callable(getattr(client, 'get_console_history')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -529,9 +529,9 @@ def delete_image(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
if hasattr(client, 'get_image') and callable(getattr(client, 'get_image')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -584,9 +584,9 @@ def delete_instance_console_connection(ctx, from_json, wait_for_state, max_wait_
if hasattr(client, 'get_instance_console_connection') and callable(getattr(client, 'get_instance_console_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -641,9 +641,9 @@ def detach_boot_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_boot_volume_attachment') and callable(getattr(client, 'get_boot_volume_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -698,9 +698,9 @@ def detach_vnic(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(client, 'get_vnic_attachment') and callable(getattr(client, 'get_vnic_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -755,9 +755,9 @@ def detach_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_volume_attachment') and callable(getattr(client, 'get_volume_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1043,9 +1043,9 @@ def instance_action(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if hasattr(client, 'get_instance') and callable(getattr(client, 'get_instance')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1197,9 +1197,9 @@ def launch_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if hasattr(client, 'get_instance') and callable(getattr(client, 'get_instance')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1749,9 +1749,9 @@ def terminate_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_instance') and callable(getattr(client, 'get_instance')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1828,9 +1828,9 @@ def update_console_history(ctx, from_json, force, wait_for_state, max_wait_secon
if hasattr(client, 'get_console_history') and callable(getattr(client, 'get_console_history')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1897,9 +1897,9 @@ def update_image(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_image') and callable(getattr(client, 'get_image')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1966,9 +1966,9 @@ def update_instance(ctx, from_json, force, wait_for_state, max_wait_seconds, wai
if hasattr(client, 'get_instance') and callable(getattr(client, 'get_instance')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/database_cli.py b/src/oci_cli/generated/database_cli.py
index 78e457bac..b4d2cf9fe 100644
--- a/src/oci_cli/generated/database_cli.py
+++ b/src/oci_cli/generated/database_cli.py
@@ -131,9 +131,9 @@ def create_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_backup') and callable(getattr(client, 'get_backup')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -204,9 +204,9 @@ def create_data_guard_association(ctx, from_json, wait_for_state, max_wait_secon
if hasattr(client, 'get_data_guard_association') and callable(getattr(client, 'get_data_guard_association')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -252,9 +252,9 @@ def create_db_home(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
if hasattr(client, 'get_db_home') and callable(getattr(client, 'get_db_home')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -306,9 +306,9 @@ def db_node_action(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
if hasattr(client, 'get_db_node') and callable(getattr(client, 'get_db_node')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -349,9 +349,9 @@ def delete_backup(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_backup') and callable(getattr(client, 'get_backup')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -407,9 +407,9 @@ def delete_db_home(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
if hasattr(client, 'get_db_home') and callable(getattr(client, 'get_db_home')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -728,21 +728,27 @@ def get_db_system_patch_history_entry(ctx, from_json, db_system_id, patch_histor
**Subnet Restrictions:** See above subnetId's **Subnet Restriction**.""")
@cli_util.option('--cluster-name', help="""Cluster name for Exadata and 2-node RAC DB Systems. The cluster name must begin with an an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.""")
@cli_util.option('--data-storage-percentage', type=click.INT, help="""The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Specify 80 or 40. The default is 80 percent assigned to DATA storage. This is not applicable for VM based DB systems.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help="""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('--disk-redundancy', type=custom_types.CliCaseInsensitiveChoice(["HIGH", "NORMAL"]), help="""The type of redundancy configured for the DB System. Normal is 2-way redundancy, recommended for test and development systems. High is 3-way redundancy, recommended for production systems.""")
@cli_util.option('--display-name', help="""The user-friendly name for the DB System. It does not have to be unique.""")
@cli_util.option('--domain', help="""A domain name used for the DB System. If the Oracle-provided Internet and VCN Resolver is enabled for the specified subnet, the domain name for the subnet is used (don't provide one). Otherwise, provide a valid DNS domain name. Hyphens (-) are not permitted.""")
+@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help="""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('--initial-data-storage-size-in-gb', type=click.INT, help="""Size, in GBs, of the initial data volume that will be created and attached to VM-shape based DB system. This storage can later be scaled up if needed. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume.""")
@cli_util.option('--license-model', type=custom_types.CliCaseInsensitiveChoice(["LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"]), help="""The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED.""")
@cli_util.option('--node-count', type=click.INT, help="""Number of nodes to launch for a VM-shape based RAC DB system.""")
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "FAILED"]), help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle 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 resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
-@json_skeleton_utils.get_cli_json_input_option({'db-home': {'module': 'database', 'class': 'CreateDbHomeDetails'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}})
+@json_skeleton_utils.get_cli_json_input_option({'db-home': {'module': 'database', 'class': 'CreateDbHomeDetails'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'db-home': {'module': 'database', 'class': 'CreateDbHomeDetails'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}}, output_type={'module': 'database', 'class': 'DbSystem'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'db-home': {'module': 'database', 'class': 'CreateDbHomeDetails'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}}, output_type={'module': 'database', 'class': 'DbSystem'})
@cli_util.wrap_exceptions
-def launch_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, cpu_core_count, database_edition, db_home, hostname, shape, ssh_public_keys, subnet_id, backup_subnet_id, cluster_name, data_storage_percentage, disk_redundancy, display_name, domain, initial_data_storage_size_in_gb, license_model, node_count):
+def launch_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, cpu_core_count, database_edition, db_home, hostname, shape, ssh_public_keys, subnet_id, backup_subnet_id, cluster_name, data_storage_percentage, defined_tags, disk_redundancy, display_name, domain, freeform_tags, initial_data_storage_size_in_gb, license_model, node_count):
kwargs = {}
details = {}
@@ -765,6 +771,9 @@ def launch_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte
if data_storage_percentage is not None:
details['dataStoragePercentage'] = data_storage_percentage
+ if defined_tags is not None:
+ details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
if disk_redundancy is not None:
details['diskRedundancy'] = disk_redundancy
@@ -774,6 +783,9 @@ def launch_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte
if domain is not None:
details['domain'] = domain
+ if freeform_tags is not None:
+ details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
if initial_data_storage_size_in_gb is not None:
details['initialDataStorageSizeInGB'] = initial_data_storage_size_in_gb
@@ -792,9 +804,9 @@ def launch_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte
if hasattr(client, 'get_db_system') and callable(getattr(client, 'get_db_system')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1354,6 +1366,7 @@ def list_db_systems(ctx, from_json, all_pages, page_size, compartment_id, limit,
@cli_util.option('--limit', type=click.INT, help="""The maximum number of items to return.""")
@cli_util.option('--page', help="""The pagination token to continue listing from.""")
@cli_util.option('--db-system-shape', help="""If provided, filters the results to the set of database versions which are supported for the given shape.""")
+@cli_util.option('--db-system-id', help="""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('--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({})
@@ -1361,7 +1374,7 @@ def list_db_systems(ctx, from_json, all_pages, page_size, compartment_id, limit,
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'list[DbVersionSummary]'})
@cli_util.wrap_exceptions
-def list_db_versions(ctx, from_json, all_pages, page_size, compartment_id, limit, page, db_system_shape):
+def list_db_versions(ctx, from_json, all_pages, page_size, compartment_id, limit, page, db_system_shape, db_system_id):
if all_pages and limit:
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
@@ -1372,6 +1385,8 @@ def list_db_versions(ctx, from_json, all_pages, page_size, compartment_id, limit
kwargs['page'] = page
if db_system_shape is not None:
kwargs['db_system_shape'] = db_system_shape
+ if db_system_id is not None:
+ kwargs['db_system_id'] = db_system_id
client = cli_util.build_client('database', ctx)
if all_pages:
if page_size:
@@ -1535,9 +1550,9 @@ def terminate_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_db_system') and callable(getattr(client, 'get_db_system')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1565,23 +1580,29 @@ def terminate_db_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
@database_group.command(name=cli_util.override('update_database.command_name', 'update'), help="""Update a Database based on the request parameters you provide.""")
@cli_util.option('--database-id', required=True, help="""The database [OCID].""")
@cli_util.option('--db-backup-config', type=custom_types.CLI_COMPLEX_TYPE, help="""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help="""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('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help="""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('--if-match', help="""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('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["PROVISIONING", "AVAILABLE", "UPDATING", "BACKUP_IN_PROGRESS", "TERMINATING", "TERMINATED", "RESTORE_FAILED", "FAILED"]), help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle 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 resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
-@json_skeleton_utils.get_cli_json_input_option({'db-backup-config': {'module': 'database', 'class': 'DbBackupConfig'}})
+@json_skeleton_utils.get_cli_json_input_option({'db-backup-config': {'module': 'database', 'class': 'DbBackupConfig'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'db-backup-config': {'module': 'database', 'class': 'DbBackupConfig'}}, output_type={'module': 'database', 'class': 'Database'})
+@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'db-backup-config': {'module': 'database', 'class': 'DbBackupConfig'}, 'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}}, output_type={'module': 'database', 'class': 'Database'})
@cli_util.wrap_exceptions
-def update_database(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, database_id, db_backup_config, if_match):
+def update_database(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, database_id, db_backup_config, defined_tags, freeform_tags, if_match):
if isinstance(database_id, six.string_types) and len(database_id.strip()) == 0:
raise click.UsageError('Parameter --database-id cannot be whitespace or empty string')
if not force:
- if db_backup_config:
- if not click.confirm("WARNING: Updates to db-backup-config will replace any existing values. Are you sure you want to continue?"):
+ if db_backup_config or defined_tags or freeform_tags:
+ if not click.confirm("WARNING: Updates to db-backup-config and defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
ctx.abort()
kwargs = {}
if if_match is not None:
@@ -1592,6 +1613,12 @@ def update_database(ctx, from_json, force, wait_for_state, max_wait_seconds, wai
if db_backup_config is not None:
details['dbBackupConfig'] = cli_util.parse_json_parameter("db_backup_config", db_backup_config)
+ if defined_tags is not None:
+ details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
client = cli_util.build_client('database', ctx)
result = client.update_database(
database_id=database_id,
@@ -1602,9 +1629,9 @@ def update_database(ctx, from_json, force, wait_for_state, max_wait_seconds, wai
if hasattr(client, 'get_database') and callable(getattr(client, 'get_database')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1657,9 +1684,9 @@ def update_db_home(ctx, from_json, force, wait_for_state, max_wait_seconds, wait
if hasattr(client, 'get_db_home') and callable(getattr(client, 'get_db_home')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1676,6 +1703,12 @@ def update_db_home(ctx, from_json, force, wait_for_state, max_wait_seconds, wait
@cli_util.option('--db-system-id', required=True, help="""The DB System [OCID].""")
@cli_util.option('--cpu-core-count', type=click.INT, help="""The number of CPU Cores to be set on the DB System. Applicable only for non-VM based DB systems.""")
@cli_util.option('--data-storage-size-in-gbs', type=click.INT, help="""Size, in GBs, to which the currently attached storage needs to be scaled up to for VM based DB system. This must be greater than current storage size. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume.""")
+@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help="""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('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help="""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('--ssh-public-keys', type=custom_types.CLI_COMPLEX_TYPE, help="""The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--version', type=custom_types.CLI_COMPLEX_TYPE, help="""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
@cli_util.option('--if-match', help="""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.""")
@@ -1683,18 +1716,18 @@ def update_db_home(ctx, from_json, force, wait_for_state, max_wait_seconds, wait
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["PROVISIONING", "AVAILABLE", "UPDATING", "TERMINATING", "TERMINATED", "FAILED"]), help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state.""")
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle 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 resource to see if it has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
-@json_skeleton_utils.get_cli_json_input_option({'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'version': {'module': 'database', 'class': 'PatchDetails'}})
+@json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'database', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'database', 'class': 'dict(str, string)'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'version': {'module': 'database', 'class': 'PatchDetails'}})
@cli_util.help_option
@click.pass_context
-@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'version': {'module': 'database', 'class': 'PatchDetails'}}, output_type={'module': 'database', 'class': 'DbSystem'})
+@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)'}, 'ssh-public-keys': {'module': 'database', 'class': 'list[string]'}, 'version': {'module': 'database', 'class': 'PatchDetails'}}, output_type={'module': 'database', 'class': 'DbSystem'})
@cli_util.wrap_exceptions
-def update_db_system(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, db_system_id, cpu_core_count, data_storage_size_in_gbs, ssh_public_keys, version, if_match):
+def update_db_system(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, db_system_id, cpu_core_count, data_storage_size_in_gbs, defined_tags, freeform_tags, ssh_public_keys, version, if_match):
if isinstance(db_system_id, six.string_types) and len(db_system_id.strip()) == 0:
raise click.UsageError('Parameter --db-system-id cannot be whitespace or empty string')
if not force:
- if ssh_public_keys or version:
- if not click.confirm("WARNING: Updates to ssh-public-keys and version will replace any existing values. Are you sure you want to continue?"):
+ if defined_tags or freeform_tags or ssh_public_keys or version:
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags and ssh-public-keys and version will replace any existing values. Are you sure you want to continue?"):
ctx.abort()
kwargs = {}
if if_match is not None:
@@ -1708,6 +1741,12 @@ def update_db_system(ctx, from_json, force, wait_for_state, max_wait_seconds, wa
if data_storage_size_in_gbs is not None:
details['dataStorageSizeInGBs'] = data_storage_size_in_gbs
+ if defined_tags is not None:
+ details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
+
+ if freeform_tags is not None:
+ details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
+
if ssh_public_keys is not None:
details['sshPublicKeys'] = cli_util.parse_json_parameter("ssh_public_keys", ssh_public_keys)
@@ -1724,9 +1763,9 @@ def update_db_system(ctx, from_json, force, wait_for_state, max_wait_seconds, wa
if hasattr(client, 'get_db_system') and callable(getattr(client, 'get_db_system')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/dns_cli.py b/src/oci_cli/generated/dns_cli.py
index e09c31704..e866b8f1d 100644
--- a/src/oci_cli/generated/dns_cli.py
+++ b/src/oci_cli/generated/dns_cli.py
@@ -87,9 +87,9 @@ def create_zone(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(client, 'get_zone') and callable(getattr(client, 'get_zone')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -211,9 +211,9 @@ def delete_zone(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(client, 'get_zone') and callable(getattr(client, 'get_zone')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -848,9 +848,9 @@ def update_zone(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_zone') and callable(getattr(client, 'get_zone')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/email_cli.py b/src/oci_cli/generated/email_cli.py
index 1ab2a76ec..97f359843 100644
--- a/src/oci_cli/generated/email_cli.py
+++ b/src/oci_cli/generated/email_cli.py
@@ -67,9 +67,9 @@ def create_sender(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_sender') and callable(getattr(client, 'get_sender')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -134,9 +134,9 @@ def delete_sender(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_sender') and callable(getattr(client, 'get_sender')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/filestorage_cli.py b/src/oci_cli/generated/filestorage_cli.py
index 7ffed132a..e2bba72d6 100644
--- a/src/oci_cli/generated/filestorage_cli.py
+++ b/src/oci_cli/generated/filestorage_cli.py
@@ -100,9 +100,9 @@ def create_export(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_export') and callable(getattr(client, 'get_export')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -158,9 +158,9 @@ def create_file_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_file_system') and callable(getattr(client, 'get_file_system')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -232,9 +232,9 @@ def create_mount_target(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_mount_target') and callable(getattr(client, 'get_mount_target')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -278,9 +278,9 @@ def create_snapshot(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if hasattr(client, 'get_snapshot') and callable(getattr(client, 'get_snapshot')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -321,9 +321,9 @@ def delete_export(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_export') and callable(getattr(client, 'get_export')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -376,9 +376,9 @@ def delete_file_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_file_system') and callable(getattr(client, 'get_file_system')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -431,9 +431,9 @@ def delete_mount_target(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_mount_target') and callable(getattr(client, 'get_mount_target')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -486,9 +486,9 @@ def delete_snapshot(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if hasattr(client, 'get_snapshot') and callable(getattr(client, 'get_snapshot')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1003,9 +1003,9 @@ def update_export_set(ctx, from_json, wait_for_state, max_wait_seconds, wait_int
if hasattr(client, 'get_export_set') and callable(getattr(client, 'get_export_set')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1055,9 +1055,9 @@ def update_file_system(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_file_system') and callable(getattr(client, 'get_file_system')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1107,9 +1107,9 @@ def update_mount_target(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_mount_target') and callable(getattr(client, 'get_mount_target')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/identity_cli.py b/src/oci_cli/generated/identity_cli.py
index c84fdc497..03e144b25 100644
--- a/src/oci_cli/generated/identity_cli.py
+++ b/src/oci_cli/generated/identity_cli.py
@@ -215,9 +215,9 @@ def add_user_to_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_int
if hasattr(client, 'get_user_group_membership') and callable(getattr(client, 'get_user_group_membership')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -277,9 +277,9 @@ def create_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_compartment') and callable(getattr(client, 'get_compartment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -361,9 +361,9 @@ def create_dynamic_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_dynamic_group') and callable(getattr(client, 'get_dynamic_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -423,9 +423,9 @@ def create_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
if hasattr(client, 'get_group') and callable(getattr(client, 'get_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -491,9 +491,9 @@ def create_identity_provider(ctx, from_json, wait_for_state, max_wait_seconds, w
if hasattr(client, 'get_identity_provider') and callable(getattr(client, 'get_identity_provider')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -538,9 +538,9 @@ def create_idp_group_mapping(ctx, from_json, wait_for_state, max_wait_seconds, w
if hasattr(client, 'get_idp_group_mapping') and callable(getattr(client, 'get_idp_group_mapping')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -630,9 +630,9 @@ def create_policy(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_policy') and callable(getattr(client, 'get_policy')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -863,9 +863,9 @@ def create_user(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(client, 'get_user') and callable(getattr(client, 'get_user')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -966,9 +966,9 @@ def delete_dynamic_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_dynamic_group') and callable(getattr(client, 'get_dynamic_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1021,9 +1021,9 @@ def delete_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
if hasattr(client, 'get_group') and callable(getattr(client, 'get_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1076,9 +1076,9 @@ def delete_identity_provider(ctx, from_json, wait_for_state, max_wait_seconds, w
if hasattr(client, 'get_identity_provider') and callable(getattr(client, 'get_identity_provider')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1160,9 +1160,9 @@ def delete_policy(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_policy') and callable(getattr(client, 'get_policy')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1273,9 +1273,9 @@ def delete_user(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(client, 'get_user') and callable(getattr(client, 'get_user')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2227,9 +2227,9 @@ def update_compartment(ctx, from_json, force, wait_for_state, max_wait_seconds,
if hasattr(client, 'get_compartment') and callable(getattr(client, 'get_compartment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2317,9 +2317,9 @@ def update_dynamic_group(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_dynamic_group') and callable(getattr(client, 'get_dynamic_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2380,9 +2380,9 @@ def update_group(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_group') and callable(getattr(client, 'get_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2447,9 +2447,9 @@ def update_identity_provider(ctx, from_json, force, wait_for_state, max_wait_sec
if hasattr(client, 'get_identity_provider') and callable(getattr(client, 'get_identity_provider')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2506,9 +2506,9 @@ def update_idp_group_mapping(ctx, from_json, wait_for_state, max_wait_seconds, w
if hasattr(client, 'get_idp_group_mapping') and callable(getattr(client, 'get_idp_group_mapping')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2579,9 +2579,9 @@ def update_policy(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_policy') and callable(getattr(client, 'get_policy')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2813,9 +2813,9 @@ def update_user(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_user') and callable(getattr(client, 'get_user')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/loadbalancer_cli.py b/src/oci_cli/generated/loadbalancer_cli.py
index c4e95de8f..70870fd11 100644
--- a/src/oci_cli/generated/loadbalancer_cli.py
+++ b/src/oci_cli/generated/loadbalancer_cli.py
@@ -198,9 +198,9 @@ def create_backend(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -268,9 +268,9 @@ def create_backend_set(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -346,9 +346,9 @@ def create_certificate(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -420,9 +420,9 @@ def create_listener(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -519,9 +519,9 @@ def create_load_balancer(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -571,9 +571,9 @@ def create_path_route_set(ctx, from_json, wait_for_state, max_wait_seconds, wait
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -626,9 +626,9 @@ def delete_backend(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -676,9 +676,9 @@ def delete_backend_set(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -724,9 +724,9 @@ def delete_certificate(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -772,9 +772,9 @@ def delete_listener(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -813,9 +813,9 @@ def delete_load_balancer(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -863,9 +863,9 @@ def delete_path_route_set(ctx, from_json, wait_for_state, max_wait_seconds, wait
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1599,9 +1599,9 @@ def update_backend(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1671,9 +1671,9 @@ def update_backend_set(ctx, from_json, force, wait_for_state, max_wait_seconds,
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1756,9 +1756,9 @@ def update_health_checker(ctx, from_json, wait_for_state, max_wait_seconds, wait
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1838,9 +1838,9 @@ def update_listener(ctx, from_json, force, wait_for_state, max_wait_seconds, wai
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1886,9 +1886,9 @@ def update_load_balancer(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1948,9 +1948,9 @@ def update_path_route_set(ctx, from_json, force, wait_for_state, max_wait_second
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/generated/virtualnetwork_cli.py b/src/oci_cli/generated/virtualnetwork_cli.py
index fc9ea01ca..9e6d1f181 100644
--- a/src/oci_cli/generated/virtualnetwork_cli.py
+++ b/src/oci_cli/generated/virtualnetwork_cli.py
@@ -452,9 +452,9 @@ def create_cross_connect(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_cross_connect') and callable(getattr(client, 'get_cross_connect')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -500,9 +500,9 @@ def create_cross_connect_group(ctx, from_json, wait_for_state, max_wait_seconds,
if hasattr(client, 'get_cross_connect_group') and callable(getattr(client, 'get_cross_connect_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -564,9 +564,9 @@ def create_dhcp_options(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_dhcp_options') and callable(getattr(client, 'get_dhcp_options')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -612,9 +612,9 @@ def create_drg(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s
if hasattr(client, 'get_drg') and callable(getattr(client, 'get_drg')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -662,9 +662,9 @@ def create_drg_attachment(ctx, from_json, wait_for_state, max_wait_seconds, wait
if hasattr(client, 'get_drg_attachment') and callable(getattr(client, 'get_drg_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -718,9 +718,9 @@ def create_internet_gateway(ctx, from_json, wait_for_state, max_wait_seconds, wa
if hasattr(client, 'get_internet_gateway') and callable(getattr(client, 'get_internet_gateway')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -780,9 +780,9 @@ def create_ip_sec_connection(ctx, from_json, wait_for_state, max_wait_seconds, w
if hasattr(client, 'get_ip_sec_connection') and callable(getattr(client, 'get_ip_sec_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -826,9 +826,9 @@ def create_local_peering_gateway(ctx, from_json, wait_for_state, max_wait_second
if hasattr(client, 'get_local_peering_gateway') and callable(getattr(client, 'get_local_peering_gateway')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -939,9 +939,9 @@ def create_public_ip(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte
if hasattr(client, 'get_public_ip') and callable(getattr(client, 'get_public_ip')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -985,9 +985,9 @@ def create_remote_peering_connection(ctx, from_json, wait_for_state, max_wait_se
if hasattr(client, 'get_remote_peering_connection') and callable(getattr(client, 'get_remote_peering_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1049,9 +1049,9 @@ def create_route_table(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_route_table') and callable(getattr(client, 'get_route_table')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1115,9 +1115,9 @@ def create_security_list(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_security_list') and callable(getattr(client, 'get_security_list')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1221,9 +1221,9 @@ def create_subnet(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_subnet') and callable(getattr(client, 'get_subnet')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1303,9 +1303,9 @@ def create_vcn(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s
if hasattr(client, 'get_vcn') and callable(getattr(client, 'get_vcn')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1397,9 +1397,9 @@ def create_virtual_circuit(ctx, from_json, wait_for_state, max_wait_seconds, wai
if hasattr(client, 'get_virtual_circuit') and callable(getattr(client, 'get_virtual_circuit')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1464,9 +1464,9 @@ def delete_cross_connect(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_cross_connect') and callable(getattr(client, 'get_cross_connect')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1519,9 +1519,9 @@ def delete_cross_connect_group(ctx, from_json, wait_for_state, max_wait_seconds,
if hasattr(client, 'get_cross_connect_group') and callable(getattr(client, 'get_cross_connect_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1576,9 +1576,9 @@ def delete_dhcp_options(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
if hasattr(client, 'get_dhcp_options') and callable(getattr(client, 'get_dhcp_options')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1631,9 +1631,9 @@ def delete_drg(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s
if hasattr(client, 'get_drg') and callable(getattr(client, 'get_drg')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1686,9 +1686,9 @@ def delete_drg_attachment(ctx, from_json, wait_for_state, max_wait_seconds, wait
if hasattr(client, 'get_drg_attachment') and callable(getattr(client, 'get_drg_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1743,9 +1743,9 @@ def delete_internet_gateway(ctx, from_json, wait_for_state, max_wait_seconds, wa
if hasattr(client, 'get_internet_gateway') and callable(getattr(client, 'get_internet_gateway')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1800,9 +1800,9 @@ def delete_ip_sec_connection(ctx, from_json, wait_for_state, max_wait_seconds, w
if hasattr(client, 'get_ip_sec_connection') and callable(getattr(client, 'get_ip_sec_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1857,9 +1857,9 @@ def delete_local_peering_gateway(ctx, from_json, wait_for_state, max_wait_second
if hasattr(client, 'get_local_peering_gateway') and callable(getattr(client, 'get_local_peering_gateway')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -1944,9 +1944,9 @@ def delete_public_ip(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte
if hasattr(client, 'get_public_ip') and callable(getattr(client, 'get_public_ip')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2001,9 +2001,9 @@ def delete_remote_peering_connection(ctx, from_json, wait_for_state, max_wait_se
if hasattr(client, 'get_remote_peering_connection') and callable(getattr(client, 'get_remote_peering_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2058,9 +2058,9 @@ def delete_route_table(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
if hasattr(client, 'get_route_table') and callable(getattr(client, 'get_route_table')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2115,9 +2115,9 @@ def delete_security_list(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_security_list') and callable(getattr(client, 'get_security_list')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2170,9 +2170,9 @@ def delete_subnet(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
if hasattr(client, 'get_subnet') and callable(getattr(client, 'get_subnet')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2225,9 +2225,9 @@ def delete_vcn(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s
if hasattr(client, 'get_vcn') and callable(getattr(client, 'get_vcn')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -2282,9 +2282,9 @@ def delete_virtual_circuit(ctx, from_json, wait_for_state, max_wait_seconds, wai
if hasattr(client, 'get_virtual_circuit') and callable(getattr(client, 'get_virtual_circuit')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4192,9 +4192,9 @@ def update_cross_connect(ctx, from_json, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_cross_connect') and callable(getattr(client, 'get_cross_connect')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4242,9 +4242,9 @@ def update_cross_connect_group(ctx, from_json, wait_for_state, max_wait_seconds,
if hasattr(client, 'get_cross_connect_group') and callable(getattr(client, 'get_cross_connect_group')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4317,9 +4317,9 @@ def update_dhcp_options(ctx, from_json, force, wait_for_state, max_wait_seconds,
if hasattr(client, 'get_dhcp_options') and callable(getattr(client, 'get_dhcp_options')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4367,9 +4367,9 @@ def update_drg(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_s
if hasattr(client, 'get_drg') and callable(getattr(client, 'get_drg')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4417,9 +4417,9 @@ def update_drg_attachment(ctx, from_json, wait_for_state, max_wait_seconds, wait
if hasattr(client, 'get_drg_attachment') and callable(getattr(client, 'get_drg_attachment')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4473,9 +4473,9 @@ def update_internet_gateway(ctx, from_json, wait_for_state, max_wait_seconds, wa
if hasattr(client, 'get_internet_gateway') and callable(getattr(client, 'get_internet_gateway')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4523,9 +4523,9 @@ def update_ip_sec_connection(ctx, from_json, wait_for_state, max_wait_seconds, w
if hasattr(client, 'get_ip_sec_connection') and callable(getattr(client, 'get_ip_sec_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4573,9 +4573,9 @@ def update_local_peering_gateway(ctx, from_json, wait_for_state, max_wait_second
if hasattr(client, 'get_local_peering_gateway') and callable(getattr(client, 'get_local_peering_gateway')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4705,9 +4705,9 @@ def update_public_ip(ctx, from_json, wait_for_state, max_wait_seconds, wait_inte
if hasattr(client, 'get_public_ip') and callable(getattr(client, 'get_public_ip')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4755,9 +4755,9 @@ def update_remote_peering_connection(ctx, from_json, wait_for_state, max_wait_se
if hasattr(client, 'get_remote_peering_connection') and callable(getattr(client, 'get_remote_peering_connection')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4830,9 +4830,9 @@ def update_route_table(ctx, from_json, force, wait_for_state, max_wait_seconds,
if hasattr(client, 'get_route_table') and callable(getattr(client, 'get_route_table')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4911,9 +4911,9 @@ def update_security_list(ctx, from_json, force, wait_for_state, max_wait_seconds
if hasattr(client, 'get_security_list') and callable(getattr(client, 'get_security_list')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -4978,9 +4978,9 @@ def update_subnet(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_
if hasattr(client, 'get_subnet') and callable(getattr(client, 'get_subnet')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -5045,9 +5045,9 @@ def update_vcn(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_int
if hasattr(client, 'get_vcn') and callable(getattr(client, 'get_vcn')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -5144,9 +5144,9 @@ def update_virtual_circuit(ctx, from_json, force, wait_for_state, max_wait_secon
if hasattr(client, 'get_virtual_circuit') and callable(getattr(client, 'get_virtual_circuit')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
@@ -5206,9 +5206,9 @@ def update_vnic(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
if hasattr(client, 'get_vnic') and callable(getattr(client, 'get_vnic')):
try:
wait_period_kwargs = {}
- if max_wait_seconds:
+ if max_wait_seconds is not None:
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
- if wait_interval_seconds:
+ if wait_interval_seconds is not None:
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
diff --git a/src/oci_cli/version.py b/src/oci_cli/version.py
index 13efd6c33..8ba0f93d6 100644
--- a/src/oci_cli/version.py
+++ b/src/oci_cli/version.py
@@ -1,4 +1,4 @@
# coding: utf-8
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
-__version__ = '2.4.20'
+__version__ = '2.4.21'
diff --git a/tests/conftest.py b/tests/conftest.py
index 31ffef795..184069670 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -61,7 +61,8 @@ def malformed_config_file(config):
yield malformed_config_file_path
- os.remove(malformed_config_file_path)
+ if os.path.exists(malformed_config_file_path):
+ os.remove(malformed_config_file_path)
@pytest.fixture(scope='session')
diff --git a/tests/output/inline_help_dump.txt b/tests/output/inline_help_dump.txt
index 7ea47be01..5a592cf79 100644
--- a/tests/output/inline_help_dump.txt
+++ b/tests/output/inline_help_dump.txt
@@ -1,4 +1,4 @@
-This file contains all the help for every possible command in version 2.4.20 of the CLI.
+This file contains all the help for every possible command in version 2.4.21 of the CLI.
This file is generated by running test_help.py, which dumps the output of --help for every command.
@@ -4621,6 +4621,47 @@ Usage: oci db database update [OPTIONS]
Options:
--database-id TEXT The database [OCID]. [required]
+ --defined-tags COMPLEX TYPE Defined tags for this resource. Each key is
+ predefined and scoped to a namespace. For more
+ information, see [Resource Tags].
+
+ Example:
+ `{"Operations": {"CostCenter": "42"}}`
+ This is
+ a complex type whose value must be valid JSON.
+ The value can be provided as a string on the
+ command line or passed in as a file using
+ the
+ file://path/to/file syntax.
+
+ The --generate-
+ param-json-input option can be used to
+ generate an example of the JSON which must be
+ provided. We recommend storing this example
+ in
+ a file, modifying it as needed and then
+ passing it back in via the file:// syntax.
+ --freeform-tags COMPLEX TYPE 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"}`
+ This is a complex
+ type whose value must be valid JSON. The value
+ can be provided as a string on the command
+ line or passed in as a file using
+ the
+ file://path/to/file syntax.
+
+ The --generate-
+ param-json-input option can be used to
+ generate an example of the JSON which must be
+ provided. We recommend storing this example
+ in
+ a file, modifying it as needed and then
+ passing it back in via the file:// syntax.
--if-match TEXT 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
@@ -5283,6 +5324,26 @@ Options:
The default is 80 percent assigned to DATA
storage. This is not applicable for VM based
DB systems.
+ --defined-tags COMPLEX TYPE Defined tags for this resource. Each key is
+ predefined and scoped to a namespace. For more
+ information, see [Resource Tags].
+
+ Example:
+ `{"Operations": {"CostCenter": "42"}}`
+ This is
+ a complex type whose value must be valid JSON.
+ The value can be provided as a string on the
+ command line or passed in as a file using
+ the
+ file://path/to/file syntax.
+
+ The --generate-
+ param-json-input option can be used to
+ generate an example of the JSON which must be
+ provided. We recommend storing this example
+ in
+ a file, modifying it as needed and then
+ passing it back in via the file:// syntax.
--disk-redundancy [HIGH|NORMAL]
The type of redundancy configured for the DB
System. Normal is 2-way redundancy,
@@ -5297,6 +5358,27 @@ Options:
name for the subnet is used (don't provide
one). Otherwise, provide a valid DNS domain
name. Hyphens (-) are not permitted.
+ --freeform-tags COMPLEX TYPE 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"}`
+ This is a complex
+ type whose value must be valid JSON. The value
+ can be provided as a string on the command
+ line or passed in as a file using
+ the
+ file://path/to/file syntax.
+
+ The --generate-
+ param-json-input option can be used to
+ generate an example of the JSON which must be
+ provided. We recommend storing this example
+ in
+ a file, modifying it as needed and then
+ passing it back in via the file:// syntax.
--initial-data-storage-size-in-gb INTEGER
Size, in GBs, of the initial data volume that
will be created and attached to VM-shape based
@@ -5508,6 +5590,47 @@ Options:
attached will be more than what is requested,
to account for REDO/RECO space and software
volume.
+ --defined-tags COMPLEX TYPE Defined tags for this resource. Each key is
+ predefined and scoped to a namespace. For more
+ information, see [Resource Tags].
+
+ Example:
+ `{"Operations": {"CostCenter": "42"}}`
+ This is
+ a complex type whose value must be valid JSON.
+ The value can be provided as a string on the
+ command line or passed in as a file using
+ the
+ file://path/to/file syntax.
+
+ The --generate-
+ param-json-input option can be used to
+ generate an example of the JSON which must be
+ provided. We recommend storing this example
+ in
+ a file, modifying it as needed and then
+ passing it back in via the file:// syntax.
+ --freeform-tags COMPLEX TYPE 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"}`
+ This is a complex
+ type whose value must be valid JSON. The value
+ can be provided as a string on the command
+ line or passed in as a file using
+ the
+ file://path/to/file syntax.
+
+ The --generate-
+ param-json-input option can be used to
+ generate an example of the JSON which must be
+ provided. We recommend storing this example
+ in
+ a file, modifying it as needed and then
+ passing it back in via the file:// syntax.
--if-match TEXT 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
@@ -5626,6 +5749,9 @@ Options:
--db-system-shape TEXT If provided, filters the results to the set of
database versions which are supported for the given
shape.
+ --db-system-id TEXT The DB system OCID. If provided, filters the
+ results to the set of database versions which are
+ supported for the DB system.
--all Fetches all pages of results. If you provide this
option, then you cannot provide the --limit option.
--page-size INTEGER When fetching results, the number of results to
diff --git a/tests/test_compute.py b/tests/test_compute.py
index bc0efb465..7a25a1ed8 100644
--- a/tests/test_compute.py
+++ b/tests/test_compute.py
@@ -5,7 +5,6 @@
import os
import pytest
import re
-import time
import unittest
from . import command_coverage_validator
from . import tag_data_container
@@ -221,7 +220,7 @@ def subtest_vnic_operations(self):
self.assertEquals(None, second_vnic['public-ip'])
# Some extra time is needed after VNIC CRUD operations for state to stabilize.
- time.sleep(5)
+ util.vcr_mode_aware_sleep(5)
# Ensure that new attachments are listed.
result = self.invoke(
@@ -246,7 +245,7 @@ def subtest_vnic_operations(self):
result = self.invoke(['compute', 'vnic-attachment', 'get', '--vnic-attachment-id', second_vnic_attachment_id])
util.validate_response(result)
- time.sleep(10)
+ util.vcr_mode_aware_sleep(10)
# Detach vnic
result = self.invoke(
@@ -254,7 +253,7 @@ def subtest_vnic_operations(self):
util.validate_response(result)
util.wait_until(['compute', 'vnic-attachment', 'get', '--vnic-attachment-id', second_vnic_attachment_id], 'DETACHED', max_wait_seconds=300, succeed_if_not_found=True)
- time.sleep(10)
+ util.vcr_mode_aware_sleep(10)
@util.log_test
def subtest_public_ip_operations(self):
@@ -281,7 +280,7 @@ def subtest_public_ip_operations(self):
self.assertNotEquals(None, vnic_resp_public_ip)
# Some extra time is needed after VNIC operations for state to stabilize.
- time.sleep(5)
+ util.vcr_mode_aware_sleep(5)
# Verify the public IP operations. Verify that each get below returns the same values for
# public-ip-address, public-ip-id and private-ip-id since it is for the same public IP object
@@ -328,7 +327,7 @@ def subtest_public_ip_operations(self):
util.validate_response(result)
util.wait_until(['compute', 'vnic-attachment', 'get', '--vnic-attachment-id', second_vnic_attachment_id], 'DETACHED', max_wait_seconds=300, succeed_if_not_found=True)
- time.sleep(10)
+ util.vcr_mode_aware_sleep(10)
@util.log_test
def subtest_volume_attachment_operations(self):
@@ -361,7 +360,8 @@ def subtest_volume_attachment_operations(self):
'--type', 'iscsi',
'--instance-id', self.instance_ocid,
'--volume-id', self.volume_ocid,
- '--wait-for-state', 'ATTACHED'])
+ '--wait-for-state', 'ATTACHED',
+ '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS])
util.validate_response(result, expect_etag=True, json_response_expected=False)
self.va_ocid = util.get_json_from_mixed_string(result.output)['data']['id']
@@ -369,7 +369,8 @@ def subtest_volume_attachment_operations(self):
'compute', 'volume-attachment', 'detach',
'--volume-attachment-id', self.va_ocid,
'--force',
- '--wait-for-state', 'DETACHED'
+ '--wait-for-state', 'DETACHED',
+ '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS
])
util.validate_response(result, json_response_expected=False)
@@ -413,10 +414,10 @@ def subtest_console_history_operations(self):
def subtest_instance_action_operations(self):
result = self.invoke(['compute', 'instance', 'action', '--instance-id', self.instance_ocid, '--action', 'RESET'])
util.validate_response(result)
- time.sleep(10)
+ util.vcr_mode_aware_sleep(10)
util.wait_until(['compute', 'instance', 'get', '--instance-id', self.instance_ocid], 'RUNNING',
max_wait_seconds=300)
- time.sleep(5)
+ util.vcr_mode_aware_sleep(5)
@util.log_test
def subtest_image_operations(self):
diff --git a/tests/test_tagging.py b/tests/test_tagging.py
index 0b623f31c..3688920d7 100644
--- a/tests/test_tagging.py
+++ b/tests/test_tagging.py
@@ -25,7 +25,8 @@ def network_resources():
'--display-name', vcn_name,
'--cidr-block', cidr_block,
'--dns-label', vcn_dns_label,
- '--wait-for-state', 'AVAILABLE'
+ '--wait-for-state', 'AVAILABLE',
+ '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS
])
vcn_ocid = util.get_json_from_mixed_string(result.output)['data']['id']
@@ -40,17 +41,18 @@ def network_resources():
'--vcn-id', vcn_ocid,
'--cidr-block', cidr_block,
'--dns-label', subnet_dns_label,
- '--wait-for-state', 'AVAILABLE'
+ '--wait-for-state', 'AVAILABLE',
+ '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS
])
subnet_ocid = util.get_json_from_mixed_string(result.output)['data']['id']
yield (vcn_ocid, subnet_ocid)
with test_config_container.create_vcr().use_cassette('test_tagging_fixture_network_delete.yml'):
- result = invoke(['network', 'subnet', 'delete', '--subnet-id', subnet_ocid, '--force', '--wait-for-state', 'TERMINATED'])
+ result = invoke(['network', 'subnet', 'delete', '--subnet-id', subnet_ocid, '--force', '--wait-for-state', 'TERMINATED', '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS])
util.validate_response(result, json_response_expected=False)
- result = util.invoke_command(['network', 'vcn', 'delete', '--vcn-id', vcn_ocid, '--force', '--wait-for-state', 'TERMINATED'])
+ result = util.invoke_command(['network', 'vcn', 'delete', '--vcn-id', vcn_ocid, '--force', '--wait-for-state', 'TERMINATED', '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS])
util.validate_response(result, json_response_expected=False)
@@ -133,6 +135,7 @@ def test_launch_update_instance_with_tags(tag_namespace_and_tags, network_resour
'--image-id', util.oracle_linux_image(),
'--shape', 'VM.Standard1.1',
'--wait-for-state', 'RUNNING',
+ '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS,
'--freeform-tags', 'file://tests/resources/tagging/freeform_tags_1.json',
'--defined-tags', 'file://tests/temp/defined_tags_1.json'
])
@@ -222,7 +225,8 @@ def test_launch_update_instance_with_tags(tag_namespace_and_tags, network_resour
'compute', 'instance', 'terminate',
'--instance-id', instance_ocid,
'--force',
- '--wait-for-state', 'TERMINATED'
+ '--wait-for-state', 'TERMINATED',
+ '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS
])
util.validate_response(result, json_response_expected=False)
@@ -255,7 +259,8 @@ def test_create_update_volume_with_tags(tag_namespace_and_tags):
'--size-in-gbs', '50',
'--freeform-tags', 'file://tests/resources/tagging/freeform_tags_2.json',
'--defined-tags', 'file://tests/temp/defined_tags_1.json',
- '--wait-for-state', 'AVAILABLE'
+ '--wait-for-state', 'AVAILABLE',
+ '--wait-interval-seconds', util.WAIT_INTERVAL_SECONDS
])
if result.exit_code == 0:
break
diff --git a/tests/test_virtualnetwork.py b/tests/test_virtualnetwork.py
index d8d3ba1cd..9de0ab7b3 100644
--- a/tests/test_virtualnetwork.py
+++ b/tests/test_virtualnetwork.py
@@ -9,7 +9,6 @@
from . import util
from .test_list_filter import retrieve_list_by_field_and_check, retrieve_list_and_ensure_sorted
import oci_cli
-import time
class TestVirtualNetwork(unittest.TestCase):
@@ -41,7 +40,7 @@ def test_all_operations(self, validator):
if hasattr(self, 'drg_capacity_issue'):
pytest.skip('Skipped DRG tests due to capacity issues')
finally:
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
self.subtest_delete()
@util.log_test
@@ -106,7 +105,7 @@ def subtest_security_list_operations(self):
ingress_rules_v2 = """[{"protocol": "6", "source": "10.0.1.0/25", "tcpOptions": {"destinationPortRange": {"max": 1521, "min": 1521}}}]"""
# TODO: A short sleep before every security list update to allow for replication.
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# Force update on all fields
result = self.invoke(['security-list', 'update',
@@ -117,26 +116,26 @@ def subtest_security_list_operations(self):
'--force'])
util.validate_response(result, expect_etag=True)
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update display name only - does not show a prompt
result = self.invoke(['security-list', 'update', '--security-list-id', self.sl_ocid, '--display-name', sl_name])
util.validate_response(result, expect_etag=True)
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update egress-rules, confirm y
result = self.invoke(['security-list', 'update', '--security-list-id', self.sl_ocid, '--egress-security-rules', egress_rules_v2], input='y')
util.validate_response(result, json_response_expected=False)
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update ingress-rules, confirm y
result = self.invoke(
['security-list', 'update', '--security-list-id', self.sl_ocid, '--ingress-security-rules', ingress_rules_v2], input='y')
util.validate_response(result, json_response_expected=False)
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update both, confirm y
result = self.invoke(
@@ -144,7 +143,7 @@ def subtest_security_list_operations(self):
ingress_rules, '--egress-security-rules', egress_rules], input='y')
util.validate_response(result, json_response_expected=False)
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update egress-rules, confirm n
result = self.invoke(
@@ -160,7 +159,7 @@ def subtest_security_list_operations(self):
@util.log_test
def subtest_security_list_stateless_rules(self):
- time.sleep(10)
+ util.vcr_mode_aware_sleep(10)
stateless_egress_rule = """[{"destination": "10.0.2.0/24", "protocol": "6", "tcpOptions": {"destinationPortRange": {"max": 2, "min": 1}}, "isStateless":"true"}]"""
result = self.invoke(
@@ -169,7 +168,7 @@ def subtest_security_list_stateless_rules(self):
util.validate_response(result, expect_etag=True)
assert json.loads(result.output)["data"]["egress-security-rules"][0]["is-stateless"] is True
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
explicit_stateful_egress_rule = """[{"destination": "10.0.2.0/24", "protocol": "6", "tcpOptions": {"destinationPortRange": {"max": 2, "min": 1}}, "isStateless":"false"}]"""
result = self.invoke(
@@ -179,7 +178,7 @@ def subtest_security_list_stateless_rules(self):
util.validate_response(result, expect_etag=True)
assert json.loads(result.output)["data"]["egress-security-rules"][0]["is-stateless"] is False
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
implicit_stateful_egress_rule = """[{"destination": "10.0.2.0/24", "protocol": "17", "udpOptions": {"destinationPortRange": {"max": 2, "min": 1}, "sourcePortRange": {"max": 4, "min": 3}}}]"""
result = self.invoke(
@@ -324,7 +323,7 @@ def subtest_dhcp_option_operations(self):
['dhcp-options', 'update', '--dhcp-id', self.dhcp_options_ocid, '--options', options], input='n')
assert result.exit_code != 0
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update options, force
result = self.invoke(
@@ -481,7 +480,7 @@ def subtest_route_table_operations(self):
result = self.invoke(['route-table', 'update', '--rt-id', self.rt_ocid, '--display-name', rt_name])
util.validate_response(result, expect_etag=True)
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update route-rules, confirm y
result = self.invoke(
@@ -493,7 +492,7 @@ def subtest_route_table_operations(self):
['route-table', 'update', '--rt-id', self.rt_ocid, '--route-rules', rules_v2], input='n')
assert result.exit_code != 0
- time.sleep(20)
+ util.vcr_mode_aware_sleep(20)
# update route-rules, force
result = self.invoke(
@@ -510,7 +509,7 @@ def subtest_delete(self):
try:
while retry < max_retry:
try:
- time.sleep(2)
+ util.vcr_mode_aware_sleep(2)
result = self.invoke(['route-table', 'delete', '--rt-id', self.rt_ocid, '--force'])
util.validate_response(result)
break
diff --git a/tests/util.py b/tests/util.py
index 55c524fc5..a59e422b7 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -30,6 +30,8 @@
NUM_INVOKE_COMMAND_RETRIES = 3
+WAIT_INTERVAL_SECONDS = '30' if test_config_container.vcr_mode != 'none' else '0'
+
USER_ID = os.environ['OCI_CLI_USER_ID']
TENANT_ID = os.environ['OCI_CLI_TENANT_ID']
COMPARTMENT_ID = os.environ['OCI_CLI_COMPARTMENT_ID']
@@ -570,6 +572,11 @@ def create_large_file(filename, size_in_mebibytes):
f.write(sample_content * MEBIBYTE * size_in_mebibytes)
+def vcr_mode_aware_sleep(duration):
+ if test_config_container.vcr_mode != 'none':
+ time.sleep(duration)
+
+
@contextlib.contextmanager
def capture():
oldout, olderr = sys.stdout, sys.stderr
diff --git a/tox.ini b/tox.ini
index 1a6966203..e8b3cde8d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,7 +2,7 @@
envlist = py27, py35
[testenv]
-passenv = CLI_TESTS_ADMIN_PASS_PHRASE OCI_CLI*
+passenv = CLI_TESTS_ADMIN_PASS_PHRASE OCI_CLI* PYTHONHASHSEED
deps = -r{toxinidir}/requirements.txt
setenv =
# Required so the oci script imports oci_cli from the venv