foreman_hyperv 0.0.2 → 0.0.3

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: 710168316d53c6c4bb3276fa02faa45a28c602bb
4
- data.tar.gz: 484471496d5c678718430e539639d4d6bc4b38d3
3
+ metadata.gz: fb57dc6dd0bcc2a285337c23b89ed22a80a503fa
4
+ data.tar.gz: 3aac593cc35eb225047ca473c5bc3f7f0bc4a334
5
5
  SHA512:
6
- metadata.gz: 19eb7700b2fc5030f2d4c7711d31dd3c77d5445b5442ac66e199cf7da0cdcd01c91609240a911e59036696411436f2a59e5e7314a10afef8ffdffed436f03245
7
- data.tar.gz: 3a03d174196f13b3e8967f25c1eb23fb524f12919ede792dc8000ab8c34d5e88bb632182a4529a7e73740fcf288ec7a71261b7bfcbff33ee5a70a1646bdcb190
6
+ metadata.gz: c8dea6446ab0ef7359678fd49e02bce16eb9930195f95005d21100472d98d8ce282b9225e1a1f5dc186e402f5f7a15c52ed3eded0da2ce02293666416b6c663e
7
+ data.tar.gz: e77ff169aaa0c97f0db2f40658ea66fb579b75967e466cb553075d269099f098b747618070764bda6bdfcf72b9ba930675ab745c2d237a1186ca90f8d04ae42e
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ## v0.0.2 2017-09-30
1
+ ## v0.0.3 2018-01-15
2
+
3
+ - Fix association of VMs by MAC address (case issue)
4
+ - Fix over-eager secure boot setting access on unpersisted VMs
5
+ - Fix over-eager cluster iteration, ensure the hypervisor supports clusters first (Requires fog-hyperv v0.0.6)
6
+
7
+ ## v0.0.2 2017-08-30
2
8
 
3
9
  - Add Dynamic memory settings
4
10
  - Add JS for disabling unavailable settings to improve UX
@@ -6,6 +12,6 @@
6
12
  - Skip several unnecessary Hyper-V calls to improve performance
7
13
  - Improve VM properties view to look a little better and house another few nuggets of information
8
14
 
9
- ## v0.0.1 2017-09-28
15
+ ## v0.0.1 2017-08-28
10
16
 
11
17
  - Initial release
data/README.md CHANGED
@@ -6,6 +6,14 @@ Microsoft Hyper-V compute resource for Foreman
6
6
 
7
7
  Uses the in-development `fog-hyperv` gem found [here](https://github.com/ace13/fog-hyperv).
8
8
 
9
+ ## Testing/Installing
10
+
11
+ Follow the Foreman manual for [advanced installation from gems](https://theforeman.org/plugins/#2.3AdvancedInstallationfromGems) for `fog-hyperv` and `foreman_hyperv`.
12
+
13
+ There are RPMs packaged for the `fog-hyperv` dependencies under [Release v0.0.1](https://github.com/ace13/foreman_hyperv/releases/tag/v0.0.1), or they too can be installed from gems.
14
+
15
+ Do bear in mind that this is still very early in development, so plenty of issues may exist.
16
+
9
17
  ## Contributing
10
18
 
11
19
  Bug reports and pull requests are welcome on GitHub at https://github.com/ace13/foreman_hyperv.
@@ -15,7 +15,7 @@ module FogExtensions
15
15
  end
16
16
 
17
17
  def mac(m = mac_addresses.first)
18
- "#{m[0, 2]}:#{m[2, 2]}:#{m[4, 2]}:#{m[6, 2]}:#{m[8, 2]}:#{m[10, 2]}"
18
+ "#{m[0, 2]}:#{m[2, 2]}:#{m[4, 2]}:#{m[6, 2]}:#{m[8, 2]}:#{m[10, 2]}".downcase
19
19
  end
20
20
 
21
21
  def clean_mac_addresses
@@ -38,10 +38,17 @@ module FogExtensions
38
38
 
39
39
  def volumes_attributes=(_attributes); end
40
40
 
41
- def secure_boot_enabled=(_); end
41
+ def secure_boot_enabled=(enabled)
42
+ @secure_boot = enabled
43
+ return unless persisted?
44
+
45
+ firmware.secure_boot = enabled ? :On : :Off
46
+ end
42
47
 
43
48
  def secure_boot_enabled
44
49
  return false if generation == 1
50
+ return @secure_boot unless persisted?
51
+
45
52
  firmware.secure_boot == :On
46
53
  end
47
54
 
@@ -154,6 +154,14 @@ module ForemanHyperv
154
154
  def available_hypervisors
155
155
  client.hosts
156
156
  end
157
+ alias hosts available_hypervisors
158
+
159
+ def clusters
160
+ if client.respond_to? :supports_clusters?
161
+ return [] unless client.supports_clusters?
162
+ end
163
+ client.clusters rescue []
164
+ end
157
165
 
158
166
  def hypervisor
159
167
  client.hosts.first
@@ -1,5 +1,14 @@
1
1
  <%= javascript_tag("$(document).on('ContentLoad', tfm.numFields.initAll)") %>
2
2
 
3
+ <%
4
+ clusters = compute_resource.clusters.map(&:name)
5
+ computers = (f.object.cluster || compute_resource).hosts.map(&:name)
6
+ %>
7
+ <% if clusters.any? %>
8
+ <%= select_f f, :cluster_name, clusters, :to_s, :to_s %>
9
+ <%= select_f f, :computer_name, computers, :to_s, :to_s %>
10
+ <% end %>
11
+
3
12
  <%
4
13
  generations = [ [1, 'Generation 1 (BIOS)'], [2, 'Generation 2 (UEFI)'] ]
5
14
  %>
@@ -1,5 +1,5 @@
1
1
  <%
2
- networks = compute_resource.switches.map do |sw|
2
+ networks = (f.object.computer || compute_resource).switches.map do |sw|
3
3
  [ sw.name, "#{sw.name}#{sw.switch_type ? " (#{sw.switch_type})" : nil}" ]
4
4
  end
5
5
  %>
@@ -1,3 +1,3 @@
1
1
  module ForemanHyperv
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_hyperv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Olofsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2018-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-hyperv
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.6.12
124
+ rubygems_version: 2.6.14
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Hyper-V as a Compute Resource for Foreman