Code

Added dumb opsi repeater for the server
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jun 2008 15:17:29 +0000 (15:17 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jun 2008 15:17:29 +0000 (15:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11425 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/opsi.pm [new file with mode: 0644]

diff --git a/gosa-si/server/events/opsi.pm b/gosa-si/server/events/opsi.pm
new file mode 100644 (file)
index 0000000..90dc4a4
--- /dev/null
@@ -0,0 +1,85 @@
+package opsi;
+use Exporter;
+@ISA = qw(Exporter);
+my @events = (
+    "get_events",
+    "opsi_get_netboot_products",
+    "opsi_get_local_products",
+    "opsi_get_product_properties",
+    "opsi_set_product_properties",
+    "answer_opsi_get_netboot_products",
+    "answer_opsi_get_local_products",
+    "answer_opsi_get_product_properties",
+    "answer_opsi_set_product_properties",
+   );
+@EXPORT = @events;
+
+use strict;
+use warnings;
+use GOSA::GosaSupportDaemon;
+
+
+BEGIN {}
+
+END {}
+
+### Start ######################################################################
+
+sub get_events {
+    return \@events;
+}
+
+    
+sub opsi_get_netboot_products {
+        my ($msg, $msg_hash, $session_id) = @_;
+        $msg =~ s/gosa_opsi/opsi/g;
+        return ( $msg );
+}
+
+
+sub opsi_set_product_properties {
+        my ($msg, $msg_hash, $session_id) = @_;
+        $msg =~ s/gosa_opsi/opsi/g;
+        return ( $msg );
+}
+
+
+sub opsi_get_product_properties {
+        my ($msg, $msg_hash, $session_id) = @_;
+        $msg =~ s/gosa_opsi/opsi/g;
+        return ( $msg );
+}
+
+
+sub opsi_get_local_products {
+        my ($msg, $msg_hash, $session_id) = @_;
+        $msg =~ s/gosa_opsi/opsi/g;
+        return ( $msg );
+}
+
+
+sub answer_opsi_get_netboot_products {
+    my ($msg, $msg_hash, $session_id) = @_ ;
+    $msg =~ s/<target>\S+<\/target>/<target>GOSA<\/target>/g;
+    return ($msg);
+}
+
+sub answer_opsi_get_product_properties {
+    my ($msg, $msg_hash, $session_id) = @_ ;
+    $msg =~ s/<target>\S+<\/target>/<target>GOSA<\/target>/g;
+    return ($msg);
+}
+
+sub answer_opsi_set_product_properties {
+    my ($msg, $msg_hash, $session_id) = @_ ;
+    $msg =~ s/<target>\S+<\/target>/<target>GOSA<\/target>/g;
+    return ($msg);
+}
+
+sub answer_opsi_get_local_products {
+    my ($msg, $msg_hash, $session_id) = @_ ;
+    $msg =~ s/<target>\S+<\/target>/<target>GOSA<\/target>/g;
+    return ($msg);
+}
+
+1;