foreman_virt_who_configure 0.5.21 → 0.5.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -6
  3. data/app/assets/javascripts/foreman_virt_who_configure/config_edit.js +8 -0
  4. data/app/models/foreman_virt_who_configure/config.rb +8 -0
  5. data/app/views/foreman_virt_who_configure/configs/steps/_connection_form.erb +1 -1
  6. data/lib/foreman_virt_who_configure/engine.rb +1 -1
  7. data/lib/foreman_virt_who_configure/version.rb +1 -1
  8. data/locale/action_names.rb +2 -0
  9. data/locale/bn/foreman_virt_who_configure.edit.po +621 -0
  10. data/locale/bn/foreman_virt_who_configure.po +0 -3
  11. data/locale/bn/foreman_virt_who_configure.po.time_stamp +0 -0
  12. data/locale/bn_IN/foreman_virt_who_configure.edit.po +622 -0
  13. data/locale/bn_IN/foreman_virt_who_configure.po +0 -3
  14. data/locale/bn_IN/foreman_virt_who_configure.po.time_stamp +0 -0
  15. data/locale/ca/foreman_virt_who_configure.edit.po +621 -0
  16. data/locale/ca/foreman_virt_who_configure.po +0 -3
  17. data/locale/ca/foreman_virt_who_configure.po.time_stamp +0 -0
  18. data/locale/cs_CZ/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  19. data/locale/cs_CZ/foreman_virt_who_configure.edit.po +628 -0
  20. data/locale/cs_CZ/foreman_virt_who_configure.po +0 -3
  21. data/locale/cs_CZ/foreman_virt_who_configure.po.time_stamp +0 -0
  22. data/locale/de/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  23. data/locale/de/foreman_virt_who_configure.edit.po +638 -0
  24. data/locale/de/foreman_virt_who_configure.po +0 -3
  25. data/locale/de/foreman_virt_who_configure.po.time_stamp +0 -0
  26. data/locale/de_DE/foreman_virt_who_configure.edit.po +624 -0
  27. data/locale/de_DE/foreman_virt_who_configure.po +0 -3
  28. data/locale/de_DE/foreman_virt_who_configure.po.time_stamp +0 -0
  29. data/locale/el/foreman_virt_who_configure.edit.po +621 -0
  30. data/locale/el/foreman_virt_who_configure.po +0 -3
  31. data/locale/el/foreman_virt_who_configure.po.time_stamp +0 -0
  32. data/locale/en/foreman_virt_who_configure.edit.po +617 -0
  33. data/locale/en/foreman_virt_who_configure.po +0 -3
  34. data/locale/en/foreman_virt_who_configure.po.time_stamp +0 -0
  35. data/locale/en_GB/foreman_virt_who_configure.edit.po +623 -0
  36. data/locale/en_GB/foreman_virt_who_configure.po +0 -3
  37. data/locale/en_GB/foreman_virt_who_configure.po.time_stamp +0 -0
  38. data/locale/es/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  39. data/locale/es/foreman_virt_who_configure.edit.po +635 -0
  40. data/locale/es/foreman_virt_who_configure.po +0 -3
  41. data/locale/es/foreman_virt_who_configure.po.time_stamp +0 -0
  42. data/locale/foreman_virt_who_configure.pot +4 -7
  43. data/locale/fr/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  44. data/locale/fr/foreman_virt_who_configure.edit.po +634 -0
  45. data/locale/fr/foreman_virt_who_configure.po +0 -3
  46. data/locale/fr/foreman_virt_who_configure.po.time_stamp +0 -0
  47. data/locale/gl/foreman_virt_who_configure.edit.po +621 -0
  48. data/locale/gl/foreman_virt_who_configure.po +0 -3
  49. data/locale/gl/foreman_virt_who_configure.po.time_stamp +0 -0
  50. data/locale/gu/foreman_virt_who_configure.edit.po +621 -0
  51. data/locale/gu/foreman_virt_who_configure.po +0 -3
  52. data/locale/gu/foreman_virt_who_configure.po.time_stamp +0 -0
  53. data/locale/he_IL/foreman_virt_who_configure.edit.po +623 -0
  54. data/locale/he_IL/foreman_virt_who_configure.po +0 -3
  55. data/locale/he_IL/foreman_virt_who_configure.po.time_stamp +0 -0
  56. data/locale/hi/foreman_virt_who_configure.edit.po +621 -0
  57. data/locale/hi/foreman_virt_who_configure.po +0 -3
  58. data/locale/hi/foreman_virt_who_configure.po.time_stamp +0 -0
  59. data/locale/it/foreman_virt_who_configure.edit.po +625 -0
  60. data/locale/it/foreman_virt_who_configure.po +0 -3
  61. data/locale/it/foreman_virt_who_configure.po.time_stamp +0 -0
  62. data/locale/ja/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  63. data/locale/ja/foreman_virt_who_configure.edit.po +632 -0
  64. data/locale/ja/foreman_virt_who_configure.po +0 -3
  65. data/locale/ja/foreman_virt_who_configure.po.time_stamp +0 -0
  66. data/locale/ka/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  67. data/locale/ka/foreman_virt_who_configure.edit.po +628 -0
  68. data/locale/ka/foreman_virt_who_configure.po +0 -3
  69. data/locale/ka/foreman_virt_who_configure.po.time_stamp +0 -0
  70. data/locale/kn/foreman_virt_who_configure.edit.po +621 -0
  71. data/locale/kn/foreman_virt_who_configure.po +0 -3
  72. data/locale/kn/foreman_virt_who_configure.po.time_stamp +0 -0
  73. data/locale/ko/foreman_virt_who_configure.edit.po +623 -0
  74. data/locale/ko/foreman_virt_who_configure.po +0 -3
  75. data/locale/ko/foreman_virt_who_configure.po.time_stamp +0 -0
  76. data/locale/mr/foreman_virt_who_configure.edit.po +621 -0
  77. data/locale/mr/foreman_virt_who_configure.po +0 -3
  78. data/locale/mr/foreman_virt_who_configure.po.time_stamp +0 -0
  79. data/locale/nl_NL/foreman_virt_who_configure.edit.po +626 -0
  80. data/locale/nl_NL/foreman_virt_who_configure.po +0 -3
  81. data/locale/nl_NL/foreman_virt_who_configure.po.time_stamp +0 -0
  82. data/locale/or/foreman_virt_who_configure.edit.po +621 -0
  83. data/locale/or/foreman_virt_who_configure.po +0 -3
  84. data/locale/or/foreman_virt_who_configure.po.time_stamp +0 -0
  85. data/locale/pa/foreman_virt_who_configure.edit.po +622 -0
  86. data/locale/pa/foreman_virt_who_configure.po +0 -3
  87. data/locale/pa/foreman_virt_who_configure.po.time_stamp +0 -0
  88. data/locale/pl/foreman_virt_who_configure.edit.po +624 -0
  89. data/locale/pl/foreman_virt_who_configure.po +0 -3
  90. data/locale/pl/foreman_virt_who_configure.po.time_stamp +0 -0
  91. data/locale/pt/foreman_virt_who_configure.edit.po +622 -0
  92. data/locale/pt/foreman_virt_who_configure.po +0 -3
  93. data/locale/pt/foreman_virt_who_configure.po.time_stamp +0 -0
  94. data/locale/pt_BR/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  95. data/locale/pt_BR/foreman_virt_who_configure.edit.po +634 -0
  96. data/locale/pt_BR/foreman_virt_who_configure.po +0 -3
  97. data/locale/pt_BR/foreman_virt_who_configure.po.time_stamp +0 -0
  98. data/locale/ru/foreman_virt_who_configure.edit.po +627 -0
  99. data/locale/ru/foreman_virt_who_configure.po +0 -3
  100. data/locale/ru/foreman_virt_who_configure.po.time_stamp +0 -0
  101. data/locale/sl/foreman_virt_who_configure.edit.po +622 -0
  102. data/locale/sl/foreman_virt_who_configure.po +0 -3
  103. data/locale/sl/foreman_virt_who_configure.po.time_stamp +0 -0
  104. data/locale/sv_SE/foreman_virt_who_configure.edit.po +623 -0
  105. data/locale/sv_SE/foreman_virt_who_configure.po +0 -3
  106. data/locale/sv_SE/foreman_virt_who_configure.po.time_stamp +0 -0
  107. data/locale/ta/foreman_virt_who_configure.edit.po +621 -0
  108. data/locale/ta/foreman_virt_who_configure.po +0 -3
  109. data/locale/ta/foreman_virt_who_configure.po.time_stamp +0 -0
  110. data/locale/ta_IN/foreman_virt_who_configure.edit.po +622 -0
  111. data/locale/ta_IN/foreman_virt_who_configure.po +0 -3
  112. data/locale/ta_IN/foreman_virt_who_configure.po.time_stamp +0 -0
  113. data/locale/te/foreman_virt_who_configure.edit.po +621 -0
  114. data/locale/te/foreman_virt_who_configure.po +0 -3
  115. data/locale/te/foreman_virt_who_configure.po.time_stamp +0 -0
  116. data/locale/tr/foreman_virt_who_configure.edit.po +621 -0
  117. data/locale/tr/foreman_virt_who_configure.po +0 -3
  118. data/locale/tr/foreman_virt_who_configure.po.time_stamp +0 -0
  119. data/locale/zh_CN/LC_MESSAGES/foreman_virt_who_configure.mo +0 -0
  120. data/locale/zh_CN/foreman_virt_who_configure.edit.po +633 -0
  121. data/locale/zh_CN/foreman_virt_who_configure.po +0 -3
  122. data/locale/zh_CN/foreman_virt_who_configure.po.time_stamp +0 -0
  123. data/locale/zh_TW/foreman_virt_who_configure.edit.po +623 -0
  124. data/locale/zh_TW/foreman_virt_who_configure.po +0 -3
  125. data/locale/zh_TW/foreman_virt_who_configure.po.time_stamp +0 -0
  126. data/test/functional/api/v2/configs_controller_test.rb +21 -0
  127. metadata +79 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bec81d0d25964289226511f89e97ba3f1206a2c507e7b2397f84f8733074f4c9
4
- data.tar.gz: 128103a173ff39059da75e62c406346a7814855ad94b0b3584a9ab5e65b69fcf
3
+ metadata.gz: 22ea7c1f01f0e5903a2f219b5be36745a0c229b5471f2538ab88e65dc8117ff0
4
+ data.tar.gz: 1d53ba8208462ef5c2c01c67c18c1b37523effdfb9bfc3bee174e64aa86e2a18
5
5
  SHA512:
6
- metadata.gz: 779b402b0d303138bbe654ef8ed3fb17ad227cafa82977cec81ba84da5cde29d54e1aa743b51f35b0deeafc2a3073ab6c39c31d3f919cbfa0000ee6f7455af85
7
- data.tar.gz: 3fe10668d94b0b5b8b81e95def0f8e353b4a8e98e5d7013be2b63934004083967f714434d6a867260c45c7363c5b59a300ba75838f361dfe5be5a6e26641a8ab
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
- 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
@@ -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")
@@ -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.22'.freeze
3
3
  end
@@ -0,0 +1,2 @@
1
+ # Autogenerated!
2
+ _("Report")