ThimoNeubauer opened a new issue #1383: host parameter of S3StorageDriver does 
nothing in 2.7.0
URL: https://github.com/apache/libcloud/issues/1383
 
 
   ## Summary
   
   We noticed that connecting to a local minio server failed after upgrading to 
libcloud 2.7.0
   
   ## Detailed Information
   
   To use the S3 interface of a local server we need to set the host 
explicitly. In the 2.7.0 sources (see 
https://github.com/apache/libcloud/blob/trunk/libcloud/storage/drivers/s3.py) 
we have this:
   
   ```python
   class S3StorageDriver(AWSDriver, BaseS3StorageDriver):
       name = 'Amazon S3'
       connectionCls = S3SignatureV4Connection
       region_name = 'us-east-1'
   
       def __init__(self, key, secret=None, secure=True, host=None, port=None,
                    region=None, token=None, **kwargs):
           # Here for backward compatibility for old and deprecated driver class
           # per region approach
           if hasattr(self, 'region_name') and not region:
               region = self.region_name  # pylint: disable=no-member
   
           self.region_name = region
   
           if region and region not in REGION_TO_HOST_MAP.keys():
               raise ValueError('Invalid or unsupported region: %s' % (region))
   
           self.name = 'Amazon S3 (%s)' % (region)
   
           host = REGION_TO_HOST_MAP[region]
           super(S3StorageDriver, self).__init__(key=key, secret=secret,
                                                 secure=secure, host=host,
                                                 port=port,
                                                 region=region, token=token,
                                                 **kwargs)
   ```
   
   Note that the `host = REGION_TO_HOST_MAP[region]` line overrides the host 
parameter
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to