Changeset 500

Show
Ignore:
Timestamp:
05/27/08 16:03:48 (8 months ago)
Author:
jmowery
Message:

store updates pushed from agents

Files:

Legend:

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

    r499 r500  
    8484                                        # This branch should possibly clear the store of \ 
    8585                                        # old log messages  FIXME: 
     86                                        #TODO: uncomment the 3 lines below if the log should be cleared 
     87                                        #root_layer = storage.Layer(storage_root) 
     88                                        #root_layer.clear_log(info[0]) 
     89                                        #root_layer.update() 
    8690                                        self.log((val.body, info[0])) 
    8791                                elif val.msg == 'logdelta': 
     
    143147        def bools(self, (val, clientid)): 
    144148                n = storage.Node(clientid, storage_root) 
    145                 for (key,val) in val.items(): 
    146                         n.set_bool_status(key, val
     149                for (key,value) in val.items(): 
     150                        n.set_bool_status(key, value
    147151                n.update() 
    148152 
    149153        def status(self, (val, clientid)): 
    150                 pass 
     154                n = storage.Node(clientid, storage_root) 
     155                n.enforcing = val 
     156                n.modified = True 
     157                n.update() 
    151158 
    152159        def log(self, (val, clientid)): 
    153                 pass 
     160                root_layer = storage.Layer(storage_root) 
     161                root_layer.append_log_messages(clientid, val) 
     162                root_layer.update() 
    154163 
    155164        def modules(self, (val, clientid)): 
    156                 pass 
     165                n = storage.Node(clientid, storage_root) 
     166                #TODO: set file status for each file in the node here 
     167                n.update() 
     168 
    157169######################## 
    158170 
     
    260272                                        val.type = 'response' 
    261273                                        status_list = [] 
    262                                         for client_id in val.body
     274                                        for client_id in val.targets[1:]
    263275                                                client_node = storage.Node(client_id, storage_root) 
    264276                                                status_list.append((client_id, client_node.enforcing))