hammer_cli_foreman 3.3.0 → 3.5.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.
- checksums.yaml +4 -4
- data/doc/release_notes.md +12 -0
- data/lib/hammer_cli_foreman/api/negotiate_auth.rb +1 -1
- data/lib/hammer_cli_foreman/command_extensions/compute_resource_subcommand.rb +14 -0
- data/lib/hammer_cli_foreman/command_extensions.rb +1 -0
- data/lib/hammer_cli_foreman/compute_resource/register_compute_resources.rb +0 -1
- data/lib/hammer_cli_foreman/compute_resource/vmware.rb +3 -1
- data/lib/hammer_cli_foreman/compute_resource.rb +26 -6
- data/lib/hammer_cli_foreman/id_resolver.rb +2 -1
- data/lib/hammer_cli_foreman/table_preference.rb +48 -0
- data/lib/hammer_cli_foreman/user.rb +3 -0
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/lib/hammer_cli_foreman/virtual_machine.rb +0 -4
- data/locale/ca/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/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.4/foreman_api.json +1 -0
- data/test/functional/compute_resource_test.rb +21 -0
- data/test/functional/table_preference_test.rb +100 -0
- data/test/test_helper.rb +1 -1
- metadata +10 -5
- data/lib/hammer_cli_foreman/compute_resource/gce.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 006d4b4eed7a0555a9094223fcbf0310fbf45787fa879f96426b7420a3fd8207
|
4
|
+
data.tar.gz: 78bb6049eae38f6793a420461c5ee8772eac699d538e33d331d01f12ab236178
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a66faf43bc97309b2e98ddbf9aeb9dc9f5bd6a768326d305692819ac4c76bcb4d9def107795823b5df9192993f691ea608a31c9af003c0fcad4cbb57e8c09a1
|
7
|
+
data.tar.gz: a873297a23beb5e95f8bd1a232e836a5b914af82836f90e33722ab8a7162f55396c17c93955d50929bbed95b3fe7c1b0cc48907b918c465a247d7ab22d511b90
|
data/doc/release_notes.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
Release notes
|
2
2
|
=============
|
3
|
+
### 3.5.0 (2022-10-31)
|
4
|
+
* Extract gce related info ([PR #606](https://github.com/theforeman/hammer-cli-foreman/pull/606)), [#35659](http://projects.theforeman.org/issues/35659)
|
5
|
+
* Change auth endpoint for negotiation, [#35473](http://projects.theforeman.org/issues/35473)
|
6
|
+
* Enhance vmware listing commands and switch to cluster_name param ([PR #604](https://github.com/theforeman/hammer-cli-foreman/pull/604)), [#35438](http://projects.theforeman.org/issues/35438)
|
7
|
+
* Bump to 3.5.0-develop
|
8
|
+
|
9
|
+
### 3.4.0 (2022-08-09)
|
10
|
+
* Add options for table preferences cli ([PR #603](https://github.com/theforeman/hammer-cli-foreman/pull/603)), [#35219](http://projects.theforeman.org/issues/35219)
|
11
|
+
* I18n - extracting new, pulling from tx, [#34629](http://projects.theforeman.org/issues/34629)
|
12
|
+
* Fix config for transifex, [#34629](http://projects.theforeman.org/issues/34629)
|
13
|
+
* Bump to 3.4.0-develop
|
14
|
+
|
3
15
|
### 3.3.0 (2022-05-10)
|
4
16
|
* Add kerberos negotiate auth support ([PR #555](https://github.com/theforeman/hammer-cli-foreman/pull/555)), [#8923](http://projects.theforeman.org/issues/8923)
|
5
17
|
* Pin mocha gem to < 1.14.0
|
@@ -2,7 +2,7 @@ module HammerCLIForeman
|
|
2
2
|
module Api
|
3
3
|
class NegotiateAuth < ApipieBindings::Authenticators::Negotiate
|
4
4
|
def initialize(foreman_url, **options)
|
5
|
-
super("#{foreman_url}/users/extlogin", HammerCLI::SSLOptions.new.get_options(foreman_url).merge(options))
|
5
|
+
super("#{foreman_url}/api/users/extlogin", HammerCLI::SSLOptions.new.get_options(foreman_url).merge(options))
|
6
6
|
end
|
7
7
|
|
8
8
|
def user
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module HammerCLIForeman
|
2
|
+
module CommandExtensions
|
3
|
+
class ComputeResourceSubcommand < HammerCLI::CommandExtensions
|
4
|
+
option '--cluster-id', 'ID', _('Cluster ID'),
|
5
|
+
deprecated: _('Use --cluster-name instead')
|
6
|
+
option '--cluster-name', 'NAME', _('Cluster name or path to search by'),
|
7
|
+
attribute_name: :option_cluster_id
|
8
|
+
|
9
|
+
request_params do |params|
|
10
|
+
params['cluster_id'] = params['cluster_id'].gsub('/', '%2F') if params['cluster_id']
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -7,3 +7,4 @@ require 'hammer_cli_foreman/command_extensions/status'
|
|
7
7
|
require 'hammer_cli_foreman/command_extensions/user'
|
8
8
|
require 'hammer_cli_foreman/command_extensions/subnet'
|
9
9
|
require 'hammer_cli_foreman/command_extensions/domain'
|
10
|
+
require 'hammer_cli_foreman/command_extensions/compute_resource_subcommand'
|
@@ -10,7 +10,6 @@ module HammerCLIForeman
|
|
10
10
|
|
11
11
|
require 'hammer_cli_foreman/compute_resource/base'
|
12
12
|
require 'hammer_cli_foreman/compute_resource/ec2.rb'
|
13
|
-
require 'hammer_cli_foreman/compute_resource/gce.rb'
|
14
13
|
require 'hammer_cli_foreman/compute_resource/libvirt.rb'
|
15
14
|
require 'hammer_cli_foreman/compute_resource/openstack.rb'
|
16
15
|
require 'hammer_cli_foreman/compute_resource/ovirt.rb'
|
@@ -64,7 +64,9 @@ module HammerCLIForeman
|
|
64
64
|
def provider_specific_fields
|
65
65
|
super + [
|
66
66
|
Fields::Field.new(:label => _('Datacenter'), :path => [:datacenter]),
|
67
|
-
Fields::Field.new(:label => _('Server'), :path => [:server])
|
67
|
+
Fields::Field.new(:label => _('Server'), :path => [:server]),
|
68
|
+
Fields::Boolean.new(:label => _('Console password set'), :path => [:set_console_password]),
|
69
|
+
Fields::Boolean.new(:label => _('Caching enabled'), :path => [:caching_enabled])
|
68
70
|
]
|
69
71
|
end
|
70
72
|
|
@@ -121,6 +121,9 @@ module HammerCLIForeman
|
|
121
121
|
output do
|
122
122
|
field :id, _('Id')
|
123
123
|
field :name, _('Name')
|
124
|
+
field :datacenter, _('Datacenter')
|
125
|
+
field :num_host, _('Hosts')
|
126
|
+
field :full_path, _('Cluster path')
|
124
127
|
end
|
125
128
|
|
126
129
|
build_options
|
@@ -133,9 +136,13 @@ module HammerCLIForeman
|
|
133
136
|
output do
|
134
137
|
field :id, _('Id'), Fields::Field, :max_width => 200, :hide_blank => true
|
135
138
|
field :name, _('Name')
|
139
|
+
field :datacenter, _('Datacenter')
|
140
|
+
field :virtualswitch, _('Virtual switch')
|
141
|
+
field :vlanid, _('VLAN ID')
|
136
142
|
end
|
137
143
|
|
138
|
-
build_options
|
144
|
+
build_options without: :cluster_id
|
145
|
+
extend_with(HammerCLIForeman::CommandExtensions::ComputeResourceSubcommand.new(only: %i[option request_params]))
|
139
146
|
end
|
140
147
|
|
141
148
|
class AvailableVnicProfilesCommand < HammerCLIForeman::ListCommand
|
@@ -158,6 +165,7 @@ module HammerCLIForeman
|
|
158
165
|
output do
|
159
166
|
field :uuid, _('Uuid')
|
160
167
|
field :name, _('Name')
|
168
|
+
field :path, _('Path'), Fields::Field, :hide_blank => true
|
161
169
|
end
|
162
170
|
|
163
171
|
build_options
|
@@ -182,6 +190,10 @@ module HammerCLIForeman
|
|
182
190
|
output do
|
183
191
|
field :id, _('Id')
|
184
192
|
field :name, _('Name')
|
193
|
+
field :parent, _('Parent')
|
194
|
+
field :datacenter, _('Datacenter')
|
195
|
+
field :path, _('Path'), Fields::Field, :max_width => 50
|
196
|
+
field :type, _('Type')
|
185
197
|
end
|
186
198
|
|
187
199
|
build_options
|
@@ -206,9 +218,12 @@ module HammerCLIForeman
|
|
206
218
|
output do
|
207
219
|
field :id, _('Id')
|
208
220
|
field :name, _('Name')
|
221
|
+
field :cluster, _('Cluster')
|
222
|
+
field :datacenter, _('Datacenter')
|
209
223
|
end
|
210
224
|
|
211
|
-
build_options
|
225
|
+
build_options without: :cluster_id
|
226
|
+
extend_with(HammerCLIForeman::CommandExtensions::ComputeResourceSubcommand.new(only: %i[option request_params]))
|
212
227
|
end
|
213
228
|
|
214
229
|
class AvailableStorageDomainsCommand < HammerCLIForeman::ListCommand
|
@@ -220,7 +235,8 @@ module HammerCLIForeman
|
|
220
235
|
field :name, _('Name')
|
221
236
|
end
|
222
237
|
|
223
|
-
build_options
|
238
|
+
build_options without: :cluster_id
|
239
|
+
extend_with(HammerCLIForeman::CommandExtensions::ComputeResourceSubcommand.new(only: %i[option request_params]))
|
224
240
|
end
|
225
241
|
|
226
242
|
class AvailableStoragePodsCommand < HammerCLIForeman::ListCommand
|
@@ -230,9 +246,11 @@ module HammerCLIForeman
|
|
230
246
|
output do
|
231
247
|
field :id, _('Id')
|
232
248
|
field :name, _('Name')
|
249
|
+
field :datacenter, _('Datacenter')
|
233
250
|
end
|
234
251
|
|
235
|
-
build_options
|
252
|
+
build_options without: :cluster_id
|
253
|
+
extend_with(HammerCLIForeman::CommandExtensions::ComputeResourceSubcommand.new(only: %i[option request_params]))
|
236
254
|
end
|
237
255
|
|
238
256
|
class AvailableSecurityGroupsCommand < HammerCLIForeman::ListCommand
|
@@ -252,8 +270,10 @@ module HammerCLIForeman
|
|
252
270
|
command_name 'virtual-machines'
|
253
271
|
|
254
272
|
output do
|
255
|
-
field :id, _(
|
256
|
-
field :name, _(
|
273
|
+
field :id, _('Id')
|
274
|
+
field :name, _('Name')
|
275
|
+
field :path, _('Path'), Fields::Field, :max_width => 50
|
276
|
+
field :state, _('State')
|
257
277
|
end
|
258
278
|
|
259
279
|
build_options
|
@@ -66,7 +66,8 @@ module HammerCLIForeman
|
|
66
66
|
:user => [ s("login", _("User's login to search by")) ],
|
67
67
|
:common_parameter => [ s_name(_("Common parameter name")) ],
|
68
68
|
:template_combination => [],
|
69
|
-
:compute_attribute => []
|
69
|
+
:compute_attribute => [],
|
70
|
+
:table_preference => []
|
70
71
|
}
|
71
72
|
DEFAULT_SEARCHABLES = [ s_name(_("Name to search by")) ]
|
72
73
|
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module HammerCLIForeman
|
2
|
+
class TablePreference < HammerCLIForeman::Command
|
3
|
+
resource :table_preferences
|
4
|
+
command_name "table-preference"
|
5
|
+
|
6
|
+
class ListCommand < HammerCLIForeman::ListCommand
|
7
|
+
output do
|
8
|
+
field :id, _("Id")
|
9
|
+
field :name, _("Name")
|
10
|
+
field :columns, _("Columns"), Fields::List
|
11
|
+
end
|
12
|
+
|
13
|
+
build_options
|
14
|
+
end
|
15
|
+
|
16
|
+
class CreateCommand < HammerCLIForeman::CreateCommand
|
17
|
+
success_message _('Table preference created.')
|
18
|
+
failure_message _('Could not create table preference')
|
19
|
+
|
20
|
+
build_options
|
21
|
+
end
|
22
|
+
|
23
|
+
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
24
|
+
success_message _('Table preference updated.')
|
25
|
+
failure_message _('Could not update table preference')
|
26
|
+
|
27
|
+
build_options
|
28
|
+
end
|
29
|
+
|
30
|
+
class InfoCommand < HammerCLIForeman::InfoCommand
|
31
|
+
output ListCommand.output_definition do
|
32
|
+
field :created_at, _("Created at"), Fields::Date
|
33
|
+
field :updated_at, _("Updated at"), Fields::Date
|
34
|
+
end
|
35
|
+
|
36
|
+
build_options
|
37
|
+
end
|
38
|
+
|
39
|
+
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
40
|
+
success_message _('Table preference deleted.')
|
41
|
+
failure_message _('Could not remove table preference')
|
42
|
+
|
43
|
+
build_options
|
44
|
+
end
|
45
|
+
|
46
|
+
autoload_subcommands
|
47
|
+
end
|
48
|
+
end
|
@@ -90,6 +90,9 @@ module HammerCLIForeman
|
|
90
90
|
lazy_subcommand('mail-notification', _("Managing personal mail notifications"),
|
91
91
|
'HammerCLIForeman::UserMailNotification', 'hammer_cli_foreman/user_mail_notification'
|
92
92
|
)
|
93
|
+
lazy_subcommand('table-preference', _("Managing table preferences"),
|
94
|
+
'HammerCLIForeman::TablePreference', 'hammer_cli_foreman/table_preference'
|
95
|
+
)
|
93
96
|
autoload_subcommands
|
94
97
|
end
|
95
98
|
|
@@ -9,7 +9,6 @@ module HammerCLIForeman
|
|
9
9
|
class PowerVmCommand < HammerCLIForeman::Command
|
10
10
|
action :power_vm
|
11
11
|
command_name 'power'
|
12
|
-
option "--vm-id", "VM-ID", _("Virtual machine id, for gce use virtual machine name")
|
13
12
|
|
14
13
|
success_message _("Virtual machine is powering.")
|
15
14
|
failure_message _("Could not power the virtual machine")
|
@@ -19,7 +18,6 @@ module HammerCLIForeman
|
|
19
18
|
|
20
19
|
class InfoCommand < HammerCLIForeman::InfoCommand
|
21
20
|
action :show_vm
|
22
|
-
option "--vm-id", "VM-ID", _("Virtual machine id, for gce use virtual machine name")
|
23
21
|
|
24
22
|
output do
|
25
23
|
field :id, _("Id")
|
@@ -39,8 +37,6 @@ module HammerCLIForeman
|
|
39
37
|
|
40
38
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
41
39
|
action :destroy_vm
|
42
|
-
option "--vm-id", "VM-ID", _("Virtual machine id, for gce use virtual machine name")
|
43
|
-
|
44
40
|
|
45
41
|
success_message _("Virtual machine deleted.")
|
46
42
|
failure_message _("Could not delete the virtual machine")
|
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
|