Sha256: 2f06438ccdac94a01fed4fc7df70d0535ea5c61ae33916f337f0f41ef75da953

Contents?: true

Size: 792 Bytes

Versions: 90

Compression:

Stored size: 792 Bytes

Contents

require 'puppet/util/autoload'
require 'uri'
require 'puppet/util/network_device/transport'
require 'puppet/util/network_device/transport/base'

class Puppet::Util::NetworkDevice::Base

  attr_accessor :url, :transport

  def initialize(url, options = {})
    @url = URI.parse(url)

    @autoloader = Puppet::Util::Autoload.new(
      self,
      "puppet/util/network_device/transport",
      :wrap => false
    )

    if @autoloader.load(@url.scheme)
      @transport = Puppet::Util::NetworkDevice::Transport.const_get(@url.scheme.capitalize).new(options[:debug])
      @transport.host = @url.host
      @transport.port = @url.port || case @url.scheme ; when "ssh" ; 22 ; when "telnet" ; 23 ; end
      @transport.user = @url.user
      @transport.password = @url.password
    end
  end
end

Version data entries

90 entries across 90 versions & 2 rubygems

Version Path
puppet-retrospec-0.12.2 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb
puppet-3.8.7 lib/puppet/util/network_device/base.rb
puppet-3.8.7-x86-mingw32 lib/puppet/util/network_device/base.rb
puppet-3.8.7-x64-mingw32 lib/puppet/util/network_device/base.rb
puppet-3.8.6 lib/puppet/util/network_device/base.rb
puppet-3.8.6-x86-mingw32 lib/puppet/util/network_device/base.rb
puppet-retrospec-0.12.1 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb
puppet-3.8.6-x64-mingw32 lib/puppet/util/network_device/base.rb
puppet-retrospec-0.12.0 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb
puppet-3.8.5 lib/puppet/util/network_device/base.rb
puppet-3.8.5-x86-mingw32 lib/puppet/util/network_device/base.rb
puppet-3.8.5-x64-mingw32 lib/puppet/util/network_device/base.rb
puppet-3.8.4 lib/puppet/util/network_device/base.rb
puppet-3.8.4-x86-mingw32 lib/puppet/util/network_device/base.rb
puppet-3.8.4-x64-mingw32 lib/puppet/util/network_device/base.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/util/network_device/base.rb