hammer_cli_foreman 0.18.1 → 0.18.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56224f77f49089d00f840eb1f97b6df3e11aa38f8da68f875e02d24c97a5cbd2
4
- data.tar.gz: ff38a1dc95d74628ac1b3745abc7bb6f27e7c250bf89e13b08c4f70feeb75fc4
3
+ metadata.gz: e0cdf6461be3ef29ad406ca4e0b5df67a71d1696bdc30cc27a27fb5fcfe32b40
4
+ data.tar.gz: 5e1effc59d2f218e0fc3ff07284f50b8d31aac6a31e444491e280c4840d00a08
5
5
  SHA512:
6
- metadata.gz: 64fe15ae0e063a1ea2b6cdfaa0a2e1c76c84e95821d8c4fc026677c7af1b7d9a356704e4115fce52f9efe62dcf032e4b25240474518594b7ef9fd079673a3ac2
7
- data.tar.gz: ba058202d03107197cebe9f7f49a0e373b97928a38a38e47d18a8e3e2205f0bbcdcfe59904a6961477dd39869ce52964213673be351da87e7adc17d390e0f383
6
+ metadata.gz: b6763b4f96743429ca23bf0ab687d725eeeeed0982c2c7eda4452d0454d96d87cae0b62449fcd0163391faaf77084319fa3741ba1f2567e495c60dad1671fd72
7
+ data.tar.gz: '095b4445ef69d9aedc2174af90c191edb2b6cc58c50f3095f8e61af04d6858a1edd34cc5a1f0bbd04d32da6f4571dd060fd8de2220da3f5540252267c370f881'
@@ -1,5 +1,8 @@
1
1
  Release notes
2
2
  =============
3
+ ### 0.18.2 (2019-11-18)
4
+ * Fix method typo ([PR #450](https://github.com/theforeman/hammer-cli-foreman/pull/450)), [#27868](http://projects.theforeman.org/issues/27868)
5
+
3
6
  ### 0.18.1 (2019-10-31)
4
7
  * Add option to support host's param type ([PR #448](https://github.com/theforeman/hammer-cli-foreman/pull/448)), [#27868](http://projects.theforeman.org/issues/27868)
5
8
 
@@ -78,7 +78,7 @@ module HammerCLIForeman
78
78
  params['host']['overwrite'] = option_overwrite unless option_overwrite.nil?
79
79
 
80
80
  params['host']['host_parameters_attributes'] = parameter_attributes unless option_parameters.nil?
81
- params['host']['host_parameters_attributes'] ||= typed_parameter_attributes unless option_typed_parameters.nil?
81
+ params['host']['host_parameters_attributes'] ||= option_typed_parameters unless option_typed_parameters.nil?
82
82
  params['host']['compute_attributes'] = option_compute_attributes || {}
83
83
 
84
84
  if action == :update
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForeman
2
2
  def self.version
3
- @version ||= Gem::Version.new "0.18.1"
3
+ @version ||= Gem::Version.new "0.18.2"
4
4
  end
5
5
  end
@@ -136,6 +136,26 @@ describe "host create" do
136
136
  assert_cmd(expected_result, result)
137
137
  end
138
138
 
139
+ it "accepts host typed parameter attributes" do
140
+ params = [
141
+ '--typed-parameters',
142
+ 'name=par1\,value=1\,parameter_type=integer,name=par2\,value=par2\,parameter_type=string'
143
+ ]
144
+
145
+ api_expects(:hosts, :create, 'Create host with typed parameters') do |par|
146
+ par['host']['host_parameters_attributes'][0]['name'] == 'par1' &&
147
+ par['host']['host_parameters_attributes'][0]['value'] == '1' &&
148
+ par['host']['host_parameters_attributes'][0]['parameter_type'] == 'integer' &&
149
+ par['host']['host_parameters_attributes'][1]['name'] == 'par2' &&
150
+ par['host']['host_parameters_attributes'][1]['value'] == 'par2' &&
151
+ par['host']['host_parameters_attributes'][1]['parameter_type'] == 'string'
152
+ end
153
+
154
+ expected_result = success_result("Host created.\n")
155
+ result = run_cmd(cmd + minimal_params + params)
156
+ assert_cmd(expected_result, result)
157
+ end
158
+
139
159
  it "sends empty hash for no interfaces" do
140
160
  # For some reason the Foreman replaces empty interfaces_attributes to nil,
141
161
  # which causes failure in nested attributes assignment in the host model
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: 0.18.1
4
+ version: 0.18.2
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: 2019-10-31 00:00:00.000000000 Z
12
+ date: 2019-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hammer_cli
@@ -66,14 +66,14 @@ email: tstracho@redhat.com
66
66
  executables: []
67
67
  extensions: []
68
68
  extra_rdoc_files:
69
+ - doc/host_create.md
70
+ - doc/release_notes.md
69
71
  - doc/configuration.md
70
- - doc/developer_docs.md
71
72
  - doc/name_id_resolution.md
72
- - doc/option_builder.md
73
- - doc/testing.md
73
+ - doc/developer_docs.md
74
74
  - doc/using_hammer_cli_foreman_command.md
75
- - doc/host_create.md
76
- - doc/release_notes.md
75
+ - doc/testing.md
76
+ - doc/option_builder.md
77
77
  - README.md
78
78
  files:
79
79
  - LICENSE
@@ -305,101 +305,100 @@ required_rubygems_version: !ruby/object:Gem::Requirement
305
305
  - !ruby/object:Gem::Version
306
306
  version: '0'
307
307
  requirements: []
308
- rubyforge_project:
309
- rubygems_version: 2.7.10
308
+ rubygems_version: 3.0.3
310
309
  signing_key:
311
310
  specification_version: 4
312
311
  summary: Foreman commands for Hammer
313
312
  test_files:
314
- - test/data/1.10/foreman_api.json
313
+ - test/unit/image_test.rb
314
+ - test/unit/helpers/resource_disabled.rb
315
+ - test/unit/helpers/fake_searchables.rb
316
+ - test/unit/helpers/command.rb
317
+ - test/unit/messages_test.rb
318
+ - test/unit/smart_variable_test.rb
319
+ - test/unit/config_group_test.rb
320
+ - test/unit/option_sources/id_params_test.rb
321
+ - test/unit/option_sources/ids_params_test.rb
322
+ - test/unit/exception_handler_test.rb
323
+ - test/unit/user_test.rb
324
+ - test/unit/api/session_authenticator_wrapper_test.rb
325
+ - test/unit/api/interactive_basic_auth_test.rb
326
+ - test/unit/api/void_auth_test.rb
327
+ - test/unit/hostgroup_test.rb
328
+ - test/unit/realm_test.rb
329
+ - test/unit/data/test_api.json
330
+ - test/unit/auth_source_ldap_test.rb
331
+ - test/unit/audit_test.rb
332
+ - test/unit/test_helper.rb
333
+ - test/unit/smart_class_parameter_test.rb
334
+ - test/unit/partition_table_test.rb
335
+ - test/unit/operating_system_test.rb
336
+ - test/unit/media_test.rb
337
+ - test/unit/architecture_test.rb
338
+ - test/unit/usergroup_test.rb
339
+ - test/unit/role_test.rb
340
+ - test/unit/location_test.rb
341
+ - test/unit/param_filters_test.rb
342
+ - test/unit/apipie_resource_mock.rb
343
+ - test/unit/option_builders_test.rb
344
+ - test/unit/api_test.rb
345
+ - test/unit/test_output_adapter.rb
346
+ - test/unit/organization_test.rb
347
+ - test/unit/settings_test.rb
348
+ - test/unit/template_test.rb
349
+ - test/unit/dependency_resolver_test.rb
350
+ - test/unit/smart_proxy_test.rb
351
+ - test/unit/domain_test.rb
352
+ - test/unit/defaults_test.rb
353
+ - test/unit/model_test.rb
354
+ - test/unit/puppet_class_test.rb
355
+ - test/unit/compute_resource_test.rb
356
+ - test/unit/id_resolver_test.rb
357
+ - test/unit/filter_test.rb
358
+ - test/unit/puppet_environment_test.rb
359
+ - test/unit/output/formatters_test.rb
360
+ - test/unit/host_test.rb
361
+ - test/unit/config_report_test.rb
362
+ - test/unit/fact_test.rb
363
+ - test/unit/external_usergroup_test.rb
364
+ - test/unit/commands_test.rb
365
+ - test/unit/common_parameter_test.rb
366
+ - test/unit/subnet_test.rb
367
+ - test/data/1.18/foreman_api.json
315
368
  - test/data/1.11/foreman_api.json
369
+ - test/data/1.10/foreman_api.json
370
+ - test/data/1.17/foreman_api.json
371
+ - test/data/1.15/foreman_api.json
316
372
  - test/data/1.14/_foreman_api.json
317
373
  - test/data/1.14/foreman_api.json
318
- - test/data/1.15/foreman_api.json
319
- - test/data/1.16/foreman_api.json
320
- - test/data/1.17/foreman_api.json
321
- - test/data/1.18/foreman_api.json
322
- - test/data/1.20/foreman_api.json
323
374
  - test/data/1.21/foreman_api.json
324
375
  - test/data/1.22/foreman_api.json
376
+ - test/data/1.20/foreman_api.json
325
377
  - test/data/README.md
326
- - test/functional/audit_test.rb
327
- - test/functional/auth_source_test.rb
378
+ - test/data/1.16/foreman_api.json
328
379
  - test/functional/commands/list_test.rb
329
- - test/functional/compute_attribute_test.rb
330
- - test/functional/compute_profile_test.rb
331
- - test/functional/compute_resource_test.rb
332
- - test/functional/filter_test.rb
333
- - test/functional/hostgroup/create_test.rb
334
- - test/functional/hostgroup/update_test.rb
335
- - test/functional/location_test.rb
336
- - test/functional/organization_test.rb
380
+ - test/functional/smart_variable_test.rb
381
+ - test/functional/user_test.rb
337
382
  - test/functional/personal_access_token_test.rb
338
- - test/functional/proxy_test.rb
339
- - test/functional/settings_test.rb
383
+ - test/functional/audit_test.rb
384
+ - test/functional/test_helper.rb
340
385
  - test/functional/smart_class_parameter_test.rb
341
- - test/functional/smart_variable_test.rb
342
- - test/functional/ssh_keys_test.rb
386
+ - test/functional/role_test.rb
387
+ - test/functional/location_test.rb
388
+ - test/functional/hostgroup/create_test.rb
389
+ - test/functional/hostgroup/update_test.rb
343
390
  - test/functional/subnet/create_test.rb
344
391
  - test/functional/subnet/update_test.rb
345
- - test/functional/test_helper.rb
346
- - test/functional/user_test.rb
392
+ - test/functional/organization_test.rb
393
+ - test/functional/settings_test.rb
394
+ - test/functional/template_test.rb
395
+ - test/functional/proxy_test.rb
396
+ - test/functional/compute_resource_test.rb
397
+ - test/functional/compute_attribute_test.rb
398
+ - test/functional/filter_test.rb
347
399
  - test/functional/report_template_test.rb
400
+ - test/functional/compute_profile_test.rb
348
401
  - test/functional/host_test.rb
349
- - test/functional/role_test.rb
350
- - test/functional/template_test.rb
351
- - test/unit/api/void_auth_test.rb
352
- - test/unit/api/interactive_basic_auth_test.rb
353
- - test/unit/api/session_authenticator_wrapper_test.rb
354
- - test/unit/api_test.rb
355
- - test/unit/apipie_resource_mock.rb
356
- - test/unit/architecture_test.rb
357
- - test/unit/audit_test.rb
358
- - test/unit/auth_source_ldap_test.rb
359
- - test/unit/commands_test.rb
360
- - test/unit/common_parameter_test.rb
361
- - test/unit/compute_resource_test.rb
362
- - test/unit/config_group_test.rb
363
- - test/unit/config_report_test.rb
364
- - test/unit/data/test_api.json
365
- - test/unit/defaults_test.rb
366
- - test/unit/dependency_resolver_test.rb
367
- - test/unit/domain_test.rb
368
- - test/unit/exception_handler_test.rb
369
- - test/unit/external_usergroup_test.rb
370
- - test/unit/fact_test.rb
371
- - test/unit/filter_test.rb
372
- - test/unit/helpers/command.rb
373
- - test/unit/helpers/fake_searchables.rb
374
- - test/unit/helpers/resource_disabled.rb
375
- - test/unit/host_test.rb
376
- - test/unit/hostgroup_test.rb
377
- - test/unit/id_resolver_test.rb
378
- - test/unit/image_test.rb
379
- - test/unit/location_test.rb
380
- - test/unit/media_test.rb
381
- - test/unit/messages_test.rb
382
- - test/unit/model_test.rb
383
- - test/unit/operating_system_test.rb
384
- - test/unit/option_builders_test.rb
385
- - test/unit/option_sources/id_params_test.rb
386
- - test/unit/option_sources/ids_params_test.rb
387
- - test/unit/organization_test.rb
388
- - test/unit/output/formatters_test.rb
389
- - test/unit/param_filters_test.rb
390
- - test/unit/partition_table_test.rb
391
- - test/unit/puppet_class_test.rb
392
- - test/unit/puppet_environment_test.rb
393
- - test/unit/realm_test.rb
394
- - test/unit/role_test.rb
395
- - test/unit/settings_test.rb
396
- - test/unit/smart_class_parameter_test.rb
397
- - test/unit/smart_proxy_test.rb
398
- - test/unit/smart_variable_test.rb
399
- - test/unit/subnet_test.rb
400
- - test/unit/template_test.rb
401
- - test/unit/test_helper.rb
402
- - test/unit/user_test.rb
403
- - test/unit/usergroup_test.rb
404
- - test/unit/test_output_adapter.rb
402
+ - test/functional/ssh_keys_test.rb
403
+ - test/functional/auth_source_test.rb
405
404
  - test/test_helper.rb