Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e4ba167

Browse files
committedJul 30, 2024·
Last commit
1 parent 543c582 commit e4ba167

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed
 

‎lib/puppet/provider/elasticsearch_license/xpack.rb

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@
33
require 'puppet/provider/elastic_rest'
44

55
Puppet::Type.type(:elasticsearch_license).provide(
6-
:xpack,
7-
api_resource_style: :bare,
6+
:ruby,
87
parent: Puppet::Provider::ElasticREST,
98
metadata: :content,
109
metadata_pipeline: [
1110
->(data) { Puppet_X::Elastic.deep_to_s data },
1211
->(data) { Puppet_X::Elastic.deep_to_i data }
1312
],
14-
api_uri: '_xpack/license',
13+
api_uri: '_license',
1514
query_string: {
1615
'acknowledge' => 'true'
1716
}
1817
) do
19-
desc 'A REST API based provider to manage Elasticsearch X-Pack licenses.'
18+
desc 'A REST API based provider to manage Elasticsearch licenses.'
2019

2120
mk_resource_methods
2221

‎manifests/license.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
port => $api_port,
7373
timeout => $api_timeout,
7474
}
75-
-> elasticsearch_license { 'xpack':
75+
-> elasticsearch_license { 'license':
7676
ensure => $ensure,
7777
content => $_content,
7878
protocol => $api_protocol,

‎spec/classes/006_elasticsearch_license_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ class { 'elasticsearch' :
5353
it do
5454
expect(subject).to contain_es_instance_conn_validator(
5555
'license-conn-validator'
56-
).that_comes_before('elasticsearch_license[xpack]')
56+
).that_comes_before('elasticsearch_license[license]')
5757
end
5858

5959
it do
60-
expect(subject).to contain_elasticsearch_license('xpack').with(
60+
expect(subject).to contain_elasticsearch_license('license').with(
6161
ensure: 'present',
6262
content: {
6363
'license' => {

‎spec/unit/provider/elasticsearch_license/xpack_spec.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
require_relative '../../../helpers/unit/provider/elasticsearch_rest_shared_examples'
44

5-
describe Puppet::Type.type(:elasticsearch_license).provider(:xpack) do # rubocop:disable RSpec/MultipleMemoizedHelpers
6-
let(:name) { 'xpack' }
5+
describe Puppet::Type.type(:elasticsearch_license).provider(:ruby) do # rubocop:disable RSpec/MultipleMemoizedHelpers
6+
let(:name) { 'ruby' }
77

88
let(:example1) do
99
{
10-
name: 'xpack',
10+
name: 'ruby',
1111
ensure: :present,
12-
provider: :xpack,
12+
provider: :ruby,
1313
content: {
1414
'license' => {
1515
'status' => 'active',
@@ -59,5 +59,5 @@
5959
}
6060
end
6161

62-
include_examples 'REST API', 'xpack/license', nil, true
62+
include_examples 'REST API', 'license', nil, true
6363
end

0 commit comments

Comments
 (0)
Please sign in to comment.