Class: ChefLicensing::Config
- Inherits:
-
Object
- Object
- ChefLicensing::Config
- Defined in:
- lib/chef-licensing/config.rb
Class Attribute Summary collapse
-
.chef_entitlement_id ⇒ Object
is_local_license_service is used by context class.
-
.chef_executable_name ⇒ Object
is_local_license_service is used by context class.
-
.chef_product_name ⇒ Object
is_local_license_service is used by context class.
-
.is_local_license_service ⇒ Object
is_local_license_service is used by context class.
- .license_add_command ⇒ Object
- .license_list_command ⇒ Object
- .license_server_url(opts = {}) ⇒ Object
-
.license_server_url_check_in_file ⇒ Object
writeonly
Sets the attribute license_server_url_check_in_file.
- .logger ⇒ Object
- .output ⇒ Object
Class Attribute Details
.chef_entitlement_id ⇒ Object
is_local_license_service is used by context class
19 20 21 |
# File 'lib/chef-licensing/config.rb', line 19 def chef_entitlement_id @chef_entitlement_id end |
.chef_executable_name ⇒ Object
is_local_license_service is used by context class
19 20 21 |
# File 'lib/chef-licensing/config.rb', line 19 def chef_executable_name @chef_executable_name end |
.chef_product_name ⇒ Object
is_local_license_service is used by context class
19 20 21 |
# File 'lib/chef-licensing/config.rb', line 19 def chef_product_name @chef_product_name end |
.is_local_license_service ⇒ Object
is_local_license_service is used by context class
19 20 21 |
# File 'lib/chef-licensing/config.rb', line 19 def is_local_license_service @is_local_license_service end |
.license_add_command ⇒ Object
43 44 45 |
# File 'lib/chef-licensing/config.rb', line 43 def license_add_command @license_add_command ||= "license add" end |
.license_list_command ⇒ Object
47 48 49 |
# File 'lib/chef-licensing/config.rb', line 47 def license_list_command @license_list_command ||= "license list" end |
.license_server_url(opts = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/chef-licensing/config.rb', line 21 def license_server_url(opts = {}) return @license_server_url if @license_server_url && @license_server_url_check_in_file license_server_url_from_system = ChefLicensing::ArgFetcher.fetch_value("--chef-license-server", :string) || ChefLicensing::EnvFetcher.fetch_value("CHEF_LICENSE_SERVER", :string) @license_server_url = ChefLicensing::LicenseKeyFetcher::File.fetch_or_persist_url(@license_server_url, license_server_url_from_system, opts) @license_server_url_check_in_file = true @license_server_url end |
.license_server_url_check_in_file=(value) ⇒ Object (writeonly)
Sets the attribute license_server_url_check_in_file
16 17 18 |
# File 'lib/chef-licensing/config.rb', line 16 def license_server_url_check_in_file=(value) @license_server_url_check_in_file = value end |
.logger ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/chef-licensing/config.rb', line 31 def logger return @logger if @logger @logger = Logger.new(STDERR) @logger.level = Logger::INFO @logger end |
.output ⇒ Object
39 40 41 |
# File 'lib/chef-licensing/config.rb', line 39 def output @output ||= STDOUT end |