From bd6d296925f4d25989636808da134e3ab169ff71 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 20 Oct 2006 18:53:58 +0000 Subject: [PATCH] - added class variables: event_type, object_type, object_ids (used by event logger) --- PLC/Methods/AddConfFile.py | 5 +++++ PLC/Methods/BlacklistKey.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/PLC/Methods/AddConfFile.py b/PLC/Methods/AddConfFile.py index eed0ae0d..9641dd2f 100644 --- a/PLC/Methods/AddConfFile.py +++ b/PLC/Methods/AddConfFile.py @@ -28,11 +28,16 @@ class AddConfFile(Method): returns = Parameter(int, '1 if successful') + event_type = 'Add' + object_type = 'ConfFile' + object_ids = [] + def call(self, auth, source, dest, conf_file_fields = {}): conf_file_fields = dict(filter(can_update, conf_file_fields.items())) conf_file = ConfFile(self.api, conf_file_fields) conf_file['source'] = source conf_file['dest'] = dest conf_file.sync() + self.object_ids = [conf_file['conf_file_id']] return 1 diff --git a/PLC/Methods/BlacklistKey.py b/PLC/Methods/BlacklistKey.py index d62b7761..642507cf 100644 --- a/PLC/Methods/BlacklistKey.py +++ b/PLC/Methods/BlacklistKey.py @@ -23,6 +23,10 @@ class BlacklistKey(Method): ] returns = Parameter(int, '1 if successful') + + event_type = 'Update' + object_type = 'Key' + object_ids = [] def call(self, auth, key_id): # Get associated key details @@ -32,5 +36,6 @@ class BlacklistKey(Method): key = keys[0] key.blacklist() + object_ids = [key['key_id']] return 1 -- 2.47.0