forked from ungleich-public/cdist
++fixes
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
e5e2fb866c
commit
3fcbabc5e8
3 changed files with 9 additions and 17 deletions
|
@ -202,7 +202,7 @@ class ConfigInstall:
|
||||||
def link_emulator(self):
|
def link_emulator(self):
|
||||||
"""Link emulator to types"""
|
"""Link emulator to types"""
|
||||||
src = os.path.abspath(self.exec_path)
|
src = os.path.abspath(self.exec_path)
|
||||||
for type in cdist.core.Type.list_types():
|
for type in cdist.core.Type.list_types(self.context.type_base_path):
|
||||||
dst = os.path.join(self.context.bin_path, type.name)
|
dst = os.path.join(self.context.bin_path, type.name)
|
||||||
log.debug("Linking emulator: %s to %s", src, dst)
|
log.debug("Linking emulator: %s to %s", src, dst)
|
||||||
|
|
||||||
|
@ -213,9 +213,9 @@ class ConfigInstall:
|
||||||
"""Run global explorers"""
|
"""Run global explorers"""
|
||||||
log.info("Running global explorers")
|
log.info("Running global explorers")
|
||||||
|
|
||||||
src_path = cdist.context.global_explorer_path
|
src_path = self.context.global_explorer_path
|
||||||
dst_path = cdist.context.global_explorer_out_path
|
dst_path = self.context.global_explorer_out_path
|
||||||
remote_dst_path = cdist.context.remote_global_explorer_path
|
remote_dst_path = self.context.remote_global_explorer_path
|
||||||
|
|
||||||
self.context.transfer_path(src_path, remote_dst_path)
|
self.context.transfer_path(src_path, remote_dst_path)
|
||||||
|
|
||||||
|
|
|
@ -128,3 +128,8 @@ class Context:
|
||||||
def remove_remote_path(self, destination):
|
def remove_remote_path(self, destination):
|
||||||
cdist.exec.run_or_fail(["rm", "-rf", destination], remote_prefix=True)
|
cdist.exec.run_or_fail(["rm", "-rf", destination], remote_prefix=True)
|
||||||
|
|
||||||
|
def transfer_path(self, source, destination):
|
||||||
|
"""Transfer directory and previously delete the remote destination"""
|
||||||
|
self.remove_remote_path(destination)
|
||||||
|
cdist.exec.run_or_fail(os.environ['__remote_copy'].split() +
|
||||||
|
["-r", source, self.target_host + ":" + destination])
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# FIXME: To Copy
|
|
||||||
def transfer_dir(self, source, destination):
|
|
||||||
"""Transfer directory and previously delete the remote destination"""
|
|
||||||
self.remove_remote_dir(destination)
|
|
||||||
cdist.exec.run_or_fail(os.environ['__remote_copy'].split() +
|
|
||||||
["-r", source, self.target_host + ":" + destination])
|
|
||||||
|
|
||||||
# FIXME: To Copy
|
|
||||||
def transfer_file(self, source, destination):
|
|
||||||
"""Transfer file"""
|
|
||||||
cdist.exec.run_or_fail(os.environ['__remote_copy'].split() +
|
|
||||||
[source, self.target_host + ":" + destination])
|
|
||||||
|
|
Loading…
Reference in a new issue