foreman_virt_who_configure 0.5.21 → 0.5.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -6
  3. data/app/assets/javascripts/foreman_virt_who_configure/config_copy_and_paste.js +8 -6
  4. data/app/assets/javascripts/foreman_virt_who_configure/config_edit.js +17 -3
  5. data/app/models/foreman_virt_who_configure/config.rb +8 -0
  6. data/app/views/foreman_virt_who_configure/configs/show.html.erb +2 -2
  7. data/app/views/foreman_virt_who_configure/configs/steps/_connection_form.erb +1 -1
  8. data/lib/foreman_virt_who_configure/engine.rb +1 -1
  9. data/lib/foreman_virt_who_configure/version.rb +1 -1
  10. data/locale/bn/foreman_virt_who_configure.po +0 -3
  11. data/locale/bn_IN/foreman_virt_who_configure.po +0 -3
  12. data/locale/ca/foreman_virt_who_configure.po +0 -3
  13. data/locale/cs_CZ/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  14. data/locale/cs_CZ/foreman_virt_who_configure.po +0 -3
  15. data/locale/de/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  16. data/locale/de/foreman_virt_who_configure.po +0 -3
  17. data/locale/de_DE/foreman_virt_who_configure.po +0 -3
  18. data/locale/el/foreman_virt_who_configure.po +0 -3
  19. data/locale/en/foreman_virt_who_configure.po +0 -3
  20. data/locale/en_GB/foreman_virt_who_configure.po +0 -3
  21. data/locale/es/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  22. data/locale/es/foreman_virt_who_configure.po +0 -3
  23. data/locale/foreman_virt_who_configure.pot +4 -7
  24. data/locale/fr/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  25. data/locale/fr/foreman_virt_who_configure.po +0 -3
  26. data/locale/gl/foreman_virt_who_configure.po +0 -3
  27. data/locale/gu/foreman_virt_who_configure.po +0 -3
  28. data/locale/he_IL/foreman_virt_who_configure.po +0 -3
  29. data/locale/hi/foreman_virt_who_configure.po +0 -3
  30. data/locale/it/foreman_virt_who_configure.po +0 -3
  31. data/locale/ja/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  32. data/locale/ja/foreman_virt_who_configure.po +0 -3
  33. data/locale/ka/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  34. data/locale/ka/foreman_virt_who_configure.po +0 -3
  35. data/locale/kn/foreman_virt_who_configure.po +0 -3
  36. data/locale/ko/foreman_virt_who_configure.po +0 -3
  37. data/locale/mr/foreman_virt_who_configure.po +0 -3
  38. data/locale/nl_NL/foreman_virt_who_configure.po +0 -3
  39. data/locale/or/foreman_virt_who_configure.po +0 -3
  40. data/locale/pa/foreman_virt_who_configure.po +0 -3
  41. data/locale/pl/foreman_virt_who_configure.po +0 -3
  42. data/locale/pt/foreman_virt_who_configure.po +0 -3
  43. data/locale/pt_BR/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  44. data/locale/pt_BR/foreman_virt_who_configure.po +0 -3
  45. data/locale/ru/foreman_virt_who_configure.po +0 -3
  46. data/locale/sl/foreman_virt_who_configure.po +0 -3
  47. data/locale/sv_SE/foreman_virt_who_configure.po +0 -3
  48. data/locale/ta/foreman_virt_who_configure.po +0 -3
  49. data/locale/ta_IN/foreman_virt_who_configure.po +0 -3
  50. data/locale/te/foreman_virt_who_configure.po +0 -3
  51. data/locale/tr/foreman_virt_who_configure.po +0 -3
  52. data/locale/zh_CN/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  53. data/locale/zh_CN/foreman_virt_who_configure.po +0 -3
  54. data/locale/zh_TW/foreman_virt_who_configure.po +0 -3
  55. data/test/functional/api/v2/configs_controller_test.rb +21 -0
  56. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bec81d0d25964289226511f89e97ba3f1206a2c507e7b2397f84f8733074f4c9
4
- data.tar.gz: 128103a173ff39059da75e62c406346a7814855ad94b0b3584a9ab5e65b69fcf
3
+ metadata.gz: 119cc91cb905da4bd294432142b61ac910531ae8e34cdb0a6e7223a932894b32
4
+ data.tar.gz: a2e875685992c24bbadbf43cb3337cddefa7fcafa3ea592f7afa59026fec1e73
5
5
  SHA512:
6
- metadata.gz: 779b402b0d303138bbe654ef8ed3fb17ad227cafa82977cec81ba84da5cde29d54e1aa743b51f35b0deeafc2a3073ab6c39c31d3f919cbfa0000ee6f7455af85
7
- data.tar.gz: 3fe10668d94b0b5b8b81e95def0f8e353b4a8e98e5d7013be2b63934004083967f714434d6a867260c45c7363c5b59a300ba75838f361dfe5be5a6e26641a8ab
6
+ metadata.gz: cf72c11793e7157e197b8728be459ca702d5a030325445300f8b70ac010a43c03fa3064d46637c9727673796647e0a6e0ce709e6a3c4a7f30043fc17af815261
7
+ data.tar.gz: 5c0707b56eb0aa13bc1379d473fb207d35015c28531ca945b0396ac650f8d4f3d55176c38cbdc6667aa12428b6dc42f8c31218b766a71ac50fbe829923b269bc
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
- This plugins 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,
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 configurations" menu added in "Infrastructure" tab. The "Virt-who configurations" -> "Create Config" provides options to add details about configuration, most of the fields are having inline help.
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 configurations" list page, "Overview" page shows details about configuration and "Deploy page" has all details on deploying configuration.
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) 2023 - Foreman team
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
@@ -1,8 +1,10 @@
1
1
  function virt_who_copy_configuration_to_clipboard(text) {
2
- var aux = document.createElement("textarea");
3
- $(aux).html(text);
4
- document.body.appendChild(aux);
5
- aux.select();
6
- document.execCommand("copy");
7
- document.body.removeChild(aux);
2
+ try {
3
+ navigator.clipboard.writeText(text);
4
+ } catch (error) {
5
+ console.error(
6
+ "Copying to clipboard is not supported in this browser, or with an insecure connection."
7
+ );
8
+ console.error(error);
9
+ }
8
10
  }
@@ -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') {
@@ -74,7 +82,13 @@ $(document).ready(function () {
74
82
  virt_who_update_hypervisor_fields();
75
83
  virt_who_update_ahv_debug();
76
84
 
77
- $('#foreman_virt_who_configure_config_listing_mode').change(virt_who_update_listing_mode);
78
- $('#foreman_virt_who_configure_config_hypervisor_type').change(virt_who_update_credentials_help);
79
- $('#foreman_virt_who_configure_config_hypervisor_type').change(virt_who_update_hypervisor_fields);
85
+ $("#foreman_virt_who_configure_config_listing_mode").on("change", virt_who_update_listing_mode);
86
+ $("#foreman_virt_who_configure_config_hypervisor_type").on(
87
+ "change",
88
+ virt_who_update_credentials_help
89
+ );
90
+ $("#foreman_virt_who_configure_config_hypervisor_type").on(
91
+ "change",
92
+ virt_who_update_hypervisor_fields
93
+ );
80
94
  });
@@ -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")
@@ -79,7 +79,7 @@
79
79
  </div>
80
80
  <div class="col-md-8">
81
81
  <div class="terminal-buttons">
82
- <%= link_to _('Copy to clipboard'), nil, :class => 'btn btn-default', :onclick => 'virt_who_copy_configuration_to_clipboard($("#config_command").html()); return false' %>
82
+ <%= link_to _('Copy to clipboard'), '#', :class => 'btn btn-default', :onclick => 'virt_who_copy_configuration_to_clipboard($("#config_command").html()); return false' %>
83
83
  </div>
84
84
  </div>
85
85
  </div>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
  <div class="col-md-8">
105
105
  <div class="terminal-buttons">
106
- <%= link_to _('Copy to clipboard'), nil, :class => 'btn btn-default', :onclick => 'virt_who_copy_configuration_to_clipboard($("#config_script").html()); return false' %>
106
+ <%= link_to _('Copy to clipboard'), '#', :class => 'btn btn-default', :onclick => 'virt_who_copy_configuration_to_clipboard($("#config_script").html()); return false' %>
107
107
  <%= link_to _('Download the script'), deploy_script_foreman_virt_who_configure_config_path(@config), :class => 'btn btn-default' %>
108
108
  </div>
109
109
  </div>
@@ -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.
@@ -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 configurations'),
74
+ caption: N_('Virt-who Configurations'),
75
75
  parent: :infrastructure_menu,
76
76
  after: :compute_resources
77
77
 
@@ -1,3 +1,3 @@
1
1
  module ForemanVirtWhoConfigure
2
- VERSION = '0.5.21'.freeze
2
+ VERSION = '0.5.23'.freeze
3
3
  end
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -466,9 +466,6 @@ msgstr ""
466
466
  msgid "Virt-who Configurations Status"
467
467
  msgstr ""
468
468
 
469
- msgid "Virt-who configurations"
470
- msgstr ""
471
-
472
469
  msgid "Whitelist"
473
470
  msgstr ""
474
471
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr "Llista blanca"
473
470
 
@@ -469,9 +469,6 @@ msgstr "Nastavení pro virt-who"
469
469
  msgid "Virt-who Configurations Status"
470
470
  msgstr "Stav nastavení pro virt-who"
471
471
 
472
- msgid "Virt-who configurations"
473
- msgstr "Virt-who konfigurace"
474
-
475
472
  msgid "Whitelist"
476
473
  msgstr "Seznam povolených"
477
474
 
@@ -479,9 +479,6 @@ msgstr "Virt-who Konfigurationen"
479
479
  msgid "Virt-who Configurations Status"
480
480
  msgstr "Virt-who Konfigurationsstatus"
481
481
 
482
- msgid "Virt-who configurations"
483
- msgstr "Virt-Who-Konfigurationen"
484
-
485
482
  msgid "Whitelist"
486
483
  msgstr "Whitelist"
487
484
 
@@ -468,9 +468,6 @@ msgstr ""
468
468
  msgid "Virt-who Configurations Status"
469
469
  msgstr ""
470
470
 
471
- msgid "Virt-who configurations"
472
- msgstr ""
473
-
474
471
  msgid "Whitelist"
475
472
  msgstr ""
476
473
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -461,9 +461,6 @@ msgstr ""
461
461
  msgid "Virt-who Configurations Status"
462
462
  msgstr ""
463
463
 
464
- msgid "Virt-who configurations"
465
- msgstr ""
466
-
467
464
  msgid "Whitelist"
468
465
  msgstr ""
469
466
 
@@ -467,9 +467,6 @@ msgstr ""
467
467
  msgid "Virt-who Configurations Status"
468
468
  msgstr ""
469
469
 
470
- msgid "Virt-who configurations"
471
- msgstr ""
472
-
473
470
  msgid "Whitelist"
474
471
  msgstr ""
475
472
 
@@ -476,9 +476,6 @@ msgstr "Configuraciones de virt-who"
476
476
  msgid "Virt-who Configurations Status"
477
477
  msgstr "Estado de configuración de virt-who"
478
478
 
479
- msgid "Virt-who configurations"
480
- msgstr "Configuraciones virt-who"
481
-
482
479
  msgid "Whitelist"
483
480
  msgstr "Lista blanca"
484
481
 
@@ -8,8 +8,8 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: foreman_virt_who_configure 1.0.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2023-11-28 18:45+0100\n"
12
- "PO-Revision-Date: 2023-11-28 18:45+0100\n"
11
+ "POT-Creation-Date: 2024-05-22 09:39-0400\n"
12
+ "PO-Revision-Date: 2024-05-22 09:39-0400\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
15
  "Language: \n"
@@ -369,7 +369,7 @@ msgstr ""
369
369
  msgid "Prism Element"
370
370
  msgstr ""
371
371
 
372
- #: ../app/models/foreman_virt_who_configure/config.rb:225
372
+ #: ../app/models/foreman_virt_who_configure/config.rb:233
373
373
  msgid "every %s hours"
374
374
  msgstr ""
375
375
 
@@ -465,6 +465,7 @@ msgstr ""
465
465
  #: ../app/views/foreman_virt_who_configure/configs/index.html.erb:1
466
466
  #: ../app/views/foreman_virt_who_configure/configs/show.html.erb:12
467
467
  #: ../app/views/foreman_virt_who_configure/configs/welcome.html.erb:3
468
+ #: ../lib/foreman_virt_who_configure/engine.rb:74
468
469
  msgid "Virt-who Configurations"
469
470
  msgstr ""
470
471
 
@@ -809,10 +810,6 @@ msgid ""
809
810
  "or deploy it on a selected target host through Remote Execution."
810
811
  msgstr ""
811
812
 
812
- #: ../lib/foreman_virt_who_configure/engine.rb:74
813
- msgid "Virt-who configurations"
814
- msgstr ""
815
-
816
813
  #: ../lib/foreman_virt_who_configure/engine.rb:79
817
814
  msgid "Virt-who Configs Status"
818
815
  msgstr ""
@@ -475,9 +475,6 @@ msgstr "Configurations virt-who"
475
475
  msgid "Virt-who Configurations Status"
476
476
  msgstr "État des configurations virt-who"
477
477
 
478
- msgid "Virt-who configurations"
479
- msgstr "Configurations virt-who"
480
-
481
478
  msgid "Whitelist"
482
479
  msgstr "Liste blanche"
483
480
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -467,9 +467,6 @@ msgstr ""
467
467
  msgid "Virt-who Configurations Status"
468
468
  msgstr ""
469
469
 
470
- msgid "Virt-who configurations"
471
- msgstr ""
472
-
473
470
  msgid "Whitelist"
474
471
  msgstr ""
475
472
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -469,9 +469,6 @@ msgstr ""
469
469
  msgid "Virt-who Configurations Status"
470
470
  msgstr ""
471
471
 
472
- msgid "Virt-who configurations"
473
- msgstr ""
474
-
475
472
  msgid "Whitelist"
476
473
  msgstr ""
477
474
 
@@ -473,9 +473,6 @@ msgstr "Virt-who 設定"
473
473
  msgid "Virt-who Configurations Status"
474
474
  msgstr "Virt-who 設定ステータス"
475
475
 
476
- msgid "Virt-who configurations"
477
- msgstr "Virt-who 設定"
478
-
479
476
  msgid "Whitelist"
480
477
  msgstr "ホワイトリスト"
481
478
 
@@ -469,9 +469,6 @@ msgstr "Virt-who-ის კონფიგურაციები"
469
469
  msgid "Virt-who Configurations Status"
470
470
  msgstr "Virt-who-ის კონფიგურაციის სტატუსი"
471
471
 
472
- msgid "Virt-who configurations"
473
- msgstr "Virt-who-ის კონფიგურაციები"
474
-
475
472
  msgid "Whitelist"
476
473
  msgstr "თეთრი სია"
477
474
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -467,9 +467,6 @@ msgstr ""
467
467
  msgid "Virt-who Configurations Status"
468
468
  msgstr ""
469
469
 
470
- msgid "Virt-who configurations"
471
- msgstr ""
472
-
473
470
  msgid "Whitelist"
474
471
  msgstr ""
475
472
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -470,9 +470,6 @@ msgstr ""
470
470
  msgid "Virt-who Configurations Status"
471
471
  msgstr ""
472
472
 
473
- msgid "Virt-who configurations"
474
- msgstr ""
475
-
476
473
  msgid "Whitelist"
477
474
  msgstr ""
478
475
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -466,9 +466,6 @@ msgstr ""
466
466
  msgid "Virt-who Configurations Status"
467
467
  msgstr ""
468
468
 
469
- msgid "Virt-who configurations"
470
- msgstr ""
471
-
472
469
  msgid "Whitelist"
473
470
  msgstr ""
474
471
 
@@ -468,9 +468,6 @@ msgstr ""
468
468
  msgid "Virt-who Configurations Status"
469
469
  msgstr ""
470
470
 
471
- msgid "Virt-who configurations"
472
- msgstr ""
473
-
474
471
  msgid "Whitelist"
475
472
  msgstr ""
476
473
 
@@ -466,9 +466,6 @@ msgstr ""
466
466
  msgid "Virt-who Configurations Status"
467
467
  msgstr ""
468
468
 
469
- msgid "Virt-who configurations"
470
- msgstr ""
471
-
472
469
  msgid "Whitelist"
473
470
  msgstr ""
474
471
 
@@ -475,9 +475,6 @@ msgstr "Configurações do virt-who"
475
475
  msgid "Virt-who Configurations Status"
476
476
  msgstr "Status de configuração do virt-who"
477
477
 
478
- msgid "Virt-who configurations"
479
- msgstr "Configurações do virt-who"
480
-
481
478
  msgid "Whitelist"
482
479
  msgstr "Lista de permissões"
483
480
 
@@ -471,9 +471,6 @@ msgstr ""
471
471
  msgid "Virt-who Configurations Status"
472
472
  msgstr ""
473
473
 
474
- msgid "Virt-who configurations"
475
- msgstr ""
476
-
477
474
  msgid "Whitelist"
478
475
  msgstr ""
479
476
 
@@ -466,9 +466,6 @@ msgstr ""
466
466
  msgid "Virt-who Configurations Status"
467
467
  msgstr ""
468
468
 
469
- msgid "Virt-who configurations"
470
- msgstr ""
471
-
472
469
  msgid "Whitelist"
473
470
  msgstr ""
474
471
 
@@ -467,9 +467,6 @@ msgstr ""
467
467
  msgid "Virt-who Configurations Status"
468
468
  msgstr ""
469
469
 
470
- msgid "Virt-who configurations"
471
- msgstr ""
472
-
473
470
  msgid "Whitelist"
474
471
  msgstr ""
475
472
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -466,9 +466,6 @@ msgstr ""
466
466
  msgid "Virt-who Configurations Status"
467
467
  msgstr ""
468
468
 
469
- msgid "Virt-who configurations"
470
- msgstr ""
471
-
472
469
  msgid "Whitelist"
473
470
  msgstr ""
474
471
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -465,9 +465,6 @@ msgstr ""
465
465
  msgid "Virt-who Configurations Status"
466
466
  msgstr ""
467
467
 
468
- msgid "Virt-who configurations"
469
- msgstr ""
470
-
471
468
  msgid "Whitelist"
472
469
  msgstr ""
473
470
 
@@ -474,9 +474,6 @@ msgstr "Virt-who 配置"
474
474
  msgid "Virt-who Configurations Status"
475
475
  msgstr "Virt-who 配置状态"
476
476
 
477
- msgid "Virt-who configurations"
478
- msgstr "Virt-who 配置"
479
-
480
477
  msgid "Whitelist"
481
478
  msgstr "白名单"
482
479
 
@@ -467,9 +467,6 @@ msgstr ""
467
467
  msgid "Virt-who Configurations Status"
468
468
  msgstr ""
469
469
 
470
- msgid "Virt-who configurations"
471
- msgstr ""
472
-
473
470
  msgid "Whitelist"
474
471
  msgstr ""
475
472
 
@@ -167,6 +167,27 @@ class ForemanVirtWhoConfigure::Api::V2::ConfigsControllerTest < ActionController
167
167
  assert_equal "Kubeconfig path Invalid option for hypervisor [esx]", response['error']['full_messages'].join('')
168
168
  end
169
169
 
170
+ test "should error when hypervisor type is hwuuid and type is not vmware" do
171
+ org = FactoryBot.create(:organization)
172
+ post :create, :params => { :foreman_virt_who_configure_config => { :name => 'my new config',
173
+ :interval => 240,
174
+ :filtering_mode => ForemanVirtWhoConfigure::Config::BLACKLIST,
175
+ :blacklist => ' a,b ',
176
+ :hypervisor_id => 'hwuuid',
177
+ :hypervisor_type => 'libvirt',
178
+ :hypervisor_server => "libvirt.example.com",
179
+ :hypervisor_username => "root",
180
+ :debug => true,
181
+ :satellite_url => "foreman.example.com",
182
+ :organization_id => org.id }
183
+ }, :session => set_session_user
184
+
185
+ assert_response :unprocessable_entity
186
+
187
+ response = ActiveSupport::JSON.decode(@response.body)
188
+ assert_equal "Hypervisor hwuuid is only supported for ESX hypervisor type", response['error']['full_messages'].join('')
189
+ end
190
+
170
191
  test "should create the config" do
171
192
  org = FactoryBot.create(:organization)
172
193
  post :create, :params => { :foreman_virt_who_configure_config => { :name => 'my new config',
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.21
4
+ version: 0.5.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman virt-who-configure team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-27 00:00:00.000000000 Z
11
+ date: 2024-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  - !ruby/object:Gem::Version
256
256
  version: '0'
257
257
  requirements: []
258
- rubygems_version: 3.4.10
258
+ rubygems_version: 3.2.33
259
259
  signing_key:
260
260
  specification_version: 4
261
261
  summary: A plugin to make virt-who configuration easy