foreman_bootdisk 3.0.0 → 3.1.0

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
2
  SHA1:
3
- metadata.gz: 51adf08513ffcceb95f046aed88d330303cdb16d
4
- data.tar.gz: 4b5ca7c65af66d5f64a024f44bf7b50b7c20cad9
3
+ metadata.gz: ce871fad8bb1d1ebb2a0a4cb26eafc2cbfc57f33
4
+ data.tar.gz: d581f9c98ab0cc5741b85fcbbc58379b60389798
5
5
  SHA512:
6
- metadata.gz: eec946e5bbc5be09fefd2e09f0d20ea6c69963a58018554e8998490ee422dbeaf9cbbdc6538586fbd92086da638f0ab8e4f738d84730445481fe0d043fac2bcc
7
- data.tar.gz: 8b5ddcc2f1cbb5f5cfa5f86d49b3fd0c125aabb2e303f3763e041e183d6d426ec597349103b85a477f130ecba342e56c95d58a9a2249cc8e11de1189e576989d
6
+ metadata.gz: f905f33886dc4089e14df92b6cb54667894fefd8bfbe1a40acd76435cfede869684b6651665c3f44b5c2bf1644dbacf24056f3470ac583e5b4e5a6e68284aec3
7
+ data.tar.gz: b91315f9b23f5933ddd1bbd450a65146e789103e49507f07b1489327e9d7b3f9261c5b67e6e7232b71c73bef8519777ae8d8a4932ba1dcb4394c5d540c61410d
data/CHANGES.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v3.1.0
4
+ * added API:
5
+ * /bootdisk/api/v2/generic to download the generic ISO
6
+ * /bootdisk/api/v2/hosts/:id to download the per-host ISO
7
+ * refactored plugin to be an isolated engine
8
+
3
9
  ## v3.0.0
4
10
  * modernised to use Foreman 1.6 features, no new functionality
5
11
  * use template locking mechanism from Foreman 1.6 (#6843, Stephen Benjamin)
data/README.md CHANGED
@@ -142,12 +142,19 @@ instead of being stored in the image.
142
142
  To generate the image from the web interface, view the host page, click the
143
143
  "Boot disk" button and select "Host 'FQDN' image".
144
144
 
145
- To generate from the command line:
145
+ To generate from the command line on the Foreman server:
146
146
 
147
147
  foreman-rake bootdisk:generate:host NAME=foo.example.com
148
148
 
149
149
  Optionally set `OUTPUT=/path/foo.iso` to change the output destination.
150
150
 
151
+ To generate using the Hammer CLI, install the [hammer_cli_foreman_bootdisk](https://github.com/theforeman/hammer_cli_foreman_bootdisk)
152
+ plugin and run:
153
+
154
+ hammer bootdisk host --host client.example.com
155
+
156
+ See the hammer_cli_foreman_bootdisk documentation for more advanced usage.
157
+
151
158
  ### Generic image
152
159
 
153
160
  This provides a single ISO that can be used by all registered hosts, but since
@@ -162,12 +169,19 @@ address statically for the installed system via the kickstart file.
162
169
  To generate the image from the web interface, view a host page, click the
163
170
  "Boot disk" button and select "Generic image".
164
171
 
165
- To generate from the command line:
172
+ To generate from the command line on the Foreman server:
166
173
 
167
174
  foreman-rake bootdisk:generate:generic
168
175
 
169
176
  Optionally set `OUTPUT=/path/foo.iso` to change the output destination.
170
177
 
178
+ To generate using the Hammer CLI, install the [hammer_cli_foreman_bootdisk](https://github.com/theforeman/hammer_cli_foreman_bootdisk)
179
+ plugin and run:
180
+
181
+ hammer bootdisk generic
182
+
183
+ See the hammer_cli_foreman_bootdisk documentation for more advanced usage.
184
+
171
185
  ### Host group images
172
186
 
173
187
  TODO
@@ -0,0 +1,60 @@
1
+ require 'uri'
2
+
3
+ module ForemanBootdisk
4
+ module Api
5
+ module V2
6
+ class DisksController < ::Api::V2::BaseController
7
+ include ::Api::Version2
8
+
9
+ resource_description do
10
+ api_base_url "/bootdisk/api"
11
+ end
12
+
13
+ before_filter :find_host, :only => :host
14
+
15
+ # no-op, but required for apipie documentation
16
+ api :GET, '', N_('Boot disks')
17
+ def index; end
18
+
19
+ api :GET, '/generic', N_('Download generic image')
20
+ def generic
21
+ tmpl = ForemanBootdisk::Renderer.new.generic_template_render
22
+ ForemanBootdisk::ISOGenerator.new(tmpl).generate do |iso|
23
+ send_data File.read(iso), :filename => "bootdisk_#{URI.parse(Setting[:foreman_url]).host}.iso"
24
+ end
25
+ end
26
+
27
+ api :GET, '/hosts/:host_id', N_('Download host image')
28
+ param :host_id, :identifier_dottable, :required => true
29
+ def host
30
+ host = @disk
31
+ tmpl = host.bootdisk_template_render
32
+ ForemanBootdisk::ISOGenerator.new(tmpl).generate do |iso|
33
+ send_data File.read(iso), :filename => "#{host.name}.iso"
34
+ end
35
+ end
36
+
37
+ private
38
+
39
+ def action_permission
40
+ case params[:action]
41
+ when 'generic'
42
+ :download
43
+ when 'host'
44
+ :view
45
+ else
46
+ super
47
+ end
48
+ end
49
+
50
+ def find_host
51
+ find_resource('hosts')
52
+ end
53
+
54
+ def resource_class
55
+ Host::Managed
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -2,7 +2,9 @@ require 'uri'
2
2
 
3
3
  module ForemanBootdisk
4
4
  class DisksController < ::ApplicationController
5
- def generic_iso
5
+ before_filter :find_by_name, :only => %w[host]
6
+
7
+ def generic
6
8
  begin
7
9
  tmpl = ForemanBootdisk::Renderer.new.generic_template_render
8
10
  rescue => e
@@ -16,15 +18,25 @@ module ForemanBootdisk
16
18
  end
17
19
  end
18
20
 
19
- private
21
+ def host
22
+ host = @disk
23
+ begin
24
+ tmpl = host.bootdisk_template_render
25
+ rescue => e
26
+ error _('Failed to render boot disk template: %s') % e
27
+ redirect_to :back
28
+ return
29
+ end
20
30
 
21
- def action_permission
22
- case params[:action]
23
- when 'generic_iso'
24
- :download
25
- else
26
- super
31
+ ForemanBootdisk::ISOGenerator.new(tmpl).generate do |iso|
32
+ send_data File.read(iso), :filename => "#{host.name}.iso"
27
33
  end
28
34
  end
35
+
36
+ private
37
+
38
+ def resource_base
39
+ Host::Managed.authorized(:view_hosts)
40
+ end
29
41
  end
30
42
  end
@@ -9,12 +9,28 @@ module ForemanBootdisk::HostsHelperExt
9
9
  title_actions(
10
10
  button_group(
11
11
  select_action_button(_('Boot disk'), {},
12
- display_link_if_authorized(_("Host '%s' image") % @host.name.split('.')[0], hash_for_bootdisk_iso_host_path(:id => @host), :class=>'btn'),
13
- display_link_if_authorized(_("Generic image"), hash_for_generic_iso_disks_path, :class=>'btn')
12
+ display_bootdisk_link_if_authorized(_("Host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'host', :id => @host}, :class=>'btn'),
13
+ display_bootdisk_link_if_authorized(_("Generic image"), {:controller => 'foreman_bootdisk/disks', :action => 'generic'}, :class=>'btn')
14
14
  )
15
15
  )
16
16
  )
17
17
  host_title_actions_without_bootdisk(*args)
18
18
  end
19
19
 
20
+ # Core Foreman helpers can't look up a URL against a mounted engine
21
+ def display_bootdisk_link_if_authorized(name, options = {}, html_options = {})
22
+ if bootdisk_authorized_for(options)
23
+ link_to(name, bootdisk_url(options), html_options)
24
+ else
25
+ ""
26
+ end
27
+ end
28
+
29
+ def bootdisk_url(options)
30
+ ForemanBootdisk::Engine.routes.url_for(options.merge(:only_path => true))
31
+ end
32
+
33
+ def bootdisk_authorized_for(options)
34
+ User.current.allowed_to?(options)
35
+ end
20
36
  end
@@ -1,12 +1,16 @@
1
- Rails.application.routes.draw do
2
- resources :disks, :module => 'foreman_bootdisk', :only => :index do
3
- get 'generic_iso', :on => :collection
1
+ ForemanBootdisk::Engine.routes.draw do
2
+ resources :disks, :only => [] do
3
+ get 'generic', :on => :collection
4
+ constraints(:id => /[^\/]+/) do
5
+ get 'hosts/:id', :on => :collection, :to => 'disks#host'
6
+ end
4
7
  end
5
8
 
6
- constraints(:id => /[^\/]+/) do
7
- resources :hosts do
8
- member do
9
- get 'bootdisk_iso'
9
+ namespace :api, :defaults => {:format => 'json'} do
10
+ scope "(:apiv)", :module => :v2, :defaults => {:apiv => 'v2'}, :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2) do
11
+ get 'generic', :to => 'disks#generic'
12
+ constraints(:id => /[^\/]+/) do
13
+ get 'hosts/:id', :to => 'disks#host'
10
14
  end
11
15
  end
12
16
  end
@@ -0,0 +1,3 @@
1
+ Foreman::Application.routes.draw do
2
+ mount ForemanBootdisk::Engine, :at => "/bootdisk"
3
+ end
@@ -4,12 +4,16 @@ require 'gettext_i18n_rails'
4
4
 
5
5
  module ForemanBootdisk
6
6
  class Engine < ::Rails::Engine
7
- engine_name ForemanBootdisk::ENGINE_NAME
7
+ isolate_namespace ForemanBootdisk
8
8
 
9
9
  config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
10
10
  config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
11
11
  config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
12
12
 
13
+ initializer 'foreman_bootdisk.mount_engine', :after=> :build_middleware_stack do |app|
14
+ app.routes_reloader.paths << "#{ForemanBootdisk::Engine.root}/config/routes/mount_engine.rb"
15
+ end
16
+
13
17
  initializer 'foreman_bootdisk.load_default_settings', :before => :load_config_initializers do |app|
14
18
  require_dependency File.expand_path("../../../app/models/setting/bootdisk.rb", __FILE__) if (Setting.table_exists? rescue(false))
15
19
  end
@@ -18,18 +22,23 @@ module ForemanBootdisk
18
22
  app.config.paths['db/migrate'] += ForemanBootdisk::Engine.paths['db/migrate'].existent
19
23
  end
20
24
 
25
+ initializer "foreman_bootdisk.apipie" do
26
+ Apipie.configuration.api_controllers_matcher << "#{ForemanBootdisk::Engine.root}/app/controllers/foreman_bootdisk/api/v2/*.rb"
27
+ Apipie.configuration.checksum_path += ['/bootdisk/api/']
28
+ end
29
+
21
30
  initializer 'foreman_bootdisk.register_plugin', :after=> :finisher_hook do |app|
22
31
  Foreman::Plugin.register :foreman_bootdisk do
23
32
  requires_foreman '>= 1.6'
24
33
 
25
34
  security_block :bootdisk do |map|
26
- permission :download_bootdisk, {:hosts => [:bootdisk_iso],
27
- :'bootdisk/disks' => [:generic_iso, :index]}
35
+ permission :download_bootdisk, {:'foreman_bootdisk/disks' => [:generic, :host],
36
+ :'foreman_bootdisk/api/v2/disks' => [:generic, :host]}
28
37
  end
29
38
 
30
- role "Boot disk access", [:download_bootdisk] unless (Role.count rescue nil).nil?
39
+ role "Boot disk access", [:download_bootdisk]
31
40
 
32
- allowed_template_helpers :bootdisk_chain_url, :bootdisk_raise if respond_to? :allowed_template_helpers
41
+ allowed_template_helpers :bootdisk_chain_url, :bootdisk_raise
33
42
  end
34
43
  end
35
44
 
@@ -42,7 +51,6 @@ module ForemanBootdisk
42
51
  config.to_prepare do
43
52
  begin
44
53
  Host::Managed.send(:include, ForemanBootdisk::HostExt)
45
- HostsController.send(:include, ForemanBootdisk::HostsControllerExt)
46
54
  HostsHelper.send(:include, ForemanBootdisk::HostsHelperExt)
47
55
  UnattendedController.send(:include, ForemanBootdisk::UnattendedControllerExt)
48
56
  rescue => e
@@ -1,3 +1,3 @@
1
1
  module ForemanBootdisk
2
- VERSION = '3.0.0'
2
+ VERSION = '3.1.0'
3
3
  end
@@ -9,9 +9,9 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: Foreman\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2014-02-13 12:18+0000\n"
13
- "PO-Revision-Date: 2014-07-09 08:11+0000\n"
14
- "Last-Translator: simon11 <simon.stieger.98@live.de>\n"
12
+ "POT-Creation-Date: 2014-08-05 17:10+0100\n"
13
+ "PO-Revision-Date: 2014-08-06 08:59+0000\n"
14
+ "Last-Translator: Dominic Cleal <dcleal@redhat.com>\n"
15
15
  "Language-Team: German (http://www.transifex.com/projects/p/foreman/language/de/)\n"
16
16
  "MIME-Version: 1.0\n"
17
17
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -63,17 +63,17 @@ msgstr "Pfad zum Verzeichnis mit syslinux Images"
63
63
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
64
64
  msgstr "Bitte stelle sicher, dass die Pakete ipxe-bootimgs und syslinux installiert sind."
65
65
 
66
+ msgid ""
67
+ "Plugin for Foreman that creates iPXE-based boot disks to provision hosts "
68
+ "without the need for PXE infrastructure."
69
+ msgstr ""
70
+
66
71
  msgid "Subnet (%s) has no gateway defined"
67
72
  msgstr "Subnetz (%s) hat keinen Gateway definiert"
68
73
 
69
74
  msgid "Subnet (%s) has no primary DNS server defined"
70
75
  msgstr "Subnetz (%s) hat keinen primären DNS-Server definiert"
71
76
 
72
- msgid ""
73
- "Template is read-only as it's supplied in foreman_bootdisk. Please copy it "
74
- "to a new template to customize."
75
- msgstr "Template is read-only as it's supplied in foreman_bootdisk. Please copy it to a new template to customize."
76
-
77
77
  msgid "Unable to find template specified by %s setting"
78
78
  msgstr "Konnte Vorlage mit der %s-Einstellung nicht finden"
79
79
 
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: version 0.0.1\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2014-08-05 10:56+0100\n"
10
+ "POT-Creation-Date: 2014-08-08 13:53+0100\n"
11
11
  "PO-Revision-Date: 2014-02-13 12:09+0000\n"
12
12
  "Last-Translator: Dominic Cleal <dcleal@redhat.com>\n"
13
13
  "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
@@ -20,12 +20,21 @@ msgstr ""
20
20
  msgid "Boot disk"
21
21
  msgstr ""
22
22
 
23
+ msgid "Boot disks"
24
+ msgstr ""
25
+
23
26
  msgid "Bootdisk is not supported with safemode rendering, please disable safemode_render under Adminster>Settings"
24
27
  msgstr ""
25
28
 
26
29
  msgid "Command to generate ISO image, use genisoimage or mkisofs"
27
30
  msgstr ""
28
31
 
32
+ msgid "Download generic image"
33
+ msgstr ""
34
+
35
+ msgid "Download host image"
36
+ msgstr ""
37
+
29
38
  msgid "Failed to render boot disk template: %s"
30
39
  msgstr ""
31
40
 
@@ -59,6 +68,9 @@ msgstr ""
59
68
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
60
69
  msgstr ""
61
70
 
71
+ msgid "Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure."
72
+ msgstr ""
73
+
62
74
  msgid "Subnet (%s) has no gateway defined"
63
75
  msgstr ""
64
76
 
@@ -8,8 +8,8 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Foreman\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2014-02-13 12:18+0000\n"
12
- "PO-Revision-Date: 2014-02-13 12:20+0000\n"
11
+ "POT-Creation-Date: 2014-08-05 17:10+0100\n"
12
+ "PO-Revision-Date: 2014-08-06 09:00+0000\n"
13
13
  "Last-Translator: Dominic Cleal <dcleal@redhat.com>\n"
14
14
  "Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/foreman/language/en_GB/)\n"
15
15
  "MIME-Version: 1.0\n"
@@ -62,17 +62,17 @@ msgstr "Path to directory containing syslinux images"
62
62
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
63
63
  msgstr "Please ensure the ipxe-bootimgs and syslinux packages are installed."
64
64
 
65
+ msgid ""
66
+ "Plugin for Foreman that creates iPXE-based boot disks to provision hosts "
67
+ "without the need for PXE infrastructure."
68
+ msgstr "Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure."
69
+
65
70
  msgid "Subnet (%s) has no gateway defined"
66
71
  msgstr "Subnet (%s) has no gateway defined"
67
72
 
68
73
  msgid "Subnet (%s) has no primary DNS server defined"
69
74
  msgstr "Subnet (%s) has no primary DNS server defined"
70
75
 
71
- msgid ""
72
- "Template is read-only as it's supplied in foreman_bootdisk. Please copy it "
73
- "to a new template to customize."
74
- msgstr "Template is read-only as it's supplied in foreman_bootdisk. Please copy it to a new template to customise."
75
-
76
76
  msgid "Unable to find template specified by %s setting"
77
77
  msgstr "Unable to find template specified by %s setting"
78
78
 
@@ -8,8 +8,8 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Foreman\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2014-02-13 12:18+0000\n"
12
- "PO-Revision-Date: 2014-05-21 10:02+0000\n"
11
+ "POT-Creation-Date: 2014-08-05 17:10+0100\n"
12
+ "PO-Revision-Date: 2014-08-06 09:20+0000\n"
13
13
  "Last-Translator: Sergio Ocón <sergio@redhat.com>\n"
14
14
  "Language-Team: Spanish (http://www.transifex.com/projects/p/foreman/language/es/)\n"
15
15
  "MIME-Version: 1.0\n"
@@ -62,17 +62,17 @@ msgstr "Ruta al directorio que contiene las imágenes syslinux"
62
62
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
63
63
  msgstr "Asegúrese de que los paquetes ipxe-bootimgs y syslinux están instalados."
64
64
 
65
+ msgid ""
66
+ "Plugin for Foreman that creates iPXE-based boot disks to provision hosts "
67
+ "without the need for PXE infrastructure."
68
+ msgstr "Plugin para Foreman que crea discos de arranque iPXE para provisionar hosts sin necesidad de infraestructura PXE"
69
+
65
70
  msgid "Subnet (%s) has no gateway defined"
66
71
  msgstr "La subred (%s) no tiene gateway definida"
67
72
 
68
73
  msgid "Subnet (%s) has no primary DNS server defined"
69
74
  msgstr "La subred (%s) no tiene servidor DNS primario definido"
70
75
 
71
- msgid ""
72
- "Template is read-only as it's supplied in foreman_bootdisk. Please copy it "
73
- "to a new template to customize."
74
- msgstr "La plantilla es de solo lectura al proporcionarse en foreman_bootdisk. Cópiela en una nueva plantilla para customizarla"
75
-
76
76
  msgid "Unable to find template specified by %s setting"
77
77
  msgstr "No ha sido posible encontrar la plantilla especificada por el parámetro de configuración %s"
78
78
 
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: version 0.0.1\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2014-08-05 10:56+0100\n"
10
+ "POT-Creation-Date: 2014-08-08 13:53+0100\n"
11
11
  "PO-Revision-Date: 2014-02-13 12:09+0000\n"
12
12
  "Last-Translator: Dominic Cleal <dcleal@redhat.com>\n"
13
13
  "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
@@ -20,12 +20,21 @@ msgstr ""
20
20
  msgid "Boot disk"
21
21
  msgstr ""
22
22
 
23
+ msgid "Boot disks"
24
+ msgstr ""
25
+
23
26
  msgid "Bootdisk is not supported with safemode rendering, please disable safemode_render under Adminster>Settings"
24
27
  msgstr ""
25
28
 
26
29
  msgid "Command to generate ISO image, use genisoimage or mkisofs"
27
30
  msgstr ""
28
31
 
32
+ msgid "Download generic image"
33
+ msgstr ""
34
+
35
+ msgid "Download host image"
36
+ msgstr ""
37
+
29
38
  msgid "Failed to render boot disk template: %s"
30
39
  msgstr ""
31
40
 
@@ -59,6 +68,9 @@ msgstr ""
59
68
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
60
69
  msgstr ""
61
70
 
71
+ msgid "Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure."
72
+ msgstr ""
73
+
62
74
  msgid "Subnet (%s) has no gateway defined"
63
75
  msgstr ""
64
76
 
@@ -4,13 +4,14 @@
4
4
  #
5
5
  # Translators:
6
6
  # Claer <transiblu@claer.hammock.fr>, 2014
7
+ # Pierre-Emmanuel Dutang <dutangp@gmail.com>, 2014
7
8
  msgid ""
8
9
  msgstr ""
9
10
  "Project-Id-Version: Foreman\n"
10
11
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2014-02-13 12:18+0000\n"
12
- "PO-Revision-Date: 2014-02-13 18:20+0000\n"
13
- "Last-Translator: Claer <transiblu@claer.hammock.fr>\n"
12
+ "POT-Creation-Date: 2014-08-05 17:10+0100\n"
13
+ "PO-Revision-Date: 2014-08-06 09:11+0000\n"
14
+ "Last-Translator: Pierre-Emmanuel Dutang <dutangp@gmail.com>\n"
14
15
  "Language-Team: French (http://www.transifex.com/projects/p/foreman/language/fr/)\n"
15
16
  "MIME-Version: 1.0\n"
16
17
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -62,17 +63,17 @@ msgstr "Emplacement du répertoire contenant les images syslinux"
62
63
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
63
64
  msgstr "Merci de vérifier que les paquets ipxe-bootimgs et syslinux soient installés."
64
65
 
66
+ msgid ""
67
+ "Plugin for Foreman that creates iPXE-based boot disks to provision hosts "
68
+ "without the need for PXE infrastructure."
69
+ msgstr "Plugin pour Foreman qui crée le démarrage des disques iPXE-bases pour provisionner les hôtes sans l'aide de l'infrastructure PXE."
70
+
65
71
  msgid "Subnet (%s) has no gateway defined"
66
72
  msgstr "Le sous réseau (%s) n'a pas de passerelle définie"
67
73
 
68
74
  msgid "Subnet (%s) has no primary DNS server defined"
69
75
  msgstr "Le sous réseau (%s) n'a pas de serveur DNS primaire défini"
70
76
 
71
- msgid ""
72
- "Template is read-only as it's supplied in foreman_bootdisk. Please copy it "
73
- "to a new template to customize."
74
- msgstr "Le modèle est en lecture seule car il est fourni par foreman_bootdisk. Merci de le recopier vers un nouveau modèle pour avoir une version éditable."
75
-
76
77
  msgid "Unable to find template specified by %s setting"
77
78
  msgstr "Impossible de trouver un modèle spécifié par le paramètre %s"
78
79
 
@@ -0,0 +1,2 @@
1
+ # Matches foreman_bootdisk.gemspec
2
+ _("Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure.")
@@ -7,9 +7,9 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: Foreman\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2014-02-13 12:18+0000\n"
11
- "PO-Revision-Date: 2014-03-30 04:00+0000\n"
12
- "Last-Translator: Flamarion Jorge Flamarion <jorge.flamarion@gmail.com>\n"
10
+ "POT-Creation-Date: 2014-08-05 17:10+0100\n"
11
+ "PO-Revision-Date: 2014-08-06 08:59+0000\n"
12
+ "Last-Translator: Dominic Cleal <dcleal@redhat.com>\n"
13
13
  "Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/foreman/language/pt_BR/)\n"
14
14
  "MIME-Version: 1.0\n"
15
15
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -61,17 +61,17 @@ msgstr "Caminho do diretório contendo imagens syslinux"
61
61
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
62
62
  msgstr "Por favor garanta que os pacotes ipxe-bootimgs e syslinux estejam instalados"
63
63
 
64
+ msgid ""
65
+ "Plugin for Foreman that creates iPXE-based boot disks to provision hosts "
66
+ "without the need for PXE infrastructure."
67
+ msgstr ""
68
+
64
69
  msgid "Subnet (%s) has no gateway defined"
65
70
  msgstr "Subrede (%s) não tem um gateway definido"
66
71
 
67
72
  msgid "Subnet (%s) has no primary DNS server defined"
68
73
  msgstr "Subrede (%s) não tem um servidor DNS primário definido"
69
74
 
70
- msgid ""
71
- "Template is read-only as it's supplied in foreman_bootdisk. Please copy it "
72
- "to a new template to customize."
73
- msgstr "Template está somente leitura como é fornecido em foreman_bootdisk. Por favor copie para um novo modelo e personalize."
74
-
75
75
  msgid "Unable to find template specified by %s setting"
76
76
  msgstr "Impossível encontrar template especificado pela configuração %s"
77
77
 
@@ -8,9 +8,9 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: Foreman\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2014-02-13 12:18+0000\n"
12
- "PO-Revision-Date: 2014-02-18 11:20+0000\n"
13
- "Last-Translator: johnny.westerlund <johnny.westerlund@gmail.com>\n"
11
+ "POT-Creation-Date: 2014-08-05 17:10+0100\n"
12
+ "PO-Revision-Date: 2014-08-06 08:59+0000\n"
13
+ "Last-Translator: Dominic Cleal <dcleal@redhat.com>\n"
14
14
  "Language-Team: Swedish (Sweden) (http://www.transifex.com/projects/p/foreman/language/sv_SE/)\n"
15
15
  "MIME-Version: 1.0\n"
16
16
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -62,17 +62,17 @@ msgstr "Sökvägen till ett bibliotek med syslinux-avbildningar"
62
62
  msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
63
63
  msgstr "Vär vänlig och säkerställ att ipxe-startavbildningarna och syslinux paketen är installerade."
64
64
 
65
+ msgid ""
66
+ "Plugin for Foreman that creates iPXE-based boot disks to provision hosts "
67
+ "without the need for PXE infrastructure."
68
+ msgstr ""
69
+
65
70
  msgid "Subnet (%s) has no gateway defined"
66
71
  msgstr "Subnät (%s) har ingen nätsluss definierad"
67
72
 
68
73
  msgid "Subnet (%s) has no primary DNS server defined"
69
74
  msgstr "Subnät (%s) har ingen primär DNS-server definierad"
70
75
 
71
- msgid ""
72
- "Template is read-only as it's supplied in foreman_bootdisk. Please copy it "
73
- "to a new template to customize."
74
- msgstr "Mallen är skrivskyddad eftersom den används i \"foreman_bootdisk\". Var vänligt och kopiera den till en ny mall för att ändra."
75
-
76
76
  msgid "Unable to find template specified by %s setting"
77
77
  msgstr "Går inte att hitta mallen specificerad med inställningen %s"
78
78
 
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <config xmlns="http://zanata.org/namespace/config/">
3
+ <url>https://translate.zanata.org/zanata/</url>
4
+ <project>satellite6-foreman-bootdisk</project>
5
+ <project-version>6.0</project-version>
6
+ <project-type>podir</project-type>
7
+ <locales>
8
+ <locale>fr</locale>
9
+ <locale>it</locale>
10
+ <locale>ja</locale>
11
+ <locale>ko</locale>
12
+ <locale>gu</locale>
13
+ <locale>hi</locale>
14
+ <locale>mr</locale>
15
+ <locale>or</locale>
16
+ <locale>ru</locale>
17
+ <locale>te</locale>
18
+ <locale>pa</locale>
19
+ <locale>kn</locale>
20
+ <locale map-from="de">de-DE</locale>
21
+ <locale map-from="es">es-ES</locale>
22
+ <locale map-from="pt_BR">pt-BR</locale>
23
+ <locale map-from="bn">bn-IN</locale>
24
+ <locale map-from="ta">ta-IN</locale>
25
+ <locale map-from="zh_CN">zh-Hans-CN</locale>
26
+ <locale map-from="zh_TW">zh-Hant-TW</locale>
27
+ </locales>
28
+ </config>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_bootdisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-05 00:00:00.000000000 Z
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Plugin for Foreman that creates iPXE-based boot disks to provision hosts
14
14
  without the need for PXE infrastructure.
@@ -25,8 +25,8 @@ files:
25
25
  - LICENSE
26
26
  - README.md
27
27
  - Rakefile
28
- - app/controllers/concerns/foreman_bootdisk/hosts_controller_ext.rb
29
28
  - app/controllers/concerns/foreman_bootdisk/unattended_controller_ext.rb
29
+ - app/controllers/foreman_bootdisk/api/v2/disks_controller.rb
30
30
  - app/controllers/foreman_bootdisk/disks_controller.rb
31
31
  - app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb
32
32
  - app/models/concerns/foreman_bootdisk/host_ext.rb
@@ -36,6 +36,7 @@ files:
36
36
  - app/views/foreman_bootdisk/generic_host.erb
37
37
  - app/views/foreman_bootdisk/host.erb
38
38
  - config/routes.rb
39
+ - config/routes/mount_engine.rb
39
40
  - db/migrate/20130914211030_create_host_bootdisk_template.rb
40
41
  - db/migrate/20130915104500_edit_host_bootdisk_template_multinic.rb
41
42
  - db/migrate/20130915133321_create_kickstart_bootdisk_template.rb
@@ -53,8 +54,10 @@ files:
53
54
  - locale/es/foreman_bootdisk.po
54
55
  - locale/foreman_bootdisk.pot
55
56
  - locale/fr/foreman_bootdisk.po
57
+ - locale/gemspec.rb
56
58
  - locale/pt_BR/foreman_bootdisk.po
57
59
  - locale/sv_SE/foreman_bootdisk.po
60
+ - locale/zanata.xml
58
61
  homepage: http://github.com/theforeman/foreman_bootdisk
59
62
  licenses:
60
63
  - GPL-3
@@ -1,31 +0,0 @@
1
- module ForemanBootdisk::HostsControllerExt
2
- extend ActiveSupport::Concern
3
-
4
- included do
5
- alias_method :find_by_name_bootiso, :find_by_name
6
- before_filter :find_by_name_bootiso, :only => %w[bootdisk_iso]
7
- alias_method_chain :current_permission, :bootdisk if method_defined?(:current_permission)
8
- end
9
-
10
- def bootdisk_iso
11
- begin
12
- tmpl = @host.bootdisk_template_render
13
- rescue => e
14
- error _('Failed to render boot disk template: %s') % e
15
- redirect_to :back
16
- return
17
- end
18
-
19
- ForemanBootdisk::ISOGenerator.new(tmpl).generate do |iso|
20
- send_data File.read(iso), :filename => "#{@host.name}.iso"
21
- end
22
- end
23
-
24
- def current_permission_with_bootdisk
25
- if params[:action] == 'bootdisk_iso'
26
- 'download_bootdisk'
27
- else
28
- current_permission_without_bootdisk
29
- end
30
- end
31
- end