hammer_cli_foreman 3.18.0 → 3.18.3

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: b79768d57bec26db05b257b810acbbf13686017aaad05f837eee93f71e206511
4
- data.tar.gz: f1bd7df49bba001b0213ca7b9b6891014100ce07e675f1350075f0b9290e819a
3
+ metadata.gz: 1be0b419c7a727ccb9e81835ce8d19e460e08d07366622690774bce7a16424bd
4
+ data.tar.gz: a71ce4dbeca01329b7ae7c13140793d69f8b6177de11257a9ce765421a6f7457
5
5
  SHA512:
6
- metadata.gz: 585c9b6bd8c12404fd9adec6be096700d316c9347dab39d72c07ebcd8889de3251b93c7d31bb203acd54291029e688a20944f9a9fcb7a5678f557076411f4ff8
7
- data.tar.gz: 6eab9b8657806b87928ef44c9145e89f84aadcedd14561151812be4dae04d6907fa24ff60d3335c5f0b47fe0019265e4a7a4144159a6af7b6216807356939438
6
+ metadata.gz: 2ad863d0e5061412fb48e211e238b9f8db6e46851d45b2a5e335904cc89ea5a1b4d76730865fd70a4e8f53b03bbf47b504662454b8c4ba12d575e65b072b57b6
7
+ data.tar.gz: a10d96735ffb2ca9989584279027983ce4b0550cb3a8e20cb84666dd2a5a5a22ed0f755a41a4d29167b0b679c9d948aec87c0875d9133312a173591f92c02739
data/doc/release_notes.md CHANGED
@@ -1,5 +1,16 @@
1
1
  Release notes
2
2
  =============
3
+ ### 3.18.3 (2026-10-23)
4
+ * Fix release tag pattern and drop redundant manual gem push ([PR #667](https://github.com/theforeman/hammer-cli-foreman/pull/667))
5
+ * Extract displayMessage from validation errors ([PR #666](https://github.com/theforeman/hammer-cli-foreman/pull/666)), [#39372](http://projects.theforeman.org/issues/39372)
6
+
7
+ ### 3.18.2 (2026-10-23)
8
+ * Extract displayMessage from validation errors ([PR #666](https://github.com/theforeman/hammer-cli-foreman/pull/666)), [#39372](http://projects.theforeman.org/issues/39372)
9
+
10
+ ### 3.18.1 (2026-03-04)
11
+ * Provide empty provider_vm_specific_fields in cr::base, [#39126](http://projects.theforeman.org/issues/39126)
12
+ * Always print vm data, even if the provider is absent, [#39125](http://projects.theforeman.org/issues/39125)
13
+
3
14
  ### 3.18.0 (2026-02-10)
4
15
  * Bump to 3.18.0-develop
5
16
 
@@ -12,6 +12,7 @@ module HammerCLIForeman
12
12
  Fields::Field.new(label: _('Url'), path: [:url])
13
13
  ]
14
14
  end
15
+ def provider_vm_specific_fields; []; end
15
16
  def mandatory_resource_options; %i[name provider]; end
16
17
  end
17
18
  end
@@ -35,7 +35,7 @@ module HammerCLIForeman
35
35
  def handle_unprocessable_entity(e)
36
36
  response = JSON.parse(e.response)
37
37
  response = HammerCLIForeman.record_to_common_format(response) unless response.has_key?('message')
38
- print_error response['message'] || response['full_messages']
38
+ print_error response['message'] || response['full_messages'] || response['displayMessage']
39
39
  HammerCLI::EX_DATAERR
40
40
  end
41
41
 
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForeman
2
2
  def self.version
3
- @version ||= Gem::Version.new "3.18.0"
3
+ @version ||= Gem::Version.new "3.18.3"
4
4
  end
5
5
  end
@@ -28,8 +28,8 @@ module HammerCLIForeman
28
28
  provider = ::HammerCLIForeman.compute_resources[data['provider'].downcase]
29
29
  if provider
30
30
  output_definition.fields.concat(provider.provider_vm_specific_fields || [])
31
- super(data)
32
31
  end
32
+ super(data)
33
33
  end
34
34
 
35
35
  build_options
@@ -29,6 +29,17 @@ describe HammerCLIForeman::ExceptionHandler do
29
29
  _(err_code).must_equal HammerCLI::EX_DATAERR
30
30
  end
31
31
 
32
+ it "should print displayMessage on unprocessable entity exception" do
33
+ response = <<-RESPONSE
34
+ {"displayMessage":"Validation failed: Cannot add content view environment to content facet.","errors":{"base":["Cannot add content view environment to content facet."]}}
35
+ RESPONSE
36
+
37
+ ex = RestClient::UnprocessableEntity.new(response)
38
+ output.expects(:print_error).with(heading, "Validation failed: Cannot add content view environment to content facet.")
39
+ err_code = handler.handle_exception(ex, :heading => heading)
40
+ _(err_code).must_equal HammerCLI::EX_DATAERR
41
+ end
42
+
32
43
  it "should handle argument error" do
33
44
  ex = ArgumentError.new
34
45
  output.expects(:print_error).with(heading, ex.message)
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.18.0
4
+ version: 3.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomáš Strachota
@@ -354,7 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
354
354
  - !ruby/object:Gem::Version
355
355
  version: '0'
356
356
  requirements: []
357
- rubygems_version: 3.6.9
357
+ rubygems_version: 4.0.20
358
358
  specification_version: 4
359
359
  summary: Foreman commands for Hammer
360
360
  test_files: