Skip to content

Commit

Permalink
modif endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
stjmt committed Jul 30, 2024
1 parent 76374c6 commit 4e838ce
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/puppet/provider/elasticsearch_license/xpack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
require 'puppet/provider/elastic_rest'

Puppet::Type.type(:elasticsearch_license).provide(
:xpack,
api_resource_style: :bare,
:ruby,
parent: Puppet::Provider::ElasticREST,
metadata: :content,
metadata_pipeline: [
->(data) { Puppet_X::Elastic.deep_to_s data },
->(data) { Puppet_X::Elastic.deep_to_i data }
],
api_uri: '_xpack/license',
api_uri: '_license',
query_string: {
'acknowledge' => 'true'
}
) do
desc 'A REST API based provider to manage Elasticsearch X-Pack licenses.'
desc 'A REST API based provider to manage Elasticsearch licenses.'

mk_resource_methods

Expand All @@ -25,7 +24,7 @@ def self.process_body(body)
{
:name => name.to_s,
:ensure => :present,
metadata => { 'license' => process_metadata(api_object) },
metadata => { 'licenses' => [ process_metadata(api_object) ] },

Check failure on line 27 in lib/puppet/provider/elasticsearch_license/xpack.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.

Check failure on line 27 in lib/puppet/provider/elasticsearch_license/xpack.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.
:provider => name
}
end
Expand Down

0 comments on commit 4e838ce

Please sign in to comment.