hammer_cli_foreman 3.13.0 → 3.14.1
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.
- checksums.yaml +4 -4
- data/doc/host_create.md +3 -1
- data/doc/release_notes.md +13 -0
- data/lib/hammer_cli_foreman/commands.rb +1 -1
- data/lib/hammer_cli_foreman/compute_resource/libvirt.rb +5 -2
- data/lib/hammer_cli_foreman/compute_resource/vmware.rb +9 -6
- data/lib/hammer_cli_foreman/exception_handler.rb +3 -1
- data/lib/hammer_cli_foreman/option_builders.rb +4 -2
- data/lib/hammer_cli_foreman/registration_tokens.rb +27 -0
- data/lib/hammer_cli_foreman/user.rb +2 -1
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ka/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/test/data/3.14/foreman_api.json +1 -0
- data/test/functional/architecture_test.rb +0 -2
- data/test/functional/settings_test.rb +0 -2
- data/test/functional/usergroup_test.rb +0 -2
- data/test/test_helper.rb +1 -1
- data/test/unit/architecture_test.rb +0 -10
- data/test/unit/settings_test.rb +0 -4
- data/test/unit/usergroup_test.rb +0 -10
- metadata +10 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1914d889f653cab17ed415ae4a8abc986cf4ea8d35b2da21abf0f028380b4e9
|
4
|
+
data.tar.gz: 31ec9e413efc2cdcb6e5feb8136407103009d29c29d96046807471b5ecffe96d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4a29083cd559a9504a1e4d7023504c83cd9df6acae39f001ed1cde21943e2c72bceb7212d13071e2c7e2bb2aed97cde2a7a2500883e2478c9282079d63fe2be
|
7
|
+
data.tar.gz: fe3e6166aa6a2cb174dda72d0585a7ce19b1b5b6880dae1034d5e5f7be1fb7b0c5fd8e58eeab0fa6c08f1f6b7871a00643511c6134364f7e9cc955de0a2cb2b7
|
data/doc/host_create.md
CHANGED
@@ -195,6 +195,7 @@ Available keys for `--compute-attributes`:
|
|
195
195
|
cpus # number of CPUs
|
196
196
|
memory # string, amount of memory, value in bytes
|
197
197
|
start # Must be a 1 or 0, whether to start the machine or not
|
198
|
+
firmware # automatic/bios/uefi/uefi_secure_boot (UEFI with Secure Boot enabled)
|
198
199
|
```
|
199
200
|
|
200
201
|
Available keys for `--interface`:
|
@@ -257,7 +258,7 @@ Available keys for `--compute-attributes`:
|
|
257
258
|
cpus CPU count
|
258
259
|
corespersocket Number of cores per socket (applicable to hardware versions < 10 only)
|
259
260
|
memory_mb Integer number, amount of memory in MB
|
260
|
-
firmware automatic/bios/
|
261
|
+
firmware automatic/bios/uefi/uefi_secure_boot (UEFI with Secure Boot enabled)
|
261
262
|
cluster Cluster ID from VMware
|
262
263
|
resource_pool Resource Pool ID from VMware
|
263
264
|
path Path to folder
|
@@ -270,6 +271,7 @@ annotation Annotation Notes
|
|
270
271
|
scsi_controllers List with SCSI controllers definitions
|
271
272
|
type - ID of the controller from VMware
|
272
273
|
key - Key of the controller (e.g. 1000)
|
274
|
+
virtual_tpm Must be a 1 or 0, Enable virtual TPM. Only compatible with EFI firmware
|
273
275
|
start # Must be a 1 or 0, whether to start the machine or not
|
274
276
|
```
|
275
277
|
|
data/doc/release_notes.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
Release notes
|
2
2
|
=============
|
3
|
+
### 3.14.1 (2025-03-31)
|
4
|
+
* Fix hammer host update error messages, [#38291](http://projects.theforeman.org/issues/38291)
|
5
|
+
|
6
|
+
### 3.14.0 (2025-02-20)
|
7
|
+
* Invalidate tokens for specific user/users ([PR #636](https://github.com/theforeman/hammer-cli-foreman/pull/636)), [#38124](http://projects.theforeman.org/issues/38124)
|
8
|
+
* Don't build hidden params as options ([PR #634](https://github.com/theforeman/hammer-cli-foreman/pull/634)), [#38077](http://projects.theforeman.org/issues/38077)
|
9
|
+
* Use master branch of apipie-bindings in ci
|
10
|
+
* Drop el 8 from packit config
|
11
|
+
* Add secure boot and tpm options to vmware ([PR #630](https://github.com/theforeman/hammer-cli-foreman/pull/630)), [#37685](http://projects.theforeman.org/issues/37685)
|
12
|
+
* Add firmware option for libvirt hosts creation ([PR #631](https://github.com/theforeman/hammer-cli-foreman/pull/631)), [#37692](http://projects.theforeman.org/issues/37692)
|
13
|
+
* Use non-deprecated gpl-3.0-or-later license tag
|
14
|
+
* Bump to 3.14.0-develop
|
15
|
+
|
3
16
|
### 3.13.0 (2024-11-08)
|
4
17
|
* Bump to 3.13.0-develop
|
5
18
|
|
@@ -96,7 +96,7 @@ module HammerCLIForeman
|
|
96
96
|
def self.create_option_builder
|
97
97
|
configurator = BuilderConfigurator.new(searchables, dependency_resolver)
|
98
98
|
|
99
|
-
builder = ForemanOptionBuilder.new(searchables)
|
99
|
+
builder = ForemanOptionBuilder.new(searchables, resource_defined? ? resource.action(action) : nil)
|
100
100
|
builder.builders = super.builders
|
101
101
|
builder.builders += configurator.builders_for(resource, resource.action(action)) if resource_defined?
|
102
102
|
builder
|
@@ -9,7 +9,8 @@ module HammerCLIForeman
|
|
9
9
|
[
|
10
10
|
['cpus', _('Number of CPUs'), { bold: true }],
|
11
11
|
['memory', _('String, amount of memory, value in bytes'), { bold: true }],
|
12
|
-
['boot_order', _('Device names to specify the boot order')]
|
12
|
+
['boot_order', _('Device names to specify the boot order')],
|
13
|
+
['firmware', _('automatic/bios/uefi/uefi_secure_boot (UEFI with Secure Boot enabled)')]
|
13
14
|
]
|
14
15
|
end
|
15
16
|
|
@@ -49,7 +50,9 @@ module HammerCLIForeman
|
|
49
50
|
Fields::Field.new(:label => _('OS Type'), :path => [:os_type]),
|
50
51
|
Fields::Field.new(:label => _('Domain Type'), :path => [:domain_type]),
|
51
52
|
Fields::Field.new(:label => _('Persistent'), :path => [:persistent]),
|
52
|
-
Fields::List.new(:label => _('Boot order'), :path => [:boot_order])
|
53
|
+
Fields::List.new(:label => _('Boot order'), :path => [:boot_order]),
|
54
|
+
Fields::Field.new(:label => _('Firmware'), :path => [:firmware]),
|
55
|
+
Fields::Field.new(:label => _('Secure Boot'), :path => [:secure_boot])
|
53
56
|
]
|
54
57
|
end
|
55
58
|
|
@@ -16,7 +16,7 @@ module HammerCLIForeman
|
|
16
16
|
['memory_mb', _('Integer number, amount of memory in MB'), { bold: true }],
|
17
17
|
['path', _('Path to folder'), { bold: true }],
|
18
18
|
['resource_pool', _('Resource Pool ID from VMware'), { bold: true }],
|
19
|
-
['firmware', 'automatic/bios/
|
19
|
+
['firmware', _('automatic/bios/uefi/uefi_secure_boot (UEFI with Secure Boot enabled)')],
|
20
20
|
['guest_id', _('Guest OS ID form VMware')],
|
21
21
|
['hardware_version', _('Hardware version ID from VMware')],
|
22
22
|
['memoryHotAddEnabled', _('Must be a 1 or 0, lets you add memory resources while the machine is on')],
|
@@ -26,10 +26,11 @@ module HammerCLIForeman
|
|
26
26
|
['scsi_controllers', [_('List with SCSI controllers definitions'),
|
27
27
|
' type - ' + _('ID of the controller type from VMware'),
|
28
28
|
' key - ' + _('Key of the controller (e.g. 1000)')].flatten(1).join("\n")],
|
29
|
-
['nvme_controllers',
|
30
|
-
|
31
|
-
|
32
|
-
['boot_order',
|
29
|
+
['nvme_controllers', [_('List with NVME controllers definitions'),
|
30
|
+
' type - ' + _('ID of the controller type from VMware'),
|
31
|
+
' key - ' + _('Key of the controller (e.g. 2000)')].flatten(1).join("\n")],
|
32
|
+
['boot_order', _('Device names to specify the boot order')],
|
33
|
+
['virtual_tpm', _('Must be a 1 or 0, Enable virtual TPM. Only compatible with EFI firmware.')]
|
33
34
|
]
|
34
35
|
end
|
35
36
|
|
@@ -84,7 +85,9 @@ module HammerCLIForeman
|
|
84
85
|
Fields::Field.new(label: _('Path'), path: [:path]),
|
85
86
|
Fields::Field.new(label: _('Operating System'), path: [:operatingsystem]),
|
86
87
|
Fields::Field.new(label: _('Mac'), path: [:mac]),
|
87
|
-
Fields::List.new(label: _('Boot order'), path: [:boot_order])
|
88
|
+
Fields::List.new(label: _('Boot order'), path: [:boot_order]),
|
89
|
+
Fields::Field.new(label: _('Virtual TPM'), path: [:virtual_tpm]),
|
90
|
+
Fields::Field.new(label: _('Secure Boot'), path: [:secure_boot])
|
88
91
|
]
|
89
92
|
end
|
90
93
|
|
@@ -98,9 +98,11 @@ module HammerCLIForeman
|
|
98
98
|
begin
|
99
99
|
response = JSON.parse(e.response)
|
100
100
|
response = HammerCLIForeman.record_to_common_format(response) unless response.has_key?('message')
|
101
|
-
message = response[
|
101
|
+
message = response["displayMessage"] || response["full_messages"] || response["message"]
|
102
102
|
rescue JSON::ParserError
|
103
103
|
message = e.message
|
104
|
+
ensure
|
105
|
+
message ||= e.message
|
104
106
|
end
|
105
107
|
|
106
108
|
print_error message
|
@@ -95,15 +95,17 @@ module HammerCLIForeman
|
|
95
95
|
|
96
96
|
class ForemanOptionBuilder < HammerCLI::OptionBuilderContainer
|
97
97
|
|
98
|
-
def initialize(searchables)
|
98
|
+
def initialize(searchables, action = nil)
|
99
99
|
@searchables = searchables
|
100
|
+
@action = action
|
100
101
|
end
|
101
102
|
|
102
103
|
def build(builder_params={})
|
103
104
|
expansion_options = builder_params[:expand] || {}
|
104
105
|
|
106
|
+
except_default = @action&.params&.select { |p| !p.show? }&.map { |p| HammerCLIForeman.param_to_resource(p.name).name } || []
|
105
107
|
allowed_resources = expansion_options[:only] || default_dependent_resources
|
106
|
-
allowed_resources -= expansion_options[:except] ||
|
108
|
+
allowed_resources -= expansion_options[:except] || except_default
|
107
109
|
allowed_resources += expansion_options[:including] || []
|
108
110
|
allowed_resources.uniq!
|
109
111
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module HammerCLIForeman
|
2
|
+
class RegistrationTokens < HammerCLIForeman::Command
|
3
|
+
resource :registration_tokens
|
4
|
+
command_name 'registration-tokens'
|
5
|
+
desc _('Manage registration tokens')
|
6
|
+
|
7
|
+
class InvalidateMultipleCommand < HammerCLIForeman::DeleteCommand
|
8
|
+
action :invalidate_jwt_tokens
|
9
|
+
command_name 'invalidate-multiple'
|
10
|
+
success_message _('Successfully invalidated registration tokens for %{users}.')
|
11
|
+
failure_message _('Could not invalidate registration tokens')
|
12
|
+
|
13
|
+
build_options
|
14
|
+
end
|
15
|
+
|
16
|
+
class InvalidateCommand < HammerCLIForeman::DeleteCommand
|
17
|
+
action :invalidate_jwt
|
18
|
+
command_name 'invalidate'
|
19
|
+
success_message _('Successfully invalidated registration tokens for %{user}.')
|
20
|
+
failure_message _('Could not invalidate registration tokens')
|
21
|
+
|
22
|
+
build_options
|
23
|
+
end
|
24
|
+
|
25
|
+
autoload_subcommands
|
26
|
+
end
|
27
|
+
end
|
@@ -93,7 +93,8 @@ module HammerCLIForeman
|
|
93
93
|
lazy_subcommand('table-preference', _("Managing table preferences"),
|
94
94
|
'HammerCLIForeman::TablePreference', 'hammer_cli_foreman/table_preference'
|
95
95
|
)
|
96
|
+
lazy_subcommand('registration-tokens', _("Managing registration tokens"),
|
97
|
+
'HammerCLIForeman::RegistrationTokens', 'hammer_cli_foreman/registration_tokens')
|
96
98
|
autoload_subcommands
|
97
99
|
end
|
98
|
-
|
99
100
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|