[cedar-backup-svn] SF.net SVN: cedar-backup:[1001] cedar-backup2/trunk
Brought to you by:
pronovic
|
From: <pro...@us...> - 2010-07-07 20:20:23
|
Revision: 1001
http://cedar-backup.svn.sourceforge.net/cedar-backup/?rev=1001&view=rev
Author: pronovic
Date: 2010-07-07 20:20:16 +0000 (Wed, 07 Jul 2010)
Log Message:
-----------
Remove configuration boilerplate "As with all of the ... are optional..."
Modified Paths:
--------------
cedar-backup2/trunk/CedarBackup2/config.py
cedar-backup2/trunk/Changelog
cedar-backup2/trunk/TODO
Modified: cedar-backup2/trunk/CedarBackup2/config.py
===================================================================
--- cedar-backup2/trunk/CedarBackup2/config.py 2010-07-07 20:17:08 UTC (rev 1000)
+++ cedar-backup2/trunk/CedarBackup2/config.py 2010-07-07 20:20:16 UTC (rev 1001)
@@ -420,12 +420,6 @@
dependencies in terms of other named actions. This class encapsulates the dependency
information for an extended action.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- Any action name must be a non-empty string matching C{ACTION_NAME_REGEX}
@@ -541,12 +535,6 @@
A hook associated with an action is a shell command to be executed either
before or after a named action is executed.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The action name must be a non-empty string matching C{ACTION_NAME_REGEX}
@@ -680,12 +668,6 @@
before or after a named action is executed. In this case, a pre-action hook
is executed before the named action.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The action name must be a non-empty string consisting of lower-case letters and digits.
@@ -724,12 +706,6 @@
before or after a named action is executed. In this case, a post-action hook
is executed after the named action.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The action name must be a non-empty string consisting of lower-case letters and digits.
@@ -769,12 +745,6 @@
"""
Class representing optimized store-action media blanking behavior.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The blanking mode must be a one of the values in L{VALID_BLANK_MODES}
@@ -881,12 +851,6 @@
"""
Class representing an extended action.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
Essentially, an extended action needs to allow the following to happen::
exec("from %s import %s" % (module, function))
@@ -1094,12 +1058,6 @@
"""
Class representing a piece of Cedar Backup command override configuration.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The absolute path must be absolute
@@ -1204,12 +1162,6 @@
"""
Class representing a Cedar Backup collect file.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- Absolute paths must be absolute
@@ -1340,12 +1292,6 @@
"""
Class representing a Cedar Backup collect directory.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- Absolute paths must be absolute
@@ -1670,12 +1616,6 @@
"""
Class representing a Cedar Backup purge directory.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The absolute path must be an absolute path
@@ -1785,12 +1725,6 @@
"""
Class representing a Cedar Backup peer.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The peer name must be a non-empty string.
@@ -1921,12 +1855,6 @@
"""
Class representing a Cedar Backup peer.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The peer name must be a non-empty string.
@@ -2230,12 +2158,6 @@
configuration and exists mostly for backwards-compatibility with Cedar
Backup 1.x.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. We don't do any
- validation on the contents of any of the fields, although we generally
- expect them to be strings.
-
@sort: __init__, __repr__, __str__, __cmp__, author, revision, description, generator
"""
@@ -2373,12 +2295,6 @@
configuration to map a command-line Cedar Backup action (i.e. "database")
to their function.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- If set, the order mode must be one of the values in C{VALID_ORDER_MODES}
@@ -2485,12 +2401,6 @@
The options section is used to store global configuration options and
defaults that can be applied to other sections.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The working directory must be an absolute path.
@@ -2877,10 +2787,6 @@
configured, then peers may be managed or unmanaged, and the stage section
peer configuration (if any) completely overrides this configuration.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in.
-
The following restrictions exist on data in this class:
- The list of local peers must contain only C{LocalPeer} objects
@@ -3005,12 +2911,6 @@
"""
Class representing a Cedar Backup collect configuration.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The target directory must be an absolute path.
@@ -3316,12 +3216,6 @@
"""
Class representing a Cedar Backup stage configuration.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The target directory must be an absolute path
@@ -3475,12 +3369,6 @@
"""
Class representing a Cedar Backup store configuration.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The source directory must be an absolute path.
@@ -3869,12 +3757,6 @@
"""
Class representing a Cedar Backup purge configuration.
- As with all of the other classes that represent configuration sections, all
- of these values are optional. It is up to some higher-level construct to
- decide whether everything they need is filled in. Some validation is done
- on non-C{None} assignments through the use of the Python C{property()}
- construct.
-
The following restrictions exist on data in this class:
- The purge directory list must be a list of C{PurgeDir} objects.
Modified: cedar-backup2/trunk/Changelog
===================================================================
--- cedar-backup2/trunk/Changelog 2010-07-07 20:17:08 UTC (rev 1000)
+++ cedar-backup2/trunk/Changelog 2010-07-07 20:20:16 UTC (rev 1001)
@@ -11,6 +11,7 @@
- Move unit tests into testcase folder to avoid test.py naming conflict
* Remove "Translate [x:y] into [a:b]" debug message for uid/gid translation.
* Refactor out util.isRunningAsRoot() to replace scattered os.getuid() calls.
+ * Remove configuration boilerplate "As with all of the ... are optional..."
Version 2.19.6 22 May 2010
Modified: cedar-backup2/trunk/TODO
===================================================================
--- cedar-backup2/trunk/TODO 2010-07-07 20:17:08 UTC (rev 1000)
+++ cedar-backup2/trunk/TODO 2010-07-07 20:20:16 UTC (rev 1001)
@@ -75,7 +75,6 @@
- List versions of other fancy checks (i.e. abs path or whatever)
- Might not really be worth it (really worth sacrificing "local" readability?)
- Maybe some of this (and __cmp___) could be done with a superclass?
-Remove configuration boilerplate "As with all of the ... are optional..."
If each extension really has its own Config object (?) pull out common parsing code
Config code is generally readable, might not be worth abstracting it
- Not sure that comments are worth it -- they're longer than the method body
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|