Changeset 222 for cleverbox/trunk/cleverbox
- Timestamp:
- 02/13/08 20:33:03 (4 years ago)
- Location:
- cleverbox/trunk/cleverbox/model
- Files:
-
- 3 modified
-
__init__.py (modified) (1 diff)
-
client.py (modified) (1 diff)
-
project.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cleverbox/trunk/cleverbox/model/__init__.py
r211 r222 1 1 # -*- coding: utf-8 -*- 2 2 version = '0.5dev' 3 4 def 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 137 137 Deletes client from supplied environment. 138 138 139 TODO : tu nrthat into an "archive" command to avoid complete loss of data139 TODO : turn that into an "archive" command to avoid complete loss of data 140 140 """ 141 141 -
cleverbox/trunk/cleverbox/model/project.py
r213 r222 5 5 import logging, os, re, ConfigParser, traceback 6 6 from cleverbox.utils import filesystem, styles 7 from cleverbox import model 7 8 8 9 def exists(environment, client_name, project_name, project_status = None): … … 87 88 """ 88 89 89 # Parameters required for project creation90 required = ('client', 'short_name', 'full_name', 'profile', 'enable')91 92 90 # Merging for consistency 93 91 parameters['client'] = client_name 94 92 parameters['short_name'] = project_name 95 93 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 102 98 # Make sure client exists 103 99 from cleverbox.model import client
