From ddf7eaaee1a40ea99d5a965d6c8f58b330134d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 27 Jan 2022 17:58:22 +0100 Subject: [PATCH] remove legacy --- kiwi_scp/subcommands/_hidden.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/kiwi_scp/subcommands/_hidden.py b/kiwi_scp/subcommands/_hidden.py index 062495b..4751a9a 100644 --- a/kiwi_scp/subcommands/_hidden.py +++ b/kiwi_scp/subcommands/_hidden.py @@ -5,40 +5,9 @@ import subprocess # local from ..config import LoadedConfig from ..executable import Executable -from ..projects import Projects -from ..rootkit import Rootkit, prefix_path_mnt from ..subcommand import SubCommand -class ConfCopyCommand(SubCommand): - """kiwi conf-copy""" - - def __init__(self): - super().__init__( - 'conf-copy', - action="Syncing all configs for", add_parser=False, - description="Synchronize all config files to target directory" - ) - - def _run_instance(self, runner, args): - conf_dirs = [ - project.conf_dir_name() - for project in Projects.from_dir().filter_enabled() - if project.has_configs() - ] - - if conf_dirs: - # add target directory - conf_dirs.append(LoadedConfig.get()['runtime:storage']) - logging.info(f"Sync directories: {conf_dirs}") - - Rootkit('rsync').run([ - 'rsync', '-rpt', '--delete', *prefix_path_mnt(conf_dirs) - ], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - - return True - - def _find_net(net_name): ps = Executable('docker').run([ 'network', 'ls', '--filter', f"name={net_name}", '--format', '{{.Name}}'