Skip to content

Commit 8442782

Browse files
Releasing version 3.52.0
Releasing version 3.52.0
2 parents 1de768e + b50df78 commit 8442782

File tree

15 files changed

+1360
-49
lines changed

15 files changed

+1360
-49
lines changed

CHANGELOG.rst

+78
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,84 @@ All notable changes to this project will be documented in this file.
66

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

9+
3.52.0 - 2025-03-04
10+
--------------------
11+
Added
12+
~~~~~
13+
* File Storage service
14+
15+
* Support for User Quotas on FileSystem resource in the File Storage Service
16+
17+
* ``oci fs file-system create-quota-rule``
18+
* ``oci fs file-system update-quota-rule``
19+
* ``oci fs file-system delete-quota-rule``
20+
* ``oci fs file-system get-quota-rule``
21+
* ``oci fs file-system list-quota-rules``
22+
* ``oci fs file-system toggle-quota-rules`
23+
24+
* Database service
25+
26+
* Support for long term retention backup at Autonomous Recovery Service ("ZRCV").
27+
28+
* ``oci db backup create --retention-days <Retention value in days> --retention-years <Retention value in years>``
29+
* ``oci db backup list --backup-destination-type <Backup destination type> --time-expiry-start <Start time of expiry> --time-expiry-end <End time of expiry> --type <Backup type> --db-version <Database version>``
30+
* ``oci db backup update --retention-days <Retention value in days> --retention-years <Retention value in years>``
31+
32+
* Support for Subscription in the Exadata Database Service on Exascale Infrastructure
33+
34+
* ``oci db exascale-db-storage-vault --subscription-id``
35+
* ``oci db exadb-vm-cluster create --subscription-id``
36+
* ``oci db exascale-db-storage-vault change-exascale-db-storage-vault-subscription --exascale-db-storage-vault-id --subscription-id``
37+
* ``oci db exadb-vm-cluster change-exadb-vm-cluster-subscription --exadb-vm-cluster-id --subscription-id``
38+
39+
* Support for Cluster Placement Group in the Exadata Database Service on Exascale Infrastructure
40+
41+
* ``oci db exascale-db-storage-vault create --cluster-placement-group-id``
42+
* ``oci db exascale-db-storage-vault list --cluster-placement-group-id``
43+
* ``oci db exadb-vm-cluster list --cluster-placement-group-id``
44+
45+
* Support for multiple standby databases for Autonomous Dataguard Association on ADB-D and ADB-D C@C
46+
47+
* ``oci db autonomous-container-database add --autonomous-container-database-id``
48+
* ``oci db autonomous-container-database convert-standby --autonomous-container-database-id``
49+
* ``oci db autonomous-container-database edit-autonomous-container-database-dataguard --autonomous-container-database-id``
50+
* ``oci db autonomous-container-database failover-autonomous-container-database-dataguard --autonomous-container-database-id``
51+
* ``oci db autonomous-container-database switchover-autonomous-container-database-dataguard --autonomous-container-database-id ``
52+
* ``oci db autonomous-container-database reinstate-autonomous-container-database-dataguard --autonomous-container-database-id ``
53+
* ``oci db autonomous-container-database-dataguard migrate --autonomous-container-database-id``
54+
55+
* Open Search service
56+
57+
* Support for upgrade major version of cluster in OpenSearch
58+
59+
* ``oci opensearch cluster upgrade --opensearch-cluster-id --desired-software-version --original-cluster-display-name --upgrade-type --is-clone --endpoint``
60+
61+
* PSQL service
62+
63+
* Support for creating a backup copy
64+
65+
* ``oci psql backup backup-copy --backup-id --compartment-id``
66+
67+
Changed
68+
~~~~~~~
69+
* Tenant Manager Control Plane service
70+
71+
* [BREAKING] Changed the values accepted by the optional parameter --wait-for-state in the create command
72+
73+
* ``oci organizations subscription-mapping create --wait-for-state <A value from [CREATING, ACTIVE, INACTIVE, UPDATING, DELETING, DELETED, FAILED]>``
74+
75+
* PSQL service
76+
77+
* Added new optional parameter --config-type to list-configurations
78+
79+
* ``oci psql configuration-collection list-configurations --config-type``
80+
81+
* Compute Engine service
82+
83+
* Added new optional parameter --with-auth-context which reads the auth and profile attributes from the execution context and appends them to the oci command arguments in the kubeconfig file
84+
85+
* ``oci ce cluster create-kubeconfig --with-auth-context``
86+
987
3.51.9 - 2025-02-25
1088
--------------------
1189
Fixed

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Jinja2<3.1; python_version >= '3.7'
1515
jmespath==0.10.0
1616
ndg-httpsclient==0.4.2
1717
mock==2.0.0
18-
oci==2.146.0
18+
oci==2.147.0
1919
packaging==20.2
2020
pluggy==0.13.0
2121
py==1.11.0

services/container_engine/src/oci_cli_container_engine/containerengine_cli_extended.py

+19-1
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,12 @@ def update_node_pool(ctx, **kwargs):
588588
@cli_util.option('--kube-endpoint', type=custom_types.CliCaseInsensitiveChoice(["LEGACY_KUBERNETES", "PUBLIC_ENDPOINT", "PRIVATE_ENDPOINT", "VCN_HOSTNAME"]), help=u"""The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time. Supported values LEGACY_KUBERNETES, PUBLIC_ENDPOINT, PRIVATE_ENDPOINT, VCN_HOSTNAME""")
589589
@cli_util.option('--overwrite', is_flag=True, help="""Overwrites the contents of kubeconfig file specified using --file\
590590
option or kubeconfig file at default location if --file is not used.""")
591+
@cli_util.option('--with-auth-context', default=False, is_flag=True, help="""Appends the current authentication context (values configured in --auth and --profile) of the OCI CLI command\
592+
to the kubeconfig user exec command if --with-auth-context is used or not append those information if --with-auth-context is not used""")
591593
@click.pass_context
592594
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
593595
@cli_util.wrap_exceptions
594-
def create_kubeconfig(ctx, from_json, file, cluster_id, token_version, expiration, kube_endpoint, overwrite):
596+
def create_kubeconfig(ctx, from_json, file, cluster_id, token_version, expiration, kube_endpoint, overwrite, with_auth_context):
595597
if isinstance(cluster_id, six.string_types) and len(cluster_id.strip()) == 0:
596598
raise click.UsageError('Parameter --cluster-id cannot be whitespace or empty string')
597599

@@ -621,6 +623,22 @@ def create_kubeconfig(ctx, from_json, file, cluster_id, token_version, expiratio
621623
for chunk in result.data.raw.stream(cli_constants.MEBIBYTE, decode_content=True):
622624
new_kubeconfig = b''.join([new_kubeconfig, chunk])
623625

626+
# enrich kubeconfig auth command with oci cli auth and profile
627+
auth = ctx.obj.get('auth', '')
628+
profile = ctx.obj.get('profile', '')
629+
try:
630+
temp_kubeconfig = yaml.safe_load(new_kubeconfig)
631+
if with_auth_context and auth:
632+
temp_kubeconfig['users'][0]['user']['exec']['args'].extend(['--auth', auth])
633+
if with_auth_context and profile:
634+
temp_kubeconfig['users'][0]['user']['exec']['args'].extend(['--profile', profile])
635+
new_kubeconfig = yaml.dump(temp_kubeconfig, encoding=('utf-8'))
636+
except yaml.YAMLError as e:
637+
click.echo('Error parsing configuration file {}'.format(e))
638+
return
639+
except (KeyError, IndexError):
640+
pass
641+
624642
file = os.path.expandvars(os.path.expanduser(file))
625643
# If the user wants stdout; just print it after decoding in utf-8 format.
626644
if file == '-':

services/database/src/oci_cli_database/database_cli_extended.py

+186-1
Original file line numberDiff line numberDiff line change
@@ -1779,8 +1779,145 @@ def change_cloud_exadata_infrastructure_compartment(ctx, **kwargs):
17791779
ctx.invoke(database_cli.change_cloud_exadata_infrastructure_compartment, **kwargs)
17801780

17811781

1782-
@cli_util.copy_params_from_generated_command(database_cli.list_backups, params_to_exclude=[])
1782+
@cli_util.copy_params_from_generated_command(database_cli.list_backups, params_to_exclude=['time_expiry_scheduled_greater_than_or_equal_to', 'time_expiry_scheduled_less_than', 'version_parameterconflict'])
17831783
@database_cli.backup_group.command('list', help=database_cli.list_backups.help)
1784+
@cli_util.option('--time-expiry-start', type=custom_types.CLI_DATETIME, help="""The start of date-time range of expiration for the long term backups to be fetched.
1785+
1786+
The following datetime formats are supported:
1787+
1788+
UTC with microseconds
1789+
***********************
1790+
Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
1791+
Example: 2017-09-15T20:30:00.123456Z
1792+
1793+
UTC with milliseconds
1794+
***********************
1795+
Format: YYYY-MM-DDTHH:mm:ss.sssTZD
1796+
Example: 2017-09-15T20:30:00.123Z
1797+
1798+
UTC without milliseconds
1799+
**************************
1800+
Format: YYYY-MM-DDTHH:mm:ssTZD
1801+
Example: 2017-09-15T20:30:00Z
1802+
1803+
UTC with minute precision
1804+
**************************
1805+
Format: YYYY-MM-DDTHH:mmTZD
1806+
Example: 2017-09-15T20:30Z
1807+
1808+
Timezone with microseconds
1809+
***************************
1810+
Format: YYYY-MM-DDTHH:mm:ssTZD
1811+
Example:
1812+
2017-09-15T12:30:00.456789-08:00,
1813+
2017-09-15T12:30:00.456789-0800
1814+
1815+
Timezone with milliseconds
1816+
***************************
1817+
Format: YYYY-MM-DDTHH:mm:ssTZD
1818+
Example:
1819+
2017-09-15T12:30:00.456-08:00,
1820+
2017-09-15T12:30:00.456-0800
1821+
1822+
Timezone without milliseconds
1823+
*******************************
1824+
Format: YYYY-MM-DDTHH:mm:ssTZD
1825+
Example:
1826+
2017-09-15T12:30:00-08:00,
1827+
2017-09-15T12:30:00-0800
1828+
1829+
Timezone with minute precision
1830+
*******************************
1831+
Format: YYYY-MM-DDTHH:mmTZD
1832+
Example:
1833+
2017-09-15T12:30-08:00,
1834+
2017-09-15T12:30-0800
1835+
1836+
Short date and time
1837+
********************
1838+
The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
1839+
Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
1840+
Example: '2017-09-15 17:25'
1841+
1842+
Date Only
1843+
*********
1844+
This date will be taken as midnight UTC of that day
1845+
Format: YYYY-MM-DD
1846+
Example: 2017-09-15
1847+
1848+
Epoch seconds
1849+
**************
1850+
Example: 1412195400
1851+
""")
1852+
@cli_util.option('--time-expiry-end', type=custom_types.CLI_DATETIME, help="""The end of date-time range of expiration for the long term backups to be fetched.
1853+
1854+
The following datetime formats are supported:
1855+
1856+
UTC with microseconds
1857+
***********************
1858+
Format: YYYY-MM-DDTHH:mm:ss.ssssssTZD
1859+
Example: 2017-09-15T20:30:00.123456Z
1860+
1861+
UTC with milliseconds
1862+
***********************
1863+
Format: YYYY-MM-DDTHH:mm:ss.sssTZD
1864+
Example: 2017-09-15T20:30:00.123Z
1865+
1866+
UTC without milliseconds
1867+
**************************
1868+
Format: YYYY-MM-DDTHH:mm:ssTZD
1869+
Example: 2017-09-15T20:30:00Z
1870+
1871+
UTC with minute precision
1872+
**************************
1873+
Format: YYYY-MM-DDTHH:mmTZD
1874+
Example: 2017-09-15T20:30Z
1875+
1876+
Timezone with microseconds
1877+
***************************
1878+
Format: YYYY-MM-DDTHH:mm:ssTZD
1879+
Example:
1880+
2017-09-15T12:30:00.456789-08:00,
1881+
2017-09-15T12:30:00.456789-0800
1882+
1883+
Timezone with milliseconds
1884+
***************************
1885+
Format: YYYY-MM-DDTHH:mm:ssTZD
1886+
Example:
1887+
2017-09-15T12:30:00.456-08:00,
1888+
2017-09-15T12:30:00.456-0800
1889+
1890+
Timezone without milliseconds
1891+
*******************************
1892+
Format: YYYY-MM-DDTHH:mm:ssTZD
1893+
Example:
1894+
2017-09-15T12:30:00-08:00,
1895+
2017-09-15T12:30:00-0800
1896+
1897+
Timezone with minute precision
1898+
*******************************
1899+
Format: YYYY-MM-DDTHH:mmTZD
1900+
Example:
1901+
2017-09-15T12:30-08:00,
1902+
2017-09-15T12:30-0800
1903+
1904+
Short date and time
1905+
********************
1906+
The timezone for this date and time will be taken as UTC (Needs to be surrounded by single or double quotes)
1907+
Format: 'YYYY-MM-DD HH:mm' or "YYYY-MM-DD HH:mm"
1908+
Example: '2017-09-15 17:25'
1909+
1910+
Date Only
1911+
*********
1912+
This date will be taken as midnight UTC of that day
1913+
Format: YYYY-MM-DD
1914+
Example: 2017-09-15
1915+
1916+
Epoch seconds
1917+
**************
1918+
Example: 1412195400
1919+
""")
1920+
@cli_util.option('--db-version', help="""A filter to return only resources that match the given database version.""")
17841921
@click.pass_context
17851922
@cli_util.wrap_exceptions
17861923
def list_backups_extended(ctx, **kwargs):
@@ -1792,9 +1929,57 @@ def list_backups_extended(ctx, **kwargs):
17921929
raise click.UsageError(
17931930
'You can only specify one of either --compartment-id or --database-id option'
17941931
)
1932+
if 'time_expiry_start' in kwargs:
1933+
kwargs['time_expiry_scheduled_greater_than_or_equal_to'] = kwargs['time_expiry_start']
1934+
kwargs.pop('time_expiry_start')
1935+
if 'time_expiry_end' in kwargs:
1936+
kwargs['time_expiry_scheduled_less_than'] = kwargs['time_expiry_end']
1937+
kwargs.pop('time_expiry_end')
1938+
if 'db_version' in kwargs:
1939+
kwargs['version_parameterconflict'] = kwargs['db_version']
1940+
kwargs.pop('db_version')
1941+
17951942
ctx.invoke(database_cli.list_backups, **kwargs)
17961943

17971944

1945+
@cli_util.copy_params_from_generated_command(database_cli.create_backup, params_to_exclude=['retention_period_in_days', 'retention_period_in_years'])
1946+
@database_cli.backup_group.command(name=database_cli.create_backup.name, help=database_cli.create_backup.help)
1947+
@cli_util.option('--retention-days', type=click.INT, help=u"""The retention period of the long term backup in days.""")
1948+
@cli_util.option('--retention-years', type=click.INT, help=u"""The retention period of the long term backup in years.""")
1949+
@click.pass_context
1950+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'Backup'})
1951+
@cli_util.wrap_exceptions
1952+
def create_backup_extended(ctx, **kwargs):
1953+
1954+
if 'retention_days' in kwargs:
1955+
kwargs['retention_period_in_days'] = kwargs['retention_days']
1956+
kwargs.pop('retention_days')
1957+
if 'retention_years' in kwargs:
1958+
kwargs['retention_period_in_years'] = kwargs['retention_years']
1959+
kwargs.pop('retention_years')
1960+
1961+
ctx.invoke(database_cli.create_backup, **kwargs)
1962+
1963+
1964+
@cli_util.copy_params_from_generated_command(database_cli.update_backup, params_to_exclude=['retention_period_in_days', 'retention_period_in_years'])
1965+
@database_cli.backup_group.command(name=database_cli.update_backup.name, help=database_cli.update_backup.help)
1966+
@cli_util.option('--retention-days', type=click.INT, help=u"""The retention period of the long term backup in days.""")
1967+
@cli_util.option('--retention-years', type=click.INT, help=u"""The retention period of the long term backup in years.""")
1968+
@click.pass_context
1969+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'database', 'class': 'Backup'})
1970+
@cli_util.wrap_exceptions
1971+
def update_backup_extended(ctx, **kwargs):
1972+
1973+
if 'retention_days' in kwargs:
1974+
kwargs['retention_period_in_days'] = kwargs['retention_days']
1975+
kwargs.pop('retention_days')
1976+
if 'retention_years' in kwargs:
1977+
kwargs['retention_period_in_years'] = kwargs['retention_years']
1978+
kwargs.pop('retention_years')
1979+
1980+
ctx.invoke(database_cli.update_backup, **kwargs)
1981+
1982+
17981983
@cli_util.copy_params_from_generated_command(database_cli.list_cloud_vm_clusters, params_to_exclude=['cloud_exadata_infrastructure_id'])
17991984
@database_cli.cloud_vm_cluster_group.command('list', help=database_cli.list_cloud_vm_clusters.help)
18001985
@cli_util.option('--cloud-exa-infra-id', help=u"""If provided, filters the results for the given Cloud Exadata Infrastructure.""")

0 commit comments

Comments
 (0)