From: rettenbe Date: Wed, 6 Aug 2008 13:43:46 +0000 (+0000) Subject: update: add and delete products to and from Opsi client X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a5ffbb79b8e129ee52841b45c7b2d4fb383b9ae3;p=gosa.git update: add and delete products to and from Opsi client git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12163 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/opsi_com.pm b/gosa-si/server/events/opsi_com.pm index d0acd00cd..e7810d57e 100644 --- a/gosa-si/server/events/opsi_com.pm +++ b/gosa-si/server/events/opsi_com.pm @@ -380,7 +380,7 @@ sub opsi_get_netboot_products { my $description= xml_quote($tres->{'description'}); $name=~ s/\//\\\//; $description=~ s/\//\\\//; - $xml_msg=~ s/<\/xxx>/$r<\/ProductId><\/name>$description<\/description><\/item>$state<\/xxx>/; + $xml_msg=~ s/<\/xxx>/$r<\/productId><\/name>$description<\/description><\/item>$state<\/xxx>/; } } @@ -404,7 +404,7 @@ sub opsi_get_netboot_products { my $description= xml_quote($tres->{'description'}); $name=~ s/\//\\\//; $description=~ s/\//\\\//; - $xml_msg=~ s/<\/xxx>/$r<\/ProductId><\/name>$description<\/description><\/item><\/xxx>/; + $xml_msg=~ s/<\/xxx>/$r<\/productId><\/name>$description<\/description><\/item><\/xxx>/; } } @@ -429,7 +429,7 @@ sub opsi_get_product_properties { my $source = @{$msg_hash->{'source'}}[0]; my $target = @{$msg_hash->{'target'}}[0]; my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0]; - my $productId = @{$msg_hash->{'ProductId'}}[0]; + my $productId = @{$msg_hash->{'productId'}}[0]; my $hostId; # build return message with twisted target and source @@ -509,12 +509,12 @@ sub opsi_set_product_properties { my $source = @{$msg_hash->{'source'}}[0]; my $target = @{$msg_hash->{'target'}}[0]; my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0]; - my $productId = @{$msg_hash->{'ProductId'}}[0]; + my $productId = @{$msg_hash->{'productId'}}[0]; my $hostId; # build return message with twisted target and source my $out_hash = &main::create_xml_hash("answer_$header", $main::server_address, $source); - &add_content2xml_hash($out_hash, "ProductId", $productId); + &add_content2xml_hash($out_hash, "productId", $productId); # Get hostID if defined if (defined @{$msg_hash->{'hostId'}}[0]){ @@ -794,7 +794,7 @@ sub opsi_get_local_products { my $description= xml_quote($tres->{'description'}); $name=~ s/\//\\\//; $description=~ s/\//\\\//; - $xml_msg=~ s/<\/xxx>/$r<\/ProductId><\/name>$description<\/description><\/item>$state<\/xxx>/; + $xml_msg=~ s/<\/xxx>/$r<\/productId><\/name>$description<\/description><\/item>$state<\/xxx>/; } } @@ -818,7 +818,7 @@ sub opsi_get_local_products { my $description= xml_quote($tres->{'description'}); $name=~ s/\//\\\//; $description=~ s/\//\\\//; - $xml_msg=~ s/<\/xxx>/$r<\/ProductId><\/name>$description<\/description><\/item><\/xxx>/; + $xml_msg=~ s/<\/xxx>/$r<\/productId><\/name>$description<\/description><\/item><\/xxx>/; } } diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 11368f7a8..58202293c 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -130,16 +130,16 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_opsi_get_local_products
GOSA GOSA limux-cl-2.intranet.gonicus.de
"; # Get product properties - global - #$data = "
gosa_opsi_get_product_properties
GOSA GOSA winxppro
"; + #$data = "
gosa_opsi_get_product_properties
GOSA GOSA winxppro
"; # Get product properties - per host - #$data = "
gosa_opsi_get_product_properties
GOSA GOSA firefox limux-cl-2.intranet.gonicus.de
"; + #$data = "
gosa_opsi_get_product_properties
GOSA GOSA firefox limux-cl-2.intranet.gonicus.de
"; # Set product properties - global - #$data = "
gosa_opsi_set_product_properties
GOSA 00:01:6c:9d:aa:16 winxppro askbeforeinstfalse
"; + #$data = "
gosa_opsi_set_product_properties
GOSA 00:01:6c:9d:aa:16 winxppro askbeforeinstfalse
"; # Set product properties - per host - #$data = "
gosa_opsi_set_product_properties
GOSA 00:01:6c:9d:aa:16 limux-cl-2.intranet.gonicus.de winxppro askbeforeinstfalse
"; + #$data = "
gosa_opsi_set_product_properties
GOSA 00:01:6c:9d:aa:16 limux-cl-2.intranet.gonicus.de winxppro askbeforeinstfalse
"; # Get hardware inventory #$data = "
gosa_opsi_get_client_hardware
GOSA GOSA limux-cl-2.intranet.gonicus.de
"; @@ -154,14 +154,16 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_opsi_del_client
GOSA 00:01:6c:9d:aa:16 sdfgsg.intranet.gonicus.de
"; # Install Opsi client - $data = "
job_opsi_install_client
GOSA 00:01:6c:9d:b9:fa limux-cl-2.intranet.gonicus.de 00:11:25:4b:8c:e5
"; + #$data = "
job_opsi_install_client
GOSA 00:01:6c:9d:b9:fa limux-cl-2.intranet.gonicus.de 00:11:25:4b:8c:e5
"; # Add Opsi client - $data = "
gosa_opsi_add_client
GOSA 00:01:6c:9d:b9:fa limux-cl-1.intranet.gonicus.de 00:11:25:4b:8c:e6 Test halt
"; + #$data = "
gosa_opsi_add_client
GOSA 00:01:6c:9d:b9:fa limux-cl-1.intranet.gonicus.de 00:11:25:4b:8c:e6 Test halt
"; # Add product to Opsi client + $data = "
gosa_opsi_add_product_to_client
GOSA 00:01:6c:9d:b9:fa limux-cl-1.intranet.gonicus.de 00:11:25:4b:8c:e6 winxppro
"; # Delete product from Opsi client + $data = "
gosa_opsi_del_product_from_client
GOSA 00:01:6c:9d:b9:fa limux-cl-1.intranet.gonicus.de 00:11:25:4b:8c:e6 winxppro
"; ######################### # Mailqueue communication