foreman_xen 0.2.0 → 0.2.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71c64d229b548689dcbf45ef493820fd716f92e5
|
|
4
|
+
data.tar.gz: 51fb7425447a3c4a634117220cc5fb7fe9977f8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9bebfa016325fd8f0875e2d07fe60fdde95bcc27adfff0de0f7c05d5cd9949990c0a046109112767f4e1cf71c419ef7f49a25c5d7ce548ea930f8c71c9d9590
|
|
7
|
+
data.tar.gz: 63ab48377088db4916ea6e3eb5efb50ca60461bc8ffd278e249e44a4565c3ef53c2796f165c77ac3f67fc40761974fba2f7f49778723c048d02cf3eeaf51d9d7
|
|
@@ -41,23 +41,19 @@ module XenComputeHelper
|
|
|
41
41
|
attribute_map[:memory_min] = compute_attributes['memory_min'] ? compute_attributes['memory_min'] : nil
|
|
42
42
|
attribute_map[:memory_max] = compute_attributes['memory_max'] ? compute_attributes['memory_max'] : nil
|
|
43
43
|
attribute_map[:power_on] = compute_attributes['start'] ? compute_attributes['start'] : nil
|
|
44
|
-
elsif params && params['host'] && params['host']['compute_attributes']
|
|
45
|
-
if params['host']['compute_attributes']['VBDs']
|
|
46
|
-
attribute_map[:volume_size] = (params['host']['compute_attributes']['VBDs']['physical_size']) ? params['host']['compute_attributes']['VBDs']['physical_size'] : nil
|
|
47
|
-
attribute_map[:volume_selected] = (params['host']['compute_attributes']['VBDs']['sr_uuid']) ? params['host']['compute_attributes']['VBDs']['sr_uuid'] : nil
|
|
48
|
-
end
|
|
49
|
-
if params['host']['compute_attributes']['VIFs']
|
|
50
|
-
attribute_map[:network_selected] = params['host']['compute_attributes']['VIFs']['print'] ? params['host']['compute_attributes']['VIFs']['print'] : nil
|
|
51
|
-
end
|
|
52
|
-
attribute_map[:template_selected_custom] = params['host']['compute_attributes']['custom_template_name'] ? params['host']['compute_attributes']['custom_template_name'] : nil
|
|
53
|
-
attribute_map[:template_selected_builtin] = params['host']['compute_attributes']['builtin_template_name'] ? params['host']['compute_attributes']['builtin_template_name'] : nil
|
|
54
44
|
elsif new
|
|
45
|
+
attribute_map[:cpu_count] = new.vcpus_max ? new.vcpus_max : nil
|
|
46
|
+
attribute_map[:memory_min] = new.memory_static_min ? new.memory_static_min : nil
|
|
47
|
+
attribute_map[:memory_max] = new.memory_static_max ? new.memory_static_max : nil
|
|
55
48
|
if new.__vbds
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
vdi = new.vbds.first.vdi
|
|
50
|
+
if vdi
|
|
51
|
+
attribute_map[:volume_selected] = vdi.sr.uuid ? vdi.sr.uuid : nil
|
|
52
|
+
attribute_map[:volume_size] = vdi.virtual_size ? (vdi.virtual_size.to_i / 1073741824).to_s : nil
|
|
53
|
+
end
|
|
58
54
|
end
|
|
59
55
|
if new.__vifs
|
|
60
|
-
attribute_map[:network_selected] = new.
|
|
56
|
+
attribute_map[:network_selected] = new.networks.first.name ? new.networks.first.name : nil
|
|
61
57
|
end
|
|
62
58
|
end
|
|
63
59
|
attribute_map
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
if controller_name == 'hosts'
|
|
10
|
-
compute_attributes = compute_resource.compute_profile_attributes_for(params['host']['compute_profile_id'])
|
|
11
10
|
fields_enabled = true
|
|
12
11
|
start_enable = true
|
|
13
12
|
elsif controller_name == 'compute_attributes'
|
|
@@ -74,7 +73,7 @@
|
|
|
74
73
|
<!-- Startup -->
|
|
75
74
|
<div class="children_fields" id="xenserver-vm-start" style="<%= hide_raw %>">
|
|
76
75
|
<%= field_set_tag 'VM Startup Options', :id => 'vm_starup_options', :title => _('Power ON VM') do -%>
|
|
77
|
-
<%= checkbox_f f, :start, :checked => (
|
|
76
|
+
<%= checkbox_f f, :start, :checked => (attribute_map[:power_on] == '1' || start_enable), :label => _("Power ON VM") %>
|
|
78
77
|
<% end -%>
|
|
79
78
|
</div>
|
|
80
79
|
|
data/lib/foreman_xen/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_xen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Nemirovsky, Michal Piotrowski, Avi Israeli
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-10-
|
|
11
|
+
date: 2015-10-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|