hammer_cli_foreman 3.0.0 → 3.3.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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/config/foreman.yml +4 -0
  3. data/doc/configuration.md +30 -0
  4. data/doc/release_notes.md +31 -0
  5. data/lib/hammer_cli_foreman/api/authenticator.rb +9 -0
  6. data/lib/hammer_cli_foreman/api/connection.rb +2 -0
  7. data/lib/hammer_cli_foreman/api/negotiate_auth.rb +36 -0
  8. data/lib/hammer_cli_foreman/api/session_authenticator_wrapper.rb +6 -2
  9. data/lib/hammer_cli_foreman/api.rb +2 -1
  10. data/lib/hammer_cli_foreman/auth.rb +13 -0
  11. data/lib/hammer_cli_foreman/command_extensions/domain.rb +20 -0
  12. data/lib/hammer_cli_foreman/command_extensions/subnet.rb +25 -10
  13. data/lib/hammer_cli_foreman/command_extensions/user.rb +9 -5
  14. data/lib/hammer_cli_foreman/command_extensions.rb +1 -0
  15. data/lib/hammer_cli_foreman/commands.rb +6 -3
  16. data/lib/hammer_cli_foreman/compute_attribute.rb +1 -1
  17. data/lib/hammer_cli_foreman/compute_resource/libvirt.rb +4 -2
  18. data/lib/hammer_cli_foreman/compute_resource/vmware.rb +4 -2
  19. data/lib/hammer_cli_foreman/compute_resource.rb +1 -0
  20. data/lib/hammer_cli_foreman/domain.rb +5 -28
  21. data/lib/hammer_cli_foreman/exception_handler.rb +26 -0
  22. data/lib/hammer_cli_foreman/filter.rb +3 -3
  23. data/lib/hammer_cli_foreman/host.rb +1 -0
  24. data/lib/hammer_cli_foreman/hostgroup.rb +13 -6
  25. data/lib/hammer_cli_foreman/hosts/common_update_options.rb +7 -7
  26. data/lib/hammer_cli_foreman/id_resolver.rb +7 -7
  27. data/lib/hammer_cli_foreman/option_builders.rb +65 -53
  28. data/lib/hammer_cli_foreman/option_sources/id_params.rb +21 -8
  29. data/lib/hammer_cli_foreman/option_sources/ids_params.rb +22 -9
  30. data/lib/hammer_cli_foreman/partition_table.rb +30 -0
  31. data/lib/hammer_cli_foreman/report_template.rb +15 -0
  32. data/lib/hammer_cli_foreman/smart_proxy.rb +18 -5
  33. data/lib/hammer_cli_foreman/template.rb +33 -15
  34. data/lib/hammer_cli_foreman/user.rb +5 -4
  35. data/lib/hammer_cli_foreman/version.rb +1 -1
  36. data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  37. data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  38. data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  39. data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  40. data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  41. data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  42. data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  43. data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  44. data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  45. data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  46. data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  47. data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  48. data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  49. data/test/data/3.1/foreman_api.json +1 -0
  50. data/test/functional/compute_attribute_test.rb +20 -20
  51. data/test/functional/domain/create_test.rb +91 -0
  52. data/test/functional/domain/update_test.rb +90 -0
  53. data/test/functional/host_test.rb +34 -0
  54. data/test/functional/hostgroup/create_test.rb +11 -0
  55. data/test/functional/hostgroup/update_test.rb +11 -0
  56. data/test/functional/partition_table_test.rb +63 -0
  57. data/test/functional/personal_access_token_test.rb +4 -4
  58. data/test/functional/report_template_test.rb +24 -0
  59. data/test/functional/template_test.rb +134 -14
  60. data/test/functional/user_mail_notification_test.rb +3 -3
  61. data/test/test_helper.rb +1 -1
  62. data/test/unit/commands_test.rb +1 -2
  63. data/test/unit/option_builders_test.rb +88 -83
  64. data/test/unit/option_sources/id_params_test.rb +0 -9
  65. data/test/unit/option_sources/ids_params_test.rb +0 -9
  66. metadata +54 -44
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_foreman
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomáš Strachota
8
8
  - Martin Bačovský
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-08-04 00:00:00.000000000 Z
12
+ date: 2022-05-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: 3.0.0
20
+ version: 3.3.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.0.0
27
+ version: 3.3.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.4.0
34
+ version: 0.5.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.4.0
41
+ version: 0.5.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rest-client
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -75,12 +75,11 @@ 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
83
  - doc/name_id_resolution.md
85
84
  - doc/option_builder.md
86
85
  - doc/using_hammer_cli_foreman_command.md
@@ -88,6 +87,7 @@ extra_rdoc_files:
88
87
  - doc/host_create.md
89
88
  - doc/plugin.md
90
89
  - doc/testing.md
90
+ - doc/configuration.md
91
91
  - doc/release_notes.md
92
92
  - README.md
93
93
  files:
@@ -108,6 +108,7 @@ files:
108
108
  - lib/hammer_cli_foreman/api/authenticator.rb
109
109
  - lib/hammer_cli_foreman/api/connection.rb
110
110
  - lib/hammer_cli_foreman/api/interactive_basic_auth.rb
111
+ - lib/hammer_cli_foreman/api/negotiate_auth.rb
111
112
  - lib/hammer_cli_foreman/api/oauth/authentication_code_grant.rb
112
113
  - lib/hammer_cli_foreman/api/oauth/password_grant.rb
113
114
  - lib/hammer_cli_foreman/api/session_authenticator_wrapper.rb
@@ -123,6 +124,7 @@ files:
123
124
  - lib/hammer_cli_foreman/bookmark.rb
124
125
  - lib/hammer_cli_foreman/combination.rb
125
126
  - lib/hammer_cli_foreman/command_extensions.rb
127
+ - lib/hammer_cli_foreman/command_extensions/domain.rb
126
128
  - lib/hammer_cli_foreman/command_extensions/fields.rb
127
129
  - lib/hammer_cli_foreman/command_extensions/hosts.rb
128
130
  - lib/hammer_cli_foreman/command_extensions/hosts/help.rb
@@ -242,6 +244,7 @@ files:
242
244
  - test/data/2.1/foreman_api.json
243
245
  - test/data/2.4/foreman_api.json
244
246
  - test/data/2.5/foreman_api.json
247
+ - test/data/3.1/foreman_api.json
245
248
  - test/data/README.md
246
249
  - test/functional/architecture_test.rb
247
250
  - test/functional/associating_commands_test.rb
@@ -252,6 +255,8 @@ files:
252
255
  - test/functional/compute_attribute_test.rb
253
256
  - test/functional/compute_profile_test.rb
254
257
  - test/functional/compute_resource_test.rb
258
+ - test/functional/domain/create_test.rb
259
+ - test/functional/domain/update_test.rb
255
260
  - test/functional/filter_test.rb
256
261
  - test/functional/host_test.rb
257
262
  - test/functional/hostgroup/create_test.rb
@@ -263,6 +268,7 @@ files:
263
268
  - test/functional/model_test.rb
264
269
  - test/functional/operating_system_test.rb
265
270
  - test/functional/organization_test.rb
271
+ - test/functional/partition_table_test.rb
266
272
  - test/functional/personal_access_token_test.rb
267
273
  - test/functional/ping_test.rb
268
274
  - test/functional/realm_test.rb
@@ -341,7 +347,7 @@ homepage: https://github.com/theforeman/hammer-cli-foreman
341
347
  licenses:
342
348
  - GPL-3.0+
343
349
  metadata: {}
344
- post_install_message:
350
+ post_install_message:
345
351
  rdoc_options: []
346
352
  require_paths:
347
353
  - lib
@@ -357,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
357
363
  version: '0'
358
364
  requirements: []
359
365
  rubygems_version: 3.1.2
360
- signing_key:
366
+ signing_key:
361
367
  specification_version: 4
362
368
  summary: Foreman commands for Hammer
363
369
  test_files:
@@ -375,46 +381,50 @@ test_files:
375
381
  - test/data/1.24/foreman_api.json
376
382
  - test/data/2.0/foreman_api.json
377
383
  - test/data/2.1/foreman_api.json
384
+ - test/data/README.md
378
385
  - test/data/2.4/foreman_api.json
379
386
  - test/data/2.5/foreman_api.json
380
- - test/data/README.md
387
+ - test/data/3.1/foreman_api.json
381
388
  - test/functional/auth_source_test.rb
382
389
  - test/functional/commands/list_test.rb
383
- - test/functional/compute_profile_test.rb
384
390
  - test/functional/hostgroup/create_test.rb
385
391
  - test/functional/hostgroup/update_test.rb
386
- - test/functional/template_test.rb
392
+ - test/functional/architecture_test.rb
393
+ - test/functional/compute_attribute_test.rb
394
+ - test/functional/ping_test.rb
395
+ - test/functional/user_test.rb
387
396
  - test/functional/ssh_keys_test.rb
388
397
  - test/functional/subnet/update_test.rb
389
398
  - test/functional/subnet/create_test.rb
390
399
  - test/functional/test_helper.rb
391
- - test/functional/filter_test.rb
392
- - test/functional/http_proxy_test.rb
400
+ - test/functional/location_test.rb
393
401
  - test/functional/media_test.rb
394
- - test/functional/registration_test.rb
395
- - test/functional/bookmark_test.rb
396
- - test/functional/mail_notification_test.rb
402
+ - test/functional/partition_table_test.rb
403
+ - test/functional/personal_access_token_test.rb
404
+ - test/functional/report_template_test.rb
397
405
  - test/functional/settings_test.rb
406
+ - test/functional/status_test.rb
398
407
  - test/functional/user_mail_notification_test.rb
399
- - test/functional/compute_resource_test.rb
408
+ - test/functional/compute_profile_test.rb
409
+ - test/functional/realm_test.rb
410
+ - test/functional/usergroup_test.rb
400
411
  - test/functional/organization_test.rb
401
- - test/functional/report_template_test.rb
402
- - test/functional/user_test.rb
403
412
  - test/functional/virtual_machine_test.rb
404
- - test/functional/architecture_test.rb
405
- - test/functional/model_test.rb
406
- - test/functional/compute_attribute_test.rb
413
+ - test/functional/compute_resource_test.rb
414
+ - test/functional/domain/create_test.rb
415
+ - test/functional/domain/update_test.rb
416
+ - test/functional/filter_test.rb
407
417
  - test/functional/host_test.rb
418
+ - test/functional/http_proxy_test.rb
419
+ - test/functional/mail_notification_test.rb
420
+ - test/functional/operating_system_test.rb
421
+ - test/functional/template_test.rb
408
422
  - test/functional/associating_commands_test.rb
409
423
  - test/functional/audit_test.rb
410
- - test/functional/ping_test.rb
411
- - test/functional/realm_test.rb
412
424
  - test/functional/role_test.rb
413
- - test/functional/status_test.rb
414
- - test/functional/operating_system_test.rb
415
- - test/functional/usergroup_test.rb
416
- - test/functional/personal_access_token_test.rb
417
- - test/functional/location_test.rb
425
+ - test/functional/bookmark_test.rb
426
+ - test/functional/model_test.rb
427
+ - test/functional/registration_test.rb
418
428
  - test/unit/api/void_auth_test.rb
419
429
  - test/unit/api/interactive_basic_auth_test.rb
420
430
  - test/unit/api/oauth/oauth_authentication_code_grant_test.rb
@@ -427,7 +437,7 @@ test_files:
427
437
  - test/unit/compute_resource_test.rb
428
438
  - test/unit/data/test_api.json
429
439
  - test/unit/defaults_test.rb
430
- - test/unit/architecture_test.rb
440
+ - test/unit/id_resolver_test.rb
431
441
  - test/unit/external_usergroup_test.rb
432
442
  - test/unit/fact_test.rb
433
443
  - test/unit/helpers/fake_searchables.rb
@@ -436,25 +446,25 @@ test_files:
436
446
  - test/unit/image_test.rb
437
447
  - test/unit/location_test.rb
438
448
  - test/unit/messages_test.rb
439
- - test/unit/bookmark_test.rb
449
+ - test/unit/mail_notification_test.rb
440
450
  - test/unit/option_sources/id_params_test.rb
441
451
  - test/unit/option_sources/ids_params_test.rb
442
452
  - test/unit/organization_test.rb
443
453
  - test/unit/output/formatters_test.rb
444
454
  - test/unit/common_parameter_test.rb
445
455
  - test/unit/realm_test.rb
456
+ - test/unit/settings_test.rb
446
457
  - test/unit/usergroup_test.rb
447
- - test/unit/option_builders_test.rb
448
458
  - test/unit/subnet_test.rb
449
459
  - test/unit/test_helper.rb
450
460
  - test/unit/user_test.rb
451
461
  - test/unit/param_filters_test.rb
452
- - test/unit/partition_table_test.rb
453
462
  - test/unit/role_test.rb
454
- - test/unit/hostgroup_test.rb
455
- - test/unit/mail_notification_test.rb
456
463
  - test/unit/model_test.rb
457
464
  - test/unit/operating_system_test.rb
465
+ - test/unit/option_builders_test.rb
466
+ - test/unit/architecture_test.rb
467
+ - test/unit/commands_test.rb
458
468
  - test/unit/audit_test.rb
459
469
  - test/unit/auth_source_external.rb
460
470
  - test/unit/dependency_resolver_test.rb
@@ -462,13 +472,13 @@ test_files:
462
472
  - test/unit/filter_test.rb
463
473
  - test/unit/media_test.rb
464
474
  - test/unit/sessions_test.rb
465
- - test/unit/apipie_resource_mock.rb
475
+ - test/unit/bookmark_test.rb
476
+ - test/unit/hostgroup_test.rb
466
477
  - test/unit/api_test.rb
467
- - test/unit/smart_proxy_test.rb
468
- - test/unit/settings_test.rb
469
- - test/unit/commands_test.rb
470
- - test/unit/id_resolver_test.rb
471
- - test/unit/template_test.rb
478
+ - test/unit/apipie_resource_mock.rb
472
479
  - test/unit/compute_profile_test.rb
480
+ - test/unit/partition_table_test.rb
481
+ - test/unit/template_test.rb
482
+ - test/unit/smart_proxy_test.rb
473
483
  - test/unit/domain_test.rb
474
484
  - test/test_helper.rb