foreman_xen 0.5.2 → 0.5.3

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
- SHA1:
3
- metadata.gz: d42bd1079a60f578243092cb5873746eb8a15e66
4
- data.tar.gz: 872e16466d0548666a5be9d48b42edded9979e61
2
+ SHA256:
3
+ metadata.gz: 60403177171c892741a3eb0699ecc3bf29f2b5c623ebfb35ef5a386bb8918f14
4
+ data.tar.gz: 583ced398c58708ec2f19a73e5039d37bc2220168c317ebf46af862e629489bd
5
5
  SHA512:
6
- metadata.gz: 17738c40f2791e50814fe5903a6b5772ac757a52c80295c5fd78cfecdce26760d166cc2cf3d141cb1acba839edd1cef542bcf24648c4ccd53fc7a2b37a24b22b
7
- data.tar.gz: 2b4efc0e617eca3850860a1b7543d437d3b0bf90b23cdc80314b80d843c5cbe31648d365ce6b13953834017b84133724b0ea85d644fbd36c5f6ba88bac3e5d9d
6
+ metadata.gz: 18ab12113402d323cd5e17c92667930f1aa54d130f25b250ba3f8dc25570c23289220a26c04a41ad79c4a24f06ea2c53bf8d5590d3940e03e62e6186b7f4c511
7
+ data.tar.gz: 59325b39b543829b2d7442f86b723e08162994e9d7583f3b5e4223a06067aeb6f6e4fdd07953f2d0341aa05e30e66a98d3eb0c04006ac5343423bcc6af1b65e8
data/README.md CHANGED
@@ -21,8 +21,9 @@ Please see the Foreman manual for further instructions:
21
21
  | >=1.8.1, <1.10 | 0.1.x (unmaintained) |
22
22
  | >=1.10, <1.11 | 0.2.x (unmaintained) |
23
23
  | >=1.11, <1.13 | 0.3.x (unmaintained) |
24
- | >=1.13, <1.14 | 0.4.x |
25
- | >=1.14 | 0.5.x |
24
+ | >=1.13, <1.14 | 0.4.x (unmaintained) |
25
+ | >=1.14, <1.17 | 0.5.x |
26
+ | >=1.17 | 0.6.x (unreleased) |
26
27
 
27
28
  ## Support
28
29
 
@@ -96,9 +96,7 @@ module ForemanXen
96
96
  def create
97
97
  id = params[:id]
98
98
  name = params[:name]
99
- if name.nil? || name == ''
100
- process_error(:error_msg => 'You must supply a name.')
101
- end
99
+ process_error(:error_msg => 'You must supply a name.') if name.nil? || name == ''
102
100
  @host = get_host_by_id(id)
103
101
  if !@host.nil?
104
102
  @compute_resource = get_compute_resource_by_host_id(id)
@@ -55,9 +55,7 @@ module XenComputeHelper
55
55
  elsif params && params['host'] && params['host']['compute_profile_id']
56
56
  compute_attributes = compute_resource.compute_profile_attributes_for(params['host']['compute_profile_id'])
57
57
  end
58
- if compute_attributes
59
- attribute_map = filter_compute_attributes(attribute_map, compute_attributes)
60
- end
58
+ attribute_map = filter_compute_attributes(attribute_map, compute_attributes) if compute_attributes
61
59
  attribute_map
62
60
  end
63
61
 
@@ -78,9 +76,7 @@ module XenComputeHelper
78
76
  attribute_map[:volume_size] = compute_attributes['VBDs']['physical_size']
79
77
  attribute_map[:volume_selected] = compute_attributes['VBDs']['sr_uuid']
80
78
  end
81
- if compute_attributes['VIFs']
82
- attribute_map[:network_selected] = compute_attributes['VIFs']['print']
83
- end
79
+ attribute_map[:network_selected] = compute_attributes['VIFs']['print'] if compute_attributes['VIFs']
84
80
  attribute_map[:template_selected_custom] = compute_attributes['custom_template_name']
85
81
  attribute_map[:template_selected_builtin] = compute_attributes['builtin_template_name']
86
82
  attribute_map[:cpu_count] = compute_attributes['vcpus_max']
@@ -41,7 +41,7 @@ module FogExtensions
41
41
  end
42
42
 
43
43
  def vm_description
44
- _('%{cpus} CPUs and %{ram} memory') % { :cpus => vcpus_max, :ram => number_to_human_size(memory_max.to_i) }
44
+ format(_('%{cpus} CPUs and %{ram} memory'), :cpus => vcpus_max, :ram => number_to_human_size(memory_max.to_i))
45
45
  end
46
46
 
47
47
  def interfaces
@@ -187,7 +187,7 @@ module ForemanXen
187
187
  return unless errors.empty?
188
188
  opts = vm_instance_defaults.merge(attr.to_hash).symbolize_keys
189
189
 
190
- [:networks, :volumes].each do |collection|
190
+ %i[networks volumes].each do |collection|
191
191
  nested_attrs = opts.delete("#{collection}_attributes".to_sym)
192
192
  opts[collection] = nested_attributes_for(collection, nested_attrs) if nested_attrs
193
193
  end
@@ -315,7 +315,7 @@ module ForemanXen
315
315
 
316
316
  if args[:xstools] == '1'
317
317
  # Add xs-tools ISO to newly created VMs
318
- dvd_vdi = client.vdis.find { |isovdi| isovdi.name == 'xs-tools.iso' }
318
+ dvd_vdi = client.vdis.find { |isovdi| isovdi.name == 'xs-tools.iso' || isovdi.name == 'guest-tools.iso' }
319
319
  vbdconnectcd = {
320
320
  'vdi' => dvd_vdi,
321
321
  'vm' => vm.reference,
@@ -1,3 +1,3 @@
1
1
  module ForemanXen
2
- VERSION = '0.5.2'.freeze
2
+ VERSION = '0.5.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_xen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Nemirovsky
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-05-23 00:00:00.000000000 Z
13
+ date: 2018-05-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fog-xenserver
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.5.2
104
+ rubygems_version: 2.7.6
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Provision and manage XEN Server from Foreman