vagrant-cloudstack 0.10.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +8 -0
  5. data/Gemfile +5 -2
  6. data/README.md +48 -10
  7. data/build_rpm.sh +1 -1
  8. data/coverage/.last_run.json +5 -0
  9. data/coverage/.resultset.json +569 -0
  10. data/coverage/.resultset.json.lock +0 -0
  11. data/coverage/assets/0.10.0/application.css +799 -0
  12. data/coverage/assets/0.10.0/application.js +1707 -0
  13. data/coverage/assets/0.10.0/colorbox/border.png +0 -0
  14. data/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  15. data/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  16. data/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  17. data/coverage/assets/0.10.0/favicon_green.png +0 -0
  18. data/coverage/assets/0.10.0/favicon_red.png +0 -0
  19. data/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  20. data/coverage/assets/0.10.0/loading.gif +0 -0
  21. data/coverage/assets/0.10.0/magnify.png +0 -0
  22. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  23. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  24. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  25. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  26. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  27. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  28. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  29. data/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  30. data/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  31. data/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  32. data/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  33. data/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  34. data/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  35. data/coverage/index.html +3438 -0
  36. data/lib/vagrant-cloudstack/action.rb +2 -3
  37. data/lib/vagrant-cloudstack/action/read_ssh_info.rb +14 -6
  38. data/lib/vagrant-cloudstack/action/run_instance.rb +205 -32
  39. data/lib/vagrant-cloudstack/action/terminate_instance.rb +78 -12
  40. data/lib/vagrant-cloudstack/config.rb +65 -1
  41. data/lib/vagrant-cloudstack/version.rb +1 -1
  42. data/locales/en.yml +10 -0
  43. data/spec/spec_helper.rb +5 -0
  44. data/spec/vagrant-cloudstack/config_spec.rb +67 -26
  45. data/vagrant-cloudstack.gemspec +3 -3
  46. metadata +60 -29
  47. data/lib/vagrant-cloudstack/action/sync_folders.rb +0 -88
@@ -1,88 +0,0 @@
1
- require "log4r"
2
- require "vagrant/util/subprocess"
3
- require "vagrant/util/scoped_hash_override"
4
- require "vagrant/util/which"
5
-
6
- module VagrantPlugins
7
- module Cloudstack
8
- module Action
9
- # This middleware uses `rsync` to sync the folders over to the
10
- # Cloudstack instance.
11
- class SyncFolders
12
- include Vagrant::Util::ScopedHashOverride
13
-
14
- def initialize(app, env)
15
- @app = app
16
- @logger = Log4r::Logger.new("vagrant_cloudstack::action::sync_folders")
17
- end
18
-
19
- def call(env)
20
- @app.call(env)
21
-
22
- ssh_info = env[:machine].ssh_info
23
-
24
- env[:machine].config.vm.synced_folders.each do |id, data|
25
- data = scoped_hash_override(data, :cloudstack)
26
-
27
- # Ignore disabled shared folders
28
- next if data[:disabled]
29
-
30
- unless Vagrant::Util::Which.which('rsync')
31
- env[:ui].warn(I18n.t('vagrant_cloudstack.rsync_not_found_warning'))
32
- break
33
- end
34
-
35
- hostpath = File.expand_path(data[:hostpath], env[:root_path])
36
- guestpath = data[:guestpath]
37
-
38
- # Make sure there is a trailing slash on the host path to
39
- # avoid creating an additional directory with rsync
40
- hostpath = "#{hostpath}/" if hostpath !~ /\/$/
41
-
42
- # on windows rsync.exe requires cygdrive-style paths
43
- if Vagrant::Util::Platform.windows?
44
- hostpath = hostpath.gsub(/^(\w):/) { "/cygdrive/#{$1}" }
45
- end
46
-
47
- # on windows "rsync'ed" files require cygdrive-style paths
48
- if env[:machine].config.vm.guest == :windows
49
- guestpath = guestpath.gsub(/^(.*)$/, '/cygdrive/c\1')
50
- end
51
-
52
- env[:ui].info(I18n.t("vagrant_cloudstack.rsync_folder",
53
- :hostpath => hostpath,
54
- :guestpath => guestpath))
55
-
56
- # Create the guest path
57
- env[:machine].communicate.sudo("mkdir -p '#{guestpath}'")
58
- env[:machine].communicate.sudo(
59
- "chown #{ssh_info[:username]} '#{guestpath}'")
60
-
61
- # Rsync over to the guest path using the SSH info
62
- private_keys = (ssh_info[:private_key_path].class == Array ? ssh_info[:private_key_path].join(",") : ssh_info[:private_key_path])
63
- command = [
64
- "rsync", "--verbose", "--archive", "-z",
65
- "--exclude", ".vagrant/",
66
- "-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{private_keys}'",
67
- hostpath,
68
- "#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
69
-
70
- # we need to fix permissions when using rsync.exe on windows, see
71
- # http://stackoverflow.com/questions/5798807/rsync-permission-denied-created-directories-have-no-permissions
72
- if Vagrant::Util::Platform.windows?
73
- command.insert(1, "--chmod", "ugo=rwX")
74
- end
75
-
76
- r = Vagrant::Util::Subprocess.execute(*command)
77
- if r.exit_code != 0
78
- raise Errors::RsyncError,
79
- :guestpath => guestpath,
80
- :hostpath => hostpath,
81
- :stderr => r.stderr
82
- end
83
- end
84
- end
85
- end
86
- end
87
- end
88
- end