Skip to content

Commit

Permalink
Releasing version 2.110.1
Browse files Browse the repository at this point in the history
  • Loading branch information
oci-dex-release-bot committed Aug 15, 2023
1 parent 31f38df commit fc38135
Show file tree
Hide file tree
Showing 53 changed files with 1,424 additions and 120 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on `Keep a Changelog <http://keepachangelog.com/>`_.
====================
2.110.1 - 2023-08-15
====================

Added
-----
* Support for credential stores, including Single Sign-On support, for deployments in the GoldenGate service
* Support for container security contexts in the Container Instances service
* Support for placement constraints and cluster configurations on cluster networks in the Compute service
2.110.0 - 2023-08-08
====================

Expand Down
4 changes: 4 additions & 0 deletions docs/api/container_instances.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ Container Instances
oci.container_instances.models.CreateContainerVnicDetails
oci.container_instances.models.CreateContainerVolumeDetails
oci.container_instances.models.CreateImagePullSecretDetails
oci.container_instances.models.CreateLinuxSecurityContextDetails
oci.container_instances.models.CreateSecurityContextDetails
oci.container_instances.models.CreateVaultImagePullSecretDetails
oci.container_instances.models.CreateVolumeMountDetails
oci.container_instances.models.HealthCheckHttpHeader
oci.container_instances.models.ImagePullSecret
oci.container_instances.models.LinuxSecurityContext
oci.container_instances.models.SecurityContext
oci.container_instances.models.ShapeMemoryOptions
oci.container_instances.models.ShapeNetworkingBandwidthOptions
oci.container_instances.models.ShapeOcpuOptions
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CreateLinuxSecurityContextDetails
=================================

.. currentmodule:: oci.container_instances.models

.. autoclass:: CreateLinuxSecurityContextDetails
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CreateSecurityContextDetails
============================

.. currentmodule:: oci.container_instances.models

.. autoclass:: CreateSecurityContextDetails
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
LinuxSecurityContext
====================

.. currentmodule:: oci.container_instances.models

.. autoclass:: LinuxSecurityContext
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
SecurityContext
===============

.. currentmodule:: oci.container_instances.models

.. autoclass:: SecurityContext
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
1 change: 1 addition & 0 deletions docs/api/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Core Services
oci.core.models.ChangeVolumeGroupCompartmentDetails
oci.core.models.ChangeVtapCompartmentDetails
oci.core.models.ClusterConfigDetails
oci.core.models.ClusterConfigurationDetails
oci.core.models.ClusterNetwork
oci.core.models.ClusterNetworkPlacementConfigurationDetails
oci.core.models.ClusterNetworkSummary
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ClusterConfigurationDetails
===========================

.. currentmodule:: oci.core.models

.. autoclass:: ClusterConfigurationDetails
:show-inheritance:
:special-members: __init__
:members:
:undoc-members:
:inherited-members:
49 changes: 49 additions & 0 deletions examples/parallel_api_collection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# coding: utf-8
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

# Goal of Script!!!
# By avoiding API calls without dependencies to be processed in serial in our code, we get a significant performance increase on API collections.
# This code sends the API call to the thread pool so we do not have to wait for the previous API call to finish before going to the next API call.

import oci
import concurrent.futures
import time

config = oci.config.from_file()
identity_client = oci.identity.IdentityClient(config)
# Time How Long the the API Calls Take.
timer = time.time()

# Run the "List Users" call to get all of the configured users. This will get the dependencies for the "List API Keys" call.
list_users_response = identity_client.list_users(config['tenancy'])

# Save the active API keys to this list.
active_api_keys = []

# Function that executes the "list_api_keys" call.
# If the user has an active API key, the function will add it to the active_api_keys list.


def api_function(user_ocid):
list_api_keys_response = identity_client.list_api_keys(user_ocid)
if list_api_keys_response.data:
active_api_keys.extend(list_api_keys_response.data)


# Create a Thread Pool to submit tasks. The Max Workers is how many threads can be executed at one time.
thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=10)

# Iterate through each user and get the API keys.
# Submit the call to the thread pool with the user.id argument to the list_api_keys API call.
for user in list_users_response.data:
thread_pool.submit(api_function, user.id)

# Wait for all of the tasks in the thread pool to complete before finishing the script.
thread_pool.shutdown(wait=True)

# Show How Many Keys Were Found
print(len(active_api_keys))

# See How Long the Call Took. Enjoy your speed enhancement on your OCI API calls :)
print(f"Script took {(time.time()- timer)}s")
8 changes: 8 additions & 0 deletions src/oci/container_instances/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@
from .create_container_vnic_details import CreateContainerVnicDetails
from .create_container_volume_details import CreateContainerVolumeDetails
from .create_image_pull_secret_details import CreateImagePullSecretDetails
from .create_linux_security_context_details import CreateLinuxSecurityContextDetails
from .create_security_context_details import CreateSecurityContextDetails
from .create_vault_image_pull_secret_details import CreateVaultImagePullSecretDetails
from .create_volume_mount_details import CreateVolumeMountDetails
from .health_check_http_header import HealthCheckHttpHeader
from .image_pull_secret import ImagePullSecret
from .linux_security_context import LinuxSecurityContext
from .security_context import SecurityContext
from .shape_memory_options import ShapeMemoryOptions
from .shape_networking_bandwidth_options import ShapeNetworkingBandwidthOptions
from .shape_ocpu_options import ShapeOcpuOptions
Expand Down Expand Up @@ -104,10 +108,14 @@
"CreateContainerVnicDetails": CreateContainerVnicDetails,
"CreateContainerVolumeDetails": CreateContainerVolumeDetails,
"CreateImagePullSecretDetails": CreateImagePullSecretDetails,
"CreateLinuxSecurityContextDetails": CreateLinuxSecurityContextDetails,
"CreateSecurityContextDetails": CreateSecurityContextDetails,
"CreateVaultImagePullSecretDetails": CreateVaultImagePullSecretDetails,
"CreateVolumeMountDetails": CreateVolumeMountDetails,
"HealthCheckHttpHeader": HealthCheckHttpHeader,
"ImagePullSecret": ImagePullSecret,
"LinuxSecurityContext": LinuxSecurityContext,
"SecurityContext": SecurityContext,
"ShapeMemoryOptions": ShapeMemoryOptions,
"ShapeNetworkingBandwidthOptions": ShapeNetworkingBandwidthOptions,
"ShapeOcpuOptions": ShapeOcpuOptions,
Expand Down
31 changes: 29 additions & 2 deletions src/oci/container_instances/models/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def __init__(self, **kwargs):
The value to assign to the container_restart_attempt_count property of this Container.
:type container_restart_attempt_count: int
:param security_context:
The value to assign to the security_context property of this Container.
:type security_context: oci.container_instances.models.SecurityContext
"""
self.swagger_types = {
'id': 'str',
Expand All @@ -179,7 +183,8 @@ def __init__(self, **kwargs):
'health_checks': 'list[ContainerHealthCheck]',
'is_resource_principal_disabled': 'bool',
'resource_config': 'ContainerResourceConfig',
'container_restart_attempt_count': 'int'
'container_restart_attempt_count': 'int',
'security_context': 'SecurityContext'
}

self.attribute_map = {
Expand Down Expand Up @@ -207,7 +212,8 @@ def __init__(self, **kwargs):
'health_checks': 'healthChecks',
'is_resource_principal_disabled': 'isResourcePrincipalDisabled',
'resource_config': 'resourceConfig',
'container_restart_attempt_count': 'containerRestartAttemptCount'
'container_restart_attempt_count': 'containerRestartAttemptCount',
'security_context': 'securityContext'
}

self._id = None
Expand Down Expand Up @@ -235,6 +241,7 @@ def __init__(self, **kwargs):
self._is_resource_principal_disabled = None
self._resource_config = None
self._container_restart_attempt_count = None
self._security_context = None

@property
def id(self):
Expand Down Expand Up @@ -900,6 +907,26 @@ def container_restart_attempt_count(self, container_restart_attempt_count):
"""
self._container_restart_attempt_count = container_restart_attempt_count

@property
def security_context(self):
"""
Gets the security_context of this Container.
:return: The security_context of this Container.
:rtype: oci.container_instances.models.SecurityContext
"""
return self._security_context

@security_context.setter
def security_context(self, security_context):
"""
Sets the security_context of this Container.
:param security_context: The security_context of this Container.
:type: oci.container_instances.models.SecurityContext
"""
self._security_context = security_context

def __repr__(self):
return formatted_flat_dict(self)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@init_model_state_from_kwargs
class ContainerEmptyDirVolume(ContainerVolume):
"""
The empty directory of container.
The empty directory volume of a container instance. You can create up to 64 EmptyDir per container instance.
"""

#: A constant which can be used with the backing_store property of a ContainerEmptyDirVolume.
Expand Down
31 changes: 29 additions & 2 deletions src/oci/container_instances/models/container_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def __init__(self, **kwargs):
The value to assign to the is_resource_principal_disabled property of this ContainerSummary.
:type is_resource_principal_disabled: bool
:param security_context:
The value to assign to the security_context property of this ContainerSummary.
:type security_context: oci.container_instances.models.SecurityContext
"""
self.swagger_types = {
'id': 'str',
Expand All @@ -101,7 +105,8 @@ def __init__(self, **kwargs):
'container_instance_id': 'str',
'resource_config': 'ContainerResourceConfig',
'image_url': 'str',
'is_resource_principal_disabled': 'bool'
'is_resource_principal_disabled': 'bool',
'security_context': 'SecurityContext'
}

self.attribute_map = {
Expand All @@ -120,7 +125,8 @@ def __init__(self, **kwargs):
'container_instance_id': 'containerInstanceId',
'resource_config': 'resourceConfig',
'image_url': 'imageUrl',
'is_resource_principal_disabled': 'isResourcePrincipalDisabled'
'is_resource_principal_disabled': 'isResourcePrincipalDisabled',
'security_context': 'securityContext'
}

self._id = None
Expand All @@ -139,6 +145,7 @@ def __init__(self, **kwargs):
self._resource_config = None
self._image_url = None
self._is_resource_principal_disabled = None
self._security_context = None

@property
def id(self):
Expand Down Expand Up @@ -560,6 +567,26 @@ def is_resource_principal_disabled(self, is_resource_principal_disabled):
"""
self._is_resource_principal_disabled = is_resource_principal_disabled

@property
def security_context(self):
"""
Gets the security_context of this ContainerSummary.
:return: The security_context of this ContainerSummary.
:rtype: oci.container_instances.models.SecurityContext
"""
return self._security_context

@security_context.setter
def security_context(self, security_context):
"""
Sets the security_context of this ContainerSummary.
:param security_context: The security_context of this ContainerSummary.
:type: oci.container_instances.models.SecurityContext
"""
self._security_context = security_context

def __repr__(self):
return formatted_flat_dict(self)

Expand Down
Loading

0 comments on commit fc38135

Please sign in to comment.