Apache-libcloud

Latest version: v3.8.0

Safety actively analyzes 629678 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 12

3.4.1

--------------------------------

.. note::

Libcloud depends on the ``requests`` library for performing HTTP(s) requests.

Prior to ``requests`` v2.26.0, ``requests`` depended on ``chardet`` library
which is licensed under LGPL (requests library itself is licensed under the
Apache License 2.0 license).

Since Libcloud is not an application, but a library which is usually used
along many other libraries in the same (virtual) environment, we can't have
a strict dependency on requests >= 2.26.0 since that would break a lot of
installations where users already depend on and have an older version of
requests installed.

If you are using requests < 2.26.0 along the Libcloud library you are using
version of chardet library (chardet is a direct dependency of the requests
library) which license is not compatible with Apache Libcloud.

If using a LGPL dependency is a problem for your application, you should
ensure you are using requests >= 2.26.0.

It's also worth noting that Apache Libcloud doesn't bundle any 3rd party
dependencies with our release artifacts - we only provide source code
artifacts on our website.

When installing Libcloud from PyPi using pip, pip will also download and use
the latest version of requests without the problematic chardet dependency,
unless you already have older version of the requests library installed in
the same environment where you also want to use Libcloud - in that case,
Libcloud will use the dependency which is already available and installed.

Common
~~~~~~

- Fix a regression which was inadvertently introduced in v3.4.0 which prevented
users from installing Libcloud under Python 3.5.

Also revert ``requests`` minimum version required change and relax the
minimum version requirement.

Previous change would prevent Libcloud from being installed in environments
where a conflicting (lower) version of requests library is required and
already installed.

As a library and not an application, Libcloud should specify as loose
requirements as possible to prevent issues with conflicting requirements
versions which could prevent Libcloud from being installed.
(1594)

3.4.0

--------------------------------

Common
~~~~~~

- Fix how we set HTTP request timeout on the underlying requests session
object. requests library has changed how timeout is set so our old
code had no affect.

(1575, 1576)
[Dimitris Galanis - dimgal1]

- Update setup.py metadata and indicate we also support Python 3.10.

- [Google] Update Google authentication code so so we don't try to contact
GCE metadata server when determining auth credentials type when oAuth 2.0 /
installed app type of credentials are used.

(1591, 1621)

Reported by Veith Röthlingshöfer - RunOrVeith.

- [Google] Update Google authentication code so we don't try to retry failed
request when trying to determine if GCE metadata server is available when
retrying is enabled globally (either via module level constant or via
environment variable value).

This will speed up scenarios when trying is enabled globally, but GCE
metadata server is not available and different type of credentials are used
(e.g. oAuth 2).

(1591, 1621)

Reported by Veith Röthlingshöfer - RunOrVeith.

- Update minimum ``requests`` version we require as part for install_requires
in setup.py to ``2.26.0`` when using Python >= 3.6.

This was done to avoid licensing issue with transitive dependency
(``chardet``).

NOTE: requests ``>=2.25.1`` will be used when using Python 3.5 since 2.26.0
doesn't support Python 3.5 anymore.

For more context, see https://github.com/psf/requests/pull/5797.
(1594)

Reported by Jarek Potiuk - potiuk.

- Update HTTP connection and request retry code to be more flexible so user
can specify and utilize custom retry logic which can be configured via
connection retryCls attribute
(``driver.connection.retryCls = MyRetryClass``).

(1558)
[Veith Röthlingshöfer - RunOrVeith]

- HTTP connection and request retry logic has been updated so we still respect
``timeout`` argument when retrying requests due to rate limit being reached
errors. Previously, we would try to retry indefinitely on
``RateLimitReachedError`` exceptions.

Storage
~~~~~~~

- [Azure Blobs] Respect Content-Encoding, Content-Language and Cache-Control
headers when uploading blobs via stream.

Reported by Veith Röthlingshöfer - RunOrVeith.
(1550)

- [Azure Blobs] Enable the Azure storage driver to be used with
Azure Government, Azure China, and Azure Private Link by setting
the driver host argument to the endpoint suffix for the environment.

Reported by Melissa Kersh - mkcello96
(1551)

- [Local Storage] Optimize ``iterate_container_objects`` method to perform
early filtering if ``prefix`` argument is provided.
(1584)
[Ido-Levi]

Compute
~~~~~~~

- [Equinix Metal] Various improvements to the driver.

(1548)
[Dimitris Galanis - dimgal1]

- [OpenStack] Fix error getting non existing description of Ports.

(1543)
[Miguel Caballer - micafer]

- [Outscale] Various updates to the driver.
(1549)
[Tio Gobin - tgn-outscale]

- [Ovh] Fix driver so it doesn't throw if a node is in resizing state.
(1555)
[Rob Juffermans - robjuffermans]

- [OpenStack] Support volume v3 API endpoint in OpenStack driver.

(1561)
[Miguel Caballer - micafer]

- [GCE] Get accelerators field in the GCE machineType.

(1565)
[Miguel Caballer - micafer]

- [OpenStack] Support updating ``allowed_address_pairs`` on OpenStack ports
using ``ex_update_port`` method.
(1569)
[dpeschman]

- [OpenStack] Enable to get Volume Quota details in OpenStack driver.

(1586)
[Miguel Caballer - micafer]

- [OpenStack] Add disabled property to OpenStack images.

(1615)
[Miguel Caballer - micafer]

- [CloudSigma] Various updates, improvements and new functionality in the
driver (support for new regions, instance types, additional standard API an
extension methods, etc.).

(1558)
[Dimitris Galanis - dimgal1]

- [OpenStack] Add binding:host_id value to the OpenStack port information.
(1492)
[Miguel Caballer - micafer]

- [EC2] Add support for ``gp3`` and ``io2`` volume types. Also add
``ex_throughput`` argument to the ``create_volume`` method.
(1596)
[Palash Gandhi - palashgandhi]

- [OpenStack] Add support for authenticating using application credentials.
(1597, 1598)
[Daniela Bauer - marianne013]

- [OpenStack] Add support for using optional external cache for auth tokens

This cache can be shared by multiple processes which results in much less
tokens being allocated when many different instances / processes
are utilizing the same set of credentials.

This functionality can be used by implementing a custom cache class with
caching logic (e.g. storing cache context on a local filesystem, external
system such as Redis or similar) + using ``ex_auth_cache`` driver constructor
argument.
(1460, 1557)
[dpeschman]

- [Vultr] Implement support for Vultr API v2 and update driver to use v2 by
default.
(1609, 1610)
[Dimitris Galanis - dimgal1]

DNS
~~~

- [CloudFlare] Enable authentication via API Tokens.
[Clemens Wolff - c-w]

- [DigitalOcean] Fix ``create_record()`` and ``update_record()`` method and
pass ``None`` instead of string value ``null`` for priority, port and weight
parameters if they are not provided as method arguments.
(1570)
[Gasper Vozel - karantan]

- [NSOne] Fix MX records and root domain handling.
(1571)
[Gasper Vozel - karantan]

- [Vultr] Implement support for Vultr API v2 and update driver to use v2 by
default.
(1609, 1610)
[Dimitris Galanis - dimgal1]

Other
~~~~~

- Fix ``python_requires`` setup.py metadata item value.
(1606)
[Michał Górny - mgorny]

- Update tox targets for unit tests to utilize ``pytest-xdist`` plugin to run
tests in parallel in multiple processes to speed up the test runs.
(1625)

3.3.1

--------------------------------

Compute
~~~~~~~

- [EC2] Fix a regression introduced in v3.3.0 which would break EC2 driver for
some regions because the driver would incorrectly try to use signature version
2 for all the regions whereas some newer regions require signature version 4
to be used.

If you are unable to upgrade, you can use the following workaround, as long
as you only use code which supports / works with authentication signature
algorithm version 4:

.. sourcecode:: python

import libcloud.common.aws
libcloud.common.aws.DEFAULT_SIGNATURE_VERSION = "4"

Instantiate affected driver here...

Reported by olegrtecno.
(1545, 1546)

- [EC2] Allow user to override which signature algorithm version is used for
authentication by passing ``signature_version`` keyword argument to the EC2
driver constructor.
(1546)

Storage
~~~~~~~

- [Google Cloud Storage] Fix a bug and make sure we also correctly handle
scenario in ``get_object()`` method when the object size is returned in
``x-goog-stored-content-length`` and not ``content-length`` header.

Reported by Veith Röthlingshöfer - RunOrVeith.
(1544, 1547)

- [Google Cloud Storage] Update ``get_object()`` method and ensure
``object.size`` attribute is an integer and not a string. This way it's
consistent with ``list_objects()`` method.
(1547)

3.3.0

--------------------------------

Common
~~~~~~

- Fix a bug which would cause some prepared requests with empty bodies to be
chunked which would cause some of the provider APIs such as OpenStack to
return HTTP 400 errors.
(1487, 1488)
[Michael Spagon - mspagon]

- Optimize various code imports (remove unnecessary imports, make some lazy,
etc.), so now importing most of the modules is around ~20-40% faster (~70
vs ~140 ms) and in some cases such as EC2 driver even more.

Now majority of the import time is spent in importing ``requests`` library.
(1519)
[Tomaz Muraus]

- ``libcloud.pricing.get_size_price()`` function has been updated so it only
caches pricing data in memory for the requested drivers.

This way we avoid caching data in memory for drivers which may never be
used.

If you want to revert to old behavior (cache pricing data for all the
drivers in memory), you can do that by passing ``cache_all=True`` argument
to that function or set ``libcloud.pricing.CACHE_ALL_PRICING_DATA`` module
level variable to ``True``.

Passing ``cache_all=True`` might come handy in situations where you know the
application will work with a lot of different drivers - this way you can
avoid multiple disk reads when requesting pricing data for different drivers.
(1519)
[Tomaz Muraus]

- Advertise Python 3.9 support in setup.py.

Compute
~~~~~~~

- [GCE] Fix ``ex_set_image_labels`` method using incorrect API path.
(1485)
[Poul Petersen - petersen-poul]

- [OpenStack] Fix error setting ``ex_force_XXX_url`` without setting
``ex_force_base_url``.
(1492)
[Miguel Caballer - micafer]

- [EC2] Update supported EC2 regions and instance sizes and add support
for eu-north-1 region.
(1486)
[Arturo Noha - r2ronoha]

- [Ovh] Add support for multiple regions to the driver. User can select
a region (location) by passing ``location`` argument to the driver
constructor (e.g. ``location=ca``).
(1494)
[Dan Hunsaker - danhunsaker]

- [GCE] Add support for creating nodes without a service account associated
with them. Now when an empty list is passed for ``ex_service_accounts``
argument, VM will be created without service account attached.

For backward compatibility reasons, default value of ``None`` still means to
use a default service account.
(1497, 1495)
[David Tomaschik - Matir]

- [VSphere] Add new VMware VSphere driver which utilizes ``pyvmomi`` library
and works under Python 3.

If you want to use this driver, you need to install ``pyvmomi`` dependency -
``pip install pyvmomi``
(1481)
[Eis D. Zaster - Eis-D-Z]

- [OpenStack] Enable to get Quota Set detail.
(1495)
[Miguel Caballer - micafer]

- [OpenStack] Add ex_get_size_extra_specs function to OpenStack driver.
(1517)
[Miguel Caballer - micafer]

- [OpenStack] Enable to get Neutron Quota details in OpenStack driver.
(1514)
[Miguel Caballer - micafer]

- [DigitalOcean] ``_node_node`` method now ensures ``image`` and ``size``
attributes are also set correctly and populated on the ``Node`` object.
(1507, 1508)
[sergerdn]

- [Vultr] Make sure ``private_ips`` attribute on the ``Node`` object is
correctly populated when listing nodes. Also add additional values to the
``node.extra`` dictionary.
(1506)
[sergerdn]

- [EC2] Optimize EC2 driver imports and move all the large constant files to
separate modules in ``libcloud/compute/constants/ec2_*.py`` files.

Previously all the constants were contained in
``libcloud/compute/constants.py`` file. That file was imported when importing
EC2 driver which would add unnecessary import time and memory overhead in case
this data was not actually used.

Now most of the large imports are lazy and only happen when that data is
needed (aka when ``list_sizes()`` method is called).

``libcloud/compute/constants.py`` file has also been removed.
(1519)
[Tomaz Muraus - Kami]

- [Packet / Equinix Metal] Packet driver has been renamed to Equinix Metal. If
your code uses Packet.net driver, you need to update it as per example in
Upgrade Notes documentation section.
(1511)
[Dimitris Galanis - dimgal1]

- [OutScale] Add various extension methods to the driver. For information on
available extenion methods, please refer to the driver documentation.
(1499)
[tgn-outscale]

- [Linode] Add support for Linode's API v4.
(1504)
[Dimitris Galanis - dimgal1]

Storage
~~~~~~~

- Deprecated ``lockfile`` library which is used by the Local Storage driver has
been replaced with ``fasteners`` library.
[Tomaz Muraus - Kami]

- [S3] Add support for ``us-gov-east-1`` region.
(1509, 1510)
[Andy Spohn - spohnan]

- [DigitalOcean Spaces] Add support for sfo2 regon.
(1525)
[Cristian Rasch - cristianrasch]

- [MinIO] Add new driver for MinIO object storage (https://min.io).
(1528, 1454)
[Tomaz Muraus - Kami]

- [S3] Update S3 and other drivers which are based on the S3 one (Google
Storage, RGW, MinIO) to correctly throw ``ContainerAlreadyExistsError`` if
container creation fails because container with this name already exists.

Previously in such scenario, ``InvalidContainerNameError`` exception which
does not comply with the Libcloud standard API was thrown.
(1528)
[Tomaz Muraus - Kami]

- Add new ``libcloud.common.base.ALLOW_PATH_DOUBLE_SLASHES`` module level
variable.

When this value is set to ``True`` (defaults to ``False`` for backward
compatibility reasons), Libcloud won't try to sanitize the URL path and
remove any double slashes.

In most cases, this won't matter and sanitzing double slashes is a safer
default, but in some cases such as S3, where double slashes can be a valid
path (e.g. ``/my-bucket//path1/file.txt``), this option may come handy.

When this variable is set to ``True``, behavior is also consistent with
Libcloud versions prior to v2.0.0.

Reported by Jonathan Hanson - triplepoint.
(1529)
[Tomaz Muraus - Kami]

DNS
~~~

- [Common] Fix a bug with the header value returned by the
``export_zone_to_bind_format`` method containing an invalid timestamp (value
for the minute part of the timestamp was wrong and contained month number
instead of the minutes value).

Reported by Kurt Schwehr - schwehr.

(1500)
[Tomaz Muraus - Kami]

- [CloudFlare DNS] Add support for creating ``SSHFP`` records.
(1512, 1513)
[Will Hughes - insertjokehere]

- [DigitalOcean] Update driver and make sure request data is sent as part of
HTTP request body on POST and PUT operations (previously it was sent as
part of query params).
(1505)
[Andrew Starr-Bochicchio - andrewsomething]

- [AuroraDNS] Throw correct exception on 403 authorization failed API error.
(1521, 1522)
[Freek Dijkstra - macfreek]

- [Linode] Add support for Linode's API v4.
(1504)
[Dimitris Galanis - dimgal1]

- [CloudFlare] Update driver so it correctly throws
``RecordAlreadyExists`` error on various error responses which represent
this error.
[Tomaz Muraus - Kami]

3.2.0

--------------------------------

Common
~~~~~~

- ``libcloud.pricing.download_pricing_file`` function has been updated so it
tries to download latest ``pricing.json`` file from our public read-only S3
bucket.

We now run a daily job as part of our CI/CD which scrapes provider prices and
publishes the latest version of the ``pricing.json`` file to that bucket.

For more information, please see
https://libcloud.readthedocs.io/en/latest/compute/pricing.html.

Compute
~~~~~~~

- [OpenStack] Add `ex_get_network()` to the OpenStack driver to make it
possible to retrieve a single network by using the ID.

(1474)
[Sander Roosingh - SanderRoosingh]

- [OpenStack] Fix pagination in the ``list_images()`` method and make sure
method returns all the images, even if the result is spread across multiple
pages.

(1467)
[Thomas Bechtold - toabctl]

- [GCE] Add script for scraping GCE pricing data and improve price addition in
``_to_node_size`` method.
(1468)
[Eis D. Zaster - Eis-D-Z]

- [AWS EC2] Update script for scraping AWS EC2 pricing and update EC2 pricing
data.
(1469)
[Eis D. Zaster - Eis-D-Z]

- [Deployment] Add new ``wait_period`` argument to the ``deploy_node`` method
and default it to 5 seconds.

This argument tells Libcloud how long to wait between each poll interval when
waiting for a node to come online and have IP address assigned to it.

Previously this argument was not exposed to the end user and defaulted to 3
seconds which means it would be quite easy to reach rate limits with some
providers when spinning up many instances concurrently using the same
credentials.
[Tomaz Muraus - Kami]

- [Azure ARM] Add script for scraping Azure ARM instance pricing data.
(1470)
[Eis D. Zaster - Eis-D-Z]

- Update ``deploy_node()`` method to try to re-connect to the server if we
receive "SSH connection not active" error when trying to run a deployment
step.

In some scenarios, connection may get closed by the server for whatever
reason before finishing all the deployment steps and in this case only
re-connecting would help and result in a successful outcome.
[Tomaz Muraus - Kami]

- [Deployment] Make ``FileDeployment`` class much faster and more efficient
when working with large files or when running multiple ``FileDeployment``
steps on a single node.

This was achieved by implementing two changes on the ``ParamikoSSHClient``
class:

1. ``put()`` method now tries to re-use the existing open SFTP connection
if one already exists instead of re-creating a new one for each
``put()`` call.
2. New ``putfo()`` method has been added to the ``ParamikoSSHClient`` class
which utilizes the underlying ``sftp.putfo()`` method.

This method doesn't need to buffer the whole file content in memory and
also supports pipelining which makes uploads much faster and more
efficient for larger files.

[Tomaz Muraus - Kami]

- [Deployment] Add ``__repr__()`` and ``__str__()`` methods to all the
Deployment classes.
[Tomaz Muraus - Kami]

- [Deployment] New ``keep_alive`` and ``use_compression`` arguments have been
added to the ``ParamikoSSHClient`` class constructor.

Right now those are not exposed yet to the ``deploy_node()`` method.
[Tomaz Muraus - Kami]

- [Deployment] Update ``ParamikoSSHClient.put()`` method so it returns a
correct path when commands are being executed on a Windows machine.

Also update related deployment classes so they correctly handle situation
when we are executing commands on a Windows server.
[Arthur Kamalov, Tomaz Muraus]

- [Outscale] Add a new driver for the Outscale provider. Existing Outscale
driver utilizes the EC2 compatible API and this one utilizes native Outscale
API.
(1476)
[Tio Gobin - tgn-outscale]

- [KubeVirt] Add new methods for managing services which allows users to expose
ports for the VMs (``ex_list_services``, ``ex_create_service``,
``ex_delete_service``).
(1478)
[Eis D. Zaster - Eis-D-Z]

Container
~~~~~~~~~

- [LXD] Add new methods for managing network and storage pool capabilities and
include other improvements in some of the existing methods.
(1477)
[Eis D. Zaster - Eis-D-Z]

3.1.0

--------------------------------

Compute
~~~~~~~

- [GCE] Add latest Ubuntu image families (Ubuntu 20.04) to the driver.

(1449)
[Christopher Lambert - XN137]

- [DigitalOcean] Add ``location`` argument to the ``list_sizes()`` method.

NOTE: Location filtering is performed on the client.
(1455, 1456)
[RobertH1993]

- Fix ``deploy_node()`` so an exception is not thrown if any of the output
(stdout / stderr) produced by the deployment script contains a non-valid utf-8
character.

Previously, user would see an error similar to "Failed after 3 tries: 'utf-8'
codec can't decode byte 0xc0 in position 37: invalid start byte".

And now we simply ignore byte sequences which we can't decode and include
rest of the output which can be decoded.

(1459)
[Tomaz Muraus - Kami]

- Add new ``timeout`` argument to ``ScriptDeployment`` and
``ScriptFileDeployment`` class constructor.

With this argument, user can specify an optional run timeout for that
deployment step run.
(1445)
[Tomaz Muraus - Kami]

- [GiG G8] Fix retry functionality when creating port forwards and add support
for automatically refresing the JWT auth token inside the connection class if
it's about to expire in 60 seconds or less.
(1465)
[Jo De Boeck - grimpy]

- [Azure ARM] Update ``create_node`` so an exception is thrown if user passes
``ex_use_managed_disks=False``, but doesn't provide a value for the
``ex_storage_account`` argument.
(1448)
[antoinebourayne]

Storage
~~~~~~~

- [AWS S3] Make sure driver works correctly for objects with ``~`` in the name.

Now when sanitizing the object name, we don't url encode ``~`` character.

Reported by Michael Militzer - mmilitzer.
(1452, 1457)
[Tomaz Muraus]

DNS
~~~

- [CloudFlare] Update driver to include the whole error chain the thrown
exception message field.

This makes various issues easier to debug since the whole error context is
included.
[Tomaz Muraus]

- [Gandi Live, CloudFlare, GCE] Add support for managing ``CAA`` record types.

When creating a ``CAA`` record, data field needs to be in the following
format:

``<flags> <tag> <domain name>``

For example:

- ``0 issue caa.example.com``
- ``0 issuewild caa.example.com``
- ``0 iodef https://example.com/reports``

(1463, 1464)
[Tomaz Muraus]

- [Gandi Live] Don't throw if ``extra['rrset_ttl']`` argument is not passed
to the ``create_record`` method.
(1463)
[Tomaz Muraus]

Other
~~~~~

- Update ``contrib/Dockerfile`` which can be used for running tests so
it only run tests with Python versions we support. This means dropping
support for Python < 3.5 and adding support for Python 3.7 and 3.8.

Also update it to use a more recent Ubuntu version (18.04) and Python 3
for running tox target.
(1451)
[Tomaz Muraus - Kami, HuiFeng Tang - 99Kies]

Page 2 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.