From 181de7a2181704f57308aecacf25eb11dd77aa19 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 15 Oct 2007 11:02:42 -0400 Subject: Adding test script for very large number of machines. --- tests/multi.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/multi.py (limited to 'tests') diff --git a/tests/multi.py b/tests/multi.py new file mode 100644 index 0000000..4c80618 --- /dev/null +++ b/tests/multi.py @@ -0,0 +1,29 @@ +import cobbler.api as capi + +api = capi.BootAPI() + +SYSTEMS_COUNT = 5000 + +distros = api.distros() +profiles = api.profiles() +systems = api.systems() + +distro = api.new_distro() +distro.set_name("d1") +distro.set_kernel("/tmp/foo") +distro.set_initrd("/tmp/foo") +distros.add(distro) + +profile = api.new_profile() +profile.set_name("p1") +profile.set_distro("d1") +profiles.add(profile) + +for x in xrange(0,SYSTEMS_COUNT): + if (x%10==0): print "%s" % x + system = api.new_system() + system.set_name("system%d" % x) + system.set_profile("p1") + systems.add(system,with_copy=True) + +api.serialize() -- cgit