Changeset 512

Show
Ignore:
Timestamp:
06/07/08 09:19:23 (7 months ago)
Author:
mgoldman
Message:

Updated some tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/trunk-pmd-intproto/agent/agent.py

    r503 r512  
    178178 
    179179                if msg.msg == "log": 
     180                        # FIXME: should not advance the AgentLog.  We need those so auto 
     181                        # updates to the log will still work.  Workaround, don't request 
     182                        # these features, or add code to send a message to the server 
     183                        # with the log files after we send this messsage back. 
    180184                        msg.type = "response" 
    181185                        if msg.body == "ALL": 
  • branches/trunk-pmd-intproto/test/agent.tests

    r506 r512  
     1Agent Psuedo-Code 
     2Loop: 
     3        Try to connect to server 
     4        if no connection to server 
     5                sleep(5) 
     6                continue 
     7        check for changes to bools, status, logs, and modules 
     8        if changes, push to server 
     9        select(server, 5 seconds) 
     10        if message from server 
     11                Handle message 
     12        continue 
     13 
     14Agent Messages and Responses 
     15 
     16[recieved messages] 
     17* The following messages respond with a message of type response 
     18* status 
     19        - responds with a message containing the status from sestatus() 
     20* bools 
     21        - responds with a message containing a hash of all se boolean 
     22          values. 
     23* file 
     24        - Jeremy: What is this supposed to do?   
     25* file status 
     26        - Jeremy: What is this supposed to do?   
     27* log 
     28        - body = ALL: return all log messages 
     29        - body = UPDATE: return all log messages since the last read 
     30 
     31[sent messages] 
     32* the following messages are generated and sent on an as needed 
     33  basis.  These messages are of type update 
     34  
     35* bools 
     36        - body is a hash of all bools that have changed since last 
     37          check 
     38* status 
     39        - body is the status of the system (currently 
     40          enforcing/permisive) 
     41        - only gets sent on change 
     42* log 
     43        - body is a list of all new messages on the system 
     44* modules 
     45        - Jeremy: What does this do. 
     46 
     47 
     48# vim:tw=68 ts=4 foldmethod=indent 
  • branches/trunk-pmd-intproto/test/server.tests

    r506 r512  
     1Server Psuedo-Code 
     2Loop: 
     3        check for updates from agents 
     4        wait for up to 5 seconds for a manager to connect 
     5        if message from manager: 
     6                handle message from manager 
     7        continue 
     8 
     9[recieved messages, agent] 
     10* for a complete description of what is recieved, please review the 
     11  file for the agent. 
     12  
     13[recieved messages, manager] 
     14* for a complete description of what is recieved, please review the 
     15  file for the manager. 
     16 
     17 
     18 
     19# vim:tw=68 ts=4 foldmethod=indent