Code

bugfix: opsi_add_product_to_client, callobj with correct param sequence
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Aug 2008 14:04:09 +0000 (14:04 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Aug 2008 14:04:09 +0000 (14:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12164 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/opsi_com.pm
gosa-si/tests/client.php

index e7810d57eb4cfb4339d644f70ad2257d0c5a5bf8..329b192d966d6d92e26f3e10b58618dc500105aa 100644 (file)
@@ -73,7 +73,6 @@ sub opsi_add_product_to_client {
     params  => [ $productId, $hostId, "setup" ],
     id  => 1, }; 
 
-
   my $sres = $main::opsi_client->call($main::opsi_url, $callobj);
   my ($sres_err, $sres_err_string) = &check_opsi_res($sres);
   if ($sres_err){
@@ -189,7 +188,7 @@ sub opsi_add_client {
   my $name= $hostId;
   $name=~ s/^([^.]+).*$/$1/;
   my $domain= $hostId;
-  $domain=~ s/^[^.]+(.*)$/$1/;
+  $domain=~ s/^[^.]+\.(.*)$/$1/;
   my ($description, $notes, $ip, $mac);
 
   if (defined @{$msg_hash->{'description'}}[0]){
index 58202293cba71b8d0c3fd6b872d23d2754ec6fd3..c36cca351b24da98d29efb49678e3501c31a64fd 100755 (executable)
@@ -157,13 +157,13 @@ for($count = 1; $count <= $zahl; $count++)
     #$data = "<xml> <header>job_opsi_install_client</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>limux-cl-2.intranet.gonicus.de</hostId> <macaddress>00:11:25:4b:8c:e5</macaddress> </xml>";
 
     # Add Opsi client
-    #$data = "<xml> <header>gosa_opsi_add_client</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>limux-cl-1.intranet.gonicus.de</hostId> <macaddress>00:11:25:4b:8c:e6</macaddress> <description>Test halt</description> </xml>";
+    $data = "<xml> <header>gosa_opsi_add_client</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>limux-cl-1.intranet.gonicus.de</hostId> <macaddress>00:11:25:4b:8c:e6</macaddress> <description>Test halt</description> </xml>";
 
     # Add product to Opsi client
-    $data = "<xml> <header>gosa_opsi_add_product_to_client</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>limux-cl-1.intranet.gonicus.de</hostId> <macaddress>00:11:25:4b:8c:e6</macaddress> <productId>winxppro</productId>  </xml>";
+    $data = "<xml> <header>gosa_opsi_add_product_to_client</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>limux-cl-1.intranet.gonicus.de</hostId> <macaddress>00:11:25:4b:8c:e6</macaddress> <productId>firefox</productId>  </xml>";
 
     # Delete product from Opsi client
-    $data = "<xml> <header>gosa_opsi_del_product_from_client</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>limux-cl-1.intranet.gonicus.de</hostId> <macaddress>00:11:25:4b:8c:e6</macaddress> <productId>winxppro</productId>  </xml>";
+    #$data = "<xml> <header>gosa_opsi_del_product_from_client</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <hostId>limux-cl-1.intranet.gonicus.de</hostId> <macaddress>00:11:25:4b:8c:e6</macaddress> <productId>winxppro</productId>  </xml>";
 
     #########################
     # Mailqueue communication