hammer_cli_foreman 2.0.2 → 2.1.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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/doc/developer_docs.md +1 -0
  3. data/doc/plugin.md +22 -0
  4. data/doc/release_notes.md +20 -4
  5. data/lib/hammer_cli_foreman.rb +8 -0
  6. data/lib/hammer_cli_foreman/api/oauth/authentication_code_grant.rb +7 -4
  7. data/lib/hammer_cli_foreman/associating_commands.rb +33 -5
  8. data/lib/hammer_cli_foreman/auth.rb +6 -6
  9. data/lib/hammer_cli_foreman/bookmark.rb +50 -0
  10. data/lib/hammer_cli_foreman/command_extensions.rb +2 -0
  11. data/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb +13 -7
  12. data/lib/hammer_cli_foreman/command_extensions/puppet_environments.rb +13 -7
  13. data/lib/hammer_cli_foreman/command_extensions/subnet.rb +25 -0
  14. data/lib/hammer_cli_foreman/command_extensions/user.rb +17 -0
  15. data/lib/hammer_cli_foreman/commands.rb +14 -9
  16. data/lib/hammer_cli_foreman/compute_resource.rb +15 -0
  17. data/lib/hammer_cli_foreman/compute_resource/ec2.rb +11 -0
  18. data/lib/hammer_cli_foreman/compute_resource/gce.rb +9 -0
  19. data/lib/hammer_cli_foreman/compute_resource/libvirt.rb +11 -0
  20. data/lib/hammer_cli_foreman/compute_resource/openstack.rb +7 -0
  21. data/lib/hammer_cli_foreman/compute_resource/ovirt.rb +21 -9
  22. data/lib/hammer_cli_foreman/compute_resource/vmware.rb +15 -2
  23. data/lib/hammer_cli_foreman/hostgroup.rb +11 -19
  24. data/lib/hammer_cli_foreman/hosts/common_update_options.rb +32 -10
  25. data/lib/hammer_cli_foreman/id_resolver.rb +12 -11
  26. data/lib/hammer_cli_foreman/mail_notification.rb +31 -0
  27. data/lib/hammer_cli_foreman/option_builders.rb +70 -48
  28. data/lib/hammer_cli_foreman/option_sources.rb +1 -0
  29. data/lib/hammer_cli_foreman/option_sources/referenced_resource_id_params.rb +47 -0
  30. data/lib/hammer_cli_foreman/subnet.rb +26 -15
  31. data/lib/hammer_cli_foreman/task_helper.rb +180 -0
  32. data/lib/hammer_cli_foreman/user.rb +3 -17
  33. data/lib/hammer_cli_foreman/version.rb +1 -1
  34. data/lib/hammer_cli_foreman/virtual_machine.rb +55 -0
  35. data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  36. data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  37. data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  38. data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  39. data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  40. data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  41. data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  42. data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  43. data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  44. data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  45. data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  46. data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  47. data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  48. data/test/data/2.1/foreman_api.json +1 -0
  49. data/test/functional/associating_commands_test.rb +134 -30
  50. data/test/functional/bookmark_test.rb +193 -0
  51. data/test/functional/host_test.rb +27 -1
  52. data/test/functional/mail_notification_test.rb +57 -0
  53. data/test/functional/subnet/create_test.rb +28 -5
  54. data/test/functional/template_test.rb +2 -2
  55. data/test/functional/virtual_machine_test.rb +129 -0
  56. data/test/test_helper.rb +1 -1
  57. metadata +23 -6
data/test/test_helper.rb CHANGED
@@ -17,7 +17,7 @@ require "mocha/minitest"
17
17
  require 'hammer_cli'
18
18
  require 'hammer_cli_foreman/testing/api_expectations'
19
19
 
20
- FOREMAN_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '2.0')
20
+ FOREMAN_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '2.1')
21
21
 
22
22
  include HammerCLIForeman::Testing::APIExpectations
23
23
  HammerCLI.context[:api_connection].create('foreman') do
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.0.2
4
+ version: 2.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: 2020-03-24 00:00:00.000000000 Z
12
+ date: 2020-05-14 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.0.0
20
+ version: 2.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: 2.0.0
27
+ version: 2.1.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: apipie-bindings
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -75,13 +75,14 @@ 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
83
  - doc/host_create.md
84
84
  - doc/release_notes.md
85
+ - doc/plugin.md
85
86
  - doc/configuration.md
86
87
  - doc/name_id_resolution.md
87
88
  - doc/developer_docs.md
@@ -98,6 +99,7 @@ files:
98
99
  - doc/host_create.md
99
100
  - doc/name_id_resolution.md
100
101
  - doc/option_builder.md
102
+ - doc/plugin.md
101
103
  - doc/release_notes.md
102
104
  - doc/testing.md
103
105
  - doc/using_hammer_cli_foreman_command.md
@@ -118,6 +120,7 @@ files:
118
120
  - lib/hammer_cli_foreman/auth_source_external.rb
119
121
  - lib/hammer_cli_foreman/auth_source_ldap.rb
120
122
  - lib/hammer_cli_foreman/authenticate/login.rb
123
+ - lib/hammer_cli_foreman/bookmark.rb
121
124
  - lib/hammer_cli_foreman/combination.rb
122
125
  - lib/hammer_cli_foreman/command_extensions.rb
123
126
  - lib/hammer_cli_foreman/command_extensions/fields.rb
@@ -130,6 +133,8 @@ files:
130
133
  - lib/hammer_cli_foreman/command_extensions/puppet_environment.rb
131
134
  - lib/hammer_cli_foreman/command_extensions/puppet_environments.rb
132
135
  - lib/hammer_cli_foreman/command_extensions/status.rb
136
+ - lib/hammer_cli_foreman/command_extensions/subnet.rb
137
+ - lib/hammer_cli_foreman/command_extensions/user.rb
133
138
  - lib/hammer_cli_foreman/commands.rb
134
139
  - lib/hammer_cli_foreman/common_parameter.rb
135
140
  - lib/hammer_cli_foreman/compute_attribute.rb
@@ -165,6 +170,7 @@ files:
165
170
  - lib/hammer_cli_foreman/interface.rb
166
171
  - lib/hammer_cli_foreman/location.rb
167
172
  - lib/hammer_cli_foreman/logger.rb
173
+ - lib/hammer_cli_foreman/mail_notification.rb
168
174
  - lib/hammer_cli_foreman/media.rb
169
175
  - lib/hammer_cli_foreman/model.rb
170
176
  - lib/hammer_cli_foreman/openid_connect.rb
@@ -176,6 +182,7 @@ files:
176
182
  - lib/hammer_cli_foreman/option_sources/ids_params.rb
177
183
  - lib/hammer_cli_foreman/option_sources/new_params.rb
178
184
  - lib/hammer_cli_foreman/option_sources/puppet_environment_params.rb
185
+ - lib/hammer_cli_foreman/option_sources/referenced_resource_id_params.rb
179
186
  - lib/hammer_cli_foreman/option_sources/self_param.rb
180
187
  - lib/hammer_cli_foreman/option_sources/user_params.rb
181
188
  - lib/hammer_cli_foreman/organization.rb
@@ -201,12 +208,14 @@ files:
201
208
  - lib/hammer_cli_foreman/ssh_keys.rb
202
209
  - lib/hammer_cli_foreman/status.rb
203
210
  - lib/hammer_cli_foreman/subnet.rb
211
+ - lib/hammer_cli_foreman/task_helper.rb
204
212
  - lib/hammer_cli_foreman/template.rb
205
213
  - lib/hammer_cli_foreman/testing/api_expectations.rb
206
214
  - lib/hammer_cli_foreman/trend.rb
207
215
  - lib/hammer_cli_foreman/user.rb
208
216
  - lib/hammer_cli_foreman/usergroup.rb
209
217
  - lib/hammer_cli_foreman/version.rb
218
+ - lib/hammer_cli_foreman/virtual_machine.rb
210
219
  - locale/ca/LC_MESSAGES/hammer-cli-foreman.mo
211
220
  - locale/de/LC_MESSAGES/hammer-cli-foreman.mo
212
221
  - locale/en/LC_MESSAGES/hammer-cli-foreman.mo
@@ -233,10 +242,12 @@ files:
233
242
  - test/data/1.22/foreman_api.json
234
243
  - test/data/1.24/foreman_api.json
235
244
  - test/data/2.0/foreman_api.json
245
+ - test/data/2.1/foreman_api.json
236
246
  - test/data/README.md
237
247
  - test/functional/associating_commands_test.rb
238
248
  - test/functional/audit_test.rb
239
249
  - test/functional/auth_source_test.rb
250
+ - test/functional/bookmark_test.rb
240
251
  - test/functional/commands/list_test.rb
241
252
  - test/functional/compute_attribute_test.rb
242
253
  - test/functional/compute_profile_test.rb
@@ -247,6 +258,7 @@ files:
247
258
  - test/functional/hostgroup/update_test.rb
248
259
  - test/functional/http_proxy_test.rb
249
260
  - test/functional/location_test.rb
261
+ - test/functional/mail_notification_test.rb
250
262
  - test/functional/organization_test.rb
251
263
  - test/functional/personal_access_token_test.rb
252
264
  - test/functional/ping_test.rb
@@ -263,6 +275,7 @@ files:
263
275
  - test/functional/test_helper.rb
264
276
  - test/functional/trend_test.rb
265
277
  - test/functional/user_test.rb
278
+ - test/functional/virtual_machine_test.rb
266
279
  - test/test_helper.rb
267
280
  - test/unit/api/interactive_basic_auth_test.rb
268
281
  - test/unit/api/oauth/oauth_authentication_code_grant_test.rb
@@ -340,7 +353,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
340
353
  - !ruby/object:Gem::Version
341
354
  version: '0'
342
355
  requirements: []
343
- rubygems_version: 3.0.3
356
+ rubygems_version: 3.0.8
344
357
  signing_key:
345
358
  specification_version: 4
346
359
  summary: Foreman commands for Hammer
@@ -402,6 +415,7 @@ test_files:
402
415
  - test/unit/commands_test.rb
403
416
  - test/unit/common_parameter_test.rb
404
417
  - test/unit/subnet_test.rb
418
+ - test/data/2.1/foreman_api.json
405
419
  - test/data/2.0/foreman_api.json
406
420
  - test/data/1.24/foreman_api.json
407
421
  - test/data/1.18/foreman_api.json
@@ -422,6 +436,7 @@ test_files:
422
436
  - test/functional/personal_access_token_test.rb
423
437
  - test/functional/audit_test.rb
424
438
  - test/functional/test_helper.rb
439
+ - test/functional/mail_notification_test.rb
425
440
  - test/functional/ping_test.rb
426
441
  - test/functional/smart_class_parameter_test.rb
427
442
  - test/functional/role_test.rb
@@ -445,4 +460,6 @@ test_files:
445
460
  - test/functional/status_test.rb
446
461
  - test/functional/associating_commands_test.rb
447
462
  - test/functional/auth_source_test.rb
463
+ - test/functional/virtual_machine_test.rb
464
+ - test/functional/bookmark_test.rb
448
465
  - test/test_helper.rb