Python-fuelclient rsync command added

Change-Id: I16aab579c22ede34db135e5ed875daaf710a5608
This commit is contained in:
Przemyslaw Kaminski 2015-08-10 14:07:23 +02:00
parent 35c3c9cc46
commit aad885ba88
4 changed files with 43 additions and 2 deletions

View File

@ -6,7 +6,7 @@ Command-line interface for interacting with Fuel Master node.
## Global options
### `--IP`, `-P|--port`, `-U|--user`
### `--IP`, `-p|--port`, `-U|--user`
Specify IP, port and user of the Fuel master ISO (default is `10.20.0.2`).

View File

@ -0,0 +1,39 @@
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
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):
"""Rsync local CLI directory to the main machine."""
def take_action(self, parsed_args):
source_dir = os.path.join(parsed_args.source, 'fuelclient/')
# Target is in /usr/lib/python2.6/site-packages/fuelclient
target_dir = os.path.join(
'/usr', 'lib', 'python2.6', 'site-packages', 'fuelclient'
)
target, args = self.build_app_args_target(target_dir)
self.print_debug('Rsyncing to master')
self.rsync(source_dir, target, *args)

View File

@ -37,6 +37,7 @@ from fuel_dev_tools.slaves import mcagent
from fuel_dev_tools import exc
from fuel_dev_tools import info
from fuel_dev_tools import puppet
from fuel_dev_tools import pythonclient
from fuel_dev_tools import ssh
@ -89,6 +90,8 @@ COMMANDS = {
'puppet-rsync': puppet.Rsync,
'pythonclient-rsync': pythonclient.Rsync,
'rabbitmq-id': rabbitmq.Id,
'rabbitmq-config': rabbitmq.Config,
'rabbitmq-dir': rabbitmq.Dir,

View File

@ -8,7 +8,6 @@ fuel-virtualenv-dir:
fuel-virtualenv:
virtualenv.managed:
- name: {{ pillar['HOME'] }}/.virtualenvs/fuel
- group: {{ pillar['GROUP'] }}
- user: {{ pillar['USER'] }}
- require:
- file: fuel-virtualenv-dir