foreman_virt_who_configure 0.5.20 → 0.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -6
- data/Rakefile +1 -1
- data/app/assets/javascripts/foreman_virt_who_configure/config_edit.js +8 -0
- data/app/models/foreman_virt_who_configure/config.rb +8 -0
- 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/engine.rb +1 -1
- data/lib/foreman_virt_who_configure/version.rb +1 -1
- data/locale/action_names.rb +2 -0
- data/locale/bn/foreman_virt_who_configure.edit.po +621 -0
- data/locale/bn/foreman_virt_who_configure.po +0 -3
- data/locale/bn/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/bn_IN/foreman_virt_who_configure.edit.po +622 -0
- data/locale/bn_IN/foreman_virt_who_configure.po +0 -3
- data/locale/bn_IN/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/ca/foreman_virt_who_configure.edit.po +621 -0
- data/locale/ca/foreman_virt_who_configure.po +0 -3
- data/locale/ca/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/cs_CZ/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/cs_CZ/foreman_virt_who_configure.edit.po +628 -0
- data/locale/cs_CZ/foreman_virt_who_configure.po +0 -3
- data/locale/cs_CZ/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/de/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/de/foreman_virt_who_configure.edit.po +638 -0
- data/locale/de/foreman_virt_who_configure.po +0 -3
- data/locale/de/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/de_DE/foreman_virt_who_configure.edit.po +624 -0
- data/locale/de_DE/foreman_virt_who_configure.po +0 -3
- data/locale/de_DE/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/el/foreman_virt_who_configure.edit.po +621 -0
- data/locale/el/foreman_virt_who_configure.po +0 -3
- data/locale/el/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/en/foreman_virt_who_configure.edit.po +617 -0
- data/locale/en/foreman_virt_who_configure.po +0 -3
- data/locale/en/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/en_GB/foreman_virt_who_configure.edit.po +623 -0
- data/locale/en_GB/foreman_virt_who_configure.po +0 -3
- data/locale/en_GB/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/es/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/es/foreman_virt_who_configure.edit.po +635 -0
- data/locale/es/foreman_virt_who_configure.po +0 -3
- data/locale/es/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/foreman_virt_who_configure.pot +4 -7
- data/locale/fr/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/fr/foreman_virt_who_configure.edit.po +634 -0
- data/locale/fr/foreman_virt_who_configure.po +0 -3
- data/locale/fr/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/gl/foreman_virt_who_configure.edit.po +621 -0
- data/locale/gl/foreman_virt_who_configure.po +0 -3
- data/locale/gl/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/gu/foreman_virt_who_configure.edit.po +621 -0
- data/locale/gu/foreman_virt_who_configure.po +0 -3
- data/locale/gu/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/he_IL/foreman_virt_who_configure.edit.po +623 -0
- data/locale/he_IL/foreman_virt_who_configure.po +0 -3
- data/locale/he_IL/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/hi/foreman_virt_who_configure.edit.po +621 -0
- data/locale/hi/foreman_virt_who_configure.po +0 -3
- data/locale/hi/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/it/foreman_virt_who_configure.edit.po +625 -0
- data/locale/it/foreman_virt_who_configure.po +0 -3
- data/locale/it/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/ja/foreman_virt_who_configure.edit.po +632 -0
- data/locale/ja/foreman_virt_who_configure.po +0 -3
- data/locale/ja/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/ka/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/ka/foreman_virt_who_configure.edit.po +628 -0
- data/locale/ka/foreman_virt_who_configure.po +0 -3
- data/locale/ka/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/kn/foreman_virt_who_configure.edit.po +621 -0
- data/locale/kn/foreman_virt_who_configure.po +0 -3
- data/locale/kn/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/ko/foreman_virt_who_configure.edit.po +623 -0
- data/locale/ko/foreman_virt_who_configure.po +0 -3
- data/locale/ko/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/mr/foreman_virt_who_configure.edit.po +621 -0
- data/locale/mr/foreman_virt_who_configure.po +0 -3
- data/locale/mr/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/nl_NL/foreman_virt_who_configure.edit.po +626 -0
- data/locale/nl_NL/foreman_virt_who_configure.po +0 -3
- data/locale/nl_NL/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/or/foreman_virt_who_configure.edit.po +621 -0
- data/locale/or/foreman_virt_who_configure.po +0 -3
- data/locale/or/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/pa/foreman_virt_who_configure.edit.po +622 -0
- data/locale/pa/foreman_virt_who_configure.po +0 -3
- data/locale/pa/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/pl/foreman_virt_who_configure.edit.po +624 -0
- data/locale/pl/foreman_virt_who_configure.po +0 -3
- data/locale/pl/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/pt/foreman_virt_who_configure.edit.po +622 -0
- data/locale/pt/foreman_virt_who_configure.po +0 -3
- data/locale/pt/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/pt_BR/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/pt_BR/foreman_virt_who_configure.edit.po +634 -0
- data/locale/pt_BR/foreman_virt_who_configure.po +0 -3
- data/locale/pt_BR/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/ru/foreman_virt_who_configure.edit.po +627 -0
- data/locale/ru/foreman_virt_who_configure.po +0 -3
- data/locale/ru/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/sl/foreman_virt_who_configure.edit.po +622 -0
- data/locale/sl/foreman_virt_who_configure.po +0 -3
- data/locale/sl/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/sv_SE/foreman_virt_who_configure.edit.po +623 -0
- data/locale/sv_SE/foreman_virt_who_configure.po +0 -3
- data/locale/sv_SE/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/ta/foreman_virt_who_configure.edit.po +621 -0
- data/locale/ta/foreman_virt_who_configure.po +0 -3
- data/locale/ta/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/ta_IN/foreman_virt_who_configure.edit.po +622 -0
- data/locale/ta_IN/foreman_virt_who_configure.po +0 -3
- data/locale/ta_IN/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/te/foreman_virt_who_configure.edit.po +621 -0
- data/locale/te/foreman_virt_who_configure.po +0 -3
- data/locale/te/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/tr/foreman_virt_who_configure.edit.po +621 -0
- data/locale/tr/foreman_virt_who_configure.po +0 -3
- data/locale/tr/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
- data/locale/zh_CN/foreman_virt_who_configure.edit.po +633 -0
- data/locale/zh_CN/foreman_virt_who_configure.po +0 -3
- data/locale/zh_CN/foreman_virt_who_configure.po.time_stamp +0 -0
- data/locale/zh_TW/foreman_virt_who_configure.edit.po +623 -0
- data/locale/zh_TW/foreman_virt_who_configure.po +0 -3
- data/locale/zh_TW/foreman_virt_who_configure.po.time_stamp +0 -0
- data/test/functional/api/v2/configs_controller_test.rb +21 -0
- data/test/unit/output_generator_test.rb +3 -3
- metadata +80 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22ea7c1f01f0e5903a2f219b5be36745a0c229b5471f2538ab88e65dc8117ff0
|
4
|
+
data.tar.gz: 1d53ba8208462ef5c2c01c67c18c1b37523effdfb9bfc3bee174e64aa86e2a18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5032cbca7e710798ca4061d88c5d2de7b001aa6acd39c54227d049b68321c8c35dbf50d3bbe1907821faa7d0363224f3fe9e60655f7240314bd279aab49df209
|
7
|
+
data.tar.gz: 96acfb4d9ca5099569c7a149c1c3b809595cb0ccf52f7bc6338ca8684318c1080170031b65374fc8e214dab9dd5636bc43ccab7aa85b6bfff6ec923a8e3775c8
|
data/README.md
CHANGED
@@ -4,21 +4,33 @@ A Foreman plugin to make virt-who configuration easier. This provides a simple U
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
### Development setup:
|
8
8
|
|
9
|
+
* This plugin requires Katello to be installed in your Foreman instance. If it's there, simply install a package with the plugin (rpm only), run migrations and seed by running:
|
10
|
+
|
11
|
+
```
|
9
12
|
dnf install rubygem-foreman_virt_who_configure
|
10
13
|
foreman-rake db:migrate
|
11
14
|
foreman-rake db:seed
|
15
|
+
```
|
16
|
+
|
17
|
+
### Production setup:
|
18
|
+
|
19
|
+
* Run the following command to install the plugin with the Foreman Installer.
|
20
|
+
```
|
21
|
+
foreman-installer --enable-foreman-plugin-virt-who-configure
|
22
|
+
foreman-installer --enable-foreman-cli-virt-who-configure
|
23
|
+
```
|
12
24
|
|
13
25
|
## Usage
|
14
26
|
|
15
|
-
After installation there is new "Virt-who
|
27
|
+
* After installation there is new "Virt-who Configurations" menu added in "Infrastructure" tab. The "Virt-who Configurations" -> "Create Config" provides options to add details about configuration, most of the fields have inline help.
|
16
28
|
|
17
|
-
The virt-who configuration should be in an organization. If an organization has not selected then Owner field would be displayed where it is required to select organization. If organization is already selected then Owner field is not displayed and virt-configuration will be automatically created in selected organization scope.
|
29
|
+
* The virt-who configuration should be in an organization. If an organization has not selected then Owner field would be displayed where it is required to select organization. If an organization is already selected then Owner field is not displayed and virt-configuration will be automatically created in the selected organization scope.
|
18
30
|
|
19
|
-
To deploy the configuration click on configuration name on "Virt-who
|
31
|
+
* To deploy the configuration click on configuration name on "Virt-who Configurations" list page, "Overview" page shows details about configuration and "Deploy page" has all details on deploying configuration.
|
20
32
|
|
21
|
-
More details are available at - https://theforeman.org/plugins/foreman_virt_who_configure
|
33
|
+
* More details are available at - https://theforeman.org/plugins/foreman_virt_who_configure
|
22
34
|
|
23
35
|
## Contributing
|
24
36
|
|
@@ -26,7 +38,7 @@ Fork and send a Pull Request. Thanks!
|
|
26
38
|
|
27
39
|
## Copyright
|
28
40
|
|
29
|
-
Copyright (c)
|
41
|
+
Copyright (c) 2024 - Foreman team
|
30
42
|
|
31
43
|
This program is free software: you can redistribute it and/or modify
|
32
44
|
it under the terms of the GNU General Public License as published by
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
20
20
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
21
|
end
|
22
22
|
|
23
|
-
APP_RAKEFILE = File.expand_path('
|
23
|
+
APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
|
24
24
|
|
25
25
|
Bundler::GemHelper.install_tasks
|
26
26
|
|
@@ -5,6 +5,14 @@ function virt_who_update_listing_mode() {
|
|
5
5
|
var blacklist = $('#foreman_virt_who_configure_config_blacklist').parents('div.form-group');
|
6
6
|
var whitelist_parent = $('#foreman_virt_who_configure_config_filter_host_parents').parents('div.form-group');
|
7
7
|
var blacklist_parent = $('#foreman_virt_who_configure_config_exclude_host_parents').parents('div.form-group');
|
8
|
+
var hypervisor_ids = foreman_virt_who_configure_config_hypervisor_id;
|
9
|
+
|
10
|
+
// https://projects.theforeman.org/issues/26321
|
11
|
+
if (hypervisor_type != 'esx') {
|
12
|
+
$(hypervisor_ids).find('option[value=hwuuid]').remove();
|
13
|
+
} else if (hypervisor_type == 'esx' && $(hypervisor_ids).find('option[value=hwuuid]').length == 0) {
|
14
|
+
$(hypervisor_ids).append('<option value='+'hwuuid>'+'hwuuid'+'</option>');
|
15
|
+
}
|
8
16
|
|
9
17
|
// UNLIMITED = 0, WHITELIST = 1, BLACKLIST = 2, see config.rb model for the definition
|
10
18
|
if (filtering_mode == '0') {
|
@@ -116,6 +116,7 @@ module ForemanVirtWhoConfigure
|
|
116
116
|
validates :prism_flavor, :inclusion => {:in => PRISM_FLAVORS.keys, :message => "should be either central or element"}, :if => proc { |c| c.hypervisor_type == 'ahv' }
|
117
117
|
validate :validates_whitelist_blacklist
|
118
118
|
validate :validates_debug_settings, :if => proc { |c| c.hypervisor_type == 'ahv' }
|
119
|
+
validate :validates_hypervisor_id_non_vmware, :if => proc { |c| c.hypervisor_type != 'esx' }
|
119
120
|
validate :validates_hypervisor_options
|
120
121
|
|
121
122
|
def validates_whitelist_blacklist
|
@@ -131,6 +132,13 @@ module ForemanVirtWhoConfigure
|
|
131
132
|
end
|
132
133
|
end
|
133
134
|
|
135
|
+
def validates_hypervisor_id_non_vmware
|
136
|
+
return unless hypervisor_id.present?
|
137
|
+
if hypervisor_id == 'hwuuid'
|
138
|
+
errors.add(:hypervisor_id, "hwuuid is only supported for ESX hypervisor type")
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
134
142
|
def validates_debug_settings
|
135
143
|
if ahv_internal_debug && !debug
|
136
144
|
errors.add(:ahv_internal_debug, "Enable debugging output is required for Enable AHV debug")
|
@@ -131,8 +131,10 @@ module ForemanVirtWhoConfigure
|
|
131
131
|
### manual edits will be deleted.
|
132
132
|
[global]
|
133
133
|
debug=#{config.debug? ? 1 : 0}
|
134
|
-
interval=#{config.interval * 60}
|
134
|
+
interval=#{config.interval * 60}
|
135
135
|
oneshot=False
|
136
|
+
|
137
|
+
[system_environment]#{proxy_strings}
|
136
138
|
EOF
|
137
139
|
if [ $? -ne 0 ]; then result_code=$(($result_code|#{error_code(:virt_who_sysconfig_file_issue)})); fi
|
138
140
|
|
@@ -289,7 +291,6 @@ encrypted_password=$cr_password"
|
|
289
291
|
output = ''
|
290
292
|
output << "\n#{proxy_type}=#{sanitize_proxy(proxy.full_url)}" if proxy.present?
|
291
293
|
output << "\nno_proxy=#{sanitize_proxy(no_proxy)}" if no_proxy.present?
|
292
|
-
output << "\nno_proxy=*" if proxy.blank? && no_proxy.blank?
|
293
294
|
output
|
294
295
|
end
|
295
296
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="config_connection">
|
2
|
-
<%= text_f f, :satellite_url, inline_help_popover(_('Foreman server’s fully-qualified host name, for example: foreman.example.com')).merge(:label => _('Foreman server FQDN')) %>
|
2
|
+
<%= text_f f, :satellite_url, inline_help_popover(_('Foreman server’s fully-qualified host name, for example: foreman.example.com')).merge(:label => _('Foreman server FQDN'), readonly: true) %>
|
3
3
|
<%= select_f f, :hypervisor_id, ForemanVirtWhoConfigure::Config::HYPERVISOR_IDS, :to_s, :to_s, {}, { :label => _('Hypervisor ID') }.merge(
|
4
4
|
inline_help_popover(_("Specifies that hypervisors will be identified by their <b>hostname</b>, <b>uuid</b> or <b>hwuuid</b>.
|
5
5
|
Note that some virtualization backends don't have all of them implemented.
|
@@ -18,7 +18,7 @@
|
|
18
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
|
-
<%= select_f f, :http_proxy_id, HttpProxy.all, :id, :
|
21
|
+
<%= select_f f, :http_proxy_id, HttpProxy.all, :id, :name, {:include_blank => true}, { :label => _('HTTP Proxy') }.merge(
|
22
22
|
inline_help_popover(_('HTTP proxy that should be used for communication between the server on which virt-who is running and the hypervisors and virtualization managers. Leave this blank if no proxy is used.').html_safe)) %>
|
23
23
|
<%= text_f f, :no_proxy, inline_help_popover(_('A comma-separated list of hostnames or domains or ip addresses to ignore proxy settings for. Optionally this may be set to <code>*</code> to bypass proxy settings for all hostnames domains or ip addresses.')).merge(:label => _('Ignore proxy')) %>
|
24
24
|
<%= text_f f, :kubeconfig_path, inline_help_popover(_('Configuration file containing details about how to connect to the cluster and authentication details')).merge(:label => _('Path to kubeconfig file')) %>
|
@@ -71,7 +71,7 @@ module ForemanVirtWhoConfigure
|
|
71
71
|
# add menu entry
|
72
72
|
menu :top_menu, :virt_who_configs,
|
73
73
|
url_hash: { controller: 'foreman_virt_who_configure/configs', action: :index },
|
74
|
-
caption: N_('Virt-who
|
74
|
+
caption: N_('Virt-who Configurations'),
|
75
75
|
parent: :infrastructure_menu,
|
76
76
|
after: :compute_resources
|
77
77
|
|