hammer_cli_foreman 2.4.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/release_notes.md +40 -0
- data/lib/hammer_cli_foreman/architecture.rb +5 -5
- data/lib/hammer_cli_foreman/associating_commands.rb +0 -24
- data/lib/hammer_cli_foreman/bookmark.rb +5 -5
- data/lib/hammer_cli_foreman/combination.rb +3 -13
- data/lib/hammer_cli_foreman/command_extensions/ping.rb +21 -2
- data/lib/hammer_cli_foreman/command_extensions/subnet.rb +25 -10
- data/lib/hammer_cli_foreman/command_extensions/update_common.rb +14 -0
- data/lib/hammer_cli_foreman/command_extensions/user.rb +9 -5
- data/lib/hammer_cli_foreman/command_extensions.rb +1 -2
- data/lib/hammer_cli_foreman/commands.rb +17 -11
- data/lib/hammer_cli_foreman/compute_attribute.rb +1 -1
- data/lib/hammer_cli_foreman/compute_profile.rb +5 -5
- data/lib/hammer_cli_foreman/compute_resource/ovirt.rb +2 -1
- data/lib/hammer_cli_foreman/compute_resource.rb +23 -0
- data/lib/hammer_cli_foreman/config_report.rb +2 -0
- data/lib/hammer_cli_foreman/filter.rb +2 -2
- data/lib/hammer_cli_foreman/host.rb +1 -47
- data/lib/hammer_cli_foreman/hostgroup.rb +14 -58
- data/lib/hammer_cli_foreman/hosts/common_update_options.rb +10 -31
- data/lib/hammer_cli_foreman/id_resolver.rb +7 -68
- data/lib/hammer_cli_foreman/location.rb +0 -6
- data/lib/hammer_cli_foreman/mail_notification.rb +2 -2
- data/lib/hammer_cli_foreman/model.rb +5 -5
- data/lib/hammer_cli_foreman/operating_system.rb +10 -10
- data/lib/hammer_cli_foreman/option_builders.rb +84 -52
- data/lib/hammer_cli_foreman/option_sources/id_params.rb +41 -11
- data/lib/hammer_cli_foreman/option_sources/ids_params.rb +39 -7
- data/lib/hammer_cli_foreman/option_sources.rb +0 -1
- data/lib/hammer_cli_foreman/organization.rb +0 -6
- data/lib/hammer_cli_foreman/ping.rb +6 -1
- data/lib/hammer_cli_foreman/references.rb +0 -16
- data/lib/hammer_cli_foreman/registration.rb +18 -0
- data/lib/hammer_cli_foreman/settings.rb +3 -3
- data/lib/hammer_cli_foreman/smart_proxy.rb +7 -57
- data/lib/hammer_cli_foreman/template.rb +3 -15
- data/lib/hammer_cli_foreman/user.rb +4 -4
- data/lib/hammer_cli_foreman/usergroup.rb +5 -5
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/lib/hammer_cli_foreman.rb +3 -21
- data/lib/minitest/coverage_reporter.rb +1 -1
- 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/2.4/foreman_api.json +1 -0
- data/test/data/2.5/foreman_api.json +1 -0
- data/test/data/3.1/foreman_api.json +1 -0
- data/test/functional/architecture_test.rb +37 -5
- data/test/functional/bookmark_test.rb +5 -2
- data/test/functional/compute_attribute_test.rb +20 -20
- data/test/functional/compute_profile_test.rb +14 -1
- data/test/functional/compute_resource_test.rb +37 -0
- data/test/functional/filter_test.rb +2 -1
- data/test/functional/host_test.rb +65 -11
- data/test/functional/hostgroup/create_test.rb +11 -117
- data/test/functional/hostgroup/update_test.rb +11 -79
- data/test/functional/http_proxy_test.rb +12 -0
- data/test/functional/location_test.rb +13 -3
- data/test/functional/mail_notification_test.rb +3 -1
- data/test/functional/media_test.rb +11 -0
- data/test/functional/model_test.rb +3 -1
- data/test/functional/operating_system_test.rb +3 -1
- data/test/functional/personal_access_token_test.rb +4 -4
- data/test/functional/ping_test.rb +33 -0
- data/test/functional/realm_test.rb +11 -0
- data/test/functional/registration_test.rb +8 -0
- data/test/functional/report_template_test.rb +11 -0
- data/test/functional/settings_test.rb +4 -4
- data/test/functional/template_test.rb +87 -48
- data/test/functional/user_mail_notification_test.rb +3 -3
- data/test/functional/user_test.rb +11 -0
- data/test/functional/usergroup_test.rb +3 -1
- data/test/test_helper.rb +1 -1
- data/test/unit/apipie_resource_mock.rb +1 -39
- data/test/unit/architecture_test.rb +10 -10
- data/test/unit/bookmark_test.rb +10 -14
- data/test/unit/commands_test.rb +1 -2
- data/test/unit/compute_profile_test.rb +10 -10
- data/test/unit/config_report_test.rb +1 -0
- data/test/unit/helpers/command.rb +0 -8
- data/test/unit/host_test.rb +14 -61
- data/test/unit/hostgroup_test.rb +7 -26
- data/test/unit/id_resolver_test.rb +0 -28
- data/test/unit/mail_notification_test.rb +4 -4
- data/test/unit/model_test.rb +47 -47
- data/test/unit/operating_system_test.rb +10 -16
- data/test/unit/option_builders_test.rb +88 -83
- data/test/unit/settings_test.rb +4 -4
- data/test/unit/smart_proxy_test.rb +0 -12
- data/test/unit/usergroup_test.rb +10 -10
- metadata +115 -128
- data/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb +0 -29
- data/lib/hammer_cli_foreman/command_extensions/puppet_environments.rb +0 -29
- data/lib/hammer_cli_foreman/config_group.rb +0 -45
- data/lib/hammer_cli_foreman/option_sources/puppet_environment_params.rb +0 -59
- data/lib/hammer_cli_foreman/puppet_class.rb +0 -61
- data/lib/hammer_cli_foreman/puppet_environment.rb +0 -65
- data/lib/hammer_cli_foreman/smart_class_parameter.rb +0 -189
- data/test/functional/config_group_test.rb +0 -50
- data/test/functional/proxy_test.rb +0 -86
- data/test/functional/smart_class_parameter_test.rb +0 -97
- data/test/reports/TEST-Minitest-Result.xml +0 -4344
- data/test/unit/config_group_test.rb +0 -82
- data/test/unit/puppet_class_test.rb +0 -72
- data/test/unit/puppet_environment_test.rb +0 -114
- data/test/unit/smart_class_parameter_test.rb +0 -113
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomáš Strachota
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hammer_cli
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 3.1.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 3.1.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: apipie-bindings
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
34
|
+
version: 0.4.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
41
|
+
version: 0.4.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rest-client
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,20 +75,20 @@ dependencies:
|
|
75
75
|
version: 2.2.1
|
76
76
|
description: 'Foreman commands for Hammer CLI
|
77
77
|
|
78
|
-
|
78
|
+
'
|
79
79
|
email: tstracho@redhat.com
|
80
80
|
executables: []
|
81
81
|
extensions: []
|
82
82
|
extra_rdoc_files:
|
83
|
-
- doc/host_create.md
|
84
|
-
- doc/release_notes.md
|
85
|
-
- doc/plugin.md
|
86
83
|
- doc/configuration.md
|
87
84
|
- doc/name_id_resolution.md
|
88
|
-
- doc/
|
85
|
+
- doc/option_builder.md
|
89
86
|
- doc/using_hammer_cli_foreman_command.md
|
87
|
+
- doc/developer_docs.md
|
88
|
+
- doc/host_create.md
|
89
|
+
- doc/plugin.md
|
90
90
|
- doc/testing.md
|
91
|
-
- doc/
|
91
|
+
- doc/release_notes.md
|
92
92
|
- README.md
|
93
93
|
files:
|
94
94
|
- LICENSE
|
@@ -130,10 +130,9 @@ files:
|
|
130
130
|
- lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb
|
131
131
|
- lib/hammer_cli_foreman/command_extensions/option_sources.rb
|
132
132
|
- lib/hammer_cli_foreman/command_extensions/ping.rb
|
133
|
-
- lib/hammer_cli_foreman/command_extensions/puppet_environment.rb
|
134
|
-
- lib/hammer_cli_foreman/command_extensions/puppet_environments.rb
|
135
133
|
- lib/hammer_cli_foreman/command_extensions/status.rb
|
136
134
|
- lib/hammer_cli_foreman/command_extensions/subnet.rb
|
135
|
+
- lib/hammer_cli_foreman/command_extensions/update_common.rb
|
137
136
|
- lib/hammer_cli_foreman/command_extensions/user.rb
|
138
137
|
- lib/hammer_cli_foreman/commands.rb
|
139
138
|
- lib/hammer_cli_foreman/common_parameter.rb
|
@@ -150,7 +149,6 @@ files:
|
|
150
149
|
- lib/hammer_cli_foreman/compute_resource/register_compute_resources.rb
|
151
150
|
- lib/hammer_cli_foreman/compute_resource/utils.rb
|
152
151
|
- lib/hammer_cli_foreman/compute_resource/vmware.rb
|
153
|
-
- lib/hammer_cli_foreman/config_group.rb
|
154
152
|
- lib/hammer_cli_foreman/config_report.rb
|
155
153
|
- lib/hammer_cli_foreman/defaults.rb
|
156
154
|
- lib/hammer_cli_foreman/dependency_resolver.rb
|
@@ -181,7 +179,6 @@ files:
|
|
181
179
|
- lib/hammer_cli_foreman/option_sources/id_params.rb
|
182
180
|
- lib/hammer_cli_foreman/option_sources/ids_params.rb
|
183
181
|
- lib/hammer_cli_foreman/option_sources/new_params.rb
|
184
|
-
- lib/hammer_cli_foreman/option_sources/puppet_environment_params.rb
|
185
182
|
- lib/hammer_cli_foreman/option_sources/referenced_resource_id_params.rb
|
186
183
|
- lib/hammer_cli_foreman/option_sources/self_param.rb
|
187
184
|
- lib/hammer_cli_foreman/option_sources/user_params.rb
|
@@ -194,16 +191,14 @@ files:
|
|
194
191
|
- lib/hammer_cli_foreman/partition_table.rb
|
195
192
|
- lib/hammer_cli_foreman/personal_access_token.rb
|
196
193
|
- lib/hammer_cli_foreman/ping.rb
|
197
|
-
- lib/hammer_cli_foreman/puppet_class.rb
|
198
|
-
- lib/hammer_cli_foreman/puppet_environment.rb
|
199
194
|
- lib/hammer_cli_foreman/realm.rb
|
200
195
|
- lib/hammer_cli_foreman/references.rb
|
196
|
+
- lib/hammer_cli_foreman/registration.rb
|
201
197
|
- lib/hammer_cli_foreman/report_template.rb
|
202
198
|
- lib/hammer_cli_foreman/resource_supported_test.rb
|
203
199
|
- lib/hammer_cli_foreman/role.rb
|
204
200
|
- lib/hammer_cli_foreman/sessions.rb
|
205
201
|
- lib/hammer_cli_foreman/settings.rb
|
206
|
-
- lib/hammer_cli_foreman/smart_class_parameter.rb
|
207
202
|
- lib/hammer_cli_foreman/smart_proxy.rb
|
208
203
|
- lib/hammer_cli_foreman/ssh_keys.rb
|
209
204
|
- lib/hammer_cli_foreman/status.rb
|
@@ -245,6 +240,9 @@ files:
|
|
245
240
|
- test/data/1.24/foreman_api.json
|
246
241
|
- test/data/2.0/foreman_api.json
|
247
242
|
- test/data/2.1/foreman_api.json
|
243
|
+
- test/data/2.4/foreman_api.json
|
244
|
+
- test/data/2.5/foreman_api.json
|
245
|
+
- test/data/3.1/foreman_api.json
|
248
246
|
- test/data/README.md
|
249
247
|
- test/functional/architecture_test.rb
|
250
248
|
- test/functional/associating_commands_test.rb
|
@@ -255,7 +253,6 @@ files:
|
|
255
253
|
- test/functional/compute_attribute_test.rb
|
256
254
|
- test/functional/compute_profile_test.rb
|
257
255
|
- test/functional/compute_resource_test.rb
|
258
|
-
- test/functional/config_group_test.rb
|
259
256
|
- test/functional/filter_test.rb
|
260
257
|
- test/functional/host_test.rb
|
261
258
|
- test/functional/hostgroup/create_test.rb
|
@@ -269,12 +266,11 @@ files:
|
|
269
266
|
- test/functional/organization_test.rb
|
270
267
|
- test/functional/personal_access_token_test.rb
|
271
268
|
- test/functional/ping_test.rb
|
272
|
-
- test/functional/proxy_test.rb
|
273
269
|
- test/functional/realm_test.rb
|
270
|
+
- test/functional/registration_test.rb
|
274
271
|
- test/functional/report_template_test.rb
|
275
272
|
- test/functional/role_test.rb
|
276
273
|
- test/functional/settings_test.rb
|
277
|
-
- test/functional/smart_class_parameter_test.rb
|
278
274
|
- test/functional/ssh_keys_test.rb
|
279
275
|
- test/functional/status_test.rb
|
280
276
|
- test/functional/subnet/create_test.rb
|
@@ -285,7 +281,6 @@ files:
|
|
285
281
|
- test/functional/user_test.rb
|
286
282
|
- test/functional/usergroup_test.rb
|
287
283
|
- test/functional/virtual_machine_test.rb
|
288
|
-
- test/reports/TEST-Minitest-Result.xml
|
289
284
|
- test/test_helper.rb
|
290
285
|
- test/unit/api/interactive_basic_auth_test.rb
|
291
286
|
- test/unit/api/oauth/oauth_authentication_code_grant_test.rb
|
@@ -303,7 +298,6 @@ files:
|
|
303
298
|
- test/unit/common_parameter_test.rb
|
304
299
|
- test/unit/compute_profile_test.rb
|
305
300
|
- test/unit/compute_resource_test.rb
|
306
|
-
- test/unit/config_group_test.rb
|
307
301
|
- test/unit/config_report_test.rb
|
308
302
|
- test/unit/data/test_api.json
|
309
303
|
- test/unit/defaults_test.rb
|
@@ -333,13 +327,10 @@ files:
|
|
333
327
|
- test/unit/output/formatters_test.rb
|
334
328
|
- test/unit/param_filters_test.rb
|
335
329
|
- test/unit/partition_table_test.rb
|
336
|
-
- test/unit/puppet_class_test.rb
|
337
|
-
- test/unit/puppet_environment_test.rb
|
338
330
|
- test/unit/realm_test.rb
|
339
331
|
- test/unit/role_test.rb
|
340
332
|
- test/unit/sessions_test.rb
|
341
333
|
- test/unit/settings_test.rb
|
342
|
-
- test/unit/smart_class_parameter_test.rb
|
343
334
|
- test/unit/smart_proxy_test.rb
|
344
335
|
- test/unit/subnet_test.rb
|
345
336
|
- test/unit/template_test.rb
|
@@ -366,124 +357,120 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
357
|
- !ruby/object:Gem::Version
|
367
358
|
version: '0'
|
368
359
|
requirements: []
|
369
|
-
rubygems_version: 3.
|
360
|
+
rubygems_version: 3.1.2
|
370
361
|
signing_key:
|
371
362
|
specification_version: 4
|
372
363
|
summary: Foreman commands for Hammer
|
373
364
|
test_files:
|
374
|
-
- test/unit/image_test.rb
|
375
|
-
- test/unit/helpers/resource_disabled.rb
|
376
|
-
- test/unit/helpers/fake_searchables.rb
|
377
|
-
- test/unit/helpers/command.rb
|
378
|
-
- test/unit/messages_test.rb
|
379
|
-
- test/unit/config_group_test.rb
|
380
|
-
- test/unit/option_sources/id_params_test.rb
|
381
|
-
- test/unit/option_sources/ids_params_test.rb
|
382
|
-
- test/unit/exception_handler_test.rb
|
383
|
-
- test/unit/user_test.rb
|
384
|
-
- test/unit/api/session_authenticator_wrapper_test.rb
|
385
|
-
- test/unit/api/interactive_basic_auth_test.rb
|
386
|
-
- test/unit/api/oauth/oauth_authentication_code_grant_test.rb
|
387
|
-
- test/unit/api/oauth/oauth_password_grant_test.rb
|
388
|
-
- test/unit/api/void_auth_test.rb
|
389
|
-
- test/unit/hostgroup_test.rb
|
390
|
-
- test/unit/realm_test.rb
|
391
|
-
- test/unit/auth_source_external.rb
|
392
|
-
- test/unit/data/test_api.json
|
393
|
-
- test/unit/auth_source_ldap_test.rb
|
394
|
-
- test/unit/audit_test.rb
|
395
|
-
- test/unit/test_helper.rb
|
396
|
-
- test/unit/mail_notification_test.rb
|
397
|
-
- test/unit/smart_class_parameter_test.rb
|
398
|
-
- test/unit/partition_table_test.rb
|
399
|
-
- test/unit/operating_system_test.rb
|
400
|
-
- test/unit/media_test.rb
|
401
|
-
- test/unit/architecture_test.rb
|
402
|
-
- test/unit/usergroup_test.rb
|
403
|
-
- test/unit/role_test.rb
|
404
|
-
- test/unit/location_test.rb
|
405
|
-
- test/unit/param_filters_test.rb
|
406
|
-
- test/unit/apipie_resource_mock.rb
|
407
|
-
- test/unit/option_builders_test.rb
|
408
|
-
- test/unit/api_test.rb
|
409
|
-
- test/unit/test_output_adapter.rb
|
410
|
-
- test/unit/sessions_test.rb
|
411
|
-
- test/unit/organization_test.rb
|
412
|
-
- test/unit/settings_test.rb
|
413
|
-
- test/unit/template_test.rb
|
414
|
-
- test/unit/dependency_resolver_test.rb
|
415
|
-
- test/unit/smart_proxy_test.rb
|
416
|
-
- test/unit/domain_test.rb
|
417
|
-
- test/unit/defaults_test.rb
|
418
|
-
- test/unit/model_test.rb
|
419
|
-
- test/unit/puppet_class_test.rb
|
420
|
-
- test/unit/compute_resource_test.rb
|
421
|
-
- test/unit/id_resolver_test.rb
|
422
|
-
- test/unit/filter_test.rb
|
423
|
-
- test/unit/puppet_environment_test.rb
|
424
|
-
- test/unit/output/formatters_test.rb
|
425
|
-
- test/unit/compute_profile_test.rb
|
426
|
-
- test/unit/host_test.rb
|
427
|
-
- test/unit/config_report_test.rb
|
428
|
-
- test/unit/fact_test.rb
|
429
|
-
- test/unit/external_usergroup_test.rb
|
430
|
-
- test/unit/commands_test.rb
|
431
|
-
- test/unit/common_parameter_test.rb
|
432
|
-
- test/unit/subnet_test.rb
|
433
|
-
- test/unit/bookmark_test.rb
|
434
|
-
- test/data/2.1/foreman_api.json
|
435
|
-
- test/data/2.0/foreman_api.json
|
436
|
-
- test/data/1.24/foreman_api.json
|
437
|
-
- test/data/1.18/foreman_api.json
|
438
|
-
- test/data/1.11/foreman_api.json
|
439
365
|
- test/data/1.10/foreman_api.json
|
440
|
-
- test/data/1.
|
441
|
-
- test/data/1.15/foreman_api.json
|
366
|
+
- test/data/1.11/foreman_api.json
|
442
367
|
- test/data/1.14/_foreman_api.json
|
443
368
|
- test/data/1.14/foreman_api.json
|
369
|
+
- test/data/1.15/foreman_api.json
|
370
|
+
- test/data/1.16/foreman_api.json
|
371
|
+
- test/data/1.17/foreman_api.json
|
372
|
+
- test/data/1.18/foreman_api.json
|
373
|
+
- test/data/1.20/foreman_api.json
|
444
374
|
- test/data/1.21/foreman_api.json
|
445
375
|
- test/data/1.22/foreman_api.json
|
446
|
-
- test/data/1.
|
376
|
+
- test/data/1.24/foreman_api.json
|
377
|
+
- test/data/2.0/foreman_api.json
|
378
|
+
- test/data/2.1/foreman_api.json
|
379
|
+
- test/data/2.4/foreman_api.json
|
380
|
+
- test/data/2.5/foreman_api.json
|
447
381
|
- test/data/README.md
|
448
|
-
- test/data/1
|
449
|
-
- test/functional/
|
382
|
+
- test/data/3.1/foreman_api.json
|
383
|
+
- test/functional/auth_source_test.rb
|
450
384
|
- test/functional/commands/list_test.rb
|
451
|
-
- test/functional/
|
452
|
-
- test/functional/
|
453
|
-
- test/functional/
|
454
|
-
- test/functional/
|
385
|
+
- test/functional/hostgroup/create_test.rb
|
386
|
+
- test/functional/hostgroup/update_test.rb
|
387
|
+
- test/functional/compute_profile_test.rb
|
388
|
+
- test/functional/model_test.rb
|
389
|
+
- test/functional/operating_system_test.rb
|
455
390
|
- test/functional/personal_access_token_test.rb
|
456
|
-
- test/functional/
|
391
|
+
- test/functional/user_mail_notification_test.rb
|
392
|
+
- test/functional/template_test.rb
|
393
|
+
- test/functional/ssh_keys_test.rb
|
394
|
+
- test/functional/subnet/update_test.rb
|
395
|
+
- test/functional/subnet/create_test.rb
|
457
396
|
- test/functional/test_helper.rb
|
458
|
-
- test/functional/
|
459
|
-
- test/functional/
|
460
|
-
- test/functional/smart_class_parameter_test.rb
|
461
|
-
- test/functional/operating_system_test.rb
|
397
|
+
- test/functional/filter_test.rb
|
398
|
+
- test/functional/http_proxy_test.rb
|
462
399
|
- test/functional/media_test.rb
|
463
|
-
- test/functional/
|
400
|
+
- test/functional/registration_test.rb
|
464
401
|
- test/functional/usergroup_test.rb
|
465
|
-
- test/functional/
|
466
|
-
- test/functional/
|
467
|
-
- test/functional/
|
468
|
-
- test/functional/hostgroup/update_test.rb
|
469
|
-
- test/functional/subnet/create_test.rb
|
470
|
-
- test/functional/subnet/update_test.rb
|
402
|
+
- test/functional/architecture_test.rb
|
403
|
+
- test/functional/bookmark_test.rb
|
404
|
+
- test/functional/compute_resource_test.rb
|
471
405
|
- test/functional/organization_test.rb
|
406
|
+
- test/functional/report_template_test.rb
|
407
|
+
- test/functional/user_test.rb
|
408
|
+
- test/functional/virtual_machine_test.rb
|
409
|
+
- test/functional/mail_notification_test.rb
|
472
410
|
- test/functional/settings_test.rb
|
473
|
-
- test/functional/template_test.rb
|
474
|
-
- test/functional/proxy_test.rb
|
475
|
-
- test/functional/model_test.rb
|
476
|
-
- test/functional/compute_resource_test.rb
|
477
411
|
- test/functional/compute_attribute_test.rb
|
478
|
-
- test/functional/filter_test.rb
|
479
|
-
- test/functional/report_template_test.rb
|
480
|
-
- test/functional/compute_profile_test.rb
|
481
|
-
- test/functional/host_test.rb
|
482
|
-
- test/functional/ssh_keys_test.rb
|
483
|
-
- test/functional/status_test.rb
|
484
412
|
- test/functional/associating_commands_test.rb
|
485
|
-
- test/functional/
|
486
|
-
- test/functional/
|
487
|
-
- test/functional/
|
413
|
+
- test/functional/audit_test.rb
|
414
|
+
- test/functional/ping_test.rb
|
415
|
+
- test/functional/realm_test.rb
|
416
|
+
- test/functional/role_test.rb
|
417
|
+
- test/functional/status_test.rb
|
418
|
+
- test/functional/host_test.rb
|
419
|
+
- test/functional/location_test.rb
|
420
|
+
- test/unit/api/void_auth_test.rb
|
421
|
+
- test/unit/api/interactive_basic_auth_test.rb
|
422
|
+
- test/unit/api/oauth/oauth_authentication_code_grant_test.rb
|
423
|
+
- test/unit/api/oauth/oauth_password_grant_test.rb
|
424
|
+
- test/unit/api/session_authenticator_wrapper_test.rb
|
425
|
+
- test/unit/test_output_adapter.rb
|
426
|
+
- test/unit/smart_proxy_test.rb
|
427
|
+
- test/unit/auth_source_ldap_test.rb
|
428
|
+
- test/unit/config_report_test.rb
|
429
|
+
- test/unit/compute_resource_test.rb
|
430
|
+
- test/unit/data/test_api.json
|
431
|
+
- test/unit/defaults_test.rb
|
432
|
+
- test/unit/external_usergroup_test.rb
|
433
|
+
- test/unit/fact_test.rb
|
434
|
+
- test/unit/helpers/fake_searchables.rb
|
435
|
+
- test/unit/helpers/resource_disabled.rb
|
436
|
+
- test/unit/helpers/command.rb
|
437
|
+
- test/unit/image_test.rb
|
438
|
+
- test/unit/location_test.rb
|
439
|
+
- test/unit/messages_test.rb
|
440
|
+
- test/unit/option_sources/id_params_test.rb
|
441
|
+
- test/unit/option_sources/ids_params_test.rb
|
442
|
+
- test/unit/organization_test.rb
|
443
|
+
- test/unit/output/formatters_test.rb
|
444
|
+
- test/unit/common_parameter_test.rb
|
445
|
+
- test/unit/realm_test.rb
|
446
|
+
- test/unit/mail_notification_test.rb
|
447
|
+
- test/unit/option_builders_test.rb
|
448
|
+
- test/unit/subnet_test.rb
|
449
|
+
- test/unit/test_helper.rb
|
450
|
+
- test/unit/user_test.rb
|
451
|
+
- test/unit/param_filters_test.rb
|
452
|
+
- test/unit/partition_table_test.rb
|
453
|
+
- test/unit/role_test.rb
|
454
|
+
- test/unit/operating_system_test.rb
|
455
|
+
- test/unit/apipie_resource_mock.rb
|
456
|
+
- test/unit/architecture_test.rb
|
457
|
+
- test/unit/settings_test.rb
|
458
|
+
- test/unit/audit_test.rb
|
459
|
+
- test/unit/auth_source_external.rb
|
460
|
+
- test/unit/dependency_resolver_test.rb
|
461
|
+
- test/unit/exception_handler_test.rb
|
462
|
+
- test/unit/filter_test.rb
|
463
|
+
- test/unit/media_test.rb
|
464
|
+
- test/unit/sessions_test.rb
|
465
|
+
- test/unit/bookmark_test.rb
|
466
|
+
- test/unit/commands_test.rb
|
467
|
+
- test/unit/api_test.rb
|
468
|
+
- test/unit/compute_profile_test.rb
|
469
|
+
- test/unit/host_test.rb
|
470
|
+
- test/unit/hostgroup_test.rb
|
471
|
+
- test/unit/id_resolver_test.rb
|
472
|
+
- test/unit/model_test.rb
|
473
|
+
- test/unit/template_test.rb
|
474
|
+
- test/unit/usergroup_test.rb
|
475
|
+
- test/unit/domain_test.rb
|
488
476
|
- test/test_helper.rb
|
489
|
-
- test/reports/TEST-Minitest-Result.xml
|
@@ -1,29 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module CommandExtensions
|
3
|
-
class PuppetEnvironment < HammerCLI::CommandExtensions
|
4
|
-
# Remove when support of --environment options is ended.
|
5
|
-
option_family(
|
6
|
-
aliased_resource: 'environment',
|
7
|
-
description: _('Puppet environment'),
|
8
|
-
deprecation: _("Use %s instead") % '--puppet-environment[-id]',
|
9
|
-
deprecated: { '--environment' => _("Use %s instead") % '--puppet-environment[-id]',
|
10
|
-
'--environment-id' => _("Use %s instead") % '--puppet-environment[-id]'}
|
11
|
-
) do
|
12
|
-
parent '--environment-id', 'ENVIRONMENT_ID', _(''),
|
13
|
-
format: HammerCLI::Options::Normalizers::Number.new,
|
14
|
-
attribute_name: :option_environment_id
|
15
|
-
child '--environment', 'ENVIRONMENT_NAME', _('Environment name'),
|
16
|
-
attribute_name: :option_environment_name
|
17
|
-
end
|
18
|
-
|
19
|
-
option_sources do |sources, command|
|
20
|
-
sources.find_by_name('IdResolution').insert_relative(
|
21
|
-
:after,
|
22
|
-
'IdParams',
|
23
|
-
HammerCLIForeman::OptionSources::PuppetEnvironmentParams.new(command)
|
24
|
-
)
|
25
|
-
sources
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module CommandExtensions
|
3
|
-
class PuppetEnvironments < HammerCLI::CommandExtensions
|
4
|
-
# Remove when support of --environments options is ended.
|
5
|
-
option_family(
|
6
|
-
aliased_resource: 'environment',
|
7
|
-
description: _('Puppet environments'),
|
8
|
-
deprecation: _("Use %s instead") % '--puppet-environment[s|-ids]',
|
9
|
-
deprecated: { '--environments' => _("Use %s instead") % '--puppet-environment[s|-ids]',
|
10
|
-
'--environment-ids' => _("Use %s instead") % '--puppet-environment[s|-ids]' }
|
11
|
-
) do
|
12
|
-
parent '--environment-ids', 'ENVIRONMENT_IDS', _('Environment IDs'),
|
13
|
-
format: HammerCLI::Options::Normalizers::List.new,
|
14
|
-
attribute_name: :option_environment_ids
|
15
|
-
child '--environments', 'ENVIRONMENT_NAMES', _(''),
|
16
|
-
attribute_name: :option_environment_names
|
17
|
-
end
|
18
|
-
|
19
|
-
option_sources do |sources, command|
|
20
|
-
sources.find_by_name('IdResolution').insert_relative(
|
21
|
-
:after,
|
22
|
-
'IdsParams',
|
23
|
-
HammerCLIForeman::OptionSources::PuppetEnvironmentParams.new(command)
|
24
|
-
)
|
25
|
-
sources
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
class ConfigGroup < HammerCLIForeman::Command
|
3
|
-
resource :config_groups
|
4
|
-
|
5
|
-
class ListCommand < HammerCLIForeman::ListCommand
|
6
|
-
output do
|
7
|
-
field :id, _("ID")
|
8
|
-
field :name, _("Name")
|
9
|
-
end
|
10
|
-
|
11
|
-
build_options expand: { except: %i[organizations locations] }, without: %i[organization_id location_id]
|
12
|
-
end
|
13
|
-
|
14
|
-
class InfoCommand < HammerCLIForeman::InfoCommand
|
15
|
-
output ListCommand.output_definition do
|
16
|
-
HammerCLIForeman::References.puppetclasses(self)
|
17
|
-
end
|
18
|
-
|
19
|
-
build_options expand: { except: %i[organizations locations] }, without: %i[organization_id location_id]
|
20
|
-
end
|
21
|
-
|
22
|
-
class CreateCommand < HammerCLIForeman::CreateCommand
|
23
|
-
success_message _("Config group created.")
|
24
|
-
failure_message _("Could not create the config group")
|
25
|
-
|
26
|
-
build_options expand: { except: %i[organizations locations] }, without: %i[organization_id location_id]
|
27
|
-
end
|
28
|
-
|
29
|
-
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
30
|
-
success_message _("Config group updated.")
|
31
|
-
failure_message _("Could not update the config group")
|
32
|
-
|
33
|
-
build_options expand: { except: %i[organizations locations] }, without: %i[organization_id location_id]
|
34
|
-
end
|
35
|
-
|
36
|
-
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
37
|
-
success_message _("Config group has been deleted.")
|
38
|
-
failure_message _("Could not delete the config group")
|
39
|
-
|
40
|
-
build_options expand: { except: %i[organizations locations] }, without: %i[organization_id location_id]
|
41
|
-
end
|
42
|
-
|
43
|
-
autoload_subcommands
|
44
|
-
end
|
45
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module OptionSources
|
3
|
-
class PuppetEnvironmentParams < HammerCLI::Options::Sources::Base
|
4
|
-
def initialize(command)
|
5
|
-
@command = command
|
6
|
-
end
|
7
|
-
|
8
|
-
def get_options(_defined_options, result)
|
9
|
-
if result['option_environment_id'].nil? &&
|
10
|
-
(@command.respond_to?(:option_environment_id) ||
|
11
|
-
@command.respond_to?(:option_environment_name))
|
12
|
-
put_puppet_environment_id(result)
|
13
|
-
end
|
14
|
-
if result['option_environment_ids'].nil? &&
|
15
|
-
(@command.respond_to?(:option_environment_ids) ||
|
16
|
-
@command.respond_to?(:option_environment_names))
|
17
|
-
put_puppet_environment_ids(result)
|
18
|
-
end
|
19
|
-
result
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
def put_puppet_environment_id(result)
|
25
|
-
if result['option_environment_name'].nil?
|
26
|
-
if @command.option_environment_id
|
27
|
-
result['option_environment_id'] = @command.option_environment_id
|
28
|
-
elsif @command.option_environment_name
|
29
|
-
result['option_environment_name'] = @command.option_environment_name
|
30
|
-
result['option_environment_id'] = @command.resolver.puppet_environment_id(
|
31
|
-
@command.resolver.scoped_options('environment', result, :single)
|
32
|
-
)
|
33
|
-
end
|
34
|
-
else
|
35
|
-
result['option_environment_id'] = @command.resolver.puppet_environment_id(
|
36
|
-
@command.resolver.scoped_options('environment', result, :single)
|
37
|
-
)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def put_puppet_environment_ids(result)
|
42
|
-
if result['option_environment_names'].nil?
|
43
|
-
if @command.option_environment_ids
|
44
|
-
result['option_environment_ids'] = @command.option_environment_ids
|
45
|
-
elsif @command.option_environment_names
|
46
|
-
result['option_environment_names'] = @command.option_environment_names
|
47
|
-
result['option_environment_ids'] = @command.resolver.puppet_environment_ids(
|
48
|
-
@command.resolver.scoped_options('environment', result, :multi)
|
49
|
-
)
|
50
|
-
end
|
51
|
-
else
|
52
|
-
result['option_environment_ids'] = @command.resolver.puppet_environment_ids(
|
53
|
-
@command.resolver.scoped_options('environment', result, :multi)
|
54
|
-
)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
require 'hammer_cli_foreman/smart_class_parameter'
|
2
|
-
|
3
|
-
module HammerCLIForeman
|
4
|
-
|
5
|
-
class PuppetClass < HammerCLIForeman::Command
|
6
|
-
|
7
|
-
resource :puppetclasses
|
8
|
-
|
9
|
-
class ListCommand < HammerCLIForeman::ListCommand
|
10
|
-
|
11
|
-
output do
|
12
|
-
field :id, _("Id")
|
13
|
-
field :name, _("Name")
|
14
|
-
end
|
15
|
-
|
16
|
-
def send_request
|
17
|
-
self.class.unhash_classes(super)
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.unhash_classes(classes)
|
21
|
-
clss = classes.first.inject([]) { |list, (pp_module, pp_module_classes)| list + pp_module_classes }
|
22
|
-
|
23
|
-
HammerCLI::Output::RecordCollection.new(clss, :meta => classes.meta)
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
build_options
|
28
|
-
|
29
|
-
extend_with(HammerCLIForeman::CommandExtensions::PuppetEnvironment.new)
|
30
|
-
end
|
31
|
-
|
32
|
-
|
33
|
-
class InfoCommand < HammerCLIForeman::InfoCommand
|
34
|
-
output ListCommand.output_definition do
|
35
|
-
collection :smart_class_parameters, _("Smart class parameters"), :numbered => false do
|
36
|
-
custom_field Fields::Reference, :name_key => :parameter
|
37
|
-
end
|
38
|
-
HammerCLIForeman::References.hostgroups(self)
|
39
|
-
HammerCLIForeman::References.environments(self)
|
40
|
-
HammerCLIForeman::References.parameters(self)
|
41
|
-
end
|
42
|
-
|
43
|
-
build_options
|
44
|
-
|
45
|
-
extend_with(HammerCLIForeman::CommandExtensions::PuppetEnvironment.new)
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
class SCParamsCommand < HammerCLIForeman::SmartClassParametersBriefList
|
50
|
-
build_options_for :puppetclasses
|
51
|
-
|
52
|
-
def validate_options
|
53
|
-
super
|
54
|
-
validator.any(:option_puppetclass_name, :option_puppetclass_id).required
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
autoload_subcommands
|
59
|
-
end
|
60
|
-
|
61
|
-
end
|