From: rettenbe Date: Tue, 26 Aug 2008 12:45:46 +0000 (+0000) Subject: update: opsi_list_clients additionally transmit the opsi timestamp 'lastSeen' X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86de8ac45042952d8082a9376a439c76144c47e6;p=gosa.git update: opsi_list_clients additionally transmit the opsi timestamp 'lastSeen' git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12275 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/opsi_com.pm b/gosa-si/server/events/opsi_com.pm index eaebe6880..d4a786208 100644 --- a/gosa-si/server/events/opsi_com.pm +++ b/gosa-si/server/events/opsi_com.pm @@ -828,13 +828,16 @@ sub opsi_list_clients { my $res = $main::opsi_client->call($main::opsi_url, $callobj); if (not &check_opsi_res($res)){ foreach my $host (@{$res->result}){ - my $item= "".$host->{'hostId'}.""; + my $item= "\n".$host->{'hostId'}.""; if (defined($host->{'description'})){ $item.= "".xml_quote($host->{'description'}).""; } if (defined($host->{'notes'})){ $item.= "".xml_quote($host->{'notes'}).""; } + if (defined($host->{'lastSeen'})){ + $item.= "".xml_quote($host->{'lastSeen'}).""; + } $callobj = { method => 'getIpAddress', diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index d54a28fa3..d5f167be2 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -142,14 +142,14 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_opsi_set_product_properties
GOSA 00:01:6c:9d:b9:fa linux-cl-2.intranet.gonicus.de firefox askbeforeinst false
"; # Get hardware inventory - $data = "
gosa_opsi_get_client_hardware
GOSA GOSA linux-cl-2.intranet.gonicus.de
"; + #$data = "
gosa_opsi_get_client_hardware
GOSA GOSA linux-cl-2.intranet.gonicus.de
"; #$data = "
gosa_opsi_get_client_hardware
GOSA GOSA der_neue.intranet.gonicus.de
"; # Get software inventory #$data = "
gosa_opsi_get_client_software
GOSA GOSA linux-cl-2.intranet.gonicus.de
"; # List Opsi clients - #$data = "
gosa_opsi_list_clients
GOSA GOSA
"; + $data = "
gosa_opsi_list_clients
GOSA GOSA
"; # Delete Opsi client #$data = "
gosa_opsi_del_client
GOSA 00:01:6c:9d:b9:fa linux-cl-2.intranet.gonicus.de
";