Skip to content

Commit b08cde6

Browse files
committed
Releasing version 2.43.2
1 parent 26da81b commit b08cde6

File tree

45 files changed

+1958
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1958
-39
lines changed

CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ Change Log
33
All notable changes to this project will be documented in this file.
44

55
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_.
6+
====================
7+
2.43.2 - 2021-08-03
8+
====================
9+
10+
Added
11+
-----
12+
* Support for manually copying volume group backups across regions in the Block Volume service
13+
* Support for work requests for the copy volume backup and copy boot volume backup operations in the Block Volume service
14+
* Support for specifying external Hive metastores during application creation in the Data Flow service
15+
* Support for changing the compartment of a backup in the MySQL Database service
16+
* Support for model catalog features including provenance, metadata, schemas, and artifact introspection in the Data Science service
17+
* Support for Exadata system network bonding in the Database service
18+
* Support for creating autonomous databases with early patching enabled in the Database service
19+
620
====================
721
2.43.1 - 2021-07-27
822
====================

docs/api/core.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Core Services
130130
oci.core.models.ConsoleHistory
131131
oci.core.models.CopyBootVolumeBackupDetails
132132
oci.core.models.CopyVolumeBackupDetails
133+
oci.core.models.CopyVolumeGroupBackupDetails
133134
oci.core.models.Cpe
134135
oci.core.models.CpeDeviceConfigAnswer
135136
oci.core.models.CpeDeviceConfigQuestion
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CopyVolumeGroupBackupDetails
2+
============================
3+
4+
.. currentmodule:: oci.core.models
5+
6+
.. autoclass:: CopyVolumeGroupBackupDetails
7+
:show-inheritance:
8+
:special-members: __init__
9+
:members:
10+
:undoc-members:
11+
:inherited-members:

docs/api/data_science.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Data Science
3131
oci.data_science.models.FixedSizeScalingPolicy
3232
oci.data_science.models.InstanceConfiguration
3333
oci.data_science.models.LogDetails
34+
oci.data_science.models.Metadata
3435
oci.data_science.models.Model
3536
oci.data_science.models.ModelConfigurationDetails
3637
oci.data_science.models.ModelDeployment
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Metadata
2+
========
3+
4+
.. currentmodule:: oci.data_science.models
5+
6+
.. autoclass:: Metadata
7+
:show-inheritance:
8+
:special-members: __init__
9+
:members:
10+
:undoc-members:
11+
:inherited-members:

docs/api/mysql.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Mysql
3838
oci.mysql.models.BackupPolicy
3939
oci.mysql.models.BackupSummary
4040
oci.mysql.models.CaCertificate
41+
oci.mysql.models.ChangeBackupCompartmentDetails
4142
oci.mysql.models.Channel
4243
oci.mysql.models.ChannelSource
4344
oci.mysql.models.ChannelSourceMysql
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ChangeBackupCompartmentDetails
2+
==============================
3+
4+
.. currentmodule:: oci.mysql.models
5+
6+
.. autoclass:: ChangeBackupCompartmentDetails
7+
:show-inheritance:
8+
:special-members: __init__
9+
:members:
10+
:undoc-members:
11+
:inherited-members:

src/oci/core/blockstorage_client.py

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,101 @@ def copy_volume_backup(self, volume_backup_id, copy_volume_backup_details, **kwa
780780
body=copy_volume_backup_details,
781781
response_type="VolumeBackup")
782782

783+
def copy_volume_group_backup(self, volume_group_backup_id, copy_volume_group_backup_details, **kwargs):
784+
"""
785+
Creates a volume group backup copy in specified region. For general information about volume group backups,
786+
see `Overview of Block Volume Service Backups`__
787+
788+
__ https://docs.cloud.oracle.com/Content/Block/Concepts/blockvolumebackups.htm
789+
790+
791+
:param str volume_group_backup_id: (required)
792+
The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup.
793+
794+
:param oci.core.models.CopyVolumeGroupBackupDetails copy_volume_group_backup_details: (required)
795+
Request to create a cross-region copy of given volume group backup.
796+
797+
:param str opc_retry_token: (optional)
798+
A token that uniquely identifies a request so it can be retried in case of a timeout or
799+
server error without risk of executing that same action again. Retry tokens expire after 24
800+
hours, but can be invalidated before then due to conflicting operations (for example, if a resource
801+
has been deleted and purged from the system, then a retry of the original creation request
802+
may be rejected).
803+
804+
:param str opc_request_id: (optional)
805+
Unique identifier for the request.
806+
If you need to contact Oracle about a particular request, please provide the request ID.
807+
808+
:param obj retry_strategy: (optional)
809+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
810+
811+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
812+
is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
813+
814+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
815+
816+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.VolumeGroupBackup`
817+
:rtype: :class:`~oci.response.Response`
818+
819+
:example:
820+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/core/copy_volume_group_backup.py.html>`__ to see an example of how to use copy_volume_group_backup API.
821+
"""
822+
resource_path = "/volumeGroupBackups/{volumeGroupBackupId}/actions/copy"
823+
method = "POST"
824+
825+
# Don't accept unknown kwargs
826+
expected_kwargs = [
827+
"retry_strategy",
828+
"opc_retry_token",
829+
"opc_request_id"
830+
]
831+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
832+
if extra_kwargs:
833+
raise ValueError(
834+
"copy_volume_group_backup got unknown kwargs: {!r}".format(extra_kwargs))
835+
836+
path_params = {
837+
"volumeGroupBackupId": volume_group_backup_id
838+
}
839+
840+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
841+
842+
for (k, v) in six.iteritems(path_params):
843+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
844+
raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))
845+
846+
header_params = {
847+
"accept": "application/json",
848+
"content-type": "application/json",
849+
"opc-retry-token": kwargs.get("opc_retry_token", missing),
850+
"opc-request-id": kwargs.get("opc_request_id", missing)
851+
}
852+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
853+
854+
retry_strategy = self.retry_strategy
855+
if kwargs.get('retry_strategy'):
856+
retry_strategy = kwargs.get('retry_strategy')
857+
858+
if retry_strategy:
859+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
860+
self.base_client.add_opc_retry_token_if_needed(header_params)
861+
return retry_strategy.make_retrying_call(
862+
self.base_client.call_api,
863+
resource_path=resource_path,
864+
method=method,
865+
path_params=path_params,
866+
header_params=header_params,
867+
body=copy_volume_group_backup_details,
868+
response_type="VolumeGroupBackup")
869+
else:
870+
return self.base_client.call_api(
871+
resource_path=resource_path,
872+
method=method,
873+
path_params=path_params,
874+
header_params=header_params,
875+
body=copy_volume_group_backup_details,
876+
response_type="VolumeGroupBackup")
877+
783878
def create_boot_volume(self, create_boot_volume_details, **kwargs):
784879
"""
785880
Creates a new boot volume in the specified compartment from an existing boot volume or a boot volume backup.

src/oci/core/blockstorage_client_composite_operations.py

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,44 @@ def __init__(self, client, work_request_client=None, **kwargs):
2727
self.client = client
2828
self._work_request_client = work_request_client if work_request_client else oci.work_requests.WorkRequestClient(self.client._config, **self.client._kwargs)
2929

30+
def copy_boot_volume_backup_and_wait_for_work_request(self, boot_volume_backup_id, copy_boot_volume_backup_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
31+
"""
32+
Calls :py:func:`~oci.core.BlockstorageClient.copy_boot_volume_backup` and waits for the oci.work_requests.models.WorkRequest
33+
to enter the given state(s).
34+
35+
:param str boot_volume_backup_id: (required)
36+
The OCID of the boot volume backup.
37+
38+
:param oci.core.models.CopyBootVolumeBackupDetails copy_boot_volume_backup_details: (required)
39+
Request to create a cross-region copy of given boot volume backup.
40+
41+
:param list[str] work_request_states: (optional)
42+
An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
43+
Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
44+
45+
:param dict operation_kwargs:
46+
A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.copy_boot_volume_backup`
47+
48+
:param dict waiter_kwargs:
49+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
50+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
51+
"""
52+
operation_result = self.client.copy_boot_volume_backup(boot_volume_backup_id, copy_boot_volume_backup_details, **operation_kwargs)
53+
work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
54+
lowered_work_request_states = [w.lower() for w in work_request_states]
55+
work_request_id = operation_result.headers['opc-work-request-id']
56+
57+
try:
58+
waiter_result = oci.wait_until(
59+
self._work_request_client,
60+
self._work_request_client.get_work_request(work_request_id),
61+
evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
62+
**waiter_kwargs
63+
)
64+
return waiter_result
65+
except Exception as e:
66+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
67+
3068
def copy_boot_volume_backup_and_wait_for_state(self, boot_volume_backup_id, copy_boot_volume_backup_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
3169
"""
3270
Calls :py:func:`~oci.core.BlockstorageClient.copy_boot_volume_backup` and waits for the :py:class:`~oci.core.models.BootVolumeBackup` acted upon
@@ -68,6 +106,44 @@ def copy_boot_volume_backup_and_wait_for_state(self, boot_volume_backup_id, copy
68106
except Exception as e:
69107
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
70108

109+
def copy_volume_backup_and_wait_for_work_request(self, volume_backup_id, copy_volume_backup_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
110+
"""
111+
Calls :py:func:`~oci.core.BlockstorageClient.copy_volume_backup` and waits for the oci.work_requests.models.WorkRequest
112+
to enter the given state(s).
113+
114+
:param str volume_backup_id: (required)
115+
The OCID of the volume backup.
116+
117+
:param oci.core.models.CopyVolumeBackupDetails copy_volume_backup_details: (required)
118+
Request to create a cross-region copy of given backup.
119+
120+
:param list[str] work_request_states: (optional)
121+
An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
122+
Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
123+
124+
:param dict operation_kwargs:
125+
A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.copy_volume_backup`
126+
127+
:param dict waiter_kwargs:
128+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
129+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
130+
"""
131+
operation_result = self.client.copy_volume_backup(volume_backup_id, copy_volume_backup_details, **operation_kwargs)
132+
work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
133+
lowered_work_request_states = [w.lower() for w in work_request_states]
134+
work_request_id = operation_result.headers['opc-work-request-id']
135+
136+
try:
137+
waiter_result = oci.wait_until(
138+
self._work_request_client,
139+
self._work_request_client.get_work_request(work_request_id),
140+
evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
141+
**waiter_kwargs
142+
)
143+
return waiter_result
144+
except Exception as e:
145+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
146+
71147
def copy_volume_backup_and_wait_for_state(self, volume_backup_id, copy_volume_backup_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
72148
"""
73149
Calls :py:func:`~oci.core.BlockstorageClient.copy_volume_backup` and waits for the :py:class:`~oci.core.models.VolumeBackup` acted upon
@@ -109,6 +185,47 @@ def copy_volume_backup_and_wait_for_state(self, volume_backup_id, copy_volume_ba
109185
except Exception as e:
110186
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
111187

188+
def copy_volume_group_backup_and_wait_for_state(self, volume_group_backup_id, copy_volume_group_backup_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
189+
"""
190+
Calls :py:func:`~oci.core.BlockstorageClient.copy_volume_group_backup` and waits for the :py:class:`~oci.core.models.VolumeGroupBackup` acted upon
191+
to enter the given state(s).
192+
193+
:param str volume_group_backup_id: (required)
194+
The Oracle Cloud ID (OCID) that uniquely identifies the volume group backup.
195+
196+
:param oci.core.models.CopyVolumeGroupBackupDetails copy_volume_group_backup_details: (required)
197+
Request to create a cross-region copy of given volume group backup.
198+
199+
:param list[str] wait_for_states:
200+
An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.VolumeGroupBackup.lifecycle_state`
201+
202+
:param dict operation_kwargs:
203+
A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.copy_volume_group_backup`
204+
205+
:param dict waiter_kwargs:
206+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
207+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
208+
"""
209+
operation_result = self.client.copy_volume_group_backup(volume_group_backup_id, copy_volume_group_backup_details, **operation_kwargs)
210+
if not wait_for_states:
211+
return operation_result
212+
213+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
214+
wait_for_resource_id = operation_result.data.id
215+
216+
try:
217+
waiter_result = oci.wait_until(
218+
self.client,
219+
self.client.get_volume_group_backup(wait_for_resource_id),
220+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
221+
**waiter_kwargs
222+
)
223+
result_to_return = waiter_result
224+
225+
return result_to_return
226+
except Exception as e:
227+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
228+
112229
def create_boot_volume_and_wait_for_state(self, create_boot_volume_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
113230
"""
114231
Calls :py:func:`~oci.core.BlockstorageClient.create_boot_volume` and waits for the :py:class:`~oci.core.models.BootVolume` acted upon

src/oci/core/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
from .console_history import ConsoleHistory
111111
from .copy_boot_volume_backup_details import CopyBootVolumeBackupDetails
112112
from .copy_volume_backup_details import CopyVolumeBackupDetails
113+
from .copy_volume_group_backup_details import CopyVolumeGroupBackupDetails
113114
from .cpe import Cpe
114115
from .cpe_device_config_answer import CpeDeviceConfigAnswer
115116
from .cpe_device_config_question import CpeDeviceConfigQuestion
@@ -546,6 +547,7 @@
546547
"ConsoleHistory": ConsoleHistory,
547548
"CopyBootVolumeBackupDetails": CopyBootVolumeBackupDetails,
548549
"CopyVolumeBackupDetails": CopyVolumeBackupDetails,
550+
"CopyVolumeGroupBackupDetails": CopyVolumeGroupBackupDetails,
549551
"Cpe": Cpe,
550552
"CpeDeviceConfigAnswer": CpeDeviceConfigAnswer,
551553
"CpeDeviceConfigQuestion": CpeDeviceConfigQuestion,

0 commit comments

Comments
 (0)