My favorites | Sign in
Project Logo
                
Search
for
Updated Sep 01, 2008 by edwood.ocasio
Labels: Featured
Reference  
Help on module uprgae:

NAME
    uprgae - Module to ease management of domains under Google Apps for Education (GAE).

FILE
    /home/eocasio/proyectos/gae/0.7/uprgae.py

FUNCTIONS
    about()
        Shows uprgae module information.
    
    addtolist(user_name, list_name)
        Adds  specified user to list list_name.
    
    addtolistf(filename, list_name)
        Adds members to list_name from a file.
        
        Adds users from specified file as members of a list. The file should
        contain COMPLETE EMAIL addresses, one per line:
        
        fulano.sutano@gmail.com
        prensejo.merlejo@gae.cayey.upr.edu
    
    chpass(user_name)
        Changes user password.
    
    cls()
        Clears the screen.
    
    commands()
        Retrieves a list of currently supported commands.
    
    create()
        Creates a new user.
    
    createf(filename, listonly=False)
        Create users from a file.
        
        Creates users from specified file in batchmode. The file is in a 
        CSV format following this conventions:
        
        The file should contain the given name of the user and her family
        name separated by comas:
        
                Fulano, Sutano
                
        The function will assign a suitable username and password. It will
        also create a file with the account information.
    
    createlist(list_name)
        Creates empty email list with given name.
    
    delete(user_name)
        Deletes user_name account.
    
    deletef(filename)
        Delete users listed in a file.
        
        Deletes users from specified file in batchmode. The file should
        contain only the usernames, one per line:
        
        fulano.sutano
        prensejo.merlejo
    
    deletelist(list_name)
        Deletes email list with given name.
    
    exist(user_name)
        Returns True if user exists, False if not
    
    exportlist(list_name, filename='export.csv', delimiter='\n')
        Exports specified email list member addresses to a file. 
                
                        It uses the new line character as default ('
        ') which produces
                        a file with ONE EMAIL per line. Any delimiter can be specified.
                        
                        If file name is not given it defaults to 'export.csv'
    
    genpassword()
        Password generator. 
        
        Simple password generator based on code from this url:
        
        http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473852
        
        Thanks to the author (anonymous).
    
    genusername(given_name, family_name, generator=0)
        Generates suitable usernames alternatives.
        
        For now only sequential numerical mutation supported:
        
                fulano.sutano3
                fulano.sutano4
                prenseja.merleja99
    
    get(user_name)
        Returns userentry object for the specified user.
    
    getallusers()
        Retrieves an XML file with all domain accounts information.  
        
        The file is named using date of creation 
        and replaces the last current users file
        named 'usuarios.gae'.  The XML data corresponds to an UserFeed  
        object containig an XML representation of many UserEntry objects.
    
    getlist(list_name)
        Returns EmailListEntry object for the specified list.
    
    getmemberlist(list_name)
        Gets all members of the specified list in an EmailListRecipientFeed obect. 
        
        Returns a list with user_name of members.
    
    loadconf(configfile)
        Reads configuration specified file and saves its content in a dictionary.
        
        The configuration file follows this format:
        
                variable1=value1
                variable2=value2
    
    login()
        Asks for administrator's credentials. 
        
        Creates object gdata.apps.service.AppsService().
    
    mountfs(mountpoint)
        Mounts GAE services as a filesystem using 'goofs' module
        
        http://code.google.com/p/goofs
    
    printheader()
        Prints administrative console header.
    
    reactivate(user_name)
        Reactivates (restores) specified user after a suspension.
    
    reactivatef(filename)
        Reactivates users listed in a file.
        
        Reactivates users from specified file in batchmode. The file should
        contain only the usernames, one per line:
        
        fulano.sutano
        prensejo.merlejo
    
    removefromlist(user_name, list_name)
        Removes specified user from list list_name.
    
    report(report_name, report_date=None, page=None)
        Retrieves named report for date specified. 
        
        Available report_names: 
        'accounts','disk_space','summary','activity', 'email_clients'
        
        report_date should be in the format YYYY-MM-DD
        
        If report_date is not specified it returns the latest available 
        report.
        
        If page is None all report pages are retrieved.
    
    search(criteria)
        Searches for accounts matching the criteria. 
        
        There is no API to search for accounts in GAE
        so what this function does is search in the most
        recent local list generated by getaccounts() which
        is named 'usuarios.gae' and retrieves a list of
        matches.
        
        This is my first approach to this task.
        
        Possible searching criteria :
        'suspended', 'admin', 'activated'
        
        Anything else is taken as a regular expression that 
        returns a list of matching user_name.
    
    setadmin(user_name)
        Sets administration privileges a given user.
    
    setlang(lang)
    
    show(user_name)
        Reports all available information from specified user.
        
        Receives _service object created by login()
    
    suspend(user_name)
        Suspends user_name account.
    
    suspendf(filename)
        Suspends users listed in a file.
        
        Suspends users from specified file in batchmode. The file should
        contain only the usernames, one per line:
        
        fulano.sutano
        prensejo.merlejo
    
    test()
        Tests UPR-GAE configuration
    
    testlogin()
        Tests GAE service after login.
    
    umountfs(mountpoint)
        Dismounts GAE services as a filesystem using 'goofs' module
        
        http://code.google.com/p/goofs
    
    update(user_name)
        Updates information for specified user .

DATA
    DEFAULT_LOCALE_DIR = '/usr/share/locale'
    EXT_CTYPE = {'bmp': 'image/bmp', 'gif': 'image/gif', 'jpeg': 'image/jp...
    FUTURE_FEATURE = 'This will be a future feature.'
    GDOCS_DIRS = None
    GOOFS_CACHE = None
    HOME = None
    LANGUAGES = ['es', 'en']
    NAMESPACES = ['http://www.w3.org/2005/Atom', 'http://schemas.google.co...
    PASSWORD_DEFAULT_LENGTH = 8
    PHOTOS = None
    PHOTOS_DIR = None
    PRIV_PHOTOS_DIR = None
    PUB_PHOTOS_DIR = None
    REPORTNAMES = ['accounts', 'disk_space', 'summary', 'activity', 'email...
    USERLISTFILE = 'usuarios.gae'
    USERNAME_GENERATOR_ALPHARANDOM = 3
    USERNAME_GENERATOR_ALPHASEQUENCE = 1
    USERNAME_GENERATOR_NUMRANDOM = 2
    USERNAME_GENERATOR_NUMSEQUENCE = 0
    __author__ = 'Edwood Ocasio'
    __email__ = 'edwood.ocasio@gae.cayey.upr.edu'
    __firstreleasedate__ = '13-Jul-2008'
    __license__ = 'GPL v3.0'
    __maillist__ = 'http://groups.google.com/group/upr-gae-console'
    __projecturl__ = 'http://code.google.com/p/uprgae-console/'
    __releasedate__ = '01-Sep-2008'
    __version__ = '0.7'
    adminemail = ''
    adminuser = ''
    config = {'email': '', 'lang': 'en', 'prompt': '', 'title': "<This tit...
    consoletitle = "<This title line can be customized in file 'gaeconf'>"
    domain = ''
    gaefs = None
    lang = 'en'
    uprgae_Warnings = "Modules 'goofs' or 'fuse' are not installed.  Howev...

VERSION
    0.7

AUTHOR
    Edwood Ocasio




Sign in to add a comment
Hosted by Google Code