Skip to content

Commit ddf91e6

Browse files
authored
Merge pull request #1 from apache/trunk
Synicng
2 parents 617be30 + bb865b1 commit ddf91e6

File tree

108 files changed

+4831
-2422
lines changed

Some content is hidden

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

108 files changed

+4831
-2422
lines changed

.travis.yml

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
2-
sudo: false
3-
dist: trusty
2+
dist: xenial
43
os: linux
54

65
# Note: graphviz is needed for grapgs embedded in the docs
@@ -13,41 +12,52 @@ addons:
1312
matrix:
1413
fast_finish: true
1514
include:
16-
- python: 2.7
17-
before_script: TOX_ENV=py2.7,py2.7-dist,py2.7-dist-wheel
18-
- python: 3.4
19-
- python: 3.5
20-
- python: 3.6
21-
- python: 3.7
22-
dist: xenial
23-
sudo: required
15+
- name: Unit Tests (Python 3.5)
16+
python: 3.5
17+
- name: Unit Tests (Python 3.6)
18+
python: 3.6
19+
- name: Unit Tests, Installation Checks (Python 3.7)
20+
python: 3.7
2421
before_script: TOX_ENV=py3.7,py3.7-dist,py3.7-dist-wheel
25-
- python: 3.8
26-
dist: xenial
27-
sudo: required
28-
- python: pypy
29-
- python: pypy3
30-
- env: ENV=checks
31-
python: 2.7
22+
- name: Unit Tests (Python 3.8 on Windows)
23+
os: windows
24+
python: 3.8
25+
language: shell
26+
before_install:
27+
- choco install python --version 3.8.1
28+
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"
29+
- python -m pip install --upgrade pip
30+
before_script: TOX_ENV=py3.8-windows
31+
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
32+
- name: Unit Tests (Python 3.8)
33+
python: 3.8
34+
- name: Unit Tests (PyPy 3.5)
35+
python: pypy3.5
36+
- name: License and File name Checks
37+
env: ENV=checks
38+
python: 3.7
3239
before_script: TOX_ENV=checks
33-
- env: ENV=lint
34-
python: 2.7
40+
- name: Lint (flake8)
41+
env: ENV=lint
42+
python: 3.7
3543
before_script: TOX_ENV=lint
36-
- env: ENV=pylint
37-
python: 2.7
44+
- name: Lint (pylint)
45+
env: ENV=pylint
46+
python: 3.7
3847
before_script: TOX_ENV=pylint
39-
- env: ENV=mypy
48+
- name: MyPy
49+
env: ENV=mypy
4050
python: 3.7
41-
dist: xenial
42-
sudo: required
4351
before_script: TOX_ENV=mypy
44-
- env: ENV=coverage
45-
python: 2.7
52+
- name: Code Coverage (Unit tests)
53+
env: ENV=coverage
54+
python: 3.7
4655
before_script: TOX_ENV=coverage-travis
47-
- env:
56+
- name: Documentation
57+
env:
4858
- ENV=docs
4959
- secure: "d4F2RE2iWFh6yqE5MUxnakDihBMsY/hMsaMWllVAYU/fvCMKhaW97d51EiS55kur/eNVX2jpEqkVkSu5VeNSxC3w9sZTG+dHVb8A43o9QaSCPngvHTZ4X9fx8lB96G7uju6pmm5ovKt85hxZW2uQNYo3ugwCUl94lVDYqo+KJUM="
50-
python: 3.5
60+
python: 3.7
5161
before_script: TOX_ENV=docs-travis
5262
# Note: graphviz is needed for grapgs embedded in the docs
5363
addons:
@@ -62,10 +72,10 @@ matrix:
6272
- python3 ./contrib/trigger_rtd_build.py
6373

6474
install:
65-
- pip install --upgrade "pip==19.1.1"
66-
- pip install --upgrade "setuptools==41.6.0"
67-
- pip install "virtualenv==16.7.7"
68-
- pip install "tox==3.14.0"
75+
- pip install --upgrade "pip==19.3.1"
76+
- pip install --upgrade "setuptools==42.0.2"
77+
- pip install "virtualenv==16.7.6"
78+
- pip install "tox==3.14.2"
6979
- TOX_ENV=py$TRAVIS_PYTHON_VERSION
7080

7181
script:

CHANGES.rst

Lines changed: 133 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,136 @@
11
Changelog
22
=========
33

4-
Changes in Apache Libcloud in development
5-
-----------------------------------------
4+
Changes in Apache Libcloud in development (3.0.0)
5+
-------------------------------------------------
6+
7+
General
8+
~~~~~~~
9+
10+
- This release drops support for Python versions older than 3.5.0.
11+
12+
If you still need to use Libcloud with Python 2.7 or Python 3.4 you can do
13+
that by using the latest release which still supported those Python versions
14+
(Libcloud v2.8.0).
15+
(GITHUB-1377)
16+
[Tomaz Muraus]
17+
18+
- Make sure unit tests now also pass on Windows.
19+
(GITHUB-1396)
20+
[Tomaz Muraus]
21+
22+
Compute
23+
~~~~~~~
24+
25+
- [VMware vSphere] vSphere driver relies on ``pysphere`` Python library which
26+
doesn't support Python 3 so it has been removed.
27+
28+
There is an unofficial ``pysphere`` fork which adds Python 3 support, but
29+
it's out of date and not maintained (https://github.com/machalekj/pysphere/tree/2to3).
30+
(GITHUB-1377)
31+
[Tomaz Muraus]
32+
33+
- [GCE] Fix ``ex_list_instancegroups`` method so it doesn't throw if ``zone``
34+
attribute is not present in the response.
35+
36+
Reported by Kartik Subbarao (@kartiksubbarao)
37+
(GITHUB-1346)
38+
[Tomaz Muraus]
39+
40+
- [AWS EC2] Add support for creating spot instances by utilizing new ``ex_spot``
41+
and optionally also ``ex_spot_max_price`` keyword argument in the
42+
``create_node`` method.
43+
(GITHUB-1398)
44+
[Peter Yu - @yukw777]
45+
46+
Storage
47+
~~~~~~~
48+
49+
- [AWS S3] Fix upload object code so uploaded data MD5 checksum check is not
50+
performed at the end of the upload when AWS KMS server side encryption is
51+
used.
52+
53+
If AWS KMS server side object encryption is used, ETag header value in the
54+
response doesn't contain data MD5 digest so we can't perform a checksum
55+
check.
56+
57+
Reported by Jonathan Harden - @jfharden.
58+
(GITHUB-1401, GITHUB-1406)
59+
[Tomaz Muraus - @Kami]
60+
61+
Container
62+
~~~~~~~~~
63+
64+
- [LXD] Add new LXD driver.
65+
(GITHUB-1395)
66+
[Alexandros Giavaras - @pockerman]
67+
68+
Storage
69+
~~~~~~~
70+
71+
- [Azure Blobs] Implement chunked upload in the Azure Storage driver.
72+
73+
Previously, the maximum object size that could be uploaded with the
74+
Azure Storage driver was capped at 100 MB: the maximum size that could
75+
be uploaded in a single request to Azure. Chunked upload removes this
76+
limitation and now enables uploading objects up to Azure's maximum block
77+
blob size (~5 TB). The size of the chunks uploaded by the driver can be
78+
configured via the ``LIBCLOUD_AZURE_UPLOAD_CHUNK_SIZE_MB`` environment
79+
variable and defaults to 4 MB per chunk. Increasing this number trades-off
80+
higher memory usage for a lower number of http requests executed by the
81+
driver.
82+
83+
Reported by @rvolykh.
84+
(GITHUB-1399, GITHUB-1400)
85+
[Clemens Wolff - @c-w]
86+
87+
- [Azure Blobs] Drop support for uploading PageBlob objects via the Azure
88+
Storage driver.
89+
90+
Previously, both PageBlob and BlockBlob objects could be uploaded via the
91+
``upload_object`` and ``upload_object_via_stream`` methods by specifying the
92+
``ex_blob_type`` and ``ex_page_blob_size`` arguments. To simplify the API,
93+
these options were removed and all uploaded objects are now of BlockBlob
94+
type. Passing ``ex_blob_type`` or ``ex_page_blob_size`` will now raise a
95+
``ValueError``.
96+
97+
(GITHUB-1400)
98+
[Clemens Wolff - @c-w]
99+
100+
- [Common] Add ``prefix`` argument to ``iterate_container_objects`` and
101+
``list_container_objects`` to support object-list filtering in all
102+
StorageDriver implementations.
103+
104+
A lot of the existing storage drivers already implemented the filtering
105+
functionality via the ``ex_prefix`` extension argument so it was decided
106+
to promote the argument to be part of the standard Libcloud storage API.
107+
For any storage driver that doesn't natively implement filtering the results
108+
list, a fall-back was implemented which filters the full object stream on
109+
the client side.
110+
111+
For backward compatibility reasons, the ``ex_prefix`` argument will still
112+
be respected until a next major release.
113+
(GITHUB-1397)
114+
[Clemens Wolff - @c-w]
115+
116+
- [Azure Blobs] Implement ``get_object_cdn_url`` for the Azure Storage driver.
117+
118+
Leveraging Azure storage service shared access signatures, the Azure Storage
119+
driver can now be used to generate temporary URLs that grant clients read
120+
access to objects. The URLs expire after a certain period of time, either
121+
configured via the ``ex_expiry`` argument or the
122+
``LIBCLOUD_AZURE_STORAGE_CDN_URL_EXPIRY_HOURS`` environment variable
123+
(default: 24 hours).
124+
125+
Reported by @rvolykh.
126+
(GITHUB-1403, GITHUB-1408)
127+
[Clemens Wolff - @c-w]
128+
129+
Changes in Apache Libcloud v2.8.0
130+
---------------------------------
6131

7132
Common
8-
------
133+
~~~~~~
9134

10135
- Fix a regression with ``get_driver()`` method not working if ``provider``
11136
argument value was a string (e.g. using ``get_driver('openstack')``
@@ -35,7 +160,7 @@ Common
35160
[Tomaz Muraus]
36161

37162
Compute
38-
-------
163+
~~~~~~~
39164

40165
- [DigitalOcean] Fix ``attach_volume`` and ``detach_volume`` methods.
41166
Previously those two methods incorrectly passed volume id instead of
@@ -92,7 +217,7 @@ Compute
92217
[Tomaz Muraus]
93218

94219
Storage
95-
-------
220+
~~~~~~~
96221

97222
- [AWS S3] Make sure ``host`` driver constructor argument has priority
98223
over ``region`` argument.
@@ -107,14 +232,14 @@ Changes in Apache Libcloud v2.7.0
107232
---------------------------------
108233

109234
General
110-
-------
235+
~~~~~~~
111236

112237
- Test code with Python 3.8 and advertise that we also support Python 3.8.
113238
(GITHUB-1371, GITHUB-1374)
114239
[Tomaz Muraus]
115240

116241
Common
117-
------
242+
~~~~~~
118243

119244
- [OpenStack] Fix OpenStack project scoped token authentication. The driver
120245
constructors now accept ``ex_tenant_domain_id`` argument which tells
@@ -123,7 +248,7 @@ Common
123248
[kshtsk]
124249

125250
Compute
126-
-------
251+
~~~~~~~
127252

128253
- Introduce type annotations for the base compute API methods. This means you
129254
can now leverage mypy to type check (with some limitations) your code which

contrib/generate_contributor_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def convert_to_markdown(contributors_map, include_tickets=False):
112112
def compare(item1, item2):
113113
lastname1 = item1.split(' ')[-1].lower()
114114
lastname2 = item2.split(' ')[-1].lower()
115-
return cmp(lastname1, lastname2)
115+
return (lastname1 > lastname2) - (lastname1 < lastname2)
116116

117117
names = contributors_map.keys()
118118
names = sorted(names, cmp=compare)

contrib/generate_provider_logos_collage_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def resize_images(logo_files, output_path):
6868
new_name = '%s%s' % (name, ext)
6969
out_name = pjoin(output_path, 'resized/', new_name)
7070

71-
print 'Resizing image: %(name)s' % {'name': logo_file}
71+
print('Resizing image: %(name)s' % {'name': logo_file})
7272

7373
values = {'name': logo_file, 'out_name': out_name,
7474
'dimensions': DIMENSIONS}
@@ -89,7 +89,7 @@ def assemble_final_image(resized_images, output_path):
8989
cmd = 'montage %(images)s -geometry %(geometry)s %(out_name)s'
9090
cmd = cmd % values
9191

92-
print 'Generating final image: %(name)s' % {'name': final_name}
92+
print('Generating final image: %(name)s' % {'name': final_name})
9393
subprocess.call(cmd, shell=True)
9494

9595

contrib/update_google_prices.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
Loads Google Cloud Platform prices and updates the `pricing.json` data file.
1919
"""
2020

21+
# pylint: skip-file
22+
2123
import os
2224
import json
2325
import sys

contrib/utils_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#
1717
################################################################################
1818

19+
# pylint: skip-file
20+
1921
import unittest
2022
import utils
2123

demos/example_aliyun_oss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
count = len(objects)
3737
print('Has %d objects' % count)
3838

39-
objects = oss.list_container_objects(c1, ex_prefix='en')
39+
objects = oss.list_container_objects(c1, prefix='en')
4040
print('Has %d objects with prefix "en"' % len(objects))
4141
for each in objects:
4242
print(each)

demos/gce_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
# pylint: disable=no-name-in-module,import-error
8282
import urllib.request as url_req
8383
else:
84-
import urllib2 as url_req
84+
import urllib2 as url_req # pylint: disable=import-error
8585

8686
# Maximum number of 1-CPU nodes to allow to run simultaneously
8787
MAX_NODES = 5

doap_libcloud.rdf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,13 @@
420420
<revision>v2.7.0</revision>
421421
</Version>
422422
</release>
423+
<release>
424+
<Version>
425+
<name>2.8.0</name>
426+
<created>2020-01-02</created>
427+
<revision>v2.8.0</revision>
428+
</Version>
429+
</release>
423430
<repository>
424431
<SVNRepository>
425432
<location rdf:resource="https://svn.apache.org/repos/asf/libcloud/trunk/"/>

docs/compute/_supported_methods_block_storage.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ Provider list volumes create volume destroy volume
6363
`vCloud`_ no no no no no no no
6464
`Voxel VoxCLOUD`_ no no no no no no no
6565
`vps.net`_ no no no no no no no
66-
`VMware vSphere`_ no no no no no no no
6766
`Vultr`_ no no no no no no no
6867
===================================== ============ ============= ============== ============= ============= ============== ===============
6968

@@ -127,5 +126,4 @@ Provider list volumes create volume destroy volume
127126
.. _`vCloud`: http://www.vmware.com/products/vcloud/
128127
.. _`Voxel VoxCLOUD`: http://www.voxel.net/
129128
.. _`vps.net`: http://vps.net/
130-
.. _`VMware vSphere`: http://www.vmware.com/products/vsphere/
131129
.. _`Vultr`: https://www.vultr.com

0 commit comments

Comments
 (0)