Ejemplo n.º 1
0
    def __init__(self, name="__dummy__", limit="", auto_manage=False,
                 collection="__dummy__", login="******", password="******"):
        StoreBase.__init__(self, name, limit, auto_manage)

        #    We dont create large files for dropbox.
        log.trace("GoogleStore.init", name, limit, auto_manage, root, login, password)
        if const.Debug:
            self.split_size = 500 * 1024
        else:
            self.split_size = 100 * 1024 * 1024

        if collection == "":
            raise Exception(_("collection cannot be blank"))
        if not name or not password:
            raise Exception("Name and password cannot be blank")
        self.collection = collection
        self.login = login
        self.password = password
        for attr in ["collection", "login", "password"]:
            self._persistent.append(attr)
Ejemplo n.º 2
0
    def __init__(self, name="__dummy__", limit="", auto_manage=False,
                 bucket="__dummy__", key="", secret_key=""):
        StoreBase.__init__(self, name, limit, auto_manage)

        #    We dont create large files for dropbox.
        log.trace("S3Store.init", name, limit, auto_manage, bucket, key, secret_key)
        if const.Debug:
            self.split_size = 500 * 1024
        else:
            self.split_size = 100 * 1024 * 1024

        if bucket == "":
            raise Exception(_("bucket cannot be blank"))

        self.bucket = bucket
        self.bucket = bucket
        self.key = key
        self.secret_key = secret_key
        for attr in ["bucket", "key", "secret_key"]:
            self._persistent.append(attr)