Changeset 222

Show
Ignore:
Timestamp:
02/13/08 20:33:03 (9 months ago)
Author:
trivoallan
Message:

cleverbox :

  • documentation cleanup
  • started implementation of parameter checking method
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cleverbox/trunk/cleverbox/model/__init__.py

    r211 r222  
    11# -*- coding: utf-8 -*- 
    22version = '0.5dev' 
     3 
     4def check_required_parameters(names, parameters): 
     5     
     6    for required_param in names: 
     7        # This will raise a KeyError if a parameter is missing 
     8        # TODO : it could be better to raise a more specific exception 
     9        parameters[required_param] 
  • cleverbox/trunk/cleverbox/model/client.py

    r211 r222  
    137137    Deletes client from supplied environment. 
    138138     
    139     TODO : tunr that into an "archive" command to avoid complete loss of data 
     139    TODO : turn that into an "archive" command to avoid complete loss of data 
    140140    """ 
    141141     
  • cleverbox/trunk/cleverbox/model/project.py

    r213 r222  
    55import logging, os, re, ConfigParser, traceback 
    66from cleverbox.utils import filesystem, styles 
     7from cleverbox import model 
    78 
    89def exists(environment, client_name, project_name, project_status = None): 
     
    8788    """ 
    8889     
    89     # Parameters required for project creation 
    90     required = ('client', 'short_name', 'full_name', 'profile', 'enable') 
    91  
    9290    # Merging for consistency 
    9391    parameters['client'] = client_name 
    9492    parameters['short_name'] = project_name 
    9593 
    96     # Sanity checks before project creation 
    97     for required_param in required: 
    98         # This will raise a KeyError if a parameter is missing 
    99         # TODO : it could be better to raise a more specific exception 
    100         parameters[required_param] 
    101      
     94    # Check that all required parameters are here 
     95    required = ('client', 'short_name', 'full_name', 'profile', 'enable') 
     96    model.check_required_parameters(required, parameters) 
     97 
    10298    # Make sure client exists 
    10399    from cleverbox.model import client 
  • cleverbox/trunk/docs/README

    r203 r222  
    1 The Cleverbox sits on top of [http://trac.edgewall.org Trac] and [http://subversion.tigris.org Subversion]. 
    2 It provides an interactive shell for deploying and maintaining instances of both projects. 
     1'''Please note : this version of the cleverbox is highly instable and should not be used in production. Latest stable version is cleverbox-0.4.''' 
    32 
    4 == Features == 
     3== What is it ? == 
    54 
    6  * Configuration profiles : 
    7    * Apache configuration templates 
    8    * `trac.ini` configuration template 
    9    * Default permissions 
    10  * Easy to setup 
    11  * Easy to use 
    12  * Upgrade scripts provided with each new release (as of 0.4) 
     5The cleverbox provides an interactive command line shell dedicated to the deployment and maintenance of trac and subversion instances. 
    136 
    14 == Non-goals == 
     7It can handle multiple configuration profiles, enabling the deployment of differently flavored type of project (trac configuration and permissions, apache configuration templates, etc). 
    158 
    16 This project does not have these features and will not get them anytime : 
    17  
    18  * A web frontend 
    19  * Full fledged plugins support 
    20  * Multi-project Trac 
    21   
    22 Why ? Because this script is meant to stay simple. If you want that you'd better checkout [http://www.kforgeproject.com/ KForge] which has the  
    23 same feature set as the Cleverbox + a [http://www.djangoproject.com django]-based web frontend and very nice plugins integration (for providing new services).  
    24 Caveats : difficult to install and a bit instable at the moment (but i'm confident it will get better with 0.14 & following releases).  
     9Project's main objective is to make your life as simple as possible. Thus, it comes with easy installation, easy upgrades and a comprehensive documentation. 
    2510 
    2611== License == 
  • cleverbox/trunk/docs/TODO

    r213 r222  
    1 Cleverbox : modules reorganisation : 
     1== Cleverbox : modules reorganisation == 
    22 
    33 * cleverbox.utils.logging 
     4 * model.* -> domain.* 
    45  
    5 Misc : 
     6== Misc == 
    67 * trac.ini "cleverbox" section (instead of incompatible string substition) 
    78 * streamline cli / log output 
     
    1112 * apachectl integration (for configtest + reload) 
    1213 * by default, files should be owned bu current user, not root : 2.0 ! 
    13  * make code for collecting user input more generic  
    14  (and btw, models should not be responsible for collecting data) 
    1514 * normalize exceptions usage 
    1615 * trac permissions definitions could be better. Foreach subject listed in permissions.ini 
    1716   * revoke all permissions (list obtained with 'permissions list' 
    1817   * add permissions listed in permissions.ini 
     18 * Refactor to command pattern