kitchen-hyperv 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e919e00b790582d9fcb8f8ec5d82107d3c78678
4
- data.tar.gz: 4c37d0721342ce5c3a6cbf130b1f01e478c3c960
3
+ metadata.gz: f38aa0c96d1a11f6550fca5b6d5495208eda6ddd
4
+ data.tar.gz: 90d19dc17e48f18e170355f17b9db13055add317
5
5
  SHA512:
6
- metadata.gz: 6121d3bdd601993baa94ed9f42545c7044527e4f8a6483ba60c9c4a422aa6bf1acfa6250ae4f4ade938d43a20c62f091102291989d39b1fd49d4f5dfd134cb9b
7
- data.tar.gz: 3624ac9206839cec7ada2f8e6c97404773563e6e71e36cf395678ae9acba844ff8dc8733b8dff1ee640a6d8f57d1021865508d0b9a12fd4f676e661ce0e84552
6
+ metadata.gz: b9338c50b2927f9604bdacbdf2567d9924c8988e05af5f72548b8747b9c10b8b77304aa13a3a94b2a934acf52cb0171972a809b6f98588eaf8701b2a12fbf406
7
+ data.tar.gz: 1b2169fa0f88fea07cd9e8ace57de159a2e31f15585cfc49024eabe5966ddcf27625b275789cc2f42b9ea366642ceb4ee912332e99c62c10e1c08fb561d55407
@@ -1,93 +1,118 @@
1
- # Change Log
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
-
20
- ## [v0.2.2](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.2) (2016-06-10)
21
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.2.1...v0.2.2)
22
-
23
- **Merged pull requests:**
24
-
25
- - Support PowerShell v5.1 on the Insider Preview [\#30](https://github.com/test-kitchen/kitchen-hyperv/pull/30) ([smurawski](https://github.com/smurawski))
26
-
27
- ## [v0.2.1](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.1) (2016-05-25)
28
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.20...v0.2.1)
29
-
30
- ## [v0.1.20](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.20) (2016-05-17)
31
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.10...v0.1.20)
32
-
33
- **Merged pull requests:**
34
-
35
- - More Configurable VM Networking [\#27](https://github.com/test-kitchen/kitchen-hyperv/pull/27) ([svmastersamurai](https://github.com/svmastersamurai))
36
- - Add -noprofile to powershell executions to prevent users' custom prof… [\#23](https://github.com/test-kitchen/kitchen-hyperv/pull/23) ([kriszentner](https://github.com/kriszentner))
37
-
38
- ## [v0.1.10](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.10) (2015-12-03)
39
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.9...v0.1.10)
40
-
41
- **Merged pull requests:**
42
-
43
- - update incorrect module name [\#21](https://github.com/test-kitchen/kitchen-hyperv/pull/21) ([jbruettcva](https://github.com/jbruettcva))
44
-
45
- ## [v0.1.9](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.9) (2015-12-03)
46
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.8...v0.1.9)
47
-
48
- ## [v0.1.8](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.8) (2015-12-03)
49
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.7...v0.1.8)
50
-
51
- **Merged pull requests:**
52
-
53
- - Updating readme.md to include image configuration, specifically winrm… [\#20](https://github.com/test-kitchen/kitchen-hyperv/pull/20) ([jbruettcva](https://github.com/jbruettcva))
54
- - Hyper-V module and Get-VMIP delay fix [\#19](https://github.com/test-kitchen/kitchen-hyperv/pull/19) ([jbruettcva](https://github.com/jbruettcva))
55
- - File copy feature [\#17](https://github.com/test-kitchen/kitchen-hyperv/pull/17) ([dpiessens](https://github.com/dpiessens))
56
- - Fixed NilClass exception if VM does not exist [\#16](https://github.com/test-kitchen/kitchen-hyperv/pull/16) ([dpiessens](https://github.com/dpiessens))
57
- - Add support for dynamic memory [\#15](https://github.com/test-kitchen/kitchen-hyperv/pull/15) ([brantb](https://github.com/brantb))
58
-
59
- ## [v0.1.7](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.7) (2015-07-14)
60
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.6...v0.1.7)
61
-
62
- **Merged pull requests:**
63
-
64
- - 64-bit windows support [\#8](https://github.com/test-kitchen/kitchen-hyperv/pull/8) ([ksubrama](https://github.com/ksubrama))
65
-
66
- ## [v0.1.6](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.6) (2015-06-25)
67
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.5...v0.1.6)
68
-
69
- ## [v0.1.5](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.5) (2015-06-24)
70
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.2...v0.1.5)
71
-
72
- **Merged pull requests:**
73
-
74
- - Adding support for mounting ISOs [\#6](https://github.com/test-kitchen/kitchen-hyperv/pull/6) ([smurawski](https://github.com/smurawski))
75
-
76
- ## [v0.1.2](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.2) (2015-05-20)
77
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.1...v0.1.2)
78
-
79
- **Merged pull requests:**
80
-
81
- - Smurawski/updating metadata [\#4](https://github.com/test-kitchen/kitchen-hyperv/pull/4) ([smurawski](https://github.com/smurawski))
82
-
83
- ## [v0.1.1](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.1) (2015-05-20)
84
- [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.0...v0.1.1)
85
-
86
- ## [v0.1.0](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.0) (2015-05-20)
87
- **Merged pull requests:**
88
-
89
- - Prepping for release [\#3](https://github.com/test-kitchen/kitchen-hyperv/pull/3) ([smurawski](https://github.com/smurawski))
90
-
91
-
92
-
1
+ # Change Log
2
+
3
+ ## [v0.5.0](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.5.0) (2017-07-05)
4
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.4.1...v0.5.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Fixed issue with existing stale diff disk [\#53](https://github.com/test-kitchen/kitchen-hyperv/pull/53) ([jdoores](https://github.com/jdoores))
9
+ - Added static\_mac\_address feature [\#52](https://github.com/test-kitchen/kitchen-hyperv/pull/52) ([jdoores](https://github.com/jdoores))
10
+
11
+ ## [v0.4.1](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.4.1) (2017-03-29)
12
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.4.0...v0.4.1)
13
+
14
+ **Merged pull requests:**
15
+
16
+ - Fix error when no additional disks [\#48](https://github.com/test-kitchen/kitchen-hyperv/pull/48) ([smurawski](https://github.com/smurawski))
17
+
18
+ ## [v0.4.0](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.4.0) (2017-03-24)
19
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.3.0...v0.4.0)
20
+
21
+ **Merged pull requests:**
22
+
23
+ - Feature/disable secureboot [\#44](https://github.com/test-kitchen/kitchen-hyperv/pull/44) ([smastrorocco](https://github.com/smastrorocco))
24
+ - Feature/additional disk [\#43](https://github.com/test-kitchen/kitchen-hyperv/pull/43) ([smastrorocco](https://github.com/smastrorocco))
25
+ - Feature/vlan support [\#41](https://github.com/test-kitchen/kitchen-hyperv/pull/41) ([smastrorocco](https://github.com/smastrorocco))
26
+ - Add ability to resize a the VHD when the disk is created [\#40](https://github.com/test-kitchen/kitchen-hyperv/pull/40) ([watsonlu](https://github.com/watsonlu))
27
+
28
+ ## [v0.3.0](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.3.0) (2016-11-28)
29
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.2.3...v0.3.0)
30
+
31
+ **Merged pull requests:**
32
+
33
+ - Support setting VM notes [\#39](https://github.com/test-kitchen/kitchen-hyperv/pull/39) ([watsonlu](https://github.com/watsonlu))
34
+ - Fix mounting iso on Gen 2 VM [\#38](https://github.com/test-kitchen/kitchen-hyperv/pull/38) ([mahsoud](https://github.com/mahsoud))
35
+ - Adding support for HyperV Guest Interface Services [\#34](https://github.com/test-kitchen/kitchen-hyperv/pull/34) ([gaelcolas](https://github.com/gaelcolas))
36
+ - Fix line continuation syntax [\#32](https://github.com/test-kitchen/kitchen-hyperv/pull/32) ([brantb](https://github.com/brantb))
37
+
38
+ ## [v0.2.3](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.3) (2016-06-10)
39
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.2.2...v0.2.3)
40
+
41
+ **Merged pull requests:**
42
+
43
+ - Support PowerShell v5.1 on the Insider Preview - updated [\#31](https://github.com/test-kitchen/kitchen-hyperv/pull/31) ([smurawski](https://github.com/smurawski))
44
+
45
+ ## [v0.2.2](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.2) (2016-06-10)
46
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.2.1...v0.2.2)
47
+
48
+ **Merged pull requests:**
49
+
50
+ - Support PowerShell v5.1 on the Insider Preview [\#30](https://github.com/test-kitchen/kitchen-hyperv/pull/30) ([smurawski](https://github.com/smurawski))
51
+
52
+ ## [v0.2.1](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.2.1) (2016-05-25)
53
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.20...v0.2.1)
54
+
55
+ ## [v0.1.20](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.20) (2016-05-17)
56
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.10...v0.1.20)
57
+
58
+ **Merged pull requests:**
59
+
60
+ - More Configurable VM Networking [\#27](https://github.com/test-kitchen/kitchen-hyperv/pull/27) ([svmastersamurai](https://github.com/svmastersamurai))
61
+ - Add -noprofile to powershell executions to prevent users' custom prof… [\#23](https://github.com/test-kitchen/kitchen-hyperv/pull/23) ([kriszentner](https://github.com/kriszentner))
62
+
63
+ ## [v0.1.10](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.10) (2015-12-03)
64
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.9...v0.1.10)
65
+
66
+ **Merged pull requests:**
67
+
68
+ - update incorrect module name [\#21](https://github.com/test-kitchen/kitchen-hyperv/pull/21) ([jbruettcva](https://github.com/jbruettcva))
69
+
70
+ ## [v0.1.9](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.9) (2015-12-03)
71
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.8...v0.1.9)
72
+
73
+ ## [v0.1.8](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.8) (2015-12-03)
74
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.7...v0.1.8)
75
+
76
+ **Merged pull requests:**
77
+
78
+ - Updating readme.md to include image configuration, specifically winrm… [\#20](https://github.com/test-kitchen/kitchen-hyperv/pull/20) ([jbruettcva](https://github.com/jbruettcva))
79
+ - Hyper-V module and Get-VMIP delay fix [\#19](https://github.com/test-kitchen/kitchen-hyperv/pull/19) ([jbruettcva](https://github.com/jbruettcva))
80
+ - File copy feature [\#17](https://github.com/test-kitchen/kitchen-hyperv/pull/17) ([dpiessens](https://github.com/dpiessens))
81
+ - Fixed NilClass exception if VM does not exist [\#16](https://github.com/test-kitchen/kitchen-hyperv/pull/16) ([dpiessens](https://github.com/dpiessens))
82
+ - Add support for dynamic memory [\#15](https://github.com/test-kitchen/kitchen-hyperv/pull/15) ([brantb](https://github.com/brantb))
83
+
84
+ ## [v0.1.7](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.7) (2015-07-14)
85
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.6...v0.1.7)
86
+
87
+ **Merged pull requests:**
88
+
89
+ - 64-bit windows support [\#8](https://github.com/test-kitchen/kitchen-hyperv/pull/8) ([ksubrama](https://github.com/ksubrama))
90
+
91
+ ## [v0.1.6](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.6) (2015-06-25)
92
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.5...v0.1.6)
93
+
94
+ ## [v0.1.5](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.5) (2015-06-24)
95
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.2...v0.1.5)
96
+
97
+ **Merged pull requests:**
98
+
99
+ - Adding support for mounting ISOs [\#6](https://github.com/test-kitchen/kitchen-hyperv/pull/6) ([smurawski](https://github.com/smurawski))
100
+
101
+ ## [v0.1.2](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.2) (2015-05-20)
102
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.1...v0.1.2)
103
+
104
+ **Merged pull requests:**
105
+
106
+ - Smurawski/updating metadata [\#4](https://github.com/test-kitchen/kitchen-hyperv/pull/4) ([smurawski](https://github.com/smurawski))
107
+
108
+ ## [v0.1.1](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.1) (2015-05-20)
109
+ [Full Changelog](https://github.com/test-kitchen/kitchen-hyperv/compare/v0.1.0...v0.1.1)
110
+
111
+ ## [v0.1.0](https://github.com/test-kitchen/kitchen-hyperv/tree/v0.1.0) (2015-05-20)
112
+ **Merged pull requests:**
113
+
114
+ - Prepping for release [\#3](https://github.com/test-kitchen/kitchen-hyperv/pull/3) ([smurawski](https://github.com/smurawski))
115
+
116
+
117
+
93
118
  \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
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'
data/README.md CHANGED
@@ -101,6 +101,11 @@ driver:
101
101
  dest: c:/users/administrator/appdata/local/temp/chef-client-12.19.36-1-x64.msi
102
102
  ```
103
103
 
104
+ * static_mac_address
105
+ * String value specifying a static MAC Address to be set at virtual machine creation time.
106
+ * Hyper-V will automatically assign a valid dynamic address if your input doesn't give a valid MAC Address.
107
+ * example: `static_mac_address: '00155d123456'`
108
+
104
109
 
105
110
  ## Image Configuration
106
111
 
data/Rakefile CHANGED
@@ -1,39 +1,39 @@
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
- task :default => [:test]
25
-
26
- begin
27
- require "github_changelog_generator/task"
28
-
29
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
30
- config.future_release = "v#{Kitchen::Driver::HYPERV_VERSION}"
31
- config.issues = false
32
- config.pulls = true
33
- config.user = 'test-kitchen'
34
- config.project = 'kitchen-hyperv'
35
- end
36
- rescue LoadError
37
- puts "github_changelog_generator is not available. " \
38
- "gem install github_changelog_generator to generate changelogs"
39
- 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
+ task :default => [:test]
25
+
26
+ begin
27
+ require "github_changelog_generator/task"
28
+
29
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
30
+ config.future_release = "v#{Kitchen::Driver::HYPERV_VERSION}"
31
+ config.issues = false
32
+ config.pulls = true
33
+ config.user = 'test-kitchen'
34
+ config.project = 'kitchen-hyperv'
35
+ end
36
+ rescue LoadError
37
+ puts "github_changelog_generator is not available. " \
38
+ "gem install github_changelog_generator to generate changelogs"
39
+ 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
@@ -55,6 +55,7 @@ module Kitchen
55
55
  default_config :additional_disks
56
56
  default_config :vm_generation, 1
57
57
  default_config :disable_secureboot, false
58
+ default_config :static_mac_address
58
59
  default_config :disk_type do |driver|
59
60
  File.extname(driver[:parent_vhd_name])
60
61
  end
@@ -77,6 +78,9 @@ module Kitchen
77
78
 
78
79
  def destroy(state)
79
80
  @state = state
81
+ if differencing_disk_exists && !vm_exists_silent
82
+ remove_differencing_disk
83
+ end
80
84
  return unless vm_exists
81
85
  instance.transport.connection(state).close
82
86
  remove_virtual_machine
@@ -113,7 +117,6 @@ module Kitchen
113
117
  end
114
118
 
115
119
  def create_new_differencing_disk
116
- return if File.exist? differencing_disk_path
117
120
  info("Creating differencing disk for #{instance.name}.")
118
121
  run_ps new_differencing_disk_ps
119
122
  info("Created differencing disk for #{instance.name}.")
@@ -204,6 +207,20 @@ module Kitchen
204
207
  true
205
208
  end
206
209
 
210
+ # Used in testing if a stale diff disk exists. Silent so the output doesn't
211
+ # appear twice on the kitchen destroy command for the second check for vm_exists
212
+ def vm_exists_silent
213
+ return false unless @state.key?(:id) && !@state[:id].nil?
214
+ existing_vm = run_ps ensure_vm_running_ps
215
+ return false if existing_vm.nil? || existing_vm['Id'].nil?
216
+ true
217
+ end
218
+
219
+ def differencing_disk_exists
220
+ return unless File.exist? differencing_disk_path
221
+ true
222
+ end
223
+
207
224
  def remove_virtual_machine
208
225
  info("Deleting virtual machine for #{instance.name}")
209
226
  run_ps delete_vm_ps