Merge remote-tracking branch 'telmich/master'
Conflicts: lib/cdist/core/explorer.py lib/cdist/emulator.py Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
commit
b8b9719cc6
7 changed files with 142 additions and 175 deletions
|
|
@ -25,9 +25,6 @@ import os
|
|||
|
||||
import cdist
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
'''
|
||||
common:
|
||||
runs only remotely, needs local and remote to construct paths
|
||||
|
|
@ -67,13 +64,16 @@ class Explorer(object):
|
|||
"""
|
||||
def __init__(self, target_host, local, remote):
|
||||
self.target_host = target_host
|
||||
|
||||
self.log = logging.getLogger(target_host)
|
||||
|
||||
self.local = local
|
||||
self.remote = remote
|
||||
self.env = {
|
||||
'__target_host': self.target_host,
|
||||
'__explorer': self.remote.global_explorer_path,
|
||||
}
|
||||
if log.getEffectiveLevel() == logging.DEBUG:
|
||||
if self.log.getEffectiveLevel() == logging.DEBUG:
|
||||
self.env.update({'__debug': "yes" })
|
||||
self._type_explorers_transferred = []
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,6 @@ import os
|
|||
|
||||
import cdist
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
'''
|
||||
common:
|
||||
runs only locally, does not need remote
|
||||
|
|
@ -68,13 +65,16 @@ class Manifest(object):
|
|||
def __init__(self, target_host, local):
|
||||
self.target_host = target_host
|
||||
self.local = local
|
||||
|
||||
self.log = logging.getLogger(self.target_host)
|
||||
|
||||
self.env = {
|
||||
'PATH': "%s:%s" % (self.local.bin_path, os.environ['PATH']),
|
||||
'__target_host': self.target_host,
|
||||
'__global': self.local.out_path,
|
||||
'__cdist_type_base_path': self.local.type_path, # for use in type emulator
|
||||
}
|
||||
if log.getEffectiveLevel() == logging.DEBUG:
|
||||
if self.log.getEffectiveLevel() == logging.DEBUG:
|
||||
self.env.update({'__debug': "yes" })
|
||||
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ class Manifest(object):
|
|||
env.update(self.env)
|
||||
env['__manifest'] = self.local.manifest_path
|
||||
env['__cdist_manifest'] = script
|
||||
log.info("Running initial manifest " + self.local.manifest_path)
|
||||
self.log.info("Running initial manifest " + self.local.manifest_path)
|
||||
self.local.run_script(script, env=env)
|
||||
|
||||
def run_type_manifest(self, cdist_object):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue