Class: PEClient::Resource::RBACV1::Disclaimer
- Defined in:
- lib/pe_client/resources/rbac.v1/disclaimer.rb
Overview
Use these endpoints to modify the disclaimer text that appears on the Puppet Enterprise (PE) console login page.
Constant Summary collapse
- BASE_PATH =
The base path for RBAC API v1 Disclaimer endpoints.
"#{RBACV1::BASE_PATH}/config/disclaimer".freeze
- COMMAND_BASE_PATH =
The base path for RBAC API v1 Disclaimer command endpoints.
"#{RBACV1::BASE_PATH}/command/config".freeze
Instance Method Summary collapse
-
#get ⇒ Hash
Retrieve the current disclaimer text, as specified by #set.
-
#remove ⇒ Hash
Remove the disclaimer text set through POST /command/config/set-disclaimer.
-
#set(disclaimer) ⇒ Hash
Change the disclaimer text that is on the PE console login page.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PEClient::Resource::Base
Instance Method Details
#get ⇒ Hash
Retrieve the current disclaimer text, as specified by #set. This endpoint does not retrieve the contents of any disclaimer.txt file.
36 37 38 |
# File 'lib/pe_client/resources/rbac.v1/disclaimer.rb', line 36 def get @client.get(BASE_PATH) end |
#remove ⇒ Hash
Remove the disclaimer text set through POST /command/config/set-disclaimer.
52 53 54 |
# File 'lib/pe_client/resources/rbac.v1/disclaimer.rb', line 52 def remove @client.post "#{COMMAND_BASE_PATH}/remove-disclaimer" end |
#set(disclaimer) ⇒ Hash
Change the disclaimer text that is on the PE console login page.
45 46 47 |
# File 'lib/pe_client/resources/rbac.v1/disclaimer.rb', line 45 def set(disclaimer) @client.post "#{COMMAND_BASE_PATH}/set-disclaimer", body: {disclaimer:} end |