# class Puppet::Util::NetworkDevice::Base

### Attributes

transport[RW]
url[RW]

### Public Class Methods

new(url) click to toggle source

    # File lib/puppet/util/network_device/base.rb, line 10
    def initialize(url)
      @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
        @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