kitchen-hyperv 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4943e1bf989d84e45049694dfa9fcabae748992
4
- data.tar.gz: 6c57a1373e0f713974be0917dbc4a2b3b21c6304
3
+ metadata.gz: a1487a387bfe733bc51dbb0e2e791df21f3cbba4
4
+ data.tar.gz: 7bccbbc392b003eb4e829b53244c8bc5669384bf
5
5
  SHA512:
6
- metadata.gz: 09a93312d25a48bfa8b7601ef1f80b280950b4dc3f5d102f2ea8e3945ebbad46f9a105b847289697e07f447ce04d1ba8cde6cc34b08118f215ca4a4ee15bf9be
7
- data.tar.gz: 3eb72a618d78f698d7bffd24db39b91f6343a1d82a540e2026f6d5ba9e9a6bf06d6eb050cdc4b91232956eaf0f26afa34990fb1a9aa8a851b40b92d9798924b7
6
+ metadata.gz: a966a187860dfb50208b282938aac5193300e8410b56faa5cf97caedbd9eda08c8a846b24d4a7f0a6b55da87cc27c12ce24c6c7bbdcbaf85053d7b96f61bf3ad
7
+ data.tar.gz: c7717e133cabc5a5852b5bbf5d9963b71059d25574c404554bccc17c5e4069b1d7fbbb97f8a0ae9da9396645cc38a01d7985a12dbc4cc4ed4bbafabb4e848f38
data/.cane CHANGED
@@ -1,2 +1,2 @@
1
- --no-doc
1
+ --no-doc
2
2
  --style-measure 100
data/.gitignore CHANGED
@@ -1,15 +1,15 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
15
- *.gem
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ *.gem
@@ -1,11 +1,27 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.3.0](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.3.0) (2016-11-28)
4
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.2.3...v0.3.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Support setting VM notes [\#39](https://github.com/test-kitchen/kitchen-hyperv/pull/39) ([watsonlu](https://github.com/watsonlu))
9
+ - Fix mounting iso on Gen 2 VM [\#38](https://github.com/test-kitchen/kitchen-hyperv/pull/38) ([mahsoud](https://github.com/mahsoud))
10
+ - Adding support for HyperV Guest Interface Services [\#34](https://github.com/test-kitchen/kitchen-hyperv/pull/34) ([gaelcolas](https://github.com/gaelcolas))
11
+ - Fix line continuation syntax [\#32](https://github.com/test-kitchen/kitchen-hyperv/pull/32) ([brantb](https://github.com/brantb))
12
+
13
+ ## [v0.2.3](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.3) (2016-06-10)
14
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.2.2...v0.2.3)
15
+
16
+ **Merged pull requests:**
17
+
18
+ - Support PowerShell v5.1 on the Insider Preview - updated [\#31](https://github.com/test-kitchen/kitchen-hyperv/pull/31) ([smurawski](https://github.com/smurawski))
19
+
3
20
  ## [v0.2.2](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.2) (2016-06-10)
4
21
  [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.2.1...v0.2.2)
5
22
 
6
23
  **Merged pull requests:**
7
24
 
8
- - Support PowerShell v5.1 on the Insider Preview - updated [\#31](https://github.com/test-kitchen/kitchen-hyperv/pull/31) ([smurawski](https://github.com/smurawski))
9
25
  - Support PowerShell v5.1 on the Insider Preview [\#30](https://github.com/test-kitchen/kitchen-hyperv/pull/30) ([smurawski](https://github.com/smurawski))
10
26
 
11
27
  ## [v0.2.1](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.1) (2016-05-25)
data/Gemfile CHANGED
@@ -1,15 +1,15 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in kitchen-hyperv.gemspec
4
- gemspec
5
-
6
- gem 'win32-process'
7
- gem 'win32-api'
8
- gem 'windows-pr'
9
- gem 'windows-api'
10
- gem 'ffi'
11
- gem 'rb-readline'
12
- gem 'pry'
13
- gem 'pry-stack_explorer'
14
- gem 'pry-byebug'
15
- gem 'github_changelog_generator'
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in kitchen-hyperv.gemspec
4
+ gemspec
5
+
6
+ gem 'win32-process'
7
+ gem 'win32-api'
8
+ gem 'windows-pr'
9
+ gem 'windows-api'
10
+ gem 'ffi'
11
+ gem 'rb-readline'
12
+ gem 'pry'
13
+ gem 'pry-stack_explorer'
14
+ gem 'pry-byebug'
15
+ gem 'github_changelog_generator'
@@ -1,22 +1,22 @@
1
- Copyright (c) 2015 Steven Murawski
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2015 Steven Murawski
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -53,8 +53,12 @@ driver:
53
53
  * Path on the host to the ISO to mount before starting the VMs.
54
54
  * vm_generation
55
55
  * The generation for the hyper-v VM. Defaults to 1.
56
+ * enable_guest_services
57
+ * Enable the Hyper-V Integration Guest services for the VM before starting it. Hyper-V defauls is false (true|false)
56
58
  * disk_type
57
59
  * The type of virtual disk to create, .VHD or .VHDX. Defaults to the file extension of the parent virtual hard drive.
60
+ * vm_note
61
+ * A note to add to the VM's note field. Defaults to empty.
58
62
 
59
63
  ## Image Configuration
60
64
 
data/Rakefile CHANGED
@@ -1,68 +1,68 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- require "bundler/gem_tasks"
4
- require "kitchen/driver/hyperv_version"
5
-
6
- require "rake/testtask"
7
- Rake::TestTask.new(:unit) do |t|
8
- t.libs.push "lib"
9
- t.test_files = FileList["spec/**/*_spec.rb"]
10
- t.verbose = true
11
- end
12
-
13
- desc "Run all test suites"
14
- task :test => [:unit]
15
-
16
- desc "Display LOC stats"
17
- task :stats do
18
- puts "\n## Production Code Stats"
19
- sh "countloc -r lib"
20
- puts "\n## Test Code Stats"
21
- sh "countloc -r spec"
22
- end
23
-
24
- require "finstyle"
25
- require "rubocop/rake_task"
26
- RuboCop::RakeTask.new(:style) do |task|
27
- task.options << "--display-cop-names"
28
- task.options << "--lint"
29
- task.options << '--config' << '.rubocop.yml'
30
- task.patterns = ['lib/**/*.rb']
31
- end
32
-
33
- require "cane/rake_task"
34
- desc "Run cane to check quality metrics"
35
- Cane::RakeTask.new do |cane|
36
- cane.canefile = "./.cane"
37
- end
38
-
39
- desc "Run all quality tasks"
40
- task :quality => [:cane, :style, :stats]
41
-
42
- require "yard"
43
- YARD::Rake::YardocTask.new
44
-
45
- desc "Generate gem dependency graph"
46
- task :viz do
47
- Bundler.with_clean_env do
48
- sh "bundle viz --without test development guard " \
49
- "--requirements --version"
50
- end
51
- end
52
-
53
- task :default => [:test, :quality]
54
-
55
- begin
56
- require "github_changelog_generator/task"
57
-
58
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
59
- config.future_release = "v#{Kitchen::Driver::HYPERV_VERSION}"
60
- config.issues = false
61
- config.pulls = true
62
- config.user = 'test-kitchen'
63
- config.project = 'kitchen-hyperv'
64
- end
65
- rescue LoadError
66
- puts "github_changelog_generator is not available. " \
67
- "gem install github_changelog_generator to generate changelogs"
68
- end
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require "bundler/gem_tasks"
4
+ require "kitchen/driver/hyperv_version"
5
+
6
+ require "rake/testtask"
7
+ Rake::TestTask.new(:unit) do |t|
8
+ t.libs.push "lib"
9
+ t.test_files = FileList["spec/**/*_spec.rb"]
10
+ t.verbose = true
11
+ end
12
+
13
+ desc "Run all test suites"
14
+ task :test => [:unit]
15
+
16
+ desc "Display LOC stats"
17
+ task :stats do
18
+ puts "\n## Production Code Stats"
19
+ sh "countloc -r lib"
20
+ puts "\n## Test Code Stats"
21
+ sh "countloc -r spec"
22
+ end
23
+
24
+ require "finstyle"
25
+ require "rubocop/rake_task"
26
+ RuboCop::RakeTask.new(:style) do |task|
27
+ task.options << "--display-cop-names"
28
+ task.options << "--lint"
29
+ task.options << '--config' << '.rubocop.yml'
30
+ task.patterns = ['lib/**/*.rb']
31
+ end
32
+
33
+ require "cane/rake_task"
34
+ desc "Run cane to check quality metrics"
35
+ Cane::RakeTask.new do |cane|
36
+ cane.canefile = "./.cane"
37
+ end
38
+
39
+ desc "Run all quality tasks"
40
+ task :quality => [:cane, :style, :stats]
41
+
42
+ require "yard"
43
+ YARD::Rake::YardocTask.new
44
+
45
+ desc "Generate gem dependency graph"
46
+ task :viz do
47
+ Bundler.with_clean_env do
48
+ sh "bundle viz --without test development guard " \
49
+ "--requirements --version"
50
+ end
51
+ end
52
+
53
+ task :default => [:test, :quality]
54
+
55
+ begin
56
+ require "github_changelog_generator/task"
57
+
58
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
59
+ config.future_release = "v#{Kitchen::Driver::HYPERV_VERSION}"
60
+ config.issues = false
61
+ config.pulls = true
62
+ config.user = 'test-kitchen'
63
+ config.project = 'kitchen-hyperv'
64
+ end
65
+ rescue LoadError
66
+ puts "github_changelog_generator is not available. " \
67
+ "gem install github_changelog_generator to generate changelogs"
68
+ end
@@ -1,32 +1,32 @@
1
- # encoding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
-
5
- require 'kitchen/driver/hyperv_version'
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "kitchen-hyperv"
9
- spec.version = Kitchen::Driver::HYPERV_VERSION
10
- spec.authors = ["Steven Murawski"]
11
- spec.email = ["steven.murawski@gmail.com"]
12
- spec.summary = 'Hyper-V Driver for Test-Kitchen'
13
- spec.description = 'Hyper-V Driver for Test-Kitchen'
14
- spec.homepage = "https://github.com/test-kitchen/kitchen-hyperv"
15
- spec.license = "Apache 2"
16
-
17
- spec.files = `git ls-files -z`.split("\x0")
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ["lib"]
21
-
22
- spec.add_development_dependency "bundler", "~> 1.7"
23
- spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "pry", "~> 0.10"
25
- spec.add_development_dependency "cane"
26
- spec.add_development_dependency "finstyle"
27
- spec.add_development_dependency "rubocop"
28
- spec.add_development_dependency "yard"
29
- spec.add_development_dependency "countloc"
30
-
31
- spec.add_dependency "test-kitchen", "~> 1.4"
32
- end
1
+ # encoding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'kitchen/driver/hyperv_version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "kitchen-hyperv"
9
+ spec.version = Kitchen::Driver::HYPERV_VERSION
10
+ spec.authors = ["Steven Murawski"]
11
+ spec.email = ["steven.murawski@gmail.com"]
12
+ spec.summary = 'Hyper-V Driver for Test-Kitchen'
13
+ spec.description = 'Hyper-V Driver for Test-Kitchen'
14
+ spec.homepage = "https://github.com/test-kitchen/kitchen-hyperv"
15
+ spec.license = "Apache 2"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0")
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.7"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "pry", "~> 0.10"
25
+ spec.add_development_dependency "cane"
26
+ spec.add_development_dependency "finstyle"
27
+ spec.add_development_dependency "rubocop"
28
+ spec.add_development_dependency "yard"
29
+ spec.add_development_dependency "countloc"
30
+
31
+ spec.add_dependency "test-kitchen", "~> 1.4"
32
+ end
@@ -48,6 +48,8 @@ module Kitchen
48
48
  default_config :vm_switch
49
49
  default_config :iso_path
50
50
  default_config :boot_iso_path
51
+ default_config :enable_guest_services
52
+ default_config :vm_note
51
53
  default_config :vm_generation, 1
52
54
  default_config :disk_type do |driver|
53
55
  File.extname(driver[:parent_vhd_name])
@@ -60,6 +62,7 @@ module Kitchen
60
62
  validate_vm_settings
61
63
  create_new_differencing_disk
62
64
  create_virtual_machine
65
+ set_virtual_machine_note
63
66
  update_state
64
67
  mount_virtual_machine_iso
65
68
  instance.transport.connection(@state).wait_until_ready
@@ -87,9 +90,9 @@ module Kitchen
87
90
  min = config[:dynamic_memory_min_bytes]
88
91
  max = config[:dynamic_memory_max_bytes]
89
92
  memory_valid = startup_bytes.between?(min, max)
90
- warning = "memory_startup_bytes (#{startup_bytes}) must" /
93
+ warning = "memory_startup_bytes (#{startup_bytes}) must" \
91
94
  " fall within dynamic memory range (#{min}-#{max})"
92
- raise warning unless memory_valid
95
+ raise warning unless memory_valid
93
96
  end
94
97
  config[:vm_switch] = vm_switch
95
98
  end
@@ -135,6 +138,12 @@ module Kitchen
135
138
  return unless config[:iso_path]
136
139
  info("Mounting #{config[:iso_path]}")
137
140
  run_ps mount_vm_iso
141
+ info("Done mounting #{config[:iso_path]}")
142
+ end
143
+ def set_virtual_machine_note
144
+ return unless config[:vm_note]
145
+ info("Adding note to VM: '#{config[:vm_note]}'")
146
+ run_ps set_vm_note
138
147
  end
139
148
 
140
149
  def copy_vm_files
@@ -190,20 +199,6 @@ module Kitchen
190
199
  def vhd?
191
200
  config[:parent_vhd_name] && File.exist?(parent_vhd_path)
192
201
  end
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
202
  end
208
203
  end
209
204
  end
@@ -1,22 +1,22 @@
1
- #
2
- # Author:: Steven Murawski <smurawski@chef.io>
3
- # Copyright:: Copyright (c) 2015 Chef Software, Inc.
4
- # License:: Apache License, Version 2.0
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
-
18
- module Kitchen
19
- module Driver
20
- HYPERV_VERSION = '0.2.3'.freeze
21
- end
22
- end
1
+ #
2
+ # Author:: Steven Murawski <smurawski@chef.io>
3
+ # Copyright:: Copyright (c) 2015 Chef Software, Inc.
4
+ # License:: Apache License, Version 2.0
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+
18
+ module Kitchen
19
+ module Driver
20
+ HYPERV_VERSION = '0.3.0'.freeze
21
+ end
22
+ end