X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-si%2Ftests%2Fclient.php;h=84c5d701a586e3159b259861cb5857f3cb50e721;hb=06fd60ccdfa1f960ece1310f9d74d6992261ffc0;hp=4b915457f7c08ced95f0c394dcce9f43c903e8af;hpb=cc0955fcf2bc8427fcc2e1fc386795cb106c1deb;p=gosa.git
diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php
index 4b915457f..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,15 @@ 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: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";
@@ -29,7 +38,7 @@ for($count = 1; $count <= $zahl; $count++)
#$data = "gosa_opsi_deleteLicensePoolGOSA00:01:6C:9D:B9:FASusi";
- #$data = "GOSA00:01:6C:9D:B9:FAGonicus GmbHI'm a note!10Haraldabcdefghi";
+ #$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";
@@ -37,16 +46,25 @@ for($count = 1; $count <= $zahl; $count++)
#$data = "gosa_opsi_unassignAllSoftwareLicensesFromHostGOSA00:01:6C:9D:B9:FAlinux-cl-2.intranet.gonicus.de";
- #$data = "gosa_opsi_getSoftwareLicenseUsages_listOfHashesGOSA00:01:6C:9D:B9:FAlinux-cl-2.intranet.gonicus.de";
- #$data = "gosa_opsi_getSoftwareLicenseUsages_listOfHashesGOSA00:01:6C:9D:B9:FASusi";
- #$data = "gosa_opsi_getSoftwareLicenseUsages_listOfHashesGOSA00:01:6C:9D:B9:FA";
+ #$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_09:50:58_0";
+ #$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
@@ -97,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 ";
@@ -183,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
@@ -202,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 ";
@@ -249,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";
}