+devnotes, +FIXME

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-13 11:06:03 +02:00
parent c15673aef7
commit 841b54c6d0
1 changed files with 15 additions and 13 deletions

View File

@ -30,26 +30,25 @@ log = logging.getLogger(__name__)
''' '''
common: common:
runs only remotely, needs local and remote runs only remotely, needs local and remote to construct paths
env: env:
__explorer: full qualified path to other global explorers on remote side == remote.global_explorer_path __explorer: full qualified path to other global explorers on remote side
-> remote.global_explorer_path
global explorer is: a global explorer is:
folder full of scripts which have to be: - a script
(- copied to remote) - executed on the remote side
- executed one by one on remote - returns its output as a string
- output saved to local files
env: env:
creates: local files with explorer output creates: nothing, returns output
type explorer is: type explorer is:
folder full of scripts which have to be: - a script
(- copied to remote) - executed on the remote side for each object instance
- executed one by one on remote for each object instance - returns its output as a string
- output saved into object instance
env: env:
__object: full qualified path to the object's remote dir __object: full qualified path to the object's remote dir
@ -57,7 +56,8 @@ type explorer is:
__object_fq: full qualified object id, iow: $type.name + / + object_id __object_fq: full qualified object id, iow: $type.name + / + object_id
__type_explorer: full qualified path to the other type explorers on remote side __type_explorer: full qualified path to the other type explorers on remote side
creates: nothing, all output is handled by the object instances creates: nothing, returns output
''' '''
@ -74,6 +74,7 @@ class Explorer(object):
'__explorer': self.remote.global_explorer_path, '__explorer': self.remote.global_explorer_path,
} }
# FIXME: should i do this?
def transfer_global_explorers(self): def transfer_global_explorers(self):
"""Transfer the global explorers to the remote side.""" """Transfer the global explorers to the remote side."""
self.remote.mkdir(self.remote.global_explorer_path) self.remote.mkdir(self.remote.global_explorer_path)
@ -84,6 +85,7 @@ class Explorer(object):
script = os.path.join(self.remote.global_explorer_path, explorer) script = os.path.join(self.remote.global_explorer_path, explorer)
return self.remote.run_script(script, env=self.env) return self.remote.run_script(script, env=self.env)
# FIXME: should i do this?
def transfer_type_explorers(self, cdist_type): def transfer_type_explorers(self, cdist_type):
"""Transfer the type explorers for the given type to the remote side.""" """Transfer the type explorers for the given type to the remote side."""
source = os.path.join(self.local.type_path, cdist_type.explorer_path) source = os.path.join(self.local.type_path, cdist_type.explorer_path)