Esempio n. 1
0
 def s3_request(self, headers, params):
     from siilo.storages.amazon_s3 import _S3Request
     return _S3Request(
         method='GET',
         endpoint='s3.amazonaws.com',
         bucket='examplebucket',
         key='myphoto.jpg',
         headers=headers,
         params=params,
         use_https=False,
     )
Esempio n. 2
0
 def s3_request(self, headers, params):
     from siilo.storages.amazon_s3 import _S3Request
     return _S3Request(
         method='GET',
         endpoint='s3.amazonaws.com',
         bucket='examplebucket',
         key='myphoto.jpg',
         headers=headers,
         params=params,
         use_https=False,
     )
Esempio n. 3
0
 def s3_request(self, presigner):
     from siilo.storages.amazon_s3 import _S3Request
     request = _S3Request(
         method='GET',
         endpoint='s3.amazonaws.com',
         bucket='examplebucket',
         key='test.txt',
         use_https=True,
         use_path_style=False,
     )
     presigner.presign(request, expires=timedelta(hours=24))
     return request
Esempio n. 4
0
 def s3_request(self, presigner):
     from siilo.storages.amazon_s3 import _S3Request
     request = _S3Request(
         method='GET',
         endpoint='s3.amazonaws.com',
         bucket='examplebucket',
         key='test.txt',
         use_https=True,
         use_path_style=False,
     )
     presigner.presign(request, expires=timedelta(hours=24))
     return request
Esempio n. 5
0
 def s3_request(self):
     from siilo.storages.amazon_s3 import _S3Request
     return _S3Request(
         method='GET',
         endpoint='s3.amazonaws.com',
         bucket='examplebucket',
         key='test.txt',
         headers={
             'Host': 'examplebucket.s3.amazonaws.com',
             'Range': 'bytes=0-9',
             'X-Amz-Content-SHA256': (
                 'e3b0c44298fc1c149afbf4c8996fb924'
                 '27ae41e4649b934ca495991b7852b855'
             ),
             'X-Amz-Date': '20130524T000000Z',
         },
         use_https=False,
     )
Esempio n. 6
0
 def s3_request(self):
     from siilo.storages.amazon_s3 import _S3Request
     return _S3Request(method='GET',
                       use_https=False,
                       endpoint='s3.amazonaws.com',
                       bucket='examplebucket',
                       key='',
                       params={
                           'lifecycle': '',
                       },
                       headers={
                           'Host':
                           'examplebucket.s3.amazonaws.com',
                           'X-Amz-Date':
                           '20130524T000000Z',
                           'X-Amz-Content-SHA256':
                           ('e3b0c44298fc1c149afbf4c8996fb924'
                            '27ae41e4649b934ca495991b7852b855')
                       })
Esempio n. 7
0
 def s3_request(self):
     from siilo.storages.amazon_s3 import _S3Request
     return _S3Request(
         method='PUT',
         endpoint='s3.amazonaws.com',
         bucket='examplebucket',
         key='test$file.text',
         headers={
             'Host': 'examplebucket.s3.amazonaws.com',
             'Date': 'Fri, 24 May 2013 00:00:00 GMT',
             'X-Amz-Date': '20130524T000000Z',
             'X-Amz-Storage-Class': 'REDUCED_REDUNDANCY',
             'X-Amz-Content-SHA256': (
                 '44ce7dd67c959e0d3524ffac1771dfbb'
                 'a87d2b6b4b4e99e42034a8b803f8b072'
             )
         },
         use_https=False,
     )
Esempio n. 8
0
 def s3_request(self):
     from siilo.storages.amazon_s3 import _S3Request
     return _S3Request(
         method='PUT',
         endpoint='s3.amazonaws.com',
         bucket='examplebucket',
         key='test$file.text',
         headers={
             'Host':
             'examplebucket.s3.amazonaws.com',
             'Date':
             'Fri, 24 May 2013 00:00:00 GMT',
             'X-Amz-Date':
             '20130524T000000Z',
             'X-Amz-Storage-Class':
             'REDUCED_REDUNDANCY',
             'X-Amz-Content-SHA256': ('44ce7dd67c959e0d3524ffac1771dfbb'
                                      'a87d2b6b4b4e99e42034a8b803f8b072')
         },
         use_https=False,
     )