From b6f2503597c5df66726cb889248eb5369a08f1a2 Mon Sep 17 00:00:00 2001 From: Maciej Kwiek Date: Tue, 8 Dec 2015 12:31:02 +0100 Subject: [PATCH] Fix rsync commands There was a problem in inheritance of rsync commands. Change-Id: Icf770b48894b8e78edcc1e688a745d97f71be37e Closes-bug: 1523885 --- fuel_dev_tools/docker/__init__.py | 4 +--- fuel_dev_tools/puppet.py | 6 ++---- fuel_dev_tools/pythonclient.py | 6 ++---- fuel_dev_tools/slaves/mcagent.py | 4 +--- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/fuel_dev_tools/docker/__init__.py b/fuel_dev_tools/docker/__init__.py index 4b4db2a..36afe7a 100644 --- a/fuel_dev_tools/docker/__init__.py +++ b/fuel_dev_tools/docker/__init__.py @@ -20,7 +20,6 @@ import six from fuel_dev_tools import command from fuel_dev_tools import exc -from fuel_dev_tools import rsync from fuel_dev_tools import ssh @@ -201,8 +200,7 @@ class RestartCommand(command.BaseCommand): self.restart_container() -class RsyncCommand(rsync.RsyncMixin, - command.BaseCommand): +class RsyncCommand(command.RsyncCommand): @property def base_target_dir(self): return os.path.join( diff --git a/fuel_dev_tools/puppet.py b/fuel_dev_tools/puppet.py index 707676f..8b38274 100644 --- a/fuel_dev_tools/puppet.py +++ b/fuel_dev_tools/puppet.py @@ -17,7 +17,6 @@ import os from fuel_dev_tools import command from fuel_dev_tools import docker from fuel_dev_tools import info -from fuel_dev_tools import rsync from fuel_dev_tools import ssh @@ -27,9 +26,8 @@ class PuppetInfo(info.BasicInfo): return '' -class Rsync(rsync.RsyncMixin, - ssh.SSHMixin, - command.BaseCommand): +class Rsync(ssh.SSHMixin, + command.RsyncCommand): """Rsync local directory to the Docker container.""" def take_action(self, parsed_args): diff --git a/fuel_dev_tools/pythonclient.py b/fuel_dev_tools/pythonclient.py index b974ead..eedc2cf 100644 --- a/fuel_dev_tools/pythonclient.py +++ b/fuel_dev_tools/pythonclient.py @@ -15,13 +15,11 @@ import os from fuel_dev_tools import command -from fuel_dev_tools import rsync from fuel_dev_tools import ssh -class Rsync(rsync.RsyncMixin, - ssh.SSHMixin, - command.BaseCommand): +class Rsync(ssh.SSHMixin, + command.RsyncCommand): """Rsync local CLI directory to the main machine.""" def take_action(self, parsed_args): diff --git a/fuel_dev_tools/slaves/mcagent.py b/fuel_dev_tools/slaves/mcagent.py index f3ac3bf..0f6d8b3 100644 --- a/fuel_dev_tools/slaves/mcagent.py +++ b/fuel_dev_tools/slaves/mcagent.py @@ -15,15 +15,13 @@ from fuel_dev_tools import command from fuel_dev_tools.docker import astute from fuel_dev_tools.docker import mcollective -from fuel_dev_tools import rsync from fuel_dev_tools import slaves from fuel_dev_tools import ssh class Rsync(slaves.SlavesMixin, ssh.SSHMixin, - rsync.RsyncMixin, - command.BaseCommand): + command.RsyncCommand): def target_for_slave(self, slave): if slave['status'] in ['discover', 'error']: