hammer_cli_foreman 3.0.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 +13 -0
- data/lib/hammer_cli_foreman/command_extensions/subnet.rb +25 -10
- data/lib/hammer_cli_foreman/command_extensions/user.rb +9 -5
- data/lib/hammer_cli_foreman/commands.rb +1 -2
- data/lib/hammer_cli_foreman/compute_attribute.rb +1 -1
- data/lib/hammer_cli_foreman/compute_resource.rb +1 -0
- data/lib/hammer_cli_foreman/hostgroup.rb +13 -6
- data/lib/hammer_cli_foreman/hosts/common_update_options.rb +7 -7
- data/lib/hammer_cli_foreman/id_resolver.rb +7 -7
- data/lib/hammer_cli_foreman/option_builders.rb +65 -53
- data/lib/hammer_cli_foreman/option_sources/id_params.rb +21 -8
- data/lib/hammer_cli_foreman/option_sources/ids_params.rb +22 -9
- data/lib/hammer_cli_foreman/smart_proxy.rb +7 -5
- data/lib/hammer_cli_foreman/template.rb +3 -15
- data/lib/hammer_cli_foreman/user.rb +4 -4
- data/lib/hammer_cli_foreman/version.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/3.1/foreman_api.json +1 -0
- data/test/functional/compute_attribute_test.rb +20 -20
- data/test/functional/host_test.rb +34 -0
- data/test/functional/hostgroup/create_test.rb +11 -0
- data/test/functional/hostgroup/update_test.rb +11 -0
- data/test/functional/personal_access_token_test.rb +4 -4
- data/test/functional/template_test.rb +74 -14
- data/test/functional/user_mail_notification_test.rb +3 -3
- data/test/test_helper.rb +1 -1
- data/test/unit/commands_test.rb +1 -2
- data/test/unit/option_builders_test.rb +88 -83
- data/test/unit/option_sources/id_params_test.rb +0 -9
- data/test/unit/option_sources/ids_params_test.rb +0 -9
- metadata +28 -26
@@ -26,14 +26,5 @@ describe HammerCLIForeman::OptionSources::IdParams do
|
|
26
26
|
params = id_params_source.get_options([], option_data)
|
27
27
|
_(params).must_equal expected_data
|
28
28
|
end
|
29
|
-
|
30
|
-
it 'resolves param when set but different name' do
|
31
|
-
hg_cmd.stubs(:get_resource_id).returns(nil)
|
32
|
-
hg_cmd.expects(:get_resource_id).with { |res| res.name == :domains }.returns(3)
|
33
|
-
option_data = { 'option_domain_id' => 1, 'option_domain_name' => 'test3' }
|
34
|
-
expected_data = { 'option_domain_id' => 3, 'option_domain_name' => 'test3' }
|
35
|
-
params = id_params_source.get_options([], option_data)
|
36
|
-
_(params).must_equal expected_data
|
37
|
-
end
|
38
29
|
end
|
39
30
|
end
|
@@ -26,14 +26,5 @@ describe HammerCLIForeman::OptionSources::IdsParams do
|
|
26
26
|
params = ids_params_source.get_options([], option_data)
|
27
27
|
_(params).must_equal expected_data
|
28
28
|
end
|
29
|
-
|
30
|
-
it "resolves param when set but different name" do
|
31
|
-
cmd.stubs(:get_resource_ids).returns(nil)
|
32
|
-
cmd.expects(:get_resource_ids).with { |res| res.name == :locations }.returns([3])
|
33
|
-
option_data = { 'option_location_ids' => [1], 'option_location_names' => 'test3' }
|
34
|
-
expected_data = { 'option_location_ids' => [3], 'option_location_names' => 'test3' }
|
35
|
-
params = ids_params_source.get_options([], option_data)
|
36
|
-
_(params).must_equal expected_data
|
37
|
-
end
|
38
29
|
end
|
39
30
|
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: 3.
|
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,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 3.
|
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: 3.
|
27
|
+
version: 3.1.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: apipie-bindings
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,6 +242,7 @@ files:
|
|
242
242
|
- test/data/2.1/foreman_api.json
|
243
243
|
- test/data/2.4/foreman_api.json
|
244
244
|
- test/data/2.5/foreman_api.json
|
245
|
+
- test/data/3.1/foreman_api.json
|
245
246
|
- test/data/README.md
|
246
247
|
- test/functional/architecture_test.rb
|
247
248
|
- test/functional/associating_commands_test.rb
|
@@ -378,11 +379,16 @@ test_files:
|
|
378
379
|
- test/data/2.4/foreman_api.json
|
379
380
|
- test/data/2.5/foreman_api.json
|
380
381
|
- test/data/README.md
|
382
|
+
- test/data/3.1/foreman_api.json
|
381
383
|
- test/functional/auth_source_test.rb
|
382
384
|
- test/functional/commands/list_test.rb
|
383
|
-
- test/functional/compute_profile_test.rb
|
384
385
|
- test/functional/hostgroup/create_test.rb
|
385
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
|
390
|
+
- test/functional/personal_access_token_test.rb
|
391
|
+
- test/functional/user_mail_notification_test.rb
|
386
392
|
- test/functional/template_test.rb
|
387
393
|
- test/functional/ssh_keys_test.rb
|
388
394
|
- test/functional/subnet/update_test.rb
|
@@ -392,28 +398,24 @@ test_files:
|
|
392
398
|
- test/functional/http_proxy_test.rb
|
393
399
|
- test/functional/media_test.rb
|
394
400
|
- test/functional/registration_test.rb
|
401
|
+
- test/functional/usergroup_test.rb
|
402
|
+
- test/functional/architecture_test.rb
|
395
403
|
- test/functional/bookmark_test.rb
|
396
|
-
- test/functional/mail_notification_test.rb
|
397
|
-
- test/functional/settings_test.rb
|
398
|
-
- test/functional/user_mail_notification_test.rb
|
399
404
|
- test/functional/compute_resource_test.rb
|
400
405
|
- test/functional/organization_test.rb
|
401
406
|
- test/functional/report_template_test.rb
|
402
407
|
- test/functional/user_test.rb
|
403
408
|
- test/functional/virtual_machine_test.rb
|
404
|
-
- test/functional/
|
405
|
-
- test/functional/
|
409
|
+
- test/functional/mail_notification_test.rb
|
410
|
+
- test/functional/settings_test.rb
|
406
411
|
- test/functional/compute_attribute_test.rb
|
407
|
-
- test/functional/host_test.rb
|
408
412
|
- test/functional/associating_commands_test.rb
|
409
413
|
- test/functional/audit_test.rb
|
410
414
|
- test/functional/ping_test.rb
|
411
415
|
- test/functional/realm_test.rb
|
412
416
|
- test/functional/role_test.rb
|
413
417
|
- test/functional/status_test.rb
|
414
|
-
- test/functional/
|
415
|
-
- test/functional/usergroup_test.rb
|
416
|
-
- test/functional/personal_access_token_test.rb
|
418
|
+
- test/functional/host_test.rb
|
417
419
|
- test/functional/location_test.rb
|
418
420
|
- test/unit/api/void_auth_test.rb
|
419
421
|
- test/unit/api/interactive_basic_auth_test.rb
|
@@ -421,13 +423,12 @@ test_files:
|
|
421
423
|
- test/unit/api/oauth/oauth_password_grant_test.rb
|
422
424
|
- test/unit/api/session_authenticator_wrapper_test.rb
|
423
425
|
- test/unit/test_output_adapter.rb
|
424
|
-
- test/unit/
|
426
|
+
- test/unit/smart_proxy_test.rb
|
425
427
|
- test/unit/auth_source_ldap_test.rb
|
426
428
|
- test/unit/config_report_test.rb
|
427
429
|
- test/unit/compute_resource_test.rb
|
428
430
|
- test/unit/data/test_api.json
|
429
431
|
- test/unit/defaults_test.rb
|
430
|
-
- test/unit/architecture_test.rb
|
431
432
|
- test/unit/external_usergroup_test.rb
|
432
433
|
- test/unit/fact_test.rb
|
433
434
|
- test/unit/helpers/fake_searchables.rb
|
@@ -436,14 +437,13 @@ test_files:
|
|
436
437
|
- test/unit/image_test.rb
|
437
438
|
- test/unit/location_test.rb
|
438
439
|
- test/unit/messages_test.rb
|
439
|
-
- test/unit/bookmark_test.rb
|
440
440
|
- test/unit/option_sources/id_params_test.rb
|
441
441
|
- test/unit/option_sources/ids_params_test.rb
|
442
442
|
- test/unit/organization_test.rb
|
443
443
|
- test/unit/output/formatters_test.rb
|
444
444
|
- test/unit/common_parameter_test.rb
|
445
445
|
- test/unit/realm_test.rb
|
446
|
-
- test/unit/
|
446
|
+
- test/unit/mail_notification_test.rb
|
447
447
|
- test/unit/option_builders_test.rb
|
448
448
|
- test/unit/subnet_test.rb
|
449
449
|
- test/unit/test_helper.rb
|
@@ -451,10 +451,10 @@ test_files:
|
|
451
451
|
- test/unit/param_filters_test.rb
|
452
452
|
- test/unit/partition_table_test.rb
|
453
453
|
- test/unit/role_test.rb
|
454
|
-
- test/unit/hostgroup_test.rb
|
455
|
-
- test/unit/mail_notification_test.rb
|
456
|
-
- test/unit/model_test.rb
|
457
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
458
|
- test/unit/audit_test.rb
|
459
459
|
- test/unit/auth_source_external.rb
|
460
460
|
- test/unit/dependency_resolver_test.rb
|
@@ -462,13 +462,15 @@ test_files:
|
|
462
462
|
- test/unit/filter_test.rb
|
463
463
|
- test/unit/media_test.rb
|
464
464
|
- test/unit/sessions_test.rb
|
465
|
-
- test/unit/
|
466
|
-
- test/unit/api_test.rb
|
467
|
-
- test/unit/smart_proxy_test.rb
|
468
|
-
- test/unit/settings_test.rb
|
465
|
+
- test/unit/bookmark_test.rb
|
469
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
|
470
471
|
- test/unit/id_resolver_test.rb
|
472
|
+
- test/unit/model_test.rb
|
471
473
|
- test/unit/template_test.rb
|
472
|
-
- test/unit/
|
474
|
+
- test/unit/usergroup_test.rb
|
473
475
|
- test/unit/domain_test.rb
|
474
476
|
- test/test_helper.rb
|