Skip to content

Commit

Permalink
Merge pull request #246 from cloudify-cosmo/CFY-4332-Uploading-resour…
Browse files Browse the repository at this point in the history
…ces-from-windows-cli-puts-them-in-the-wrong-url

CFY-4332-Uploading-resources-from-windows-cli-puts-them-in-the-wrong-url
  • Loading branch information
mxmrlv committed Dec 2, 2015
2 parents cddc458 + e5565cf commit 78dcd5d
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions cloudify_cli/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,24 +470,19 @@ def _upload_resources(manager_node, fabric_env, management_ip, rest_port,
_get_resource_into_dir(temp_dir, plugin_local_yaml_path)

# copy plugin's yaml file to the manager's fileserver
remote_paths = plugin_remote_yaml_path.split('/')
with fabric.settings(**fabric_env):

# Creating a remote folder
if len(remote_paths) > 1:
remote_plugin_folder_path = \
os.path.normpath("{0}{1}".format(remote_plugins_folder,
os.path.dirname(
plugin_remote_yaml_path)))
fabric.run('sudo mkdir -p {0}'.format(
remote_plugin_folder_path))
remote_plugin_folder_path = \
"{0}{1}".format(remote_plugins_folder,
os.path.dirname(plugin_remote_yaml_path))
fabric.run('sudo mkdir -p {0}'.format(
remote_plugin_folder_path))

# Uploading the plugin file
remote_plugin_path = \
os.path.normpath("{0}{1}".format(remote_plugins_folder,
remote_paths))
fabric.put(plugin_local_yaml_path,
remote_plugin_path, use_sudo=True)
remote_plugin_path = "{0}{1}".format(remote_plugins_folder,
plugin_remote_yaml_path)
fabric.put(plugin_local_yaml_path, remote_plugin_path,
use_sudo=True)
finally:
shutil.rmtree(temp_dir, ignore_errors=True)

Expand Down

0 comments on commit 78dcd5d

Please sign in to comment.