Code

new opsi_client to debug ospi problems
[gosa.git] / gosa-si / tests / client.php
index 15fe8451362e6a48785b6d04d1ac2773a107cf96..39b57d86f08f53a849afb2be7a7beb0652916301 100755 (executable)
@@ -9,10 +9,10 @@ $zahl= 1;
 for($count = 1; $count <= $zahl; $count++)
 {
 
-  $sock = new Socket_Client("127.0.0.1","20082",TRUE,5);
-  $sock->setEncryptionKey("secret-gosa-password");
-  #$sock = new Socket_Client("10.89.1.30","20081",TRUE,5);
+  #$sock = new Socket_Client("127.0.0.1","20081",TRUE,5);
   #$sock->setEncryptionKey("secret-gosa-password");
+  $sock = new Socket_Client("10.89.1.42","20081",TRUE,5);
+  $sock->setEncryptionKey("secret-gosa-password");
 
   if($sock->connected()){
 
@@ -59,6 +59,7 @@ for($count = 1; $count <= $zahl; $count++)
 
 
     # trigger jobs at client
+    #$data = "<xml> <header>gosa_trigger_goto_settings_reload</header> <target>00:01:6c:9d:b9:fa</target> <source>GOSA</source> </xml>";
     #$data = "<xml> <header>gosa_detect_hardware</header> <target>10.89.1.31:20083</target> <source>GOSA</source> </xml>";
     #$data = "<xml> <header>gosa_new_key_for_client</header> <target>00:01:6c:9d:b9:fa</target> <source>10.89.1.31:20081</source> </xml>";
     #$data = "<xml> <header>job_trigger_action_wake</header> <target>00:01:6c:9d:b9:fa</target> <source>GOSA</source> <timestamp>19700101000000</timestamp></xml>";
@@ -82,6 +83,8 @@ for($count = 1; $count <= $zahl; $count++)
     #$data = "<xml> <header>gosa_send_user_msg</header> <target>GOSA</target> <source>GOSA</source> <subject>".base64_encode("eine wichtige nachricht")."</subject> <from>admin</from>  <user>polle</user> <user>harald</user> <delivery_time>20130101235959</delivery_time> <message>".base64_encode("kaffeepause")."</message> </xml>"; 
     #$data = "<xml> <header>gosa_send_user_msg</header> <target>10.89.1.30:20081</target> <source>GOSA</source> <subject>".base64_encode("eine wichtige nachricht")."</subject> <from>admin</from> <user>polle</user> <user>harald</user> <delivery_time>20130101235959</delivery_time> <message>".base64_encode("kaffeepause")."</message> </xml>";
     #$data = "<xml> <header>gosa_send_user_msg</header> <target>10.89.1.30:20081</target> <source>GOSA</source> <subject>".base64_encode("eine wichtige nachricht")."</subject> <from>admin</from> <user>rettenbe</user> <delivery_time>20130101235959</delivery_time> <message>".base64_encode("kaffeepause")."</message> </xml>";
+    
+    $data = "<xml> <header>gosa_set_last_system</header> <target>10.89.1.31:20082</target> <source>GOSA</source> <mac_address>00:01:6c:9d:b9:fa</mac_address> <last_system>1.2.3.4</last_system> <last_system_login>20081212000000</last_system_login> </xml>";
 
     ##################
     # recreate fai dbs
@@ -185,7 +188,7 @@ for($count = 1; $count <= $zahl; $count++)
 
     # Querying the mailqueue at 
     #$data = "<xml> <header>gosa_mailqueue_query</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> </xml>";
-    $data = "<xml> <header>gosa_mailqueue_query</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <q_tag>recipient</q_tag> <q_operator>eq</q_operator> <q_value>retta</q_value> </xml>";
+    #$data = "<xml> <header>gosa_mailqueue_query</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <q_tag>recipient</q_tag> <q_operator>eq</q_operator> <q_value>retta</q_value> </xml>";
 
     # Multiple xml tags msg_id are allowed
     #$data = "<xml> <header>gosa_mailqueue_hold</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <msg_id>99C8ABEF23</msg_id> </xml>";
@@ -211,6 +214,8 @@ for($count = 1; $count <= $zahl; $count++)
     # SYSLOG reload
     #$data = "<xml> <header>gosa_trigger_reload_syslog_config</header> <source>GOSA</source> <target>GOSA</target> <macaddress>00:01:6c:9d:b9:fa</macaddress> </xml>"; 
 
+    $data ="<xml><header>gosa_krb5_get_policy</header><policy>6chars</policy><source>GOSA</source><target>00:01:6c:9d:aa:16</   target></xml>";
+
     $sock->write($data);
     $answer = "nothing";
     $answer = $sock->read();