diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-05-11 17:24:20 -0400 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-05-11 17:24:20 -0400 |
commit | 85005517223359b0326045a7add495f77043fecc (patch) | |
tree | 8c9631fc93002f55232ed97860957088a90bfa89 /cobbler | |
parent | 47c86a2aa148df4fab9e0725fae639c1dfe1790d (diff) | |
download | third_party-cobbler-85005517223359b0326045a7add495f77043fecc.tar.gz third_party-cobbler-85005517223359b0326045a7add495f77043fecc.tar.xz third_party-cobbler-85005517223359b0326045a7add495f77043fecc.zip |
Added licensing and RH copyright. Pychecker (once again). Fixed one unit test where I changed a command line syntax.
Diffstat (limited to 'cobbler')
-rw-r--r-- | cobbler/action_check.py | 8 | ||||
-rw-r--r-- | cobbler/action_sync.py | 10 | ||||
-rw-r--r-- | cobbler/api.py | 12 | ||||
-rw-r--r-- | cobbler/cexceptions.py | 8 | ||||
-rwxr-xr-x | cobbler/cobbler | 9 | ||||
-rwxr-xr-x | cobbler/cobbler.py | 17 | ||||
-rw-r--r-- | cobbler/cobbler_msg.py | 10 | ||||
-rw-r--r-- | cobbler/collection.py | 8 | ||||
-rw-r--r-- | cobbler/collection_distros.py | 10 | ||||
-rw-r--r-- | cobbler/collection_profiles.py | 8 | ||||
-rw-r--r-- | cobbler/collection_systems.py | 8 | ||||
-rw-r--r-- | cobbler/config.py | 10 | ||||
-rw-r--r-- | cobbler/item.py | 8 | ||||
-rw-r--r-- | cobbler/item_distro.py | 8 | ||||
-rw-r--r-- | cobbler/item_profile.py | 11 | ||||
-rw-r--r-- | cobbler/item_system.py | 8 | ||||
-rw-r--r-- | cobbler/serializable.py | 8 | ||||
-rw-r--r-- | cobbler/serializer.py | 16 | ||||
-rw-r--r-- | cobbler/settings.py | 8 | ||||
-rw-r--r-- | cobbler/utils.py | 8 |
20 files changed, 178 insertions, 15 deletions
diff --git a/cobbler/action_check.py b/cobbler/action_check.py index fdcc5d5..9646818 100644 --- a/cobbler/action_check.py +++ b/cobbler/action_check.py @@ -2,7 +2,15 @@ Validates whether the system is reasonably well configured for serving up content. This is the code behind 'cobbler check'. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import os diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index 9e681a6..3334c62 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -2,7 +2,15 @@ Builds out a TFTP/cobbler boot tree based on the object tree. This is the code behind 'cobbler sync'. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import os @@ -307,7 +315,7 @@ class BootSync: return shutil.copyfile(src,dst) except IOError, ioe: raise cexceptions.CobblerException("need_perms2",src,dst) - + def copy(self,src,dst): """ diff --git a/cobbler/api.py b/cobbler/api.py index d4dfd10..a4f04fe 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -3,7 +3,15 @@ python API module for Cobbler see source for cobbler.py, or pydoc, for example usage. CLI apps and daemons should import api.py, and no other cobbler code. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import config @@ -19,7 +27,7 @@ class BootAPI: """ The API can be invoked in two ways, depending on how it is constructed. The catch_exceptions mode will cause any API method to return false - if any CobblerExceptions were thrown, along with setting 'last_error'. + if any CobblerExceptions were thrown, along with setting 'last_error'. The other mode just lets the exceptions pass through, and is the way most apps should use the API. catch_exceptions was added for the test hooks, since they are coded to use True/False. @@ -28,7 +36,7 @@ class BootAPI: self.catch_exceptions = catch_exceptions self.last_error = "" self.deserialize() - + def __api_call(self,anonymous): if self.catch_exceptions: diff --git a/cobbler/cexceptions.py b/cobbler/cexceptions.py index 076429b..1052abe 100644 --- a/cobbler/cexceptions.py +++ b/cobbler/cexceptions.py @@ -1,7 +1,15 @@ """ Custom exceptions for Cobbler +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import exceptions diff --git a/cobbler/cobbler b/cobbler/cobbler index d69b50b..6249d69 100755 --- a/cobbler/cobbler +++ b/cobbler/cobbler @@ -2,7 +2,16 @@ """ Wrapper for cobbler + +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import sys diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py index e93d29f..01639ca 100755 --- a/cobbler/cobbler.py +++ b/cobbler/cobbler.py @@ -3,10 +3,17 @@ Command line interface for cobbler, a network provisioning configuration library. Consult 'man cobbler' for general info. This class serves as a good reference on how to drive the API (api.py). +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ -import os import sys import api import syck @@ -67,13 +74,13 @@ class BootCLI: """ Print out abbreviated help if user gives bad syntax """ - raise cexception.CobblerException("usage") + raise cexceptions.CobblerException("usage") def list(self,args): - all = [ self.api.settings(), self.api.distros(), + all = [ self.api.settings(), self.api.distros(), self.api.profiles(), self.api.systems() ] for item in all: - print item.printable() + print item.printable() def system_remove(self,args): """ @@ -181,7 +188,7 @@ class BootCLI: key, value = x.split("=",1) value = value.replace('"','').replace("'",'') except: - raise cexpceptions.CobblerException("bad_arg",x) + raise cexceptions.CobblerException("bad_arg",x) if input_routines.has_key(key): input_routines[key](value) else: diff --git a/cobbler/cobbler_msg.py b/cobbler/cobbler_msg.py index cd2be93..a85b570 100644 --- a/cobbler/cobbler_msg.py +++ b/cobbler/cobbler_msg.py @@ -3,7 +3,15 @@ Messages used by cobbler. This module encapsulates strings so they can be reused and potentially translated. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ _msg_table = { @@ -58,7 +66,7 @@ _msg_table = { "exc_xen_name" : "invalid Xen name", "exc_xen_file" : "invalid Xen file size", "exc_xen_mac" : "invalid Xen mac address", - "exc_xen_para" : "invalid Xen paravirtualization setting", + "exc_xen_para" : "invalid Xen paravirtualization setting", "exc_profile" : "invalid profile name", "exc_profile2" : "profile name not set", "check_ok" : """ diff --git a/cobbler/collection.py b/cobbler/collection.py index 937c528..ad1ed27 100644 --- a/cobbler/collection.py +++ b/cobbler/collection.py @@ -1,7 +1,15 @@ """ Base class for any serializable list of things... +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import exceptions diff --git a/cobbler/collection_distros.py b/cobbler/collection_distros.py index d5fda8c..9625b58 100644 --- a/cobbler/collection_distros.py +++ b/cobbler/collection_distros.py @@ -2,7 +2,15 @@ A distro represents a network bootable matched set of kernels and initrd files -Michael DeHaan <mdehaan@redhat.com +Copyright 2006, Red Hat, Inc +Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import utils diff --git a/cobbler/collection_profiles.py b/cobbler/collection_profiles.py index 837b0e6..152e1f8 100644 --- a/cobbler/collection_profiles.py +++ b/cobbler/collection_profiles.py @@ -4,7 +4,15 @@ For instance, FC5 with a kickstart file specifying OpenOffice might represent a 'desktop' profile. For Xen, there are many additional options, with client-side defaults (not kept here). +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import item_profile as profile diff --git a/cobbler/collection_systems.py b/cobbler/collection_systems.py index aa26571..39b3119 100644 --- a/cobbler/collection_systems.py +++ b/cobbler/collection_systems.py @@ -2,7 +2,15 @@ Systems are hostnames/MACs/IP names and the associated profile they belong to. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import item_system as system diff --git a/cobbler/config.py b/cobbler/config.py index cf259a2..4bcc31e 100644 --- a/cobbler/config.py +++ b/cobbler/config.py @@ -1,7 +1,15 @@ """ Config.py is a repository of the Cobbler object model +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import os @@ -97,7 +105,7 @@ class Config: if not serializer.serialize(x): return False return True - + def serialize(self): """ diff --git a/cobbler/item.py b/cobbler/item.py index b1f5b93..9e8a5ba 100644 --- a/cobbler/item.py +++ b/cobbler/item.py @@ -1,7 +1,15 @@ """ An Item is a serializable thing that can appear in a Collection +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import exceptions diff --git a/cobbler/item_distro.py b/cobbler/item_distro.py index f42663f..7491a98 100644 --- a/cobbler/item_distro.py +++ b/cobbler/item_distro.py @@ -2,7 +2,15 @@ A cobbler distribution. A distribution is a kernel, and initrd, and potentially some kernel options. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py index 22b56e9..46c7929 100644 --- a/cobbler/item_profile.py +++ b/cobbler/item_profile.py @@ -1,8 +1,15 @@ """ -A Cobbler Profile. A profile is a reference to a distribution, possibly some kernel -options, possibly some Xen options, and some kickstart data. +A Cobbler Profile. A profile is a reference to a distribution, possibly some kernel options, possibly some Xen options, and some kickstart data. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import utils diff --git a/cobbler/item_system.py b/cobbler/item_system.py index cd25344..ab4b520 100644 --- a/cobbler/item_system.py +++ b/cobbler/item_system.py @@ -1,7 +1,15 @@ """ A Cobbler System. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import utils diff --git a/cobbler/serializable.py b/cobbler/serializable.py index a55eae9..62dfd01 100644 --- a/cobbler/serializable.py +++ b/cobbler/serializable.py @@ -2,7 +2,15 @@ Serializable interface, for documentation purposes. Collections and Settings both support this interface. +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import exceptions diff --git a/cobbler/serializer.py b/cobbler/serializer.py index bc46125..71781b7 100644 --- a/cobbler/serializer.py +++ b/cobbler/serializer.py @@ -1,4 +1,16 @@ -# Michael DeHaan <mdehaan@redhat.com> +""" +Serializer code for cobbler + +Copyright 2006, Red Hat, Inc +Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +""" import syck # PySyck 0.61 or greater, not syck-python 0.55 import errno @@ -61,5 +73,5 @@ def deserialize(obj): fd.close() obj.from_datastruct(datastruct) return True - + diff --git a/cobbler/settings.py b/cobbler/settings.py index 978c1b2..41ddd92 100644 --- a/cobbler/settings.py +++ b/cobbler/settings.py @@ -1,7 +1,15 @@ """ Cobbler app-wide settings +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import serializable diff --git a/cobbler/utils.py b/cobbler/utils.py index 3c82044..144deb3 100644 --- a/cobbler/utils.py +++ b/cobbler/utils.py @@ -1,7 +1,15 @@ """ Misc heavy lifting functions for cobbler +Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import os |