hammer_cli_foreman 3.14.1 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/doc/host_create.md +0 -27
  3. data/doc/release_notes.md +9 -1
  4. data/lib/hammer_cli_foreman/auth_source_ldap.rb +2 -1
  5. data/lib/hammer_cli_foreman/compute_resource/register_compute_resources.rb +0 -1
  6. data/lib/hammer_cli_foreman/compute_resource.rb +0 -31
  7. data/lib/hammer_cli_foreman/exception_handler.rb +2 -1
  8. data/lib/hammer_cli_foreman/version.rb +1 -1
  9. data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  10. data/locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  11. data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  12. data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  13. data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  14. data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  15. data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  16. data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  17. data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  18. data/locale/ka/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  19. data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  20. data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  21. data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  22. data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  23. data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  24. data/test/data/3.15/foreman_api.json +1 -0
  25. data/test/functional/compute_attribute_test.rb +25 -25
  26. data/test/functional/compute_profile_test.rb +2 -2
  27. data/test/functional/compute_resource_test.rb +1 -75
  28. data/test/functional/virtual_machine_test.rb +2 -5
  29. data/test/test_helper.rb +1 -1
  30. metadata +8 -10
  31. data/lib/hammer_cli_foreman/compute_resource/ovirt.rb +0 -70
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1914d889f653cab17ed415ae4a8abc986cf4ea8d35b2da21abf0f028380b4e9
4
- data.tar.gz: 31ec9e413efc2cdcb6e5feb8136407103009d29c29d96046807471b5ecffe96d
3
+ metadata.gz: a6cce84aa9448f148f34dc8c3dadefb63266befb216719e8f8c288ac6dc6b086
4
+ data.tar.gz: c60b4c38f40c445f882d8916d8e07544f52cb783c04950d454a5f7e7e0944656
5
5
  SHA512:
6
- metadata.gz: f4a29083cd559a9504a1e4d7023504c83cd9df6acae39f001ed1cde21943e2c72bceb7212d13071e2c7e2bb2aed97cde2a7a2500883e2478c9282079d63fe2be
7
- data.tar.gz: fe3e6166aa6a2cb174dda72d0585a7ce19b1b5b6880dae1034d5e5f7be1fb7b0c5fd8e58eeab0fa6c08f1f6b7871a00643511c6134364f7e9cc955de0a2cb2b7
6
+ metadata.gz: 0e7e14288bd716781334577c6fbf5898fee6f2e5c0c9e225a4afc2d6f615ff55ad42676d97a14bdf791e87eb646c61408263832c89d7108b2e81826de6eae3f9
7
+ data.tar.gz: 644f4208b796b37517c556e3cbf95955f3c3d9f7032d6214ac2fa52a08683d52f3f4a873a4f411b4d83d60b6a172a87526489d23123d963c51f80c1e567c1fb4
data/doc/host_create.md CHANGED
@@ -225,33 +225,6 @@ security_groups
225
225
  network
226
226
  ```
227
227
 
228
- ## oVirt
229
- Available keys for `--compute-attributes`:
230
- ```
231
- cluster
232
- template # hardware profile to use
233
- cores # int value, number of cores
234
- sockets # int value, number of sockets
235
- memory # amount of memory, int value in bytes
236
- start # Must be a 1 or 0, whether to start the machine or not
237
- ```
238
-
239
- Available keys for `--interface`:
240
- ```
241
- compute_name # eg. eth0
242
- compute_network # select one of available networks for a cluster
243
- compute_interface # interface type
244
- ```
245
-
246
- Available keys for `--volume`:
247
- ```
248
- size_gb # volume size in GB, integer value
249
- storage_domain # select one of available storage domains
250
- bootable # boolean, only one volume can be bootable
251
- preallocate # boolean, set true to preallocate
252
- wipe_after_delete # boolean, set true to wipe disk after delete
253
- ```
254
-
255
228
  ## VMware
256
229
  Available keys for `--compute-attributes`:
257
230
  ```
data/doc/release_notes.md CHANGED
@@ -1,7 +1,15 @@
1
1
  Release notes
2
2
  =============
3
- ### 3.14.1 (2025-03-31)
3
+ ### 3.16.0 (2025-08-13)
4
+ * Ldap group membership ([PR #641](https://github.com/theforeman/hammer-cli-foreman/pull/641)), [#38611](http://projects.theforeman.org/issues/38611)
5
+ * Remove ovirt ([PR #639](https://github.com/theforeman/hammer-cli-foreman/pull/639)), [#38294](http://projects.theforeman.org/issues/38294)
6
+ * Bump to 3.16.0-develop
7
+
8
+ ### 3.15.0 (2025-05-14)
9
+ * Use 3.15 test data
10
+ * Fix hammer insights inventory sync error message ([PR #640](https://github.com/theforeman/hammer-cli-foreman/pull/640)), [#38401](http://projects.theforeman.org/issues/38401)
4
11
  * Fix hammer host update error messages, [#38291](http://projects.theforeman.org/issues/38291)
12
+ * Bump to 3.15.0-develop
5
13
 
6
14
  ### 3.14.0 (2025-02-20)
7
15
  * Invalidate tokens for specific user/users ([PR #636](https://github.com/theforeman/hammer-cli-foreman/pull/636)), [#38124](http://projects.theforeman.org/issues/38124)
@@ -30,7 +30,8 @@ module HammerCLIForeman
30
30
  field :account, _('Account Username')
31
31
  field :base_dn, _('Base DN')
32
32
  field :groups_base, _('Groups base DN')
33
- field :use_netgroups, _('Use Netgroups'), Fields::Boolean
33
+ field :use_netgroups, _('Use Netgroups'), Fields::Boolean, :replaced_by => [_('Account'), _('LDAP group membership')].join('/')
34
+ field :ldap_group_membership, _('LDAP group membership')
34
35
  field :ldap_filter, _('LDAP filter')
35
36
  field :onthefly_register, _('Automatically Create Accounts?'), Fields::Boolean
36
37
  field :usergroup_sync, _('Usergroup sync'), Fields::Boolean
@@ -12,6 +12,5 @@ module HammerCLIForeman
12
12
  require 'hammer_cli_foreman/compute_resource/ec2.rb'
13
13
  require 'hammer_cli_foreman/compute_resource/libvirt.rb'
14
14
  require 'hammer_cli_foreman/compute_resource/openstack.rb'
15
- require 'hammer_cli_foreman/compute_resource/ovirt.rb'
16
15
  require 'hammer_cli_foreman/compute_resource/vmware.rb'
17
16
  end
@@ -51,21 +51,11 @@ module HammerCLIForeman
51
51
 
52
52
 
53
53
  class CreateCommand < HammerCLIForeman::CreateCommand
54
- option "--public-key-path", "PUBLIC_KEY_PATH", _("Path to a file that contains oVirt public key (For oVirt only)"),
55
- :format => HammerCLI::Options::Normalizers::File.new
56
-
57
-
58
54
  success_message _("Compute resource created.")
59
55
  failure_message _("Could not create the compute resource")
60
56
 
61
57
  build_options
62
58
 
63
- def request_params
64
- params = super
65
- params['compute_resource']['public_key'] = option_public_key_path if option_public_key_path
66
- params
67
- end
68
-
69
59
  validate_options do
70
60
  if option(:option_provider).value.nil? || option(:option_name).value.nil?
71
61
  all(:option_name, :option_provider).required
@@ -82,17 +72,9 @@ module HammerCLIForeman
82
72
  end
83
73
 
84
74
  class UpdateCommand < HammerCLIForeman::UpdateCommand
85
- option "--public-key-path", "PUBLIC_KEY_PATH", _("Path to a file that contains oVirt public key (For oVirt only)"),
86
- :format => HammerCLI::Options::Normalizers::File.new
87
-
88
75
  success_message _("Compute resource updated.")
89
76
  failure_message _("Could not update the compute resource")
90
77
 
91
- def request_params
92
- params = super
93
- params['compute_resource']['public_key'] = option_public_key_path if option_public_key_path
94
- params
95
- end
96
78
  build_options :without => :name
97
79
  end
98
80
 
@@ -145,19 +127,6 @@ module HammerCLIForeman
145
127
  extend_with(HammerCLIForeman::CommandExtensions::ComputeResourceSubcommand.new(only: %i[option request_params]))
146
128
  end
147
129
 
148
- class AvailableVnicProfilesCommand < HammerCLIForeman::ListCommand
149
- action :available_vnic_profiles
150
- command_name 'vnic-profiles'
151
-
152
- output do
153
- field :id, _('VNIC profile ID'), Fields::Field, :max_width => 200, :hide_blank => true
154
- field :name, _('Name')
155
- field :network, _('Network ID')
156
- end
157
-
158
- build_options
159
- end
160
-
161
130
  class AvailableImagesCommand < HammerCLIForeman::ListCommand
162
131
  action :available_images
163
132
  command_name 'images'
@@ -170,7 +170,8 @@ module HammerCLIForeman
170
170
  end
171
171
 
172
172
  def response_message(response)
173
- message = JSON.parse(response)["error"]["message"]
173
+ result = JSON.parse(response)
174
+ message = result.dig("error", "message") || result.dig("message")
174
175
  "\n #{message}"
175
176
  rescue JSON::ParserError
176
177
  ''
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForeman
2
2
  def self.version
3
- @version ||= Gem::Version.new "3.14.1"
3
+ @version ||= Gem::Version.new "3.16.0"
4
4
  end
5
5
  end