Sha256: 5913c2f8025cc7f24345e240a85b57624c552cf55e94236a2c9e6bf0384a852d

Contents?: true

Size: 842 Bytes

Versions: 4

Compression:

Stored size: 842 Bytes

Contents

require 'uri'

# Specify the URL to the Puppet Enterprise ENC API. By default, the node classifier service
# listens on port 4433 and all endpoints are relative to the /classifier-api/ path. That means
# the likely value for this option will be something like:
# https://your-pe-console-server:4433/classifier-api
# @param parser [OptionParser object] The OptionParser argument
# @param options [Hash] Options hash being constructed; this is modified in this method.
OctocatalogDiff::CatalogDiff::Cli::Options::Option.newoption(:pe_enc_url) do
  has_weight 350

  def parse(parser, options)
    parser.on('--pe-enc-url URL', 'Base URL for Puppet Enterprise ENC endpoint') do |url|
      obj = URI.parse(url)
      raise ArgumentError, 'PE ENC URL must be https' unless obj.is_a?(URI::HTTPS)
      options[:pe_enc_url] = url
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
octocatalog-diff-0.5.6 lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_url.rb
octocatalog-diff-0.5.4 lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_url.rb
octocatalog-diff-0.5.3 lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_url.rb
octocatalog-diff-0.5.1 lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_url.rb