hammer_cli_foreman 2.3.2 → 2.4.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 +6 -3
- data/lib/hammer_cli_foreman/architecture.rb +5 -5
- data/lib/hammer_cli_foreman/bookmark.rb +6 -6
- data/lib/hammer_cli_foreman/command_extensions/status.rb +1 -1
- data/lib/hammer_cli_foreman/compute_profile.rb +5 -5
- data/lib/hammer_cli_foreman/config_group.rb +5 -5
- data/lib/hammer_cli_foreman/hosts/common_update_options.rb +1 -1
- 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 -9
- data/lib/hammer_cli_foreman/option_builders.rb +2 -21
- data/lib/hammer_cli_foreman/settings.rb +3 -3
- data/lib/hammer_cli_foreman/usergroup.rb +5 -5
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/test/functional/architecture_test.rb +49 -0
- data/test/functional/bookmark_test.rb +20 -0
- data/test/functional/compute_profile_test.rb +43 -0
- data/test/functional/config_group_test.rb +50 -0
- data/test/functional/filter_test.rb +114 -47
- data/test/functional/host_test.rb +63 -2
- data/test/functional/mail_notification_test.rb +20 -0
- data/test/functional/model_test.rb +50 -0
- data/test/functional/operating_system_test.rb +51 -0
- data/test/functional/settings_test.rb +21 -0
- data/test/functional/status_test.rb +79 -13
- data/test/functional/usergroup_test.rb +51 -0
- data/test/reports/TEST-Minitest-Result.xml +4344 -0
- data/test/unit/apipie_resource_mock.rb +21 -0
- data/test/unit/architecture_test.rb +10 -1
- data/test/unit/bookmark_test.rb +99 -0
- data/test/unit/compute_profile_test.rb +87 -0
- data/test/unit/config_group_test.rb +10 -0
- data/test/unit/mail_notification_test.rb +53 -0
- data/test/unit/model_test.rb +10 -0
- data/test/unit/operating_system_test.rb +14 -1
- data/test/unit/settings_test.rb +4 -0
- data/test/unit/usergroup_test.rb +10 -0
- metadata +119 -101
data/test/unit/settings_test.rb
CHANGED
@@ -18,6 +18,8 @@ describe HammerCLIForeman::Settings do
|
|
18
18
|
context "parameters" do
|
19
19
|
it_should_accept "no arguments"
|
20
20
|
it_should_accept_search_params
|
21
|
+
it_should_fail_with 'organization param', ['--organization-id=1']
|
22
|
+
it_should_fail_with 'location param', ['--location-id=1']
|
21
23
|
end
|
22
24
|
|
23
25
|
context "output" do
|
@@ -38,6 +40,8 @@ describe HammerCLIForeman::Settings do
|
|
38
40
|
context "parameters" do
|
39
41
|
it_should_accept "name", ["--name=setting1", "--value=setting2"]
|
40
42
|
it_should_accept "id", ["--id=1", "--value=setting2"]
|
43
|
+
it_should_fail_with 'organization param', ['--organization-id=1']
|
44
|
+
it_should_fail_with 'location param', ['--location-id=1']
|
41
45
|
end
|
42
46
|
|
43
47
|
end
|
data/test/unit/usergroup_test.rb
CHANGED
@@ -18,6 +18,8 @@ describe HammerCLIForeman::Usergroup do
|
|
18
18
|
context "parameters" do
|
19
19
|
it_should_accept "no arguments"
|
20
20
|
it_should_accept_search_params
|
21
|
+
it_should_fail_with 'organization param', ['--organization-id=1']
|
22
|
+
it_should_fail_with 'location param', ['--location-id=1']
|
21
23
|
end
|
22
24
|
|
23
25
|
context "output" do
|
@@ -35,6 +37,8 @@ describe HammerCLIForeman::Usergroup do
|
|
35
37
|
context "parameters" do
|
36
38
|
it_should_accept "id", ["--id=1"]
|
37
39
|
it_should_accept "name", ["--name=ug"]
|
40
|
+
it_should_fail_with 'organization param', ['--organization-id=1']
|
41
|
+
it_should_fail_with 'location param', ['--location-id=1']
|
38
42
|
end
|
39
43
|
|
40
44
|
context "output" do
|
@@ -58,6 +62,8 @@ describe HammerCLIForeman::Usergroup do
|
|
58
62
|
context "parameters" do
|
59
63
|
it_should_accept "name", ["--name=ug"]
|
60
64
|
it_should_accept "name, role ids, user group ids and user ids", ["--name=ug", "--role-ids=1,2,3", "--user-group-ids=1,2,3", "--user-ids=1,2,3"]
|
65
|
+
it_should_fail_with 'organization param', ['--organization-id=1']
|
66
|
+
it_should_fail_with 'location param', ['--location-id=1']
|
61
67
|
end
|
62
68
|
end
|
63
69
|
|
@@ -68,6 +74,8 @@ describe HammerCLIForeman::Usergroup do
|
|
68
74
|
context "parameters" do
|
69
75
|
it_should_accept "name", ["--name=ug"]
|
70
76
|
it_should_accept "id", ["--id=1"]
|
77
|
+
it_should_fail_with 'organization param', ['--organization-id=1']
|
78
|
+
it_should_fail_with 'location param', ['--location-id=1']
|
71
79
|
end
|
72
80
|
end
|
73
81
|
|
@@ -80,6 +88,8 @@ describe HammerCLIForeman::Usergroup do
|
|
80
88
|
it_should_accept "id", ["--id=1"]
|
81
89
|
it_should_accept "name and new name", ["--name=ug", "--new-name=ug2"]
|
82
90
|
it_should_accept "id, new name, role ids, user group ids and user ids", ["--id=1", "--new-name=ug", "--role-ids=1,2,3", "--user-group-ids=1,2,3", "--user-ids=1,2,3"]
|
91
|
+
it_should_fail_with 'organization param', ['--organization-id=1']
|
92
|
+
it_should_fail_with 'location param', ['--location-id=1']
|
83
93
|
end
|
84
94
|
end
|
85
95
|
end
|
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: 2.
|
4
|
+
version: 2.4.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-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hammer_cli
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 2.
|
20
|
+
version: 2.4.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: 2.
|
27
|
+
version: 2.4.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: apipie-bindings
|
30
30
|
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/configuration.md
|
84
|
-
- doc/developer_docs.md
|
85
83
|
- doc/host_create.md
|
86
|
-
- doc/
|
87
|
-
- doc/option_builder.md
|
84
|
+
- doc/release_notes.md
|
88
85
|
- doc/plugin.md
|
86
|
+
- doc/configuration.md
|
87
|
+
- doc/name_id_resolution.md
|
88
|
+
- doc/developer_docs.md
|
89
89
|
- doc/using_hammer_cli_foreman_command.md
|
90
90
|
- doc/testing.md
|
91
|
-
- doc/
|
91
|
+
- doc/option_builder.md
|
92
92
|
- README.md
|
93
93
|
files:
|
94
94
|
- LICENSE
|
@@ -246,6 +246,7 @@ files:
|
|
246
246
|
- test/data/2.0/foreman_api.json
|
247
247
|
- test/data/2.1/foreman_api.json
|
248
248
|
- test/data/README.md
|
249
|
+
- test/functional/architecture_test.rb
|
249
250
|
- test/functional/associating_commands_test.rb
|
250
251
|
- test/functional/audit_test.rb
|
251
252
|
- test/functional/auth_source_test.rb
|
@@ -254,6 +255,7 @@ files:
|
|
254
255
|
- test/functional/compute_attribute_test.rb
|
255
256
|
- test/functional/compute_profile_test.rb
|
256
257
|
- test/functional/compute_resource_test.rb
|
258
|
+
- test/functional/config_group_test.rb
|
257
259
|
- test/functional/filter_test.rb
|
258
260
|
- test/functional/host_test.rb
|
259
261
|
- test/functional/hostgroup/create_test.rb
|
@@ -262,6 +264,8 @@ files:
|
|
262
264
|
- test/functional/location_test.rb
|
263
265
|
- test/functional/mail_notification_test.rb
|
264
266
|
- test/functional/media_test.rb
|
267
|
+
- test/functional/model_test.rb
|
268
|
+
- test/functional/operating_system_test.rb
|
265
269
|
- test/functional/organization_test.rb
|
266
270
|
- test/functional/personal_access_token_test.rb
|
267
271
|
- test/functional/ping_test.rb
|
@@ -279,7 +283,9 @@ files:
|
|
279
283
|
- test/functional/test_helper.rb
|
280
284
|
- test/functional/user_mail_notification_test.rb
|
281
285
|
- test/functional/user_test.rb
|
286
|
+
- test/functional/usergroup_test.rb
|
282
287
|
- test/functional/virtual_machine_test.rb
|
288
|
+
- test/reports/TEST-Minitest-Result.xml
|
283
289
|
- test/test_helper.rb
|
284
290
|
- test/unit/api/interactive_basic_auth_test.rb
|
285
291
|
- test/unit/api/oauth/oauth_authentication_code_grant_test.rb
|
@@ -292,8 +298,10 @@ files:
|
|
292
298
|
- test/unit/audit_test.rb
|
293
299
|
- test/unit/auth_source_external.rb
|
294
300
|
- test/unit/auth_source_ldap_test.rb
|
301
|
+
- test/unit/bookmark_test.rb
|
295
302
|
- test/unit/commands_test.rb
|
296
303
|
- test/unit/common_parameter_test.rb
|
304
|
+
- test/unit/compute_profile_test.rb
|
297
305
|
- test/unit/compute_resource_test.rb
|
298
306
|
- test/unit/config_group_test.rb
|
299
307
|
- test/unit/config_report_test.rb
|
@@ -313,6 +321,7 @@ files:
|
|
313
321
|
- test/unit/id_resolver_test.rb
|
314
322
|
- test/unit/image_test.rb
|
315
323
|
- test/unit/location_test.rb
|
324
|
+
- test/unit/mail_notification_test.rb
|
316
325
|
- test/unit/media_test.rb
|
317
326
|
- test/unit/messages_test.rb
|
318
327
|
- test/unit/model_test.rb
|
@@ -362,110 +371,119 @@ signing_key:
|
|
362
371
|
specification_version: 4
|
363
372
|
summary: Foreman commands for Hammer
|
364
373
|
test_files:
|
365
|
-
- test/
|
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
|
366
438
|
- test/data/1.11/foreman_api.json
|
439
|
+
- test/data/1.10/foreman_api.json
|
440
|
+
- test/data/1.17/foreman_api.json
|
441
|
+
- test/data/1.15/foreman_api.json
|
367
442
|
- test/data/1.14/_foreman_api.json
|
368
443
|
- 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
|
374
444
|
- test/data/1.21/foreman_api.json
|
375
445
|
- test/data/1.22/foreman_api.json
|
376
|
-
- test/data/1.
|
377
|
-
- test/data/2.0/foreman_api.json
|
378
|
-
- test/data/2.1/foreman_api.json
|
446
|
+
- test/data/1.20/foreman_api.json
|
379
447
|
- test/data/README.md
|
380
|
-
- test/
|
381
|
-
- test/functional/auth_source_test.rb
|
382
|
-
- test/functional/commands/list_test.rb
|
383
|
-
- test/functional/compute_attribute_test.rb
|
384
|
-
- test/functional/hostgroup/create_test.rb
|
385
|
-
- test/functional/hostgroup/update_test.rb
|
448
|
+
- test/data/1.16/foreman_api.json
|
386
449
|
- test/functional/http_proxy_test.rb
|
450
|
+
- test/functional/commands/list_test.rb
|
451
|
+
- test/functional/user_mail_notification_test.rb
|
452
|
+
- test/functional/config_group_test.rb
|
453
|
+
- test/functional/user_test.rb
|
454
|
+
- test/functional/realm_test.rb
|
387
455
|
- test/functional/personal_access_token_test.rb
|
388
|
-
- test/functional/
|
389
|
-
- test/functional/report_template_test.rb
|
390
|
-
- test/functional/smart_class_parameter_test.rb
|
391
|
-
- test/functional/ssh_keys_test.rb
|
392
|
-
- test/functional/subnet/create_test.rb
|
393
|
-
- test/functional/subnet/update_test.rb
|
394
|
-
- test/functional/template_test.rb
|
456
|
+
- test/functional/audit_test.rb
|
395
457
|
- test/functional/test_helper.rb
|
396
|
-
- test/functional/
|
397
|
-
- test/functional/
|
398
|
-
- test/functional/
|
458
|
+
- test/functional/mail_notification_test.rb
|
459
|
+
- test/functional/ping_test.rb
|
460
|
+
- test/functional/smart_class_parameter_test.rb
|
461
|
+
- test/functional/operating_system_test.rb
|
399
462
|
- test/functional/media_test.rb
|
400
|
-
- test/functional/
|
463
|
+
- test/functional/architecture_test.rb
|
464
|
+
- test/functional/usergroup_test.rb
|
401
465
|
- test/functional/role_test.rb
|
466
|
+
- test/functional/location_test.rb
|
467
|
+
- test/functional/hostgroup/create_test.rb
|
468
|
+
- test/functional/hostgroup/update_test.rb
|
469
|
+
- test/functional/subnet/create_test.rb
|
470
|
+
- test/functional/subnet/update_test.rb
|
471
|
+
- test/functional/organization_test.rb
|
402
472
|
- test/functional/settings_test.rb
|
403
|
-
- test/functional/
|
404
|
-
- test/functional/
|
473
|
+
- test/functional/template_test.rb
|
474
|
+
- test/functional/proxy_test.rb
|
475
|
+
- test/functional/model_test.rb
|
405
476
|
- test/functional/compute_resource_test.rb
|
406
|
-
- test/functional/
|
407
|
-
- test/functional/status_test.rb
|
408
|
-
- test/functional/audit_test.rb
|
409
|
-
- test/functional/organization_test.rb
|
410
|
-
- test/functional/user_test.rb
|
477
|
+
- test/functional/compute_attribute_test.rb
|
411
478
|
- test/functional/filter_test.rb
|
479
|
+
- test/functional/report_template_test.rb
|
480
|
+
- test/functional/compute_profile_test.rb
|
412
481
|
- test/functional/host_test.rb
|
413
|
-
- test/functional/
|
414
|
-
- test/
|
415
|
-
- test/
|
416
|
-
- test/
|
417
|
-
- test/
|
418
|
-
- test/
|
419
|
-
- test/unit/audit_test.rb
|
420
|
-
- test/unit/auth_source_external.rb
|
421
|
-
- test/unit/auth_source_ldap_test.rb
|
422
|
-
- test/unit/compute_resource_test.rb
|
423
|
-
- test/unit/data/test_api.json
|
424
|
-
- test/unit/defaults_test.rb
|
425
|
-
- test/unit/domain_test.rb
|
426
|
-
- test/unit/external_usergroup_test.rb
|
427
|
-
- test/unit/fact_test.rb
|
428
|
-
- test/unit/filter_test.rb
|
429
|
-
- test/unit/helpers/fake_searchables.rb
|
430
|
-
- test/unit/helpers/command.rb
|
431
|
-
- test/unit/helpers/resource_disabled.rb
|
432
|
-
- test/unit/hostgroup_test.rb
|
433
|
-
- test/unit/image_test.rb
|
434
|
-
- test/unit/location_test.rb
|
435
|
-
- test/unit/messages_test.rb
|
436
|
-
- test/unit/option_sources/id_params_test.rb
|
437
|
-
- test/unit/option_sources/ids_params_test.rb
|
438
|
-
- test/unit/organization_test.rb
|
439
|
-
- test/unit/output/formatters_test.rb
|
440
|
-
- test/unit/puppet_class_test.rb
|
441
|
-
- test/unit/puppet_environment_test.rb
|
442
|
-
- test/unit/realm_test.rb
|
443
|
-
- test/unit/smart_class_parameter_test.rb
|
444
|
-
- test/unit/smart_proxy_test.rb
|
445
|
-
- test/unit/subnet_test.rb
|
446
|
-
- test/unit/test_helper.rb
|
447
|
-
- test/unit/test_output_adapter.rb
|
448
|
-
- test/unit/user_test.rb
|
449
|
-
- test/unit/api_test.rb
|
450
|
-
- test/unit/commands_test.rb
|
451
|
-
- test/unit/common_parameter_test.rb
|
452
|
-
- test/unit/dependency_resolver_test.rb
|
453
|
-
- test/unit/exception_handler_test.rb
|
454
|
-
- test/unit/host_test.rb
|
455
|
-
- test/unit/id_resolver_test.rb
|
456
|
-
- test/unit/media_test.rb
|
457
|
-
- test/unit/option_builders_test.rb
|
458
|
-
- test/unit/param_filters_test.rb
|
459
|
-
- test/unit/partition_table_test.rb
|
460
|
-
- test/unit/role_test.rb
|
461
|
-
- test/unit/sessions_test.rb
|
462
|
-
- test/unit/template_test.rb
|
463
|
-
- test/unit/apipie_resource_mock.rb
|
464
|
-
- test/unit/architecture_test.rb
|
465
|
-
- test/unit/config_report_test.rb
|
466
|
-
- test/unit/operating_system_test.rb
|
467
|
-
- test/unit/settings_test.rb
|
468
|
-
- test/unit/usergroup_test.rb
|
469
|
-
- test/unit/config_group_test.rb
|
470
|
-
- test/unit/model_test.rb
|
482
|
+
- test/functional/ssh_keys_test.rb
|
483
|
+
- test/functional/status_test.rb
|
484
|
+
- test/functional/associating_commands_test.rb
|
485
|
+
- test/functional/auth_source_test.rb
|
486
|
+
- test/functional/virtual_machine_test.rb
|
487
|
+
- test/functional/bookmark_test.rb
|
471
488
|
- test/test_helper.rb
|
489
|
+
- test/reports/TEST-Minitest-Result.xml
|