- added logging vars
authorTony Mack <tmack@cs.princeton.edu>
Tue, 28 Nov 2006 22:02:33 +0000 (22:02 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 28 Nov 2006 22:02:33 +0000 (22:02 +0000)
25 files changed:
PLC/Methods/GetAddressTypes.py
PLC/Methods/GetAddresses.py
PLC/Methods/GetBootStates.py
PLC/Methods/GetConfFiles.py
PLC/Methods/GetEvents.py
PLC/Methods/GetKeyTypes.py
PLC/Methods/GetKeys.py
PLC/Methods/GetMessages.py
PLC/Methods/GetNetworkMethods.py
PLC/Methods/GetNetworkTypes.py
PLC/Methods/GetNodeGroups.py
PLC/Methods/GetNodeNetworks.py
PLC/Methods/GetNodes.py
PLC/Methods/GetPCUs.py
PLC/Methods/GetPeerData.py
PLC/Methods/GetPeers.py
PLC/Methods/GetPersons.py
PLC/Methods/GetRoles.py
PLC/Methods/GetSession.py
PLC/Methods/GetSites.py
PLC/Methods/GetSliceAttributeTypes.py
PLC/Methods/GetSliceAttributes.py
PLC/Methods/GetSliceInstantiations.py
PLC/Methods/GetSlices.py
PLC/Methods/GetSlivers.py

index 74d4f61..1f3eb32 100644 (file)
@@ -27,5 +27,8 @@ class GetAddressTypes(Method):
 
     returns = [AddressType.fields]
 
+    event_type = 'Get'
+    object_type = 'AddressType'
+
     def call(self, auth, address_type_filter = None, return_fields = None):
         return AddressTypes(self.api, address_type_filter, return_fields)
index 3aa9eeb..bff3b73 100644 (file)
@@ -24,6 +24,9 @@ class GetAddresses(Method):
         ]
 
     returns = [Address.fields]
+    
+    event_type = 'Get'
+    object_type = 'Address'
 
     def call(self, auth, address_filter = None, return_fields = None):
         return Addresses(self.api, address_filter, return_fields)
index 1afa53b..1c9afc3 100644 (file)
@@ -16,6 +16,9 @@ class GetBootStates(Method):
         ]
 
     returns = [BootState.fields['boot_state']]
+    
+    event_type = 'Get'
+    object_type = 'BootState'
 
     def call(self, auth):
         return [boot_state['boot_state'] for boot_state in BootStates(self.api)]
index 6a10f90..582f611 100644 (file)
@@ -26,5 +26,8 @@ class GetConfFiles(Method):
 
     returns = [ConfFile.fields]
 
+    event_type = 'Get'
+    object_type = 'ConfFile'
+
     def call(self, auth, conf_file_filter = None, return_fields = None):
         return ConfFiles(self.api, conf_file_filter, return_fields)
index 4fbb451..0ee58df 100644 (file)
@@ -24,6 +24,9 @@ class GetEvents(Method):
         ]
 
     returns = [Event.fields]
+    event_type = 'Get'
+    object_type = 'Event'
 
     def call(self, auth, event_filter = None, return_fields = None):
         return Events(self.api, event_filter, return_fields)
+
index f8a554b..4c742ee 100644 (file)
@@ -17,5 +17,8 @@ class GetKeyTypes(Method):
 
     returns = [KeyType.fields['key_type']]
 
+    event_type = 'Get'
+    object_type = 'KeyType'
+
     def call(self, auth):
         return [key_type['key_type'] for key_type in KeyTypes(self.api)]
index fcbd2b1..b9cf110 100644 (file)
@@ -28,6 +28,9 @@ class GetKeys(Method):
 
     returns = [Key.fields]
 
+    event_type = 'Get'
+    object_type = 'Key'
+
     def call(self, auth, key_filter = None, return_fields = None):
        keys = Keys(self.api, key_filter, return_fields)
 
index 6605324..3d0473d 100644 (file)
@@ -22,7 +22,6 @@ class GetMessages(Method):
 
     event_type = 'Get'
     object_type = 'Message'
-    object_ids = []
 
     def call(self, auth, message_ids = None):
         return Messages(self.api, message_ids)
index e857dd5..b29ad37 100644 (file)
@@ -17,5 +17,8 @@ class GetNetworkMethods(Method):
 
     returns = [NetworkMethod.fields['method']]
 
+    event_type = 'Get'
+    object_type = 'NetworkMethod'
+
     def call(self, auth):
         return [network_method['method'] for network_method in NetworkMethods(self.api)]
index 7187d21..d819761 100644 (file)
@@ -17,5 +17,8 @@ class GetNetworkTypes(Method):
 
     returns = [NetworkType.fields['type']]
 
+    event_type = 'Get'
+    object_type = 'NetworkType'
+
     def call(self, auth):
         return [network_type['type'] for network_type in NetworkTypes(self.api)]
index 478eb99..38d0618 100644 (file)
@@ -25,6 +25,8 @@ class GetNodeGroups(Method):
         ]
 
     returns = [NodeGroup.fields]
+    event_type = 'Get'
+    object_type = 'NodeGroup'
   
     def call(self, auth, nodegroup_filter = None, return_fields = None):
        return NodeGroups(self.api, nodegroup_filter, return_fields)
index 4562c00..db348a5 100644 (file)
@@ -25,6 +25,9 @@ class GetNodeNetworks(Method):
         ]
 
     returns = [NodeNetwork.fields]
+    
+    event_type = 'Get'
+    object_type = 'NodeNetwork'
 
     def call(self, auth, nodenetwork_filter = None, return_fields = None):
         return NodeNetworks(self.api, nodenetwork_filter, return_fields)
index 6206a7a..92f0111 100644 (file)
@@ -28,6 +28,9 @@ class GetNodes(Method):
 
     returns = [Node.fields]
 
+    event_type = 'Get'
+    object_type = 'Node'
+
     def call(self, auth, node_filter = None, return_fields = None):
         # Get node information
         nodes = Nodes(self.api, node_filter, return_fields)
index 13bd7dc..1f8e201 100644 (file)
@@ -27,6 +27,8 @@ class GetPCUs(Method):
         ]
 
     returns = [PCU.fields]
+    event_type = 'Get'
+    object_type = 'PCU'
 
     def call(self, auth, pcu_filter = None, return_fields = None):
        # If we are not admin, make sure to only return our own PCUs
index 4b7d433..4b0f068 100644 (file)
@@ -34,6 +34,8 @@ class GetPeerData (Method):
                ]
     # for RefreshPeer 
     returns = Parameter (dict,"Sites, Keys, Nodes, Persons, Slices")
+    event_type = 'Get'
+    object_type = 'Peer'
 
     def call (self, auth, peer_id):
         # xxx a peer cannot yet compute it's peer_id under another plc
index b7509b0..3002e82 100644 (file)
@@ -30,6 +30,8 @@ class GetPeers (Method):
         ]
 
     returns = [Peer.fields]
+    event_type = 'Get'
+    object_type = 'Peer'
 
     def call (self, auth, peer_filter = None, return_fields = None):
        return Peers(self.api, peer_filter, return_fields)
index e29d109..56c7cd9 100644 (file)
@@ -32,8 +32,12 @@ class GetPersons(Method):
     can_return = lambda (field, value): field not in ['password']
     return_fields = dict(filter(can_return, Person.fields.items()))
     returns = [return_fields]
+    
+    event_type = 'Get'
+    object_type = 'Person'
 
     def call(self, auth, person_filter = None, return_fields = None):
+
        # If we are not admin, make sure to only return viewable accounts
         if 'admin' not in self.caller['roles']:
             # Get accounts that we are able to view
index a53d775..ba15ee1 100644 (file)
@@ -16,6 +16,9 @@ class GetRoles(Method):
         ]
 
     returns = [Role.fields]
+    
+    event_type = 'Get'
+    object_type = 'Role'
 
     def call(self, auth):
        return Roles(self.api)
index f1263c8..584de64 100644 (file)
@@ -16,6 +16,9 @@ class GetSession(Method):
     roles = ['admin', 'pi', 'user', 'tech', 'node']
     accepts = [Auth()]
     returns = Session.fields['session_id']
+    
+    event_type = 'Get'
+    object_type = 'Session'
 
     def call(self, auth):
         # Authenticated with a session key, just return it
index 11c2708..0f51b02 100644 (file)
@@ -27,7 +27,6 @@ class GetSites(Method):
 
     event_type = 'Get'
     object_type = 'Site'
-    object_ids = []
        
     def call(self, auth, site_filter = None, return_fields = None):
         return Sites(self.api, site_filter, return_fields)
index 5511e58..889346f 100644 (file)
@@ -26,5 +26,8 @@ class GetSliceAttributeTypes(Method):
 
     returns = [SliceAttributeType.fields]
 
+    event_type = 'Get'
+    object_type = 'SliceAttributeType'
+
     def call(self, auth, attribute_type_filter = None, return_fields = None):
         return SliceAttributeTypes(self.api, attribute_type_filter, return_fields)
index 5a6a447..4107aed 100644 (file)
@@ -33,6 +33,9 @@ class GetSliceAttributes(Method):
         ]
 
     returns = [SliceAttribute.fields]
+    
+    event_type = 'Get'
+    object_type = 'SliceAttribute'
 
     def call(self, auth, slice_attribute_filter = None, return_fields = None):
        # If we are not admin, make sure to only return our own slice
index 25a856d..fc6469d 100644 (file)
@@ -17,5 +17,8 @@ class GetSliceInstantiations(Method):
 
     returns = [SliceInstantiation.fields['instantiation']]
 
+    event_type = 'Get'
+    object_type = 'SliceInstantiation'
+
     def call(self, auth):
         return [slice_instantiation['instantiation'] for slice_instantiation in SliceInstantiations(self.api)]
index ac3c69e..6cfacac 100644 (file)
@@ -29,6 +29,9 @@ class GetSlices(Method):
         ]
 
     returns = [Slice.fields]
+    
+    event_type = 'Get'
+    object_type = 'Slice'
 
     def call(self, auth, slice_filter = None, return_fields = None):
        # If we are not admin, make sure to return only viewable
index 460f37a..46e13d3 100644 (file)
@@ -61,6 +61,9 @@ class GetSlivers(Method):
         }]
     }]
 
+    event_type = 'Get'
+    object_type = 'Sliver'
+
     def call(self, auth, node_filter = None):
        timestamp = int(time.time())