foreman_virt_who_configure 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/foreman_virt_who_configure/config.rb +12 -3
- data/app/models/foreman_virt_who_configure/output_generator.rb +3 -2
- data/app/views/foreman_virt_who_configure/configs/steps/_connection_form.erb +2 -2
- data/lib/foreman_virt_who_configure/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe633c7a71e52d7c3147991e799004c5485395776abedd61f5864fac80a7714
|
4
|
+
data.tar.gz: a493b3989deffb1bb8e0da3ba3821e20c900f6da05505a0aef70621984658046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c8df97b8a0b6b699dfb2a38f8a5715a609bdd92f119c2e6ece75e75fcd6002f54db833a32a79623f4b6d30a8cf663e9de4f6c8a82a79481de00c3d6ddb44ad
|
7
|
+
data.tar.gz: 541cf3ec422f78a999975f54a7f0d8c79d32166c7ce252050ef03ef944606d79ff8f6b8187d8f5b6b04b1db5630f6c97646350a649129a8bbd173dff72f138f2
|
@@ -139,9 +139,7 @@ module ForemanVirtWhoConfigure
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def validates_hypervisor_options
|
142
|
-
|
143
|
-
invalid.concat(AHV_VALID_OPTIONS) unless hypervisor_type == 'ahv'
|
144
|
-
invalid.each { |f| errors.add(f, "Invalid option for hypervisor [#{hypervisor_type}]") if eval(f).present? }
|
142
|
+
invalid_fields.each { |f| errors.add(f, "Invalid option for hypervisor [#{hypervisor_type}]") if eval(f).present? }
|
145
143
|
end
|
146
144
|
|
147
145
|
validates_lengths_from_database
|
@@ -276,5 +274,16 @@ module ForemanVirtWhoConfigure
|
|
276
274
|
def remove_whitespaces
|
277
275
|
satellite_url.strip! if satellite_url.present?
|
278
276
|
end
|
277
|
+
|
278
|
+
def invalid_fields
|
279
|
+
case hypervisor_type
|
280
|
+
when 'kubevirt'
|
281
|
+
KUBEVIRT_INVALID_OPTIONS + AHV_VALID_OPTIONS
|
282
|
+
when 'ahv'
|
283
|
+
KUBEVIRT_VALID_OPTIONS
|
284
|
+
else
|
285
|
+
KUBEVIRT_VALID_OPTIONS + AHV_VALID_OPTIONS
|
286
|
+
end
|
287
|
+
end
|
279
288
|
end
|
280
289
|
end
|
@@ -51,6 +51,7 @@ module ForemanVirtWhoConfigure
|
|
51
51
|
def virt_who_output(format = nil)
|
52
52
|
kubeconfig = config.hypervisor_type == 'kubevirt' ? "\nkubeconfig=#{config.kubeconfig_path}" : ''
|
53
53
|
result = ''
|
54
|
+
cr_password_base64 = Base64.strict_encode64("#{cr_password}")
|
54
55
|
result += "#!/bin/bash\n" if format == :bash_script
|
55
56
|
result += <<EOS
|
56
57
|
heading() {
|
@@ -105,7 +106,7 @@ install_virt_who
|
|
105
106
|
|
106
107
|
if verify_minimal_version; then
|
107
108
|
step 2 "Encrypting password"
|
108
|
-
cr_password=`virt-who-password --password
|
109
|
+
cr_password=`virt-who-password --password $(echo #{cr_password_base64}|base64 -d) 2> /dev/null`
|
109
110
|
user_password=`virt-who-password --password '#{service_user_password}' 2> /dev/null`
|
110
111
|
|
111
112
|
step 3 "Creating virt-who configuration"
|
@@ -116,7 +117,7 @@ if verify_minimal_version; then
|
|
116
117
|
type=#{type}
|
117
118
|
hypervisor_id=#{hypervisor_id}
|
118
119
|
owner=#{owner}
|
119
|
-
|
120
|
+
#{connection_details}#{filtering}
|
120
121
|
rhsm_hostname=#{satellite_url}
|
121
122
|
rhsm_username=#{service_user_username}
|
122
123
|
rhsm_encrypted_password=$user_password
|
@@ -13,9 +13,9 @@
|
|
13
13
|
|
14
14
|
<%= textarea_f f, :blacklist, inline_help_popover(_('Hosts which uuid (or hostname or hwuuid, based on <code>hypervisor_id</code>) is specified in comma-separated list in this option will <b>NOT</b> be reported. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Exclude hosts')) %>
|
15
15
|
|
16
|
-
<%= textarea_f f, :filter_host_parents, inline_help_popover(_('Only hosts which
|
16
|
+
<%= textarea_f f, :filter_host_parents, inline_help_popover(_('Only hosts which cluster ID is specified in comma-separated list in this option will be reported. PowerCLI command to find the domain names in VMware <code>Get-Cluster “ClusterName” | Select ID</code>. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Filter host parents')) %>
|
17
17
|
|
18
|
-
<%= textarea_f f, :exclude_host_parents, inline_help_popover(_('
|
18
|
+
<%= textarea_f f, :exclude_host_parents, inline_help_popover(_('Exclude hosts which cluster ID is specified in comma-separated list in this option will <b>NOT</b> be reported. PowerCLI command to find the domain names in VMware <code>Get-Cluster “ClusterName” | Select ID</code>. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Exclude host parents')) %>
|
19
19
|
|
20
20
|
<%= checkbox_f f, :debug, { :label => _('Enable debugging output') }.merge(inline_help_popover(_("Different debug value can't be set per hypervisor, therefore it will affect all other deployed configurations on the host on which this configuration will be deployed."))) %>
|
21
21
|
<%= select_f f, :http_proxy_id, HttpProxy.all, :id, :full_url, {:include_blank => true}, { :label => _('HTTP Proxy') }.merge(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_virt_who_configure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman virt-who-configure team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -166,7 +166,7 @@ homepage: https://github.com/theforeman/foreman_virt_who_configure
|
|
166
166
|
licenses:
|
167
167
|
- GPLv3
|
168
168
|
metadata: {}
|
169
|
-
post_install_message:
|
169
|
+
post_install_message:
|
170
170
|
rdoc_options: []
|
171
171
|
require_paths:
|
172
172
|
- lib
|
@@ -182,13 +182,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|
184
184
|
rubygems_version: 3.1.6
|
185
|
-
signing_key:
|
185
|
+
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: A plugin to make virt-who configuration easy
|
188
188
|
test_files:
|
189
189
|
- test/factories/foreman_virt_who_configure_factories.rb
|
190
190
|
- test/functional/api/v2/configs_controller_test.rb
|
191
|
-
- test/
|
191
|
+
- test/test_plugin_helper.rb
|
192
192
|
- test/unit/config_test.rb
|
193
|
+
- test/unit/migrate_config_proxy_to_http_proxy.rb
|
193
194
|
- test/unit/output_generator_test.rb
|
194
|
-
- test/test_plugin_helper.rb
|