Source

cloudster / api / shelf / configuration / accounts.py

Full commit
from api.shelf.registry.clients import StorageClientsRegistry

__author__ = 'guillermo'


class AccountsManager():

    def __init__(self, client_class):
        self.__client_class = client_class
        self.__account_type_class = self.__client_class.registry_metadata().account_type_class()

    def get_configuration_descriptor(self):
        return self.__account_type_class.get_configuration_fields()

    def create(self, account_config_values):
        print 'Instantiates a new account data object'

    def authorize(self, account_data):
        print 'Connects using account info and expected adapter in order to authorize our application and return new account data'

    def load(self, id=None):
        pass

    def save(self, account_data, unique_account_name):
        print 'Save file into home'

    def delete(self, id=None):
        pass