summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4005115)
raw | patch | inline | side by side (parent: 4005115)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Jul 2008 20:48:20 +0000 (20:48 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Jul 2008 20:48:20 +0000 (20:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11516 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/client/events/opsi.pm | patch | blob | history |
index 9d3f0dfffd3386aabdb60849a2e05f2ccb048e39..04473295c6c95226f076e87235414cce2c32cb31 100644 (file)
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
+ my $hostId;
+
+ # Get hostID if defined
+ if (defined @{$msg_hash->{'hostId'}}[0]){
+ $hostId = @{$msg_hash->{'hostId'}}[0];
+ }
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
my $xml_msg= &create_xml_string($out_hash);
# Authenticate
- my $callobj = {
- method => 'getNetBootProductIds_list',
- params => [ ],
- id => 1,
- };
+ my $callobj;
+ if (defined $hostId){
+ $callobj = {
+ method => 'getNetBootProductIds_list',
+ params => [ $hostId ],
+ id => 1,
+ };
+ } else {
+ $callobj = {
+ method => 'getNetBootProductIds_list',
+ params => [ ],
+ id => 1,
+ };
+ }
my $res = $client->call($opsi_url, $callobj);
if (check_res($res)){
my $session_id = @{$msg_hash->{'session_id'}}[0];
my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
my $productId = @{$msg_hash->{'ProductId'}}[0];
+ my $hostId;
+
+ # Get hostID if defined
+ if (defined @{$msg_hash->{'hostId'}}[0]){
+ $hostId = @{$msg_hash->{'hostId'}}[0];
+ }
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
&add_content2xml_hash($out_hash, "xxx", "");
my $xml_msg= &create_xml_string($out_hash);
+
+# Move to getProductProperties_hash prod + objectid
+
# JSON Query
my $callobj = {
method => 'getProductPropertyDefinitions_listOfHashes',
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
+ my $hostId;
+
+ # Get hostID if defined
+ if (defined @{$msg_hash->{'hostId'}}[0]){
+ $hostId = @{$msg_hash->{'hostId'}}[0];
+ }
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
+# Params += objectId ='hostId'
+
# Produkt
# Property
# Wert
my $target = @{$msg_hash->{'target'}}[0];
my $session_id = @{$msg_hash->{'session_id'}}[0];
my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0];
+ my $hostId;
+
+ # Get hostID if defined
+ if (defined @{$msg_hash->{'hostId'}}[0]){
+ $hostId = @{$msg_hash->{'hostId'}}[0];
+ }
# build return message with twisted target and source
my $out_hash = &main::create_xml_hash("answer_$header", $target, $source);
&add_content2xml_hash($out_hash, "xxx", "");
my $xml_msg= &create_xml_string($out_hash);
- my $callobj = {
- method => 'getLocalBootProductIds_list',
- params => [ ],
- id => 1,
- };
+ # Append hostId
+ my $callobj;
+ if (defined $hostId){
+ $callobj = {
+ method => 'getLocalBootProductIds_list',
+ params => [ $hostId ],
+ id => 1,
+ };
+ } else {
+ $callobj = {
+ method => 'getLocalBootProductIds_list',
+ params => [ ],
+ id => 1,
+ };
+ }
my $res = $client->call($opsi_url, $callobj);
if (check_res($res)){