diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-04-20 17:57:02 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-04-20 17:57:02 -0400 |
commit | bb1e5b50e930b7c9618387cc43634e6050eb3481 (patch) | |
tree | ac7feb459190458ed21a57ae1bf7d5dc5b664666 /cobbler/item.py | |
parent | 8205bf0691bb48080c3bc4d0fd7c444238187801 (diff) | |
download | third_party-cobbler-bb1e5b50e930b7c9618387cc43634e6050eb3481.tar.gz third_party-cobbler-bb1e5b50e930b7c9618387cc43634e6050eb3481.tar.xz third_party-cobbler-bb1e5b50e930b7c9618387cc43634e6050eb3481.zip |
This commit overhauls the main cobbler CLI module and adds support for
object renaming, copying, and editing -- previously only addition and
removal were supported. This frees uses (hopefully) from the need
to hack YAML and risk damaging their configurations by rendering the
config unparseable. It also makes "cobbler list" print out a simple
tree representation that shows the association between objects.
This also relaxes the requirements for what constitutes a kernel and initrd
filename, just in case they are named something different. They still have
to exist.
Diffstat (limited to 'cobbler/item.py')
-rw-r--r-- | cobbler/item.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cobbler/item.py b/cobbler/item.py index c974f64..1ccc84d 100644 --- a/cobbler/item.py +++ b/cobbler/item.py @@ -18,6 +18,17 @@ import utils class Item(serializable.Serializable): + def __init__(self,config): + """ + Constructor. Requires a back reference to the Config management object. + """ + self.config = config + self.settings = self.config._settings + self.clear() + + def clear(self): + raise exceptions.NotImplementedError + def set_name(self,name): """ All objects have names, and with the exception of System |