summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-10-15 11:02:42 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-10-15 11:02:42 -0400
commit181de7a2181704f57308aecacf25eb11dd77aa19 (patch)
tree17956744444f324846f94f01723488e21012fab8 /tests
parent096b9e109e2f8a954af25b8f5241d5f7fd089755 (diff)
downloadthird_party-cobbler-181de7a2181704f57308aecacf25eb11dd77aa19.tar.gz
third_party-cobbler-181de7a2181704f57308aecacf25eb11dd77aa19.tar.xz
third_party-cobbler-181de7a2181704f57308aecacf25eb11dd77aa19.zip
Adding test script for very large number of machines.
Diffstat (limited to 'tests')
-rw-r--r--tests/multi.py29
1 files changed, 29 insertions, 0 deletions
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()