Пример #1
0
 def __init__(self, *args, **kw):
     """
     :param timedelta long_timeout: A timeout to use for any request that
         doesn't have any other timeout specified.
     """
     self._long_timeout = kw.pop('long_timeout', None)
     Client.__init__(self, *args, **kw)
Пример #2
0
 def __init__(self, *args, **kw):
     """
     :param timedelta long_timeout: A timeout to use for any request that
         doesn't have any other timeout specified.
     """
     self._long_timeout = kw.pop('long_timeout', None)
     Client.__init__(self, *args, **kw)
Пример #3
0
 def __init__(self, config=None):
     if config is None:
         config = self.guess_config()
     if isinstance(config, str):
         self.config = json.load(open(os.path.expanduser(config)))
     else:
         self.config = config
     clouds = list(self.config['clouds'].items())
     if len(clouds) != 1:
         raise RuntimeError("supports only one cloud in config")
     url, self.creds = clouds[0]
     url = urlparse(url)
     base_url = "https://" + url.netloc
     Client.__init__(self, base_url, tls=True)
     self.auth = AWS4Auth(self.creds['accesskey'], self.creds['secretkey'], url.netloc.split(".")[0],
                          'hyper')
     self._version = "1.23"
Пример #4
0
 def __init__(self, *args, **kw):
     self.long_timeout = kw.pop('long_timeout', None)
     Client.__init__(self, *args, **kw)
Пример #5
0
 def __init__(self, *args, **kw):
     self.long_timeout = kw.pop('long_timeout', None)
     Client.__init__(self, *args, **kw)