Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/translator.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-11-14 20:43:41 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-11-14 20:43:41 (GMT)
commitc2f513b50ecc62b30a30f3669e1b675f864e394c (patch)
tree66a3c55091b3c08be5e5362cca6c7244483a74aa /tutorius/translator.py
parentf3fd1f4350be622c76cb67baf93efb0e3505c4c2 (diff)
ResourceTranslator : WIP (this code does not work)
Diffstat (limited to 'tutorius/translator.py')
-rw-r--r--tutorius/translator.py26
1 files changed, 17 insertions, 9 deletions
diff --git a/tutorius/translator.py b/tutorius/translator.py
index 626e2c9..bc98fc5 100644
--- a/tutorius/translator.py
+++ b/tutorius/translator.py
@@ -21,7 +21,6 @@ import copy
logger = logging.getLogger("ResourceTranslator")
from .properties import *
-# TODO : Uncomment this line upon integration with the Vault
from .vault import Vault
class ResourceTranslator(object):
@@ -156,9 +155,18 @@ class ResourceTranslator(object):
def unsubscribe_all(self):
return self._probe_manager.unsubscribe_all()
+
+ def register_probe(self, process_name, unique_id):
+ self._probe_manager.register_probe(process_name, unique_id)
+
+ def unregister_probe(self, unique_id):
+ self._probe_manager.unregister_probe(unique_id)
+ def get_registered_probes_list(self, process_name=None):
+ return self._probe_manager.get_registered_probes_list(process_name)
+
## Decorated functions ##
- def install(self, action):
+ def install(self, action, block=False):
# Make a new copy of the action that we want to install,
# because translate() changes the action and we
# don't want to modify the caller's action representation
@@ -167,19 +175,19 @@ class ResourceTranslator(object):
self.translate(new_action)
# Send the new action to the probe manager
- return self._probe_manager.install(new_action)
+ return self._probe_manager.install(new_action, block)
- def update(self, action):
- new_action = copy.deepcopy(action)
- self.translate(new_action)
+ def update(self, action, newaction, block=False):
+ translated_new_action = copy.deepcopy(newaction)
+ self.translate(translated_new_action)
- return self._probe_manager.update(new_action)
+ return self._probe_manager.update(action, translated_new_action, block)
- def uninstall(self, action):
+ def uninstall(self, action, block=False):
new_action = copy.deepcopy(action)
self.translate(new_action)
- return self._probe_manager.uninstall(new_action)
+ return self._probe_manager.uninstall(new_action, block)
def uninstall_all(self):
return self._probe_manager.uninstall_all()