vagrant-proxmox 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sanity_checks.rb +1 -1
  3. data/lib/vagrant-proxmox.rb +1 -2
  4. data/lib/vagrant-proxmox/action.rb +133 -86
  5. data/lib/vagrant-proxmox/action/connect_proxmox.rb +10 -10
  6. data/lib/vagrant-proxmox/action/create_vm.rb +33 -28
  7. data/lib/vagrant-proxmox/action/destroy_vm.rb +10 -6
  8. data/lib/vagrant-proxmox/action/get_node_list.rb +8 -6
  9. data/lib/vagrant-proxmox/action/is_created.rb +1 -0
  10. data/lib/vagrant-proxmox/action/is_stopped.rb +1 -0
  11. data/lib/vagrant-proxmox/action/message_file_not_found.rb +21 -0
  12. data/lib/vagrant-proxmox/action/message_not_running.rb +20 -0
  13. data/lib/vagrant-proxmox/action/message_upload_server_error.rb +20 -0
  14. data/lib/vagrant-proxmox/action/proxmox_action.rb +6 -22
  15. data/lib/vagrant-proxmox/action/read_ssh_info.rb +1 -0
  16. data/lib/vagrant-proxmox/action/read_state.rb +11 -14
  17. data/lib/vagrant-proxmox/action/select_node.rb +23 -0
  18. data/lib/vagrant-proxmox/action/shutdown_vm.rb +8 -8
  19. data/lib/vagrant-proxmox/action/start_vm.rb +20 -12
  20. data/lib/vagrant-proxmox/action/stop_vm.rb +9 -8
  21. data/lib/vagrant-proxmox/action/sync_folders.rb +1 -1
  22. data/lib/vagrant-proxmox/action/upload_iso_file.rb +38 -0
  23. data/lib/vagrant-proxmox/action/upload_template_file.rb +38 -0
  24. data/lib/vagrant-proxmox/config.rb +85 -5
  25. data/lib/vagrant-proxmox/errors.rb +22 -2
  26. data/lib/vagrant-proxmox/plugin.rb +0 -14
  27. data/lib/vagrant-proxmox/proxmox/connection.rb +217 -0
  28. data/lib/vagrant-proxmox/proxmox/errors.rb +23 -0
  29. data/lib/vagrant-proxmox/version.rb +1 -1
  30. data/locales/en.yml +29 -2
  31. data/spec/actions/cleanup_after_destroy_action_spec.rb +2 -2
  32. data/spec/actions/connect_proxmox_action_spec.rb +32 -15
  33. data/spec/actions/create_vm_action_spec.rb +155 -130
  34. data/spec/actions/destroy_vm_action_spec.rb +50 -23
  35. data/spec/actions/get_node_list_action_spec.rb +25 -12
  36. data/spec/actions/is_created_action_spec.rb +8 -8
  37. data/spec/actions/is_stopped_action_spec.rb +8 -8
  38. data/spec/actions/message_already_running_action_spec.rb +2 -2
  39. data/spec/actions/message_already_stopped_action_spec.rb +2 -2
  40. data/spec/actions/message_file_not_found_spec.rb +23 -0
  41. data/spec/actions/message_not_created_action_spec.rb +2 -2
  42. data/spec/actions/message_not_running_action_spec.rb +23 -0
  43. data/spec/actions/message_upload_server_error_spec.rb +23 -0
  44. data/spec/actions/proxmox_action_shared.rb +0 -64
  45. data/spec/actions/proxmox_action_spec.rb +57 -0
  46. data/spec/actions/read_ssh_info_action_spec.rb +6 -6
  47. data/spec/actions/read_state_action_spec.rb +36 -34
  48. data/spec/actions/select_node_spec.rb +33 -0
  49. data/spec/actions/shutdown_vm_action_spec.rb +50 -22
  50. data/spec/actions/start_vm_action_spec.rb +87 -33
  51. data/spec/actions/stop_vm_action_spec.rb +50 -23
  52. data/spec/actions/sync_folders_action_spec.rb +9 -9
  53. data/spec/actions/upload_iso_file_action_spec.rb +70 -0
  54. data/spec/actions/upload_template_file_action_spec.rb +70 -0
  55. data/spec/commands/destroy_command_spec.rb +25 -25
  56. data/spec/commands/halt_command_spec.rb +17 -17
  57. data/spec/commands/provision_command_spec.rb +22 -9
  58. data/spec/commands/ssh_command_spec.rb +18 -5
  59. data/spec/commands/ssh_run_command_spec.rb +19 -6
  60. data/spec/commands/status_command_spec.rb +2 -2
  61. data/spec/commands/up_command_spec.rb +174 -34
  62. data/spec/config_spec.rb +325 -46
  63. data/spec/plugin_spec.rb +1 -8
  64. data/spec/provider_spec.rb +4 -4
  65. data/spec/proxmox/connection_spec.rb +662 -0
  66. data/spec/proxmox/rest_call_shared.rb +41 -0
  67. data/spec/sanity_checks_spec.rb +1 -1
  68. data/spec/spec_helper.rb +15 -97
  69. data/spec/spec_helpers/common_helpers.rb +111 -0
  70. data/spec/spec_helpers/time_helpers.rb +90 -0
  71. metadata +161 -45
@@ -0,0 +1,41 @@
1
+ module VagrantPlugins::Proxmox
2
+
3
+ shared_examples 'a rest api call' do |rest_method|
4
+
5
+ context 'when an invalid resource is requested' do
6
+ before { allow(RestClient).to receive(rest_method).and_raise RestClient::NotImplemented }
7
+ it 'should raise a connection error' do
8
+ expect do
9
+ connection.send rest_method, '/invalid_resource'
10
+ end.to raise_error ApiError::NotImplemented
11
+ end
12
+ end
13
+
14
+ context 'when an internal server error occurs' do
15
+ before { allow(RestClient).to receive(rest_method).and_raise RestClient::InternalServerError }
16
+ it 'should raise a server error' do
17
+ expect do
18
+ connection.send rest_method, '/invalid_resource'
19
+ end.to raise_error ApiError::ServerError
20
+ end
21
+ end
22
+
23
+ context 'when a network error occurs' do
24
+ before { allow(RestClient).to receive(rest_method).and_raise SocketError }
25
+ it 'should raise a connection error' do
26
+ expect do
27
+ connection.send rest_method, '/resource'
28
+ end.to raise_error ApiError::ConnectionError
29
+ end
30
+ end
31
+
32
+ context 'when the client is not authorized' do
33
+ before { allow(RestClient).to receive(rest_method).and_raise RestClient::Unauthorized }
34
+ it 'should raise a unauthorized error' do
35
+ expect do
36
+ connection.send rest_method, "/resource"
37
+ end.to raise_error ApiError::UnauthorizedError
38
+ end
39
+ end
40
+ end
41
+ end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe 'Vagrant Proxmox sanity checks' do
4
4
 
5
5
  describe 'when loaded without vagrant installed' do
6
- before { Object.any_instance.stub(:require) { raise LoadError } }
6
+ before { allow_any_instance_of(Object).to receive(:require) { raise LoadError } }
7
7
  it 'should raise an error' do
8
8
  expect { load 'sanity_checks.rb' }.to raise_error
9
9
  end
data/spec/spec_helper.rb CHANGED
@@ -2,8 +2,8 @@ if ENV['RUN_WITH_COVERAGE']
2
2
  require 'simplecov'
3
3
  require 'simplecov-rcov'
4
4
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
- SimpleCov::Formatter::HTMLFormatter,
6
- SimpleCov::Formatter::RcovFormatter,
5
+ SimpleCov::Formatter::HTMLFormatter,
6
+ SimpleCov::Formatter::RcovFormatter,
7
7
  ]
8
8
  SimpleCov.start do
9
9
  add_filter '/dummy_box/Vagrantfile'
@@ -13,21 +13,17 @@ if ENV['RUN_WITH_COVERAGE']
13
13
  end
14
14
 
15
15
  require 'vagrant-proxmox'
16
+ require 'spec_helpers/common_helpers'
16
17
  require 'active_support/core_ext/string'
18
+ require 'spec_helpers/time_helpers'
17
19
 
18
20
  RSpec.configure do |config|
19
- config.treat_symbols_as_metadata_keys_with_true_values = true
20
21
 
21
22
  config.before(:suite) do
22
- begin
23
- Vagrant::Environment.new.boxes.add 'dummy_box/dummy.box', 'dummy', :proxmox
24
- rescue Vagrant::Errors::BoxAlreadyExists
25
-
26
- end
27
- FileUtils.rm_r '.vagrant', force: true
23
+ add_dummy_box
28
24
  end
29
25
  config.after(:suite) do
30
- execute_vagrant_command Vagrant::Environment.new, :box, 'remove', 'dummy'
26
+ remove_dummy_box
31
27
  end
32
28
  config.after(:each) do
33
29
  FileUtils.rm_r '.vagrant', force: true
@@ -36,93 +32,15 @@ RSpec.configure do |config|
36
32
  config.before(:each, :need_box) do
37
33
  up_local_box
38
34
  end
39
- end
40
-
41
35
 
42
- def execute_vagrant_command environment, command, *params
43
- Vagrant.plugin('2').manager.commands[command].new(params, environment).execute
44
36
  end
45
37
 
46
- # If you want expectations on the action_class use something like:
47
- #
48
- # let(:environment) { Vagrant::Environment.new vagrantfile_name: 'dummy_box/Vagrantfile' }
49
- #
50
- # mock_action(VagrantPlugins::Proxmox::Action::ConnectProxmox).tap do |action|
51
- # action.should receive(:perform) {|env| env[:proxmox_ticket] = 'ticket' }
52
- # end
53
- #
54
- def mock_action action_class, env = RSpec::Mocks::Mock.new('env').as_null_object
55
- action_class.new(nil, env).tap do |action_instance|
56
- action_instance_name = "@#{action_class.name.demodulize}Action".underscore
57
- self.instance_variable_set action_instance_name, action_instance
58
-
59
- action_class.stub(:new) do |app, _|
60
- action_instance.instance_variable_set '@app', app
61
- action_instance
62
- end
63
- end
64
- end
65
-
66
- # If you want to stub your actions (stub their call methods), use something like this:
67
- #
68
- # let(:environment) { Vagrant::Environment.new vagrantfile_name: 'dummy_box/Vagrantfile' }
69
- #
70
- # stub_action(Action::ConnectProxmox) { |env| env[:proxmox_ticket] = 'ticket' }
71
- #
72
- def stub_action action_class
73
- mock_action(action_class).tap do |action|
74
- action.stub(:call) do |env|
75
- yield env if block_given?
76
- action.instance_variable_get(:@app).call env
77
- end
78
- end
79
- end
80
-
81
- # If you want to expect your actions to be called (and optionally stub their call methods),
82
- # use something like this:
83
- #
84
- # let(:environment) { Vagrant::Environment.new vagrantfile_name: 'dummy_box/Vagrantfile' }
85
- #
86
- # Action::ConnectProxmox.should be_called { |env| env[:proxmox_ticket] = 'ticket' }
87
- #
88
- class ActionCallMatcher < RSpec::Matchers::BuiltIn::BaseMatcher
89
- def initialize action_stub, environment, example_group, kind=:called
90
- super action_stub
91
- @environment = environment
92
- @example_group = example_group
93
- @kind = kind
94
- end
95
-
96
- def match(action_stub, action_class)
97
- mock_action(action_class).tap do |action|
98
- case @kind
99
- when :called
100
- @example_group.expect(action).to @example_group.receive(:call).at_least(:once) do |env|
101
- action_stub.call(env) if action_stub
102
- action.instance_variable_get(:@app).call env
103
- end
104
- when :ommited
105
- action.should_not_receive :call
106
- end
107
- end
108
- end
109
- end
110
-
111
- def be_called &action_stub
112
- ActionCallMatcher.new action_stub, environment, self, :called
113
- end
114
-
115
- def be_ommited &action_stub
116
- ActionCallMatcher.new action_stub, environment, self, :ommited
117
- end
118
-
119
- def up_local_box
120
- Vagrant::UI::Interface.stub(:new).and_return ui
121
- stub_action(VagrantPlugins::Proxmox::Action::ConnectProxmox)
122
- stub_action(VagrantPlugins::Proxmox::Action::GetNodeList) { |env| env[:proxmox_nodes] = [{node: 'localhost'}] }
123
- stub_action(VagrantPlugins::Proxmox::Action::IsCreated) { |env| env[:result] = false }
124
- stub_action(VagrantPlugins::Proxmox::Action::CreateVm) { |env| env[:machine].id = 'localhost/100' }
125
- stub_action(VagrantPlugins::Proxmox::Action::StartVm)
126
- stub_action(VagrantPlugins::Proxmox::Action::SyncFolders)
127
- execute_vagrant_command environment, :up, '--provider=proxmox'
128
- end
38
+ if ENV['COVERAGE']
39
+ require 'simplecov'
40
+ require 'simplecov-rcov'
41
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
42
+ SimpleCov::Formatter::HTMLFormatter,
43
+ SimpleCov::Formatter::RcovFormatter,
44
+ ]
45
+ SimpleCov.start
46
+ end
@@ -0,0 +1,111 @@
1
+ def be_called &action_stub
2
+ ActionCallMatcher.new action_stub, environment, self, :called
3
+ end
4
+
5
+ def be_omitted &action_stub
6
+ ActionCallMatcher.new action_stub, environment, self, :omitted
7
+ end
8
+
9
+ # If you want to expect your actions to be called (and optionally stub their call methods),
10
+ # use something like this:
11
+ #
12
+ # let(:environment) { Vagrant::Environment.new vagrantfile_name: 'dummy_box/Vagrantfile' }
13
+ #
14
+ # Action::ConnectProxmox.should be_called { |env| env[:proxmox_ticket] = 'ticket' }
15
+ #
16
+ class ActionCallMatcher < RSpec::Matchers::BuiltIn::BaseMatcher
17
+ def initialize action_stub, environment, example_group, kind=:called
18
+ super action_stub
19
+ @environment = environment
20
+ @example_group = example_group
21
+ @kind = kind
22
+ end
23
+
24
+ def match(action_stub, action_class)
25
+ @example_group.send(:mock_action, action_class).tap do |action|
26
+ case @kind
27
+ when :called
28
+ @example_group.expect(action).to @example_group.receive(:call).at_least(:once) do |env|
29
+ action_stub.call(env) if action_stub
30
+ action.instance_variable_get(:@app).call env
31
+ end
32
+ when :omitted
33
+ @example_group.expect(action).not_to @example_group.receive :call
34
+ end
35
+ end
36
+ end
37
+ end
38
+
39
+ # If you want expectations on the action_class use something like:
40
+ #
41
+ # let(:environment) { Vagrant::Environment.new vagrantfile_name: 'dummy_box/Vagrantfile' }
42
+ #
43
+ # mock_action(VagrantPlugins::Proxmox::Action::ConnectProxmox).tap do |action|
44
+ # action.should receive(:perform) {|env| env[:proxmox_ticket] = 'ticket' }
45
+ # end
46
+ #
47
+ def mock_action action_class, env = RSpec::Mocks::Double.new('env').as_null_object
48
+ action_class.new(nil, env).tap do |action_instance|
49
+ action_instance_name = "@#{action_class.name.demodulize}Action".underscore
50
+ self.instance_variable_set action_instance_name, action_instance
51
+ allow(action_class).to receive(:new) do |app, _|
52
+ action_instance.instance_variable_set '@app', app
53
+ action_instance
54
+ end
55
+ end
56
+ end
57
+
58
+ # If you want to stub your actions (stub their call methods), use something like this:
59
+ #
60
+ # let(:environment) { Vagrant::Environment.new vagrantfile_name: 'dummy_box/Vagrantfile' }
61
+ #
62
+ # stub_action(Action::ConnectProxmox) { |env| env[:proxmox_ticket] = 'ticket' }
63
+ #
64
+ def stub_action action_class
65
+ mock_action(action_class).tap do |action|
66
+ allow(action).to receive(:call) do |env|
67
+ yield env if block_given?
68
+ action.instance_variable_get(:@app).call env
69
+ end
70
+ end
71
+ end
72
+
73
+ def unstub_action action_class
74
+ RSpec::Mocks.space.proxy_for(action_class).reset
75
+ end
76
+
77
+ def execute_vagrant_command environment, command, *params
78
+ Vagrant.plugin('2').manager.commands[command].new(params, environment).execute
79
+ end
80
+
81
+ def up_local_box
82
+ allow(Vagrant::UI::Interface).to receive_messages :new => ui
83
+ stub_action(VagrantPlugins::Proxmox::Action::ConnectProxmox)
84
+ stub_action(VagrantPlugins::Proxmox::Action::GetNodeList) { |env| env[:proxmox_nodes] = [{node: 'node1'}] }
85
+ stub_action(VagrantPlugins::Proxmox::Action::IsCreated) { |env| env[:result] = false }
86
+ stub_action(VagrantPlugins::Proxmox::Action::CreateVm) { |env| env[:machine].id = 'node1/100' }
87
+ stub_action(VagrantPlugins::Proxmox::Action::StartVm)
88
+ stub_action(VagrantPlugins::Proxmox::Action::SyncFolders)
89
+ execute_vagrant_command environment, :up, '--provider=proxmox'
90
+ unstub_action(VagrantPlugins::Proxmox::Action::ConnectProxmox)
91
+ unstub_action(VagrantPlugins::Proxmox::Action::GetNodeList)
92
+ unstub_action(VagrantPlugins::Proxmox::Action::IsCreated)
93
+ unstub_action(VagrantPlugins::Proxmox::Action::CreateVm)
94
+ unstub_action(VagrantPlugins::Proxmox::Action::StartVm)
95
+ unstub_action(VagrantPlugins::Proxmox::Action::SyncFolders)
96
+ end
97
+
98
+ def proxmox_api_url path
99
+ "https://proxmox.example.com/api2/json/#{path}"
100
+ end
101
+
102
+ def add_dummy_box
103
+ begin
104
+ Vagrant::Environment.new.boxes.add 'dummy_box/dummy.box', 'b681e2bc-617b-4b35-94fa-edc92e1071b8', :proxmox
105
+ rescue Vagrant::Errors::BoxAlreadyExists
106
+ end
107
+ end
108
+
109
+ def remove_dummy_box
110
+ execute_vagrant_command Vagrant::Environment.new, :box, 'remove', 'b681e2bc-617b-4b35-94fa-edc92e1071b8'
111
+ end
@@ -0,0 +1,90 @@
1
+ require 'timecop'
2
+
3
+ class Fixnum
4
+
5
+ def self.time_interval_converter unit, factor
6
+ define_method(unit) do
7
+ TimeInterval.new self * factor, factor, unit
8
+ end
9
+ end
10
+
11
+ time_interval_converter :second, 1
12
+ time_interval_converter :seconds, 1
13
+ time_interval_converter :minute, 60
14
+ time_interval_converter :minutes, 60
15
+ time_interval_converter :hour, 3600
16
+ time_interval_converter :hours, 3600
17
+ time_interval_converter :day, 86400
18
+ time_interval_converter :days, 86400
19
+
20
+ end
21
+
22
+ class TimeInterval
23
+
24
+ attr_reader :unit
25
+ attr_reader :factor
26
+
27
+ def initialize value, factor, unit
28
+ @value = value.to_i
29
+ @factor = factor
30
+ @unit = unit
31
+ end
32
+
33
+ def clone_with_value value
34
+ TimeInterval.new value, @factor, @unit
35
+ end
36
+
37
+ def inspect
38
+ to_s
39
+ end
40
+
41
+ def to_s
42
+ ("%.2f #{@unit}" % (in_units)).sub /\.00/, ''
43
+ end
44
+
45
+ def in_seconds
46
+ @value
47
+ end
48
+
49
+ def in_units
50
+ @value.to_f / @factor
51
+ end
52
+
53
+ def < other
54
+ in_seconds < other.in_seconds
55
+ end
56
+
57
+ end
58
+
59
+ class Timecop
60
+
61
+ class << self
62
+
63
+ alias :old_freeze :freeze
64
+
65
+ def freeze *args, &block
66
+ args << Time.local(5555) if args.empty?
67
+ @frozen_time = args[0]
68
+ old_freeze *args, &block
69
+ end
70
+
71
+ def frozen_time
72
+ @frozen_time
73
+ end
74
+
75
+ def has_travelled? interval
76
+ @frozen_time.to_i + interval.in_seconds == Time.now.to_i
77
+ end
78
+
79
+ end
80
+ end
81
+
82
+ RSpec::Matchers.define :have_elapsed do |expected|
83
+ match do
84
+ Timecop.has_travelled? expected
85
+ end
86
+ failure_message do
87
+ result = expected.clone_with_value Time.now - Timecop.frozen_time
88
+ "expected current time to be #{expected} later, but #{result < expected ? 'only' : 'already'} #{result} elapsed"
89
+ end
90
+ end
metadata CHANGED
@@ -1,132 +1,218 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-proxmox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dirk Grappendorf
8
8
  - Tim Völpel
9
+ - Sebastian Bremicker
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-02-11 00:00:00.000000000 Z
13
+ date: 2014-09-15 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rest-client
16
17
  requirement: !ruby/object:Gem::Requirement
17
18
  requirements:
18
- - - ~>
19
+ - - "~>"
19
20
  - !ruby/object:Gem::Version
20
21
  version: 1.6.7
21
22
  type: :runtime
22
23
  prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
- - - ~>
26
+ - - "~>"
26
27
  - !ruby/object:Gem::Version
27
28
  version: 1.6.7
28
29
  - !ruby/object:Gem::Dependency
29
30
  name: retryable
30
31
  requirement: !ruby/object:Gem::Requirement
31
32
  requirements:
32
- - - ~>
33
+ - - "~>"
33
34
  - !ruby/object:Gem::Version
34
35
  version: 1.3.3
35
36
  type: :runtime
36
37
  prerelease: false
37
38
  version_requirements: !ruby/object:Gem::Requirement
38
39
  requirements:
39
- - - ~>
40
+ - - "~>"
40
41
  - !ruby/object:Gem::Version
41
42
  version: 1.3.3
42
43
  - !ruby/object:Gem::Dependency
43
44
  name: activesupport
44
45
  requirement: !ruby/object:Gem::Requirement
45
46
  requirements:
46
- - - ~>
47
+ - - "~>"
47
48
  - !ruby/object:Gem::Version
48
49
  version: 4.0.0
49
50
  type: :runtime
50
51
  prerelease: false
51
52
  version_requirements: !ruby/object:Gem::Requirement
52
53
  requirements:
53
- - - ~>
54
+ - - "~>"
54
55
  - !ruby/object:Gem::Version
55
56
  version: 4.0.0
56
57
  - !ruby/object:Gem::Dependency
57
58
  name: rake
58
59
  requirement: !ruby/object:Gem::Requirement
59
60
  requirements:
60
- - - '>='
61
+ - - ">="
61
62
  - !ruby/object:Gem::Version
62
63
  version: '0'
63
64
  type: :development
64
65
  prerelease: false
65
66
  version_requirements: !ruby/object:Gem::Requirement
66
67
  requirements:
67
- - - '>='
68
+ - - ">="
68
69
  - !ruby/object:Gem::Version
69
70
  version: '0'
70
71
  - !ruby/object:Gem::Dependency
71
72
  name: rspec
72
73
  requirement: !ruby/object:Gem::Requirement
73
74
  requirements:
74
- - - ~>
75
+ - - "~>"
75
76
  - !ruby/object:Gem::Version
76
- version: 2.14.0
77
+ version: 3.0.0
77
78
  type: :development
78
79
  prerelease: false
79
80
  version_requirements: !ruby/object:Gem::Requirement
80
81
  requirements:
81
- - - ~>
82
+ - - "~>"
82
83
  - !ruby/object:Gem::Version
83
- version: 2.14.0
84
+ version: 3.0.0
84
85
  - !ruby/object:Gem::Dependency
85
86
  name: simplecov
86
87
  requirement: !ruby/object:Gem::Requirement
87
88
  requirements:
88
- - - ~>
89
+ - - "~>"
89
90
  - !ruby/object:Gem::Version
90
- version: 0.7.1
91
+ version: 0.9.0
91
92
  type: :development
92
93
  prerelease: false
93
94
  version_requirements: !ruby/object:Gem::Requirement
94
95
  requirements:
95
- - - ~>
96
+ - - "~>"
96
97
  - !ruby/object:Gem::Version
97
- version: 0.7.1
98
+ version: 0.9.0
98
99
  - !ruby/object:Gem::Dependency
99
100
  name: simplecov-rcov
100
101
  requirement: !ruby/object:Gem::Requirement
101
102
  requirements:
102
- - - ~>
103
+ - - "~>"
103
104
  - !ruby/object:Gem::Version
104
105
  version: 0.2.3
105
106
  type: :development
106
107
  prerelease: false
107
108
  version_requirements: !ruby/object:Gem::Requirement
108
109
  requirements:
109
- - - ~>
110
+ - - "~>"
110
111
  - !ruby/object:Gem::Version
111
112
  version: 0.2.3
112
113
  - !ruby/object:Gem::Dependency
113
114
  name: geminabox
114
115
  requirement: !ruby/object:Gem::Requirement
115
116
  requirements:
116
- - - ~>
117
+ - - "~>"
117
118
  - !ruby/object:Gem::Version
118
119
  version: 0.11.1
119
120
  type: :development
120
121
  prerelease: false
121
122
  version_requirements: !ruby/object:Gem::Requirement
122
123
  requirements:
123
- - - ~>
124
+ - - "~>"
124
125
  - !ruby/object:Gem::Version
125
126
  version: 0.11.1
127
+ - !ruby/object:Gem::Dependency
128
+ name: guard-rspec
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - '='
132
+ - !ruby/object:Gem::Version
133
+ version: 4.2.10
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - '='
139
+ - !ruby/object:Gem::Version
140
+ version: 4.2.10
141
+ - !ruby/object:Gem::Dependency
142
+ name: libnotify
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: 0.8.3
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: 0.8.3
155
+ - !ruby/object:Gem::Dependency
156
+ name: timecop
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: 0.7.1
162
+ type: :development
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - "~>"
167
+ - !ruby/object:Gem::Version
168
+ version: 0.7.1
169
+ - !ruby/object:Gem::Dependency
170
+ name: cucumber
171
+ requirement: !ruby/object:Gem::Requirement
172
+ requirements:
173
+ - - "~>"
174
+ - !ruby/object:Gem::Version
175
+ version: 1.3.15
176
+ type: :development
177
+ prerelease: false
178
+ version_requirements: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - "~>"
181
+ - !ruby/object:Gem::Version
182
+ version: 1.3.15
183
+ - !ruby/object:Gem::Dependency
184
+ name: webmock
185
+ requirement: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: 1.18.0
190
+ type: :development
191
+ prerelease: false
192
+ version_requirements: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - "~>"
195
+ - !ruby/object:Gem::Version
196
+ version: 1.18.0
197
+ - !ruby/object:Gem::Dependency
198
+ name: awesome_print
199
+ requirement: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - "~>"
202
+ - !ruby/object:Gem::Version
203
+ version: 1.2.0
204
+ type: :development
205
+ prerelease: false
206
+ version_requirements: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - "~>"
209
+ - !ruby/object:Gem::Version
210
+ version: 1.2.0
126
211
  description: Enables Vagrant to manage virtual machines on a Proxmox server.
127
212
  email:
128
213
  - dirk.grappendorf@telcat.de
129
214
  - tim.voelpel@telcat.de
215
+ - sebastian.bremicker@telcat.de
130
216
  executables: []
131
217
  extensions: []
132
218
  extra_rdoc_files: []
@@ -143,18 +229,26 @@ files:
143
229
  - lib/vagrant-proxmox/action/is_stopped.rb
144
230
  - lib/vagrant-proxmox/action/message_already_running.rb
145
231
  - lib/vagrant-proxmox/action/message_already_stopped.rb
232
+ - lib/vagrant-proxmox/action/message_file_not_found.rb
146
233
  - lib/vagrant-proxmox/action/message_not_created.rb
234
+ - lib/vagrant-proxmox/action/message_not_running.rb
235
+ - lib/vagrant-proxmox/action/message_upload_server_error.rb
147
236
  - lib/vagrant-proxmox/action/proxmox_action.rb
148
237
  - lib/vagrant-proxmox/action/read_ssh_info.rb
149
238
  - lib/vagrant-proxmox/action/read_state.rb
239
+ - lib/vagrant-proxmox/action/select_node.rb
150
240
  - lib/vagrant-proxmox/action/shutdown_vm.rb
151
241
  - lib/vagrant-proxmox/action/start_vm.rb
152
242
  - lib/vagrant-proxmox/action/stop_vm.rb
153
243
  - lib/vagrant-proxmox/action/sync_folders.rb
244
+ - lib/vagrant-proxmox/action/upload_iso_file.rb
245
+ - lib/vagrant-proxmox/action/upload_template_file.rb
154
246
  - lib/vagrant-proxmox/config.rb
155
247
  - lib/vagrant-proxmox/errors.rb
156
248
  - lib/vagrant-proxmox/plugin.rb
157
249
  - lib/vagrant-proxmox/provider.rb
250
+ - lib/vagrant-proxmox/proxmox/connection.rb
251
+ - lib/vagrant-proxmox/proxmox/errors.rb
158
252
  - lib/vagrant-proxmox/version.rb
159
253
  - locales/en.yml
160
254
  - spec/actions/cleanup_after_destroy_action_spec.rb
@@ -166,14 +260,21 @@ files:
166
260
  - spec/actions/is_stopped_action_spec.rb
167
261
  - spec/actions/message_already_running_action_spec.rb
168
262
  - spec/actions/message_already_stopped_action_spec.rb
263
+ - spec/actions/message_file_not_found_spec.rb
169
264
  - spec/actions/message_not_created_action_spec.rb
265
+ - spec/actions/message_not_running_action_spec.rb
266
+ - spec/actions/message_upload_server_error_spec.rb
170
267
  - spec/actions/proxmox_action_shared.rb
268
+ - spec/actions/proxmox_action_spec.rb
171
269
  - spec/actions/read_ssh_info_action_spec.rb
172
270
  - spec/actions/read_state_action_spec.rb
271
+ - spec/actions/select_node_spec.rb
173
272
  - spec/actions/shutdown_vm_action_spec.rb
174
273
  - spec/actions/start_vm_action_spec.rb
175
274
  - spec/actions/stop_vm_action_spec.rb
176
275
  - spec/actions/sync_folders_action_spec.rb
276
+ - spec/actions/upload_iso_file_action_spec.rb
277
+ - spec/actions/upload_template_file_action_spec.rb
177
278
  - spec/commands/destroy_command_spec.rb
178
279
  - spec/commands/halt_command_spec.rb
179
280
  - spec/commands/provision_command_spec.rb
@@ -184,8 +285,12 @@ files:
184
285
  - spec/config_spec.rb
185
286
  - spec/plugin_spec.rb
186
287
  - spec/provider_spec.rb
288
+ - spec/proxmox/connection_spec.rb
289
+ - spec/proxmox/rest_call_shared.rb
187
290
  - spec/sanity_checks_spec.rb
188
291
  - spec/spec_helper.rb
292
+ - spec/spec_helpers/common_helpers.rb
293
+ - spec/spec_helpers/time_helpers.rb
189
294
  homepage: https://github.com/telcat/vagrant-proxmox
190
295
  licenses:
191
296
  - MIT
@@ -196,47 +301,58 @@ require_paths:
196
301
  - lib
197
302
  required_ruby_version: !ruby/object:Gem::Requirement
198
303
  requirements:
199
- - - '>='
304
+ - - ">="
200
305
  - !ruby/object:Gem::Version
201
306
  version: '0'
202
307
  required_rubygems_version: !ruby/object:Gem::Requirement
203
308
  requirements:
204
- - - '>='
309
+ - - ">="
205
310
  - !ruby/object:Gem::Version
206
311
  version: '0'
207
312
  requirements: []
208
313
  rubyforge_project:
209
- rubygems_version: 2.2.0
314
+ rubygems_version: 2.2.2
210
315
  signing_key:
211
316
  specification_version: 4
212
317
  summary: Enables Vagrant to manage virtual machines on a Proxmox server.
213
318
  test_files:
214
- - spec/spec_helper.rb
215
- - spec/actions/sync_folders_action_spec.rb
216
- - spec/actions/shutdown_vm_action_spec.rb
217
- - spec/actions/read_ssh_info_action_spec.rb
319
+ - spec/config_spec.rb
320
+ - spec/commands/halt_command_spec.rb
321
+ - spec/commands/up_command_spec.rb
322
+ - spec/commands/destroy_command_spec.rb
323
+ - spec/commands/ssh_run_command_spec.rb
324
+ - spec/commands/provision_command_spec.rb
325
+ - spec/commands/status_command_spec.rb
326
+ - spec/commands/ssh_command_spec.rb
218
327
  - spec/actions/create_vm_action_spec.rb
328
+ - spec/actions/get_node_list_action_spec.rb
329
+ - spec/actions/message_file_not_found_spec.rb
330
+ - spec/actions/read_ssh_info_action_spec.rb
219
331
  - spec/actions/is_stopped_action_spec.rb
220
- - spec/actions/connect_proxmox_action_spec.rb
221
- - spec/actions/proxmox_action_shared.rb
222
- - spec/actions/cleanup_after_destroy_action_spec.rb
223
- - spec/actions/message_already_stopped_action_spec.rb
224
332
  - spec/actions/is_created_action_spec.rb
225
- - spec/actions/read_state_action_spec.rb
333
+ - spec/actions/cleanup_after_destroy_action_spec.rb
334
+ - spec/actions/message_not_running_action_spec.rb
226
335
  - spec/actions/start_vm_action_spec.rb
227
- - spec/actions/get_node_list_action_spec.rb
228
- - spec/actions/message_not_created_action_spec.rb
336
+ - spec/actions/shutdown_vm_action_spec.rb
229
337
  - spec/actions/stop_vm_action_spec.rb
338
+ - spec/actions/message_already_stopped_action_spec.rb
339
+ - spec/actions/upload_iso_file_action_spec.rb
230
340
  - spec/actions/message_already_running_action_spec.rb
341
+ - spec/actions/upload_template_file_action_spec.rb
342
+ - spec/actions/connect_proxmox_action_spec.rb
231
343
  - spec/actions/destroy_vm_action_spec.rb
232
- - spec/sanity_checks_spec.rb
344
+ - spec/actions/proxmox_action_shared.rb
345
+ - spec/actions/sync_folders_action_spec.rb
346
+ - spec/actions/select_node_spec.rb
347
+ - spec/actions/message_upload_server_error_spec.rb
348
+ - spec/actions/proxmox_action_spec.rb
349
+ - spec/actions/read_state_action_spec.rb
350
+ - spec/actions/message_not_created_action_spec.rb
233
351
  - spec/provider_spec.rb
234
352
  - spec/plugin_spec.rb
235
- - spec/commands/ssh_run_command_spec.rb
236
- - spec/commands/destroy_command_spec.rb
237
- - spec/commands/status_command_spec.rb
238
- - spec/commands/up_command_spec.rb
239
- - spec/commands/ssh_command_spec.rb
240
- - spec/commands/halt_command_spec.rb
241
- - spec/commands/provision_command_spec.rb
242
- - spec/config_spec.rb
353
+ - spec/sanity_checks_spec.rb
354
+ - spec/proxmox/rest_call_shared.rb
355
+ - spec/proxmox/connection_spec.rb
356
+ - spec/spec_helper.rb
357
+ - spec/spec_helpers/time_helpers.rb
358
+ - spec/spec_helpers/common_helpers.rb