foreman_fog_proxmox 0.10.2 → 0.11.0
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.
Potentially problematic release.
This version of foreman_fog_proxmox might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +46 -12
- data/app/assets/javascripts/foreman_fog_proxmox/proxmox_vm_server.js +0 -22
- data/app/helpers/proxmox_compute_selectors_helper.rb +9 -0
- data/app/helpers/proxmox_server_helper.rb +2 -6
- data/app/helpers/proxmox_vm_helper.rb +2 -2
- data/app/models/concerns/fog_extensions/proxmox/server.rb +1 -0
- data/app/models/foreman_fog_proxmox/proxmox_pools.rb +56 -0
- data/app/models/foreman_fog_proxmox/proxmox_vm_commands.rb +4 -1
- data/app/models/foreman_fog_proxmox/proxmox_vm_new.rb +4 -4
- data/app/models/foreman_fog_proxmox/proxmox_vm_queries.rb +6 -7
- data/app/views/api/v2/compute_resources/proxmox.json.rabl +1 -1
- data/app/views/compute_resources_vms/form/proxmox/_general.html.erb +1 -0
- data/app/views/compute_resources_vms/form/proxmox/server/_config.html.erb +3 -4
- data/app/views/compute_resources_vms/show/_proxmox.html.erb +1 -0
- data/lib/foreman_fog_proxmox/version.rb +1 -1
- data/locale/en/foreman_fog_proxmox.edit.po +46 -26
- data/locale/en/foreman_fog_proxmox.po +18 -3
- data/locale/foreman_fog_proxmox.pot +48 -28
- data/locale/fr/foreman_fog_proxmox.edit.po +50 -27
- data/locale/fr/foreman_fog_proxmox.po +18 -3
- data/test/factories/foreman_fog_proxmox/proxmox_node_mock_factory.rb +6 -0
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_container_helper_test.rb +4 -4
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_server_helper_test.rb +10 -9
- data/test/unit/foreman_fog_proxmox/helpers/proxmox_vm_helper_test.rb +1 -1
- data/test/unit/foreman_fog_proxmox/proxmox_version_test.rb +4 -4
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_container_test.rb +14 -0
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_create_test.rb +14 -0
- data/test/unit/foreman_fog_proxmox/proxmox_vm_commands_server_update_test.rb +91 -0
- data/test/unit/foreman_fog_proxmox/proxmox_vm_queries_test.rb +7 -2
- data/test/unit/foreman_fog_proxmox/semver_test.rb +3 -5
- 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: 9c5ef621a01ef69d1d270c6feb71f77046a254a556ff257c81633f372debeaad
|
4
|
+
data.tar.gz: 6d2b6dfcb99730a206f14798f4f7c79e0573eddad591227644d6b37f5e80a40f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd050c257f61d7cc967434ae57b7448b63451f6b13919036b2bea7eb43de7acad752c941114b7f7e1798e3274fc1afe7c89f8626444e1c280cfe6d658206ad0e
|
7
|
+
data.tar.gz: 279158c35f1276fcc29f8a29fa16fe3ab3546943f58de2647dd5938f7ac32cc012f16b14cb5819c9c4706ca1df666c8bfb9f77cb8a056f9f17d6803cf10b0fcf
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|

|
2
2
|
|
3
|
-
|
3
|
+

|
4
4
|
[](https://codeclimate.com/github/theforeman/foreman_fog_proxmox/maintainability)
|
5
5
|
[](https://codeclimate.com/github/theforeman/foreman_fog_proxmox/test_coverage)
|
6
|
+
[](https://badge.fury.io/rb/foreman_fog_proxmox)
|
6
7
|
|
7
8
|
# ForemanFogProxmox
|
8
9
|
|
@@ -30,6 +31,7 @@ You can support the plugin development via the following methods:
|
|
30
31
|
|>=0.9 |>=5.4|>=0.9.1|>=1.22|>=2.3|
|
31
32
|
|>=0.10 |>=5.4|>=0.9.4|>=1.22|>=2.5|
|
32
33
|
|>=0.11 |>=5.4|>=0.10|>=1.22|>=2.5|
|
34
|
+
|>=0.12 |>=6.1|>=0.11|>=2.0|>=2.5|
|
33
35
|
|
34
36
|
## Installation
|
35
37
|
|
@@ -129,8 +131,8 @@ git clone https://github.com/theforeman/foreman -b develop
|
|
129
131
|
* Add this line:
|
130
132
|
|
131
133
|
```ruby
|
132
|
-
gem 'foreman_fog_proxmox', :path => '/
|
133
|
-
gem 'fog-proxmox', :path => '/
|
134
|
+
gem 'foreman_fog_proxmox', :path => '../../theforeman/foreman_fog_proxmox'
|
135
|
+
gem 'fog-proxmox', :path => '../../fog/fog-proxmox' # optional if you need to modify fog-proxmox code too
|
134
136
|
gem 'ruby-debug-ide' # dev
|
135
137
|
gem 'debase' # dev
|
136
138
|
gem 'simplecov' # test
|
@@ -139,7 +141,8 @@ gem 'simplecov' # test
|
|
139
141
|
* In foreman directory, install dependencies:
|
140
142
|
|
141
143
|
```shell
|
142
|
-
bundle
|
144
|
+
bundle config set without 'libvirt ovirt mysql2'
|
145
|
+
bundle install
|
143
146
|
```
|
144
147
|
|
145
148
|
```shell
|
@@ -152,14 +155,25 @@ npm install
|
|
152
155
|
cp config/settings.yaml.test config/settings.yaml
|
153
156
|
```
|
154
157
|
|
155
|
-
* Install foreman database (sqlite is default in rails development):
|
158
|
+
* Install foreman database in postgresql (sqlite is no more default in rails development):
|
156
159
|
|
157
160
|
```shell
|
158
161
|
cp config/model.mappings.example config/model.mappings
|
159
162
|
cp config/database.yml.example config/database.yml
|
163
|
+
```
|
164
|
+
|
165
|
+
add these lines to config/database.yml:
|
166
|
+
|
167
|
+
```yaml
|
168
|
+
username: foreman
|
169
|
+
password: foreman
|
170
|
+
```
|
171
|
+
|
172
|
+
```shell
|
160
173
|
cp config/ignored_environments.yml.sample config/ignored_environments.yml
|
174
|
+
docker run --name foreman-db -e POSTGRES_DB=foreman -e POSTGRES_USER=foreman -e POSTGRES_PASSWORD=foreman -p 5432:5432 -d postgres
|
161
175
|
bundle exec bin/rake db:migrate
|
162
|
-
bundle exec bin/rake db:seed
|
176
|
+
bundle exec bin/rake db:seed assets:precompile locale:pack webpack:compile
|
163
177
|
```
|
164
178
|
|
165
179
|
* You can reset admin password if needed:
|
@@ -170,6 +184,13 @@ bundle exec bin/rake permissions:reset
|
|
170
184
|
|
171
185
|
* You should write tests and you can execute those specific to this plugin:
|
172
186
|
|
187
|
+
first, create database `foreman-test` with psql commands:
|
188
|
+
|
189
|
+
```shell
|
190
|
+
docker exec -it foreman-db psql -U foreman
|
191
|
+
foreman=# create database "foreman-test";
|
192
|
+
```
|
193
|
+
|
173
194
|
all:
|
174
195
|
|
175
196
|
```shell
|
@@ -208,16 +229,28 @@ bundle exec bin/rake plugin:assets:precompile[foreman_fog_proxmox]
|
|
208
229
|
bundle exec bin/rake plugin:gettext[foreman_fog_proxmox]
|
209
230
|
```
|
210
231
|
|
211
|
-
* In foreman directory, run
|
232
|
+
* In foreman directory, run in a new terminal the webpack-dev-server:
|
212
233
|
|
213
234
|
```shell
|
214
|
-
|
235
|
+
./node_modules/.bin/webpack-dev-server --config config/webpack.config.js
|
215
236
|
```
|
216
237
|
|
217
|
-
*
|
238
|
+
* Or without webpack-dev-server, add this line in config/settings.yml:
|
239
|
+
|
240
|
+
```yml
|
241
|
+
:webpack_dev_server: false
|
242
|
+
```
|
243
|
+
|
244
|
+
then compile webpack assets:
|
218
245
|
|
219
246
|
```shell
|
220
|
-
|
247
|
+
bundle exec bin/rake webpack:compile
|
248
|
+
```
|
249
|
+
|
250
|
+
* In foreman directory, run rails server:
|
251
|
+
|
252
|
+
```shell
|
253
|
+
bundle exec bin/rails server
|
221
254
|
```
|
222
255
|
|
223
256
|
* Or you can launch all together:
|
@@ -232,8 +265,9 @@ See details in [foreman plugin development](https://projects.theforeman.org/proj
|
|
232
265
|
|
233
266
|
If you like it and still want to improve it, [sponsor me](https://github.com/sponsors/tristanrobert)!
|
234
267
|
|
235
|
-
You can reach the [contributors](.github/CONTRIBUTORS.md).
|
236
|
-
|
268
|
+
* You can reach the [contributors](.github/CONTRIBUTORS.md).
|
269
|
+
* [Translate it in your favorite language](https://www.transifex.com/foreman/foreman/foreman_fog_proxmox/)
|
270
|
+
* Bug reports and pull requests are welcome on GitHub at [ForemanFogProxmox](https://github.com/theforeman/foreman_fog_proxmox).
|
237
271
|
|
238
272
|
Please read more information about [how to contribute](.github/CONTRIBUTING.md).
|
239
273
|
|
@@ -122,26 +122,4 @@ function computeControllerMaxDevice(controller) {
|
|
122
122
|
default:
|
123
123
|
return 1;
|
124
124
|
}
|
125
|
-
}
|
126
|
-
|
127
|
-
function balloonSelected(item) {
|
128
|
-
var ballooned = $(item).is(':checked');
|
129
|
-
var memory_f = $("input[name$='[config_attributes][memory]']:hidden");
|
130
|
-
var min_memory_f = $("input[id$='config_attributes_min_memory']");
|
131
|
-
var min_memory_hidden_f = $("input[name$='[config_attributes][min_memory]']:hidden");
|
132
|
-
var shares_f = $("input[id$='config_attributes_shares']");
|
133
|
-
var shares_hidden_f = $("input[name$='[config_attributes][shares]']:hidden");
|
134
|
-
if (ballooned) {
|
135
|
-
min_memory_f.removeAttr('disabled');
|
136
|
-
shares_f.removeAttr('disabled');
|
137
|
-
var max = memory_f.val();
|
138
|
-
console.log("max=" + max);
|
139
|
-
min_memory_f.attr('data-soft-max', max);
|
140
|
-
} else {
|
141
|
-
min_memory_f.attr('disabled', 'disabled');
|
142
|
-
min_memory_hidden_f.attr('value', '');
|
143
|
-
shares_f.attr('disabled', 'disabled');
|
144
|
-
shares_hidden_f.attr('value', '');
|
145
|
-
}
|
146
|
-
tfm.numFields.initAll();
|
147
125
|
}
|
@@ -47,6 +47,15 @@ module ProxmoxComputeSelectorsHelper
|
|
47
47
|
ForemanFogProxmox::OptionsSelect.new(name: 'VirtIO Block', id: 'virtio', range: 15)]
|
48
48
|
end
|
49
49
|
|
50
|
+
def proxmox_scsi_controllers_map
|
51
|
+
[OpenStruct.new(id: 'lsi', name: 'LSI 53C895A (Default)'),
|
52
|
+
OpenStruct.new(id: 'lsi53c810', name: 'LSI 53C810'),
|
53
|
+
OpenStruct.new(id: 'virtio-scsi-pci', name: 'VirtIO SCSI'),
|
54
|
+
OpenStruct.new(id: 'virtio-scsi-single', name: 'VirtIO SCSI Single'),
|
55
|
+
OpenStruct.new(id: 'megasas', name: 'MegaRAID SAS 8708EM2'),
|
56
|
+
OpenStruct.new(id: 'pvscsi', name: 'VMware PVSCSI')]
|
57
|
+
end
|
58
|
+
|
50
59
|
def proxmox_operating_systems_map
|
51
60
|
[OpenStruct.new(id: 'other', name: 'Unspecified OS'),
|
52
61
|
OpenStruct.new(id: 'wxp', name: 'Microsoft Windows XP'),
|
@@ -38,7 +38,7 @@ module ProxmoxServerHelper
|
|
38
38
|
volumes = parse_server_volumes(vols)
|
39
39
|
cpu_a = ['cpu_type', 'spectre', 'pcid']
|
40
40
|
cpu = parse_server_cpu(config.select { |key, _value| cpu_a.include? key })
|
41
|
-
memory_a = ['memory', '
|
41
|
+
memory_a = ['memory', 'balloon', 'shares']
|
42
42
|
memory = parse_server_memory(config.select { |key, _value| memory_a.include? key })
|
43
43
|
interfaces_attributes = args['interfaces_attributes']
|
44
44
|
interfaces_to_add, interfaces_to_delete = parse_server_interfaces(interfaces_attributes)
|
@@ -64,11 +64,7 @@ module ProxmoxServerHelper
|
|
64
64
|
def parse_server_memory(args)
|
65
65
|
memory = {}
|
66
66
|
memory.store(:memory, args['memory'].to_i) if args['memory']
|
67
|
-
|
68
|
-
if ballooned
|
69
|
-
memory.store(:shares, args['shares'].to_i) if args['shares']
|
70
|
-
memory.store(:min_memory, args['min_memory'].to_i) if args['min_memory']
|
71
|
-
end
|
67
|
+
memory.store(:shares, args['shares'].to_i) if args['shares']
|
72
68
|
memory.store(:balloon, args['balloon'].to_i) if args['balloon']
|
73
69
|
logger.debug("parse_server_memory(): #{memory}")
|
74
70
|
memory
|
@@ -59,7 +59,7 @@ module ProxmoxVmHelper
|
|
59
59
|
|
60
60
|
def convert_memory_sizes(args)
|
61
61
|
convert_memory_size(args['config_attributes'], 'memory')
|
62
|
-
convert_memory_size(args['config_attributes'], '
|
62
|
+
convert_memory_size(args['config_attributes'], 'balloon')
|
63
63
|
convert_memory_size(args['config_attributes'], 'shares')
|
64
64
|
convert_memory_size(args['config_attributes'], 'swap')
|
65
65
|
end
|
@@ -70,7 +70,7 @@ module ProxmoxVmHelper
|
|
70
70
|
|
71
71
|
def convert_sizes(args)
|
72
72
|
convert_memory_size(args['config_attributes'], 'memory')
|
73
|
-
convert_memory_size(args['config_attributes'], '
|
73
|
+
convert_memory_size(args['config_attributes'], 'balloon')
|
74
74
|
convert_memory_size(args['config_attributes'], 'shares')
|
75
75
|
convert_memory_size(args['config_attributes'], 'swap')
|
76
76
|
args['volumes_attributes'].each_value { |value| value['size'] = (value['size'].to_i / GIGA).to_s unless ForemanFogProxmox::Value.empty?(value['size']) }
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019 Tristan Robert
|
4
|
+
|
5
|
+
# This file is part of ForemanFogProxmox.
|
6
|
+
|
7
|
+
# ForemanFogProxmox is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
|
12
|
+
# ForemanFogProxmox is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU General Public License for more details.
|
16
|
+
|
17
|
+
# You should have received a copy of the GNU General Public License
|
18
|
+
# along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
|
20
|
+
module ForemanFogProxmox
|
21
|
+
module ProxmoxPools
|
22
|
+
def pools
|
23
|
+
pools = identity_client.pools.all
|
24
|
+
pools.sort_by(&:poolid)
|
25
|
+
end
|
26
|
+
|
27
|
+
def pool_owner(vm)
|
28
|
+
logger.debug(format(_('pool_owner(%<vmid>s)'), vmid: vm&.vmid))
|
29
|
+
pools_owners = pools.select { |pool| pool.has_server?(vm&.vmid) }
|
30
|
+
pool = pools_owners.first
|
31
|
+
logger.debug(format(_('found vm: %<vmid>s member of pool: %<poolid>s'), vmid: vm&.vmid, poolid: pool&.poolid))
|
32
|
+
vm&.config&.pool = pool&.poolid
|
33
|
+
end
|
34
|
+
|
35
|
+
def add_vm_to_pool(poolid, vmid)
|
36
|
+
logger.debug(format(_('add_vm_to_pool(%<poolid>s, %<vmid>s)'), poolid: poolid, vmid: vmid))
|
37
|
+
pool = identity_client.pools.get poolid
|
38
|
+
pool&.add_server vmid
|
39
|
+
end
|
40
|
+
|
41
|
+
def remove_vm_from_pool(poolid, vmid)
|
42
|
+
logger.debug(format(_('remove_vm_from_pool(%<poolid>s, %<vmid>s)'), poolid: poolid, vmid: vmid))
|
43
|
+
pool = identity_client.pools.get poolid
|
44
|
+
pool&.remove_server vmid
|
45
|
+
end
|
46
|
+
|
47
|
+
def update_pool(vm, poolid)
|
48
|
+
pool_owner(vm)
|
49
|
+
vm_pool = vm.config.pool || ''
|
50
|
+
return if vm_pool.eql?(poolid)
|
51
|
+
|
52
|
+
remove_vm_from_pool(vm_pool, vm.vmid)
|
53
|
+
add_vm_to_pool(poolid, vm.vmid)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -20,6 +20,7 @@
|
|
20
20
|
module ForemanFogProxmox
|
21
21
|
module ProxmoxVmCommands
|
22
22
|
include ProxmoxVolumes
|
23
|
+
include ProxmoxPools
|
23
24
|
|
24
25
|
def start_on_boot(vm, args)
|
25
26
|
startonboot = args[:start_after_create].blank? ? false : Foreman::Cast.to_bool(args[:start_after_create])
|
@@ -100,11 +101,13 @@ module ForemanFogProxmox
|
|
100
101
|
volumes_attributes&.each_value { |volume_attributes| save_volume(vm, volume_attributes) }
|
101
102
|
parsed_attr = vm.container? ? parse_container_vm(new_attributes.merge(type: vm.type)) : parse_server_vm(new_attributes.merge(type: vm.type))
|
102
103
|
logger.debug("parsed_attr=#{parsed_attr}")
|
103
|
-
config_attributes = parsed_attr.reject { |key, _value| [:vmid, :templated, :ostemplate, :ostemplate_file, :ostemplate_storage, :volumes_attributes].include? key.to_sym }
|
104
|
+
config_attributes = parsed_attr.reject { |key, _value| [:vmid, :templated, :ostemplate, :ostemplate_file, :ostemplate_storage, :volumes_attributes, :pool].include? key.to_sym }
|
104
105
|
config_attributes = config_attributes.reject { |_key, value| ForemanFogProxmox::Value.empty?(value) }
|
105
106
|
cdrom_attributes = parsed_attr.select { |_key, value| Fog::Proxmox::DiskHelper.cdrom?(value.to_s) }
|
106
107
|
config_attributes = config_attributes.reject { |key, _value| Fog::Proxmox::DiskHelper.disk?(key) }
|
107
108
|
vm.update(config_attributes.merge(cdrom_attributes))
|
109
|
+
poolid = new_attributes['pool'] if new_attributes.key?('pool')
|
110
|
+
update_pool(vm, poolid) if poolid
|
108
111
|
end
|
109
112
|
find_vm_by_uuid(uuid)
|
110
113
|
end
|
@@ -39,9 +39,9 @@ module ForemanFogProxmox
|
|
39
39
|
type ||= 'qemu'
|
40
40
|
case type
|
41
41
|
when 'lxc'
|
42
|
-
|
42
|
+
new_volume_server(attr)
|
43
43
|
when 'qemu'
|
44
|
-
|
44
|
+
new_volume_container(attr)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -74,9 +74,9 @@ module ForemanFogProxmox
|
|
74
74
|
type ||= 'qemu'
|
75
75
|
case type
|
76
76
|
when 'lxc'
|
77
|
-
|
77
|
+
new_container_interface(attr)
|
78
78
|
when 'qemu'
|
79
|
-
|
79
|
+
new_server_interface(attr)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -19,16 +19,13 @@
|
|
19
19
|
|
20
20
|
module ForemanFogProxmox
|
21
21
|
module ProxmoxVmQueries
|
22
|
+
include ProxmoxPools
|
23
|
+
|
22
24
|
def nodes
|
23
25
|
nodes = client.nodes.all if client
|
24
26
|
nodes&.sort_by(&:node)
|
25
27
|
end
|
26
28
|
|
27
|
-
def pools
|
28
|
-
pools = identity_client.pools.all
|
29
|
-
pools.sort_by(&:poolid)
|
30
|
-
end
|
31
|
-
|
32
29
|
def storages(node_id = default_node_id, type = 'images')
|
33
30
|
node = client.nodes.get node_id
|
34
31
|
node ||= default_node
|
@@ -65,12 +62,14 @@ module ForemanFogProxmox
|
|
65
62
|
end
|
66
63
|
|
67
64
|
def find_vm_in_servers_by_uuid(servers, uuid)
|
68
|
-
servers.get(uuid) if !uuid.nil? && !uuid.to_s.empty?
|
65
|
+
vm = servers.get(uuid) if !uuid.nil? && !uuid.to_s.empty?
|
66
|
+
pool_owner(vm) if vm
|
67
|
+
vm
|
69
68
|
rescue Fog::Errors::NotFound
|
70
69
|
nil
|
71
70
|
rescue StandardError => e
|
72
71
|
Foreman::Logging.exception(format(_('Failed retrieving proxmox server vm by vmid=%<vmid>s'), vmid: uuid), e)
|
73
|
-
raise(ActiveRecord::RecordNotFound)
|
72
|
+
raise(ActiveRecord::RecordNotFound, e)
|
74
73
|
end
|
75
74
|
end
|
76
75
|
end
|
@@ -35,4 +35,5 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
35
35
|
:label_size => "col-md-2" %>
|
36
36
|
</div>
|
37
37
|
<% end %>
|
38
|
+
<%= select_f f, :pool, compute_resource.pools, :poolid, :poolid, { :include_blank => true }, :label => _('Pool'), :label_size => "col-md-2", :required => false %>
|
38
39
|
<% end %>
|
@@ -27,6 +27,7 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
27
27
|
<%= checkbox_f f, :kvm, :label => _('KVM'), :label_help => _('Enable/disable KVM hardware virtualization') %>
|
28
28
|
<%= select_f f, :keyboard, proxmox_keyboards_map, :id, :name, { }, :label => _('Keyboard'), :label_size => "col-md-2" %>
|
29
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" %>
|
30
31
|
<% end %>
|
31
32
|
<%= field_set_tag _("CPU"), :id => "server_config_cpu", :class => 'hide', :disabled => !server do %>
|
32
33
|
<%= select_f f, :cpu_type, proxmox_cpus_map, :id, :name, { }, :label => _('Type'), :label_size => "col-md-2" %>
|
@@ -40,11 +41,9 @@ along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>
|
|
40
41
|
<%= checkbox_f f, :spectre, :label => _('Spectre-CTRL') %>
|
41
42
|
<% end %>
|
42
43
|
<%= field_set_tag _("Memory"), :id => "server_config_memory", :class => 'hide', :disabled => !server do %>
|
43
|
-
<% ballooned = f.object.balloon == 1 %>
|
44
44
|
<%= byte_size_f f, :memory, :class => "input-mini", :label => _('Memory'), :label_size => "col-md-2" %>
|
45
|
-
<%= byte_size_f f, :
|
46
|
-
<%= counter_f f, :shares, :class => "input-mini", :label => _('Shares'), :label_size => "col-md-2"
|
47
|
-
<%= checkbox_f f, :balloon, :label => _('Ballooning Device'), :onchange => 'balloonSelected(this)' %>
|
45
|
+
<%= byte_size_f f, :balloon, :class => "input-mini", :label => _('Minimum memory'), :label_size => "col-md-2" %>
|
46
|
+
<%= counter_f f, :shares, :class => "input-mini", :label => _('Shares'), :label_size => "col-md-2" %>
|
48
47
|
<% end %>
|
49
48
|
<%= field_set_tag _("CD-ROM"), :id => "server_config_cdrom", :class => 'hide', :disabled => !server do %>
|
50
49
|
<%= radio_button_f f, :cdrom, :value => 'none', :text => _('None'), :onclick => 'cdromSelected(this)' %>
|
@@ -65,6 +65,22 @@ msgstr ""
|
|
65
65
|
msgid "create_vm(): clone %<image_id>s in %<vmid>s"
|
66
66
|
msgstr ""
|
67
67
|
|
68
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:28
|
69
|
+
msgid "pool_owner(%<vmid>s)"
|
70
|
+
msgstr ""
|
71
|
+
|
72
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:31
|
73
|
+
msgid "found vm: %<vmid>s member of pool: %<poolid>s"
|
74
|
+
msgstr ""
|
75
|
+
|
76
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:36
|
77
|
+
msgid "add_vm_to_pool(%<poolid>s, %<vmid>s)"
|
78
|
+
msgstr ""
|
79
|
+
|
80
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_pools.rb:42
|
81
|
+
msgid "remove_vm_from_pool(%<poolid>s, %<vmid>s)"
|
82
|
+
msgstr ""
|
83
|
+
|
68
84
|
#: ../app/models/foreman_fog_proxmox/proxmox_version.rb:25
|
69
85
|
msgid "Proxmox compute resource version is %<version>s"
|
70
86
|
msgstr ""
|
@@ -73,11 +89,11 @@ msgstr ""
|
|
73
89
|
msgid "Proxmox version %<version>s is not semver suitable"
|
74
90
|
msgstr ""
|
75
91
|
|
76
|
-
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:
|
92
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:35
|
77
93
|
msgid "invalid vmid=%<vmid>s"
|
78
94
|
msgstr ""
|
79
95
|
|
80
|
-
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:
|
96
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_vm_commands.rb:54
|
81
97
|
msgid "failed to create vm: %<e>s"
|
82
98
|
msgstr ""
|
83
99
|
|
@@ -93,7 +109,7 @@ msgstr ""
|
|
93
109
|
msgid "new_server_vm() vm.config=%<config>s"
|
94
110
|
msgstr ""
|
95
111
|
|
96
|
-
#: ../app/models/foreman_fog_proxmox/proxmox_vm_queries.rb:
|
112
|
+
#: ../app/models/foreman_fog_proxmox/proxmox_vm_queries.rb:71
|
97
113
|
msgid "Failed retrieving proxmox server vm by vmid=%<vmid>s"
|
98
114
|
msgstr ""
|
99
115
|
|
@@ -165,7 +181,7 @@ msgstr ""
|
|
165
181
|
msgid "add new storage volume"
|
166
182
|
msgstr ""
|
167
183
|
|
168
|
-
#: ../app/views/compute_resources_vms/form/proxmox/_base.html.erb:6 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
184
|
+
#: ../app/views/compute_resources_vms/form/proxmox/_base.html.erb:6 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:18 ../app/views/compute_resources_vms/index/_proxmox.html.erb:8
|
169
185
|
msgid "Type"
|
170
186
|
msgstr ""
|
171
187
|
|
@@ -189,10 +205,14 @@ msgstr ""
|
|
189
205
|
msgid "Start after creation?"
|
190
206
|
msgstr ""
|
191
207
|
|
192
|
-
#: ../app/views/compute_resources_vms/form/proxmox/_general.html.erb:19 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
208
|
+
#: ../app/views/compute_resources_vms/form/proxmox/_general.html.erb:19 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:36
|
193
209
|
msgid "Image"
|
194
210
|
msgstr ""
|
195
211
|
|
212
|
+
#: ../app/views/compute_resources_vms/form/proxmox/_general.html.erb:23
|
213
|
+
msgid "Pool"
|
214
|
+
msgstr ""
|
215
|
+
|
196
216
|
#: ../app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb:5 ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:5
|
197
217
|
msgid "Advanced"
|
198
218
|
msgstr ""
|
@@ -203,11 +223,11 @@ msgid_plural "Main options"
|
|
203
223
|
msgstr[0] ""
|
204
224
|
msgstr[1] ""
|
205
225
|
|
206
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb:8 ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:9 ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:8 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
226
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb:8 ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:9 ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:8 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:17
|
207
227
|
msgid "CPU"
|
208
228
|
msgstr ""
|
209
229
|
|
210
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb:10 ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:15 ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:16 ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:10 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
230
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_advanced.html.erb:10 ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:15 ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:16 ../app/views/compute_resources_vms/form/proxmox/server/_advanced.html.erb:10 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:28 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:29 ../app/views/compute_resources_vms/index/_proxmox.html.erb:10
|
211
231
|
msgid "Memory"
|
212
232
|
msgstr ""
|
213
233
|
|
@@ -231,15 +251,15 @@ msgstr ""
|
|
231
251
|
msgid "Architecture"
|
232
252
|
msgstr ""
|
233
253
|
|
234
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:11 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
254
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:11 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:20
|
235
255
|
msgid "Cores"
|
236
256
|
msgstr ""
|
237
257
|
|
238
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:12 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
258
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:12 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:22
|
239
259
|
msgid "CPU limit"
|
240
260
|
msgstr ""
|
241
261
|
|
242
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:13 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
262
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:13 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:23
|
243
263
|
msgid "CPU units"
|
244
264
|
msgstr ""
|
245
265
|
|
@@ -259,11 +279,11 @@ msgstr ""
|
|
259
279
|
msgid "Search domain"
|
260
280
|
msgstr ""
|
261
281
|
|
262
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:24 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
282
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:24 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:42
|
263
283
|
msgid "Operating System"
|
264
284
|
msgstr ""
|
265
285
|
|
266
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:25 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
286
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_config.html.erb:25 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:43
|
267
287
|
msgid "OS type"
|
268
288
|
msgstr ""
|
269
289
|
|
@@ -331,7 +351,7 @@ msgstr ""
|
|
331
351
|
msgid "Mount point"
|
332
352
|
msgstr ""
|
333
353
|
|
334
|
-
#: ../app/views/compute_resources_vms/form/proxmox/container/_volume_mp.html.erb:8 ../app/views/compute_resources_vms/form/proxmox/container/_volume_rootfs.html.erb:7 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
354
|
+
#: ../app/views/compute_resources_vms/form/proxmox/container/_volume_mp.html.erb:8 ../app/views/compute_resources_vms/form/proxmox/container/_volume_rootfs.html.erb:7 ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:38 ../app/views/compute_resources_vms/form/proxmox/server/_volume.html.erb:8
|
335
355
|
msgid "Storage"
|
336
356
|
msgstr ""
|
337
357
|
|
@@ -387,23 +407,27 @@ msgstr ""
|
|
387
407
|
msgid "VGA"
|
388
408
|
msgstr ""
|
389
409
|
|
390
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
410
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:15
|
411
|
+
msgid "SCSI Controller"
|
412
|
+
msgstr ""
|
413
|
+
|
414
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:19
|
391
415
|
msgid "Sockets"
|
392
416
|
msgstr ""
|
393
417
|
|
394
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
418
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:21
|
395
419
|
msgid "VCPUs"
|
396
420
|
msgstr ""
|
397
421
|
|
398
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
422
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:24
|
399
423
|
msgid "Enable NUMA"
|
400
424
|
msgstr ""
|
401
425
|
|
402
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
426
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:25
|
403
427
|
msgid "PCID"
|
404
428
|
msgstr ""
|
405
429
|
|
406
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
430
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:26
|
407
431
|
msgid "Spectre-CTRL"
|
408
432
|
msgstr ""
|
409
433
|
|
@@ -415,23 +439,19 @@ msgstr ""
|
|
415
439
|
msgid "Shares"
|
416
440
|
msgstr ""
|
417
441
|
|
418
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
419
|
-
msgid "Ballooning Device"
|
420
|
-
msgstr ""
|
421
|
-
|
422
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:34
|
442
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:33
|
423
443
|
msgid "CD-ROM"
|
424
444
|
msgstr ""
|
425
445
|
|
426
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
446
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:34
|
427
447
|
msgid "None"
|
428
448
|
msgstr ""
|
429
449
|
|
430
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
450
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:35
|
431
451
|
msgid "Physical"
|
432
452
|
msgstr ""
|
433
453
|
|
434
|
-
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:
|
454
|
+
#: ../app/views/compute_resources_vms/form/proxmox/server/_config.html.erb:39
|
435
455
|
msgid "Image ISO"
|
436
456
|
msgstr ""
|
437
457
|
|