Skip to content

Commit 1074435

Browse files
authored
Releasing version 1.3.3 (#18)
1 parent 656bc2c commit 1074435

Some content is hidden

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

48 files changed

+3332
-294
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.3.3 - 2017-06-09
9+
====================
10+
11+
-------
12+
Added
13+
-------
14+
15+
* An UploadManager class to better support large object uploads though multipart and parallel operations.
16+
* Support for object storage pre-authenticated requests and public buckets.
17+
* Support for load balancing service.
18+
* Support for nested instance metadata operations.
19+
720
====================
821
1.3.2 - 2017-05-18
922
====================

docs/api/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,27 @@ Virtual Network
5757

5858
.. automodule:: oraclebmc.identity.models
5959
:members:
60+
:undoc-members:
61+
:imported-members:
62+
63+
==============
64+
Load Balancer
65+
==============
66+
67+
--------
68+
Client
69+
--------
70+
71+
.. autoclass:: oraclebmc.loadbalancer.load_balancer_client.LoadBalancerClient
72+
:members:
73+
74+
--------
75+
Models
76+
--------
77+
78+
.. automodule:: oraclebmc.loadbalancer.models
79+
:members:
80+
:undoc-members:
6081
:imported-members:
6182

6283
================
@@ -76,6 +97,7 @@ Virtual Network
7697

7798
.. automodule:: oraclebmc.object_storage.models
7899
:members:
100+
:undoc-members:
79101
:imported-members:
80102

81103

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2+
3+
from __future__ import print_function
4+
import os
5+
import oraclebmc
6+
from oraclebmc.object_storage import UploadManager
7+
from oraclebmc.object_storage.models import CreateBucketDetails
8+
from oraclebmc.object_storage.transfer.constants import MEBIBYTE
9+
10+
11+
def progress_callback(bytes_uploaded):
12+
print("{} additional bytes uploaded".format(bytes_uploaded))
13+
14+
15+
config = oraclebmc.config.from_file()
16+
compartment_id = config["tenancy"]
17+
object_storage = oraclebmc.object_storage.ObjectStorageClient(config)
18+
19+
namespace = object_storage.get_namespace().data
20+
bucket_name = "python-sdk-example-bucket"
21+
object_name = "python-sdk-example-object"
22+
23+
print("Creating a new bucket {!r} in compartment {!r}".format(bucket_name, compartment_id))
24+
request = CreateBucketDetails()
25+
request.compartment_id = compartment_id
26+
request.name = bucket_name
27+
bucket = object_storage.create_bucket(namespace, request)
28+
29+
# create example file to upload
30+
filename = 'multipart_object_content.txt'
31+
file_size_in_mebibytes = 10
32+
sample_content = b'a'
33+
with open(filename, 'wb') as f:
34+
while f.tell() < MEBIBYTE * file_size_in_mebibytes:
35+
f.write(sample_content * MEBIBYTE)
36+
37+
print("Uploading new object {!r}".format(object_name))
38+
39+
# upload manager will automatically use mutlipart uploads if the part size is less than the file size
40+
part_size = 2 * MEBIBYTE # part size (in bytes)
41+
upload_manager = UploadManager(object_storage, allow_parallel_uploads=True, parallel_process_count=3)
42+
response = upload_manager.upload_file(
43+
namespace, bucket_name, object_name, filename, part_size=part_size, progress_callback=progress_callback)
44+
45+
# To force single part uploads, set "allow_multipart_uploads=False" when creating the UploadManager.
46+
# upload_manager = UploadManager(object_storage, allow_multipart_uploads=False)
47+
# response = upload_manager.upload_file(
48+
# namespace, bucket_name, object_name, filename, part_size=part_size, progress_callback=progress_callback)
49+
50+
# remove file to clean up
51+
os.remove(filename)
52+
53+
print("Deleting object {}".format(object_name))
54+
object_storage.delete_object(namespace, bucket_name, object_name)
55+
56+
print("Deleting bucket {}".format(bucket_name))
57+
object_storage.delete_bucket(namespace, bucket_name)

examples/parallel_upload_to_object_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def upload_to_object_storage(config, namespace, bucket, path):
4747
"parallel. The example uses multiple processes.",
4848
"",
4949
"All the files in 'directory' will be uploaded to the object storage bucket",
50-
"specified by 'bucket_name' The default profile will is used.",
50+
"specified by 'bucket_name' The default profile is used.",
5151
"",
5252
"The bucket must already exist. See object_crud.py for a bucket creation",
5353
"example."])

oraclebmc/core/blockstorage_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def create_volume(self, create_volume_details, **kwargs):
4343
You may optionally specify a *display name* for the volume, which is simply a friendly name or
4444
description. It does not have to be unique, and you can change it.
4545
46-
__ {{DOC_SERVER_URL}}/Content/Block/Concepts/overview.htm
47-
__ {{DOC_SERVER_URL}}/Content/Identity/Concepts/overview.htm
48-
__ {{DOC_SERVER_URL}}/Content/General/Concepts/regions.htm
46+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm
47+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm
48+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm
4949
5050
5151
:param CreateVolumeDetails create_volume_details: (required)
@@ -97,7 +97,7 @@ def create_volume_backup(self, create_volume_backup_details, **kwargs):
9797
When the data is imaged, it goes into a CREATING state.
9898
After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.
9999
100-
__ {{DOC_SERVER_URL}}/Content/Block/Concepts/blockvolumebackups.htm
100+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/blockvolumebackups.htm
101101
102102
103103
:param CreateVolumeBackupDetails create_volume_backup_details: (required)
@@ -147,7 +147,7 @@ def delete_volume(self, volume_id, **kwargs):
147147
`Disconnecting From a Volume`__.
148148
**Warning:** All data on the volume will be permanently lost when the volume is deleted.
149149
150-
__ {{DOC_SERVER_URL}}/Content/Block/Tasks/disconnectingfromavolume.htm
150+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/disconnectingfromavolume.htm
151151
152152
153153
:param str volume_id: (required)

oraclebmc/core/compute_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def create_image(self, create_image_details, **kwargs):
144144
You may optionally specify a *display name* for the image, which is simply a friendly name or description.
145145
It does not have to be unique, and you can change it. See :func:`update_image`.
146146
147-
__ {{DOC_SERVER_URL}}/Content/Compute/Tasks/managingcustomimages.htm
147+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm
148148
149149
150150
:param CreateImageDetails create_image_details: (required)
@@ -679,9 +679,9 @@ def launch_instance(self, launch_instance_details, **kwargs):
679679
operation to get the VNIC ID for the instance, and then call
680680
:func:`get_vnic` with the VNIC ID.
681681
682-
__ {{DOC_SERVER_URL}}/Content/Compute/Concepts/computeoverview.htm
683-
__ {{DOC_SERVER_URL}}/Content/Identity/Concepts/overview.htm
684-
__ {{DOC_SERVER_URL}}/Content/General/Concepts/regions.htm
682+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Concepts/computeoverview.htm
683+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm
684+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm
685685
686686
687687
:param LaunchInstanceDetails launch_instance_details: (required)
@@ -794,7 +794,7 @@ def list_images(self, compartment_id, **kwargs):
794794
information about images, see
795795
`Managing Custom Images`__.
796796
797-
__ {{DOC_SERVER_URL}}/Content/Compute/Tasks/managingcustomimages.htm
797+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm
798798
799799
800800
:param str compartment_id: (required)

oraclebmc/core/models/create_subnet_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def dns_label(self):
195195
196196
Example: `subnet123`
197197
198-
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
198+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm
199199
200200
201201
:return: The dns_label of this CreateSubnetDetails.
@@ -222,7 +222,7 @@ def dns_label(self, dns_label):
222222
223223
Example: `subnet123`
224224
225-
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
225+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm
226226
227227
228228
:param dns_label: The dns_label of this CreateSubnetDetails.

oraclebmc/core/models/create_vcn_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def dns_label(self):
125125
126126
Example: `vcn1`
127127
128-
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
128+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm
129129
130130
131131
:return: The dns_label of this CreateVcnDetails.
@@ -154,7 +154,7 @@ def dns_label(self, dns_label):
154154
155155
Example: `vcn1`
156156
157-
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
157+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm
158158
159159
160160
:param dns_label: The dns_label of this CreateVcnDetails.

oraclebmc/core/models/create_virtual_circuit_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def type(self):
300300
means `RFC 1918`__ addresses
301301
(10.0.0.0/8, 172.16/12, and 192.168/16). Only PRIVATE is supported.
302302
303-
__ https://tools.ietf.org/html/rfc1918
303+
__ https://tools.ietf.org/html/rfc1918
304304
305305
Allowed values for this property are: "PUBLIC", "PRIVATE"
306306
@@ -318,7 +318,7 @@ def type(self, type):
318318
means `RFC 1918`__ addresses
319319
(10.0.0.0/8, 172.16/12, and 192.168/16). Only PRIVATE is supported.
320320
321-
__ https://tools.ietf.org/html/rfc1918
321+
__ https://tools.ietf.org/html/rfc1918
322322
323323
324324
:param type: The type of this CreateVirtualCircuitDetails.

oraclebmc/core/models/create_vnic_details.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ def hostname_label(self):
119119
120120
Example: `bminstance-1`
121121
122-
__ https://tools.ietf.org/html/rfc952
123-
__ https://tools.ietf.org/html/rfc1123
124-
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
122+
__ https://tools.ietf.org/html/rfc952
123+
__ https://tools.ietf.org/html/rfc1123
124+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm
125125
126126
127127
:return: The hostname_label of this CreateVnicDetails.
@@ -153,9 +153,9 @@ def hostname_label(self, hostname_label):
153153
154154
Example: `bminstance-1`
155155
156-
__ https://tools.ietf.org/html/rfc952
157-
__ https://tools.ietf.org/html/rfc1123
158-
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
156+
__ https://tools.ietf.org/html/rfc952
157+
__ https://tools.ietf.org/html/rfc1123
158+
__ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm
159159
160160
161161
:param hostname_label: The hostname_label of this CreateVnicDetails.

0 commit comments

Comments
 (0)