foreman_virt_who_configure 0.5.8 → 0.5.10
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 +4 -3
- 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: 5653482998c6baa64d6021ec87387001da5da84b27b4765d468f7c94fb35904f
|
4
|
+
data.tar.gz: d0ac12b92107e1ad9ddf14b6addfebe7126914c99620e726188f8edad3593bb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac40fb2c37aae92d55a166fb0b9a58e566970b4645717bacff12f275a579610b5eb0bd3e5107da5d4c0e01fc3c4a43471d87e6dbcff7abcb614a8cba2d552195
|
7
|
+
data.tar.gz: f34fd874e90719178f61299c83022b608c5b35167f72f77f78910dae0004afeb7d8dde9ebcee6c1acecb5ac86f840637071ac67378d907b73fcd6769712b7d7e
|
@@ -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,8 +106,8 @@ install_virt_who
|
|
105
106
|
|
106
107
|
if verify_minimal_version; then
|
107
108
|
step 2 "Encrypting password"
|
108
|
-
cr_password
|
109
|
-
user_password
|
109
|
+
cr_password=$(virt-who-password --password $(echo #{cr_password_base64}|base64 -d) 2> /dev/null)
|
110
|
+
user_password=$(virt-who-password --password '#{service_user_password}' 2> /dev/null)
|
110
111
|
|
111
112
|
step 3 "Creating virt-who configuration"
|
112
113
|
cat > #{config_file_path} << EOF
|
@@ -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.10
|
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-11-09 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
|