Skip to content

Commit 6fdc654

Browse files
authored
Releasing version 2.18.1
Releasing version 2.18.1
2 parents 7a71813 + b04b500 commit 6fdc654

22 files changed

+533
-278
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ 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.18.1 - 2020-07-21
8+
====================
9+
10+
Added
11+
-----
12+
* Support for license types on instances in the Content and Experience service
13+
14+
Fixed
15+
-----
16+
* Fixed a bug for Resource Principal authentication where RPST token was not getting refreshed correctly.
17+
618
====================
719
2.18.0 - 2020-07-14
820
====================

docs/known-issues.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ These are the current known issues for the Python SDK.
66

77
UploadManager generates ssl3_write_pending error when a read timeout is set for the Object Storage client
88
=========================================================================================================
9+
**Update:** With v2.18.0 we handle the object storage client with default timeout values (connect timeout = 10 secs and read timeout = 60 secs), by overwriting the timeout to `None` in the operations.
10+
11+
PLEASE NOTE that the operations are NOT thread-safe, and you should provide the UploadManager class with its own Object Storage client that isn't used elsewhere.
12+
913
**Details:** UploadManager generates the following error when a read timeout is set for the Object Storage client.
1014

1115
.. code-block:: python
@@ -35,4 +39,9 @@ Potential data corruption with Python SDK on binary upload (versions 2.8.0 and b
3539

3640
**Impacted Versions:** v2.8.0 and below
3741

38-
**Direct link to this issue:** `Potential data corruption with Python SDK on binary upload <https://github.com/oracle/oci-python-sdk/issues/203/>`_
42+
**Direct link to this issue:** `Potential data corruption with Python SDK on binary upload <https://github.com/oracle/oci-python-sdk/issues/203/>`_
43+
44+
45+
Default timeout not getting set in the clients (versions 2.17.2 and below)
46+
==========================================================================
47+
The default timeout values (connect timeout = 10 secs and read timeout = 60 secs) we not getting set in the clients and remained None (infinite timeout). This has been fixed in v2.18.0.

docs/pagination.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ As a convenience over manually writing pagination code, you can make use of the
1919
* Eagerly load all results from a list call up to a given limit
2020
* Lazily load results (either all results, or up to a given limit) from a list call via a generator. These generators can yield either values/models or the raw response from calling the list operation
2121

22-
For an example on how to use these functions, please check `GitHub <https://github.com/oracle/oci-python-sdk/blob/master/examples/pagination.py>`_.
22+
For an example on how to use these functions, please check `GitHub <https://github.com/oracle/oci-python-sdk/blob/master/examples/pagination.py>`_. More details about the API is `here <https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/api/pagination.html>`_.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM fnproject/python:3.6-dev as build-stage
2+
WORKDIR /function
3+
ADD . /function/
4+
RUN pip3 install --target /python/ --no-cache --no-cache-dir -r requirements.txt &&\
5+
rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
6+
RUN rm -fr /function/.pip_cache
7+
8+
9+
FROM fnproject/python:3.6
10+
WORKDIR /function
11+
COPY --from=build-stage /function /function
12+
COPY --from=build-stage /python /python
13+
RUN chmod -R o+r /python /function
14+
# Usually, users don't need to install python sdk here, but directly add oci in requirement.txt
15+
ENV PYTHONPATH=/function:/python
16+
RUN pip3 install oci-2.17.1+preview.1-py2.py3-none-any.whl
17+
ENTRYPOINT ["/python/bin/fdk", "/function/func.py", "handler"]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# coding: utf-8
2+
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
3+
# 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.
4+
5+
# This example uses functions service to get the rpv2.2 token, for how to use functions, please refer fn Tutorials: https://fnproject.io/tutorials/
6+
# Users can set up Fn locally or with oci cloud shell, the tutoials can be found here: https://www.oracle.com/webfolder/technetwork/tutorials/infographics/oci_functions_cloudshell_quickview/functions_quickview_top/functions_quickview/index.html
7+
8+
import io
9+
import json
10+
import logging
11+
import oci
12+
# used by functions service
13+
from fdk import response
14+
15+
16+
def list_regions(client):
17+
try:
18+
resp = client.list_regions()
19+
logging.getLogger().info("region info:", resp.data)
20+
except oci.exceptions.ServiceError as e:
21+
logging.getLogger().error("service error: {0}, error code: {1}, opc-request-id: {2}".format(e.message, e.code, e.request_id))
22+
return e
23+
return resp.data
24+
25+
26+
def handler(ctx, data: io.BytesIO = None): # noqa: E999
27+
rpv2 = oci.auth.signers.get_resource_principals_signer()
28+
# Print the Resource Principal Security Token
29+
logging.getLogger().info("resource principle token:", rpv2.get_security_token())
30+
31+
# Note the config is passed in as an empty dictionary. A populated config
32+
# is not needed when using an EphemeralResourcePrincipalSigner
33+
iam_client = oci.identity.IdentityClient({}, signer=rpv2)
34+
35+
resp = list_regions(iam_client)
36+
return response.Response(
37+
ctx, response_data=json.dumps(
38+
{"regions:": str(resp)}),
39+
headers={"Content-Type": "application/json"}
40+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
schema_version: 20180708
2+
name: pythonfn
3+
version: 0.0.1
4+
runtime: python
5+
entrypoint: /python/bin/fdk /function/func.py handler
6+
memory: 1024
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fdk==0.1.16

examples/showoci/CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ 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+
20.07.21 - 2020-07-21
9+
=====================
10+
* Remove vcn_id from several network list options to boost the performance - list_dhcp_options, list_local_peering_gateways, list_route_tables, list_security_lists, list_subnets and list_internet_gateways
11+
* Fix database error if DG is in different region
12+
713
=====================
814
20.07.14 - 2020-07-14
915
=====================

examples/showoci/showoci.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@
6969
# - oci.secrets.SecretsClient
7070
# - oci.vault.VaultsClient
7171
# - oci.work_requests.WorkRequestClient
72-
# -
72+
# - oci.blockchain.BlockchainPlatformClient
73+
# - oci.data_integration.DataIntegrationClient
74+
# - oci.data_safe.DataSafeClient
75+
# - oci.ocvp.EsxiHostClient and oci.ocvp.SddcClient
76+
# - oci.usage_api.UsageapiClient
77+
#
7378
##########################################################################
7479
from __future__ import print_function
7580
from showoci_data import ShowOCIData
@@ -81,7 +86,7 @@
8186
import argparse
8287
import datetime
8388

84-
version = "20.07.14"
89+
version = "20.07.21"
8590

8691
##########################################################################
8792
# check OCI version

0 commit comments

Comments
 (0)