foreman_setup 5.0.1 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES.md +9 -0
- data/README.md +3 -0
- data/app/controllers/foreman_setup/provisioners_controller.rb +7 -6
- data/app/helpers/foreman_setup/provisioner_helper.rb +5 -5
- data/app/models/foreman_setup/provisioner.rb +2 -2
- data/app/views/foreman_setup/provisioners/_step3.html.erb +4 -6
- data/db/migrate/20131023140100_add_provisioners.rb +1 -1
- data/db/migrate/20131025180600_add_provisioners_hostgroup.rb +1 -1
- data/db/migrate/20131028161000_add_provisioners_domain.rb +1 -1
- data/db/migrate/20140305165000_update_foreman_setup_permissions.rb +1 -1
- data/lib/foreman_setup/engine.rb +1 -1
- data/lib/foreman_setup/version.rb +1 -1
- data/locale/ca/foreman_setup.po +14 -13
- data/locale/de/foreman_setup.po +2 -2
- data/locale/en/foreman_setup.po +1 -1
- data/locale/en_GB/foreman_setup.po +3 -3
- data/locale/es/foreman_setup.po +3 -3
- data/locale/fr/foreman_setup.po +2 -2
- data/locale/it/foreman_setup.po +3 -3
- data/locale/ja/foreman_setup.po +4 -4
- data/locale/ko/foreman_setup.po +5 -5
- data/locale/pt_BR/foreman_setup.po +8 -7
- data/locale/ru/foreman_setup.po +2 -2
- data/locale/sv_SE/foreman_setup.po +2 -2
- data/locale/zh_CN/foreman_setup.po +9 -8
- data/locale/zh_TW/foreman_setup.po +5 -5
- data/test/factories/provisioners.rb +11 -11
- data/test/functional/foreman_setup/provisioners_controller_test.rb +20 -20
- data/test/test_plugin_helper.rb +3 -3
- data/test/unit/foreman_setup/provisioner_test.rb +2 -2
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2407b32f2eb94aec483e5d5196aac524e9295c73685dbcd1a4a98ce44a306fd4
|
4
|
+
data.tar.gz: 4a9c513318c239c3d4ee377f0cc69cdbc0fd61218d553a07962af516e49966c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc0c726ae42f5ed7bded2bf25ba053d299721c1359cdd1d66a85c1a9c48b5e04edd13984078eef6f52c9581c09b08f93fbd915313b316d92626872b5150a87c9
|
7
|
+
data.tar.gz: d8ab9d4e1ef58874c37217310481e9baccfd331b5b73dd2c246edb1b06b883b3f92916e098f7ee45625196ff303fc0c343fbd89139468edae07a6e9b7dcbb00b
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v8.0.0
|
4
|
+
* release for Foreman 3.2 or newer
|
5
|
+
|
6
|
+
## v7.0.0
|
7
|
+
* release for Foreman 1.22 or newer
|
8
|
+
|
9
|
+
## v6.0.0
|
10
|
+
* fix Foreman 1.17 compatibility with Rails 5
|
11
|
+
|
3
12
|
## v5.0.1
|
4
13
|
* use case-insensitive OS family comparisons
|
5
14
|
* change Katello installer commands
|
data/README.md
CHANGED
@@ -7,8 +7,8 @@ module ForemanSetup
|
|
7
7
|
include Foreman::Controller::Parameters::Subnet
|
8
8
|
include Foreman::Renderer
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
before_action :find_myself, :only => [:new, :create]
|
11
|
+
before_action :find_resource, :except => [:index, :new, :create]
|
12
12
|
|
13
13
|
def index
|
14
14
|
@provisioners = Provisioner.all.paginate :page => params[:page]
|
@@ -58,7 +58,7 @@ module ForemanSetup
|
|
58
58
|
@provisioner.domain = Domain.find_by_name(domain_name)
|
59
59
|
@provisioner.domain ||= Domain.new(:name => domain_name)
|
60
60
|
|
61
|
-
if @provisioner.
|
61
|
+
if @provisioner.update(provisioner_params)
|
62
62
|
@provisioner.subnet.domains << @provisioner.domain unless @provisioner.subnet.domains.include? @provisioner.domain
|
63
63
|
process_success :success_msg => _("Successfully updated subnet %s.") % @provisioner.subnet.name, :success_redirect => step3_foreman_setup_provisioner_path
|
64
64
|
else
|
@@ -96,7 +96,7 @@ module ForemanSetup
|
|
96
96
|
url.save!
|
97
97
|
|
98
98
|
# Build default PXE menu
|
99
|
-
status, msg = ProvisioningTemplate.build_pxe_default
|
99
|
+
status, msg = ProvisioningTemplate.build_pxe_default
|
100
100
|
warning msg unless status == 200
|
101
101
|
|
102
102
|
@provisioner.hostgroup.medium ||= @provisioner.host.os.media.first
|
@@ -105,7 +105,7 @@ module ForemanSetup
|
|
105
105
|
|
106
106
|
def step4_update
|
107
107
|
medium_id = params['foreman_setup_provisioner']['hostgroup_attributes'].try(:[], 'medium_id')
|
108
|
-
if medium_id.to_i
|
108
|
+
if medium_id.to_i.positive?
|
109
109
|
@medium = Medium.find(medium_id) || raise('unable to find medium')
|
110
110
|
else
|
111
111
|
@provisioner.hostgroup.medium_id = nil
|
@@ -121,7 +121,7 @@ module ForemanSetup
|
|
121
121
|
end
|
122
122
|
|
123
123
|
# Associate templates with OS and vice-versa
|
124
|
-
if @provisioner.host.os.family
|
124
|
+
if @provisioner.host.os.family&.casecmp('Redhat')&.zero?
|
125
125
|
tmpl_name = 'Kickstart'
|
126
126
|
provision_tmpl_name = @provisioner.host.os.name.casecmp('Redhat').zero? ? 'Kickstart RHEL' : tmpl_name
|
127
127
|
ipxe_tmpl_name = 'Kickstart'
|
@@ -135,6 +135,7 @@ module ForemanSetup
|
|
135
135
|
|
136
136
|
{'provision' => provision_tmpl_name, 'PXELinux' => tmpl_name, 'iPXE' => ipxe_tmpl_name, 'finish' => finish_tmpl_name}.each do |kind_name, tmpl_name|
|
137
137
|
next if tmpl_name.blank?
|
138
|
+
|
138
139
|
kind = TemplateKind.find_by_name(kind_name)
|
139
140
|
tmpls = ProvisioningTemplate.where('name LIKE ?', "#{tmpl_name}%").where(:template_kind_id => kind.id)
|
140
141
|
tmpls.any? || raise("cannot find template for #{@provisioner.host.os}")
|
@@ -3,11 +3,11 @@ module ForemanSetup
|
|
3
3
|
def provisioner_wizard(step)
|
4
4
|
wizard_header(
|
5
5
|
step,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
_("Pre-requisites"),
|
7
|
+
_("Network config"),
|
8
|
+
_("Foreman installer"),
|
9
|
+
_("Installation media"),
|
10
|
+
_("Completion")
|
11
11
|
)
|
12
12
|
end
|
13
13
|
end
|
@@ -1,9 +1,8 @@
|
|
1
1
|
require 'ipaddr'
|
2
2
|
|
3
3
|
module ForemanSetup
|
4
|
-
class Provisioner <
|
4
|
+
class Provisioner < ApplicationRecord
|
5
5
|
include ::Authorizable
|
6
|
-
include ::Host::Hostmix
|
7
6
|
|
8
7
|
before_save :populate_hostgroup
|
9
8
|
|
@@ -65,6 +64,7 @@ module ForemanSetup
|
|
65
64
|
# Ensures our nested hostgroup has as much data as possible
|
66
65
|
def populate_hostgroup
|
67
66
|
return unless hostgroup.present?
|
67
|
+
|
68
68
|
hostgroup.architecture_id ||= architecture.id
|
69
69
|
hostgroup.domain_id ||= domain.id
|
70
70
|
hostgroup.operatingsystem_id ||= operatingsystem.id
|
@@ -26,9 +26,8 @@ foreman-installer \
|
|
26
26
|
--foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
|
27
27
|
<%= provisioner.dns_forwarders.map { |f| " --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
|
28
28
|
<% if defined? Katello %>
|
29
|
-
--foreman-proxy-
|
30
|
-
--foreman-proxy-
|
31
|
-
--foreman-proxy-foreman-oauth-secret=<%= Setting[:oauth_consumer_secret] %>
|
29
|
+
--foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
|
30
|
+
--foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
|
32
31
|
<% else %>
|
33
32
|
--foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
|
34
33
|
--foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
|
@@ -50,9 +49,8 @@ foreman-installer \
|
|
50
49
|
--foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
|
51
50
|
<%= provisioner.dns_forwarders.map { |f| " --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
|
52
51
|
<% if defined? Katello %>
|
53
|
-
--foreman-proxy-
|
54
|
-
--foreman-proxy-
|
55
|
-
--foreman-proxy-foreman-oauth-secret=<%= Setting[:oauth_consumer_secret] %>
|
52
|
+
--foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
|
53
|
+
--foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
|
56
54
|
<% else %>
|
57
55
|
--foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
|
58
56
|
--foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class UpdateForemanSetupPermissions < ActiveRecord::Migration
|
1
|
+
class UpdateForemanSetupPermissions < ActiveRecord::Migration[4.2]
|
2
2
|
def self.up
|
3
3
|
old_permission = ::Permission.where(:name => "edit_provisioning", :resource_type => nil).first
|
4
4
|
new_permission = ::Permission.where(:name => "edit_provisioning", :resource_type => "ForemanSetup::Provisioner").first
|
data/lib/foreman_setup/engine.rb
CHANGED
@@ -16,7 +16,7 @@ module ForemanSetup
|
|
16
16
|
|
17
17
|
initializer 'foreman_setup.register_plugin', :before => :finisher_hook do |app|
|
18
18
|
Foreman::Plugin.register :foreman_setup do
|
19
|
-
requires_foreman '>= 1.
|
19
|
+
requires_foreman '>= 1.22.0'
|
20
20
|
|
21
21
|
menu :top_menu, :provisioners, :url_hash => {:controller=> :'foreman_setup/provisioners', :action=>:index},
|
22
22
|
:caption=> N_('Provisioning setup'),
|
data/locale/ca/foreman_setup.po
CHANGED
@@ -3,14 +3,15 @@
|
|
3
3
|
# This file is distributed under the same license as foreman_setup.
|
4
4
|
#
|
5
5
|
# Translators:
|
6
|
-
# Robert Antoni Buj
|
6
|
+
# Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2017
|
7
|
+
# Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2015
|
7
8
|
msgid ""
|
8
9
|
msgstr ""
|
9
|
-
"Project-Id-Version: foreman_setup
|
10
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
10
11
|
"Report-Msgid-Bugs-To: \n"
|
11
12
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
12
|
-
"PO-Revision-Date:
|
13
|
-
"Last-Translator: Robert Antoni Buj
|
13
|
+
"PO-Revision-Date: 2017-12-12 12:40+0000\n"
|
14
|
+
"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
|
14
15
|
"Language-Team: Catalan (http://www.transifex.com/foreman/foreman/language/ca/)\n"
|
15
16
|
"MIME-Version: 1.0\n"
|
16
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -31,7 +32,7 @@ msgid ""
|
|
31
32
|
"All of the necessary components have been set up for provisioning support. "
|
32
33
|
"You can now provision new hosts by registering them from the Hosts page, "
|
33
34
|
"then PXE-boot the server on the subnet set up earlier."
|
34
|
-
msgstr "Tots els components necessaris han estat preparats per a la compatibilitat amb l'aprovisionament. Ara podeu aprovisionar els nous
|
35
|
+
msgstr "Tots els components necessaris han estat preparats per a la compatibilitat amb l'aprovisionament. Ara podeu aprovisionar els amfitrions nous tot registrant-los a la pàgina «Amfitrions», després arranqueu el servidor per PXE en la subxarxa per configurar-ho més ràpid."
|
35
36
|
|
36
37
|
msgid ""
|
37
38
|
"All of the necessary network information has been collected, now run the "
|
@@ -46,10 +47,10 @@ msgid "Compute Resources"
|
|
46
47
|
msgstr "Recursos computacionals"
|
47
48
|
|
48
49
|
msgid "Create and provision a new host"
|
49
|
-
msgstr "Crea i aprovisiona un nou
|
50
|
+
msgstr "Crea i aprovisiona un amfitrió nou"
|
50
51
|
|
51
52
|
msgid "Create new installation medium"
|
52
|
-
msgstr "Crea un
|
53
|
+
msgstr "Crea un mitjà d'instal·lació nou"
|
53
54
|
|
54
55
|
msgid "Delete %s?"
|
55
56
|
msgstr "Voleu suprimir %s?"
|
@@ -85,7 +86,7 @@ msgid ""
|
|
85
86
|
"If installation media has already been set up, it can be selected below and "
|
86
87
|
"the wizard will complete the necessary associations. Otherwise use the "
|
87
88
|
"fields below, or the Installation Media page in Foreman to add new media."
|
88
|
-
msgstr "Si s'ha establert el mitjà d'instal·lació, aquest es pot seleccionar a continuació, i l'assistent completarà les associacions necessàries. En cas contrari, utilitzeu els camps de sota, o la pàgina «Mitjà d'instal·lació» a Foreman per afegir nous
|
89
|
+
msgstr "Si s'ha establert el mitjà d'instal·lació, aquest es pot seleccionar a continuació, i l'assistent completarà les associacions necessàries. En cas contrari, utilitzeu els camps de sota, o la pàgina «Mitjà d'instal·lació» a Foreman per afegir mitjans nous."
|
89
90
|
|
90
91
|
msgid "Install provisioning with DHCP"
|
91
92
|
msgstr "Instal·la l'aprovisionament amb DHCP"
|
@@ -109,7 +110,7 @@ msgid "Network selection"
|
|
109
110
|
msgstr "Selecció de la xarxa"
|
110
111
|
|
111
112
|
msgid "New Host"
|
112
|
-
msgstr "
|
113
|
+
msgstr "Amfitrió nou"
|
113
114
|
|
114
115
|
msgid "Next"
|
115
116
|
msgstr "Següent"
|
@@ -142,7 +143,7 @@ msgid "Provision from %s"
|
|
142
143
|
msgstr "Aprovisionament des de %s"
|
143
144
|
|
144
145
|
msgid "Provisioning Setup"
|
145
|
-
msgstr "
|
146
|
+
msgstr "Preparació d'aprovisionament"
|
146
147
|
|
147
148
|
msgid "Provisioning host"
|
148
149
|
msgstr "Amfitrió d'aprovisionament"
|
@@ -151,16 +152,16 @@ msgid "Provisioning network"
|
|
151
152
|
msgstr "Xarxa d'aprovisionament"
|
152
153
|
|
153
154
|
msgid "Provisioning setup"
|
154
|
-
msgstr "
|
155
|
+
msgstr "Preparació d'aprovisionament"
|
155
156
|
|
156
157
|
msgid "Provisioning setup complete"
|
157
|
-
msgstr "S'ha completat la
|
158
|
+
msgstr "S'ha completat la preparació d'aprovisionament"
|
158
159
|
|
159
160
|
msgid "Red Hat Satellite 5 or Spacewalk"
|
160
161
|
msgstr "Red Hat Satellite 5 o Spacewalk"
|
161
162
|
|
162
163
|
msgid "Return to the main provisioning setup page"
|
163
|
-
msgstr "Torna a la pàgina principal de la
|
164
|
+
msgstr "Torna a la pàgina principal de la preparació d'aprovisionament"
|
164
165
|
|
165
166
|
msgid "Review and edit the host group set up by the provisioning wizard"
|
166
167
|
msgstr "Reviseu i editeu el grup d'amfitrions que s'ha configurat amb l'assistent d'aprovisionament"
|
data/locale/de/foreman_setup.po
CHANGED
@@ -7,10 +7,10 @@
|
|
7
7
|
# Ettore Atalan <atalanttore@googlemail.com>, 2014
|
8
8
|
msgid ""
|
9
9
|
msgstr ""
|
10
|
-
"Project-Id-Version: foreman_setup
|
10
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
12
12
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
13
|
-
"PO-Revision-Date:
|
13
|
+
"PO-Revision-Date: 2017-09-20 10:08+0000\n"
|
14
14
|
"Last-Translator: Christina Gurski <Gurski_christina@yahoo.de>\n"
|
15
15
|
"Language-Team: German (http://www.transifex.com/foreman/foreman/language/de/)\n"
|
16
16
|
"MIME-Version: 1.0\n"
|
data/locale/en/foreman_setup.po
CHANGED
@@ -4,13 +4,13 @@
|
|
4
4
|
#
|
5
5
|
# Translators:
|
6
6
|
# Andi Chandler <andi@gowling.com>, 2015
|
7
|
-
#
|
7
|
+
# 0868a4d1af5275b3f70b0a6dac4c99a4, 2014
|
8
8
|
msgid ""
|
9
9
|
msgstr ""
|
10
|
-
"Project-Id-Version: foreman_setup
|
10
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
12
12
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
13
|
-
"PO-Revision-Date:
|
13
|
+
"PO-Revision-Date: 2017-10-12 21:21+0000\n"
|
14
14
|
"Last-Translator: Andi Chandler <andi@gowling.com>\n"
|
15
15
|
"Language-Team: English (United Kingdom) (http://www.transifex.com/foreman/foreman/language/en_GB/)\n"
|
16
16
|
"MIME-Version: 1.0\n"
|
data/locale/es/foreman_setup.po
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# Sergio Ocón <sergio.ocon@redhat.com>, 2014
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: foreman_setup
|
9
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
11
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
12
|
-
"PO-Revision-Date:
|
13
|
-
"Last-Translator:
|
12
|
+
"PO-Revision-Date: 2018-03-27 13:24+0000\n"
|
13
|
+
"Last-Translator: Bryan Kearney <bryan.kearney@gmail.com>\n"
|
14
14
|
"Language-Team: Spanish (http://www.transifex.com/foreman/foreman/language/es/)\n"
|
15
15
|
"MIME-Version: 1.0\n"
|
16
16
|
"Content-Type: text/plain; charset=UTF-8\n"
|
data/locale/fr/foreman_setup.po
CHANGED
@@ -7,10 +7,10 @@
|
|
7
7
|
# Pierre-Emmanuel Dutang <dutangp@gmail.com>, 2014
|
8
8
|
msgid ""
|
9
9
|
msgstr ""
|
10
|
-
"Project-Id-Version: foreman_setup
|
10
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
12
12
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
13
|
-
"PO-Revision-Date:
|
13
|
+
"PO-Revision-Date: 2017-09-20 10:08+0000\n"
|
14
14
|
"Last-Translator: Claer <transiblu@claer.hammock.fr>\n"
|
15
15
|
"Language-Team: French (http://www.transifex.com/foreman/foreman/language/fr/)\n"
|
16
16
|
"MIME-Version: 1.0\n"
|
data/locale/it/foreman_setup.po
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_setup
|
8
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
11
11
|
"PO-Revision-Date: 2014-08-20 08:30+0000\n"
|
@@ -78,7 +78,7 @@ msgid "Host %s has at least one network interface"
|
|
78
78
|
msgstr ""
|
79
79
|
|
80
80
|
msgid "Hostname"
|
81
|
-
msgstr ""
|
81
|
+
msgstr "Nome host"
|
82
82
|
|
83
83
|
msgid ""
|
84
84
|
"If installation media has already been set up, it can be selected below and "
|
@@ -111,7 +111,7 @@ msgid "New Host"
|
|
111
111
|
msgstr "Nuovo Host"
|
112
112
|
|
113
113
|
msgid "Next"
|
114
|
-
msgstr ""
|
114
|
+
msgstr "Successivo"
|
115
115
|
|
116
116
|
msgid "Next steps"
|
117
117
|
msgstr ""
|
data/locale/ja/foreman_setup.po
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
# This file is distributed under the same license as foreman_setup.
|
4
4
|
#
|
5
5
|
# Translators:
|
6
|
-
# Shuji Yamada <uzy.exe@gmail.com>, 2015
|
6
|
+
# 山田 修司 🍣 Shuji Yamada <uzy.exe@gmail.com>, 2015
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: foreman_setup
|
9
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
11
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
12
|
-
"PO-Revision-Date:
|
13
|
-
"Last-Translator:
|
12
|
+
"PO-Revision-Date: 2018-03-27 14:09+0000\n"
|
13
|
+
"Last-Translator: Bryan Kearney <bryan.kearney@gmail.com>\n"
|
14
14
|
"Language-Team: Japanese (http://www.transifex.com/foreman/foreman/language/ja/)\n"
|
15
15
|
"MIME-Version: 1.0\n"
|
16
16
|
"Content-Type: text/plain; charset=UTF-8\n"
|
data/locale/ko/foreman_setup.po
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_setup
|
8
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
11
|
-
"PO-Revision-Date:
|
12
|
-
"Last-Translator:
|
11
|
+
"PO-Revision-Date: 2018-01-05 19:26+0000\n"
|
12
|
+
"Last-Translator: 0868a4d1af5275b3f70b0a6dac4c99a4\n"
|
13
13
|
"Language-Team: Korean (http://www.transifex.com/foreman/foreman/language/ko/)\n"
|
14
14
|
"MIME-Version: 1.0\n"
|
15
15
|
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -78,7 +78,7 @@ msgid "Host %s has at least one network interface"
|
|
78
78
|
msgstr ""
|
79
79
|
|
80
80
|
msgid "Hostname"
|
81
|
-
msgstr ""
|
81
|
+
msgstr "호스트 이름 "
|
82
82
|
|
83
83
|
msgid ""
|
84
84
|
"If installation media has already been set up, it can be selected below and "
|
@@ -111,7 +111,7 @@ msgid "New Host"
|
|
111
111
|
msgstr "새 호스트"
|
112
112
|
|
113
113
|
msgid "Next"
|
114
|
-
msgstr ""
|
114
|
+
msgstr "다음"
|
115
115
|
|
116
116
|
msgid "Next steps"
|
117
117
|
msgstr ""
|
@@ -3,15 +3,16 @@
|
|
3
3
|
# This file is distributed under the same license as foreman_setup.
|
4
4
|
#
|
5
5
|
# Translators:
|
6
|
-
#
|
7
|
-
#
|
6
|
+
# Luiz Henrique Vasconcelos <luizvasconceloss@yahoo.com.br>, 2016
|
7
|
+
# Luiz Henrique Vasconcelos <luizvasconceloss@yahoo.com.br>, 2015
|
8
|
+
# Odilon Junior <odilon.junior93@gmail.com>, 2015
|
8
9
|
msgid ""
|
9
10
|
msgstr ""
|
10
|
-
"Project-Id-Version: foreman_setup
|
11
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
11
12
|
"Report-Msgid-Bugs-To: \n"
|
12
13
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
13
|
-
"PO-Revision-Date:
|
14
|
-
"Last-Translator:
|
14
|
+
"PO-Revision-Date: 2019-03-18 15:24+0000\n"
|
15
|
+
"Last-Translator: Bryan Kearney <bryan.kearney@gmail.com>\n"
|
15
16
|
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/foreman/foreman/language/pt_BR/)\n"
|
16
17
|
"MIME-Version: 1.0\n"
|
17
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -41,7 +42,7 @@ msgid ""
|
|
41
42
|
msgstr ""
|
42
43
|
|
43
44
|
msgid "Completion"
|
44
|
-
msgstr ""
|
45
|
+
msgstr "Conclusão"
|
45
46
|
|
46
47
|
msgid "Compute Resources"
|
47
48
|
msgstr "Recursos de computação"
|
@@ -80,7 +81,7 @@ msgid "Host %s has at least one network interface"
|
|
80
81
|
msgstr ""
|
81
82
|
|
82
83
|
msgid "Hostname"
|
83
|
-
msgstr ""
|
84
|
+
msgstr "Nome de máquina"
|
84
85
|
|
85
86
|
msgid ""
|
86
87
|
"If installation media has already been set up, it can be selected below and "
|
data/locale/ru/foreman_setup.po
CHANGED
@@ -6,10 +6,10 @@
|
|
6
6
|
# Vladimir Pavlov <v.pavlov@i-teco.ru>, 2015
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: foreman_setup
|
9
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
11
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
12
|
-
"PO-Revision-Date:
|
12
|
+
"PO-Revision-Date: 2017-12-01 20:58+0000\n"
|
13
13
|
"Last-Translator: Vladimir Pavlov <v.pavlov@i-teco.ru>\n"
|
14
14
|
"Language-Team: Russian (http://www.transifex.com/foreman/foreman/language/ru/)\n"
|
15
15
|
"MIME-Version: 1.0\n"
|
@@ -6,10 +6,10 @@
|
|
6
6
|
# johnny.westerlund <johnny.westerlund@gmail.com>, 2014
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: foreman_setup
|
9
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
11
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
12
|
-
"PO-Revision-Date:
|
12
|
+
"PO-Revision-Date: 2017-09-20 10:08+0000\n"
|
13
13
|
"Last-Translator: johnny.westerlund <johnny.westerlund@gmail.com>\n"
|
14
14
|
"Language-Team: Swedish (Sweden) (http://www.transifex.com/foreman/foreman/language/sv_SE/)\n"
|
15
15
|
"MIME-Version: 1.0\n"
|
@@ -3,13 +3,14 @@
|
|
3
3
|
# This file is distributed under the same license as foreman_setup.
|
4
4
|
#
|
5
5
|
# Translators:
|
6
|
+
# Xingchao Yu <yuxcer@gmail.com>, 2017
|
6
7
|
msgid ""
|
7
8
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_setup
|
9
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
9
10
|
"Report-Msgid-Bugs-To: \n"
|
10
11
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
11
|
-
"PO-Revision-Date:
|
12
|
-
"Last-Translator:
|
12
|
+
"PO-Revision-Date: 2017-12-01 20:58+0000\n"
|
13
|
+
"Last-Translator: Xingchao Yu <yuxcer@gmail.com>\n"
|
13
14
|
"Language-Team: Chinese (China) (http://www.transifex.com/foreman/foreman/language/zh_CN/)\n"
|
14
15
|
"MIME-Version: 1.0\n"
|
15
16
|
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -60,7 +61,7 @@ msgid "Domain|Name"
|
|
60
61
|
msgstr "名称"
|
61
62
|
|
62
63
|
msgid "Edit Host Group"
|
63
|
-
msgstr ""
|
64
|
+
msgstr "编辑主机组"
|
64
65
|
|
65
66
|
msgid "Existing medium"
|
66
67
|
msgstr ""
|
@@ -78,7 +79,7 @@ msgid "Host %s has at least one network interface"
|
|
78
79
|
msgstr ""
|
79
80
|
|
80
81
|
msgid "Hostname"
|
81
|
-
msgstr ""
|
82
|
+
msgstr "主机名"
|
82
83
|
|
83
84
|
msgid ""
|
84
85
|
"If installation media has already been set up, it can be selected below and "
|
@@ -102,7 +103,7 @@ msgid "Missing registered smart proxy %s, please ensure it is registered"
|
|
102
103
|
msgstr ""
|
103
104
|
|
104
105
|
msgid "Network config"
|
105
|
-
msgstr ""
|
106
|
+
msgstr "网络配置"
|
106
107
|
|
107
108
|
msgid "Network selection"
|
108
109
|
msgstr ""
|
@@ -111,10 +112,10 @@ msgid "New Host"
|
|
111
112
|
msgstr "新建主机"
|
112
113
|
|
113
114
|
msgid "Next"
|
114
|
-
msgstr ""
|
115
|
+
msgstr "下一项"
|
115
116
|
|
116
117
|
msgid "Next steps"
|
117
|
-
msgstr ""
|
118
|
+
msgstr "下一步"
|
118
119
|
|
119
120
|
msgid "No network interfaces listed in $interfaces fact"
|
120
121
|
msgstr ""
|
@@ -5,11 +5,11 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_setup
|
8
|
+
"Project-Id-Version: foreman_setup 7.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"POT-Creation-Date: 2014-08-20 09:25+0100\n"
|
11
|
-
"PO-Revision-Date:
|
12
|
-
"Last-Translator:
|
11
|
+
"PO-Revision-Date: 2018-03-27 15:20+0000\n"
|
12
|
+
"Last-Translator: Bryan Kearney <bryan.kearney@gmail.com>\n"
|
13
13
|
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/foreman/foreman/language/zh_TW/)\n"
|
14
14
|
"MIME-Version: 1.0\n"
|
15
15
|
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -78,7 +78,7 @@ msgid "Host %s has at least one network interface"
|
|
78
78
|
msgstr ""
|
79
79
|
|
80
80
|
msgid "Hostname"
|
81
|
-
msgstr ""
|
81
|
+
msgstr "主機名稱"
|
82
82
|
|
83
83
|
msgid ""
|
84
84
|
"If installation media has already been set up, it can be selected below and "
|
@@ -111,7 +111,7 @@ msgid "New Host"
|
|
111
111
|
msgstr "新增主機"
|
112
112
|
|
113
113
|
msgid "Next"
|
114
|
-
msgstr ""
|
114
|
+
msgstr "下一個"
|
115
115
|
|
116
116
|
msgid "Next steps"
|
117
117
|
msgstr ""
|
@@ -1,25 +1,25 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :setup_provisioner, :class => ForemanSetup::Provisioner do
|
3
3
|
host do
|
4
|
-
association :host, :
|
4
|
+
association :host, :managed, :domain => FactoryBot.create(:domain)
|
5
5
|
end
|
6
6
|
smart_proxy { association :smart_proxy, :url => "https://#{host.name}:8443" }
|
7
7
|
|
8
8
|
# After step1, interface selection
|
9
9
|
trait :step1 do
|
10
|
-
provision_interface 'eth0'
|
10
|
+
provision_interface { 'eth0' }
|
11
11
|
after(:create) do |prov, evaluator|
|
12
|
-
fact =
|
13
|
-
|
12
|
+
fact = FactoryBot.create(:fact_name, :name => "ipaddress_#{prov.provision_interface}")
|
13
|
+
FactoryBot.create(:fact_value, :fact_name => fact, :host => prov.host, :value => '192.168.1.20')
|
14
14
|
|
15
|
-
fact =
|
16
|
-
|
15
|
+
fact = FactoryBot.create(:fact_name, :name => "network_#{prov.provision_interface}")
|
16
|
+
FactoryBot.create(:fact_value, :fact_name => fact, :host => prov.host, :value => '192.168.1.0')
|
17
17
|
|
18
|
-
fact =
|
19
|
-
|
18
|
+
fact = FactoryBot.create(:fact_name, :name => "netmask_#{prov.provision_interface}")
|
19
|
+
FactoryBot.create(:fact_value, :fact_name => fact, :host => prov.host, :value => '255.255.255.0')
|
20
20
|
|
21
|
-
fact =
|
22
|
-
|
21
|
+
fact = FactoryBot.create(:fact_name, :name => 'interfaces')
|
22
|
+
FactoryBot.create(:fact_value, :fact_name => fact, :host => prov.host, :value => 'lo,eth0,eth1')
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -2,26 +2,26 @@ require 'test_plugin_helper'
|
|
2
2
|
|
3
3
|
class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
4
4
|
test '#index without provisioner' do
|
5
|
-
get :index,
|
5
|
+
get :index, session: set_session_user
|
6
6
|
assert_redirected_to new_foreman_setup_provisioner_path
|
7
7
|
end
|
8
8
|
|
9
9
|
test '#index with provisioner' do
|
10
|
-
|
11
|
-
get :index,
|
10
|
+
FactoryBot.create :setup_provisioner
|
11
|
+
get :index, session: set_session_user
|
12
12
|
assert_response :success
|
13
13
|
assert_template 'foreman_setup/provisioners/index'
|
14
14
|
end
|
15
15
|
|
16
16
|
context 'pre-creation' do
|
17
17
|
setup do
|
18
|
-
@host =
|
18
|
+
@host = FactoryBot.create(:host, :domain => FactoryBot.create(:domain))
|
19
19
|
Facter.expects(:value).with(:fqdn).returns(@host.name).at_least_once
|
20
|
-
@proxy =
|
20
|
+
@proxy = FactoryBot.create(:smart_proxy, :url => "https://#{@host.name}:8443")
|
21
21
|
end
|
22
22
|
|
23
23
|
test '#new' do
|
24
|
-
get :new,
|
24
|
+
get :new, session: set_session_user
|
25
25
|
assert_response :success
|
26
26
|
assert_equal @host, assigns(:host)
|
27
27
|
assert_equal @proxy, assigns(:proxy)
|
@@ -29,7 +29,7 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
29
29
|
end
|
30
30
|
|
31
31
|
test '#create success' do
|
32
|
-
post :create, {'foreman_setup_provisioner' => {:host_id => @host.id, :smart_proxy_id => @proxy.id, :provision_interface => 'eth0'}}, set_session_user
|
32
|
+
post :create, params: { 'foreman_setup_provisioner' => {:host_id => @host.id, :smart_proxy_id => @proxy.id, :provision_interface => 'eth0'} }, session: set_session_user
|
33
33
|
|
34
34
|
prov = ForemanSetup::Provisioner.find_by_host_id(@host.id)
|
35
35
|
assert prov
|
@@ -43,7 +43,7 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
43
43
|
end
|
44
44
|
|
45
45
|
test '#create failure' do
|
46
|
-
post :create,
|
46
|
+
post :create, session: set_session_user
|
47
47
|
assert_equal @host, assigns(:host)
|
48
48
|
assert_equal @proxy, assigns(:proxy)
|
49
49
|
assert_template 'foreman_setup/provisioners/_step1'
|
@@ -51,8 +51,8 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
51
51
|
end
|
52
52
|
|
53
53
|
test '#step2 with new subnet' do
|
54
|
-
prov =
|
55
|
-
get :step2, {:id => prov.id}, set_session_user
|
54
|
+
prov = FactoryBot.create(:setup_provisioner, :step1)
|
55
|
+
get :step2, params: { :id => prov.id }, session: set_session_user
|
56
56
|
assert_response :success
|
57
57
|
assert_template 'foreman_setup/provisioners/_step2'
|
58
58
|
|
@@ -65,10 +65,10 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
65
65
|
end
|
66
66
|
|
67
67
|
test '#step2_update' do
|
68
|
-
prov =
|
68
|
+
prov = FactoryBot.create(:setup_provisioner, :step1)
|
69
69
|
Facter.expects(:value).with(:fqdn).returns(prov.host.name).at_least_once
|
70
70
|
|
71
|
-
put :step2_update, {:id => prov.id, 'foreman_setup_provisioner' => {:subnet_attributes => {'name' => 'test', :network => '192.168.1.0', :mask => '255.255.255.0'}, :domain_name => prov.host.domain.name}}, set_session_user
|
71
|
+
put :step2_update, params: { :id => prov.id, 'foreman_setup_provisioner' => {:subnet_attributes => {'name' => 'test', :network => '192.168.1.0', :mask => '255.255.255.0'}, :domain_name => prov.host.domain.name} }, session: set_session_user
|
72
72
|
assert_redirected_to step3_foreman_setup_provisioner_path(prov)
|
73
73
|
|
74
74
|
as_admin do
|
@@ -93,14 +93,14 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
93
93
|
end
|
94
94
|
|
95
95
|
test '#step3' do
|
96
|
-
prov =
|
97
|
-
get :step3, {:id => prov.id}, set_session_user
|
96
|
+
prov = FactoryBot.create(:setup_provisioner, :step2)
|
97
|
+
get :step3, params: { :id => prov.id }, session: set_session_user
|
98
98
|
assert_response :success
|
99
99
|
assert_template 'foreman_setup/provisioners/_step3'
|
100
100
|
end
|
101
101
|
|
102
102
|
test '#step4' do
|
103
|
-
prov =
|
103
|
+
prov = FactoryBot.create(:setup_provisioner, :step2)
|
104
104
|
|
105
105
|
SmartProxy.any_instance.expects(:refresh)
|
106
106
|
prov.smart_proxy.features = Feature.where(:name => ['DNS', 'DHCP', 'TFTP'])
|
@@ -108,7 +108,7 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
108
108
|
|
109
109
|
ProvisioningTemplate.expects(:build_pxe_default).returns(200, 'Sucess')
|
110
110
|
|
111
|
-
get :step4, {:id => prov.id}, set_session_user
|
111
|
+
get :step4, params: { :id => prov.id }, session: set_session_user
|
112
112
|
assert_response :success
|
113
113
|
assert_template 'foreman_setup/provisioners/_step4'
|
114
114
|
assert assigns(:medium)
|
@@ -125,13 +125,13 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
125
125
|
end
|
126
126
|
|
127
127
|
test '#step4_update' do
|
128
|
-
prov =
|
128
|
+
prov = FactoryBot.create(:setup_provisioner, :step2)
|
129
129
|
|
130
130
|
attrs = {
|
131
131
|
:hostgroup_attributes => {},
|
132
132
|
:create_medium => {:name => 'test', :path => 'http://mirror.example.com'},
|
133
133
|
}
|
134
|
-
put :step4_update, {:id => prov.id, 'foreman_setup_provisioner' => attrs}, set_session_user
|
134
|
+
put :step4_update, params: { :id => prov.id, 'foreman_setup_provisioner' => attrs }, session: set_session_user
|
135
135
|
assert_redirected_to step5_foreman_setup_provisioner_path(prov)
|
136
136
|
|
137
137
|
as_admin do
|
@@ -148,8 +148,8 @@ class ForemanSetup::ProvisionersControllerTest < ActionController::TestCase
|
|
148
148
|
end
|
149
149
|
|
150
150
|
test '#step5' do
|
151
|
-
prov =
|
152
|
-
get :step5, {:id => prov.id}, set_session_user
|
151
|
+
prov = FactoryBot.create(:setup_provisioner, :step2)
|
152
|
+
get :step5, params: { :id => prov.id }, session: set_session_user
|
153
153
|
assert_response :success
|
154
154
|
assert_template 'foreman_setup/provisioners/_step5'
|
155
155
|
end
|
data/test/test_plugin_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This calls the main test_helper in Foreman core
|
2
2
|
require 'test_helper'
|
3
3
|
|
4
|
-
# Add plugin to
|
5
|
-
|
6
|
-
|
4
|
+
# Add plugin to FactoryBot's paths
|
5
|
+
FactoryBot.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
|
6
|
+
FactoryBot.reload
|
@@ -2,12 +2,12 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class ForemanSetupProvisionerTest < ActiveSupport::TestCase
|
4
4
|
test '#interfaces returns hash' do
|
5
|
-
prov =
|
5
|
+
prov = FactoryBot.create(:setup_provisioner, :step1)
|
6
6
|
assert_equal({'eth0' => {:ip => '192.168.1.20', :mask => '255.255.255.0', :network => '192.168.1.0', :cidr => '192.168.1.0/24'}}, prov.interfaces)
|
7
7
|
end
|
8
8
|
|
9
9
|
test '#provision_interface_data returns hash' do
|
10
|
-
prov =
|
10
|
+
prov = FactoryBot.create(:setup_provisioner, :step1)
|
11
11
|
assert_equal({:ip => '192.168.1.20', :mask => '255.255.255.0', :network => '192.168.1.0', :cidr => '192.168.1.0/24'}, prov.provision_interface_data)
|
12
12
|
end
|
13
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Cleal
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Plugin for Foreman that helps set up provisioning.
|
14
14
|
email: dcleal@redhat.com
|
@@ -81,11 +81,11 @@ files:
|
|
81
81
|
- test/functional/foreman_setup/provisioners_controller_test.rb
|
82
82
|
- test/test_plugin_helper.rb
|
83
83
|
- test/unit/foreman_setup/provisioner_test.rb
|
84
|
-
homepage:
|
84
|
+
homepage: https://github.com/theforeman/foreman_setup
|
85
85
|
licenses:
|
86
86
|
- GPL-3
|
87
87
|
metadata: {}
|
88
|
-
post_install_message:
|
88
|
+
post_install_message:
|
89
89
|
rdoc_options: []
|
90
90
|
require_paths:
|
91
91
|
- lib
|
@@ -100,9 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
|
104
|
-
|
105
|
-
signing_key:
|
103
|
+
rubygems_version: 3.1.6
|
104
|
+
signing_key:
|
106
105
|
specification_version: 4
|
107
106
|
summary: Helps set up Foreman for provisioning
|
108
107
|
test_files: []
|