summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--cobbler.spec12
-rwxr-xr-xcobbler/cobbler.py4
-rw-r--r--cobbler/cobbler_msg.py2
-rw-r--r--cobbler/item_profile.py22
-rw-r--r--docs/cobbler.pod7
-rw-r--r--setup.py2
-rw-r--r--tests/tests.py45
8 files changed, 14 insertions, 83 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 6ab7dbd..d35d5c9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
Cobbler CHANGELOG
(all entries mdehaan@redhat.com unless noted otherwise)
+* Fri Mar 23 2007 - 0.4.5
+- Removed legacy --virt-name parameter, requires koan upgrade to 0.2.8
+
* Fri Mar 23 2007 - 0.4.4
- Generate PXE configuration files from templates in /etc/cobbler to be more customizable
- Fix bug with wrong kickstart metadata being used for import
diff --git a/cobbler.spec b/cobbler.spec
index 14001c3..f8e4c21 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -2,8 +2,8 @@
Summary: Boot server configurator
Name: cobbler
-Version: 0.4.4
-Release: 0%{?dist}
+Version: 0.4.5
+Release: 3%{?dist}
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: Applications/System
@@ -64,7 +64,7 @@ fi
test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,apache,apache)
+%defattr(2755,apache,apache)
%dir /var/log/cobbler
%dir /var/log/cobbler/kicklog
%dir /var/www/cobbler/
@@ -78,6 +78,7 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%dir /var/www/cobbler/profiles
%dir /var/www/cobbler/systems
%dir /var/www/cobbler/links
+/var/www/cobbler/watcher.py*
%defattr(-,root,root)
%dir /tftpboot/pxelinux.cfg
%dir /tftpboot/images
@@ -102,7 +103,6 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%dir /var/lib/cobbler
/var/lib/cobbler/elilo-3.6-ia64.efi
/var/lib/cobbler/menu.c32
-/var/www/cobbler/watcher.py*
/etc/init.d/cobblersyslogd
%dir /var/log/cobbler/syslog
@@ -110,6 +110,10 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Mar 23 2007 Michael DeHaan <mdehaan@redhat.com> - 0.4.5-3
+- Upstream changes (see CHANGELOG)
+- Fix sticky bit on /var/www/cobbler files
+
* Fri Mar 23 2007 Michael DeHaan <mdehaan@redhat.com> - 0.4.4-0
- Upstream changes (see CHANGELOG)
diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py
index de0ab18..03a07e7 100755
--- a/cobbler/cobbler.py
+++ b/cobbler/cobbler.py
@@ -341,11 +341,7 @@ class BootCLI:
'--kick-start' : lambda(a) : profile.set_kickstart(a),
'--answers' : lambda(a) : profile.set_kickstart(a),
'--kopts' : lambda(a) : profile.set_kernel_options(a),
- '--xen-name' : lambda(a) : profile.set_virt_name(a),
- '--virt-name' : lambda(a) : profile.set_virt_name(a),
- '--xen-file-size' : lambda(a) : profile.set_virt_file_size(a),
'--virt-file-size' : lambda(a) : profile.set_virt_file_size(a),
- '--xen-ram' : lambda(a) : profile.set_virt_ram(a),
'--virt-ram' : lambda(a) : profile.set_virt_ram(a),
'--ksmeta' : lambda(a) : profile.set_ksmeta(a),
'--repos' : lambda(a) : profile.set_repos(a)
diff --git a/cobbler/cobbler_msg.py b/cobbler/cobbler_msg.py
index 4212502..ca8ab2d 100644
--- a/cobbler/cobbler_msg.py
+++ b/cobbler/cobbler_msg.py
@@ -26,7 +26,7 @@ cobbler distro add --name=<string> --kernel=<path> --initrd=<path>
cobbler profile add --name=<string> --distro=<string>
[--kick-start=<url>] [--kopts=<string>] [--ksmeta=<string>]
- [--virt-name=<string>] [--virt-file-size=<gigabytes>]
+ [--virt-file-size=<gigabytes>]
[--virt-ram=<megabytes>]
cobbler system add --name=<ip│mac│hostname|default> --profile=<string>
diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py
index 2a767c9..45dce25 100644
--- a/cobbler/item_profile.py
+++ b/cobbler/item_profile.py
@@ -35,7 +35,6 @@ class Profile(item.Item):
self.kickstart = self.settings.default_kickstart
self.kernel_options = {}
self.ks_meta = {}
- self.virt_name = 'virtguest'
self.virt_file_size = 5 # GB. 5 = Decent _minimum_ default for FC5.
self.virt_ram = 512 # MB. Install with 256 not likely to pass
self.virt_paravirt = True # hvm support is *NOT* in Koan (now)
@@ -58,9 +57,6 @@ class Profile(item.Item):
self.set_repos(self.repos)
# virt specific
- self.virt_name = self.load_item(seed_data,'virt_name')
- if not self.virt_name or self.virt_name == '':
- self.virt_name = self.name
self.virt_ram = self.load_item(seed_data,'virt_ram')
self.virt_file_size = self.load_item(seed_data,'virt_file_size')
self.virt_paravirt = self.load_item(seed_data,'virt_paravirt')
@@ -113,22 +109,6 @@ class Profile(item.Item):
return True
raise cexceptions.CobblerException("no_kickstart")
- def set_virt_name(self,str):
- """
- For Virt only.
- Specifies what virt install should use for --name.
- virt install may do conflict resolution, so this is mostly
- a hint... To keep the shell happy, the 'str' cannot
- contain wildcards or slashes and may be subject to some other
- untainting later.
- """
- # no slashes or wildcards
- for bad in [ '/', '*', '?' ]:
- if str.find(bad) != -1:
- raise cexceptions.CobblerException("exc_virt_name")
- self.virt_name = str
- return True
-
def set_virt_file_size(self,num):
"""
For Virt only.
@@ -209,7 +189,6 @@ class Profile(item.Item):
'distro' : self.distro,
'kickstart' : self.kickstart,
'kernel_options' : self.kernel_options,
- 'virt_name' : self.virt_name,
'virt_file_size' : self.virt_file_size,
'virt_ram' : self.virt_ram,
'virt_paravirt' : self.virt_paravirt,
@@ -226,7 +205,6 @@ class Profile(item.Item):
buf = buf + "kickstart : %s\n" % self.kickstart
buf = buf + "kernel options : %s\n" % self.kernel_options
buf = buf + "ks metadata : %s\n" % self.ks_meta
- buf = buf + "virt name : %s\n" % self.virt_name
buf = buf + "virt file size : %s\n" % self.virt_file_size
buf = buf + "virt ram : %s\n" % self.virt_ram
buf = buf + "virt paravirt : %s\n" % self.virt_paravirt
diff --git a/docs/cobbler.pod b/docs/cobbler.pod
index d73b9c2..cf2dd0e 100644
--- a/docs/cobbler.pod
+++ b/docs/cobbler.pod
@@ -102,7 +102,7 @@ distro breed, is the value used for --kickstart when creating the profile. See
A profile associates a distribution to additional specialized options, such as a kickstart automation file. Profiles are the core unit of provisioning and at least one profile must exist for every distribution to be provisioned. A profile might represent, for instance, a web server or desktop configuration.
-B<cobbler profile add --name=string --distro=string [--kickstart=url] [--kopts=string] [--ksmeta=string] [--virt-name=string] [--virt-file-size=gigabytes] [--virt-ram=megabytes]>
+B<cobbler profile add --name=string --distro=string [--kickstart=url] [--kopts=string] [--ksmeta=string] [--virt-file-size=gigabytes] [--virt-ram=megabytes]>
=over
@@ -124,11 +124,6 @@ If this parameter is not provided, the kickstart file will default to /etc/cobbl
Note: For other breeds of distros (see --breed argument to "distro add") that do not use "kickstarts", the kickstart in this case is just the distro specific answer file (such as an AutoYAST file). koan doesn't work for those other distros (like SuSE), but cobbler should be perfectly usable as a stand-alone solution for automated multi-distro-breed PXE control.
-=item virt-name
-
-(optional) (Virt-only) what the Virt guest name should start with. Creating
-multiple images on a machine will cause increasing numbers to be appended to this name. The default is "virtguest".
-
=item virt-file-size
(optional) (Virt-only) how large the disk image should be in gigabytes. The default is "5".
diff --git a/setup.py b/setup.py
index 2aee2b9..105cc07 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ import sys
from distutils.core import setup, Extension
import string
-VERSION = "0.4.4"
+VERSION = "0.4.5"
SHORT_DESC = "Boot and update server configurator"
LONG_DESC = """
Cobbler is a command line tool for configuration of boot/provisioning, and update servers which is also accessible as a Python library. Cobbler supports PXE, provisioning virtualized images, and reinstalling machines that are already up and running (over SSH). The last two modes require a helper tool called 'koan' that integrates with cobbler. Cobbler's advanced features include importing distributions from rsync mirrors, kickstart templating, integrated yum mirroring (and linking repository setup with kickstarts), plus managing dhcpd.conf.
diff --git a/tests/tests.py b/tests/tests.py
index 2a663e6..e58b8da 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -188,11 +188,6 @@ class Additions(BootTest):
self.assertTrue(profile.set_distro("testdistro0"))
self.assertTrue(profile.set_kickstart("http://127.0.0.1/foo"))
# no slashes or wildcards in name
- self.assertTrue(profile.set_virt_name("virt"))
- self.assertTrue(profile.set_virt_name("virt"))
- self.failUnlessRaises(CobblerException, profile.set_virt_name, "virt/foo")
- self.failUnlessRaises(CobblerException, profile.set_virt_name, "virt*foo")
- self.failUnlessRaises(CobblerException, profile.set_virt_name, "virt?foo")
# sizes must be integers
self.assertTrue(profile.set_virt_file_size("54321"))
# temporarily commenting out failing test
@@ -299,46 +294,6 @@ class TestCLIBasic(BootTest):
app = "/usr/bin/python"
self.assertTrue(subprocess.call([app,"cobbler/cobbler.py","list"]) == 0)
-class TestImport(BootTest):
-
- def test_import(self):
- # testing the import code.
- self.api.clear()
- cwd = os.getcwd()
- tests = os.path.join(cwd,"tests","import_testdata")
- self.api.import_tree(tests, None, None)
- self.api.serialize()
-
- # below:
- # partial name of distro: current count, passing count, required arch
- haystacks = {
- "import_testdata_RHEL-4_U4_AS_ia64_tree_images_pxeboot" : [0, 1, "ia64" ],
- "import_testdata_RHEL-4_U4_AS_i386_tree_images_pxeboot" : [0, 1, "x86" ],
- "import_testdata_RHEL-4_U4_AS_x86_64_tree_images_pxeboot" : [0, 1, "x86_64" ],
- "import_testdata_core_5_i386_os_images_pxeboot" : [ 0, 1, "x86" ],
- "import_testdata_core_5_i386_os_images_xen" : [0, 1, "x86" ],
- }
-
- # first go through all found distros and count the matches
- for distro in self.api.distros():
- got_it = False
- for match in haystacks.keys():
- if distro.name.find(match) != -1:
- found = haystacks[match]
- found[0] = found[0] + 1
- # check for architecture mismatches
- self.failUnlessEqual(distro.arch, found[2], "architecture detection: %s vs %s on %s" % (distro.arch, found[2], distro.name))
- got_it = True
- if not got_it: # hasn't :)
- self.fail("imported foreign distro: %s" % distro.name)
-
- # now check the required number of matches vs actual.
- # this checks to ensure unsupported arches aren't imported and there
- # are no duplicate imports
- for match in haystacks.keys():
- found = haystacks[match]
- self.failUnlessEqual(found[0], found[1], "mismatched counts: %d vs %d for %s" % (found[0], found[1], match))
-
if __name__ == "__main__":
if not os.path.exists("setup.py"):
print "tests: must invoke from top level directory"