Skip to content

Commit d678616

Browse files
authored
Merge pull request #679 in SDK/python-sdk from merge_to_github2018-06-28-18-24-05 to github (#63)
Releasing version 1.4.4
1 parent 0afc96d commit d678616

33 files changed

+4983
-67
lines changed

CHANGELOG.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ 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/>`_.
66

7+
====================
8+
1.4.4 - 2018-06-28
9+
====================
10+
11+
Added
12+
-----
13+
* Support for service gateway management in the Networking service
14+
* Support for backup and clone of boot volumes in the Block Storage service
15+
16+
Changed
17+
-------
18+
* Setup.py changed to allow more versions of pytz and python-dateutil packages when installing to an existing environment
19+
720
====================
821
1.4.3 - 2018-06-14
922
====================

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ API reference can be found `here`__.
8181
__ https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/index.html
8282
__ https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/api/index.html
8383

84+
A downloadable version of the documentation is include with in the release zip, which can be found `here`__.
85+
86+
__ https://github.com/oracle/oci-python-sdk/releases
87+
8488
====
8589
Help
8690
====

docs/requirements.txt

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sphinx-rtd-theme==0.2.5b2
2-
sphinx==1.6.4
2+
sphinx==1.6.4

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ PyJWT==1.5.3
88
pyOpenSSL==17.4.0
99
pytest==3.2.3
1010
pytest-catchlog==1.2.2
11-
python-dateutil==2.7.3
12-
pytz==2016.10
11+
python-dateutil>=2.5.3,<=2.7.3
12+
pytz>=2016.10
1313
requests==2.18.4
1414
sphinx-rtd-theme==0.2.5b2
1515
six==1.11.0

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def open_relative(*path):
3535
"idna>=2.5,<2.7",
3636
"PyJWT==1.5.3",
3737
"pyOpenSSL<=17.4.0",
38-
"python-dateutil==2.7.3",
39-
"pytz==2016.10",
38+
"python-dateutil>=2.5.3,<=2.7.3",
39+
"pytz>=2016.10",
4040
"requests==2.18.4",
4141
"six==1.11.0",
4242
]

src/oci/core/blockstorage_client.py

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

src/oci/core/blockstorage_client_composite_operations.py

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,82 @@ def __init__(self, client, **kwargs):
2121
"""
2222
self.client = client
2323

24+
def create_boot_volume_and_wait_for_state(self, create_boot_volume_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
25+
"""
26+
Calls :py:func:`~oci.core.BlockstorageClient.create_boot_volume` and waits for the :py:class:`~oci.core.models.BootVolume` acted upon
27+
to enter the given state(s).
28+
29+
:param CreateBootVolumeDetails create_boot_volume_details: (required)
30+
Request to create a new boot volume.
31+
32+
:param list[str] wait_for_states:
33+
An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.BootVolume.lifecycle_state`
34+
35+
:param dict operation_kwargs:
36+
A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.create_boot_volume`
37+
38+
:param dict waiter_kwargs:
39+
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``
40+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
41+
"""
42+
operation_result = self.client.create_boot_volume(create_boot_volume_details, **operation_kwargs)
43+
if not wait_for_states:
44+
return operation_result
45+
46+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
47+
wait_for_resource_id = operation_result.data.id
48+
49+
try:
50+
waiter_result = oci.wait_until(
51+
self.client,
52+
self.client.get_boot_volume(wait_for_resource_id),
53+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
54+
**waiter_kwargs
55+
)
56+
result_to_return = waiter_result
57+
58+
return result_to_return
59+
except Exception as e:
60+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
61+
62+
def create_boot_volume_backup_and_wait_for_state(self, create_boot_volume_backup_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
63+
"""
64+
Calls :py:func:`~oci.core.BlockstorageClient.create_boot_volume_backup` and waits for the :py:class:`~oci.core.models.BootVolumeBackup` acted upon
65+
to enter the given state(s).
66+
67+
:param CreateBootVolumeBackupDetails create_boot_volume_backup_details: (required)
68+
Request to create a new backup of given boot volume.
69+
70+
:param list[str] wait_for_states:
71+
An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.BootVolumeBackup.lifecycle_state`
72+
73+
:param dict operation_kwargs:
74+
A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.create_boot_volume_backup`
75+
76+
:param dict waiter_kwargs:
77+
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``
78+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
79+
"""
80+
operation_result = self.client.create_boot_volume_backup(create_boot_volume_backup_details, **operation_kwargs)
81+
if not wait_for_states:
82+
return operation_result
83+
84+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
85+
wait_for_resource_id = operation_result.data.id
86+
87+
try:
88+
waiter_result = oci.wait_until(
89+
self.client,
90+
self.client.get_boot_volume_backup(wait_for_resource_id),
91+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
92+
**waiter_kwargs
93+
)
94+
result_to_return = waiter_result
95+
96+
return result_to_return
97+
except Exception as e:
98+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
99+
24100
def create_volume_and_wait_for_state(self, create_volume_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
25101
"""
26102
Calls :py:func:`~oci.core.BlockstorageClient.create_volume` and waits for the :py:class:`~oci.core.models.Volume` acted upon
@@ -212,6 +288,45 @@ def delete_boot_volume_and_wait_for_state(self, boot_volume_id, wait_for_states=
212288
except Exception as e:
213289
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
214290

291+
def delete_boot_volume_backup_and_wait_for_state(self, boot_volume_backup_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
292+
"""
293+
Calls :py:func:`~oci.core.BlockstorageClient.delete_boot_volume_backup` and waits for the :py:class:`~oci.core.models.BootVolumeBackup` acted upon
294+
to enter the given state(s).
295+
296+
:param str boot_volume_backup_id: (required)
297+
The OCID of the boot volume backup.
298+
299+
:param list[str] wait_for_states:
300+
An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.BootVolumeBackup.lifecycle_state`
301+
302+
:param dict operation_kwargs:
303+
A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.delete_boot_volume_backup`
304+
305+
:param dict waiter_kwargs:
306+
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``
307+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
308+
"""
309+
initial_get_result = self.client.get_boot_volume_backup(boot_volume_backup_id)
310+
operation_result = self.client.delete_boot_volume_backup(boot_volume_backup_id, **operation_kwargs)
311+
if not wait_for_states:
312+
return operation_result
313+
314+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
315+
316+
try:
317+
waiter_result = oci.wait_until(
318+
self.client,
319+
initial_get_result,
320+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
321+
succeed_on_not_found=True,
322+
**waiter_kwargs
323+
)
324+
result_to_return = waiter_result
325+
326+
return result_to_return
327+
except Exception as e:
328+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
329+
215330
def delete_volume_and_wait_for_state(self, volume_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
216331
"""
217332
Calls :py:func:`~oci.core.BlockstorageClient.delete_volume` and waits for the :py:class:`~oci.core.models.Volume` acted upon
@@ -409,6 +524,47 @@ def update_boot_volume_and_wait_for_state(self, boot_volume_id, update_boot_volu
409524
except Exception as e:
410525
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
411526

527+
def update_boot_volume_backup_and_wait_for_state(self, boot_volume_backup_id, update_boot_volume_backup_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
528+
"""
529+
Calls :py:func:`~oci.core.BlockstorageClient.update_boot_volume_backup` and waits for the :py:class:`~oci.core.models.BootVolumeBackup` acted upon
530+
to enter the given state(s).
531+
532+
:param str boot_volume_backup_id: (required)
533+
The OCID of the boot volume backup.
534+
535+
:param UpdateBootVolumeBackupDetails update_boot_volume_backup_details: (required)
536+
Update boot volume backup fields
537+
538+
:param list[str] wait_for_states:
539+
An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.BootVolumeBackup.lifecycle_state`
540+
541+
:param dict operation_kwargs:
542+
A dictionary of keyword arguments to pass to :py:func:`~oci.core.BlockstorageClient.update_boot_volume_backup`
543+
544+
:param dict waiter_kwargs:
545+
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``
546+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
547+
"""
548+
operation_result = self.client.update_boot_volume_backup(boot_volume_backup_id, update_boot_volume_backup_details, **operation_kwargs)
549+
if not wait_for_states:
550+
return operation_result
551+
552+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
553+
wait_for_resource_id = operation_result.data.id
554+
555+
try:
556+
waiter_result = oci.wait_until(
557+
self.client,
558+
self.client.get_boot_volume_backup(wait_for_resource_id),
559+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
560+
**waiter_kwargs
561+
)
562+
result_to_return = waiter_result
563+
564+
return result_to_return
565+
except Exception as e:
566+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
567+
412568
def update_volume_and_wait_for_state(self, volume_id, update_volume_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
413569
"""
414570
Calls :py:func:`~oci.core.BlockstorageClient.update_volume` and waits for the :py:class:`~oci.core.models.Volume` acted upon

src/oci/core/compute_client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,18 +1708,17 @@ def get_windows_instance_initial_credentials(self, instance_id, **kwargs):
17081708
def instance_action(self, instance_id, action, **kwargs):
17091709
"""
17101710
InstanceAction
1711-
Performs one of the power actions (start, stop, softreset, softstop, or reset)
1712-
on the specified instance.
1711+
Performs one of the following power actions on the specified instance:
17131712
1714-
**start** - power on
1713+
- **START** - Powers on the instance.
17151714
1716-
**stop** - power off
1715+
- **STOP** - Powers off the instance.
17171716
1718-
**softreset** - ACPI shutdown and power on
1717+
- **SOFTRESET** - Gracefully reboots instance by sending a shutdown command to the operating system and then powers the instance back on.
17191718
1720-
**softstop** - signal the instance operating system to shutdown gracefully
1719+
- **SOFTSTOP** - Gracefully shuts down instance by sending a shutdown command to the operating system.
17211720
1722-
**reset** - power off and power on
1721+
- **RESET** - Powers off the instance and then powers it back on.
17231722
17241723
For more information see `Stopping and Starting an Instance`__.
17251724

src/oci/core/models/__init__.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@
1010
from .attach_volume_details import AttachVolumeDetails
1111
from .boot_volume import BootVolume
1212
from .boot_volume_attachment import BootVolumeAttachment
13+
from .boot_volume_backup import BootVolumeBackup
14+
from .boot_volume_source_details import BootVolumeSourceDetails
15+
from .boot_volume_source_from_boot_volume_backup_details import BootVolumeSourceFromBootVolumeBackupDetails
16+
from .boot_volume_source_from_boot_volume_details import BootVolumeSourceFromBootVolumeDetails
1317
from .bulk_add_virtual_circuit_public_prefixes_details import BulkAddVirtualCircuitPublicPrefixesDetails
1418
from .bulk_delete_virtual_circuit_public_prefixes_details import BulkDeleteVirtualCircuitPublicPrefixesDetails
1519
from .capture_console_history_details import CaptureConsoleHistoryDetails
1620
from .connect_local_peering_gateways_details import ConnectLocalPeeringGatewaysDetails
1721
from .connect_remote_peering_connections_details import ConnectRemotePeeringConnectionsDetails
1822
from .console_history import ConsoleHistory
1923
from .cpe import Cpe
24+
from .create_boot_volume_backup_details import CreateBootVolumeBackupDetails
25+
from .create_boot_volume_details import CreateBootVolumeDetails
2026
from .create_cpe_details import CreateCpeDetails
2127
from .create_cross_connect_details import CreateCrossConnectDetails
2228
from .create_cross_connect_group_details import CreateCrossConnectGroupDetails
@@ -33,6 +39,7 @@
3339
from .create_remote_peering_connection_details import CreateRemotePeeringConnectionDetails
3440
from .create_route_table_details import CreateRouteTableDetails
3541
from .create_security_list_details import CreateSecurityListDetails
42+
from .create_service_gateway_details import CreateServiceGatewayDetails
3643
from .create_subnet_details import CreateSubnetDetails
3744
from .create_vcn_details import CreateVcnDetails
3845
from .create_virtual_circuit_details import CreateVirtualCircuitDetails
@@ -93,12 +100,17 @@
93100
from .route_rule import RouteRule
94101
from .route_table import RouteTable
95102
from .security_list import SecurityList
103+
from .service import Service
104+
from .service_gateway import ServiceGateway
105+
from .service_id_request_details import ServiceIdRequestDetails
106+
from .service_id_response_details import ServiceIdResponseDetails
96107
from .shape import Shape
97108
from .subnet import Subnet
98109
from .tcp_options import TcpOptions
99110
from .tunnel_config import TunnelConfig
100111
from .tunnel_status import TunnelStatus
101112
from .udp_options import UdpOptions
113+
from .update_boot_volume_backup_details import UpdateBootVolumeBackupDetails
102114
from .update_boot_volume_details import UpdateBootVolumeDetails
103115
from .update_console_history_details import UpdateConsoleHistoryDetails
104116
from .update_cpe_details import UpdateCpeDetails
@@ -117,6 +129,7 @@
117129
from .update_remote_peering_connection_details import UpdateRemotePeeringConnectionDetails
118130
from .update_route_table_details import UpdateRouteTableDetails
119131
from .update_security_list_details import UpdateSecurityListDetails
132+
from .update_service_gateway_details import UpdateServiceGatewayDetails
120133
from .update_subnet_details import UpdateSubnetDetails
121134
from .update_vcn_details import UpdateVcnDetails
122135
from .update_virtual_circuit_details import UpdateVirtualCircuitDetails
@@ -156,13 +169,19 @@
156169
"AttachVolumeDetails": AttachVolumeDetails,
157170
"BootVolume": BootVolume,
158171
"BootVolumeAttachment": BootVolumeAttachment,
172+
"BootVolumeBackup": BootVolumeBackup,
173+
"BootVolumeSourceDetails": BootVolumeSourceDetails,
174+
"BootVolumeSourceFromBootVolumeBackupDetails": BootVolumeSourceFromBootVolumeBackupDetails,
175+
"BootVolumeSourceFromBootVolumeDetails": BootVolumeSourceFromBootVolumeDetails,
159176
"BulkAddVirtualCircuitPublicPrefixesDetails": BulkAddVirtualCircuitPublicPrefixesDetails,
160177
"BulkDeleteVirtualCircuitPublicPrefixesDetails": BulkDeleteVirtualCircuitPublicPrefixesDetails,
161178
"CaptureConsoleHistoryDetails": CaptureConsoleHistoryDetails,
162179
"ConnectLocalPeeringGatewaysDetails": ConnectLocalPeeringGatewaysDetails,
163180
"ConnectRemotePeeringConnectionsDetails": ConnectRemotePeeringConnectionsDetails,
164181
"ConsoleHistory": ConsoleHistory,
165182
"Cpe": Cpe,
183+
"CreateBootVolumeBackupDetails": CreateBootVolumeBackupDetails,
184+
"CreateBootVolumeDetails": CreateBootVolumeDetails,
166185
"CreateCpeDetails": CreateCpeDetails,
167186
"CreateCrossConnectDetails": CreateCrossConnectDetails,
168187
"CreateCrossConnectGroupDetails": CreateCrossConnectGroupDetails,
@@ -179,6 +198,7 @@
179198
"CreateRemotePeeringConnectionDetails": CreateRemotePeeringConnectionDetails,
180199
"CreateRouteTableDetails": CreateRouteTableDetails,
181200
"CreateSecurityListDetails": CreateSecurityListDetails,
201+
"CreateServiceGatewayDetails": CreateServiceGatewayDetails,
182202
"CreateSubnetDetails": CreateSubnetDetails,
183203
"CreateVcnDetails": CreateVcnDetails,
184204
"CreateVirtualCircuitDetails": CreateVirtualCircuitDetails,
@@ -239,12 +259,17 @@
239259
"RouteRule": RouteRule,
240260
"RouteTable": RouteTable,
241261
"SecurityList": SecurityList,
262+
"Service": Service,
263+
"ServiceGateway": ServiceGateway,
264+
"ServiceIdRequestDetails": ServiceIdRequestDetails,
265+
"ServiceIdResponseDetails": ServiceIdResponseDetails,
242266
"Shape": Shape,
243267
"Subnet": Subnet,
244268
"TcpOptions": TcpOptions,
245269
"TunnelConfig": TunnelConfig,
246270
"TunnelStatus": TunnelStatus,
247271
"UdpOptions": UdpOptions,
272+
"UpdateBootVolumeBackupDetails": UpdateBootVolumeBackupDetails,
248273
"UpdateBootVolumeDetails": UpdateBootVolumeDetails,
249274
"UpdateConsoleHistoryDetails": UpdateConsoleHistoryDetails,
250275
"UpdateCpeDetails": UpdateCpeDetails,
@@ -263,6 +288,7 @@
263288
"UpdateRemotePeeringConnectionDetails": UpdateRemotePeeringConnectionDetails,
264289
"UpdateRouteTableDetails": UpdateRouteTableDetails,
265290
"UpdateSecurityListDetails": UpdateSecurityListDetails,
291+
"UpdateServiceGatewayDetails": UpdateServiceGatewayDetails,
266292
"UpdateSubnetDetails": UpdateSubnetDetails,
267293
"UpdateVcnDetails": UpdateVcnDetails,
268294
"UpdateVirtualCircuitDetails": UpdateVirtualCircuitDetails,

0 commit comments

Comments
 (0)