Fix storage indentation
This commit is contained in:
parent
dcec90649e
commit
5dfa46ed56
2 changed files with 12 additions and 8 deletions
|
@ -577,12 +577,13 @@ class RadosGWStorage(_CloudStorage):
|
|||
storage_path, bucket_name, access_key, secret_key)
|
||||
|
||||
# TODO remove when radosgw supports cors: http://tracker.ceph.com/issues/8718#change-38624
|
||||
def get_direct_download_url(self, path, request_ip=None, expires_in=60, requires_cors=False, head=False):
|
||||
def get_direct_download_url(self, path, request_ip=None, expires_in=60, requires_cors=False,
|
||||
head=False):
|
||||
if requires_cors:
|
||||
return None
|
||||
|
||||
return super(RadosGWStorage, self).get_direct_download_url(path, request_ip, expires_in, requires_cors,
|
||||
head)
|
||||
return super(RadosGWStorage, self).get_direct_download_url(path, request_ip, expires_in,
|
||||
requires_cors, head)
|
||||
|
||||
# TODO remove when radosgw supports cors: http://tracker.ceph.com/issues/8718#change-38624
|
||||
def get_direct_upload_url(self, path, mime_type, requires_cors=True):
|
||||
|
@ -622,8 +623,8 @@ class CloudFrontedS3Storage(S3Storage):
|
|||
resolved_ip_info = None
|
||||
logger.debug('Got direct download request for path "%s" with IP "%s"', path, request_ip)
|
||||
if request_ip is not None and self._context.ip_resolver is not None:
|
||||
# Lookup the IP address in our resolution table and determine whether it is under AWS. If it is,
|
||||
# then return an S3 signed URL, since we are in-network.
|
||||
# Lookup the IP address in our resolution table and determine whether it is under AWS.
|
||||
# If it is, then return an S3 signed URL, since we are in-network.
|
||||
resolved_ip_info = self._context.ip_resolver.resolve_ip(request_ip)
|
||||
logger.debug('Resolved IP information for IP %s: %s', request_ip, resolved_ip_info)
|
||||
if resolved_ip_info and resolved_ip_info.provider == 'aws':
|
||||
|
|
Reference in a new issue