foreman_fog_proxmox 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm.js +54 -33
- data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm_server.js +25 -5
- data/app/assets/stylesheets/foreman_fog_proxmox/accordion.css +21 -0
- data/app/helpers/proxmox_vm_cloudinit_helper.rb +1 -1
- data/app/models/foreman_fog_proxmox/proxmox.rb +1 -1
- data/app/models/foreman_fog_proxmox/proxmox_console.rb +1 -1
- data/app/models/foreman_fog_proxmox/proxmox_vm_commands.rb +5 -2
- data/app/views/compute_resources_vms/form/proxmox/container/_config.html.erb +17 -13
- data/app/views/compute_resources_vms/form/proxmox/server/_config.html.erb +20 -20
- data/app/views/compute_resources_vms/form/proxmox/server/_volume_hard_disk.html.erb +4 -1
- data/lib/foreman_fog_proxmox/version.rb +1 -1
- metadata +20 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fb26099667e555c1234f7a330cf9914f6efc3c874b22cd2dbff180f1e544ebc
|
4
|
+
data.tar.gz: 4c7dc234f8e677f91c898cd9bb1fa52bd5d074998481aeeee7fde0c64a6ef4d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c1585871bc12fd7b7d6a806dc42c1ae975e4c79765d0a753a9823a2a7c0919e3e7a5b4997217b441f98b208d025166a0ce7f25411c9b058bc874dfd2786a4cb
|
7
|
+
data.tar.gz: 0b6d569fb3dfb400f65caf1fedf74e03d7044a3158c98ad9daee258860b9080362431e250ddd49fa79d2e75f7a852ab0dd972029a45e54bcfc20b59eb8dacd19
|
@@ -15,8 +15,6 @@
|
|
15
15
|
// You should have received a copy of the GNU General Public License
|
16
16
|
// along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
|
18
|
-
//= require jquery-ui/widgets/accordion
|
19
|
-
|
20
18
|
$(document).ready(vmTypeSelected);
|
21
19
|
|
22
20
|
function vmTypeSelected() {
|
@@ -25,13 +23,21 @@ function vmTypeSelected() {
|
|
25
23
|
var host_uuid = $("input[id='host_uuid']").val();
|
26
24
|
var new_vm = host_uuid == undefined;
|
27
25
|
var fieldsets = [];
|
26
|
+
var fieldconfig = [];
|
28
27
|
fieldsets.push({id: 'config_advanced_options', toggle: true, new_vm: new_vm, selected: selected});
|
29
28
|
fieldsets.push({id: 'config_ext', toggle: true, new_vm: new_vm, selected: selected});
|
30
29
|
fieldsets.push({id: 'volume', toggle: true, new_vm: new_vm, selected: selected});
|
31
30
|
fieldsets.push({id: 'network', toggle: true, new_vm: true, selected: selected});
|
31
|
+
fieldconfig.push({id: 'config_options', new_vm: new_vm, selected: selected});
|
32
|
+
fieldconfig.push({id: 'config_cpu', new_vm: new_vm, selected: selected});
|
33
|
+
fieldconfig.push({id: 'config_memory', new_vm: new_vm, selected: selected});
|
34
|
+
fieldconfig.push({id: 'config_cdrom', new_vm: new_vm, selected: selected});
|
35
|
+
fieldconfig.push({id: 'config_os', new_vm: new_vm, selected: selected});
|
36
|
+
fieldconfig.push({id: 'config_dns', new_vm: new_vm, selected: selected});
|
32
37
|
fieldsets.forEach(toggleFieldsets);
|
33
|
-
toggleAccordion(selected);
|
34
38
|
toggleVolumes(selected);
|
39
|
+
fieldconfig.forEach(toggleConfigs);
|
40
|
+
toggleAccordions();
|
35
41
|
return false;
|
36
42
|
}
|
37
43
|
|
@@ -131,7 +137,7 @@ function enableFieldset(fieldsetId, fieldset) {
|
|
131
137
|
input_hidden_id(fieldsetId).removeAttr('disabled');
|
132
138
|
}
|
133
139
|
|
134
|
-
function disableFieldset(fieldsetId, fieldset) {
|
140
|
+
function disableFieldset(fieldsetId, fieldset) {
|
135
141
|
if (fieldset.toggle && fieldset.new_vm){
|
136
142
|
fieldset_id(fieldsetId, fieldset).hide();
|
137
143
|
}
|
@@ -139,57 +145,72 @@ function disableFieldset(fieldsetId, fieldset) {
|
|
139
145
|
input_hidden_id(fieldsetId).attr('disabled','disabled');
|
140
146
|
}
|
141
147
|
|
142
|
-
function
|
143
|
-
|
144
|
-
field.accordion({collapsible : true, heightStyle: "content"});
|
145
|
-
field.removeClass('disabled').find("*").prop("disabled", false);
|
146
|
-
field.removeClass('hide');
|
148
|
+
function toggleFieldset(fieldsetId, fieldset, type1, type2) {
|
149
|
+
type1 === type2 ? enableFieldset(fieldsetId, fieldset) : disableFieldset(fieldsetId, fieldset);
|
147
150
|
}
|
148
151
|
|
149
|
-
function
|
150
|
-
|
151
|
-
field.addClass('disabled').find("*").prop("disabled", true);
|
152
|
-
field.addClass('hide');
|
152
|
+
function input_hidden_id(volume_id){
|
153
|
+
return $("div[id^='"+ volume_id +"_volumes']" + " + input:hidden");
|
153
154
|
}
|
154
155
|
|
155
|
-
function
|
156
|
-
|
157
|
-
enableConfigOptions(fieldsetId);
|
158
|
-
} else {
|
159
|
-
disableConfigOptions(fieldsetId);
|
160
|
-
}
|
156
|
+
function fieldset_id(fieldsetId, fieldset){
|
157
|
+
return $("fieldset[id^='" + fieldsetId + "_"+fieldset.id+"']");
|
161
158
|
}
|
162
159
|
|
163
|
-
function
|
160
|
+
function fieldsets(type){
|
161
|
+
return type === 'qemu' ? ['server'] : ['container'];
|
162
|
+
}
|
163
|
+
|
164
|
+
function toggleFieldsets(fieldset){
|
165
|
+
var removable_input_hidden = $("div.removable-item[style='display: none;']" + " + input:hidden");
|
166
|
+
removable_input_hidden.attr('disabled','disabled');
|
164
167
|
['qemu', 'lxc'].forEach(function(type){
|
165
168
|
fieldsets(type).forEach(function(fieldsetId){
|
166
|
-
|
169
|
+
toggleFieldset(fieldsetId, fieldset, fieldset.selected, type);
|
167
170
|
});
|
168
171
|
});
|
169
172
|
}
|
170
173
|
|
171
|
-
function
|
172
|
-
|
174
|
+
function toggleAccordions() {
|
175
|
+
$('.accordion-content').hide();
|
176
|
+
$('.accordion-section').off('click').on('click', function(event) {
|
177
|
+
var $content = $(this).find('.accordion-content');
|
178
|
+
$content.slideToggle();
|
179
|
+
$(this).toggleClass('active');
|
180
|
+
$('.accordion-content').not($content).slideUp();
|
181
|
+
$('.accordion-section').not($(this)).removeClass('active');
|
182
|
+
event.stopPropagation();
|
183
|
+
});
|
184
|
+
$('.accordion-content').on('click', function(event) {
|
185
|
+
event.stopPropagation();
|
186
|
+
});
|
173
187
|
}
|
174
188
|
|
175
|
-
function
|
176
|
-
|
189
|
+
function enableConfig(fieldsetId, fieldset) {
|
190
|
+
fieldset_id(fieldsetId, fieldset).removeClass('hide');
|
191
|
+
fieldset_id(fieldsetId, fieldset).removeAttr('disabled');
|
192
|
+
input_hidden_id(fieldsetId).removeAttr('disabled');
|
193
|
+
|
177
194
|
}
|
178
195
|
|
179
|
-
function
|
180
|
-
|
196
|
+
function disableConfig(fieldsetId, fieldset) {
|
197
|
+
fieldset_id(fieldsetId, fieldset).addClass('hide');
|
198
|
+
fieldset_id(fieldsetId, fieldset).attr('disabled','disabled');
|
199
|
+
input_hidden_id(fieldsetId).attr('disabled','disabled');
|
181
200
|
}
|
182
201
|
|
183
|
-
function
|
184
|
-
|
202
|
+
function toggleConfig(fieldsetId, fieldset, type1, type2) {
|
203
|
+
if (type1 === type2) {
|
204
|
+
enableConfig(fieldsetId, fieldset);
|
205
|
+
} else {
|
206
|
+
disableConfig(fieldsetId, fieldset);
|
207
|
+
}
|
185
208
|
}
|
186
209
|
|
187
|
-
function
|
188
|
-
var removable_input_hidden = $("div.removable-item[style='display: none;']" + " + input:hidden");
|
189
|
-
removable_input_hidden.attr('disabled','disabled');
|
210
|
+
function toggleConfigs(fieldset){
|
190
211
|
['qemu', 'lxc'].forEach(function(type){
|
191
212
|
fieldsets(type).forEach(function(fieldsetId){
|
192
|
-
|
213
|
+
toggleConfig(fieldsetId, fieldset, fieldset.selected, type);
|
193
214
|
});
|
194
215
|
});
|
195
216
|
}
|
@@ -32,7 +32,7 @@ function getIndex(item) {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
function isProfile() {
|
35
|
-
return $(volumesAttributesSelector(true,0,'id')) !== undefined;
|
35
|
+
return $(volumesAttributesSelector(true,0,'id')).val() !== undefined;
|
36
36
|
}
|
37
37
|
|
38
38
|
function controllerSelected(item) {
|
@@ -42,23 +42,43 @@ function controllerSelected(item) {
|
|
42
42
|
var profile = isProfile();
|
43
43
|
var device_selector = volumesAttributesSelector(profile,index,'device');
|
44
44
|
var id_selector = volumesAttributesSelector(profile,index,'id');
|
45
|
-
$(device_selector).
|
46
|
-
var device = $(device_selector).limitedSpinner('value');
|
45
|
+
var device = $(device_selector).val();
|
47
46
|
var id = controller + device;
|
47
|
+
validateDeviceLimit(device_selector, max);
|
48
48
|
$(id_selector).val(id);
|
49
49
|
}
|
50
50
|
|
51
51
|
function deviceSelected(item) {
|
52
|
-
var device = $(item).
|
52
|
+
var device = $(item).val();
|
53
53
|
var index = getIndex(item);
|
54
54
|
var profile = isProfile();
|
55
55
|
var controller_selector = volumesAttributesSelector(profile,index,'controller');
|
56
56
|
var id_selector = volumesAttributesSelector(profile,index,'id');
|
57
57
|
var controller = $(controller_selector).val();
|
58
58
|
var id = controller + device;
|
59
|
+
var max = computeControllerMaxDevice(controller);
|
60
|
+
validateDeviceLimit(item, max);
|
59
61
|
$(id_selector).val(id);
|
60
62
|
}
|
61
63
|
|
64
|
+
function validateDeviceLimit(item, maxLimit) {
|
65
|
+
var warningContainer = $(item).closest('form').find('.warning-container');
|
66
|
+
var deviceNumber = $(item).val();
|
67
|
+
var submitButton = $(item).closest('form').find('[data-disable-with]');
|
68
|
+
if (!isNaN(maxLimit) && !isNaN(deviceNumber) && deviceNumber > maxLimit) {
|
69
|
+
if (warningContainer.length === 0) {
|
70
|
+
warningContainer = $('<div class="warning-container" style="color: red;"><span style="color: red;">⚠</span> Warning: Value exceeds the maximum limit of ' + maxLimit + '.</div>');
|
71
|
+
$(item).closest('.col-md-4').append(warningContainer);
|
72
|
+
}
|
73
|
+
warningContainer.show();
|
74
|
+
submitButton.prop('disabled', true);
|
75
|
+
} else {
|
76
|
+
warningContainer.hide();
|
77
|
+
warningContainer.remove();
|
78
|
+
submitButton.prop('disabled', false);
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
62
82
|
function computeControllerMaxDevice(controller) {
|
63
83
|
switch (controller) {
|
64
84
|
case 'ide':
|
@@ -72,4 +92,4 @@ function computeControllerMaxDevice(controller) {
|
|
72
92
|
default:
|
73
93
|
return 1;
|
74
94
|
}
|
75
|
-
}
|
95
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.accordion-section {
|
2
|
+
cursor: pointer;
|
3
|
+
}
|
4
|
+
|
5
|
+
.accordion-section > legend::before {
|
6
|
+
content: "\f054";
|
7
|
+
font-family: "Font Awesome 5 Free";
|
8
|
+
position: relative;
|
9
|
+
left: -1em;
|
10
|
+
top: 50%;
|
11
|
+
transform: translateY(-50%);
|
12
|
+
}
|
13
|
+
|
14
|
+
.accordion-section.active > legend::before {
|
15
|
+
content: "\f078";
|
16
|
+
font-family: "Font Awesome 5 Free";
|
17
|
+
position: relative;
|
18
|
+
left: -1em;
|
19
|
+
top: 50%;
|
20
|
+
transform: translateY(-50%);
|
21
|
+
}
|
@@ -48,7 +48,7 @@ module ProxmoxVmCloudinitHelper
|
|
48
48
|
wd = create_temp_directory(ssh)
|
49
49
|
|
50
50
|
configs.each do |config|
|
51
|
-
config_file = ssh.run(%(echo
|
51
|
+
config_file = ssh.run(%(echo '#{config[1]}' >> "#{wd}/#{config[0]}"))
|
52
52
|
unless config_file.first.status.zero?
|
53
53
|
delete_temp_dir(ssh, wd)
|
54
54
|
raise ::Foreman::Exception, "Failed to create file #{config[0]}: #{config_file.first.stdout}"
|
@@ -33,7 +33,7 @@ module ForemanFogProxmox
|
|
33
33
|
vnc_console = vm.start_console(options)
|
34
34
|
vmid = extract_vmid(uuid).to_i
|
35
35
|
vnc_host_port = vnc_console['port'].to_i + vmid
|
36
|
-
WsProxy.start(:host =>
|
36
|
+
WsProxy.start(:host => proxmox_host, :host_port => vnc_host_port, :password => vnc_console['ticket']).merge(
|
37
37
|
:name => vm.name, :type => type_console
|
38
38
|
)
|
39
39
|
rescue StandardError => e
|
@@ -32,10 +32,9 @@ module ForemanFogProxmox
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def create_vm(args = {})
|
35
|
-
vmid = args[:vmid].to_i
|
36
35
|
type = args[:type]
|
37
36
|
node = client.nodes.get(args[:node_id])
|
38
|
-
vmid =
|
37
|
+
vmid = args[:vmid] = assign_vmid(args[:vmid].to_i, node)
|
39
38
|
raise ::Foreman::Exception, format(N_('invalid vmid=%<vmid>s'), vmid: vmid) unless node.servers.id_valid?(vmid)
|
40
39
|
|
41
40
|
image_id = args[:image_id]
|
@@ -55,6 +54,10 @@ module ForemanFogProxmox
|
|
55
54
|
raise e
|
56
55
|
end
|
57
56
|
|
57
|
+
def assign_vmid(vmid, node)
|
58
|
+
vmid < 1 ? node.servers.next_id : vmid
|
59
|
+
end
|
60
|
+
|
58
61
|
def compute_clone_attributes(args, container, type)
|
59
62
|
args = parse_cloudinit_config(args) if args[:user_data]
|
60
63
|
parsed_args = parse_typed_vm(args, type)
|
@@ -16,33 +16,37 @@ You should have received a copy of the GNU General Public License
|
|
16
16
|
along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
17
17
|
|
18
18
|
<%= javascript_include_tag 'foreman_fog_proxmox/proxmox_vm_container', "data-turbolinks-track" => true %>
|
19
|
+
<%= stylesheet_link_tag 'foreman_fog_proxmox/accordion' %>
|
19
20
|
<% container = type == 'lxc' %>
|
20
|
-
<%=
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<%= checkbox_f f, :onboot, :label => _('Start at boot') %>
|
21
|
+
<%= field_set_tag n_("Main option", "Main options", 2), :id => "container_config_options", :class => 'accordion-section', :disabled => !container do %>
|
22
|
+
<div class="accordion-content">
|
23
|
+
<%= textarea_f f, :description, :label => _('Description'), :label_size => "col-md-2" %>
|
24
|
+
<%= checkbox_f f, :onboot, :label => _('Start at boot') %>
|
25
25
|
</div>
|
26
|
-
|
27
|
-
|
26
|
+
<% end %>
|
27
|
+
<%= field_set_tag _("CPU"), :id => "container_config_cpu", :class => 'accordion-section', :disabled => !container do %>
|
28
|
+
<div class="accordion-content">
|
28
29
|
<%= select_f f, :arch, proxmox_archs_map, :id, :name, { }, :label => _('Architecture'), :label_size => "col-md-2" %>
|
29
30
|
<%= counter_f f, :cores, :class => "input-mini", :label => _('Cores'), :label_size => "col-md-2" %>
|
30
31
|
<%= counter_f f, :cpulimit, :class => "input-mini", :label => _('CPU limit'), :label_size => "col-md-2" %>
|
31
32
|
<%= counter_f f, :cpuunits, :class => "input-mini", :label => _('CPU units'), :label_size => "col-md-2" %>
|
32
33
|
</div>
|
33
|
-
|
34
|
-
|
34
|
+
<% end %>
|
35
|
+
<%= field_set_tag _("Memory"), :id => "container_config_memory", :class => 'accordion-section', :disabled => !container do %>
|
36
|
+
<div class="accordion-content">
|
35
37
|
<%= text_f f, :memory, :class => "input-mini", :label => _('Memory (MB)'), :label_size => "col-md-2" %>
|
36
38
|
<%= text_f f, :swap, :class => "input-mini", :label => _('Swap (MB)'), :label_size => "col-md-2" %>
|
37
39
|
</div>
|
38
|
-
|
39
|
-
|
40
|
+
<% end %>
|
41
|
+
<%= field_set_tag _("DNS"), :id => "container_config_dns", :class => 'accordion-section', :disabled => !container do %>
|
42
|
+
<div class="accordion-content">
|
40
43
|
<%= text_f f, :hostname, :label => _('Hostname'), :label_size => "col-md-2", :disabled => true %>
|
41
44
|
<%= text_f f, :nameserver, :label => _('DNS server'), :label_size => "col-md-2" %>
|
42
45
|
<%= text_f f, :searchdomain, :label => _('Search domain'), :label_size => "col-md-2" %>
|
43
46
|
</div>
|
44
|
-
|
45
|
-
|
47
|
+
<% end %>
|
48
|
+
<%= field_set_tag _("Operating System"), :id => "container_config_os", :class => 'accordion-section', :disabled => !container do %>
|
49
|
+
<div class="accordion-content">
|
46
50
|
<%= select_f f, :ostype, proxmox_ostypes_map, :id, :name, { }, :label => _('OS type'), :label_size => "col-md-2" %>
|
47
51
|
</div>
|
48
52
|
<% end %>
|
@@ -16,25 +16,23 @@ You should have received a copy of the GNU General Public License
|
|
16
16
|
along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
17
17
|
|
18
18
|
<%= javascript_include_tag 'foreman_fog_proxmox/proxmox_vm_server', "data-turbolinks-track" => true %>
|
19
|
-
|
19
|
+
<%= stylesheet_link_tag 'foreman_fog_proxmox/accordion' %>
|
20
20
|
<% server = type == 'qemu' %>
|
21
21
|
<% logger.debug("_config.html.erb server_config=#{f.object.inspect}") %>
|
22
|
-
|
23
|
-
|
24
|
-
<%=
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
<%= select_f f, :scsihw, proxmox_scsi_controllers_map, :id, :name, { }, :label => _('SCSI Controller'), :label_size => "col-md-2" %>
|
33
|
-
<%= select_f f, :bios, proxmox_bios_map, :id, :name, { }, :label => _('BIOS'), :label_size => "col-md-2" %>
|
22
|
+
<%= field_set_tag n_("Main option", "Main options", 2), :id => "server_config_options", :class => 'accordion-section', :disabled => !server do %>
|
23
|
+
<div class="accordion-content">
|
24
|
+
<%= textarea_f f, :description, :label => _('Description'), :label_size => "col-md-2" %>
|
25
|
+
<%= text_f f, :boot, :label => _('Boot device order'), :label_size => "col-md-2", :label_help => _('Order your devices, e.g. order=net0;ide2;scsi0. Default empty (any)') %>
|
26
|
+
<%= checkbox_f f, :onboot, :label => _('Start at boot') %>
|
27
|
+
<%= checkbox_f f, :agent, :label => _('Qemu Agent') %>
|
28
|
+
<%= checkbox_f f, :kvm, :label => _('KVM'), :label_help => _('Enable/disable KVM hardware virtualization') %>
|
29
|
+
<%= select_f f, :vga, proxmox_vgas_map, :id, :name, { :include_blank => true }, :label => _('VGA'), :label_size => "col-md-2" %>
|
30
|
+
<%= select_f f, :scsihw, proxmox_scsi_controllers_map, :id, :name, { }, :label => _('SCSI Controller'), :label_size => "col-md-2" %>
|
31
|
+
<%= select_f f, :bios, proxmox_bios_map, :id, :name, { }, :label => _('BIOS'), :label_size => "col-md-2" %>
|
34
32
|
</div>
|
35
|
-
|
36
|
-
|
37
|
-
<div>
|
33
|
+
<% end %>
|
34
|
+
<%= field_set_tag _("CPUs"), :id => "server_config_cpu", :class => 'accordion-section', :disabled => !server do %>
|
35
|
+
<div class="accordion-content">
|
38
36
|
<%= select_f f, :cpu_type, proxmox_cpus_map, :id, :name, { }, :label => _('Type'), :label_size => "col-md-2" %>
|
39
37
|
<%= counter_f f, :sockets, :class => "input-mini", :label => _('Sockets'), :label_size => "col-md-2" %>
|
40
38
|
<%= counter_f f, :cores, :class => "input-mini", :label => _('Cores'), :label_size => "col-md-2" %>
|
@@ -48,14 +46,16 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
48
46
|
<% end %>
|
49
47
|
<% end %>
|
50
48
|
</div>
|
51
|
-
|
52
|
-
|
49
|
+
<% end %>
|
50
|
+
<%= field_set_tag _("Memory"), :id => "server_config_memory", :class => 'accordion-section', :disabled => !server do %>
|
51
|
+
<div class="accordion-content">
|
53
52
|
<%= text_f f, :memory, :class => "input-mini", :label => _('Memory (MB)'), :label_size => "col-md-2" %>
|
54
53
|
<%= text_f f, :balloon, :class => "input-mini", :label => _('Minimum memory (MB)'), :label_size => "col-md-2" %>
|
55
54
|
<%= text_f f, :shares, :class => "input-mini", :label => _('Shares (MB)'), :label_size => "col-md-2" %>
|
56
55
|
</div>
|
57
|
-
|
58
|
-
|
56
|
+
<% end %>
|
57
|
+
<%= field_set_tag _("Operating System"), :id => "server_config_os", :class => 'accordion-section', :disabled => !server do %>
|
58
|
+
<div class="accordion-content">
|
59
59
|
<%= select_f f, :ostype, proxmox_operating_systems_map, :id, :name, { :include_blank => true }, :label => _('OS type'), :label_size => "col-md-2" %>
|
60
60
|
</div>
|
61
61
|
<% end %>
|
@@ -26,7 +26,10 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
26
26
|
<%= f.hidden_field :storage_type %>
|
27
27
|
<%= select_f f, :storage, compute_resource.storages(node_id), :storage, :storage, { }, :label => _('Storage'), :label_size => "col-md-2" %>
|
28
28
|
<%= select_f f, :controller, proxmox_controllers_map, :id, :name, { }, :label => _('Controller'), :label_size => "col-md-2", :disabled => !new_volume, :onchange => 'controllerSelected(this)' %>
|
29
|
-
|
29
|
+
<div>
|
30
|
+
<%= text_f f, :device, :label => _('Device'), :label_size => "col-md-2", :disabled => !new_volume, :onchange => 'deviceSelected(this)' %>
|
31
|
+
<span class="warning-container"></span>
|
32
|
+
</div>
|
30
33
|
<%= select_f f, :cache, proxmox_caches_map, :id, :name, { include_blank: true }, :label => _('Cache'), :label_size => "col-md-2" %>
|
31
34
|
<%= text_f f, :size, :class => "input-mini", :label => _("Size (GB)"), :label_size => "col-md-2", :disabled => !hard_disk %>
|
32
35
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_fog_proxmox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tristan Robert
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-04-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: deface
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- app/assets/javascripts/foreman_fog_proxmox/proxmox_volume.js
|
115
115
|
- app/assets/javascripts/foreman_fog_proxmox/proxmox_volume_cdrom.js
|
116
116
|
- app/assets/javascripts/foreman_fog_proxmox/proxmox_volume_cloudinit.js
|
117
|
+
- app/assets/stylesheets/foreman_fog_proxmox/accordion.css
|
117
118
|
- app/controllers/concerns/foreman_fog_proxmox/compute_resources_vms_controller.rb
|
118
119
|
- app/controllers/concerns/foreman_fog_proxmox/controller/parameters/compute_resource.rb
|
119
120
|
- app/controllers/concerns/foreman_fog_proxmox/hosts_controller.rb
|
@@ -262,29 +263,29 @@ signing_key:
|
|
262
263
|
specification_version: 4
|
263
264
|
summary: Foreman plugin that adds Proxmox VE compute resource using fog-proxmox
|
264
265
|
test_files:
|
265
|
-
- test/
|
266
|
+
- test/test_plugin_helper.rb
|
267
|
+
- test/factories/foreman_fog_proxmox/proxmox_node_mock_factory.rb
|
266
268
|
- test/factories/foreman_fog_proxmox/proxmox_container_mock_factory.rb
|
267
269
|
- test/factories/foreman_fog_proxmox/proxmox_server_mock_factory.rb
|
268
|
-
- test/factories/
|
269
|
-
- test/
|
270
|
-
- test/
|
271
|
-
- test/unit/foreman_fog_proxmox/
|
272
|
-
- test/unit/foreman_fog_proxmox/
|
273
|
-
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_container_test.rb
|
270
|
+
- test/factories/proxmox_factory.rb
|
271
|
+
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_test.rb
|
272
|
+
- test/unit/foreman_fog_proxmox/proxmox_images_test.rb
|
273
|
+
- test/unit/foreman_fog_proxmox/proxmox_interfaces_test.rb
|
274
|
+
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_test.rb
|
274
275
|
- test/unit/foreman_fog_proxmox/proxmox_vm_queries_test.rb
|
276
|
+
- test/unit/foreman_fog_proxmox/proxmox_vm_new_test.rb
|
277
|
+
- test/unit/foreman_fog_proxmox/proxmox_test.rb
|
275
278
|
- test/unit/foreman_fog_proxmox/semver_test.rb
|
276
|
-
- test/unit/foreman_fog_proxmox/
|
279
|
+
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_cdrom_test.rb
|
280
|
+
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_hard_disk_test.rb
|
281
|
+
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_create_test.rb
|
282
|
+
- test/unit/foreman_fog_proxmox/proxmox_version_test.rb
|
277
283
|
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_cloudinit_test.rb
|
278
|
-
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_test.rb
|
279
|
-
- test/unit/foreman_fog_proxmox/proxmox_vm_new_test.rb
|
280
|
-
- test/unit/foreman_fog_proxmox/proxmox_images_test.rb
|
281
284
|
- test/unit/foreman_fog_proxmox/proxmox_compute_attributes_test.rb
|
285
|
+
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_container_test.rb
|
286
|
+
- test/unit/foreman_fog_proxmox/helpers/proxmox_vm_volumes_helper_test.rb
|
282
287
|
- test/unit/foreman_fog_proxmox/helpers/proxmox_server_helper_test.rb
|
283
|
-
- test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb
|
284
288
|
- test/unit/foreman_fog_proxmox/helpers/proxmox_container_helper_test.rb
|
289
|
+
- test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb
|
285
290
|
- test/unit/foreman_fog_proxmox/helpers/proxmox_vm_uuid_helper_test.rb
|
286
|
-
- test/
|
287
|
-
- test/unit/foreman_fog_proxmox/proxmox_version_test.rb
|
288
|
-
- test/unit/foreman_fog_proxmox/proxmox_interfaces_test.rb
|
289
|
-
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_hard_disk_test.rb
|
290
|
-
- test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_cdrom_test.rb
|
291
|
+
- test/functional/compute_resources_controller_test.rb
|