libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David L. Day (JIRA)" <>
Subject [jira] [Created] (LIBCLOUD-959) AZURE_BLOBS upload_object fails on both Container and Driver
Date Tue, 07 Nov 2017 20:52:00 GMT
David L. Day created LIBCLOUD-959:

             Summary: AZURE_BLOBS upload_object fails on both Container and Driver
                 Key: LIBCLOUD-959
             Project: Libcloud
          Issue Type: Bug
          Components: Storage
         Environment: Microsoft Windows
Python 2.7.11

{{Package         Version
--------------- ---------
apache-libcloud 2.2.1
asn1crypto      0.23.0
certifi         2017.11.5
cffi            1.11.2
chardet         3.0.4
cryptography    2.1.3
enum34          1.1.6
idna            2.6
ipaddress       1.0.18
pip             9.0.1
pycparser       2.18
pyOpenSSL       17.3.0
requests        2.18.4
setuptools      36.6.0
six             1.11.0
urllib3         1.22
wheel           0.30.0}}
            Reporter: David L. Day

The upload_object method on both the driver and container objects fails for Provider.AZURE_BLOBS.
Listing containers and objects works.

Code to reproduce:

{{# -*- coding: utf-8 -*-
from import Provider
from import get_driver

key = ''
secret = ''

cls = get_driver(Provider.AZURE_BLOBS)
driver = cls(key=key, secret=secret)
print "Containers: ", driver.list_containers()
testing = driver.get_container(container_name='testing')
print "Objects in 'testing': ", testing.list_objects()
print "Uploading via driver:"
driver.upload_object(file_path='C:\\Users\\dayd3\\Downloads\\test.txt', container=testing,
print "Uploading via container:"
testing.upload_object(file_path='C:\\Users\\dayd3\\Downloads\\test.txt', object_name='test/test.txt')}}

{{> python
Containers:  [<Container: name=testing, provider=Microsoft Azure (blobs)>]
Objects in 'testing':  []
Uploading via driver:
Traceback (most recent call last):
  File "", line 15, in <module>
    driver.upload_object(file_path='C:\\Users\\dayd3\\Downloads\\test.txt', container=testing,
  File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\drivers\",
line 771, in upload_object
  File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\drivers\",
line 895, in _put_object
  File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\storage\", line 627,
in _upload_object
    headers=headers, raw=True)
  File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\common\", line 590,
in request
  File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\libcloud\", line 230, in prepared_request
    verify=self.ca_cert if self.ca_cert is not None else self.verify)
  File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\requests\", line 618, in
    r = adapter.send(request, **kwargs)
  File "C:\Users\dayd3\Envs\libcloud\lib\site-packages\requests\", line 508, in
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='',
port=443): Max retries exceeded with url: /testing/test/test.txt (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x0000000003B6A6D8>: Failed to establish a new connection: [Errno 11004] getaddrinfo

This message was sent by Atlassian JIRA

View raw message