summaryrefslogtreecommitdiffstats
path: root/config-db
diff options
context:
space:
mode:
authorOliver Tappe2006-09-25 19:43:25 +0200
committerOliver Tappe2006-09-25 19:43:25 +0200
commite0a5074cc61746d95064e5c59be4759b7857620b (patch)
treefdaf6d4c456ae0bf5f9e82aee99d8b0180323a71 /config-db
parent* added missing 'file' kernel-arg (diff)
downloadcore-e0a5074cc61746d95064e5c59be4759b7857620b.tar.gz
core-e0a5074cc61746d95064e5c59be4759b7857620b.tar.xz
core-e0a5074cc61746d95064e5c59be4759b7857620b.zip
* added a script that generates a rather simple testing dataset
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@391 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rwxr-xr-xconfig-db/setup-test-data-simple.pl75
1 files changed, 75 insertions, 0 deletions
diff --git a/config-db/setup-test-data-simple.pl b/config-db/setup-test-data-simple.pl
new file mode 100755
index 00000000..fdf6a0e6
--- /dev/null
+++ b/config-db/setup-test-data-simple.pl
@@ -0,0 +1,75 @@
+#! /usr/bin/perl
+
+# add the folder this script lives in to perl's search path for modules:
+use FindBin;
+use lib $FindBin::Bin;
+
+use OpenSLX::Basics;
+use OpenSLX::ConfigDB qw(:access :manipulation);
+
+openslxInit();
+
+my $openslxDB = connectConfigDB();
+
+my $vendorOs1Id = addVendorOS($openslxDB, {
+ 'name' => "suse-10",
+ 'comment' => "SuSE 10.0 Default-Installation",
+ 'path' => "suse-10.0",
+});
+
+my $vendorOs2Id = addVendorOS($openslxDB, {
+ 'name' => "suse-10.1",
+ 'comment' => "SuSE 10.1 Default-Installation",
+ 'path' => "suse-10.1",
+});
+
+my @systems;
+
+my $system1Id = addSystem($openslxDB, {
+ 'name' => "suse-10.0",
+ 'label' => "SUSE LINUX 10.0",
+ 'comment' => "Testsystem für openslx",
+ 'vendor_os_id' => $vendorOs1Id,
+ 'ramfs_debug_level' => 0,
+ 'ramfs_use_glibc' => 0,
+ 'ramfs_use_busybox' => 0,
+ 'ramfs_nicmods' => '',
+ 'ramfs_fsmods' => '',
+ 'kernel' => "boot/vmlinuz-2.6.13-15-default",
+ 'kernel_params' => "",
+ 'export_type' => 'nfs',
+ 'attr_start_xdmcp' => 'kdm',
+});
+
+my $system2Id = addSystem($openslxDB, {
+ 'name' => "suse-10.1",
+ 'label' => "SUSE LINUX 10.1",
+ 'comment' => "Testsystem für openslx",
+ 'vendor_os_id' => $vendorOs2Id,
+ 'ramfs_debug_level' => 0,
+ 'ramfs_use_glibc' => 0,
+ 'ramfs_use_busybox' => 0,
+ 'ramfs_nicmods' => '',
+ 'ramfs_fsmods' => '',
+ 'kernel' => "boot/vmlinuz-2.6.16.21-0.21-default",
+ 'kernel_params' => "debug=3",
+ 'export_type' => 'nfs',
+ 'attr_start_xdmcp' => 'kdm',
+});
+
+my $client1Id = addClient($openslxDB, {
+ 'name' => "Client-1",
+ 'mac' => "00:50:56:0D:03:38",
+ 'boot_type' => 'pxe',
+});
+
+my $client2Id = addClient($openslxDB, {
+ 'name' => "Client-2",
+ 'mac' => "00:16:41:55:12:92",
+ 'boot_type' => 'pxe',
+});
+
+addSystemIDsToClient($openslxDB, $client1Id, [$system1Id, $system2Id]);
+addSystemIDsToClient($openslxDB, $client2Id, [$system2Id]);
+
+disconnectConfigDB($openslxDB);