X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-si%2Ftests%2Fclient.php;h=84c5d701a586e3159b259861cb5857f3cb50e721;hb=06fd60ccdfa1f960ece1310f9d74d6992261ffc0;hp=cad44ef304f8ca0c8caf7eb9a3b2868f6e0712e5;hpb=bd95070a26bbbca7ddee2be352439f35fed29d71;p=gosa.git
diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php
index cad44ef30..84c5d701a 100755
--- a/gosa-si/tests/client.php
+++ b/gosa-si/tests/client.php
@@ -4,6 +4,12 @@
require_once("../../gosa-core/include/class_socketClient.inc");
error_reporting(E_ALL);
+function microtime_float()
+{
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+}
+
$zahl= 1;
for($count = 1; $count <= $zahl; $count++)
@@ -14,12 +20,56 @@ for($count = 1; $count <= $zahl; $count++)
#$sock = new Socket_Client("10.89.1.42","20081",TRUE,5);
#$sock->setEncryptionKey("secret-gosa-password");
+ $mac = "00:01:6C:9D:B9:FA"; # ws-muc-02
+
if($sock->connected()){
+ # Funktioniert noch nicht
+ #$data = "GOSA00:01:6C:9D:B9:FAacroread";
+
+ #$data = "gosa_opsi_getLicenseInformationForProductGOSA00:01:6C:9D:B9:FApython";
+ #$data = "gosa_opsi_getLicenseInformationForProductGOSA00:01:6C:9D:B9:FAfirefox";
+
+ #$data = "gosa_opsi_getLicensePools_listOfHashesGOSA00:01:6C:9D:B9:FA";
+
+ #$data = "gosa_opsi_getLicensePool_hashGOSA00:01:6C:9D:B9:FALicensePool";
+
+ #$data = "gosa_opsi_createLicensePoolGOSA00:01:6C:9D:B9:FAHaraldDas 134te Schaafacrobatwinzip";
+
+ #$data = "gosa_opsi_deleteLicensePoolGOSA00:01:6C:9D:B9:FASusi";
+
+ #$data = "GOSA00:01:6C:9D:B9:FAGonicus GmbHI'm a note!1LicensePoolabcdefghiandisLizenzVOLUMEkrakenarme.intranet.gonicus.de";
+
+ #$data = "gosa_opsi_assignSoftwareLicenseToHostGOSA00:01:6C:9D:B9:FASusilinux-cl-2.intranet.gonicus.de";
+
+ #$data = "gosa_opsi_unassignSoftwareLicenseFromHostGOSA00:01:6C:9D:B9:FASusilinux-cl-2.intranet.gonicus.de";
+
+ #$data = "gosa_opsi_unassignAllSoftwareLicensesFromHostGOSA00:01:6C:9D:B9:FAlinux-cl-2.intranet.gonicus.de";
+
+ #$data = "gosa_opsi_getSoftwareLicenseUsagesGOSA00:01:6C:9D:B9:FAkrakenarme.intranet.gonicus.de";
+ #$data = "gosa_opsi_getSoftwareLicenseUsagesGOSA00:01:6C:9D:B9:FALicensePool";
+ #$data = "gosa_opsi_getSoftwareLicenseUsagesGOSA00:01:6C:9D:B9:FA";
+ #$data = "gosa_opsi_getSoftwareLicenseUsagesForProductIdGOSA00:01:6C:9D:B9:FAfirefox";
+
+ #$data = "gosa_opsi_getSoftwareLicense_hashGOSA00:01:6C:9D:B9:FAl_2009-09-22_09:50:58_0";
+
+ #$data = "GOSA00:01:6C:9D:B9:FALicensePool";
+
+ #$data = "GOSA00:01:6C:9D:B9:FALicensePooll_2009-09-22_14:06:11";
+
+ #$data = "gosa_opsi_getReservedLicensesGOSA00:01:6C:9D:B9:FAlinux-cl-2.intranet.gonicus.de";
+
+ #$data = "gosa_opsi_boundHostToLicenseGOSA00:01:6C:9D:B9:FAandisLizenzkrakenarme.intranet.gonicus.de";
+ #$data = "gosa_opsi_unboundHostFromLicenseGOSA00:01:6C:9D:B9:FAandisLizenz";
+
+ #$data = "gosa_opsi_getAllSoftwareLicensesGOSA00:01:6C:9D:B9:FA";
+
+ $data = "gosa_opsi_get_full_product_host_informationGOSA00:01:6C:9D:B9:FAlinux-cl-2.intranet.gonicus.de";
+
##############################
# periodical jobs
- $data = "job_trigger_action_rebootGOSA00:0c:29:4c:4b:0c00:0c:29:4c:4b:0c20090622000000minutes";
-
+ #$data = "job_trigger_action_rebootGOSA00:0c:29:4c:4b:0c00:0c:29:4c:4b:0c234506290000003_months";
+ #$data = "job_trigger_action_rebootGOSA00:0c:29:4c:4b:0c2009062613500000:0c:29:4c:4b:0cminutes5";
/* Prepare a hunge bunch of data to be send */
# jobdb add
#$data = " gosa_network_completition GOSAGOSAws-muc-2";
@@ -36,7 +86,7 @@ for($count = 1; $count <= $zahl; $count++)
#$data = " gosa_trigger_reload_ldap_config GOSA00:0C:29:4C:4B:0C";
# jobdb update
- #$data = " gosa_update_status_jobdb_entry GOSA GOSA 1 19700101000000";
+ #$data = " gosa_update_status_jobdb_entry GOSA GOSA 1 12_weeks";
#$data = " gosa_update_status_jobdb_entry GOSAGOSA 00:01:6c:9d:b9:fa processing update";
# jobdb query
@@ -65,7 +115,7 @@ for($count = 1; $count <= $zahl; $count++)
# trigger jobs at client
#$data = " gosa_trigger_goto_settings_reload 00:01:6c:9d:b9:fa GOSA ";
#$data = " 00:0C:29:4C:4B:0C GOSA ";
- #$data = " 00:0C:29:4C:4B:0C GOSA ";
+ #$data = " $mac GOSA $mac";
#$data = " 00:0C:29:4C:4B:0C GOSA";
#$data = " gosa_trigger_action_faireboot 00:0C:29:4C:4B:0C GOSA ";
#$data = " gosa_trigger_action_reboot 00:0C:29:4C:4B:0C GOSA ";
@@ -151,6 +201,7 @@ for($count = 1; $count <= $zahl; $count++)
# 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 metrischesgewinde.intranet.gonicus.de ";
#$data = " gosa_opsi_get_client_hardware GOSA GOSA der_neue.intranet.gonicus.de ";
# Get software inventory
@@ -170,14 +221,21 @@ for($count = 1; $count <= $zahl; $count++)
#$data = " GOSA 00:01:6c:9d:b9:fa linux-cl-2.intranet.gonicus.de 00:11:25:4b:8c:e5 Test halt 1.2.3.4 Im a note ";
# Add product to Opsi client
- #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de winxppro ";
+ #$data = "gosa_opsi_add_product_to_clientGOSA$maclinux-cl-2.intranet.gonicus.dewinxppro";
+ #$data = "gosa_opsi_add_product_to_clientGOSA$maclinux-cl-2.intranet.gonicus.deacroread";
#$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de preloginloader ";
- #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de opsi-adminutils ";
- #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de xpconfig ";
- #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de hwaudit ";
- #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de javavm ";
- #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de firefox ";
- #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de flashplayer ";
+
+ #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de opsi-adminutils ";
+
+ #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de xpconfig ";
+
+ #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de hwaudit ";
+
+ #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de javavm ";
+
+ #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de firefox ";
+
+ #$data = " gosa_opsi_add_product_to_client GOSA 00:01:6c:9d:b9:fa 00:11:25:4b:8c:e5 linux-cl-2.intranet.gonicus.de flashplayer ";
# Delete product from Opsi client
#$data = " gosa_opsi_del_product_from_client GOSA 00:01:6c:9d:b9:fa linux-cl-1.intranet.gonicus.de 00:11:25:4b:8c:e5 wipedisk ";
@@ -217,13 +275,18 @@ for($count = 1; $count <= $zahl; $count++)
#$data = " gosa_trigger_reload_syslog_config GOSA GOSA 00:0C:29:4C:4B:0C ";
+ $time_start = microtime_float();
$sock->write($data);
$answer = "nothing";
$answer = $sock->read();
-
echo "$count: $answer\n";
$sock->close();
+
+ $time_end = microtime_float();
+ $time = $time_end - $time_start;
+ echo "Processing time: $time seconds\n";
+
}else{
echo "... FAILED!\n";
}