summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d2f2c9f)
raw | patch | inline | side by side (parent: d2f2c9f)
author | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 23 Feb 2009 20:12:23 +0000 (20:12 +0000) | ||
committer | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 23 Feb 2009 20:12:23 +0000 (20:12 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4165 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/admin.py | patch | blob | history |
diff --git a/roundup/admin.py b/roundup/admin.py
index 8adf7ba74ff1433202e0041c38ef192b65aad49b..14b7c42c40228528db3d3e2fb7aadad3e5e7cff2 100644 (file)
--- a/roundup/admin.py
+++ b/roundup/admin.py
def do_help(self, args, nl_re=re.compile('[\r\n]'),
indent_re=re.compile(r'^(\s+)\S+')):
- """Usage: help topic
+ ''"""Usage: help topic
Give help about topic.
commands -- list commands
print _('Back ends:'), ', '.join(backends)
def do_install(self, tracker_home, args):
- """Usage: install [template [backend [key=val[,key=val]]]]
+ ''"""Usage: install [template [backend [key=val[,key=val]]]]
Install a new Roundup tracker.
The command will prompt for the tracker home directory
return 0
def do_genconfig(self, args):
- """Usage: genconfig <filename>
+ ''"""Usage: genconfig <filename>
Generate a new tracker config file (ini style) with default values
in <filename>.
"""
config.save(args[0])
def do_initialise(self, tracker_home, args):
- """Usage: initialise [adminpw]
+ ''"""Usage: initialise [adminpw]
Initialise a new Roundup tracker.
The administrator details will be set at this step.
def do_get(self, args):
- """Usage: get property designator[,designator]*
+ ''"""Usage: get property designator[,designator]*
Get the given property of one or more designator(s).
Retrieves the property value of the nodes specified
def do_set(self, args):
- """Usage: set items property=value property=value ...
+ ''"""Usage: set items property=value property=value ...
Set the given properties of one or more items(s).
The items are specified as a class or as a comma-separated
return 0
def do_find(self, args):
- """Usage: find classname propname=value ...
+ ''"""Usage: find classname propname=value ...
Find the nodes of the given class with a given link property value.
Find the nodes of the given class with a given link property value.
return 0
def do_specification(self, args):
- """Usage: specification classname
+ ''"""Usage: specification classname
Show the properties for a classname.
This lists the properties for a given class.
print _('%(key)s: %(value)s')%locals()
def do_create(self, args):
- """Usage: create classname property=value ...
+ ''"""Usage: create classname property=value ...
Create a new entry of a given class.
This creates a new entry of the given class using the property
return 0
def do_list(self, args):
- """Usage: list classname [property]
+ ''"""Usage: list classname [property]
List the instances of a class.
Lists all instances of the given class. If the property is not
if len(args) < 1:
raise UsageError, _('Not enough arguments supplied')
classname = args[0]
-
+
# get the class
cl = self.get_class(classname)
if self.separator:
if len(args) == 2:
- # create a list of propnames since user specified propname
+ # create a list of propnames since user specified propname
proplist=[]
for nodeid in cl.list():
try:
return 0
def do_table(self, args):
- """Usage: table classname [property[,property]*]
+ ''"""Usage: table classname [property[,property]*]
List the instances of a class in tabular form.
Lists all instances of the given class. If the properties are not
return 0
def do_history(self, args):
- """Usage: history designator
+ ''"""Usage: history designator
Show the history entries of a designator.
Lists the journal entries for the node identified by the designator.
return 0
def do_commit(self, args):
- """Usage: commit
+ ''"""Usage: commit
Commit changes made to the database during an interactive session.
The changes made during an interactive session are not
return 0
def do_rollback(self, args):
- """Usage: rollback
+ ''"""Usage: rollback
Undo all changes that are pending commit to the database.
The changes made during an interactive session are not
return 0
def do_retire(self, args):
- """Usage: retire designator[,designator]*
+ ''"""Usage: retire designator[,designator]*
Retire the node specified by designator.
This action indicates that a particular node is not to be retrieved
return 0
def do_restore(self, args):
- """Usage: restore designator[,designator]*
+ ''"""Usage: restore designator[,designator]*
Restore the retired node specified by designator.
The given nodes will become available for users again.
return 0
def do_export(self, args, export_files=True):
- """Usage: export [[-]class[,class]] export_dir
+ ''"""Usage: export [[-]class[,class]] export_dir
Export the database to colon-separated-value files.
To exclude the files (e.g. for the msg or file class),
use the exporttables command.
return 0
def do_exporttables(self, args):
- """Usage: exporttables [[-]class[,class]] export_dir
+ ''"""Usage: exporttables [[-]class[,class]] export_dir
Export the database to colon-separated-value files, excluding the
files below $TRACKER_HOME/db/files/ (which can be archived separately).
To include the files, use the export command.
return self.do_export(args, export_files=False)
def do_import(self, args):
- """Usage: import import_dir
+ ''"""Usage: import import_dir
Import a database from the directory containing CSV files,
two per class to import.
return 0
def do_pack(self, args):
- """Usage: pack period | date
+ ''"""Usage: pack period | date
Remove journal entries older than a period of time specified or
before a certain date.
return 0
def do_reindex(self, args, desre=re.compile('([A-Za-z]+)([0-9]+)')):
- """Usage: reindex [classname|designator]*
+ ''"""Usage: reindex [classname|designator]*
Re-generate a tracker's search indexes.
This will re-generate the search indexes for a tracker.
return 0
def do_security(self, args):
- """Usage: security [Role name]
+ ''"""Usage: security [Role name]
Display the Permissions available to one or all Roles.
"""
if len(args) == 1:
def do_migrate(self, args):
- """Usage: migrate
+ ''"""Usage: migrate
Update a tracker's database to be compatible with the Roundup
codebase.