Class: Puppet::HTTP::Service::Puppetserver Private
- Inherits:
-
Puppet::HTTP::Service
- Object
- Puppet::HTTP::Service
- Puppet::HTTP::Service::Puppetserver
- Defined in:
- lib/puppet/http/service/puppetserver.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The puppetserver service.
Constant Summary
Constants inherited from Puppet::HTTP::Service
EXCLUDED_FORMATS, SERVICE_NAMES
Instance Attribute Summary
Attributes inherited from Puppet::HTTP::Service
Instance Method Summary collapse
-
#get_simple_status(ssl_context: nil) ⇒ Object
private
Request the puppetserver’s simple status.
-
#initialize(client, session, server, port) ⇒ Puppetserver
constructor
private
A new instance of Puppetserver.
Methods inherited from Puppet::HTTP::Service
#connect, create_service, valid_name?, #with_base_url
Constructor Details
#initialize(client, session, server, port) ⇒ Puppetserver
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Puppetserver.
16 17 18 19 |
# File 'lib/puppet/http/service/puppetserver.rb', line 16 def initialize(client, session, server, port) url = build_url('', server || Puppet[:server], port || Puppet[:serverport]) super(client, session, url) end |
Instance Method Details
#get_simple_status(ssl_context: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Request the puppetserver’s simple status
the connection.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/puppet/http/service/puppetserver.rb', line 28 def get_simple_status(ssl_context: nil) response = @client.get( with_base_url("/status/v1/simple/master"), headers: add_puppet_headers({}), options: {ssl_context: ssl_context} ) process_response(response) [response, response.body.to_s] end |