Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.

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

====================
2.1.0 - 2018-11-01
====================

Added
-----
* Support for modifying the route table, DHCP options and security lists associated with a subnet in the Networking service.
* Support for tagging of File Systems, Mount Targets and Snapshots in the File Storage service.
* Support for nested compartments in the Identity service

Breaking
--------
* database_size_in_g_bs field in Backup and BackupSummary models renamed to database_size_in_gbs.

====================
2.0.6 - 2018-10-18
====================
Expand All @@ -21,15 +35,15 @@ Added

Changed
-------
* database_edition field in Backup model changed from a free format string to a validated string. It will only accept one of the following: “STANDARD_EDITION”, “ENTERPRISE_EDITION”, “ENTERPRISE_EDITION_HIGH_PERFORMANCE”, “ENTERPRISE_EDITION_EXTREME_PERFORMANCE”
* database_edition field in Backup and model changed from a free format string to a validated string. It will only accept one of the following: “STANDARD_EDITION”, “ENTERPRISE_EDITION”, “ENTERPRISE_EDITION_HIGH_PERFORMANCE”, “ENTERPRISE_EDITION_EXTREME_PERFORMANCE”

Known issue
-----------
* Block Storage service for copying volume backups across regions is not enabled

Breaking
--------
* db_data_size_in_mbs field in Backup model is renamed to database_size_in_g_bs. The type changed from int to float.
* db_data_size_in_mbs field in Backup and BackupSummary models renamed to database_size_in_g_bs. The type changed from int to float.

====================
2.0.5 - 2018-10-04
Expand Down
2 changes: 2 additions & 0 deletions docs/api/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ Core Services

oci.core.BlockstorageClient
oci.core.ComputeClient
oci.core.ComputeManagementClient
oci.core.VirtualNetworkClient
oci.core.BlockstorageClientCompositeOperations
oci.core.ComputeClientCompositeOperations
oci.core.ComputeManagementClientCompositeOperations
oci.core.VirtualNetworkClientCompositeOperations

--------
Expand Down
8 changes: 8 additions & 0 deletions docs/api/core/client/oci.core.ComputeManagementClient.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ComputeManagementClient
=======================

.. currentmodule:: oci.core

.. autoclass:: ComputeManagementClient
:special-members: __init__
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ComputeManagementClientCompositeOperations
==========================================

.. currentmodule:: oci.core

.. autoclass:: ComputeManagementClientCompositeOperations
:special-members: __init__
:members:
1 change: 1 addition & 0 deletions docs/api/file_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ File Storage
oci.file_storage.models.UpdateExportSetDetails
oci.file_storage.models.UpdateFileSystemDetails
oci.file_storage.models.UpdateMountTargetDetails
oci.file_storage.models.UpdateSnapshotDetails
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
UpdateSnapshotDetails
=====================

.. currentmodule:: oci.file_storage.models

.. autoclass:: UpdateSnapshotDetails
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
37 changes: 33 additions & 4 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ Compute
:noindex:


Compute Management
===================

.. autoclass:: oci.core.compute_management_client.ComputeManagementClient
:members:
:noindex:


Virtual Network
================

Expand Down Expand Up @@ -238,14 +246,35 @@ Identity
Key Management
==============

--------
Client
--------
---------
Clients
---------


Kms Crypto
===========

.. autoclass:: oci.key_management.kms_crypto_client.KmsCryptoClient
:members:
:noindex:


Kms Management
===============

.. autoclass:: oci.key_management.key_management_client.KeyManagementClient
.. autoclass:: oci.key_management.kms_management_client.KmsManagementClient
:members:
:noindex:


Kms Vault
==========

.. autoclass:: oci.key_management.kms_vault_client.KmsVaultClient
:members:
:noindex:


--------
Models
--------
Expand Down
8 changes: 6 additions & 2 deletions docs/api/key_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ Key Management
:nosignatures:
:template: autosummary/service_client.rst

oci.key_management.KeyManagementClient
oci.key_management.KeyManagementClientCompositeOperations
oci.key_management.KmsCryptoClient
oci.key_management.KmsManagementClient
oci.key_management.KmsVaultClient
oci.key_management.KmsCryptoClientCompositeOperations
oci.key_management.KmsManagementClientCompositeOperations
oci.key_management.KmsVaultClientCompositeOperations

--------
Models
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KmsCryptoClient
===============

.. currentmodule:: oci.key_management

.. autoclass:: KmsCryptoClient
:special-members: __init__
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KmsCryptoClientCompositeOperations
==================================

.. currentmodule:: oci.key_management

.. autoclass:: KmsCryptoClientCompositeOperations
:special-members: __init__
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KmsManagementClient
===================

.. currentmodule:: oci.key_management

.. autoclass:: KmsManagementClient
:special-members: __init__
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KmsManagementClientCompositeOperations
======================================

.. currentmodule:: oci.key_management

.. autoclass:: KmsManagementClientCompositeOperations
:special-members: __init__
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KmsVaultClient
==============

.. currentmodule:: oci.key_management

.. autoclass:: KmsVaultClient
:special-members: __init__
:members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
KmsVaultClientCompositeOperations
=================================

.. currentmodule:: oci.key_management

.. autoclass:: KmsVaultClientCompositeOperations
:special-members: __init__
:members:
5 changes: 4 additions & 1 deletion docs/api/landing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ API Reference
* :doc:`Container Engine <container_engine>`
* :doc:`Block Storage <core/client/oci.core.BlockstorageClient>`
* :doc:`Compute <core/client/oci.core.ComputeClient>`
* :doc:`Compute Management <core/client/oci.core.ComputeManagementClient>`
* :doc:`Virtual Network <core/client/oci.core.VirtualNetworkClient>`
* :doc:`Database <database>`
* :doc:`DNS <dns>`
* :doc:`Email <email>`
* :doc:`File Storage <file_storage>`
* :doc:`Identity <identity>`
* :doc:`Key Management <key_management>`
* :doc:`Kms Crypto <key_management/client/oci.key_management.KmsCryptoClient>`
* :doc:`Kms Management <key_management/client/oci.key_management.KmsManagementClient>`
* :doc:`Kms Vault <key_management/client/oci.key_management.KmsVaultClient>`
* :doc:`Load Balancer <load_balancer>`
* :doc:`Object Storage <object_storage>`
* :doc:`Resource Search <resource_search>`
Expand Down
25 changes: 19 additions & 6 deletions examples/file_storage_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,20 @@ def delete_vcn_and_subnet(virtual_network, vcn_and_subnet):


config = oci.config.from_file()
iam_client = oci.identity.IdentityClient(config)
file_storage_client = oci.file_storage.FileStorageClient(config)
virtual_network_client = oci.core.VirtualNetworkClient(config)

if len(sys.argv) != 3:
raise RuntimeError('This script expects an argument of the compartment OCID and availability domain where the file system will be created')
if len(sys.argv) != 5:
raise RuntimeError('This script expects an argument of the compartment OCID '
'and availability domain where the file system will be created. '
'It also expects defined tag namespace/key.')

# The first argument is the name of the script, so start the index at 1
compartment_id = sys.argv[1]
availability_domain = sys.argv[2]
namespace = sys.argv[3]
defined_key = sys.argv[4]

# Here we apply a retry strategy to the call to ride out any throttles, timeouts or intermittent 500s (internal server
# errors). The retry strategy will also make requests with an opc-retry-token that it generates.
Expand All @@ -126,7 +131,9 @@ def delete_vcn_and_subnet(virtual_network, vcn_and_subnet):
oci.file_storage.models.CreateFileSystemDetails(
display_name='py_sdk_example_fs',
compartment_id=compartment_id,
availability_domain=availability_domain
availability_domain=availability_domain,
freeform_tags={"foo": "value"},
defined_tags={namespace: {defined_key: "value"}}
),
retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
)
Expand Down Expand Up @@ -185,7 +192,9 @@ def delete_vcn_and_subnet(virtual_network, vcn_and_subnet):
availability_domain=subnet.availability_domain,
subnet_id=subnet.id,
compartment_id=compartment_id,
display_name=mount_target_name
display_name=mount_target_name,
freeform_tags={"foo": "value"},
defined_tags={namespace: {defined_key: "value"}}
),
opc_retry_token=mount_target_retry_token
)
Expand All @@ -208,7 +217,9 @@ def delete_vcn_and_subnet(virtual_network, vcn_and_subnet):
availability_domain=subnet.availability_domain,
subnet_id=subnet.id,
compartment_id=compartment_id,
display_name=mount_target_name
display_name=mount_target_name,
freeform_tags={"foo": "value"},
defined_tags={namespace: {defined_key: "value"}}
),
opc_retry_token=mount_target_retry_token
)
Expand Down Expand Up @@ -301,7 +312,9 @@ def delete_vcn_and_subnet(virtual_network, vcn_and_subnet):
create_snapshot_response = file_storage_client.create_snapshot(
oci.file_storage.models.CreateSnapshotDetails(
file_system_id=file_system.id,
name='my_snapshot_1'
name='my_snapshot_1',
freeform_tags={"foo": "value"},
defined_tags={namespace: {defined_key: "value"}}
),
retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
universal = 1

[flake8]
ignore = D203,E501
ignore = D203,E501,W504
exclude =
.git,
.tox,
Expand Down
8 changes: 4 additions & 4 deletions src/oci/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

USER_INFO = "Oracle-PythonSDK/{}".format(__version__)

DICT_VALUE_TYPE_REGEX = re.compile('dict\(str, (.+?)\)$')
LIST_ITEM_TYPE_REGEX = re.compile('list\[(.+?)\]$')
DICT_VALUE_TYPE_REGEX = re.compile('dict\(str, (.+?)\)$') # noqa: W605
LIST_ITEM_TYPE_REGEX = re.compile('list\[(.+?)\]$') # noqa: W605


def merge_type_mappings(*dictionaries):
Expand Down Expand Up @@ -547,12 +547,12 @@ def __deserialize(self, data, cls):
return None

if cls.startswith('list['):
sub_kls = re.match('list\[(.*)\]', cls).group(1)
sub_kls = re.match('list\[(.*)\]', cls).group(1) # noqa: W605
return [self.__deserialize(sub_data, sub_kls)
for sub_data in data]

if cls.startswith('dict('):
sub_kls = re.match('dict\(([^,]*), (.*)\)', cls).group(2)
sub_kls = re.match('dict\(([^,]*), (.*)\)', cls).group(2) # noqa: W605
return {k: self.__deserialize(v, sub_kls)
for k, v in data.items()}

Expand Down
Loading