Ejemplo n.º 1
0
 def __init__(self, username, api_key, authurl=None, keystone=None, hide_part_dir=None):
     ObjectStorageFS.__init__(self,
                              username,
                              api_key,
                              authurl=authurl or self.authurl,
                              keystone=keystone or self.keystone,
                              hide_part_dir=hide_part_dir or self.hide_part_dir,
                              )
Ejemplo n.º 2
0
 def __init__(self, username, api_key, authurl=None, keystone=None, hide_part_dir=None):
     ObjectStorageFS.__init__(self,
                              username,
                              api_key,
                              authurl=authurl or self.authurl,
                              keystone=keystone or self.keystone,
                              hide_part_dir=hide_part_dir or self.hide_part_dir,
                              snet = self.snet,
                              )
Ejemplo n.º 3
0
    def __init__(self, username, api_key, authurl=None, keystone=None, hide_part_dir=None):
        found="direct" in self.auth_mode
        if "userlist" in self.auth_mode:
            try:
                for user in self.user_list:
                    if username==user['ftp-username'] and api_key==user['ftp-password']:
                        username=str(user['swift-tenant'])+'.'+str(user['swift-username'])
                        api_key=str(user['swift-password'])
                        found=True
            except Exception:
                pass


        ObjectStorageFS.__init__(self,
                                 username if found else "anonymous",
                                 api_key,
                                 authurl=authurl or self.authurl,
                                 keystone=keystone or self.keystone,
                                 hide_part_dir=hide_part_dir or self.hide_part_dir,
                                 snet = self.snet,
                                 insecure = self.insecure,
        )
Ejemplo n.º 4
0
 def __init__(self, username, api_key, authurl=None, keystone=None):
     ObjectStorageFS.__init__(
         self, username, api_key, authurl=authurl or self.authurl, keystone=keystone or self.keystone
     )